diff --git a/src/wp-admin/includes/class-wp-media-list-table.php b/src/wp-admin/includes/class-wp-media-list-table.php index 5e26ebb9e118b..4ff73328d50f8 100644 --- a/src/wp-admin/includes/class-wp-media-list-table.php +++ b/src/wp-admin/includes/class-wp-media-list-table.php @@ -22,9 +22,20 @@ class WP_Media_List_Table extends WP_List_Table { * @var array */ protected $comment_pending_count = array(); - + /** + * Whether the list table is for detached media. + * + * @since 3.1.0 + * @var bool + */ private $detached; + /** + * Whether the list table is for trash. + * + * @since 3.1.0 + * @var bool + */ private $is_trash; /** @@ -53,6 +64,10 @@ public function __construct( $args = array() ) { } /** + * Checks if the current user has permissions to upload files. + * + * @since 3.1.0 + * * @return bool Whether the user can upload files. */ public function ajax_user_can() { @@ -60,10 +75,14 @@ public function ajax_user_can() { } /** + * Prepares the list of items for displaying. + * + * @since 3.1.0 + * * @global string $mode List table view mode. * @global WP_Query $wp_query WordPress Query object. - * @global array $post_mime_types - * @global array $avail_post_mime_types + * @global array $post_mime_types An array of post mime types. + * @global array $avail_post_mime_types An array of available post mime types. */ public function prepare_items() { global $mode, $wp_query, $post_mime_types, $avail_post_mime_types; @@ -117,8 +136,12 @@ public function prepare_items() { } /** - * @global array $post_mime_types - * @global array $avail_post_mime_types + * Gets an array of links for the available views on this table. + * + * @since 3.1.0 + * + * @global array $post_mime_types An array of post mime types. + * @global array $avail_post_mime_types An array of available post mime types. * @return array An array of links for the available views. */ protected function get_views() { @@ -198,7 +221,11 @@ protected function get_bulk_actions() { } /** - * @param string $which + * Displays extra controls between bulk actions and pagination. + * + * @since 3.1.0 + * + * @param string $which The location of the extra table nav: 'top' or 'bottom'. */ protected function extra_tablenav( $which ) { if ( 'bar' !== $which ) { @@ -253,6 +280,9 @@ public function has_items() { } /** + * Displays a message when no media items are found. + * + * @since 3.1.0 */ public function no_items() { if ( $this->is_trash ) { @@ -762,8 +792,12 @@ protected function get_default_primary_column_name() { } /** - * @param WP_Post $post - * @param string $att_title + * Gets the row actions for a media item. + * + * @since 3.1.0 + * + * @param WP_Post $post The current WP_Post object. + * @param string $att_title The attachment title. * @return array An array of row actions. */ private function _get_row_actions( $post, $att_title ) { diff --git a/src/wp-admin/includes/class-wp-ms-sites-list-table.php b/src/wp-admin/includes/class-wp-ms-sites-list-table.php index 9214927bee9f8..afee923fd60e7 100644 --- a/src/wp-admin/includes/class-wp-ms-sites-list-table.php +++ b/src/wp-admin/includes/class-wp-ms-sites-list-table.php @@ -50,7 +50,11 @@ public function __construct( $args = array() ) { } /** - * @return bool + * Checks if the current user has permissions to manage sites. + * + * @since 3.1.0 + * + * @return bool Whether the user can manage sites. */ public function ajax_user_can() { return current_user_can( 'manage_sites' ); @@ -62,7 +66,7 @@ public function ajax_user_can() { * @since 3.1.0 * * @global string $mode List table view mode. - * @global string $s + * @global string $s Search string. * @global wpdb $wpdb WordPress database abstraction object. */ public function prepare_items() { @@ -206,6 +210,9 @@ public function prepare_items() { } /** + * Displays a message when no sites are found. + * + * @since 3.1.0 */ public function no_items() { _e( 'No sites found.' ); @@ -286,7 +293,11 @@ protected function get_views() { } /** - * @return array + * Gets an associative array of bulk actions for this table. + * + * @since 3.1.0 + * + * @return array An associative array of bulk actions. */ protected function get_bulk_actions() { $actions = array(); @@ -300,6 +311,10 @@ protected function get_bulk_actions() { } /** + * Displays the pagination. + * + * @since 3.1.0 + * * @global string $mode List table view mode. * * @param string $which The location of the pagination nav markup: Either 'top' or 'bottom'. @@ -359,6 +374,10 @@ protected function extra_tablenav( $which ) { } /** + * Gets an array of column titles keyed by their column name. + * + * @since 3.1.0 + * * @return string[] Array of column titles keyed by their column name. */ public function get_columns() { @@ -386,7 +405,11 @@ public function get_columns() { } /** - * @return array + * Gets an array of sortable columns. + * + * @since 3.1.0 + * + * @return array An array of sortable columns. */ protected function get_sortable_columns() { @@ -640,7 +663,7 @@ public function display_rows() { * * @since 5.3.0 * - * @param array $site + * @param array $site The site to get states for. */ protected function site_states( $site ) { $site_states = array();