Changeset 5487
- Timestamp:
- 12/10/2011 07:24:05 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity/bp-activity-admin.php
r5484 r5487 152 152 add_filter( 'default_hidden_meta_boxes', 'bp_activity_admin_edit_hidden_metaboxes', 10, 2 ); 153 153 154 155 154 /** 156 155 * Set up the admin page before any output is sent. Register contextual help and screen options for this admin page. … … 168 167 // Decide whether to load the index or edit screen 169 168 $doaction = ! empty( $_REQUEST['action'] ) ? $_REQUEST['action'] : ''; 169 170 // Call an action for plugins to hook in early 171 do_action( 'bp_activity_admin_load', $doaction ); 170 172 171 173 // Edit screen … … 262 264 $activity_ids = array_map( 'absint', (array) $_REQUEST['aid'] ); 263 265 266 // Call a filter for plugins to modify the requested activities to load 267 $activity_ids = apply_filters( 'bp_activity_admin_action_activity_ids', $activity_ids ); 268 264 269 // Is this a bulk request? 265 270 if ( 'bulk_' == substr( $doaction, 0, 5 ) && ! empty( $_REQUEST['aid'] ) ) { … … 342 347 } 343 348 349 // Call actions for plugins to do something before we redirect 350 do_action( 'bp_activity_admin_action_after', array( $spammed, $unspammed, $deleted, $error ), $redirect_to, $activity_ids ); 351 344 352 // Add arguments to the redirect URL so that on page reload, we can easily display what we've just done. 345 353 if ( $spammed ) … … 357 365 358 366 // Redirect 359 wp_redirect( $redirect_to);367 wp_redirect( apply_filters( 'bp_activity_admin_action_redirect', $redirect_to ) ); 360 368 exit; 361 369 … … 477 485 $error = $activity->id; 478 486 487 // Call actions for plugins to do something before we redirect 488 do_action_ref_array( 'bp_activity_admin_edit_after', array( &$activity, $error ) ); 489 479 490 // If an error occured, pass back the activity ID that failed 480 491 if ( $error ) … … 484 495 485 496 // Redirect 486 wp_redirect( $redirect_to);497 wp_redirect( apply_filters( 'bp_activity_admin_edit_redirect', $redirect_to ) ); 487 498 exit; 488 499 … … 548 559 $form_url = remove_query_arg( array( 'action', 'deleted', 'error', 'spammed', 'unspammed', ), $_SERVER['REQUEST_URI'] ); 549 560 $form_url = add_query_arg( 'action', 'save', $form_url ); 561 562 // Call an action for plugins to modify the activity before we display the edit form 563 do_action_ref_array( 'bp_activity_admin_edit', array( &$activity ) ); 550 564 ?> 551 565 … … 771 785 // Prepare the activity items for display 772 786 $bp_activity_list_table->prepare_items(); 787 788 // Call an action for plugins to modify the activity before we display the edit form 789 do_action( 'bp_activity_admin_index', $messages ); 773 790 ?> 774 791 … … 792 809 <?php endif; ?> 793 810 811 <?php // Display each activity on its own row ?> 794 812 <?php $bp_activity_list_table->views(); ?> 795 813 … … 800 818 </form> 801 819 820 <?php // This markup is used for the reply form ?> 802 821 <table style="display: none;"> 803 822 <tr id="bp-activities-container" style="display: none;"> … … 1058 1077 <li class="all"><a href="<?php echo esc_attr( esc_url( $redirect_to ) ); ?>" class="<?php if ( 'spam' != $this->view ) echo 'current'; ?>"><?php _e( 'All', 'buddypress' ); ?></a> |</li> 1059 1078 <li class="spam"><a href="<?php echo esc_attr( esc_url( add_query_arg( 'activity_status', 'spam', $redirect_to ) ) ); ?>" class="<?php if ( 'spam' == $this->view ) echo 'current'; ?>"><?php printf( __( 'Spam <span class="count">(%s)</span>', 'buddypress' ), number_format_i18n( $this->spam_count ) ); ?></a></li> 1079 1080 <?php do_action( 'bp_activity_list_table_get_views', $redirect_to, $this->view ); ?> 1060 1081 </ul> 1061 1082 <?php … … 1074 1095 $actions['bulk_delete'] = __( 'Delete Permanently', 'buddypress' ); 1075 1096 1076 return $actions;1097 return apply_filters( 'bp_activity_list_table_get_bulk_actions', $actions ); 1077 1098 } 1078 1099
Note: See TracChangeset
for help on using the changeset viewer.