Changeset 12588 for trunk/src/bp-core/admin/bp-core-admin-components.php
- Timestamp:
- 03/28/2020 01:35:36 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/admin/bp-core-admin-components.php
r11914 r12588 143 143 $current_components = $retired_components; 144 144 break; 145 } ?> 145 } 146 147 $component_views = array( 148 array( 149 'action' => 'all', 150 'view' => sprintf( 151 /* translators: %s: the number of installed components */ 152 _nx( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $all_count, 'plugins', 'buddypress' ), 153 number_format_i18n( $all_count ) 154 ), 155 ), 156 array( 157 'action' => 'active', 158 'view' => sprintf( 159 /* translators: %s: the number of active components */ 160 _n( 'Active <span class="count">(%s)</span>', 'Active <span class="count">(%s)</span>', count( $active_components ), 'buddypress' ), 161 number_format_i18n( count( $active_components ) ) 162 ), 163 ), 164 array( 165 'action' => 'inactive', 166 'view' => sprintf( 167 /* translators: %s: the number of inactive components */ 168 _n( 'Inactive <span class="count">(%s)</span>', 'Inactive <span class="count">(%s)</span>', count( $inactive_components ), 'buddypress' ), 169 number_format_i18n( count( $inactive_components ) ) 170 ), 171 ), 172 array( 173 'action' => 'mustuse', 174 'view' => sprintf( 175 /* translators: %s: the number of must-Use components */ 176 _n( 'Must-Use <span class="count">(%s)</span>', 'Must-Use <span class="count">(%s)</span>', count( $required_components ), 'buddypress' ), 177 number_format_i18n( count( $required_components ) ) 178 ), 179 ), 180 array( 181 'action' => 'retired', 182 'view' => sprintf( 183 /* translators: %s: the number of retired components */ 184 _n( 'Retired <span class="count">(%s)</span>', 'Retired <span class="count">(%s)</span>', count( $retired_components ), 'buddypress' ), 185 number_format_i18n( count( $retired_components ) ) 186 ), 187 ), 188 ); 189 ?> 146 190 147 191 <h3 class="screen-reader-text"><?php 148 192 /* translators: accessibility text */ 149 _e( 'Filter components list', 'buddypress' );193 esc_html_e( 'Filter components list', 'buddypress' ); 150 194 ?></h3> 151 195 152 196 <ul class="subsubsub"> 153 <li><a href="<?php echo esc_url( add_query_arg( array( 'page' => 'bp-components', 'action' => 'all' ), bp_get_admin_url( $page ) ) ); ?>" <?php if ( $action === 'all' ) : ?>class="current"<?php endif; ?>><?php printf( _nx( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $all_count, 'plugins', 'buddypress' ), number_format_i18n( $all_count ) ); ?></a> | </li> 154 <li><a href="<?php echo esc_url( add_query_arg( array( 'page' => 'bp-components', 'action' => 'active' ), bp_get_admin_url( $page ) ) ); ?>" <?php if ( $action === 'active' ) : ?>class="current"<?php endif; ?>><?php printf( _n( 'Active <span class="count">(%s)</span>', 'Active <span class="count">(%s)</span>', count( $active_components ), 'buddypress' ), number_format_i18n( count( $active_components ) ) ); ?></a> | </li> 155 <li><a href="<?php echo esc_url( add_query_arg( array( 'page' => 'bp-components', 'action' => 'inactive' ), bp_get_admin_url( $page ) ) ); ?>" <?php if ( $action === 'inactive' ) : ?>class="current"<?php endif; ?>><?php printf( _n( 'Inactive <span class="count">(%s)</span>', 'Inactive <span class="count">(%s)</span>', count( $inactive_components ), 'buddypress' ), number_format_i18n( count( $inactive_components ) ) ); ?></a> | </li> 156 <li><a href="<?php echo esc_url( add_query_arg( array( 'page' => 'bp-components', 'action' => 'mustuse' ), bp_get_admin_url( $page ) ) ); ?>" <?php if ( $action === 'mustuse' ) : ?>class="current"<?php endif; ?>><?php printf( _n( 'Must-Use <span class="count">(%s)</span>', 'Must-Use <span class="count">(%s)</span>', count( $required_components ), 'buddypress' ), number_format_i18n( count( $required_components ) ) ); ?></a> | </li> 157 <li><a href="<?php echo esc_url( add_query_arg( array( 'page' => 'bp-components', 'action' => 'retired' ), bp_get_admin_url( $page ) ) ); ?>" <?php if ( $action === 'retired' ) : ?>class="current"<?php endif; ?>><?php printf( _n( 'Retired <span class="count">(%s)</span>', 'Retired <span class="count">(%s)</span>', count( $retired_components ), 'buddypress' ), number_format_i18n( count( $retired_components ) ) ); ?></a></li> 197 <?php foreach ( $component_views as $component_view ) : ?> 198 <li> 199 <a href="<?php echo esc_url( add_query_arg( array( 'page' => 'bp-components', 'action' => $component_view['action'] ), bp_get_admin_url( $page ) ) ); ?>" <?php if ( $action === $component_view['action'] ) : ?>class="current"<?php endif; ?>> 200 <?php echo wp_kses( $component_view['view'], array( 'span' => array( 'class' => true ) ) ); ?> 201 </a><?php echo 'retired' !== $component_view['action'] ? ' |' : ''; ?> 202 </li> 203 <?php endforeach ;?> 158 204 </ul> 159 205 160 206 <h3 class="screen-reader-text"><?php 161 207 /* translators: accessibility text */ 162 _e( 'Components list', 'buddypress' );208 esc_html_e( 'Components list', 'buddypress' ); 163 209 ?></h3> 164 210
Note: See TracChangeset
for help on using the changeset viewer.