Document default arguments for the `WP_List_Table` class. Also add referenced docblocks to extending class constructors.
Props mikejolley for the initial patch. Fixes #28679. See #28298. Built from https://develop.svn.wordpress.org/trunk@29459 git-svn-id: http://core.svn.wordpress.org/trunk@29237 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
efd52cb860
commit
8e86454467
|
@ -21,6 +21,15 @@ class WP_Comments_List_Table extends WP_List_Table {
|
|||
|
||||
public $pending_count = array();
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @since 3.1.0
|
||||
*
|
||||
* @see WP_List_Table::__construct() for more information on default arguments.
|
||||
*
|
||||
* @param array $args An associative array of arguments.
|
||||
*/
|
||||
public function __construct( $args = array() ) {
|
||||
global $post_id;
|
||||
|
||||
|
|
|
@ -9,6 +9,15 @@
|
|||
*/
|
||||
class WP_Links_List_Table extends WP_List_Table {
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @since 3.1.0
|
||||
*
|
||||
* @see WP_List_Table::__construct() for more information on default arguments.
|
||||
*
|
||||
* @param array $args An associative array of arguments.
|
||||
*/
|
||||
public function __construct( $args = array() ) {
|
||||
parent::__construct( array(
|
||||
'plural' => 'bookmarks',
|
||||
|
|
|
@ -2,10 +2,11 @@
|
|||
/**
|
||||
* Base class for displaying a list of items in an ajaxified HTML table.
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage List_Table
|
||||
* @since 3.1.0
|
||||
* @access private
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage List_Table
|
||||
*/
|
||||
class WP_List_Table {
|
||||
|
||||
|
@ -64,10 +65,29 @@ class WP_List_Table {
|
|||
private $_pagination;
|
||||
|
||||
/**
|
||||
* Constructor. The child class should call this constructor from its own constructor
|
||||
* Constructor.
|
||||
*
|
||||
* @param array $args An associative array with information about the current table
|
||||
* @access protected
|
||||
* The child class should call this constructor from its own constructor to override
|
||||
* the default $args.
|
||||
*
|
||||
* @since 3.1.0
|
||||
*
|
||||
* @param array|string $args {
|
||||
* Array or string of arguments.
|
||||
*
|
||||
* @type string $plural Plural value used for labels and the objects being listed.
|
||||
* This affects things such as CSS class-names and nonces used
|
||||
* in the list table, e.g. 'posts'. Default empty.
|
||||
* @type string $singular Singular label for an object being listed, e.g. 'post'.
|
||||
* Default empty
|
||||
* @type bool $ajax Whether the list table supports AJAX. This includes loading
|
||||
* and sorting data, for example. If true, the class will call
|
||||
* the {@see _js_vars()} method in the footer to provide variables
|
||||
* to any scripts handling AJAX events. Default false.
|
||||
* @type string $screen String containing the hook name used to determine the current
|
||||
* screen. If left null, the current screen will be automatically set.
|
||||
* Default null.
|
||||
* }
|
||||
*/
|
||||
public function __construct( $args = array() ) {
|
||||
$args = wp_parse_args( $args, array(
|
||||
|
|
|
@ -9,6 +9,15 @@
|
|||
*/
|
||||
class WP_Media_List_Table extends WP_List_Table {
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @since 3.1.0
|
||||
*
|
||||
* @see WP_List_Table::__construct() for more information on default arguments.
|
||||
*
|
||||
* @param array $args An associative array of arguments.
|
||||
*/
|
||||
public function __construct( $args = array() ) {
|
||||
$this->detached = isset( $_REQUEST['detached'] ) || isset( $_REQUEST['find_detached'] );
|
||||
|
||||
|
|
|
@ -9,6 +9,15 @@
|
|||
*/
|
||||
class WP_MS_Sites_List_Table extends WP_List_Table {
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @since 3.1.0
|
||||
*
|
||||
* @see WP_List_Table::__construct() for more information on default arguments.
|
||||
*
|
||||
* @param array $args An associative array of arguments.
|
||||
*/
|
||||
public function __construct( $args = array() ) {
|
||||
parent::__construct( array(
|
||||
'plural' => 'sites',
|
||||
|
|
|
@ -12,6 +12,15 @@ class WP_MS_Themes_List_Table extends WP_List_Table {
|
|||
public $site_id;
|
||||
public $is_site_themes;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @since 3.1.0
|
||||
*
|
||||
* @see WP_List_Table::__construct() for more information on default arguments.
|
||||
*
|
||||
* @param array $args An associative array of arguments.
|
||||
*/
|
||||
public function __construct( $args = array() ) {
|
||||
global $status, $page;
|
||||
|
||||
|
|
|
@ -9,6 +9,15 @@
|
|||
*/
|
||||
class WP_Plugins_List_Table extends WP_List_Table {
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @since 3.1.0
|
||||
*
|
||||
* @see WP_List_Table::__construct() for more information on default arguments.
|
||||
*
|
||||
* @param array $args An associative array of arguments.
|
||||
*/
|
||||
public function __construct( $args = array() ) {
|
||||
global $status, $page;
|
||||
|
||||
|
|
|
@ -45,6 +45,15 @@ class WP_Posts_List_Table extends WP_List_Table {
|
|||
*/
|
||||
private $sticky_posts_count = 0;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @since 3.1.0
|
||||
*
|
||||
* @see WP_List_Table::__construct() for more information on default arguments.
|
||||
*
|
||||
* @param array $args An associative array of arguments.
|
||||
*/
|
||||
public function __construct( $args = array() ) {
|
||||
global $post_type_object, $wpdb;
|
||||
|
||||
|
|
|
@ -11,6 +11,15 @@ class WP_Terms_List_Table extends WP_List_Table {
|
|||
|
||||
public $callback_args;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @since 3.1.0
|
||||
*
|
||||
* @see WP_List_Table::__construct() for more information on default arguments.
|
||||
*
|
||||
* @param array $args An associative array of arguments.
|
||||
*/
|
||||
public function __construct( $args = array() ) {
|
||||
global $post_type, $taxonomy, $action, $tax;
|
||||
|
||||
|
|
|
@ -12,6 +12,15 @@ class WP_Themes_List_Table extends WP_List_Table {
|
|||
protected $search_terms = array();
|
||||
public $features = array();
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @since 3.1.0
|
||||
*
|
||||
* @see WP_List_Table::__construct() for more information on default arguments.
|
||||
*
|
||||
* @param array $args An associative array of arguments.
|
||||
*/
|
||||
public function __construct( $args = array() ) {
|
||||
parent::__construct( array(
|
||||
'ajax' => true,
|
||||
|
|
|
@ -32,7 +32,10 @@ class WP_Users_List_Table extends WP_List_Table {
|
|||
* Constructor.
|
||||
*
|
||||
* @since 3.1.0
|
||||
* @access public
|
||||
*
|
||||
* @see WP_List_Table::__construct() for more information on default arguments.
|
||||
*
|
||||
* @param array $args An associative array of arguments.
|
||||
*/
|
||||
public function __construct( $args = array() ) {
|
||||
parent::__construct( array(
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.0-beta3-20140809';
|
||||
$wp_version = '4.0-beta3-20140810';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue