Changeset 5833
- Timestamp:
- 07/15/2015 01:59:26 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/admin/actions.php
r5770 r5833 90 90 add_filter( 'dashboard_glance_items', 'bbp_filter_dashboard_glance_items', -99 ); 91 91 92 // Maybe use icons for column headers 93 add_filter( 'bbp_admin_forums_column_headers', 'bbp_filter_column_headers' ); 94 add_filter( 'bbp_admin_topics_column_headers', 'bbp_filter_column_headers' ); 95 add_filter( 'bbp_admin_replies_column_headers', 'bbp_filter_column_headers' ); 96 92 97 /** 93 98 * When a new site is created in a multisite installation, run the activation … … 120 125 } 121 126 127 /** 128 * Show icons in list-table column headers instead of strings 129 * 130 * @since bbPress (r5833) 131 * 132 * @param array $columns Column headers fed into list-table objects 133 * 134 * @return array Possibly altered column headers 135 */ 136 function bbp_filter_column_headers( $columns = array() ) { 137 138 // Do not filter column headers by default - maybe we'll turn it on later 139 if ( ! apply_filters( 'bbp_filter_column_headers', false ) ) { 140 return $columns; 141 } 142 143 /** Forums ****************************************************************/ 144 145 // Forum topic count 146 if ( isset( $columns[ 'bbp_forum_topic_count' ] ) ) { 147 $columns[ 'bbp_forum_topic_count' ] = '<span class="vers bbp_topics_column" title="' . esc_attr__( 'Topics', 'bbpress' ) . '"><span class="screen-reader-text">' . esc_html__( 'Topics', 'bbpress' ) . '</span></span>'; 148 } 149 150 // Forum reply count 151 if ( isset( $columns[ 'bbp_forum_reply_count' ] ) ) { 152 $columns[ 'bbp_forum_reply_count' ] = '<span class="vers bbp_replies_column" title="' . esc_attr__( 'Replies', 'bbpress' ) . '"><span class="screen-reader-text">' . esc_html__( 'Replies', 'bbpress' ) . '</span></span>'; 153 } 154 155 /** Topics ****************************************************************/ 156 157 // Topic forum 158 if ( isset( $columns[ 'bbp_topic_forum' ] ) ) { 159 $columns[ 'bbp_topic_forum' ] = '<span class="vers bbp_forums_column" title="' . esc_attr__( 'Forum', 'bbpress' ) . '"><span class="screen-reader-text">' . esc_html__( 'Forum', 'bbpress' ) . '</span></span>'; 160 } 161 162 // Topic reply count 163 if ( isset( $columns[ 'bbp_topic_reply_count' ] ) ) { 164 $columns[ 'bbp_topic_reply_count' ] = '<span class="vers bbp_replies_column" title="' . esc_attr__( 'Replies', 'bbpress' ) . '"><span class="screen-reader-text">' . esc_html__( 'Replies', 'bbpress' ) . '</span></span>'; 165 } 166 167 /** Replies ***************************************************************/ 168 169 // Reply forum 170 if ( isset( $columns[ 'bbp_reply_forum' ] ) ) { 171 $columns[ 'bbp_reply_forum' ] = '<span class="vers bbp_forums_column" title="' . esc_attr__( 'Forum', 'bbpress' ) . '"><span class="screen-reader-text">' . esc_html__( 'Forum', 'bbpress' ) . '</span></span>'; 172 } 173 174 // Reply topic 175 if ( isset( $columns[ 'bbp_reply_topic' ] ) ) { 176 $columns[ 'bbp_reply_topic' ] = '<span class="vers bbp_topics_column" title="' . esc_attr__( 'Topic', 'bbpress' ) . '"><span class="screen-reader-text">' . esc_html__( 'Topic', 'bbpress' ) . '</span></span>'; 177 } 178 179 return $columns; 180 } 181 122 182 /** Sub-Actions ***************************************************************/ 123 183
Note: See TracChangeset
for help on using the changeset viewer.