Changeset 8613
- Timestamp:
- 07/15/2014 07:42:39 PM (12 years ago)
- File:
-
- 1 edited
-
trunk/src/bp-activity/bp-activity-admin.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-activity/bp-activity-admin.php
r8491 r8613 1273 1273 */ 1274 1274 function extra_tablenav( $which ) { 1275 if ( 'bottom' == $which ) 1275 1276 // Bail on bottom table nav 1277 if ( 'bottom' === $which ) { 1276 1278 return; 1277 1278 $selected = !empty( $_REQUEST['activity_type'] ) ? $_REQUEST['activity_type'] : ''; 1279 1280 // Get all types of activities, and sort alphabetically.1281 $actions = bp_activity_get_types(); 1282 natsort( $actions );1283 ?>1279 } 1280 1281 // Is any filter currently selected? 1282 $selected = ( ! empty( $_REQUEST['activity_type'] ) ) ? $_REQUEST['activity_type'] : ''; 1283 1284 // Get the actions 1285 $activity_actions = buddypress()->activity->actions; ?> 1284 1286 1285 1287 <div class="alignleft actions"> 1286 1288 <select name="activity_type"> 1287 <option value="" <?php selected( !$selected ); ?>><?php _e( 'Show all activity types', 'buddypress' ); ?></option> 1288 1289 <?php foreach ( $actions as $k => $v ) : ?> 1290 <option value="<?php echo esc_attr( $k ); ?>" <?php selected( $k, $selected ); ?>><?php echo esc_html( $v ); ?></option> 1289 <option value="" <?php selected( ! $selected ); ?>><?php _e( 'View all actions', 'buddypress' ); ?></option> 1290 1291 <?php foreach ( $activity_actions as $component => $actions ) : ?> 1292 1293 <optgroup label="<?php echo ucfirst( $component ); ?>"> 1294 1295 <?php foreach ( $actions as $action_key => $action_values ) : ?> 1296 1297 <option value="<?php echo esc_attr( $action_key ); ?>" <?php selected( $action_key, $selected ); ?>><?php echo esc_html( $action_values[ 'value' ] ); ?></option> 1298 1299 <?php endforeach; ?> 1300 1301 </optgroup> 1302 1291 1303 <?php endforeach; ?> 1304 1292 1305 </select> 1293 1306
Note: See TracChangeset
for help on using the changeset viewer.