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.

Built from https://develop.svn.wordpress.org/trunk@41162


git-svn-id: http://core.svn.wordpress.org/trunk@41002 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Drew Jaynes
2017-07-27 00:41:44 +00:00
parent 1a28ec87e1
commit 0860bb2771
136 changed files with 3 additions and 1907 deletions

View File

@@ -20,7 +20,6 @@ class WP_Nav_Menu_Widget extends WP_Widget {
* Sets up a new Custom Menu widget instance.
*
* @since 3.0.0
* @access public
*/
public function __construct() {
$widget_ops = array(
@@ -34,7 +33,6 @@ class WP_Nav_Menu_Widget extends WP_Widget {
* Outputs the content for the current Custom Menu widget instance.
*
* @since 3.0.0
* @access public
*
* @param array $args Display arguments including 'before_title', 'after_title',
* 'before_widget', and 'after_widget'.
@@ -85,7 +83,6 @@ class WP_Nav_Menu_Widget extends WP_Widget {
* Handles updating settings for the current Custom Menu widget instance.
*
* @since 3.0.0
* @access public
*
* @param array $new_instance New settings for this instance as input by the user via
* WP_Widget::form().
@@ -107,7 +104,6 @@ class WP_Nav_Menu_Widget extends WP_Widget {
* Outputs the settings form for the Custom Menu widget.
*
* @since 3.0.0
* @access public
*
* @param array $instance Current settings.
* @global WP_Customize_Manager $wp_customize

View File

@@ -20,7 +20,6 @@ class WP_Widget_Archives extends WP_Widget {
* Sets up a new Archives widget instance.
*
* @since 2.8.0
* @access public
*/
public function __construct() {
$widget_ops = array(
@@ -35,7 +34,6 @@ class WP_Widget_Archives extends WP_Widget {
* Outputs the content for the current Archives widget instance.
*
* @since 2.8.0
* @access public
*
* @param array $args Display arguments including 'before_title', 'after_title',
* 'before_widget', and 'after_widget'.
@@ -125,7 +123,6 @@ class WP_Widget_Archives extends WP_Widget {
* Handles updating settings for the current Archives widget instance.
*
* @since 2.8.0
* @access public
*
* @param array $new_instance New settings for this instance as input by the user via
* WP_Widget_Archives::form().
@@ -146,7 +143,6 @@ class WP_Widget_Archives extends WP_Widget {
* Outputs the settings form for the Archives widget.
*
* @since 2.8.0
* @access public
*
* @param array $instance Current settings.
*/

View File

@@ -21,7 +21,6 @@ class WP_Widget_Calendar extends WP_Widget {
* @since 4.4.0
*
* @static
* @access private
* @var int
*/
private static $instance = 0;
@@ -30,7 +29,6 @@ class WP_Widget_Calendar extends WP_Widget {
* Sets up a new Calendar widget instance.
*
* @since 2.8.0
* @access public
*/
public function __construct() {
$widget_ops = array(
@@ -45,7 +43,6 @@ class WP_Widget_Calendar extends WP_Widget {
* Outputs the content for the current Calendar widget instance.
*
* @since 2.8.0
* @access public
*
* @param array $args Display arguments including 'before_title', 'after_title',
* 'before_widget', and 'after_widget'.
@@ -75,7 +72,6 @@ class WP_Widget_Calendar extends WP_Widget {
* Handles updating settings for the current Calendar widget instance.
*
* @since 2.8.0
* @access public
*
* @param array $new_instance New settings for this instance as input by the user via
* WP_Widget::form().
@@ -93,7 +89,6 @@ class WP_Widget_Calendar extends WP_Widget {
* Outputs the settings form for the Calendar widget.
*
* @since 2.8.0
* @access public
*
* @param array $instance Current settings.
*/

View File

@@ -20,7 +20,6 @@ class WP_Widget_Categories extends WP_Widget {
* Sets up a new Categories widget instance.
*
* @since 2.8.0
* @access public
*/
public function __construct() {
$widget_ops = array(
@@ -35,7 +34,6 @@ class WP_Widget_Categories extends WP_Widget {
* Outputs the content for the current Categories widget instance.
*
* @since 2.8.0
* @access public
*
* @param array $args Display arguments including 'before_title', 'after_title',
* 'before_widget', and 'after_widget'.
@@ -124,7 +122,6 @@ class WP_Widget_Categories extends WP_Widget {
* Handles updating settings for the current Categories widget instance.
*
* @since 2.8.0
* @access public
*
* @param array $new_instance New settings for this instance as input by the user via
* WP_Widget::form().
@@ -145,7 +142,6 @@ class WP_Widget_Categories extends WP_Widget {
* Outputs the settings form for the Categories widget.
*
* @since 2.8.0
* @access public
*
* @param array $instance Current settings.
*/

View File

@@ -20,7 +20,6 @@ class WP_Widget_Links extends WP_Widget {
* Sets up a new Links widget instance.
*
* @since 2.8.0
* @access public
*/
public function __construct() {
$widget_ops = array(
@@ -34,7 +33,6 @@ class WP_Widget_Links extends WP_Widget {
* Outputs the content for the current Links widget instance.
*
* @since 2.8.0
* @access public
*
* @param array $args Display arguments including 'before_title', 'after_title',
* 'before_widget', and 'after_widget'.
@@ -86,7 +84,6 @@ class WP_Widget_Links extends WP_Widget {
* Handles updating settings for the current Links widget instance.
*
* @since 2.8.0
* @access public
*
* @param array $new_instance New settings for this instance as input by the user via
* WP_Widget::form().
@@ -115,7 +112,6 @@ class WP_Widget_Links extends WP_Widget {
* Outputs the settings form for the Links widget.
*
* @since 2.8.0
* @access public
*
* @param array $instance Current settings.
*/

View File

@@ -20,7 +20,6 @@ class WP_Widget_Media_Audio extends WP_Widget_Media {
* Constructor.
*
* @since 4.8.0
* @access public
*/
public function __construct() {
parent::__construct( 'media_audio', __( 'Audio' ), array(
@@ -49,7 +48,6 @@ class WP_Widget_Media_Audio extends WP_Widget_Media {
* Get schema for properties of a widget instance (item).
*
* @since 4.8.0
* @access public
*
* @see WP_REST_Controller::get_item_schema()
* @see WP_REST_Controller::get_additional_fields()
@@ -91,7 +89,6 @@ class WP_Widget_Media_Audio extends WP_Widget_Media {
* Render the media on the frontend.
*
* @since 4.8.0
* @access public
*
* @param array $instance Widget instance props.
* @return void
@@ -127,7 +124,6 @@ class WP_Widget_Media_Audio extends WP_Widget_Media {
* case a widget does get added.
*
* @since 4.8.0
* @access public
*/
public function enqueue_preview_scripts() {
/** This filter is documented in wp-includes/media.php */
@@ -141,7 +137,6 @@ class WP_Widget_Media_Audio extends WP_Widget_Media {
* Loads the required media files for the media manager and scripts for media widgets.
*
* @since 4.8.0
* @access public
*/
public function enqueue_admin_scripts() {
parent::enqueue_admin_scripts();
@@ -183,7 +178,6 @@ class WP_Widget_Media_Audio extends WP_Widget_Media {
* Render form template scripts.
*
* @since 4.8.0
* @access public
*/
public function render_control_template_scripts() {
parent::render_control_template_scripts()

View File

@@ -20,7 +20,6 @@ class WP_Widget_Media_Image extends WP_Widget_Media {
* Constructor.
*
* @since 4.8.0
* @access public
*/
public function __construct() {
parent::__construct( 'media_image', __( 'Image' ), array(
@@ -48,7 +47,6 @@ class WP_Widget_Media_Image extends WP_Widget_Media {
* Get schema for properties of a widget instance (item).
*
* @since 4.8.0
* @access public
*
* @see WP_REST_Controller::get_item_schema()
* @see WP_REST_Controller::get_additional_fields()
@@ -164,7 +162,6 @@ class WP_Widget_Media_Image extends WP_Widget_Media {
* Render the media on the frontend.
*
* @since 4.8.0
* @access public
*
* @param array $instance Widget instance props.
* @return void
@@ -267,7 +264,6 @@ class WP_Widget_Media_Image extends WP_Widget_Media {
* Loads the required media files for the media manager and scripts for media widgets.
*
* @since 4.8.0
* @access public
*/
public function enqueue_admin_scripts() {
parent::enqueue_admin_scripts();
@@ -306,7 +302,6 @@ class WP_Widget_Media_Image extends WP_Widget_Media {
* Render form template scripts.
*
* @since 4.8.0
* @access public
*/
public function render_control_template_scripts() {
parent::render_control_template_scripts();

View File

@@ -20,7 +20,6 @@ class WP_Widget_Media_Video extends WP_Widget_Media {
* Constructor.
*
* @since 4.8.0
* @access public
*/
public function __construct() {
parent::__construct( 'media_video', __( 'Video' ), array(
@@ -50,7 +49,6 @@ class WP_Widget_Media_Video extends WP_Widget_Media {
* Get schema for properties of a widget instance (item).
*
* @since 4.8.0
* @access public
*
* @see WP_REST_Controller::get_item_schema()
* @see WP_REST_Controller::get_additional_fields()
@@ -101,7 +99,6 @@ class WP_Widget_Media_Video extends WP_Widget_Media {
* Render the media on the frontend.
*
* @since 4.8.0
* @access public
*
* @param array $instance Widget instance props.
*
@@ -141,7 +138,6 @@ class WP_Widget_Media_Video extends WP_Widget_Media {
* Inject max-width and remove height for videos too constrained to fit inside sidebars on frontend.
*
* @since 4.8.0
* @access public
*
* @param string $html Video shortcode HTML output.
* @return string HTML Output.
@@ -162,7 +158,6 @@ class WP_Widget_Media_Video extends WP_Widget_Media {
* case a widget does get added.
*
* @since 4.8.0
* @access public
*/
public function enqueue_preview_scripts() {
/** This filter is documented in wp-includes/media.php */
@@ -179,7 +174,6 @@ class WP_Widget_Media_Video extends WP_Widget_Media {
* Loads the required scripts and styles for the widget control.
*
* @since 4.8.0
* @access public
*/
public function enqueue_admin_scripts() {
parent::enqueue_admin_scripts();
@@ -218,7 +212,6 @@ class WP_Widget_Media_Video extends WP_Widget_Media {
* Render form template scripts.
*
* @since 4.8.0
* @access public
*/
public function render_control_template_scripts() {
parent::render_control_template_scripts()

View File

@@ -45,7 +45,6 @@ abstract class WP_Widget_Media extends WP_Widget {
* Constructor.
*
* @since 4.8.0
* @access public
*
* @param string $id_base Base ID for the widget, lowercase and unique.
* @param string $name Name for the widget displayed on the configuration page.
@@ -93,7 +92,6 @@ abstract class WP_Widget_Media extends WP_Widget {
* Add hooks while registering all widget instances of this widget class.
*
* @since 4.8.0
* @access public
*
* @param integer $number Optional. The unique order number of this widget instance
* compared to other instances of the same class. Default -1.
@@ -122,7 +120,6 @@ abstract class WP_Widget_Media extends WP_Widget {
* Get schema for properties of a widget instance (item).
*
* @since 4.8.0
* @access public
*
* @see WP_REST_Controller::get_item_schema()
* @see WP_REST_Controller::get_additional_fields()
@@ -158,7 +155,6 @@ abstract class WP_Widget_Media extends WP_Widget {
* Determine if the supplied attachment is for a valid attachment post with the specified MIME type.
*
* @since 4.8.0
* @access public
*
* @param int|WP_Post $attachment Attachment post ID or object.
* @param string $mime_type MIME type.
@@ -182,7 +178,6 @@ abstract class WP_Widget_Media extends WP_Widget {
* Sanitize a token list string, such as used in HTML rel and class attributes.
*
* @since 4.8.0
* @access public
*
* @link http://w3c.github.io/html/infrastructure.html#space-separated-tokens
* @link https://developer.mozilla.org/en-US/docs/Web/API/DOMTokenList
@@ -202,7 +197,6 @@ abstract class WP_Widget_Media extends WP_Widget {
* Displays the widget on the front-end.
*
* @since 4.8.0
* @access public
*
* @see WP_Widget::widget()
*
@@ -246,7 +240,6 @@ abstract class WP_Widget_Media extends WP_Widget {
* Sanitizes the widget form values as they are saved.
*
* @since 4.8.0
* @access public
*
* @see WP_Widget::update()
* @see WP_REST_Request::has_valid_params()
@@ -292,7 +285,6 @@ abstract class WP_Widget_Media extends WP_Widget {
* Render the media on the frontend.
*
* @since 4.8.0
* @access public
*
* @param array $instance Widget instance props.
* @return string
@@ -305,7 +297,6 @@ abstract class WP_Widget_Media extends WP_Widget {
* Note that the widget UI itself is rendered with JavaScript via `MediaWidgetControl#render()`.
*
* @since 4.8.0
* @access public
*
* @see \WP_Widget_Media::render_control_template_scripts() Where the JS template is located.
* @param array $instance Current settings.
@@ -335,7 +326,6 @@ abstract class WP_Widget_Media extends WP_Widget {
* Filters the default media display states for items in the Media list table.
*
* @since 4.8.0
* @access public
*
* @param array $states An array of media states.
* @param WP_Post $post The current attachment object.
@@ -372,7 +362,6 @@ abstract class WP_Widget_Media extends WP_Widget {
* case a widget does get added.
*
* @since 4.8.0
* @access public
*/
public function enqueue_preview_scripts() {}
@@ -380,7 +369,6 @@ abstract class WP_Widget_Media extends WP_Widget {
* Loads the required scripts and styles for the widget control.
*
* @since 4.8.0
* @access public
*/
public function enqueue_admin_scripts() {
wp_enqueue_media();
@@ -391,7 +379,6 @@ abstract class WP_Widget_Media extends WP_Widget {
* Render form template scripts.
*
* @since 4.8.0
* @access public
*/
public function render_control_template_scripts() {
?>
@@ -425,7 +412,6 @@ abstract class WP_Widget_Media extends WP_Widget {
* Whether the widget has content to show.
*
* @since 4.8.0
* @access protected
*
* @param array $instance Widget instance props.
* @return bool Whether widget has content.

View File

@@ -22,7 +22,6 @@ class WP_Widget_Meta extends WP_Widget {
* Sets up a new Meta widget instance.
*
* @since 2.8.0
* @access public
*/
public function __construct() {
$widget_ops = array(
@@ -37,7 +36,6 @@ class WP_Widget_Meta extends WP_Widget {
* Outputs the content for the current Meta widget instance.
*
* @since 2.8.0
* @access public
*
* @param array $args Display arguments including 'before_title', 'after_title',
* 'before_widget', and 'after_widget'.
@@ -82,7 +80,6 @@ class WP_Widget_Meta extends WP_Widget {
* Handles updating settings for the current Meta widget instance.
*
* @since 2.8.0
* @access public
*
* @param array $new_instance New settings for this instance as input by the user via
* WP_Widget::form().
@@ -100,7 +97,6 @@ class WP_Widget_Meta extends WP_Widget {
* Outputs the settings form for the Meta widget.
*
* @since 2.8.0
* @access public
*
* @param array $instance Current settings.
*/

View File

@@ -20,7 +20,6 @@ class WP_Widget_Pages extends WP_Widget {
* Sets up a new Pages widget instance.
*
* @since 2.8.0
* @access public
*/
public function __construct() {
$widget_ops = array(
@@ -35,7 +34,6 @@ class WP_Widget_Pages extends WP_Widget {
* Outputs the content for the current Pages widget instance.
*
* @since 2.8.0
* @access public
*
* @param array $args Display arguments including 'before_title', 'after_title',
* 'before_widget', and 'after_widget'.
@@ -94,7 +92,6 @@ class WP_Widget_Pages extends WP_Widget {
* Handles updating settings for the current Pages widget instance.
*
* @since 2.8.0
* @access public
*
* @param array $new_instance New settings for this instance as input by the user via
* WP_Widget::form().
@@ -119,7 +116,6 @@ class WP_Widget_Pages extends WP_Widget {
* Outputs the settings form for the Pages widget.
*
* @since 2.8.0
* @access public
*
* @param array $instance Current settings.
*/

View File

@@ -20,7 +20,6 @@ class WP_Widget_Recent_Comments extends WP_Widget {
* Sets up a new Recent Comments widget instance.
*
* @since 2.8.0
* @access public
*/
public function __construct() {
$widget_ops = array(
@@ -40,7 +39,6 @@ class WP_Widget_Recent_Comments extends WP_Widget {
* Outputs the default styles for the Recent Comments widget.
*
* @since 2.8.0
* @access public
*/
public function recent_comments_style() {
/**
@@ -63,7 +61,6 @@ class WP_Widget_Recent_Comments extends WP_Widget {
* Outputs the content for the current Recent Comments widget instance.
*
* @since 2.8.0
* @access public
*
* @param array $args Display arguments including 'before_title', 'after_title',
* 'before_widget', and 'after_widget'.
@@ -130,7 +127,6 @@ class WP_Widget_Recent_Comments extends WP_Widget {
* Handles updating settings for the current Recent Comments widget instance.
*
* @since 2.8.0
* @access public
*
* @param array $new_instance New settings for this instance as input by the user via
* WP_Widget::form().
@@ -148,7 +144,6 @@ class WP_Widget_Recent_Comments extends WP_Widget {
* Outputs the settings form for the Recent Comments widget.
*
* @since 2.8.0
* @access public
*
* @param array $instance Current settings.
*/
@@ -168,7 +163,6 @@ class WP_Widget_Recent_Comments extends WP_Widget {
* Flushes the Recent Comments widget cache.
*
* @since 2.8.0
* @access public
*
* @deprecated 4.4.0 Fragment caching was removed in favor of split queries.
*/

View File

@@ -20,7 +20,6 @@ class WP_Widget_Recent_Posts extends WP_Widget {
* Sets up a new Recent Posts widget instance.
*
* @since 2.8.0
* @access public
*/
public function __construct() {
$widget_ops = array(
@@ -36,7 +35,6 @@ class WP_Widget_Recent_Posts extends WP_Widget {
* Outputs the content for the current Recent Posts widget instance.
*
* @since 2.8.0
* @access public
*
* @param array $args Display arguments including 'before_title', 'after_title',
* 'before_widget', and 'after_widget'.
@@ -101,7 +99,6 @@ class WP_Widget_Recent_Posts extends WP_Widget {
* Handles updating the settings for the current Recent Posts widget instance.
*
* @since 2.8.0
* @access public
*
* @param array $new_instance New settings for this instance as input by the user via
* WP_Widget::form().
@@ -120,7 +117,6 @@ class WP_Widget_Recent_Posts extends WP_Widget {
* Outputs the settings form for the Recent Posts widget.
*
* @since 2.8.0
* @access public
*
* @param array $instance Current settings.
*/

View File

@@ -20,7 +20,6 @@ class WP_Widget_RSS extends WP_Widget {
* Sets up a new RSS widget instance.
*
* @since 2.8.0
* @access public
*/
public function __construct() {
$widget_ops = array(
@@ -35,7 +34,6 @@ class WP_Widget_RSS extends WP_Widget {
* Outputs the content for the current RSS widget instance.
*
* @since 2.8.0
* @access public
*
* @param array $args Display arguments including 'before_title', 'after_title',
* 'before_widget', and 'after_widget'.
@@ -97,7 +95,6 @@ class WP_Widget_RSS extends WP_Widget {
* Handles updating settings for the current RSS widget instance.
*
* @since 2.8.0
* @access public
*
* @param array $new_instance New settings for this instance as input by the user via
* WP_Widget::form().
@@ -113,7 +110,6 @@ class WP_Widget_RSS extends WP_Widget {
* Outputs the settings form for the RSS widget.
*
* @since 2.8.0
* @access public
*
* @param array $instance Current settings.
*/

View File

@@ -20,7 +20,6 @@ class WP_Widget_Search extends WP_Widget {
* Sets up a new Search widget instance.
*
* @since 2.8.0
* @access public
*/
public function __construct() {
$widget_ops = array(
@@ -35,7 +34,6 @@ class WP_Widget_Search extends WP_Widget {
* Outputs the content for the current Search widget instance.
*
* @since 2.8.0
* @access public
*
* @param array $args Display arguments including 'before_title', 'after_title',
* 'before_widget', and 'after_widget'.
@@ -60,7 +58,6 @@ class WP_Widget_Search extends WP_Widget {
* Outputs the settings form for the Search widget.
*
* @since 2.8.0
* @access public
*
* @param array $instance Current settings.
*/
@@ -76,7 +73,6 @@ class WP_Widget_Search extends WP_Widget {
* Handles updating settings for the current Search widget instance.
*
* @since 2.8.0
* @access public
*
* @param array $new_instance New settings for this instance as input by the user via
* WP_Widget::form().

View File

@@ -20,7 +20,6 @@ class WP_Widget_Tag_Cloud extends WP_Widget {
* Sets up a new Tag Cloud widget instance.
*
* @since 2.8.0
* @access public
*/
public function __construct() {
$widget_ops = array(
@@ -34,7 +33,6 @@ class WP_Widget_Tag_Cloud extends WP_Widget {
* Outputs the content for the current Tag Cloud widget instance.
*
* @since 2.8.0
* @access public
*
* @param array $args Display arguments including 'before_title', 'after_title',
* 'before_widget', and 'after_widget'.
@@ -95,7 +93,6 @@ class WP_Widget_Tag_Cloud extends WP_Widget {
* Handles updating settings for the current Tag Cloud widget instance.
*
* @since 2.8.0
* @access public
*
* @param array $new_instance New settings for this instance as input by the user via
* WP_Widget::form().
@@ -114,7 +111,6 @@ class WP_Widget_Tag_Cloud extends WP_Widget {
* Outputs the Tag Cloud widget settings form.
*
* @since 2.8.0
* @access public
*
* @param array $instance Current settings.
*/
@@ -184,7 +180,6 @@ class WP_Widget_Tag_Cloud extends WP_Widget {
* Retrieves the taxonomy for the current Tag cloud widget instance.
*
* @since 4.4.0
* @access public
*
* @param array $instance Current settings.
* @return string Name of the current taxonomy if set, otherwise 'post_tag'.

View File

@@ -28,7 +28,6 @@ class WP_Widget_Text extends WP_Widget {
* Sets up a new Text widget instance.
*
* @since 2.8.0
* @access public
*/
public function __construct() {
$widget_ops = array(
@@ -181,7 +180,6 @@ class WP_Widget_Text extends WP_Widget {
* Outputs the content for the current Text widget instance.
*
* @since 2.8.0
* @access public
*
* @param array $args Display arguments including 'before_title', 'after_title',
* 'before_widget', and 'after_widget'.
@@ -270,7 +268,6 @@ class WP_Widget_Text extends WP_Widget {
* Handles updating settings for the current Text widget instance.
*
* @since 2.8.0
* @access public
*
* @param array $new_instance New settings for this instance as input by the user via
* WP_Widget::form().
@@ -320,7 +317,6 @@ class WP_Widget_Text extends WP_Widget {
* Loads the required scripts and styles for the widget control.
*
* @since 4.8.0
* @access public
*/
public function enqueue_admin_scripts() {
wp_enqueue_editor();
@@ -333,7 +329,6 @@ class WP_Widget_Text extends WP_Widget {
* @since 2.8.0
* @since 4.8.0 Form only contains hidden inputs which are synced with JS template.
* @since 4.8.1 Restored original form to be displayed when in legacy mode.
* @access public
* @see WP_Widget_Visual_Text::render_control_template_scripts()
*
* @param array $instance Current settings.
@@ -381,7 +376,6 @@ class WP_Widget_Text extends WP_Widget {
* Render form template scripts.
*
* @since 4.8.0
* @access public
*/
public function render_control_template_scripts() {
$dismissed_pointers = explode( ',', (string) get_user_meta( get_current_user_id(), 'dismissed_wp_pointers', true ) );