Changeset 18857
- Timestamp:
- 10/01/2011 05:59:46 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/screen.php
r18854 r18857 401 401 * @since 3.3.0 402 402 * @var string 403 * @access p rivate403 * @access public 404 404 */ 405 405 public $action = ''; … … 411 411 * @since 3.3.0 412 412 * @var string 413 * @access p rivate413 * @access public 414 414 */ 415 415 public $base; … … 420 420 * @since 3.3.0 421 421 * @var string 422 * @access p rivate422 * @access public 423 423 */ 424 424 public $id; … … 429 429 * @since 3.3.0 430 430 * @var bool 431 * @access p rivate431 * @access public 432 432 */ 433 433 public $is_network; … … 438 438 * @since 3.3.0 439 439 * @var bool 440 * @access p rivate440 * @access public 441 441 */ 442 442 public $is_user; … … 449 449 * @since 3.3.0 450 450 * @var string 451 * @access p rivate451 * @access public 452 452 */ 453 453 public $parent_base; … … 459 459 * @since 3.3.0 460 460 * @var string 461 * @access p rivate461 * @access public 462 462 */ 463 463 public $parent_file; … … 469 469 * @since 3.3.0 470 470 * @var string 471 * @access p rivate471 * @access public 472 472 */ 473 473 public $post_type; … … 478 478 * @since 3.3.0 479 479 * @var string 480 * @access p rivate480 * @access public 481 481 */ 482 482 public $taxonomy; … … 489 489 * @access private 490 490 */ 491 p ublic $help_tabs = array();491 private $_help_tabs = array(); 492 492 493 493 /** … … 498 498 * @access private 499 499 */ 500 p ublic $help_sidebar = '';500 private $_help_sidebar = ''; 501 501 502 502 /** … … 507 507 * @access private 508 508 */ 509 p ublic $options = array();509 private $_options = array(); 510 510 511 511 … … 622 622 */ 623 623 public function add_option( $option, $args = array() ) { 624 $this-> options[ $option ] = $args;624 $this->_options[ $option ] = $args; 625 625 } 626 626 … … 655 655 $args['id'] = sanitize_html_class( $args['title'] ); 656 656 657 $this-> help_tabs[] = $args;657 $this->_help_tabs[] = $args; 658 658 } 659 659 … … 667 667 */ 668 668 public function add_help_sidebar( $content ) { 669 $this-> help_sidebar = $content;669 $this->_help_sidebar = $content; 670 670 } 671 671 … … 708 708 <div id="contextual-help-wrap" class="hidden"> 709 709 <ul class="contextual-help-tabs"> 710 <?php foreach ( $this-> help_tabs as $i => $tab ):710 <?php foreach ( $this->_help_tabs as $i => $tab ): 711 711 $link_id = "tab-link-{$tab['id']}"; 712 712 $panel_id = "tab-panel-{$tab['id']}"; … … 723 723 724 724 <div class="contextual-help-sidebar"> 725 <?php echo $this-> help_sidebar; ?>725 <?php echo $this->_help_sidebar; ?> 726 726 </div> 727 727 728 728 <div class="contextual-help-tabs-wrap"> 729 <?php foreach ( $this-> help_tabs as $i => $tab ):729 <?php foreach ( $this->_help_tabs as $i => $tab ): 730 730 $panel_id = "tab-panel-{$tab['id']}"; 731 731 $classes = ( $i == 0 ) ? 'active' : ''; … … 764 764 765 765 // Check if there are per-page options. 766 $show_screen = $show_screen || isset( $this-> options['per_page'] );766 $show_screen = $show_screen || isset( $this->_options['per_page'] ); 767 767 768 768 $this->_screen_settings = apply_filters( 'screen_settings', '', $this ); … … 778 778 $show_screen = true; 779 779 780 if ( ! empty( $this-> options ) )780 if ( ! empty( $this->_options ) ) 781 781 $show_screen = true; 782 782 … … 849 849 add_screen_option( 'layout_columns', array('max' => $columns[ $this->id ] ) ); 850 850 851 if ( ! isset( $this-> options['layout_columns'] ) ) {851 if ( ! isset( $this->_options['layout_columns'] ) ) { 852 852 $screen_layout_columns = 0; 853 853 return; … … 855 855 856 856 $screen_layout_columns = get_user_option("screen_layout_$this->id"); 857 $num = $this-> options['layout_columns']['max'];857 $num = $this->_options['layout_columns']['max']; 858 858 859 859 if ( ! $screen_layout_columns ) { 860 if ( isset( $this-> options['layout_columns']['default'] ) )861 $screen_layout_columns = $this-> options['layout_columns']['default'];860 if ( isset( $this->_options['layout_columns']['default'] ) ) 861 $screen_layout_columns = $this->_options['layout_columns']['default']; 862 862 else 863 863 $screen_layout_columns = 'auto'; … … 887 887 888 888 function render_per_page_options() { 889 if ( ! isset( $this-> options['per_page'] ) )889 if ( ! isset( $this->_options['per_page'] ) ) 890 890 return; 891 891 892 $per_page_label = $this-> options['per_page']['label'];893 894 if ( empty( $this-> options['per_page']['option'] ) ) {892 $per_page_label = $this->_options['per_page']['label']; 893 894 if ( empty( $this->_options['per_page']['option'] ) ) { 895 895 $option = str_replace( '-', '_', "{$this->id}_per_page" ); 896 896 } else { 897 $option = $this-> options['per_page']['option'];897 $option = $this->_options['per_page']['option']; 898 898 } 899 899 900 900 $per_page = (int) get_user_option( $option ); 901 901 if ( empty( $per_page ) || $per_page < 1 ) { 902 if ( isset($this-> options['per_page']['default']) )903 $per_page = $this-> options['per_page']['default'];902 if ( isset($this->_options['per_page']['default']) ) 903 $per_page = $this->_options['per_page']['default']; 904 904 else 905 905 $per_page = 20;
Note: See TracChangeset
for help on using the changeset viewer.