Fix mismatches in access modifiers for `WP_List_Table` + subclasses.

Fixes #28843, #28879.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28921 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2014-07-13 22:09:16 +00:00
parent 448422f8ae
commit 176b9b2301
14 changed files with 47 additions and 47 deletions

View File

@ -148,7 +148,7 @@ class WP_Comments_List_Table extends WP_List_Table {
_e( 'No comments found.' );
}
public function get_views() {
protected function get_views() {
global $post_id, $comment_status, $comment_type;
$status_links = array();
@ -201,7 +201,7 @@ class WP_Comments_List_Table extends WP_List_Table {
return $status_links;
}
public function get_bulk_actions() {
protected function get_bulk_actions() {
global $comment_status;
$actions = array();
@ -225,7 +225,7 @@ class WP_Comments_List_Table extends WP_List_Table {
return $actions;
}
public function extra_tablenav( $which ) {
protected function extra_tablenav( $which ) {
global $comment_status, $comment_type;
?>
<div class="alignleft actions">
@ -301,7 +301,7 @@ class WP_Comments_List_Table extends WP_List_Table {
return $columns;
}
public function get_sortable_columns() {
protected function get_sortable_columns() {
return array(
'author' => 'comment_author',
'response' => 'comment_post_ID'
@ -582,7 +582,7 @@ class WP_Comments_List_Table extends WP_List_Table {
*/
class WP_Post_Comments_List_Table extends WP_Comments_List_Table {
public function get_column_info() {
protected function get_column_info() {
$this->_column_headers = array(
array(
'author' => __( 'Author' ),
@ -595,7 +595,7 @@ class WP_Post_Comments_List_Table extends WP_Comments_List_Table {
return $this->_column_headers;
}
public function get_table_classes() {
protected function get_table_classes() {
$classes = parent::get_table_classes();
$classes[] = 'comments-box';
return $classes;

View File

@ -96,7 +96,7 @@ class WP_Links_List_Table extends WP_List_Table {
);
}
protected function display_rows() {
public function display_rows() {
global $cat_id;
$alt = 0;

View File

@ -333,9 +333,9 @@ class WP_List_Table {
* Display the bulk actions dropdown.
*
* @since 3.1.0
* @access public
* @access protected
*/
public function bulk_actions() {
protected function bulk_actions() {
if ( is_null( $this->_actions ) ) {
$no_new_actions = $this->_actions = $this->get_bulk_actions();
/**
@ -762,11 +762,11 @@ class WP_List_Table {
* Print column headers, accounting for hidden and sortable columns.
*
* @since 3.1.0
* @access protected
* @access public
*
* @param bool $with_id Whether to set the id attribute or not
*/
protected function print_column_headers( $with_id = true ) {
public function print_column_headers( $with_id = true ) {
list( $columns, $hidden, $sortable ) = $this->get_column_info();
$current_url = set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
@ -913,9 +913,9 @@ class WP_List_Table {
* Generate the <tbody> part of the table
*
* @since 3.1.0
* @access protected
* @access public
*/
protected function display_rows_or_placeholder() {
public function display_rows_or_placeholder() {
if ( $this->has_items() ) {
$this->display_rows();
} else {
@ -929,9 +929,9 @@ class WP_List_Table {
* Generate the table rows
*
* @since 3.1.0
* @access protected
* @access public
*/
protected function display_rows() {
public function display_rows() {
foreach ( $this->items as $item )
$this->single_row( $item );
}
@ -940,11 +940,11 @@ class WP_List_Table {
* Generates content for a single row of the table
*
* @since 3.1.0
* @access protected
* @access public
*
* @param object $item The current item
*/
protected function single_row( $item ) {
public function single_row( $item ) {
static $row_class = '';
$row_class = ( $row_class == '' ? ' class="alternate"' : '' );
@ -1028,9 +1028,9 @@ class WP_List_Table {
/**
* Send required variables to JavaScript land
*
* @access private
* @access public
*/
private function _js_vars() {
public function _js_vars() {
$args = array(
'class' => get_class( $this ),
'screen' => array(

View File

@ -232,7 +232,7 @@ class WP_Media_List_Table extends WP_List_Table {
);
}
protected function display_rows() {
public function display_rows() {
global $post;
add_filter( 'the_title','esc_html' );

View File

@ -250,12 +250,12 @@ class WP_MS_Themes_List_Table extends WP_List_Table {
return $actions;
}
protected function display_rows() {
public function display_rows() {
foreach ( $this->items as $theme )
$this->single_row( $theme );
}
protected function single_row( $theme ) {
public function single_row( $theme ) {
global $status, $page, $s, $totals;
$context = $status;

View File

@ -139,7 +139,7 @@ class WP_MS_Users_List_Table extends WP_List_Table {
);
}
protected function display_rows() {
public function display_rows() {
global $mode;
$alt = '';

View File

@ -216,7 +216,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
);
}
protected function display_rows() {
public function display_rows() {
$plugins_allowedtags = array(
'a' => array( 'href' => array(),'title' => array(), 'target' => array() ),
'abbr' => array( 'title' => array() ),'acronym' => array( 'title' => array() ),

View File

@ -323,7 +323,7 @@ class WP_Plugins_List_Table extends WP_List_Table {
return parent::current_action();
}
protected function display_rows() {
public function display_rows() {
global $status;
if ( is_multisite() && ! $this->screen->in_admin( 'network' ) && in_array( $status, array( 'mustuse', 'dropins' ) ) )
@ -333,7 +333,7 @@ class WP_Plugins_List_Table extends WP_List_Table {
$this->single_row( array( $plugin_file, $plugin_data ) );
}
protected function single_row( $item ) {
public function single_row( $item ) {
global $status, $page, $s, $totals;
list( $plugin_file, $plugin_data ) = $item;

View File

@ -358,7 +358,7 @@ class WP_Posts_List_Table extends WP_List_Table {
);
}
protected function display_rows( $posts = array(), $level = 0 ) {
public function display_rows( $posts = array(), $level = 0 ) {
global $wp_query, $per_page;
if ( empty( $posts ) )
@ -525,7 +525,7 @@ class WP_Posts_List_Table extends WP_List_Table {
unset( $children_pages[$parent] ); //required in order to keep track of orphans
}
protected function single_row( $post, $level = 0 ) {
public function single_row( $post, $level = 0 ) {
global $mode;
static $alternate;

View File

@ -144,7 +144,7 @@ class WP_Terms_List_Table extends WP_List_Table {
);
}
protected function display_rows_or_placeholder() {
public function display_rows_or_placeholder() {
$taxonomy = $this->screen->taxonomy;
$args = wp_parse_args( $this->callback_args, array(
@ -240,7 +240,7 @@ class WP_Terms_List_Table extends WP_List_Table {
}
}
protected function single_row( $tag, $level = 0 ) {
public function single_row( $tag, $level = 0 ) {
global $taxonomy;
$tag = sanitize_term( $tag, $taxonomy );

View File

@ -176,7 +176,7 @@ class WP_Theme_Install_List_Table extends WP_Themes_List_Table {
parent::tablenav( 'bottom' );
}
protected function display_rows() {
public function display_rows() {
$themes = $this->items;
foreach ( $themes as $theme ) {
?>
@ -207,7 +207,7 @@ class WP_Theme_Install_List_Table extends WP_Themes_List_Table {
* public 'description' => string 'A basic magazine style layout with a fully customizable layout through a backend interface. Designed by <a href="http://bavotasan.com">c.bavota</a> of <a href="http://tinkerpriestmedia.com">Tinker Priest Media</a>.'
* public 'download_link' => string 'http://wordpress.org/themes/download/magazine-basic.1.1.zip'
*/
protected function single_row( $theme ) {
public function single_row( $theme ) {
global $themes_allowedtags;
if ( empty( $theme ) )
@ -396,12 +396,12 @@ class WP_Theme_Install_List_Table extends WP_Themes_List_Table {
* Send required variables to JavaScript land
*
* @since 3.4.0
* @access private
* @access public
*
* @uses $tab Global; current tab within Themes->Install screen
* @uses $type Global; type of search.
*/
private function _js_vars( $extra_args = array() ) {
public function _js_vars( $extra_args = array() ) {
global $tab, $type;
parent::_js_vars( compact( 'tab', 'type' ) );
}

View File

@ -114,7 +114,7 @@ class WP_Themes_List_Table extends WP_List_Table {
return array();
}
protected function display_rows_or_placeholder() {
public function display_rows_or_placeholder() {
if ( $this->has_items() ) {
$this->display_rows();
} else {
@ -124,7 +124,7 @@ class WP_Themes_List_Table extends WP_List_Table {
}
}
protected function display_rows() {
public function display_rows() {
$themes = $this->items;
foreach ( $themes as $theme ):
@ -243,13 +243,13 @@ class WP_Themes_List_Table extends WP_List_Table {
* Send required variables to JavaScript land
*
* @since 3.4.0
* @access private
* @access public
*
* @uses $this->features Array of all feature search terms.
* @uses get_pagenum()
* @uses _pagination_args['total_pages']
*/
private function _js_vars( $extra_args = array() ) {
public function _js_vars( $extra_args = array() ) {
$search_string = isset( $_REQUEST['s'] ) ? esc_attr( wp_unslash( $_REQUEST['s'] ) ) : '';
$args = array(

View File

@ -127,11 +127,11 @@ class WP_Users_List_Table extends WP_List_Table {
* filtering of the user table.
*
* @since 3.1.0
* @access public
* @access protected
*
* @return array An array of HTML links, one for each view.
*/
public function get_views() {
protected function get_views() {
global $wp_roles, $role;
if ( $this->is_site_users ) {
@ -173,11 +173,11 @@ class WP_Users_List_Table extends WP_List_Table {
* Retrieve an associative array of bulk actions available on this table.
*
* @since 3.1.0
* @access public
* @access protected
*
* @return array Array of bulk actions.
*/
public function get_bulk_actions() {
protected function get_bulk_actions() {
$actions = array();
if ( is_multisite() ) {
@ -195,12 +195,12 @@ class WP_Users_List_Table extends WP_List_Table {
* Output the controls to allow user roles to be changed in bulk.
*
* @since 3.1.0
* @access public
* @access protected
*
* @param string $which Whether this is being invoked above ("top")
* or below the table ("bottom").
*/
public function extra_tablenav( $which ) {
protected function extra_tablenav( $which ) {
if ( 'top' != $which )
return;
?>
@ -272,11 +272,11 @@ class WP_Users_List_Table extends WP_List_Table {
* Get a list of sortable columns for the list table.
*
* @since 3.1.0
* @access public
* @access protected
*
* @return array Array of sortable columns.
*/
public function get_sortable_columns() {
protected function get_sortable_columns() {
$c = array(
'username' => 'login',
'name' => 'name',

View File

@ -99,7 +99,7 @@ class _WP_List_Table_Compat extends WP_List_Table {
}
}
public function get_column_info() {
protected function get_column_info() {
$columns = get_column_headers( $this->_screen );
$hidden = get_hidden_columns( $this->_screen );
$sortable = array();