<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[28493] trunk: Add access modifiers to methods and members of list table classes:</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://core.trac.wordpress.org/changeset/28493">28493</a></dd>
<dt>Author</dt> <dd>wonderboymusic</dd>
<dt>Date</dt> <dd>2014-05-19 01:16:16 +0000 (Mon, 19 May 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Add access modifiers to methods and members of list table classes:
* `WP_List_Table` is the base class that implements `__get()` and `__call()` for BC
* Adds unit tests to confirm that subclasses properly inherit magic methods
* Add modifiers to subclasses: `WP_Links_List_Table`, `WP_Media_List_Table`, `WP_MS_Sites_List_Table`, `WP_MS_Themes_List_Table`, `WP_MS_Users_List_Table`, `WP_Plugin_Install_List_Table`, `WP_Plugins_List_Table`, `WP_Posts_List_Table`, `WP_Terms_List_Table`, `WP_Theme_Install_List_Table`, `WP_Themes_List_Table`
See <a href="http://core.trac.wordpress.org/ticket/27881">#27881</a>, <a href="http://core.trac.wordpress.org/ticket/22234">#22234</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpadminincludesclasswplinkslisttablephp">trunk/src/wp-admin/includes/class-wp-links-list-table.php</a></li>
<li><a href="#trunksrcwpadminincludesclasswplisttablephp">trunk/src/wp-admin/includes/class-wp-list-table.php</a></li>
<li><a href="#trunksrcwpadminincludesclasswpmedialisttablephp">trunk/src/wp-admin/includes/class-wp-media-list-table.php</a></li>
<li><a href="#trunksrcwpadminincludesclasswpmssiteslisttablephp">trunk/src/wp-admin/includes/class-wp-ms-sites-list-table.php</a></li>
<li><a href="#trunksrcwpadminincludesclasswpmsthemeslisttablephp">trunk/src/wp-admin/includes/class-wp-ms-themes-list-table.php</a></li>
<li><a href="#trunksrcwpadminincludesclasswpmsuserslisttablephp">trunk/src/wp-admin/includes/class-wp-ms-users-list-table.php</a></li>
<li><a href="#trunksrcwpadminincludesclasswpplugininstalllisttablephp">trunk/src/wp-admin/includes/class-wp-plugin-install-list-table.php</a></li>
<li><a href="#trunksrcwpadminincludesclasswppluginslisttablephp">trunk/src/wp-admin/includes/class-wp-plugins-list-table.php</a></li>
<li><a href="#trunksrcwpadminincludesclasswppostslisttablephp">trunk/src/wp-admin/includes/class-wp-posts-list-table.php</a></li>
<li><a href="#trunksrcwpadminincludesclasswptermslisttablephp">trunk/src/wp-admin/includes/class-wp-terms-list-table.php</a></li>
<li><a href="#trunksrcwpadminincludesclasswpthemeinstalllisttablephp">trunk/src/wp-admin/includes/class-wp-theme-install-list-table.php</a></li>
<li><a href="#trunksrcwpadminincludesclasswpthemeslisttablephp">trunk/src/wp-admin/includes/class-wp-themes-list-table.php</a></li>
<li><a href="#trunktestsphpunitincludesfunctionsphp">trunk/tests/phpunit/includes/functions.php</a></li>
<li><a href="#trunktestsphpunittestsbasicphp">trunk/tests/phpunit/tests/basic.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpadminincludesclasswplinkslisttablephp"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-admin/includes/class-wp-links-list-table.php (28492 => 28493)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-admin/includes/class-wp-links-list-table.php 2014-05-19 00:19:00 UTC (rev 28492)
+++ trunk/src/wp-admin/includes/class-wp-links-list-table.php 2014-05-19 01:16:16 UTC (rev 28493)
</span><span class="lines">@@ -9,18 +9,18 @@
</span><span class="cx"> */
</span><span class="cx"> class WP_Links_List_Table extends WP_List_Table {
</span><span class="cx">
</span><del>- function __construct( $args = array() ) {
</del><ins>+ public function __construct( $args = array() ) {
</ins><span class="cx"> parent::__construct( array(
</span><span class="cx"> 'plural' => 'bookmarks',
</span><span class="cx"> 'screen' => isset( $args['screen'] ) ? $args['screen'] : null,
</span><span class="cx"> ) );
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function ajax_user_can() {
</del><ins>+ public function ajax_user_can() {
</ins><span class="cx"> return current_user_can( 'manage_links' );
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function prepare_items() {
</del><ins>+ public function prepare_items() {
</ins><span class="cx"> global $cat_id, $s, $orderby, $order;
</span><span class="cx">
</span><span class="cx"> wp_reset_vars( array( 'action', 'cat_id', 'link_id', 'orderby', 'order', 's' ) );
</span><span class="lines">@@ -39,18 +39,18 @@
</span><span class="cx"> $this->items = get_bookmarks( $args );
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function no_items() {
</del><ins>+ public function no_items() {
</ins><span class="cx"> _e( 'No links found.' );
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function get_bulk_actions() {
</del><ins>+ protected function get_bulk_actions() {
</ins><span class="cx"> $actions = array();
</span><span class="cx"> $actions['delete'] = __( 'Delete' );
</span><span class="cx">
</span><span class="cx"> return $actions;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function extra_tablenav( $which ) {
</del><ins>+ protected function extra_tablenav( $which ) {
</ins><span class="cx"> global $cat_id;
</span><span class="cx">
</span><span class="cx"> if ( 'top' != $which )
</span><span class="lines">@@ -75,7 +75,7 @@
</span><span class="cx"> <?php
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function get_columns() {
</del><ins>+ protected function get_columns() {
</ins><span class="cx"> return array(
</span><span class="cx"> 'cb' => '<input type="checkbox" />',
</span><span class="cx"> 'name' => _x( 'Name', 'link name' ),
</span><span class="lines">@@ -87,7 +87,7 @@
</span><span class="cx"> );
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function get_sortable_columns() {
</del><ins>+ protected function get_sortable_columns() {
</ins><span class="cx"> return array(
</span><span class="cx"> 'name' => 'name',
</span><span class="cx"> 'url' => 'url',
</span><span class="lines">@@ -96,7 +96,7 @@
</span><span class="cx"> );
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function display_rows() {
</del><ins>+ protected function display_rows() {
</ins><span class="cx"> global $cat_id;
</span><span class="cx">
</span><span class="cx"> $alt = 0;
</span></span></pre></div>
<a id="trunksrcwpadminincludesclasswplisttablephp"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-admin/includes/class-wp-list-table.php (28492 => 28493)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-admin/includes/class-wp-list-table.php 2014-05-19 00:19:00 UTC (rev 28492)
+++ trunk/src/wp-admin/includes/class-wp-list-table.php 2014-05-19 01:16:16 UTC (rev 28493)
</span><span class="lines">@@ -16,7 +16,7 @@
</span><span class="cx"> * @var array
</span><span class="cx"> * @access protected
</span><span class="cx"> */
</span><del>- var $items;
</del><ins>+ protected $items;
</ins><span class="cx">
</span><span class="cx"> /**
</span><span class="cx"> * Various information about the current table
</span><span class="lines">@@ -25,7 +25,7 @@
</span><span class="cx"> * @var array
</span><span class="cx"> * @access private
</span><span class="cx"> */
</span><del>- var $_args;
</del><ins>+ private $_args;
</ins><span class="cx">
</span><span class="cx"> /**
</span><span class="cx"> * Various information needed for displaying the pagination
</span><span class="lines">@@ -34,7 +34,7 @@
</span><span class="cx"> * @var array
</span><span class="cx"> * @access private
</span><span class="cx"> */
</span><del>- var $_pagination_args = array();
</del><ins>+ private $_pagination_args = array();
</ins><span class="cx">
</span><span class="cx"> /**
</span><span class="cx"> * The current screen
</span><span class="lines">@@ -43,7 +43,7 @@
</span><span class="cx"> * @var object
</span><span class="cx"> * @access protected
</span><span class="cx"> */
</span><del>- var $screen;
</del><ins>+ protected $screen;
</ins><span class="cx">
</span><span class="cx"> /**
</span><span class="cx"> * Cached bulk actions
</span><span class="lines">@@ -52,7 +52,7 @@
</span><span class="cx"> * @var array
</span><span class="cx"> * @access private
</span><span class="cx"> */
</span><del>- var $_actions;
</del><ins>+ private $_actions;
</ins><span class="cx">
</span><span class="cx"> /**
</span><span class="cx"> * Cached pagination output
</span><span class="lines">@@ -61,7 +61,7 @@
</span><span class="cx"> * @var string
</span><span class="cx"> * @access private
</span><span class="cx"> */
</span><del>- var $_pagination;
</del><ins>+ private $_pagination;
</ins><span class="cx">
</span><span class="cx"> /**
</span><span class="cx"> * Constructor. The child class should call this constructor from its own constructor
</span><span class="lines">@@ -69,7 +69,7 @@
</span><span class="cx"> * @param array $args An associative array with information about the current table
</span><span class="cx"> * @access protected
</span><span class="cx"> */
</span><del>- function __construct( $args = array() ) {
</del><ins>+ public function __construct( $args = array() ) {
</ins><span class="cx"> $args = wp_parse_args( $args, array(
</span><span class="cx"> 'plural' => '',
</span><span class="cx"> 'singular' => '',
</span><span class="lines">@@ -96,6 +96,29 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><ins>+ * Make private properties readable for backwards compatibility
+ *
+ * @since 4.0.0
+ * @param string $name
+ * @return mixed
+ */
+ public function __get( $name ) {
+ return $this->$name;
+ }
+
+ /**
+ * Make private/protected methods readable for backwards compatibility
+ *
+ * @since 4.0.0
+ * @param string $name
+ * @param array $arguments
+ * @return mixed
+ */
+ public function __call( $name, $arguments ) {
+ return call_user_func_array( array( $this, $name ), $arguments );
+ }
+
+ /**
</ins><span class="cx"> * Checks the current user's permissions
</span><span class="cx"> * @uses wp_die()
</span><span class="cx"> *
</span><span class="lines">@@ -103,7 +126,7 @@
</span><span class="cx"> * @access public
</span><span class="cx"> * @abstract
</span><span class="cx"> */
</span><del>- function ajax_user_can() {
</del><ins>+ public function ajax_user_can() {
</ins><span class="cx"> die( 'function WP_List_Table::ajax_user_can() must be over-ridden in a sub-class.' );
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -115,7 +138,7 @@
</span><span class="cx"> * @access public
</span><span class="cx"> * @abstract
</span><span class="cx"> */
</span><del>- function prepare_items() {
</del><ins>+ public function prepare_items() {
</ins><span class="cx"> die( 'function WP_List_Table::prepare_items() must be over-ridden in a sub-class.' );
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -125,7 +148,7 @@
</span><span class="cx"> * @param array $args An associative array with information about the pagination
</span><span class="cx"> * @access protected
</span><span class="cx"> */
</span><del>- function set_pagination_args( $args ) {
</del><ins>+ protected function set_pagination_args( $args ) {
</ins><span class="cx"> $args = wp_parse_args( $args, array(
</span><span class="cx"> 'total_items' => 0,
</span><span class="cx"> 'total_pages' => 0,
</span><span class="lines">@@ -153,7 +176,7 @@
</span><span class="cx"> * @param string $key
</span><span class="cx"> * @return array
</span><span class="cx"> */
</span><del>- function get_pagination_arg( $key ) {
</del><ins>+ public function get_pagination_arg( $key ) {
</ins><span class="cx"> if ( 'page' == $key )
</span><span class="cx"> return $this->get_pagenum();
</span><span class="cx">
</span><span class="lines">@@ -169,7 +192,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @return bool
</span><span class="cx"> */
</span><del>- function has_items() {
</del><ins>+ public function has_items() {
</ins><span class="cx"> return !empty( $this->items );
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -179,7 +202,7 @@
</span><span class="cx"> * @since 3.1.0
</span><span class="cx"> * @access public
</span><span class="cx"> */
</span><del>- function no_items() {
</del><ins>+ public function no_items() {
</ins><span class="cx"> _e( 'No items found.' );
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -192,7 +215,7 @@
</span><span class="cx"> * @param string $text The search button text
</span><span class="cx"> * @param string $input_id The search input id
</span><span class="cx"> */
</span><del>- function search_box( $text, $input_id ) {
</del><ins>+ public function search_box( $text, $input_id ) {
</ins><span class="cx"> if ( empty( $_REQUEST['s'] ) && !$this->has_items() )
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="lines">@@ -224,7 +247,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @return array
</span><span class="cx"> */
</span><del>- function get_views() {
</del><ins>+ protected function get_views() {
</ins><span class="cx"> return array();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -234,7 +257,7 @@
</span><span class="cx"> * @since 3.1.0
</span><span class="cx"> * @access public
</span><span class="cx"> */
</span><del>- function views() {
</del><ins>+ public function views() {
</ins><span class="cx"> $views = $this->get_views();
</span><span class="cx"> /**
</span><span class="cx"> * Filter the list of available list table views.
</span><span class="lines">@@ -268,7 +291,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @return array
</span><span class="cx"> */
</span><del>- function get_bulk_actions() {
</del><ins>+ protected function get_bulk_actions() {
</ins><span class="cx"> return array();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -278,7 +301,7 @@
</span><span class="cx"> * @since 3.1.0
</span><span class="cx"> * @access public
</span><span class="cx"> */
</span><del>- function bulk_actions() {
</del><ins>+ public function bulk_actions() {
</ins><span class="cx"> if ( is_null( $this->_actions ) ) {
</span><span class="cx"> $no_new_actions = $this->_actions = $this->get_bulk_actions();
</span><span class="cx"> /**
</span><span class="lines">@@ -326,7 +349,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @return string|bool The action name or False if no action was selected
</span><span class="cx"> */
</span><del>- function current_action() {
</del><ins>+ public function current_action() {
</ins><span class="cx"> if ( isset( $_REQUEST['action'] ) && -1 != $_REQUEST['action'] )
</span><span class="cx"> return $_REQUEST['action'];
</span><span class="cx">
</span><span class="lines">@@ -346,7 +369,7 @@
</span><span class="cx"> * @param bool $always_visible Whether the actions should be always visible
</span><span class="cx"> * @return string
</span><span class="cx"> */
</span><del>- function row_actions( $actions, $always_visible = false ) {
</del><ins>+ protected function row_actions( $actions, $always_visible = false ) {
</ins><span class="cx"> $action_count = count( $actions );
</span><span class="cx"> $i = 0;
</span><span class="cx">
</span><span class="lines">@@ -370,7 +393,7 @@
</span><span class="cx"> * @since 3.1.0
</span><span class="cx"> * @access protected
</span><span class="cx"> */
</span><del>- function months_dropdown( $post_type ) {
</del><ins>+ protected function months_dropdown( $post_type ) {
</ins><span class="cx"> global $wpdb, $wp_locale;
</span><span class="cx">
</span><span class="cx"> $months = $wpdb->get_results( $wpdb->prepare( "
</span><span class="lines">@@ -425,7 +448,7 @@
</span><span class="cx"> * @since 3.1.0
</span><span class="cx"> * @access protected
</span><span class="cx"> */
</span><del>- function view_switcher( $current_mode ) {
</del><ins>+ protected function view_switcher( $current_mode ) {
</ins><span class="cx"> $modes = array(
</span><span class="cx"> 'list' => __( 'List View' ),
</span><span class="cx"> 'excerpt' => __( 'Excerpt View' )
</span><span class="lines">@@ -453,7 +476,7 @@
</span><span class="cx"> * @param int $post_id
</span><span class="cx"> * @param int $pending_comments
</span><span class="cx"> */
</span><del>- function comments_bubble( $post_id, $pending_comments ) {
</del><ins>+ protected function comments_bubble( $post_id, $pending_comments ) {
</ins><span class="cx"> $pending_phrase = sprintf( __( '%s pending' ), number_format( $pending_comments ) );
</span><span class="cx">
</span><span class="cx"> if ( $pending_comments )
</span><span class="lines">@@ -473,7 +496,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @return int
</span><span class="cx"> */
</span><del>- function get_pagenum() {
</del><ins>+ protected function get_pagenum() {
</ins><span class="cx"> $pagenum = isset( $_REQUEST['paged'] ) ? absint( $_REQUEST['paged'] ) : 0;
</span><span class="cx">
</span><span class="cx"> if( isset( $this->_pagination_args['total_pages'] ) && $pagenum > $this->_pagination_args['total_pages'] )
</span><span class="lines">@@ -490,7 +513,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @return int
</span><span class="cx"> */
</span><del>- function get_items_per_page( $option, $default = 20 ) {
</del><ins>+ protected function get_items_per_page( $option, $default = 20 ) {
</ins><span class="cx"> $per_page = (int) get_user_option( $option );
</span><span class="cx"> if ( empty( $per_page ) || $per_page < 1 )
</span><span class="cx"> $per_page = $default;
</span><span class="lines">@@ -516,7 +539,7 @@
</span><span class="cx"> * @since 3.1.0
</span><span class="cx"> * @access protected
</span><span class="cx"> */
</span><del>- function pagination( $which ) {
</del><ins>+ protected function pagination( $which ) {
</ins><span class="cx"> if ( empty( $this->_pagination_args ) ) {
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="lines">@@ -611,7 +634,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @return array
</span><span class="cx"> */
</span><del>- function get_columns() {
</del><ins>+ protected function get_columns() {
</ins><span class="cx"> die( 'function WP_List_Table::get_columns() must be over-ridden in a sub-class.' );
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -628,7 +651,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @return array
</span><span class="cx"> */
</span><del>- function get_sortable_columns() {
</del><ins>+ protected function get_sortable_columns() {
</ins><span class="cx"> return array();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -640,7 +663,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @return array
</span><span class="cx"> */
</span><del>- function get_column_info() {
</del><ins>+ protected function get_column_info() {
</ins><span class="cx"> if ( isset( $this->_column_headers ) )
</span><span class="cx"> return $this->_column_headers;
</span><span class="cx">
</span><span class="lines">@@ -685,7 +708,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @return int
</span><span class="cx"> */
</span><del>- function get_column_count() {
</del><ins>+ public function get_column_count() {
</ins><span class="cx"> list ( $columns, $hidden ) = $this->get_column_info();
</span><span class="cx"> $hidden = array_intersect( array_keys( $columns ), array_filter( $hidden ) );
</span><span class="cx"> return count( $columns ) - count( $hidden );
</span><span class="lines">@@ -699,7 +722,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @param bool $with_id Whether to set the id attribute or not
</span><span class="cx"> */
</span><del>- function print_column_headers( $with_id = true ) {
</del><ins>+ protected function print_column_headers( $with_id = true ) {
</ins><span class="cx"> list( $columns, $hidden, $sortable ) = $this->get_column_info();
</span><span class="cx">
</span><span class="cx"> $current_url = set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
</span><span class="lines">@@ -767,7 +790,7 @@
</span><span class="cx"> * @since 3.1.0
</span><span class="cx"> * @access public
</span><span class="cx"> */
</span><del>- function display() {
</del><ins>+ public function display() {
</ins><span class="cx"> $singular = $this->_args['singular'];
</span><span class="cx">
</span><span class="cx"> $this->display_tablenav( 'top' );
</span><span class="lines">@@ -805,7 +828,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @return array
</span><span class="cx"> */
</span><del>- function get_table_classes() {
</del><ins>+ protected function get_table_classes() {
</ins><span class="cx"> return array( 'widefat', 'fixed', $this->_args['plural'] );
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -815,7 +838,7 @@
</span><span class="cx"> * @since 3.1.0
</span><span class="cx"> * @access protected
</span><span class="cx"> */
</span><del>- function display_tablenav( $which ) {
</del><ins>+ protected function display_tablenav( $which ) {
</ins><span class="cx"> if ( 'top' == $which )
</span><span class="cx"> wp_nonce_field( 'bulk-' . $this->_args['plural'] );
</span><span class="cx"> ?>
</span><span class="lines">@@ -840,7 +863,7 @@
</span><span class="cx"> * @since 3.1.0
</span><span class="cx"> * @access protected
</span><span class="cx"> */
</span><del>- function extra_tablenav( $which ) {}
</del><ins>+ protected function extra_tablenav( $which ) {}
</ins><span class="cx">
</span><span class="cx"> /**
</span><span class="cx"> * Generate the <tbody> part of the table
</span><span class="lines">@@ -848,7 +871,7 @@
</span><span class="cx"> * @since 3.1.0
</span><span class="cx"> * @access protected
</span><span class="cx"> */
</span><del>- function display_rows_or_placeholder() {
</del><ins>+ protected function display_rows_or_placeholder() {
</ins><span class="cx"> if ( $this->has_items() ) {
</span><span class="cx"> $this->display_rows();
</span><span class="cx"> } else {
</span><span class="lines">@@ -864,7 +887,7 @@
</span><span class="cx"> * @since 3.1.0
</span><span class="cx"> * @access protected
</span><span class="cx"> */
</span><del>- function display_rows() {
</del><ins>+ protected function display_rows() {
</ins><span class="cx"> foreach ( $this->items as $item )
</span><span class="cx"> $this->single_row( $item );
</span><span class="cx"> }
</span><span class="lines">@@ -877,7 +900,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @param object $item The current item
</span><span class="cx"> */
</span><del>- function single_row( $item ) {
</del><ins>+ protected function single_row( $item ) {
</ins><span class="cx"> static $row_class = '';
</span><span class="cx"> $row_class = ( $row_class == '' ? ' class="alternate"' : '' );
</span><span class="cx">
</span><span class="lines">@@ -894,7 +917,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @param object $item The current item
</span><span class="cx"> */
</span><del>- function single_row_columns( $item ) {
</del><ins>+ protected function single_row_columns( $item ) {
</ins><span class="cx"> list( $columns, $hidden ) = $this->get_column_info();
</span><span class="cx">
</span><span class="cx"> foreach ( $columns as $column_name => $column_display_name ) {
</span><span class="lines">@@ -930,7 +953,7 @@
</span><span class="cx"> * @since 3.1.0
</span><span class="cx"> * @access public
</span><span class="cx"> */
</span><del>- function ajax_response() {
</del><ins>+ public function ajax_response() {
</ins><span class="cx"> $this->prepare_items();
</span><span class="cx">
</span><span class="cx"> ob_start();
</span><span class="lines">@@ -963,7 +986,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @access private
</span><span class="cx"> */
</span><del>- function _js_vars() {
</del><ins>+ private function _js_vars() {
</ins><span class="cx"> $args = array(
</span><span class="cx"> 'class' => get_class( $this ),
</span><span class="cx"> 'screen' => array(
</span></span></pre></div>
<a id="trunksrcwpadminincludesclasswpmedialisttablephp"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-admin/includes/class-wp-media-list-table.php (28492 => 28493)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-admin/includes/class-wp-media-list-table.php 2014-05-19 00:19:00 UTC (rev 28492)
+++ trunk/src/wp-admin/includes/class-wp-media-list-table.php 2014-05-19 01:16:16 UTC (rev 28493)
</span><span class="lines">@@ -9,7 +9,7 @@
</span><span class="cx"> */
</span><span class="cx"> class WP_Media_List_Table extends WP_List_Table {
</span><span class="cx">
</span><del>- function __construct( $args = array() ) {
</del><ins>+ public function __construct( $args = array() ) {
</ins><span class="cx"> $this->detached = isset( $_REQUEST['detached'] ) || isset( $_REQUEST['find_detached'] );
</span><span class="cx">
</span><span class="cx"> parent::__construct( array(
</span><span class="lines">@@ -18,11 +18,11 @@
</span><span class="cx"> ) );
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function ajax_user_can() {
</del><ins>+ public function ajax_user_can() {
</ins><span class="cx"> return current_user_can('upload_files');
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function prepare_items() {
</del><ins>+ public function prepare_items() {
</ins><span class="cx"> global $lost, $wp_query, $post_mime_types, $avail_post_mime_types;
</span><span class="cx">
</span><span class="cx"> $q = $_REQUEST;
</span><span class="lines">@@ -41,7 +41,7 @@
</span><span class="cx"> ) );
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function get_views() {
</del><ins>+ protected function get_views() {
</ins><span class="cx"> global $wpdb, $post_mime_types, $avail_post_mime_types;
</span><span class="cx">
</span><span class="cx"> $type_links = array();
</span><span class="lines">@@ -74,7 +74,7 @@
</span><span class="cx"> return $type_links;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function get_bulk_actions() {
</del><ins>+ protected function get_bulk_actions() {
</ins><span class="cx"> $actions = array();
</span><span class="cx"> $actions['delete'] = __( 'Delete Permanently' );
</span><span class="cx"> if ( $this->detached )
</span><span class="lines">@@ -83,7 +83,7 @@
</span><span class="cx"> return $actions;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function extra_tablenav( $which ) {
</del><ins>+ protected function extra_tablenav( $which ) {
</ins><span class="cx"> ?>
</span><span class="cx"> <div class="alignleft actions">
</span><span class="cx"> <?php
</span><span class="lines">@@ -104,7 +104,7 @@
</span><span class="cx"> <?php
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function current_action() {
</del><ins>+ public function current_action() {
</ins><span class="cx"> if ( isset( $_REQUEST['find_detached'] ) )
</span><span class="cx"> return 'find_detached';
</span><span class="cx">
</span><span class="lines">@@ -117,15 +117,15 @@
</span><span class="cx"> return parent::current_action();
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function has_items() {
</del><ins>+ public function has_items() {
</ins><span class="cx"> return have_posts();
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function no_items() {
</del><ins>+ public function no_items() {
</ins><span class="cx"> _e( 'No media attachments found.' );
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function get_columns() {
</del><ins>+ protected function get_columns() {
</ins><span class="cx"> $posts_columns = array();
</span><span class="cx"> $posts_columns['cb'] = '<input type="checkbox" />';
</span><span class="cx"> $posts_columns['icon'] = '';
</span><span class="lines">@@ -180,7 +180,7 @@
</span><span class="cx"> return $posts_columns;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function get_sortable_columns() {
</del><ins>+ protected function get_sortable_columns() {
</ins><span class="cx"> return array(
</span><span class="cx"> 'title' => 'title',
</span><span class="cx"> 'author' => 'author',
</span><span class="lines">@@ -190,7 +190,7 @@
</span><span class="cx"> );
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function display_rows() {
</del><ins>+ protected function display_rows() {
</ins><span class="cx"> global $post;
</span><span class="cx">
</span><span class="cx"> add_filter( 'the_title','esc_html' );
</span><span class="lines">@@ -421,7 +421,7 @@
</span><span class="cx"> <?php endwhile;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function _get_row_actions( $post, $att_title ) {
</del><ins>+ private function _get_row_actions( $post, $att_title ) {
</ins><span class="cx"> $actions = array();
</span><span class="cx">
</span><span class="cx"> if ( $this->detached ) {
</span></span></pre></div>
<a id="trunksrcwpadminincludesclasswpmssiteslisttablephp"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-admin/includes/class-wp-ms-sites-list-table.php (28492 => 28493)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-admin/includes/class-wp-ms-sites-list-table.php 2014-05-19 00:19:00 UTC (rev 28492)
+++ trunk/src/wp-admin/includes/class-wp-ms-sites-list-table.php 2014-05-19 01:16:16 UTC (rev 28493)
</span><span class="lines">@@ -9,18 +9,18 @@
</span><span class="cx"> */
</span><span class="cx"> class WP_MS_Sites_List_Table extends WP_List_Table {
</span><span class="cx">
</span><del>- function __construct( $args = array() ) {
</del><ins>+ public function __construct( $args = array() ) {
</ins><span class="cx"> parent::__construct( array(
</span><span class="cx"> 'plural' => 'sites',
</span><span class="cx"> 'screen' => isset( $args['screen'] ) ? $args['screen'] : null,
</span><span class="cx"> ) );
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function ajax_user_can() {
</del><ins>+ public function ajax_user_can() {
</ins><span class="cx"> return current_user_can( 'manage_sites' );
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function prepare_items() {
</del><ins>+ public function prepare_items() {
</ins><span class="cx"> global $s, $mode, $wpdb;
</span><span class="cx">
</span><span class="cx"> $current_site = get_current_site();
</span><span class="lines">@@ -120,11 +120,11 @@
</span><span class="cx"> ) );
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function no_items() {
</del><ins>+ public function no_items() {
</ins><span class="cx"> _e( 'No sites found.' );
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function get_bulk_actions() {
</del><ins>+ protected function get_bulk_actions() {
</ins><span class="cx"> $actions = array();
</span><span class="cx"> if ( current_user_can( 'delete_sites' ) )
</span><span class="cx"> $actions['delete'] = __( 'Delete' );
</span><span class="lines">@@ -134,7 +134,7 @@
</span><span class="cx"> return $actions;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function pagination( $which ) {
</del><ins>+ protected function pagination( $which ) {
</ins><span class="cx"> global $mode;
</span><span class="cx">
</span><span class="cx"> parent::pagination( $which );
</span><span class="lines">@@ -143,7 +143,7 @@
</span><span class="cx"> $this->view_switcher( $mode );
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function get_columns() {
</del><ins>+ protected function get_columns() {
</ins><span class="cx"> $blogname_columns = ( is_subdomain_install() ) ? __( 'Domain' ) : __( 'Path' );
</span><span class="cx"> $sites_columns = array(
</span><span class="cx"> 'cb' => '<input type="checkbox" />',
</span><span class="lines">@@ -169,7 +169,7 @@
</span><span class="cx"> return $sites_columns;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function get_sortable_columns() {
</del><ins>+ protected function get_sortable_columns() {
</ins><span class="cx"> return array(
</span><span class="cx"> 'blogname' => 'blogname',
</span><span class="cx"> 'lastupdated' => 'lastupdated',
</span><span class="lines">@@ -177,7 +177,7 @@
</span><span class="cx"> );
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function display_rows() {
</del><ins>+ protected function display_rows() {
</ins><span class="cx"> global $mode;
</span><span class="cx">
</span><span class="cx"> $status_list = array(
</span></span></pre></div>
<a id="trunksrcwpadminincludesclasswpmsthemeslisttablephp"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-admin/includes/class-wp-ms-themes-list-table.php (28492 => 28493)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-admin/includes/class-wp-ms-themes-list-table.php 2014-05-19 00:19:00 UTC (rev 28492)
+++ trunk/src/wp-admin/includes/class-wp-ms-themes-list-table.php 2014-05-19 01:16:16 UTC (rev 28493)
</span><span class="lines">@@ -9,10 +9,10 @@
</span><span class="cx"> */
</span><span class="cx"> class WP_MS_Themes_List_Table extends WP_List_Table {
</span><span class="cx">
</span><del>- var $site_id;
- var $is_site_themes;
</del><ins>+ public $site_id;
+ public $is_site_themes;
</ins><span class="cx">
</span><del>- function __construct( $args = array() ) {
</del><ins>+ public function __construct( $args = array() ) {
</ins><span class="cx"> global $status, $page;
</span><span class="cx">
</span><span class="cx"> parent::__construct( array(
</span><span class="lines">@@ -32,18 +32,18 @@
</span><span class="cx"> $this->site_id = isset( $_REQUEST['id'] ) ? intval( $_REQUEST['id'] ) : 0;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function get_table_classes() {
</del><ins>+ protected function get_table_classes() {
</ins><span class="cx"> return array( 'widefat', 'plugins' ); // todo: remove and add CSS for .themes
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function ajax_user_can() {
</del><ins>+ public function ajax_user_can() {
</ins><span class="cx"> if ( $this->is_site_themes )
</span><span class="cx"> return current_user_can( 'manage_sites' );
</span><span class="cx"> else
</span><span class="cx"> return current_user_can( 'manage_network_themes' );
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function prepare_items() {
</del><ins>+ public function prepare_items() {
</ins><span class="cx"> global $status, $totals, $page, $orderby, $order, $s;
</span><span class="cx">
</span><span class="cx"> wp_reset_vars( array( 'orderby', 'order', 's' ) );
</span><span class="lines">@@ -131,7 +131,7 @@
</span><span class="cx"> ) );
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function _search_callback( $theme ) {
</del><ins>+ public function _search_callback( $theme ) {
</ins><span class="cx"> static $term;
</span><span class="cx"> if ( is_null( $term ) )
</span><span class="cx"> $term = wp_unslash( $_REQUEST['s'] );
</span><span class="lines">@@ -152,7 +152,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Not used by any core columns.
</span><del>- function _order_callback( $theme_a, $theme_b ) {
</del><ins>+ public function _order_callback( $theme_a, $theme_b ) {
</ins><span class="cx"> global $orderby, $order;
</span><span class="cx">
</span><span class="cx"> $a = $theme_a[ $orderby ];
</span><span class="lines">@@ -167,14 +167,14 @@
</span><span class="cx"> return ( $a < $b ) ? -1 : 1;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function no_items() {
</del><ins>+ public function no_items() {
</ins><span class="cx"> if ( ! $this->has_items )
</span><span class="cx"> _e( 'No themes found.' );
</span><span class="cx"> else
</span><span class="cx"> _e( 'You do not appear to have any themes available at this time.' );
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function get_columns() {
</del><ins>+ protected function get_columns() {
</ins><span class="cx"> global $status;
</span><span class="cx">
</span><span class="cx"> return array(
</span><span class="lines">@@ -184,13 +184,13 @@
</span><span class="cx"> );
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function get_sortable_columns() {
</del><ins>+ protected function get_sortable_columns() {
</ins><span class="cx"> return array(
</span><span class="cx"> 'name' => 'name',
</span><span class="cx"> );
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function get_views() {
</del><ins>+ protected function get_views() {
</ins><span class="cx"> global $totals, $status;
</span><span class="cx">
</span><span class="cx"> $status_links = array();
</span><span class="lines">@@ -233,7 +233,7 @@
</span><span class="cx"> return $status_links;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function get_bulk_actions() {
</del><ins>+ protected function get_bulk_actions() {
</ins><span class="cx"> global $status;
</span><span class="cx">
</span><span class="cx"> $actions = array();
</span><span class="lines">@@ -250,12 +250,12 @@
</span><span class="cx"> return $actions;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function display_rows() {
</del><ins>+ protected function display_rows() {
</ins><span class="cx"> foreach ( $this->items as $theme )
</span><span class="cx"> $this->single_row( $theme );
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function single_row( $theme ) {
</del><ins>+ protected function single_row( $theme ) {
</ins><span class="cx"> global $status, $page, $s, $totals;
</span><span class="cx">
</span><span class="cx"> $context = $status;
</span></span></pre></div>
<a id="trunksrcwpadminincludesclasswpmsuserslisttablephp"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-admin/includes/class-wp-ms-users-list-table.php (28492 => 28493)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-admin/includes/class-wp-ms-users-list-table.php 2014-05-19 00:19:00 UTC (rev 28492)
+++ trunk/src/wp-admin/includes/class-wp-ms-users-list-table.php 2014-05-19 01:16:16 UTC (rev 28493)
</span><span class="lines">@@ -9,11 +9,11 @@
</span><span class="cx"> */
</span><span class="cx"> class WP_MS_Users_List_Table extends WP_List_Table {
</span><span class="cx">
</span><del>- function ajax_user_can() {
</del><ins>+ public function ajax_user_can() {
</ins><span class="cx"> return current_user_can( 'manage_network_users' );
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function prepare_items() {
</del><ins>+ public function prepare_items() {
</ins><span class="cx"> global $usersearch, $role, $wpdb, $mode;
</span><span class="cx">
</span><span class="cx"> $usersearch = isset( $_REQUEST['s'] ) ? wp_unslash( trim( $_REQUEST['s'] ) ) : '';
</span><span class="lines">@@ -69,7 +69,7 @@
</span><span class="cx"> ) );
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function get_bulk_actions() {
</del><ins>+ protected function get_bulk_actions() {
</ins><span class="cx"> $actions = array();
</span><span class="cx"> if ( current_user_can( 'delete_users' ) )
</span><span class="cx"> $actions['delete'] = __( 'Delete' );
</span><span class="lines">@@ -79,11 +79,11 @@
</span><span class="cx"> return $actions;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function no_items() {
</del><ins>+ public function no_items() {
</ins><span class="cx"> _e( 'No users found.' );
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function get_views() {
</del><ins>+ protected function get_views() {
</ins><span class="cx"> global $role;
</span><span class="cx">
</span><span class="cx"> $total_users = get_user_count();
</span><span class="lines">@@ -99,7 +99,7 @@
</span><span class="cx"> return $role_links;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function pagination( $which ) {
</del><ins>+ protected function pagination( $which ) {
</ins><span class="cx"> global $mode;
</span><span class="cx">
</span><span class="cx"> parent::pagination ( $which );
</span><span class="lines">@@ -108,7 +108,7 @@
</span><span class="cx"> $this->view_switcher( $mode );
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function get_columns() {
</del><ins>+ protected function get_columns() {
</ins><span class="cx"> $users_columns = array(
</span><span class="cx"> 'cb' => '<input type="checkbox" />',
</span><span class="cx"> 'username' => __( 'Username' ),
</span><span class="lines">@@ -130,7 +130,7 @@
</span><span class="cx"> return $users_columns;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function get_sortable_columns() {
</del><ins>+ protected function get_sortable_columns() {
</ins><span class="cx"> return array(
</span><span class="cx"> 'username' => 'login',
</span><span class="cx"> 'name' => 'name',
</span><span class="lines">@@ -139,7 +139,7 @@
</span><span class="cx"> );
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function display_rows() {
</del><ins>+ protected function display_rows() {
</ins><span class="cx"> global $mode;
</span><span class="cx">
</span><span class="cx"> $alt = '';
</span></span></pre></div>
<a id="trunksrcwpadminincludesclasswpplugininstalllisttablephp"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-admin/includes/class-wp-plugin-install-list-table.php (28492 => 28493)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-admin/includes/class-wp-plugin-install-list-table.php 2014-05-19 00:19:00 UTC (rev 28492)
+++ trunk/src/wp-admin/includes/class-wp-plugin-install-list-table.php 2014-05-19 01:16:16 UTC (rev 28493)
</span><span class="lines">@@ -9,11 +9,11 @@
</span><span class="cx"> */
</span><span class="cx"> class WP_Plugin_Install_List_Table extends WP_List_Table {
</span><span class="cx">
</span><del>- function ajax_user_can() {
</del><ins>+ public function ajax_user_can() {
</ins><span class="cx"> return current_user_can('install_plugins');
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function prepare_items() {
</del><ins>+ public function prepare_items() {
</ins><span class="cx"> include( ABSPATH . 'wp-admin/includes/plugin-install.php' );
</span><span class="cx">
</span><span class="cx"> global $tabs, $tab, $paged, $type, $term;
</span><span class="lines">@@ -133,11 +133,11 @@
</span><span class="cx"> ) );
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function no_items() {
</del><ins>+ public function no_items() {
</ins><span class="cx"> _e( 'No plugins match your request.' );
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function get_views() {
</del><ins>+ protected function get_views() {
</ins><span class="cx"> global $tabs, $tab;
</span><span class="cx">
</span><span class="cx"> $display_tabs = array();
</span><span class="lines">@@ -150,7 +150,7 @@
</span><span class="cx"> return $display_tabs;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function display_tablenav( $which ) {
</del><ins>+ protected function display_tablenav( $which ) {
</ins><span class="cx"> if ( 'top' == $which ) { ?>
</span><span class="cx"> <div class="tablenav top">
</span><span class="cx"> <div class="alignleft actions">
</span><span class="lines">@@ -174,11 +174,11 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function get_table_classes() {
</del><ins>+ protected function get_table_classes() {
</ins><span class="cx"> return array( 'widefat', $this->_args['plural'] );
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function get_columns() {
</del><ins>+ protected function get_columns() {
</ins><span class="cx"> return array(
</span><span class="cx"> 'name' => _x( 'Name', 'plugin name' ),
</span><span class="cx"> 'version' => __( 'Version' ),
</span><span class="lines">@@ -187,7 +187,7 @@
</span><span class="cx"> );
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function display_rows() {
</del><ins>+ protected function display_rows() {
</ins><span class="cx"> $plugins_allowedtags = array(
</span><span class="cx"> 'a' => array( 'href' => array(),'title' => array(), 'target' => array() ),
</span><span class="cx"> 'abbr' => array( 'title' => array() ),'acronym' => array( 'title' => array() ),
</span></span></pre></div>
<a id="trunksrcwpadminincludesclasswppluginslisttablephp"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-admin/includes/class-wp-plugins-list-table.php (28492 => 28493)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-admin/includes/class-wp-plugins-list-table.php 2014-05-19 00:19:00 UTC (rev 28492)
+++ trunk/src/wp-admin/includes/class-wp-plugins-list-table.php 2014-05-19 01:16:16 UTC (rev 28493)
</span><span class="lines">@@ -9,7 +9,7 @@
</span><span class="cx"> */
</span><span class="cx"> class WP_Plugins_List_Table extends WP_List_Table {
</span><span class="cx">
</span><del>- function __construct( $args = array() ) {
</del><ins>+ public function __construct( $args = array() ) {
</ins><span class="cx"> global $status, $page;
</span><span class="cx">
</span><span class="cx"> parent::__construct( array(
</span><span class="lines">@@ -27,15 +27,15 @@
</span><span class="cx"> $page = $this->get_pagenum();
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function get_table_classes() {
</del><ins>+ protected function get_table_classes() {
</ins><span class="cx"> return array( 'widefat', $this->_args['plural'] );
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function ajax_user_can() {
</del><ins>+ public function ajax_user_can() {
</ins><span class="cx"> return current_user_can('activate_plugins');
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function prepare_items() {
</del><ins>+ public function prepare_items() {
</ins><span class="cx"> global $status, $plugins, $totals, $page, $orderby, $order, $s;
</span><span class="cx">
</span><span class="cx"> wp_reset_vars( array( 'orderby', 'order', 's' ) );
</span><span class="lines">@@ -172,7 +172,7 @@
</span><span class="cx"> ) );
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function _search_callback( $plugin ) {
</del><ins>+ public function _search_callback( $plugin ) {
</ins><span class="cx"> static $term;
</span><span class="cx"> if ( is_null( $term ) )
</span><span class="cx"> $term = wp_unslash( $_REQUEST['s'] );
</span><span class="lines">@@ -186,7 +186,7 @@
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function _order_callback( $plugin_a, $plugin_b ) {
</del><ins>+ public function _order_callback( $plugin_a, $plugin_b ) {
</ins><span class="cx"> global $orderby, $order;
</span><span class="cx">
</span><span class="cx"> $a = $plugin_a[$orderby];
</span><span class="lines">@@ -201,7 +201,7 @@
</span><span class="cx"> return ( $a < $b ) ? -1 : 1;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function no_items() {
</del><ins>+ public function no_items() {
</ins><span class="cx"> global $plugins;
</span><span class="cx">
</span><span class="cx"> if ( !empty( $plugins['all'] ) )
</span><span class="lines">@@ -210,7 +210,7 @@
</span><span class="cx"> _e( 'You do not appear to have any plugins available at this time.' );
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function get_columns() {
</del><ins>+ protected function get_columns() {
</ins><span class="cx"> global $status;
</span><span class="cx">
</span><span class="cx"> return array(
</span><span class="lines">@@ -220,11 +220,11 @@
</span><span class="cx"> );
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function get_sortable_columns() {
</del><ins>+ protected function get_sortable_columns() {
</ins><span class="cx"> return array();
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function get_views() {
</del><ins>+ protected function get_views() {
</ins><span class="cx"> global $totals, $status;
</span><span class="cx">
</span><span class="cx"> $status_links = array();
</span><span class="lines">@@ -268,7 +268,7 @@
</span><span class="cx"> return $status_links;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function get_bulk_actions() {
</del><ins>+ protected function get_bulk_actions() {
</ins><span class="cx"> global $status;
</span><span class="cx">
</span><span class="cx"> $actions = array();
</span><span class="lines">@@ -289,7 +289,7 @@
</span><span class="cx"> return $actions;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function bulk_actions() {
</del><ins>+ public function bulk_actions() {
</ins><span class="cx"> global $status;
</span><span class="cx">
</span><span class="cx"> if ( in_array( $status, array( 'mustuse', 'dropins' ) ) )
</span><span class="lines">@@ -298,7 +298,7 @@
</span><span class="cx"> parent::bulk_actions();
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function extra_tablenav( $which ) {
</del><ins>+ protected function extra_tablenav( $which ) {
</ins><span class="cx"> global $status;
</span><span class="cx">
</span><span class="cx"> if ( ! in_array($status, array('recently_activated', 'mustuse', 'dropins') ) )
</span><span class="lines">@@ -316,14 +316,14 @@
</span><span class="cx"> echo '</div>';
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function current_action() {
</del><ins>+ public function current_action() {
</ins><span class="cx"> if ( isset($_POST['clear-recent-list']) )
</span><span class="cx"> return 'clear-recent-list';
</span><span class="cx">
</span><span class="cx"> return parent::current_action();
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function display_rows() {
</del><ins>+ protected function display_rows() {
</ins><span class="cx"> global $status;
</span><span class="cx">
</span><span class="cx"> if ( is_multisite() && ! $this->screen->in_admin( 'network' ) && in_array( $status, array( 'mustuse', 'dropins' ) ) )
</span><span class="lines">@@ -333,7 +333,7 @@
</span><span class="cx"> $this->single_row( array( $plugin_file, $plugin_data ) );
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function single_row( $item ) {
</del><ins>+ protected function single_row( $item ) {
</ins><span class="cx"> global $status, $page, $s, $totals;
</span><span class="cx">
</span><span class="cx"> list( $plugin_file, $plugin_data ) = $item;
</span></span></pre></div>
<a id="trunksrcwpadminincludesclasswppostslisttablephp"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-admin/includes/class-wp-posts-list-table.php (28492 => 28493)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-admin/includes/class-wp-posts-list-table.php 2014-05-19 00:19:00 UTC (rev 28492)
+++ trunk/src/wp-admin/includes/class-wp-posts-list-table.php 2014-05-19 01:16:16 UTC (rev 28493)
</span><span class="lines">@@ -16,7 +16,7 @@
</span><span class="cx"> * @var bool
</span><span class="cx"> * @access protected
</span><span class="cx"> */
</span><del>- var $hierarchical_display;
</del><ins>+ protected $hierarchical_display;
</ins><span class="cx">
</span><span class="cx"> /**
</span><span class="cx"> * Holds the number of pending comments for each post
</span><span class="lines">@@ -25,7 +25,7 @@
</span><span class="cx"> * @var int
</span><span class="cx"> * @access protected
</span><span class="cx"> */
</span><del>- var $comment_pending_count;
</del><ins>+ protected $comment_pending_count;
</ins><span class="cx">
</span><span class="cx"> /**
</span><span class="cx"> * Holds the number of posts for this user
</span><span class="lines">@@ -34,7 +34,7 @@
</span><span class="cx"> * @var int
</span><span class="cx"> * @access private
</span><span class="cx"> */
</span><del>- var $user_posts_count;
</del><ins>+ private $user_posts_count;
</ins><span class="cx">
</span><span class="cx"> /**
</span><span class="cx"> * Holds the number of posts which are sticky.
</span><span class="lines">@@ -43,9 +43,9 @@
</span><span class="cx"> * @var int
</span><span class="cx"> * @access private
</span><span class="cx"> */
</span><del>- var $sticky_posts_count = 0;
</del><ins>+ private $sticky_posts_count = 0;
</ins><span class="cx">
</span><del>- function __construct( $args = array() ) {
</del><ins>+ public function __construct( $args = array() ) {
</ins><span class="cx"> global $post_type_object, $wpdb;
</span><span class="cx">
</span><span class="cx"> parent::__construct( array(
</span><span class="lines">@@ -74,11 +74,11 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function ajax_user_can() {
</del><ins>+ public function ajax_user_can() {
</ins><span class="cx"> return current_user_can( get_post_type_object( $this->screen->post_type )->cap->edit_posts );
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function prepare_items() {
</del><ins>+ public function prepare_items() {
</ins><span class="cx"> global $avail_post_stati, $wp_query, $per_page, $mode;
</span><span class="cx">
</span><span class="cx"> $avail_post_stati = wp_edit_posts_query();
</span><span class="lines">@@ -109,18 +109,18 @@
</span><span class="cx"> ) );
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function has_items() {
</del><ins>+ public function has_items() {
</ins><span class="cx"> return have_posts();
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function no_items() {
</del><ins>+ public function no_items() {
</ins><span class="cx"> if ( isset( $_REQUEST['post_status'] ) && 'trash' == $_REQUEST['post_status'] )
</span><span class="cx"> echo get_post_type_object( $this->screen->post_type )->labels->not_found_in_trash;
</span><span class="cx"> else
</span><span class="cx"> echo get_post_type_object( $this->screen->post_type )->labels->not_found;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function get_views() {
</del><ins>+ protected function get_views() {
</ins><span class="cx"> global $locked_post_status, $avail_post_stati;
</span><span class="cx">
</span><span class="cx"> $post_type = $this->screen->post_type;
</span><span class="lines">@@ -181,7 +181,7 @@
</span><span class="cx"> return $status_links;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function get_bulk_actions() {
</del><ins>+ protected function get_bulk_actions() {
</ins><span class="cx"> $actions = array();
</span><span class="cx">
</span><span class="cx"> if ( $this->is_trash )
</span><span class="lines">@@ -197,7 +197,7 @@
</span><span class="cx"> return $actions;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function extra_tablenav( $which ) {
</del><ins>+ protected function extra_tablenav( $which ) {
</ins><span class="cx"> global $cat;
</span><span class="cx"> ?>
</span><span class="cx"> <div class="alignleft actions">
</span><span class="lines">@@ -239,14 +239,14 @@
</span><span class="cx"> <?php
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function current_action() {
</del><ins>+ public function current_action() {
</ins><span class="cx"> if ( isset( $_REQUEST['delete_all'] ) || isset( $_REQUEST['delete_all2'] ) )
</span><span class="cx"> return 'delete_all';
</span><span class="cx">
</span><span class="cx"> return parent::current_action();
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function pagination( $which ) {
</del><ins>+ protected function pagination( $which ) {
</ins><span class="cx"> global $mode;
</span><span class="cx">
</span><span class="cx"> parent::pagination( $which );
</span><span class="lines">@@ -255,11 +255,11 @@
</span><span class="cx"> $this->view_switcher( $mode );
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function get_table_classes() {
</del><ins>+ protected function get_table_classes() {
</ins><span class="cx"> return array( 'widefat', 'fixed', is_post_type_hierarchical( $this->screen->post_type ) ? 'pages' : 'posts' );
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function get_columns() {
</del><ins>+ protected function get_columns() {
</ins><span class="cx"> $post_type = $this->screen->post_type;
</span><span class="cx">
</span><span class="cx"> $posts_columns = array();
</span><span class="lines">@@ -345,7 +345,7 @@
</span><span class="cx"> return $posts_columns;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function get_sortable_columns() {
</del><ins>+ protected function get_sortable_columns() {
</ins><span class="cx"> return array(
</span><span class="cx"> 'title' => 'title',
</span><span class="cx"> 'parent' => 'parent',
</span><span class="lines">@@ -354,7 +354,7 @@
</span><span class="cx"> );
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function display_rows( $posts = array(), $level = 0 ) {
</del><ins>+ protected function display_rows( $posts = array(), $level = 0 ) {
</ins><span class="cx"> global $wp_query, $per_page;
</span><span class="cx">
</span><span class="cx"> if ( empty( $posts ) )
</span><span class="lines">@@ -369,7 +369,7 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function _display_rows( $posts, $level = 0 ) {
</del><ins>+ private function _display_rows( $posts, $level = 0 ) {
</ins><span class="cx"> global $mode;
</span><span class="cx">
</span><span class="cx"> // Create array of post IDs.
</span><span class="lines">@@ -384,7 +384,7 @@
</span><span class="cx"> $this->single_row( $post, $level );
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function _display_rows_hierarchical( $pages, $pagenum = 1, $per_page = 20 ) {
</del><ins>+ private function _display_rows_hierarchical( $pages, $pagenum = 1, $per_page = 20 ) {
</ins><span class="cx"> global $wpdb;
</span><span class="cx">
</span><span class="cx"> $level = 0;
</span><span class="lines">@@ -476,7 +476,7 @@
</span><span class="cx"> * @param int $pagenum
</span><span class="cx"> * @param int $per_page
</span><span class="cx"> */
</span><del>- function _page_rows( &$children_pages, &$count, $parent, $level, $pagenum, $per_page ) {
</del><ins>+ private function _page_rows( &$children_pages, &$count, $parent, $level, $pagenum, $per_page ) {
</ins><span class="cx">
</span><span class="cx"> if ( ! isset( $children_pages[$parent] ) )
</span><span class="cx"> return;
</span><span class="lines">@@ -521,7 +521,7 @@
</span><span class="cx"> unset( $children_pages[$parent] ); //required in order to keep track of orphans
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function single_row( $post, $level = 0 ) {
</del><ins>+ protected function single_row( $post, $level = 0 ) {
</ins><span class="cx"> global $mode;
</span><span class="cx"> static $alternate;
</span><span class="cx">
</span><span class="lines">@@ -879,7 +879,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @since 3.1.0
</span><span class="cx"> */
</span><del>- function inline_edit() {
</del><ins>+ public function inline_edit() {
</ins><span class="cx"> global $mode;
</span><span class="cx">
</span><span class="cx"> $screen = $this->screen;
</span></span></pre></div>
<a id="trunksrcwpadminincludesclasswptermslisttablephp"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-admin/includes/class-wp-terms-list-table.php (28492 => 28493)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-admin/includes/class-wp-terms-list-table.php 2014-05-19 00:19:00 UTC (rev 28492)
+++ trunk/src/wp-admin/includes/class-wp-terms-list-table.php 2014-05-19 01:16:16 UTC (rev 28493)
</span><span class="lines">@@ -9,9 +9,9 @@
</span><span class="cx"> */
</span><span class="cx"> class WP_Terms_List_Table extends WP_List_Table {
</span><span class="cx">
</span><del>- var $callback_args;
</del><ins>+ public $callback_args;
</ins><span class="cx">
</span><del>- function __construct( $args = array() ) {
</del><ins>+ public function __construct( $args = array() ) {
</ins><span class="cx"> global $post_type, $taxonomy, $action, $tax;
</span><span class="cx">
</span><span class="cx"> parent::__construct( array(
</span><span class="lines">@@ -38,11 +38,11 @@
</span><span class="cx">
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function ajax_user_can() {
</del><ins>+ public function ajax_user_can() {
</ins><span class="cx"> return current_user_can( get_taxonomy( $this->screen->taxonomy )->cap->manage_terms );
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function prepare_items() {
</del><ins>+ public function prepare_items() {
</ins><span class="cx"> $tags_per_page = $this->get_items_per_page( 'edit_' . $this->screen->taxonomy . '_per_page' );
</span><span class="cx">
</span><span class="cx"> if ( 'post_tag' == $this->screen->taxonomy ) {
</span><span class="lines">@@ -97,26 +97,26 @@
</span><span class="cx"> ) );
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function has_items() {
</del><ins>+ public function has_items() {
</ins><span class="cx"> // todo: populate $this->items in prepare_items()
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function get_bulk_actions() {
</del><ins>+ protected function get_bulk_actions() {
</ins><span class="cx"> $actions = array();
</span><span class="cx"> $actions['delete'] = __( 'Delete' );
</span><span class="cx">
</span><span class="cx"> return $actions;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function current_action() {
</del><ins>+ public function current_action() {
</ins><span class="cx"> if ( isset( $_REQUEST['action'] ) && isset( $_REQUEST['delete_tags'] ) && ( 'delete' == $_REQUEST['action'] || 'delete' == $_REQUEST['action2'] ) )
</span><span class="cx"> return 'bulk-delete';
</span><span class="cx">
</span><span class="cx"> return parent::current_action();
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function get_columns() {
</del><ins>+ protected function get_columns() {
</ins><span class="cx"> $columns = array(
</span><span class="cx"> 'cb' => '<input type="checkbox" />',
</span><span class="cx"> 'name' => _x( 'Name', 'term name' ),
</span><span class="lines">@@ -134,7 +134,7 @@
</span><span class="cx"> return $columns;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function get_sortable_columns() {
</del><ins>+ protected function get_sortable_columns() {
</ins><span class="cx"> return array(
</span><span class="cx"> 'name' => 'name',
</span><span class="cx"> 'description' => 'description',
</span><span class="lines">@@ -144,7 +144,7 @@
</span><span class="cx"> );
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function display_rows_or_placeholder() {
</del><ins>+ protected function display_rows_or_placeholder() {
</ins><span class="cx"> $taxonomy = $this->screen->taxonomy;
</span><span class="cx">
</span><span class="cx"> $args = wp_parse_args( $this->callback_args, array(
</span><span class="lines">@@ -193,7 +193,7 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function _rows( $taxonomy, $terms, &$children, $start, $per_page, &$count, $parent = 0, $level = 0 ) {
</del><ins>+ private function _rows( $taxonomy, $terms, &$children, $start, $per_page, &$count, $parent = 0, $level = 0 ) {
</ins><span class="cx">
</span><span class="cx"> $end = $start + $per_page;
</span><span class="cx">
</span><span class="lines">@@ -241,7 +241,7 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function single_row( $tag, $level = 0 ) {
</del><ins>+ protected function single_row( $tag, $level = 0 ) {
</ins><span class="cx"> global $taxonomy;
</span><span class="cx"> $tag = sanitize_term( $tag, $taxonomy );
</span><span class="cx">
</span><span class="lines">@@ -255,7 +255,7 @@
</span><span class="cx"> echo '</tr>';
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function column_cb( $tag ) {
</del><ins>+ public function column_cb( $tag ) {
</ins><span class="cx"> $default_term = get_option( 'default_' . $this->screen->taxonomy );
</span><span class="cx">
</span><span class="cx"> if ( current_user_can( get_taxonomy( $this->screen->taxonomy )->cap->delete_terms ) && $tag->term_id != $default_term )
</span><span class="lines">@@ -265,7 +265,7 @@
</span><span class="cx"> return ' ';
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function column_name( $tag ) {
</del><ins>+ public function column_name( $tag ) {
</ins><span class="cx"> $taxonomy = $this->screen->taxonomy;
</span><span class="cx"> $tax = get_taxonomy( $taxonomy );
</span><span class="cx">
</span><span class="lines">@@ -339,16 +339,16 @@
</span><span class="cx"> return $out;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function column_description( $tag ) {
</del><ins>+ public function column_description( $tag ) {
</ins><span class="cx"> return $tag->description;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function column_slug( $tag ) {
</del><ins>+ public function column_slug( $tag ) {
</ins><span class="cx"> /** This filter is documented in wp-admin/edit-tag-form.php */
</span><span class="cx"> return apply_filters( 'editable_slug', $tag->slug );
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function column_posts( $tag ) {
</del><ins>+ public function column_posts( $tag ) {
</ins><span class="cx"> $count = number_format_i18n( $tag->count );
</span><span class="cx">
</span><span class="cx"> $tax = get_taxonomy( $this->screen->taxonomy );
</span><span class="lines">@@ -372,14 +372,14 @@
</span><span class="cx"> return "<a href='" . esc_url ( add_query_arg( $args, 'edit.php' ) ) . "'>$count</a>";
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function column_links( $tag ) {
</del><ins>+ public function column_links( $tag ) {
</ins><span class="cx"> $count = number_format_i18n( $tag->count );
</span><span class="cx"> if ( $count )
</span><span class="cx"> $count = "<a href='link-manager.php?cat_id=$tag->term_id'>$count</a>";
</span><span class="cx"> return $count;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function column_default( $tag, $column_name ) {
</del><ins>+ public function column_default( $tag, $column_name ) {
</ins><span class="cx"> /**
</span><span class="cx"> * Filter the displayed columns in the terms list table.
</span><span class="cx"> *
</span><span class="lines">@@ -400,7 +400,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @since 3.1.0
</span><span class="cx"> */
</span><del>- function inline_edit() {
</del><ins>+ public function inline_edit() {
</ins><span class="cx"> $tax = get_taxonomy( $this->screen->taxonomy );
</span><span class="cx">
</span><span class="cx"> if ( ! current_user_can( $tax->cap->edit_terms ) )
</span></span></pre></div>
<a id="trunksrcwpadminincludesclasswpthemeinstalllisttablephp"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-admin/includes/class-wp-theme-install-list-table.php (28492 => 28493)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-admin/includes/class-wp-theme-install-list-table.php 2014-05-19 00:19:00 UTC (rev 28492)
+++ trunk/src/wp-admin/includes/class-wp-theme-install-list-table.php 2014-05-19 01:16:16 UTC (rev 28493)
</span><span class="lines">@@ -9,13 +9,13 @@
</span><span class="cx"> */
</span><span class="cx"> class WP_Theme_Install_List_Table extends WP_Themes_List_Table {
</span><span class="cx">
</span><del>- var $features = array();
</del><ins>+ public $features = array();
</ins><span class="cx">
</span><del>- function ajax_user_can() {
</del><ins>+ public function ajax_user_can() {
</ins><span class="cx"> return current_user_can( 'install_themes' );
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function prepare_items() {
</del><ins>+ public function prepare_items() {
</ins><span class="cx"> include( ABSPATH . 'wp-admin/includes/theme-install.php' );
</span><span class="cx">
</span><span class="cx"> global $tabs, $tab, $paged, $type, $theme_field_defaults;
</span><span class="lines">@@ -140,11 +140,11 @@
</span><span class="cx"> ) );
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function no_items() {
</del><ins>+ public function no_items() {
</ins><span class="cx"> _e( 'No themes match your request.' );
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function get_views() {
</del><ins>+ protected function get_views() {
</ins><span class="cx"> global $tabs, $tab;
</span><span class="cx">
</span><span class="cx"> $display_tabs = array();
</span><span class="lines">@@ -157,7 +157,7 @@
</span><span class="cx"> return $display_tabs;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function display() {
</del><ins>+ public function display() {
</ins><span class="cx"> wp_nonce_field( "fetch-list-" . get_class( $this ), '_ajax_fetch_list_nonce' );
</span><span class="cx"> ?>
</span><span class="cx"> <div class="tablenav top themes">
</span><span class="lines">@@ -183,7 +183,7 @@
</span><span class="cx"> parent::tablenav( 'bottom' );
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function display_rows() {
</del><ins>+ protected function display_rows() {
</ins><span class="cx"> $themes = $this->items;
</span><span class="cx"> foreach ( $themes as $theme ) {
</span><span class="cx"> ?>
</span><span class="lines">@@ -214,7 +214,7 @@
</span><span class="cx"> * 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>.'
</span><span class="cx"> * public 'download_link' => string 'http://wordpress.org/themes/download/magazine-basic.1.1.zip'
</span><span class="cx"> */
</span><del>- function single_row( $theme ) {
</del><ins>+ protected function single_row( $theme ) {
</ins><span class="cx"> global $themes_allowedtags;
</span><span class="cx">
</span><span class="cx"> if ( empty( $theme ) )
</span><span class="lines">@@ -294,7 +294,7 @@
</span><span class="cx"> /**
</span><span class="cx"> * Prints the wrapper for the theme installer.
</span><span class="cx"> */
</span><del>- function theme_installer() {
</del><ins>+ public function theme_installer() {
</ins><span class="cx"> ?>
</span><span class="cx"> <div id="theme-installer" class="wp-full-overlay expanded">
</span><span class="cx"> <div class="wp-full-overlay-sidebar">
</span><span class="lines">@@ -323,7 +323,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @param object $theme - A WordPress.org Theme API object.
</span><span class="cx"> */
</span><del>- function theme_installer_single( $theme ) {
</del><ins>+ public function theme_installer_single( $theme ) {
</ins><span class="cx"> ?>
</span><span class="cx"> <div id="theme-installer" class="wp-full-overlay single-theme">
</span><span class="cx"> <div class="wp-full-overlay-sidebar">
</span><span class="lines">@@ -341,7 +341,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @param object $theme - A WordPress.org Theme API object.
</span><span class="cx"> */
</span><del>- function install_theme_info( $theme ) {
</del><ins>+ public function install_theme_info( $theme ) {
</ins><span class="cx"> global $themes_allowedtags;
</span><span class="cx">
</span><span class="cx"> if ( empty( $theme ) )
</span><span class="lines">@@ -408,7 +408,7 @@
</span><span class="cx"> * @uses $tab Global; current tab within Themes->Install screen
</span><span class="cx"> * @uses $type Global; type of search.
</span><span class="cx"> */
</span><del>- function _js_vars( $extra_args = array() ) {
</del><ins>+ private function _js_vars( $extra_args = array() ) {
</ins><span class="cx"> global $tab, $type;
</span><span class="cx"> parent::_js_vars( compact( 'tab', 'type' ) );
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunksrcwpadminincludesclasswpthemeslisttablephp"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-admin/includes/class-wp-themes-list-table.php (28492 => 28493)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-admin/includes/class-wp-themes-list-table.php 2014-05-19 00:19:00 UTC (rev 28492)
+++ trunk/src/wp-admin/includes/class-wp-themes-list-table.php 2014-05-19 01:16:16 UTC (rev 28493)
</span><span class="lines">@@ -10,21 +10,21 @@
</span><span class="cx"> class WP_Themes_List_Table extends WP_List_Table {
</span><span class="cx">
</span><span class="cx"> protected $search_terms = array();
</span><del>- var $features = array();
</del><ins>+ public $features = array();
</ins><span class="cx">
</span><del>- function __construct( $args = array() ) {
</del><ins>+ public function __construct( $args = array() ) {
</ins><span class="cx"> parent::__construct( array(
</span><span class="cx"> 'ajax' => true,
</span><span class="cx"> 'screen' => isset( $args['screen'] ) ? $args['screen'] : null,
</span><span class="cx"> ) );
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function ajax_user_can() {
</del><ins>+ public function ajax_user_can() {
</ins><span class="cx"> // Do not check edit_theme_options here. AJAX calls for available themes require switch_themes.
</span><span class="cx"> return current_user_can( 'switch_themes' );
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function prepare_items() {
</del><ins>+ public function prepare_items() {
</ins><span class="cx"> $themes = wp_get_themes( array( 'allowed' => true ) );
</span><span class="cx">
</span><span class="cx"> if ( ! empty( $_REQUEST['s'] ) )
</span><span class="lines">@@ -57,7 +57,7 @@
</span><span class="cx"> ) );
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function no_items() {
</del><ins>+ public function no_items() {
</ins><span class="cx"> if ( $this->search_terms || $this->features ) {
</span><span class="cx"> _e( 'No items found.' );
</span><span class="cx"> return;
</span><span class="lines">@@ -85,7 +85,7 @@
</span><span class="cx"> printf( __( 'Only the current theme is available to you. Contact the %s administrator for information about accessing additional themes.' ), get_site_option( 'site_name' ) );
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function tablenav( $which = 'top' ) {
</del><ins>+ public function tablenav( $which = 'top' ) {
</ins><span class="cx"> if ( $this->get_pagination_arg( 'total_pages' ) <= 1 )
</span><span class="cx"> return;
</span><span class="cx"> ?>
</span><span class="lines">@@ -97,7 +97,7 @@
</span><span class="cx"> <?php
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function display() {
</del><ins>+ public function display() {
</ins><span class="cx"> wp_nonce_field( "fetch-list-" . get_class( $this ), '_ajax_fetch_list_nonce' );
</span><span class="cx"> ?>
</span><span class="cx"> <?php $this->tablenav( 'top' ); ?>
</span><span class="lines">@@ -110,11 +110,11 @@
</span><span class="cx"> <?php
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function get_columns() {
</del><ins>+ protected function get_columns() {
</ins><span class="cx"> return array();
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function display_rows_or_placeholder() {
</del><ins>+ protected function display_rows_or_placeholder() {
</ins><span class="cx"> if ( $this->has_items() ) {
</span><span class="cx"> $this->display_rows();
</span><span class="cx"> } else {
</span><span class="lines">@@ -124,7 +124,7 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function display_rows() {
</del><ins>+ protected function display_rows() {
</ins><span class="cx"> $themes = $this->items;
</span><span class="cx">
</span><span class="cx"> foreach ( $themes as $theme ):
</span><span class="lines">@@ -208,7 +208,7 @@
</span><span class="cx"> endforeach;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function search_theme( $theme ) {
</del><ins>+ public function search_theme( $theme ) {
</ins><span class="cx"> // Search the features
</span><span class="cx"> foreach ( $this->features as $word ) {
</span><span class="cx"> if ( ! in_array( $word, $theme->get('Tags') ) )
</span><span class="lines">@@ -249,7 +249,7 @@
</span><span class="cx"> * @uses get_pagenum()
</span><span class="cx"> * @uses _pagination_args['total_pages']
</span><span class="cx"> */
</span><del>- function _js_vars( $extra_args = array() ) {
</del><ins>+ private function _js_vars( $extra_args = array() ) {
</ins><span class="cx"> $search_string = isset( $_REQUEST['s'] ) ? esc_attr( wp_unslash( $_REQUEST['s'] ) ) : '';
</span><span class="cx">
</span><span class="cx"> $args = array(
</span></span></pre></div>
<a id="trunktestsphpunitincludesfunctionsphp"></a>
<div class="modfile"><h4>Modified: trunk/tests/phpunit/includes/functions.php (28492 => 28493)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/phpunit/includes/functions.php 2014-05-19 00:19:00 UTC (rev 28492)
+++ trunk/tests/phpunit/includes/functions.php 2014-05-19 01:16:16 UTC (rev 28493)
</span><span class="lines">@@ -45,7 +45,17 @@
</span><span class="cx"> class Basic_Object {
</span><span class="cx"> private $foo = 'bar';
</span><span class="cx">
</span><del>- function __get( $name ) {
</del><ins>+ public function __get( $name ) {
</ins><span class="cx"> return $this->$name;
</span><span class="cx"> }
</span><ins>+
+ public function __call( $name, $arguments ) {
+ return call_user_func_array( array( $this, $name ), $arguments );
+ }
+
+ private function callMe() {
+ return 'maybe';
+ }
</ins><span class="cx"> }
</span><ins>+
+class Basic_Subclass extends Basic_Object {}
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunktestsphpunittestsbasicphp"></a>
<div class="modfile"><h4>Modified: trunk/tests/phpunit/tests/basic.php (28492 => 28493)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/phpunit/tests/basic.php 2014-05-19 00:19:00 UTC (rev 28492)
+++ trunk/tests/phpunit/tests/basic.php 2014-05-19 01:16:16 UTC (rev 28493)
</span><span class="lines">@@ -127,4 +127,22 @@
</span><span class="cx">
</span><span class="cx"> $this->assertEquals( 'bar', $basic->foo );
</span><span class="cx"> }
</span><ins>+
+ function test_subclass_magic_getter() {
+ $basic = new Basic_Subclass();
+
+ $this->assertEquals( 'bar', $basic->foo );
+ }
+
+ function test_call_method() {
+ $basic = new Basic_Object();
+
+ $this->assertEquals( 'maybe', $basic->callMe() );
+ }
+
+ function test_subclass_call_method() {
+ $basic = new Basic_Subclass();
+
+ $this->assertEquals( 'maybe', $basic->callMe() );
+ }
</ins><span class="cx"> }
</span></span></pre>
</div>
</div>
</body>
</html>