Changeset 6438 for trunk/src/includes/admin/tools/common.php
- Timestamp:
- 05/27/2017 05:04:31 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/admin/tools/common.php
r6415 r6438 22 22 } 23 23 24 /** 25 * Return the URL to run a specific repair tool 26 * 27 * @since 2.6.0 bbPress (r5885) 28 * 29 * @param string $component 30 */ 31 function bbp_get_admin_repair_tool_run_url( $component = array() ) { 32 $tools = admin_url( 'tools.php' ); 33 $page = ( 'repair' === $component['type'] ) ? 'bbp-repair' : 'bbp-upgrade'; 34 $args = array( 'page' => $page, 'action' => 'run', 'checked' => array( $component['id'] ) ); 35 $url = add_query_arg( $args, $tools ); 36 $nonced = wp_nonce_url( $url, 'bbpress-do-counts' ); 37 38 return apply_filters( 'bbp_get_admin_repair_tool_run_url', $nonced, $component ); 39 } 24 /** 25 * Return the URL to run a specific repair tool 26 * 27 * @since 2.6.0 bbPress (r5885) 28 * 29 * @param string $component 30 */ 31 function bbp_get_admin_repair_tool_run_url( $component = array() ) { 32 $tools = admin_url( 'tools.php' ); 33 $page = ( 'repair' === $component['type'] ) ? 'bbp-repair' : 'bbp-upgrade'; 34 $args = array( 'page' => $page, 'action' => 'run', 'checked' => array( $component['id'] ) ); 35 $url = add_query_arg( $args, $tools ); 36 $nonced = wp_nonce_url( $url, 'bbpress-do-counts' ); 37 38 // Filter & return 39 return apply_filters( 'bbp_get_admin_repair_tool_run_url', $nonced, $component ); 40 } 40 41 41 42 /** … … 174 175 } 175 176 177 // Filter & return 176 178 return apply_filters( 'bbp_get_admin_repair_tools', $tools, $type ); 177 179 } … … 198 200 } 199 201 202 // Filter & return 200 203 return apply_filters( 'bbp_get_admin_repair_tool_registered_components', $retval ); 201 204 } … … 380 383 ksort( $repair_list ); 381 384 385 // Filter & return 382 386 return (array) apply_filters( 'bbp_repair_list', $repair_list ); 383 387 }
Note: See TracChangeset
for help on using the changeset viewer.