Commit Graph

10409 Commits

Author SHA1 Message Date
Andrew Nacin
1beb18d241 Add Pinyin diacritics to remove_accents(). Remove these diacritics in sanitize_title_with_dashes() on save as well. props bolo1988, SergeyBiryukov. fixes #20772.
git-svn-id: http://core.svn.wordpress.org/trunk@21859 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-15 20:01:08 +00:00
Andrew Nacin
f431b408da Combine some strings. props pavelevap. fixes #21087.
git-svn-id: http://core.svn.wordpress.org/trunk@21857 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-15 19:57:05 +00:00
Andrew Nacin
9ae3bf6fa6 When doing a taxonomy query, search against the currently registered post types of the queried taxonomies.
Prevents posts of a type no longer assigned to a queried taxonomy from being returned.

props jondavidjohn. fixes #21290.



git-svn-id: http://core.svn.wordpress.org/trunk@21855 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-15 19:44:51 +00:00
Andrew Nacin
923b3e8e0e Pass current network ID to domain_exists() in wpmu_validate_blog_signup(). props larysa, fixes #17303.
git-svn-id: http://core.svn.wordpress.org/trunk@21853 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-15 19:29:59 +00:00
Andrew Nacin
a8a78b8975 "[ ] Discourage search engines from indexing this site". fixes #16416.
git-svn-id: http://core.svn.wordpress.org/trunk@21851 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-14 20:26:20 +00:00
Andrew Nacin
f4c9c9ce0d Use the non-slashing variants of kses functions in sanitize_option() to avoid slash ping pong. fixes #21892.
git-svn-id: http://core.svn.wordpress.org/trunk@21850 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-14 19:32:53 +00:00
Andrew Nacin
7d7498f7ab Don't output the {$post_type} post class in the admin, to avoid clashes with admin CSS. props c3mdigital. fixes #21203.
git-svn-id: http://core.svn.wordpress.org/trunk@21848 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-14 18:57:11 +00:00
Andrew Nacin
a7cd7c3ac7 Use wp_get_theme()->get_page_templates() rather than get_page_templates() in wp_insert_post(),
to allow page template setting on the frontend without a fatal error. fixes #21755.



git-svn-id: http://core.svn.wordpress.org/trunk@21847 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-14 18:36:08 +00:00
Andrew Nacin
95c9cd1e6b Remove unused show_in_admin_all and single_view_cap from register_post_status(). props duck_. fixes #18972.
git-svn-id: http://core.svn.wordpress.org/trunk@21846 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-14 18:02:23 +00:00
Andrew Nacin
07324a1f53 In get_page_by_path(), attempt to return an item that has the same post type before returning an attachment with the same name. props SergeyBiryukov. tests in [UT1021]. fixes #15665.
git-svn-id: http://core.svn.wordpress.org/trunk@21845 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-14 17:19:25 +00:00
Andrew Nacin
b65ceddeeb If update_post_caches() does not receive a post type, glean post types from the individual post objects, rather than assuming 'post'. fixes #20177.
git-svn-id: http://core.svn.wordpress.org/trunk@21844 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-14 16:26:05 +00:00
Andrew Nacin
e728ad3a1e Update docs to reflect that wp_count_terms() can return WP_Error when the taxonomy does not exist. props SergeyBiryukov, fixes #21888.
git-svn-id: http://core.svn.wordpress.org/trunk@21843 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-14 16:11:30 +00:00
Andrew Nacin
aa2fdd48ae Calendar widget: Don't print widget title markup when the title is empty. props jakub.tyrcha. fixes #17837.
git-svn-id: http://core.svn.wordpress.org/trunk@21841 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-13 19:46:24 +00:00
Andrew Nacin
19d165059d Switch $args and $url for the oembed_fetch_url filter introduced in [21839]. A bit more logical, especially given the order of arguments passed to fetch(). see #16996.
git-svn-id: http://core.svn.wordpress.org/trunk@21840 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-13 17:49:23 +00:00
Andrew Nacin
b2b571f4ce Introduce an oembed_fetch_url filter to be applied before sending the request.
props Otto42, r-a-y. fixes #16996.



git-svn-id: http://core.svn.wordpress.org/trunk@21839 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-13 17:45:36 +00:00
Andrew Nacin
8886eef8d9 Add nonce_user_logged_out filters to wp_create_nonce() and wp_verify_nonce() for when there is no user ID. Provides plugins the ability to tie a nonce to some other characteristic of the session. props sc0ttkclark, fixes #21111.
git-svn-id: http://core.svn.wordpress.org/trunk@21837 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-13 17:17:47 +00:00
Andrew Nacin
a42be1dbb3 Check that the taxonomy matches when calling is_tax() with only a taxonomy argument. props wonderboymusic, see #20590.
git-svn-id: http://core.svn.wordpress.org/trunk@21836 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-13 17:15:13 +00:00
Andrew Nacin
2f7bb69ffa Switch to sans-serif for the font stack in Thickbox as we have done elsewhere. props wet, fixes #20268.
git-svn-id: http://core.svn.wordpress.org/trunk@21834 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-13 17:08:01 +00:00
Andrew Nacin
f69fdb6198 Don't sanitize include and exclude in gallery_shortcode(), as this is handled further down the stack, and better. props SergeyBiryukov, TobiasBg. fixes #21827.
git-svn-id: http://core.svn.wordpress.org/trunk@21833 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-13 17:06:25 +00:00
Andrew Nacin
5bc021dad7 Allow supports => false to be passed to register_post_type() to disable the default title and editor.
An empty array may also disable all default features in the future.
Do not rely on this behavior: always specify title and editor if you want them.

props sc0ttkclark.
fixes #21586.



git-svn-id: http://core.svn.wordpress.org/trunk@21831 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-13 17:02:39 +00:00
Andrew Nacin
58e1e69c4b oEmbed uses author_can(), not current_user_can(). props DrewAPicture, fixes #21880.
git-svn-id: http://core.svn.wordpress.org/trunk@21830 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-13 16:42:43 +00:00
Andrew Nacin
94c34141b3 Don't cache a non-existent link in get_bookmark(). props wonderboymusic, fixes #21159.
git-svn-id: http://core.svn.wordpress.org/trunk@21829 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-13 16:41:43 +00:00
Andrew Nacin
f54edf701a When balancing tags, properly close tags that shouldn't be self-closed but are. Support all self-closing tags.
props coffee2code.
fixes #1597.



git-svn-id: http://core.svn.wordpress.org/trunk@21828 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-13 16:39:06 +00:00
Andrew Nacin
e4c21210aa Add xmpp to allowed protocols. props ethitter, fixes #21604.
git-svn-id: http://core.svn.wordpress.org/trunk@21826 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-12 15:47:34 +00:00
Andrew Nacin
9f6fe3c4ff Don't show Appearance > Widgets if the theme has no sidebars defined. props SergeyBiryukov for the initial patch. fixes #21761.
git-svn-id: http://core.svn.wordpress.org/trunk@21825 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-12 02:16:46 +00:00
Andrew Nacin
6a71516a85 XML-RPC: Introduce wp.getUsers, wp.getUser, wp.getProfile, wp.editProfile.
props maxcutler.
props nprasath002 for earlier patches.

see #18428.



git-svn-id: http://core.svn.wordpress.org/trunk@21824 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-12 00:04:21 +00:00
Andrew Nacin
dc49f24a6c Remove ms-files.php rewriting from WordPress multisite. fixes #19235.
Keep existing networks compatible with a ms_files_rewriting network option.



git-svn-id: http://core.svn.wordpress.org/trunk@21823 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-11 22:22:20 +00:00
Andrew Nacin
bc6087bc98 Always return upload directory information from wp_upload_dir(), even if there is an error. Append the error to the array. see #19235.
git-svn-id: http://core.svn.wordpress.org/trunk@21822 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-11 22:06:49 +00:00
Daryl Koopersmith
3ebb9b4538 Media JS: When adding a view to a media workflow, add a shorthand for registering a view constructor with no options. see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@21821 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-11 21:21:32 +00:00
Daryl Koopersmith
b514f391cd Media JS: Add support for multiple views to the media workflow controller. see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@21820 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-11 21:13:07 +00:00
Andrew Nacin
fffed3c5d2 Remove accidental cruft in [21804] caused by renaming variables. see #21509.
git-svn-id: http://core.svn.wordpress.org/trunk@21819 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-11 20:15:56 +00:00
Andrew Nacin
9d204841ee Remove AtomPub from core.
* Will be replaced with http://wordpress.org/extend/plugins/atom-publishing-protocol/.
 * Introduces an action, xmlrpc_rsd_apis, to add APIs to xmlrpc.php?rsd.
 * Introduces support for 'error' being 403 and 50x in class-wp.php.
 * Removes 'Remote Publishing' from Writing Settings (see [21804]). Keeps the remote_publishing settings section.

DB version is bumped to generate the new wp-app rewrite rule and remove the old enable_app option.

props wonderboymusic.
fixes #21509.



git-svn-id: http://core.svn.wordpress.org/trunk@21818 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-11 20:11:39 +00:00
Daryl Koopersmith
7fb2c8b4f7 Use JS Attachment models in wp.Uploader. fixes #21868.
Moves the uploading Attachments queue from the media workspace view to the uploader itself. This ensures that all attachments are added to the central attachmnet store.

Updates wp.Uploader to pass Attachment models to callbacks instead of Plupload file objects. Attachments in the process of uploading have a reference to the file object (which can be fetched by calling `attachment.get('file');`).

Also updates the customizer to be compatible with the API changes.


git-svn-id: http://core.svn.wordpress.org/trunk@21814 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-11 16:55:58 +00:00
Andrew Nacin
87c947a987 Use network_site_url() for wp-signup.php. props markjaquith. see #19796.
git-svn-id: http://core.svn.wordpress.org/trunk@21813 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-11 12:27:25 +00:00
Andrew Nacin
d6b2024a7d Remove old edit_*_per_page usermeta keys.
These per-page values were when the post type or taxonomy name has a hyphen.
Previously, these were converted to underscores. This changed in [21322].

fixes #18958.



git-svn-id: http://core.svn.wordpress.org/trunk@21811 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-11 02:08:29 +00:00
Andrew Nacin
1b99559639 Use site_url() in WP_Rewrite::mod_rewrite_rules(), rather than get_option(). props JustinSainton. fixes #21186.
git-svn-id: http://core.svn.wordpress.org/trunk@21810 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-11 01:44:48 +00:00
Andrew Nacin
8e45050e61 Bump default memory limit from 32MB to 40MB. fixes #21646.
git-svn-id: http://core.svn.wordpress.org/trunk@21809 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-11 01:41:56 +00:00
Andrew Nacin
1508b46bb4 Call error_log() in wp-db without unnecessary conditionals. fixes #21103.
git-svn-id: http://core.svn.wordpress.org/trunk@21807 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-11 01:35:43 +00:00
Andrew Nacin
f84f149445 XML-RPC: Add the 'home' option to wp.getOptons. props mrroundhill. fixes #21822.
git-svn-id: http://core.svn.wordpress.org/trunk@21805 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-11 01:26:38 +00:00
Andrew Nacin
26dc1e74e5 Turn XML-RPC on and remove the option on the Writing Settings page.
props markoheijnen for the initial patch.

Introduces a new filter, xmlrpc_enabled.

Respects any current callbacks registered to the pre_option_enable_xmlrpc
and option_enable_xmlrpc filters, for anyone forcing it off via code.

fixes #21509.



git-svn-id: http://core.svn.wordpress.org/trunk@21804 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-11 00:37:31 +00:00
Ryan Boren
43a9a11ef9 Preserve the $format and $link arguments for passing to the previous|next_post_link filter. Pass $post to the filter.
Props Otto42, helenyhou
fixes #19640 #18764


git-svn-id: http://core.svn.wordpress.org/trunk@21802 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-10 21:36:06 +00:00
Ryan Boren
249453b396 phpdoc fixes and additions for post-template.php. Props c3mdigital. fixes #21220
git-svn-id: http://core.svn.wordpress.org/trunk@21799 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-10 20:04:33 +00:00
Ryan Boren
8f1f88a82a Don't use set_url_scheme() in wp_guess_url(). wp_guess_url() is used during install before set_url_scheme() is loaded. Props SergeyBiryukov. fixes #20759
git-svn-id: http://core.svn.wordpress.org/trunk@21797 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-10 19:37:08 +00:00
Andrew Nacin
40543db45f Recommend the wp_kses_allowed_html filter over CUSTOM_TAGS. Soft deprecate CUSTOM_TAGS. see #17977, #20210.
git-svn-id: http://core.svn.wordpress.org/trunk@21796 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-10 18:00:41 +00:00
Andrew Nacin
ed375f4106 Remove kses allowedtags that were commented out long ago. see #17977.
git-svn-id: http://core.svn.wordpress.org/trunk@21795 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-10 17:53:46 +00:00
Ryan Boren
88d549cbe4 Set the archived, spam, and deleted properties in the objects returned from get_blogs_of_user(). Props wonderboymusic. fixes #16225
git-svn-id: http://core.svn.wordpress.org/trunk@21794 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-10 17:50:13 +00:00
Ryan Boren
51a5715967 Restore return by ref for make_entry(). Props SergeyBiryukov. fixes #21839
git-svn-id: http://core.svn.wordpress.org/trunk@21793 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-10 17:34:34 +00:00
Ryan Boren
f483a85676 Remove unnecessary return by refs. Props wonderboymusic. fixes #21839
git-svn-id: http://core.svn.wordpress.org/trunk@21792 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-10 17:00:11 +00:00
Ryan Boren
ffac99eadc * Introduce wp_kses_allowed_html() which accepts a context string and returns an array of allowed tags.
* Remove explicit declarations of class, id, style, and title from $allowedposttags
 * Dynamicallly add global attributes to every tag for the 'post' context
 * No longer calls wp_kses_array_lc() every time wp_kses() runs. Instead it runs once if CUSTOM_TAGS is true. Plugins directly passing a custom allowed_html array will no longer get the lc treatment. Keep an eye out for problems with this.
 * wp_kses_data() and wp_filter_kses() pass current_filter() for the $allowed_html argument to wp_kses().
 * wp_kses_allowed_html() handles being passed a filter name for a context. If the filter is not a recognized one it defaults to using $allowedtags as was done before for wp_kses_data() and wp_filter_kses().
 * wp_kses_allowed_html() recognizes user_description and pre_user_description out of the box. For these it takes $allowedtags and inserts rel attribute support.
 * wp_kses_allowed_html() allows plugins to override the return values for the default contexts and support arbitrary contexts via a wp_kses_allowed_html filter.
 * wp_kses_hook() can now pass a string context for $allowed_html to the pre_kses filter. We might have to pass the result of wp_kses_allowed_html() instead if it turns out that plugins are digging in $allowed_html.

fixes #17977
see #20210


git-svn-id: http://core.svn.wordpress.org/trunk@21790 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-10 16:19:54 +00:00
Andrew Nacin
1af8c36086 Allow easy registration of taxonomy columns on post (and custom post type) list table screens.
To register a column for a list table, use the new manage_taxonomies_for_{$post_type}_columns
filter. Introduces show_admin_column => true for register_taxonomy(), which automatically
displays that column on all associated post types.

props jtsternberg, SergeyBiryukov for initial patches.
fixes #21240.



git-svn-id: http://core.svn.wordpress.org/trunk@21788 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-08 03:18:36 +00:00