mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-10 12:50:18 +01:00
Docs: Replace $this
in hook param docs with more appropriate names.
`$this` is a pseudo-variable that cannot be used as the name of a function parameter, so renaming these helps prevent errors when implementing hook callback functions. Fixes #53457 Built from https://develop.svn.wordpress.org/trunk@51518 git-svn-id: http://core.svn.wordpress.org/trunk@51129 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
166dc3ac8e
commit
2cb4ebefe2
@ -1014,7 +1014,7 @@ final class WP_Screen {
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param string $screen_settings Screen settings.
|
||||
* @param WP_Screen $this WP_Screen object.
|
||||
* @param WP_Screen $screen WP_Screen object.
|
||||
*/
|
||||
$this->_screen_settings = apply_filters( 'screen_settings', $this->_screen_settings, $this );
|
||||
|
||||
@ -1029,7 +1029,7 @@ final class WP_Screen {
|
||||
*
|
||||
* @param bool $show_screen Whether to show Screen Options tab.
|
||||
* Default true.
|
||||
* @param WP_Screen $this Current WP_Screen instance.
|
||||
* @param WP_Screen $screen Current WP_Screen instance.
|
||||
*/
|
||||
$this->_show_screen_options = apply_filters( 'screen_options_show_screen', $show_screen, $this );
|
||||
return $this->_show_screen_options;
|
||||
|
@ -832,7 +832,7 @@ class WP_Upgrader {
|
||||
* @since 3.7.0 Added to WP_Upgrader::run().
|
||||
* @since 4.6.0 `$translations` was added as a possible argument to `$hook_extra`.
|
||||
*
|
||||
* @param WP_Upgrader $this WP_Upgrader instance. In other contexts, $this, might be a
|
||||
* @param WP_Upgrader $upgrader WP_Upgrader instance. In other contexts this might be a
|
||||
* Theme_Upgrader, Plugin_Upgrader, Core_Upgrade, or Language_Pack_Upgrader instance.
|
||||
* @param array $hook_extra {
|
||||
* Array of bulk item update data.
|
||||
|
@ -324,7 +324,7 @@ class WP_Comment_Query {
|
||||
*
|
||||
* @since 4.2.0
|
||||
*
|
||||
* @param WP_Comment_Query $this The WP_Comment_Query instance (passed by reference).
|
||||
* @param WP_Comment_Query $query The WP_Comment_Query instance (passed by reference).
|
||||
*/
|
||||
do_action_ref_array( 'parse_comment_query', array( &$this ) );
|
||||
}
|
||||
@ -370,7 +370,7 @@ class WP_Comment_Query {
|
||||
*
|
||||
* @since 3.1.0
|
||||
*
|
||||
* @param WP_Comment_Query $this Current instance of WP_Comment_Query (passed by reference).
|
||||
* @param WP_Comment_Query $query Current instance of WP_Comment_Query (passed by reference).
|
||||
*/
|
||||
do_action_ref_array( 'pre_get_comments', array( &$this ) );
|
||||
|
||||
|
@ -397,7 +397,7 @@ class WP_Customize_Control {
|
||||
*
|
||||
* @since 3.4.0
|
||||
*
|
||||
* @param WP_Customize_Control $this WP_Customize_Control instance.
|
||||
* @param WP_Customize_Control $control WP_Customize_Control instance.
|
||||
*/
|
||||
do_action( 'customize_render_control', $this );
|
||||
|
||||
@ -409,7 +409,7 @@ class WP_Customize_Control {
|
||||
*
|
||||
* @since 3.4.0
|
||||
*
|
||||
* @param WP_Customize_Control $this WP_Customize_Control instance.
|
||||
* @param WP_Customize_Control $control WP_Customize_Control instance.
|
||||
*/
|
||||
do_action( "customize_render_control_{$this->id}", $this );
|
||||
|
||||
|
@ -346,7 +346,7 @@ final class WP_Customize_Manager {
|
||||
* @see WP_Customize_Manager::__construct()
|
||||
*
|
||||
* @param string[] $components Array of core components to load.
|
||||
* @param WP_Customize_Manager $this WP_Customize_Manager instance.
|
||||
* @param WP_Customize_Manager $manager WP_Customize_Manager instance.
|
||||
*/
|
||||
$components = apply_filters( 'customize_loaded_components', $this->components, $this );
|
||||
|
||||
@ -691,7 +691,7 @@ final class WP_Customize_Manager {
|
||||
*
|
||||
* @since 3.4.0
|
||||
*
|
||||
* @param WP_Customize_Manager $this WP_Customize_Manager instance.
|
||||
* @param WP_Customize_Manager $manager WP_Customize_Manager instance.
|
||||
*/
|
||||
do_action( 'start_previewing_theme', $this );
|
||||
}
|
||||
@ -729,7 +729,7 @@ final class WP_Customize_Manager {
|
||||
*
|
||||
* @since 3.4.0
|
||||
*
|
||||
* @param WP_Customize_Manager $this WP_Customize_Manager instance.
|
||||
* @param WP_Customize_Manager $manager WP_Customize_Manager instance.
|
||||
*/
|
||||
do_action( 'stop_previewing_theme', $this );
|
||||
}
|
||||
@ -928,7 +928,7 @@ final class WP_Customize_Manager {
|
||||
*
|
||||
* @since 3.4.0
|
||||
*
|
||||
* @param WP_Customize_Manager $this WP_Customize_Manager instance.
|
||||
* @param WP_Customize_Manager $manager WP_Customize_Manager instance.
|
||||
*/
|
||||
do_action( 'customize_register', $this );
|
||||
|
||||
@ -1860,7 +1860,7 @@ final class WP_Customize_Manager {
|
||||
* @since 4.4.0
|
||||
*
|
||||
* @param mixed $value Unsanitized setting post value.
|
||||
* @param WP_Customize_Manager $this WP_Customize_Manager instance.
|
||||
* @param WP_Customize_Manager $manager WP_Customize_Manager instance.
|
||||
*/
|
||||
do_action( "customize_post_value_set_{$setting_id}", $value, $this );
|
||||
|
||||
@ -1876,7 +1876,7 @@ final class WP_Customize_Manager {
|
||||
*
|
||||
* @param string $setting_id Setting ID.
|
||||
* @param mixed $value Unsanitized setting post value.
|
||||
* @param WP_Customize_Manager $this WP_Customize_Manager instance.
|
||||
* @param WP_Customize_Manager $manager WP_Customize_Manager instance.
|
||||
*/
|
||||
do_action( 'customize_post_value_set', $setting_id, $value, $this );
|
||||
}
|
||||
@ -1937,7 +1937,7 @@ final class WP_Customize_Manager {
|
||||
*
|
||||
* @since 3.4.0
|
||||
*
|
||||
* @param WP_Customize_Manager $this WP_Customize_Manager instance.
|
||||
* @param WP_Customize_Manager $manager WP_Customize_Manager instance.
|
||||
*/
|
||||
do_action( 'customize_preview_init', $this );
|
||||
}
|
||||
@ -2592,7 +2592,7 @@ final class WP_Customize_Manager {
|
||||
*
|
||||
* @param array $response Additional information passed back to the 'saved'
|
||||
* event on `wp.customize`.
|
||||
* @param WP_Customize_Manager $this WP_Customize_Manager instance.
|
||||
* @param WP_Customize_Manager $manager WP_Customize_Manager instance.
|
||||
*/
|
||||
$response = apply_filters( 'customize_save_response', $response, $this );
|
||||
|
||||
@ -2760,7 +2760,7 @@ final class WP_Customize_Manager {
|
||||
*
|
||||
* @since 4.6.0
|
||||
*
|
||||
* @param WP_Customize_Manager $this WP_Customize_Manager instance.
|
||||
* @param WP_Customize_Manager $manager WP_Customize_Manager instance.
|
||||
*/
|
||||
do_action( 'customize_save_validation_before', $this );
|
||||
|
||||
@ -4756,7 +4756,7 @@ final class WP_Customize_Manager {
|
||||
*
|
||||
* @param string[] $nonces Array of refreshed nonces for save and
|
||||
* preview actions.
|
||||
* @param WP_Customize_Manager $this WP_Customize_Manager instance.
|
||||
* @param WP_Customize_Manager $manager WP_Customize_Manager instance.
|
||||
*/
|
||||
$nonces = apply_filters( 'customize_refresh_nonces', $nonces, $this );
|
||||
|
||||
|
@ -275,7 +275,7 @@ class WP_Customize_Panel {
|
||||
*
|
||||
* @since 4.0.0
|
||||
*
|
||||
* @param WP_Customize_Panel $this WP_Customize_Panel instance.
|
||||
* @param WP_Customize_Panel $panel WP_Customize_Panel instance.
|
||||
*/
|
||||
do_action( 'customize_render_panel', $this );
|
||||
|
||||
|
@ -298,7 +298,7 @@ class WP_Customize_Section {
|
||||
*
|
||||
* @since 3.4.0
|
||||
*
|
||||
* @param WP_Customize_Section $this WP_Customize_Section instance.
|
||||
* @param WP_Customize_Section $section WP_Customize_Section instance.
|
||||
*/
|
||||
do_action( 'customize_render_section', $this );
|
||||
/**
|
||||
|
@ -394,7 +394,7 @@ class WP_Customize_Setting {
|
||||
*
|
||||
* @since 3.4.0
|
||||
*
|
||||
* @param WP_Customize_Setting $this WP_Customize_Setting instance.
|
||||
* @param WP_Customize_Setting $setting WP_Customize_Setting instance.
|
||||
*/
|
||||
do_action( "customize_preview_{$this->id}", $this );
|
||||
|
||||
@ -406,7 +406,7 @@ class WP_Customize_Setting {
|
||||
*
|
||||
* @since 4.1.0
|
||||
*
|
||||
* @param WP_Customize_Setting $this WP_Customize_Setting instance.
|
||||
* @param WP_Customize_Setting $setting WP_Customize_Setting instance.
|
||||
*/
|
||||
do_action( "customize_preview_{$this->type}", $this );
|
||||
}
|
||||
@ -533,7 +533,7 @@ class WP_Customize_Setting {
|
||||
*
|
||||
* @since 3.4.0
|
||||
*
|
||||
* @param WP_Customize_Setting $this WP_Customize_Setting instance.
|
||||
* @param WP_Customize_Setting $setting WP_Customize_Setting instance.
|
||||
*/
|
||||
do_action( "customize_save_{$id_base}", $this );
|
||||
|
||||
@ -570,7 +570,7 @@ class WP_Customize_Setting {
|
||||
* @since 3.4.0
|
||||
*
|
||||
* @param mixed $value Value of the setting.
|
||||
* @param WP_Customize_Setting $this WP_Customize_Setting instance.
|
||||
* @param WP_Customize_Setting $setting WP_Customize_Setting instance.
|
||||
*/
|
||||
return apply_filters( "customize_sanitize_{$this->id}", $value, $this );
|
||||
}
|
||||
@ -698,7 +698,7 @@ class WP_Customize_Setting {
|
||||
* @since 3.4.0
|
||||
*
|
||||
* @param mixed $value Value of the setting.
|
||||
* @param WP_Customize_Setting $this WP_Customize_Setting instance.
|
||||
* @param WP_Customize_Setting $setting WP_Customize_Setting instance.
|
||||
*/
|
||||
do_action( "customize_update_{$this->type}", $value, $this );
|
||||
|
||||
|
@ -555,7 +555,7 @@ class WP_Date_Query {
|
||||
* @since 3.7.0
|
||||
*
|
||||
* @param string $where WHERE clause of the date query.
|
||||
* @param WP_Date_Query $this The WP_Date_Query instance.
|
||||
* @param WP_Date_Query $query The WP_Date_Query instance.
|
||||
*/
|
||||
return apply_filters( 'get_date_sql', $where, $this );
|
||||
}
|
||||
|
@ -825,7 +825,7 @@ class WP_Meta_Query {
|
||||
* @param string|false $alias Table alias, or false if none was found.
|
||||
* @param array $clause First-order query clause.
|
||||
* @param array $parent_query Parent of $clause.
|
||||
* @param WP_Meta_Query $this WP_Meta_Query object.
|
||||
* @param WP_Meta_Query $query WP_Meta_Query object.
|
||||
*/
|
||||
return apply_filters( 'meta_query_find_compatible_table_alias', $alias, $clause, $parent_query, $this );
|
||||
}
|
||||
|
@ -158,7 +158,7 @@ class WP_Network_Query {
|
||||
*
|
||||
* @since 4.6.0
|
||||
*
|
||||
* @param WP_Network_Query $this The WP_Network_Query instance (passed by reference).
|
||||
* @param WP_Network_Query $query The WP_Network_Query instance (passed by reference).
|
||||
*/
|
||||
do_action_ref_array( 'parse_network_query', array( &$this ) );
|
||||
}
|
||||
@ -193,7 +193,7 @@ class WP_Network_Query {
|
||||
*
|
||||
* @since 4.6.0
|
||||
*
|
||||
* @param WP_Network_Query $this Current instance of WP_Network_Query (passed by reference).
|
||||
* @param WP_Network_Query $query Current instance of WP_Network_Query (passed by reference).
|
||||
*/
|
||||
do_action_ref_array( 'pre_get_networks', array( &$this ) );
|
||||
|
||||
|
@ -1453,7 +1453,7 @@ class WP_Rewrite {
|
||||
*
|
||||
* @since 1.5.0
|
||||
*
|
||||
* @param WP_Rewrite $this Current WP_Rewrite instance (passed by reference).
|
||||
* @param WP_Rewrite $wp_rewrite Current WP_Rewrite instance (passed by reference).
|
||||
*/
|
||||
do_action_ref_array( 'generate_rewrite_rules', array( &$this ) );
|
||||
|
||||
|
@ -296,7 +296,7 @@ class WP_Roles {
|
||||
*
|
||||
* @since 4.7.0
|
||||
*
|
||||
* @param WP_Roles $this A reference to the WP_Roles object.
|
||||
* @param WP_Roles $wp_roles A reference to the WP_Roles object.
|
||||
*/
|
||||
do_action( 'wp_roles_init', $this );
|
||||
}
|
||||
|
@ -234,7 +234,7 @@ class WP_Site_Query {
|
||||
*
|
||||
* @since 4.6.0
|
||||
*
|
||||
* @param WP_Site_Query $this The WP_Site_Query instance (passed by reference).
|
||||
* @param WP_Site_Query $query The WP_Site_Query instance (passed by reference).
|
||||
*/
|
||||
do_action_ref_array( 'parse_site_query', array( &$this ) );
|
||||
}
|
||||
@ -278,7 +278,7 @@ class WP_Site_Query {
|
||||
*
|
||||
* @since 4.6.0
|
||||
*
|
||||
* @param WP_Site_Query $this Current instance of WP_Site_Query (passed by reference).
|
||||
* @param WP_Site_Query $query Current instance of WP_Site_Query (passed by reference).
|
||||
*/
|
||||
do_action_ref_array( 'pre_get_sites', array( &$this ) );
|
||||
|
||||
|
@ -280,7 +280,7 @@ class WP_Term_Query {
|
||||
*
|
||||
* @since 4.6.0
|
||||
*
|
||||
* @param WP_Term_Query $this Current instance of WP_Term_Query.
|
||||
* @param WP_Term_Query $query Current instance of WP_Term_Query.
|
||||
*/
|
||||
do_action( 'parse_term_query', $this );
|
||||
}
|
||||
@ -354,7 +354,7 @@ class WP_Term_Query {
|
||||
*
|
||||
* @since 4.6.0
|
||||
*
|
||||
* @param WP_Term_Query $this Current instance of WP_Term_Query (passed by reference).
|
||||
* @param WP_Term_Query $query Current instance of WP_Term_Query (passed by reference).
|
||||
*/
|
||||
do_action_ref_array( 'pre_get_terms', array( &$this ) );
|
||||
|
||||
|
@ -139,7 +139,7 @@ class WP {
|
||||
* @since 3.5.0
|
||||
*
|
||||
* @param bool $bool Whether or not to parse the request. Default true.
|
||||
* @param WP $this Current WordPress environment instance.
|
||||
* @param WP $wp Current WordPress environment instance.
|
||||
* @param array|string $extra_query_vars Extra passed query variables.
|
||||
*/
|
||||
if ( ! apply_filters( 'do_parse_request', true, $this, $extra_query_vars ) ) {
|
||||
@ -383,7 +383,7 @@ class WP {
|
||||
*
|
||||
* @since 2.1.0
|
||||
*
|
||||
* @param WP $this Current WordPress environment instance (passed by reference).
|
||||
* @param WP $wp Current WordPress environment instance (passed by reference).
|
||||
*/
|
||||
do_action_ref_array( 'parse_request', array( &$this ) );
|
||||
}
|
||||
@ -522,7 +522,7 @@ class WP {
|
||||
*
|
||||
* @since 2.1.0
|
||||
*
|
||||
* @param WP $this Current WordPress environment instance (passed by reference).
|
||||
* @param WP $wp Current WordPress environment instance (passed by reference).
|
||||
*/
|
||||
do_action_ref_array( 'send_headers', array( &$this ) );
|
||||
}
|
||||
@ -758,7 +758,7 @@ class WP {
|
||||
*
|
||||
* @since 2.1.0
|
||||
*
|
||||
* @param WP $this Current WordPress environment instance (passed by reference).
|
||||
* @param WP $wp Current WordPress environment instance (passed by reference).
|
||||
*/
|
||||
do_action_ref_array( 'wp', array( &$this ) );
|
||||
}
|
||||
|
@ -162,7 +162,7 @@ class WP_Scripts extends WP_Dependencies {
|
||||
*
|
||||
* @since 2.6.0
|
||||
*
|
||||
* @param WP_Scripts $this WP_Scripts instance (passed by reference).
|
||||
* @param WP_Scripts $wp_scripts WP_Scripts instance (passed by reference).
|
||||
*/
|
||||
do_action_ref_array( 'wp_default_scripts', array( &$this ) );
|
||||
}
|
||||
|
@ -130,7 +130,7 @@ class WP_Styles extends WP_Dependencies {
|
||||
*
|
||||
* @since 2.6.0
|
||||
*
|
||||
* @param WP_Styles $this WP_Styles instance (passed by reference).
|
||||
* @param WP_Styles $wp_styles WP_Styles instance (passed by reference).
|
||||
*/
|
||||
do_action_ref_array( 'wp_default_styles', array( &$this ) );
|
||||
}
|
||||
|
@ -335,7 +335,7 @@ final class WP_Customize_Selective_Refresh {
|
||||
*
|
||||
* @since 4.5.0
|
||||
*
|
||||
* @param WP_Customize_Selective_Refresh $this Selective refresh component.
|
||||
* @param WP_Customize_Selective_Refresh $refresh Selective refresh component.
|
||||
* @param array $partials Placements' context data for the partials rendered in the request.
|
||||
* The array is keyed by partial ID, with each item being an array of
|
||||
* the placements' context data.
|
||||
@ -384,7 +384,7 @@ final class WP_Customize_Selective_Refresh {
|
||||
*
|
||||
* @since 4.5.0
|
||||
*
|
||||
* @param WP_Customize_Selective_Refresh $this Selective refresh component.
|
||||
* @param WP_Customize_Selective_Refresh $refresh Selective refresh component.
|
||||
* @param array $partials Placements' context data for the partials rendered in the request.
|
||||
* The array is keyed by partial ID, with each item being an array of
|
||||
* the placements' context data.
|
||||
|
@ -379,7 +379,7 @@ class WP_REST_Request implements ArrayAccess {
|
||||
* @since 4.4.0
|
||||
*
|
||||
* @param string[] $order Array of types to check, in order of priority.
|
||||
* @param WP_REST_Request $this The request object.
|
||||
* @param WP_REST_Request $request The request object.
|
||||
*/
|
||||
return apply_filters( 'rest_request_parameter_order', $order, $this );
|
||||
}
|
||||
|
@ -13,7 +13,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.9-alpha-51517';
|
||||
$wp_version = '5.9-alpha-51518';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user