Changeset 31146
- Timestamp:
- 01/11/2015 10:19:58 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-list-table.php
r31127 r31146 80 80 */ 81 81 protected $_column_headers; 82 83 protected $compat_fields = array( '_args', '_pagination_args', 'screen', '_actions', '_pagination' ); 84 85 protected $compat_methods = array( 'set_pagination_args', 'get_views', 'get_bulk_actions', 'bulk_actions', 86 'row_actions', 'months_dropdown', 'view_switcher', 'comments_bubble', 'get_items_per_page', 'pagination', 87 'get_sortable_columns', 'get_column_info', 'get_table_classes', 'display_tablenav', 'extra_tablenav', 88 'single_row_columns' ); 82 89 83 90 /** … … 150 157 */ 151 158 public function __get( $name ) { 152 return $this->$name; 159 if ( in_array( $name, $this->compat_fields ) ) { 160 return $this->$name; 161 } 153 162 } 154 163 … … 159 168 * @access public 160 169 * 161 * @param string $name Property to set.170 * @param string $name Property to check if set. 162 171 * @param mixed $value Property value. 163 172 * @return mixed Newly-set property. 164 173 */ 165 174 public function __set( $name, $value ) { 166 return $this->$name = $value; 175 if ( in_array( $name, $this->compat_fields ) ) { 176 return $this->$name = $value; 177 } 167 178 } 168 179 … … 177 188 */ 178 189 public function __isset( $name ) { 179 return isset( $this->$name ); 190 if ( in_array( $name, $this->compat_fields ) ) { 191 return isset( $this->$name ); 192 } 180 193 } 181 194 … … 189 202 */ 190 203 public function __unset( $name ) { 191 unset( $this->$name ); 204 if ( in_array( $name, $this->compat_fields ) ) { 205 unset( $this->$name ); 206 } 192 207 } 193 208 … … 203 218 */ 204 219 public function __call( $name, $arguments ) { 205 return call_user_func_array( array( $this, $name ), $arguments ); 220 if ( in_array( $name, $this->compat_methods ) ) { 221 return call_user_func_array( array( $this, $name ), $arguments ); 222 } 223 return false; 206 224 } 207 225
Note: See TracChangeset
for help on using the changeset viewer.