Add better line wrapping and syntax improvements to the description for `wp_resolve_numeric_slug_conflicts()`, added in 4.3.

Also properly mark `$query_vars` as optional in the parameter description.

See [32648]. See #32891.


git-svn-id: https://develop.svn.wordpress.org/trunk@33236 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
DrewAPicture 2015-07-13 21:53:02 +00:00
parent 2ebc03741b
commit f6ca434cd5
1 changed files with 12 additions and 7 deletions

View File

@ -287,17 +287,22 @@ function _wp_filter_taxonomy_base( $base ) {
/** /**
* Resolve numeric slugs that collide with date permalinks. * Resolve numeric slugs that collide with date permalinks.
* *
* Permalinks of posts with numeric slugs can sometimes look to `WP_Query::parse_query()` like a date archive, * Permalinks of posts with numeric slugs can sometimes look to WP_Query::parse_query()
* as when your permalink structure is `/%year%/%postname%/` and a post with post_name '05' has the URL * like a date archive, as when your permalink structure is `/%year%/%postname%/` and
* `/2015/05/`. This function detects conflicts of this type and resolves them in favor of the post permalink. * a post with post_name '05' has the URL `/2015/05/`.
* *
* Note that, since 4.3.0, `wp_unique_post_slug()` prevents the creation of post slugs that would result in a date * This function detects conflicts of this type and resolves them in favor of the
* archive conflict. The resolution performed in this function is primarily for legacy content, as well as cases when * post permalink.
* the admin has changed the site's permalink structure in a way that introduces URL conflicts. *
* Note that, since 4.3.0, wp_unique_post_slug() prevents the creation of post slugs
* that would result in a date archive conflict. The resolution performed in this
* function is primarily for legacy content, as well as cases when the admin has changed
* the site's permalink structure in a way that introduces URL conflicts.
* *
* @since 4.3.0 * @since 4.3.0
* *
* @param array $query_vars Query variables for setting up the loop, as determined in `WP::parse_request()`. * @param array $query_vars Optional. Query variables for setting up the loop, as determined in
* WP::parse_request(). Default empty array.
* @return array Returns the original array of query vars, with date/post conflicts resolved. * @return array Returns the original array of query vars, with date/post conflicts resolved.
*/ */
function wp_resolve_numeric_slug_conflicts( $query_vars = array() ) { function wp_resolve_numeric_slug_conflicts( $query_vars = array() ) {