Hierarchical rewrite rules operate via the 'pagename' query variable which is
passed to get_page_by_path(). However, the current rewrite rules use the 'name'
query variable for hierarchical types without a custom query_var.
Fixes#16323.
Built from https://develop.svn.wordpress.org/trunk@25182
git-svn-id: http://core.svn.wordpress.org/trunk@25154 1a063a9b-81f0-0310-95a4-ce76da25c4cd
* register_taxonomy: Use the same doc format for the associative array arg as used for register_post_type()
* register_taxonomy: Improve docs for _builtin, capabilities, hierarchical and rewrite args
* register_taxonomy: Use the same order in $defaults as in docblock
* register_taxonomy: Replace is_null with null ===, to be consistent
* register_post_type: Use the same order in $defaults as in docblock
* register_post_type: Improve docs for @uses and default fallbacks
And while we're on it: Whitespaces.
fixes#25150.
Built from https://develop.svn.wordpress.org/trunk@25130
git-svn-id: http://core.svn.wordpress.org/trunk@25110 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The content parsing functions are good abstractions, but are no longer needed by core and are too closely tied to legacy globals, rather than paving a new path.
For get_the_content() and the_content(), this only worsens the function prototype. It muddies theme-specific display (more links, etc) with filtered content. `apply_filters( 'the_content', $post->post_content )` is sufficient practice for now.
see #24330, [24301]. see #23625, [23804].
git-svn-id: http://core.svn.wordpress.org/trunk@24598 1a063a9b-81f0-0310-95a4-ce76da25c4cd
* Add a post ID argument to the_content(), get_the_content(), the_remaining_content(), and get_the_remaining_content().
* Pass the post ID to the the_content filter.
* Remove the format_pages global.
* Declare format_content and split_content as vars in WP_Post.
* phpdoc for the the_content filter that documents the new ID argument and denotes it as not-so-portable.
Props gcorne, DrewAPicture, duck_, aaroncampbell
see #24330
git-svn-id: http://core.svn.wordpress.org/trunk@24301 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Make required arguments optional in confirm_blog_signup().
Mark arguments as required in _future_post_hook(), the walker method display_element(), get_author_link() (deprecated), and the WP_Widget constructor.
props rlerdorf.
see #24210.
git-svn-id: http://core.svn.wordpress.org/trunk@24126 1a063a9b-81f0-0310-95a4-ce76da25c4cd
* Fixes an issue where image posts without a title could not be deleted
fixes#23887. see #24046. props WraithKenny, SergeyBiryukov.
git-svn-id: http://core.svn.wordpress.org/trunk@24015 1a063a9b-81f0-0310-95a4-ce76da25c4cd
* Fixes old revision data on the fly when you open a post for editing.
* Uses post_name of revisions to store a post version number (-v1), so we know what has been fixed.
* Latest version should also have a revision stored, whereas before it did not.
props adamsilverstein, mdawaffe. fixes#16215.
git-svn-id: http://core.svn.wordpress.org/trunk@23823 1a063a9b-81f0-0310-95a4-ce76da25c4cd
* Adds a very basic tabbed interface for selecting a post format (requires JS).
* Extra fields, which are post meta, are shown/hidden based on the selected format.
* Introduce a helper function for retrieving formats-specific metadata: `get_post_format_meta()`.
* Image selection uses the media modal, although without filtering or from URL support at the moment.
props rachelbaker, wonderboymusic, aaroncampbell, helen. see #19570.
git-svn-id: http://core.svn.wordpress.org/trunk@23449 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The exceptions to this are update_post_meta() and add_post_meta() which are often used by plugins in POST handlers and will continue accepting slashed data for now.
Introduce wp_upate_post_meta() and wp_add_post_meta() as unslashed alternatives to update_post_meta() and add_post_meta(). These functions could become methods in WP_Post so don't use them too heavily yet.
Remove all escape() calls from wp_xmlrpc_server. Now that core expects unslashed data this is no longer needed.
Remove addslashes(), addslashes_gpc(), add_magic_quotes() calls on data being prepared for handoff to core functions that until now expected slashed data. Adding slashes in no longer necessary.
Introduce wp_unslash() and use to it remove slashes from GPCS data before using it in core API. Almost every instance of stripslashes() in core should now be wp_unslash(). In the future (a release or three) when GPCS is no longer slashed, wp_unslash() will stop stripping slashes and simply return what is passed. At this point wp_unslash() calls can be removed from core.
Introduce wp_slash() for slashing GPCS data. This will also turn into a noop once GPCS is no longer slashed. wp_slash() should almost never be used. It is mainly of use in unit tests.
Plugins should use wp_unslash() on data being passed to core API.
Plugins should no longer slash data being passed to core. So when you get_post() and then wp_insert_post() the post data from get_post() no longer needs addslashes(). Most plugins were not bothering with this. They will magically start doing the right thing. Unfortunately, those few souls who did it properly will now have to avoid calling addslashes() for 3.6 and newer.
Use wp_kses_post() and wp_kses_data(), which expect unslashed data, instead of wp_filter_post_kses() and wp_filter_kses(), which expect slashed data. Filters are no longer passed slashed data.
Remove many no longer necessary calls to $wpdb->escape() and esc_sql().
In wp_get_referer() and wp_get_original_referer(), return unslashed data.
Remove old stripslashes() calls from WP_Widget::update() handlers. These haven't been necessary since WP_Widget.
Switch several queries over to prepare().
Expect something to break.
Props alexkingorg
see #21767
git-svn-id: http://core.svn.wordpress.org/trunk@23416 1a063a9b-81f0-0310-95a4-ce76da25c4cd