Changeset 27256
- Timestamp:
- 02/25/2014 10:04:46 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/screen.php
r26518 r27256 21 21 static $column_headers = array(); 22 22 23 if ( ! isset( $column_headers[ $screen->id ] ) ) 23 if ( ! isset( $column_headers[ $screen->id ] ) ) { 24 25 /** 26 * Filter the column headers for a list table on a specific screen. 27 * 28 * The dynamic portion of the hook name, $screen->id, refers to the 29 * ID of a specific screen. For example, the screen ID for the Posts 30 * list table is edit-post, so the filter for that screen would be 31 * manage_edit-post_columns. 32 * 33 * @since 3.0.0 34 * 35 * @param array $columns An array of column headers. Default empty. 36 */ 24 37 $column_headers[ $screen->id ] = apply_filters( 'manage_' . $screen->id . '_columns', array() ); 38 } 25 39 26 40 return $column_headers[ $screen->id ]; … … 102 116 $hidden = array( 'slugdiv' ); 103 117 } 118 119 /** 120 * Filter the default list of hidden meta boxes. 121 * 122 * @since 3.1.0 123 * 124 * @param array $hidden An array of meta boxes hidden by default. 125 * @param WP_Screen $screen WP_Screen object of the current screen. 126 */ 104 127 $hidden = apply_filters( 'default_hidden_meta_boxes', $hidden, $screen ); 105 128 } 106 129 130 /** 131 * Filter the list of hidden meta boxes. 132 * 133 * @since 3.3.0 134 * 135 * @param array $hidden An array of hidden meta boxes. 136 * @param WP_Screen $screen WP_Screen object of the current screen. 137 * @param bool $use_defaults Whether to show the default meta boxes. 138 * Default true. 139 */ 107 140 return apply_filters( 'hidden_meta_boxes', $hidden, $screen, $use_defaults ); 108 141 } … … 503 536 $taxnow = $this->taxonomy; 504 537 $typenow = $this->post_type; 538 539 /** 540 * Fires after the current screen has been set. 541 * 542 * @since 3.0.0 543 * 544 * @param WP_Screen $current_screen Current WP_Screen object. 545 */ 505 546 do_action( 'current_screen', $current_screen ); 506 547 } … … 748 789 public function render_screen_meta() { 749 790 750 // Call old contextual_help_list filter. 791 /** 792 * Filter the legacy contextual help list. 793 * 794 * @since 2.7.0 795 * @deprecated 3.3.0 Use get_current_screen()->add_help_tab() or 796 * get_current_screen()->remove_help_tab() instead. 797 * 798 * @param array $old_compat_help Old contextual help. 799 * @param WP_Screen $this Current WP_Screen instance. 800 */ 751 801 self::$_old_compat_help = apply_filters( 'contextual_help_list', self::$_old_compat_help, $this ); 752 802 753 803 $old_help = isset( self::$_old_compat_help[ $this->id ] ) ? self::$_old_compat_help[ $this->id ] : ''; 804 805 /** 806 * Filter the legacy contextual help text. 807 * 808 * @since 2.7.0 809 * @deprecated 3.3.0 Use get_current_screen()->add_help_tab() or 810 * get_current_screen()->remove_help_tab() instead. 811 * 812 * @param string $old_help Help text that appears on the screen. 813 * @param string $screen_id Screen ID. 814 * @param WP_Screen $this Current WP_Screen instance. 815 * 816 */ 754 817 $old_help = apply_filters( 'contextual_help', $old_help, $this->id, $this ); 755 818 756 819 // Default help only if there is no old-style block of text and no new-style help tabs. 757 820 if ( empty( $old_help ) && ! $this->get_help_tabs() ) { 821 822 /** 823 * Filter the default legacy contextual help text. 824 * 825 * @since 2.8.0 826 * @deprecated 3.3.0 Use get_current_screen()->add_help_tab() or 827 * get_current_screen()->remove_help_tab() instead. 828 * 829 * @param string $old_help_default Default contextual help text. 830 */ 758 831 $default_help = apply_filters( 'default_contextual_help', '' ); 759 832 if ( $default_help ) … … 836 909 // Setup layout columns 837 910 838 // Back compat for plugins using the filter instead of add_screen_option() 911 /** 912 * Filter the array of screen layout columns. 913 * 914 * This hook provides back-compat for plugins using the back-compat 915 * filter instead of add_screen_option(). 916 * 917 * @since 2.8.0 918 * 919 * @param array $empty_columns Empty array. 920 * @param string $screen_id Screen ID. 921 * @param WP_Screen $this Current WP_Screen instance. 922 */ 839 923 $columns = apply_filters( 'screen_layout_columns', array(), $this->id, $this ); 840 924 … … 893 977 } 894 978 979 /** 980 * Filter the screen settings text displayed in the Screen Options tab. 981 * 982 * This filter is currently only used on the Widgets screen to enable 983 * accessibility mode. 984 * 985 * @since 3.0.0 986 * 987 * @param string $screen_settings Screen settings. 988 * @param WP_Screen $this WP_Screen object. 989 */ 895 990 $this->_screen_settings = apply_filters( 'screen_settings', $this->_screen_settings, $this ); 896 991 … … 898 993 $show_screen = true; 899 994 995 /** 996 * Filter whether to show the Screen Options tab. 997 * 998 * @since 3.2.0 999 * 1000 * @param bool $show_screen Whether to show Screen Options tab. 1001 * Default true. 1002 * @param WP_Screen $this Current WP_Screen instance. 1003 */ 900 1004 $this->_show_screen_options = apply_filters( 'screen_options_show_screen', $show_screen, $this ); 901 1005 return $this->_show_screen_options; … … 1035 1139 if ( 'edit_comments_per_page' == $option ) { 1036 1140 $comment_status = isset( $_REQUEST['comment_status'] ) ? $_REQUEST['comment_status'] : 'all'; 1141 1142 /** This filter is documented in wp-admin/includes/class-wp-comments-list-table.php */ 1037 1143 $per_page = apply_filters( 'comments_per_page', $per_page, $comment_status ); 1038 1144 } elseif ( 'categories_per_page' == $option ) { 1145 /** This filter is documented in wp-admin/includes/class-wp-terms-list-table.php */ 1039 1146 $per_page = apply_filters( 'edit_categories_per_page', $per_page ); 1040 1147 } else { 1148 /** This filter is documented in wp-admin/includes/class-wp-list-table.php */ 1041 1149 $per_page = apply_filters( $option, $per_page ); 1042 1150 } 1043 1151 1044 1152 // Back compat 1045 if ( isset( $this->post_type ) ) 1153 if ( isset( $this->post_type ) ) { 1154 /** This filter is documented in wp-admin/includes/class-wp-posts-list-table.php */ 1046 1155 $per_page = apply_filters( 'edit_posts_per_page', $per_page, $this->post_type ); 1156 } 1047 1157 1048 1158 ?>
Note: See TracChangeset
for help on using the changeset viewer.