mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-04 17:20:07 +00:00
Docs: Remove @access notations from method DocBlocks in wp-includes/* classes.
Prior to about 2013, many class methods lacked even access modifiers which made the `@access` notations that much more useful. Now that we've gotten to a point where the codebase is more mature from a maintenance perspective and we can finally remove these notations. Notable exceptions to this change include standalone functions notated as private as well as some classes still considered to represent "private" APIs. See #41452. git-svn-id: https://develop.svn.wordpress.org/trunk@41162 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -25,7 +25,6 @@ final class WP_Customize_Manager {
|
||||
* An instance of the theme being previewed.
|
||||
*
|
||||
* @since 3.4.0
|
||||
* @access protected
|
||||
* @var WP_Theme
|
||||
*/
|
||||
protected $theme;
|
||||
@@ -34,7 +33,6 @@ final class WP_Customize_Manager {
|
||||
* The directory name of the previously active theme (within the theme_root).
|
||||
*
|
||||
* @since 3.4.0
|
||||
* @access protected
|
||||
* @var string
|
||||
*/
|
||||
protected $original_stylesheet;
|
||||
@@ -43,7 +41,6 @@ final class WP_Customize_Manager {
|
||||
* Whether this is a Customizer pageload.
|
||||
*
|
||||
* @since 3.4.0
|
||||
* @access protected
|
||||
* @var bool
|
||||
*/
|
||||
protected $previewing = false;
|
||||
@@ -52,7 +49,6 @@ final class WP_Customize_Manager {
|
||||
* Methods and properties dealing with managing widgets in the Customizer.
|
||||
*
|
||||
* @since 3.9.0
|
||||
* @access public
|
||||
* @var WP_Customize_Widgets
|
||||
*/
|
||||
public $widgets;
|
||||
@@ -61,7 +57,6 @@ final class WP_Customize_Manager {
|
||||
* Methods and properties dealing with managing nav menus in the Customizer.
|
||||
*
|
||||
* @since 4.3.0
|
||||
* @access public
|
||||
* @var WP_Customize_Nav_Menus
|
||||
*/
|
||||
public $nav_menus;
|
||||
@@ -70,7 +65,6 @@ final class WP_Customize_Manager {
|
||||
* Methods and properties dealing with selective refresh in the Customizer preview.
|
||||
*
|
||||
* @since 4.5.0
|
||||
* @access public
|
||||
* @var WP_Customize_Selective_Refresh
|
||||
*/
|
||||
public $selective_refresh;
|
||||
@@ -79,7 +73,6 @@ final class WP_Customize_Manager {
|
||||
* Registered instances of WP_Customize_Setting.
|
||||
*
|
||||
* @since 3.4.0
|
||||
* @access protected
|
||||
* @var array
|
||||
*/
|
||||
protected $settings = array();
|
||||
@@ -88,7 +81,6 @@ final class WP_Customize_Manager {
|
||||
* Sorted top-level instances of WP_Customize_Panel and WP_Customize_Section.
|
||||
*
|
||||
* @since 4.0.0
|
||||
* @access protected
|
||||
* @var array
|
||||
*/
|
||||
protected $containers = array();
|
||||
@@ -97,7 +89,6 @@ final class WP_Customize_Manager {
|
||||
* Registered instances of WP_Customize_Panel.
|
||||
*
|
||||
* @since 4.0.0
|
||||
* @access protected
|
||||
* @var array
|
||||
*/
|
||||
protected $panels = array();
|
||||
@@ -106,7 +97,6 @@ final class WP_Customize_Manager {
|
||||
* List of core components.
|
||||
*
|
||||
* @since 4.5.0
|
||||
* @access protected
|
||||
* @var array
|
||||
*/
|
||||
protected $components = array( 'widgets', 'nav_menus' );
|
||||
@@ -115,7 +105,6 @@ final class WP_Customize_Manager {
|
||||
* Registered instances of WP_Customize_Section.
|
||||
*
|
||||
* @since 3.4.0
|
||||
* @access protected
|
||||
* @var array
|
||||
*/
|
||||
protected $sections = array();
|
||||
@@ -124,7 +113,6 @@ final class WP_Customize_Manager {
|
||||
* Registered instances of WP_Customize_Control.
|
||||
*
|
||||
* @since 3.4.0
|
||||
* @access protected
|
||||
* @var array
|
||||
*/
|
||||
protected $controls = array();
|
||||
@@ -133,7 +121,6 @@ final class WP_Customize_Manager {
|
||||
* Panel types that may be rendered from JS templates.
|
||||
*
|
||||
* @since 4.3.0
|
||||
* @access protected
|
||||
* @var array
|
||||
*/
|
||||
protected $registered_panel_types = array();
|
||||
@@ -142,7 +129,6 @@ final class WP_Customize_Manager {
|
||||
* Section types that may be rendered from JS templates.
|
||||
*
|
||||
* @since 4.3.0
|
||||
* @access protected
|
||||
* @var array
|
||||
*/
|
||||
protected $registered_section_types = array();
|
||||
@@ -151,7 +137,6 @@ final class WP_Customize_Manager {
|
||||
* Control types that may be rendered from JS templates.
|
||||
*
|
||||
* @since 4.1.0
|
||||
* @access protected
|
||||
* @var array
|
||||
*/
|
||||
protected $registered_control_types = array();
|
||||
@@ -160,7 +145,6 @@ final class WP_Customize_Manager {
|
||||
* Initial URL being previewed.
|
||||
*
|
||||
* @since 4.4.0
|
||||
* @access protected
|
||||
* @var string
|
||||
*/
|
||||
protected $preview_url;
|
||||
@@ -169,7 +153,6 @@ final class WP_Customize_Manager {
|
||||
* URL to link the user to when closing the Customizer.
|
||||
*
|
||||
* @since 4.4.0
|
||||
* @access protected
|
||||
* @var string
|
||||
*/
|
||||
protected $return_url;
|
||||
@@ -178,7 +161,6 @@ final class WP_Customize_Manager {
|
||||
* Mapping of 'panel', 'section', 'control' to the ID which should be autofocused.
|
||||
*
|
||||
* @since 4.4.0
|
||||
* @access protected
|
||||
* @var array
|
||||
*/
|
||||
protected $autofocus = array();
|
||||
@@ -187,7 +169,6 @@ final class WP_Customize_Manager {
|
||||
* Messenger channel.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access protected
|
||||
* @var string
|
||||
*/
|
||||
protected $messenger_channel;
|
||||
@@ -203,7 +184,6 @@ final class WP_Customize_Manager {
|
||||
* Changeset UUID.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access private
|
||||
* @var string
|
||||
*/
|
||||
private $_changeset_uuid;
|
||||
@@ -212,7 +192,6 @@ final class WP_Customize_Manager {
|
||||
* Changeset post ID.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access private
|
||||
* @var int|false
|
||||
*/
|
||||
private $_changeset_post_id;
|
||||
@@ -221,7 +200,6 @@ final class WP_Customize_Manager {
|
||||
* Changeset data loaded from a customize_changeset post.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access private
|
||||
* @var array
|
||||
*/
|
||||
private $_changeset_data;
|
||||
@@ -373,7 +351,6 @@ final class WP_Customize_Manager {
|
||||
*
|
||||
* @since 3.4.0
|
||||
* @since 4.2.0 Added `$action` param.
|
||||
* @access public
|
||||
*
|
||||
* @param string|null $action Whether the supplied Ajax action is being run.
|
||||
* @return bool True if it's an Ajax request, false otherwise.
|
||||
@@ -648,7 +625,6 @@ final class WP_Customize_Manager {
|
||||
* Get the changeset UUID.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access public
|
||||
*
|
||||
* @return string UUID.
|
||||
*/
|
||||
@@ -718,7 +694,6 @@ final class WP_Customize_Manager {
|
||||
* Get the registered panels.
|
||||
*
|
||||
* @since 4.0.0
|
||||
* @access public
|
||||
*
|
||||
* @return array Panels.
|
||||
*/
|
||||
@@ -798,7 +773,6 @@ final class WP_Customize_Manager {
|
||||
* Find the changeset post ID for a given changeset UUID.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access public
|
||||
*
|
||||
* @param string $uuid Changeset UUID.
|
||||
* @return int|null Returns post ID on success and null on failure.
|
||||
@@ -835,7 +809,6 @@ final class WP_Customize_Manager {
|
||||
* Get the changeset post id for the loaded changeset.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access public
|
||||
*
|
||||
* @return int|null Post ID on success or null if there is no post yet saved.
|
||||
*/
|
||||
@@ -857,7 +830,6 @@ final class WP_Customize_Manager {
|
||||
* Get the data stored in a changeset post.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access protected
|
||||
*
|
||||
* @param int $post_id Changeset post ID.
|
||||
* @return array|WP_Error Changeset data or WP_Error on error.
|
||||
@@ -887,7 +859,6 @@ final class WP_Customize_Manager {
|
||||
* Get changeset data.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access public
|
||||
*
|
||||
* @return array Changeset data.
|
||||
*/
|
||||
@@ -913,7 +884,6 @@ final class WP_Customize_Manager {
|
||||
* Starter content setting IDs.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access private
|
||||
* @var array
|
||||
*/
|
||||
protected $pending_starter_content_settings_ids = array();
|
||||
@@ -922,7 +892,6 @@ final class WP_Customize_Manager {
|
||||
* Import theme starter content into the customized state.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access public
|
||||
*
|
||||
* @param array $starter_content Starter content. Defaults to `get_theme_starter_content()`.
|
||||
*/
|
||||
@@ -1315,7 +1284,6 @@ final class WP_Customize_Manager {
|
||||
* Ensure that the attachments are valid and that they have slugs and file name/path.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access private
|
||||
*
|
||||
* @param array $attachments Attachments.
|
||||
* @return array Prepared attachments.
|
||||
@@ -1376,7 +1344,6 @@ final class WP_Customize_Manager {
|
||||
* Save starter content changeset.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access private
|
||||
*/
|
||||
public function _save_starter_content_changeset() {
|
||||
|
||||
@@ -1485,7 +1452,6 @@ final class WP_Customize_Manager {
|
||||
* @since 3.4.0
|
||||
* @since 4.1.1 Introduced the `$default` parameter.
|
||||
* @since 4.6.0 `$default` is now returned early when the setting post value is invalid.
|
||||
* @access public
|
||||
*
|
||||
* @see WP_REST_Server::dispatch()
|
||||
* @see WP_Rest_Request::sanitize_params()
|
||||
@@ -1520,7 +1486,6 @@ final class WP_Customize_Manager {
|
||||
* exclusively sourced from `$_POST['customized']`.
|
||||
*
|
||||
* @since 4.2.0
|
||||
* @access public
|
||||
*
|
||||
* @param string $setting_id ID for the WP_Customize_Setting instance.
|
||||
* @param mixed $value Post value.
|
||||
@@ -1618,7 +1583,6 @@ final class WP_Customize_Manager {
|
||||
* Filter the X-Frame-Options and Content-Security-Policy headers to ensure frontend can load in customizer.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access public
|
||||
*
|
||||
* @param array $headers Headers.
|
||||
* @return array Headers.
|
||||
@@ -1634,7 +1598,6 @@ final class WP_Customize_Manager {
|
||||
* Add customize state query params to a given URL if preview is allowed.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access public
|
||||
* @see wp_redirect()
|
||||
* @see WP_Customize_Manager::get_allowed_url()
|
||||
*
|
||||
@@ -1680,7 +1643,6 @@ final class WP_Customize_Manager {
|
||||
*
|
||||
* @since 4.0.0
|
||||
* @deprecated 4.7.0
|
||||
* @access public
|
||||
*/
|
||||
public function customize_preview_override_404_status() {
|
||||
_deprecated_function( __METHOD__, '4.7.0' );
|
||||
@@ -1710,7 +1672,6 @@ final class WP_Customize_Manager {
|
||||
* Print CSS for loading indicators for the Customizer preview.
|
||||
*
|
||||
* @since 4.2.0
|
||||
* @access public
|
||||
*/
|
||||
public function customize_preview_loading_style() {
|
||||
?><style>
|
||||
@@ -1741,7 +1702,6 @@ final class WP_Customize_Manager {
|
||||
* work as expected since the parent frame is not being sent the URL to navigate to.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access public
|
||||
*/
|
||||
public function remove_frameless_preview_messenger_channel() {
|
||||
if ( ! $this->messenger_channel ) {
|
||||
@@ -1991,7 +1951,6 @@ final class WP_Customize_Manager {
|
||||
* after sanitizing are marked invalid.
|
||||
*
|
||||
* @since 4.6.0
|
||||
* @access public
|
||||
*
|
||||
* @see WP_REST_Request::has_valid_params()
|
||||
* @see WP_Customize_Setting::validate()
|
||||
@@ -2058,7 +2017,6 @@ final class WP_Customize_Manager {
|
||||
* `wp.customize.Notification` JS model.
|
||||
*
|
||||
* @since 4.6.0
|
||||
* @access public
|
||||
*
|
||||
* @param true|WP_Error $validity Setting validity.
|
||||
* @return true|array If `$validity` was a WP_Error, the error codes will be array-mapped
|
||||
@@ -2225,7 +2183,6 @@ final class WP_Customize_Manager {
|
||||
* Save the post for the loaded changeset.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access public
|
||||
*
|
||||
* @param array $args {
|
||||
* Args for changeset post.
|
||||
@@ -2569,7 +2526,6 @@ final class WP_Customize_Manager {
|
||||
* Whether a changeset revision should be made.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access private
|
||||
* @var bool
|
||||
*/
|
||||
protected $store_changeset_revision;
|
||||
@@ -2580,7 +2536,6 @@ final class WP_Customize_Manager {
|
||||
* Note that this will not be called while a changeset post remains in auto-draft status.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access private
|
||||
*
|
||||
* @param bool $post_has_changed Whether the post has changed.
|
||||
* @param WP_Post $last_revision The last revision post object.
|
||||
@@ -2610,7 +2565,6 @@ final class WP_Customize_Manager {
|
||||
* invoking this method.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access private
|
||||
* @see _wp_customize_publish_changeset()
|
||||
*
|
||||
* @param int $changeset_post_id ID for customize_changeset post. Defaults to the changeset for the current manager instance.
|
||||
@@ -2761,7 +2715,6 @@ final class WP_Customize_Manager {
|
||||
* Update stashed theme mod settings.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access private
|
||||
*
|
||||
* @param array $inactive_theme_mod_settings Mapping of stylesheet to arrays of theme mod settings.
|
||||
* @return array|false Returns array of updated stashed theme mods or false if the update failed or there were no changes.
|
||||
@@ -2865,7 +2818,6 @@ final class WP_Customize_Manager {
|
||||
* even though they are not directly created statically with code.
|
||||
*
|
||||
* @since 4.2.0
|
||||
* @access public
|
||||
*
|
||||
* @param array $setting_ids The setting IDs to add.
|
||||
* @return array The WP_Customize_Setting objects added.
|
||||
@@ -2977,7 +2929,6 @@ final class WP_Customize_Manager {
|
||||
* Retrieve a customize panel.
|
||||
*
|
||||
* @since 4.0.0
|
||||
* @access public
|
||||
*
|
||||
* @param string $id Panel ID to get.
|
||||
* @return WP_Customize_Panel|void Requested panel instance, if set.
|
||||
@@ -2992,7 +2943,6 @@ final class WP_Customize_Manager {
|
||||
* Remove a customize panel.
|
||||
*
|
||||
* @since 4.0.0
|
||||
* @access public
|
||||
*
|
||||
* @param string $id Panel ID to remove.
|
||||
*/
|
||||
@@ -3016,7 +2966,6 @@ final class WP_Customize_Manager {
|
||||
* Registered types are eligible to be rendered via JS and created dynamically.
|
||||
*
|
||||
* @since 4.3.0
|
||||
* @access public
|
||||
*
|
||||
* @see WP_Customize_Panel
|
||||
*
|
||||
@@ -3030,7 +2979,6 @@ final class WP_Customize_Manager {
|
||||
* Render JS templates for all registered panel types.
|
||||
*
|
||||
* @since 4.3.0
|
||||
* @access public
|
||||
*/
|
||||
public function render_panel_templates() {
|
||||
foreach ( $this->registered_panel_types as $panel_type ) {
|
||||
@@ -3044,7 +2992,6 @@ final class WP_Customize_Manager {
|
||||
*
|
||||
* @since 3.4.0
|
||||
* @since 4.5.0 Return added WP_Customize_Section instance.
|
||||
* @access public
|
||||
*
|
||||
* @param WP_Customize_Section|string $id Customize Section object, or Section ID.
|
||||
* @param array $args {
|
||||
@@ -3103,7 +3050,6 @@ final class WP_Customize_Manager {
|
||||
* Registered types are eligible to be rendered via JS and created dynamically.
|
||||
*
|
||||
* @since 4.3.0
|
||||
* @access public
|
||||
*
|
||||
* @see WP_Customize_Section
|
||||
*
|
||||
@@ -3117,7 +3063,6 @@ final class WP_Customize_Manager {
|
||||
* Render JS templates for all registered section types.
|
||||
*
|
||||
* @since 4.3.0
|
||||
* @access public
|
||||
*/
|
||||
public function render_section_templates() {
|
||||
foreach ( $this->registered_section_types as $section_type ) {
|
||||
@@ -3131,7 +3076,6 @@ final class WP_Customize_Manager {
|
||||
*
|
||||
* @since 3.4.0
|
||||
* @since 4.5.0 Return added WP_Customize_Control instance.
|
||||
* @access public
|
||||
*
|
||||
* @param WP_Customize_Control|string $id Customize Control object, or ID.
|
||||
* @param array $args {
|
||||
@@ -3197,7 +3141,6 @@ final class WP_Customize_Manager {
|
||||
* Registered types are eligible to be rendered via JS and created dynamically.
|
||||
*
|
||||
* @since 4.1.0
|
||||
* @access public
|
||||
*
|
||||
* @param string $control Name of a custom control which is a subclass of
|
||||
* WP_Customize_Control.
|
||||
@@ -3210,7 +3153,6 @@ final class WP_Customize_Manager {
|
||||
* Render JS templates for all registered control types.
|
||||
*
|
||||
* @since 4.1.0
|
||||
* @access public
|
||||
*/
|
||||
public function render_control_templates() {
|
||||
foreach ( $this->registered_control_types as $control_type ) {
|
||||
@@ -3350,7 +3292,6 @@ final class WP_Customize_Manager {
|
||||
* Determine whether the user agent is iOS.
|
||||
*
|
||||
* @since 4.4.0
|
||||
* @access public
|
||||
*
|
||||
* @return bool Whether the user agent is iOS.
|
||||
*/
|
||||
@@ -3362,7 +3303,6 @@ final class WP_Customize_Manager {
|
||||
* Get the template string for the Customizer pane document title.
|
||||
*
|
||||
* @since 4.4.0
|
||||
* @access public
|
||||
*
|
||||
* @return string The template string for the document title.
|
||||
*/
|
||||
@@ -3384,7 +3324,6 @@ final class WP_Customize_Manager {
|
||||
* URL is validated.
|
||||
*
|
||||
* @since 4.4.0
|
||||
* @access public
|
||||
*
|
||||
* @param string $preview_url URL to be previewed.
|
||||
*/
|
||||
@@ -3397,7 +3336,6 @@ final class WP_Customize_Manager {
|
||||
* Get the initial URL to be previewed.
|
||||
*
|
||||
* @since 4.4.0
|
||||
* @access public
|
||||
*
|
||||
* @return string URL being previewed.
|
||||
*/
|
||||
@@ -3414,7 +3352,6 @@ final class WP_Customize_Manager {
|
||||
* Determines whether the admin and the frontend are on different domains.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access public
|
||||
*
|
||||
* @return bool Whether cross-domain.
|
||||
*/
|
||||
@@ -3436,7 +3373,6 @@ final class WP_Customize_Manager {
|
||||
* using the customize_allowed_urls filter.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access public
|
||||
*
|
||||
* @returns array Allowed URLs.
|
||||
*/
|
||||
@@ -3463,7 +3399,6 @@ final class WP_Customize_Manager {
|
||||
* Get messenger channel.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access public
|
||||
*
|
||||
* @return string Messenger channel.
|
||||
*/
|
||||
@@ -3477,7 +3412,6 @@ final class WP_Customize_Manager {
|
||||
* URL is validated.
|
||||
*
|
||||
* @since 4.4.0
|
||||
* @access public
|
||||
*
|
||||
* @param string $return_url URL for return link.
|
||||
*/
|
||||
@@ -3492,7 +3426,6 @@ final class WP_Customize_Manager {
|
||||
* Get URL to link the user to when closing the Customizer.
|
||||
*
|
||||
* @since 4.4.0
|
||||
* @access public
|
||||
*
|
||||
* @return string URL for link to close Customizer.
|
||||
*/
|
||||
@@ -3516,7 +3449,6 @@ final class WP_Customize_Manager {
|
||||
* Set the autofocused constructs.
|
||||
*
|
||||
* @since 4.4.0
|
||||
* @access public
|
||||
*
|
||||
* @param array $autofocus {
|
||||
* Mapping of 'panel', 'section', 'control' to the ID which should be autofocused.
|
||||
@@ -3534,7 +3466,6 @@ final class WP_Customize_Manager {
|
||||
* Get the autofocused constructs.
|
||||
*
|
||||
* @since 4.4.0
|
||||
* @access public
|
||||
*
|
||||
* @return array {
|
||||
* Mapping of 'panel', 'section', 'control' to the ID which should be autofocused.
|
||||
@@ -4265,7 +4196,6 @@ final class WP_Customize_Manager {
|
||||
* Add settings from the POST data that were not added with code, e.g. dynamically-created settings for Widgets
|
||||
*
|
||||
* @since 4.2.0
|
||||
* @access public
|
||||
*
|
||||
* @see add_dynamic_settings()
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user