Docs: Add missing description for `$wp_rewrite` global.

See #45604, #47110.
Built from https://develop.svn.wordpress.org/trunk@45735


git-svn-id: http://core.svn.wordpress.org/trunk@45546 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2019-08-04 01:19:56 +00:00
parent 29b072e706
commit b1e34ccc1f
21 changed files with 46 additions and 46 deletions

View File

@ -235,7 +235,7 @@ Any changes to the directives between these markers will be overwritten.'
*
* @since 1.5.0
*
* @global WP_Rewrite $wp_rewrite
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
*
* @return bool|null True on write success, false on failure. Null in multisite.
*/
@ -272,7 +272,7 @@ function save_mod_rewrite_rules() {
*
* @since 2.8.0
*
* @global WP_Rewrite $wp_rewrite
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
*
* @return bool|null True on write success, false on failure. Null in multisite.
*/

View File

@ -947,9 +947,9 @@ endif;
*
* @since 3.0.0
*
* @global wpdb $wpdb
* @global wpdb $wpdb WordPress database abstraction object.
* @global object $current_site
* @global WP_Rewrite $wp_rewrite
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
*
* @param int $network_id ID of network to populate.
* @param string $domain The domain name for the network (eg. "example.com").

View File

@ -130,7 +130,7 @@ if ( ! function_exists( 'wp_install_defaults' ) ) :
* @since 2.1.0
*
* @global wpdb $wpdb WordPress database abstraction object.
* @global WP_Rewrite $wp_rewrite
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
* @global string $table_prefix
*
* @param int $user_id User ID.

View File

@ -334,7 +334,7 @@ function the_author_posts_link( $deprecated = '' ) {
*
* @since 2.1.0
*
* @global WP_Rewrite $wp_rewrite
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
*
* @param int $author_id Author ID.
* @param string $author_nicename Optional. The author's nicename (slug). Default empty.

View File

@ -28,7 +28,7 @@
*
* @since 2.3.0
*
* @global WP_Rewrite $wp_rewrite
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
* @global bool $is_IIS
* @global WP_Query $wp_query
* @global wpdb $wpdb WordPress database abstraction object.
@ -728,7 +728,7 @@ function redirect_guess_404_permalink() {
*
* @since 3.4.0
*
* @global WP_Rewrite $wp_rewrite
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
*/
function wp_redirect_admin_locations() {
global $wp_rewrite;

View File

@ -121,7 +121,7 @@ function get_the_category_by_ID( $cat_ID ) { // phpcs:ignore WordPress.NamingCon
*
* @since 1.5.1
*
* @global WP_Rewrite $wp_rewrite
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
*
* @param string $separator Optional. Separator between the categories. By default, the links are placed
* in an unordered list. An empty string will result in the default behavior.

View File

@ -526,7 +526,7 @@ final class WP_Post_Type {
*
* @since 4.6.0
*
* @global WP_Rewrite $wp_rewrite WordPress Rewrite Component.
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
* @global WP $wp Current WordPress environment instance.
*/
public function add_rewrite_rules() {

View File

@ -126,7 +126,7 @@ class WP {
*
* @since 2.0.0
*
* @global WP_Rewrite $wp_rewrite
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
*
* @param array|string $extra_query_vars Set the extra query variables.
*/

View File

@ -687,7 +687,7 @@ function comment_ID() { // phpcs:ignore WordPress.NamingConventions.ValidFunctio
*
* @see get_page_of_comment()
*
* @global WP_Rewrite $wp_rewrite
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
* @global bool $in_comment_loop
*
* @param WP_Comment|int|null $comment Comment to retrieve. Default current comment.

View File

@ -3926,7 +3926,7 @@ function language_attributes( $doctype = 'html' ) {
* @since 4.9.0 Added the `aria_current` argument.
*
* @global WP_Query $wp_query
* @global WP_Rewrite $wp_rewrite
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
*
* @param string|array $args {
* Optional. Array or string of arguments for generating paginated links for archives.

View File

@ -37,7 +37,7 @@ function the_permalink( $post = 0 ) {
*
* @since 2.2.0
*
* @global WP_Rewrite $wp_rewrite
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
*
* @param string $string URL with or without a trailing slash.
* @param string $type_of_url Optional. The type of URL being considered (e.g. single, category, etc)
@ -252,7 +252,7 @@ function get_permalink( $post = 0, $leavename = false ) {
*
* @since 3.0.0
*
* @global WP_Rewrite $wp_rewrite
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
*
* @param int|WP_Post $id Optional. Post ID or post object. Default is the global `$post`.
* @param bool $leavename Optional, defaults to false. Whether to keep post name. Default false.
@ -355,7 +355,7 @@ function get_page_link( $post = false, $leavename = false, $sample = false ) {
* @since 2.1.0
* @access private
*
* @global WP_Rewrite $wp_rewrite
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
*
* @param int|WP_Post $post Optional. Post ID or object. Default uses the global `$post`.
* @param bool $leavename Optional. Whether to keep the page name. Default false.
@ -401,7 +401,7 @@ function _get_page_link( $post = false, $leavename = false, $sample = false ) {
*
* @since 2.0.0
*
* @global WP_Rewrite $wp_rewrite
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
*
* @param int|object $post Optional. Post ID or object. Default uses the global `$post`.
* @param bool $leavename Optional. Whether to keep the page name. Default false.
@ -462,7 +462,7 @@ function get_attachment_link( $post = null, $leavename = false ) {
*
* @since 1.5.0
*
* @global WP_Rewrite $wp_rewrite
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
*
* @param int|bool $year False for current year or year for permalink.
* @return string The permalink for the specified year archive.
@ -496,7 +496,7 @@ function get_year_link( $year ) {
*
* @since 1.0.0
*
* @global WP_Rewrite $wp_rewrite
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
*
* @param bool|int $year False for current year. Integer of year.
* @param bool|int $month False for current month. Integer of month.
@ -536,7 +536,7 @@ function get_month_link( $year, $month ) {
*
* @since 1.0.0
*
* @global WP_Rewrite $wp_rewrite
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
*
* @param bool|int $year False for current year. Integer of year.
* @param bool|int $month False for current month. Integer of month.
@ -606,7 +606,7 @@ function the_feed_link( $anchor, $feed = '' ) {
*
* @since 1.5.0
*
* @global WP_Rewrite $wp_rewrite
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
*
* @param string $feed Optional. Feed type. Default empty.
* @return string The feed permalink.
@ -1076,7 +1076,7 @@ function edit_term_link( $link = '', $before = '', $after = '', $term = null, $e
*
* @since 3.0.0
*
* @global WP_Rewrite $wp_rewrite
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
*
* @param string $query Optional. The query string to use. If empty the current query is used. Default empty.
* @return string The search permalink.
@ -1117,7 +1117,7 @@ function get_search_link( $query = '' ) {
*
* @since 2.5.0
*
* @global WP_Rewrite $wp_rewrite
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
*
* @param string $search_query Optional. Search query. Default empty.
* @param string $feed Optional. Feed type. Default empty.
@ -1157,7 +1157,7 @@ function get_search_feed_link( $search_query = '', $feed = '' ) {
*
* @since 2.5.0
*
* @global WP_Rewrite $wp_rewrite
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
*
* @param string $search_query Optional. Search query. Default empty.
* @param string $feed Optional. Feed type. Default empty.
@ -1190,7 +1190,7 @@ function get_search_comments_feed_link( $search_query = '', $feed = '' ) {
* @since 3.1.0
* @since 4.5.0 Support for posts was added.
*
* @global WP_Rewrite $wp_rewrite
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
*
* @param string $post_type Post type.
* @return string|false The post type archive permalink.
@ -2196,7 +2196,7 @@ function adjacent_post_link( $format, $link, $in_same_term = false, $excluded_te
*
* @since 1.5.0
*
* @global WP_Rewrite $wp_rewrite
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
*
* @param int $pagenum Optional. Page number. Default 1.
* @param bool $escape Optional. Whether to escape the URL for display, with esc_url(). Defaults to true.
@ -2755,7 +2755,7 @@ function _navigation_markup( $links, $class = 'posts-navigation', $screen_reader
*
* @since 2.7.0
*
* @global WP_Rewrite $wp_rewrite
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
*
* @param int $pagenum Optional. Page number. Default 1.
* @param int $max_page Optional. The maximum number of comment pages. Default 0.
@ -2912,7 +2912,7 @@ function previous_comments_link( $label = '' ) {
* @see paginate_links()
* @since 2.7.0
*
* @global WP_Rewrite $wp_rewrite
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
*
* @param string|array $args Optional args. See paginate_links(). Default empty array.
* @return string|array|void Markup for comment page links or array of comment page links.

View File

@ -295,7 +295,7 @@ function wp_nav_menu( $args = array() ) {
* @since 3.0.0
*
* @global WP_Query $wp_query
* @global WP_Rewrite $wp_rewrite
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
*
* @param array $menu_items The current menu item objects to which to add the class property information.
*/

View File

@ -183,7 +183,7 @@ function _post_format_request( $qvs ) {
* @access private
* @since 3.1.0
*
* @global WP_Rewrite $wp_rewrite
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
*
* @param string $link
* @param object $term

View File

@ -1028,7 +1028,7 @@ function wp_link_pages( $args = '' ) {
* @since 3.1.0
* @access private
*
* @global WP_Rewrite $wp_rewrite
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
*
* @param int $i Page number.
* @return string Link.

View File

@ -4197,8 +4197,8 @@ function check_and_publish_future_post( $post_id ) {
*
* @since 2.8.0
*
* @global wpdb $wpdb WordPress database abstraction object.
* @global WP_Rewrite $wp_rewrite
* @global wpdb $wpdb WordPress database abstraction object.
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
*
* @param string $slug The desired slug (post_name).
* @param int $post_ID Post ID.

View File

@ -151,7 +151,7 @@ function rest_api_init() {
* @since 4.4.0
*
* @see add_rewrite_rule()
* @global WP_Rewrite $wp_rewrite
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
*/
function rest_api_register_rewrites() {
global $wp_rewrite;
@ -338,7 +338,7 @@ function rest_get_url_prefix() {
* @since 4.4.0
*
* @todo Check if this is even necessary
* @global WP_Rewrite $wp_rewrite
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
*
* @param int $blog_id Optional. Blog ID. Default of null returns URL for current blog.
* @param string $path Optional. REST route. Default '/'.

View File

@ -127,7 +127,7 @@ define( 'EP_ALL', EP_PERMALINK | EP_ATTACHMENT | EP_ROOT | EP_COMMENTS | EP_SEAR
* @since 2.1.0
* @since 4.4.0 Array support was added to the `$query` parameter.
*
* @global WP_Rewrite $wp_rewrite WordPress Rewrite Component.
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
*
* @param string $regex Regular expression to match request against.
* @param string|array $query The corresponding query vars for this rewrite rule.
@ -149,7 +149,7 @@ function add_rewrite_rule( $regex, $query, $after = 'bottom' ) {
*
* @since 2.1.0
*
* @global WP_Rewrite $wp_rewrite
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
* @global WP $wp
*
* @param string $tag Name of the new rewrite tag.
@ -238,7 +238,7 @@ function remove_permastruct( $name ) {
*
* @since 2.1.0
*
* @global WP_Rewrite $wp_rewrite
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
*
* @param string $feedname Feed name.
* @param callable $function Callback to run on feed display.
@ -266,7 +266,7 @@ function add_feed( $feedname, $function ) {
*
* @since 3.0.0
*
* @global WP_Rewrite $wp_rewrite
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
*
* @param bool $hard Whether to update .htaccess (hard flush) or just update
* rewrite_rules transient (soft flush). Default is true (hard).
@ -304,7 +304,7 @@ function flush_rewrite_rules( $hard = true ) {
* @since 2.1.0
* @since 4.3.0 Added support for skipping query var registration by passing `false` to `$query_var`.
*
* @global WP_Rewrite $wp_rewrite
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
*
* @param string $name Name of the endpoint.
* @param int $places Endpoint mask describing the places the endpoint should be added.
@ -459,7 +459,7 @@ function wp_resolve_numeric_slug_conflicts( $query_vars = array() ) {
*
* @since 1.0.0
*
* @global WP_Rewrite $wp_rewrite
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
* @global WP $wp
*
* @param string $url Permalink to check.

View File

@ -19,7 +19,7 @@
*
* @since 2.8.0
*
* @global WP_Rewrite $wp_rewrite The WordPress rewrite class.
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
*/
function create_initial_taxonomies() {
global $wp_rewrite;
@ -4168,7 +4168,7 @@ function wp_term_is_shared( $term_id ) {
*
* @since 2.5.0
*
* @global WP_Rewrite $wp_rewrite
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
*
* @param object|int|string $term The term object, ID, or slug whose link will be retrieved.
* @param string $taxonomy Optional. Taxonomy. Default empty.

View File

@ -687,7 +687,7 @@ function locate_template( $template_names, $load = false, $require_once = true )
* @global WP_Post $post
* @global bool $wp_did_header
* @global WP_Query $wp_query
* @global WP_Rewrite $wp_rewrite
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
* @global wpdb $wpdb WordPress database abstraction object.
* @global string $wp_version
* @global WP $wp

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.3-alpha-45734';
$wp_version = '5.3-alpha-45735';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

View File

@ -423,7 +423,7 @@ $GLOBALS['wp_query'] = $GLOBALS['wp_the_query'];
/**
* Holds the WordPress Rewrite object for creating pretty URLs
*
* @global WP_Rewrite $wp_rewrite
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
* @since 1.5.0
*/
$GLOBALS['wp_rewrite'] = new WP_Rewrite();