Changeset 7360 for trunk/src/includes/admin/tools/common.php
- Timestamp:
- 11/16/2025 10:43:01 PM (4 months ago)
- File:
-
- 1 edited
-
trunk/src/includes/admin/tools/common.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/admin/tools/common.php
r7006 r7360 74 74 } 75 75 76 /**77 * Return the URL to run a specific repair tool78 *79 * @since 2.6.0 bbPress (r5885)80 *81 * @param string $component82 */83 function bbp_get_admin_repair_tool_run_url( $component = array() ) {84 85 // Page86 $page = ( 'repair' === $component['type'] )87 ? 'bbp-repair'88 : 'bbp-upgrade';89 90 // Arguments91 $args = array(92 'page' => $page,93 'action' => 'run',94 'checked' => array( $component['id'] )95 );96 97 // Url98 $nonced = wp_nonce_url( bbp_get_admin_repair_tool_page_url( $args ), 'bbpress-do-counts' );99 100 // Filter & return101 return apply_filters( 'bbp_get_admin_repair_tool_run_url', $nonced, $component );102 }76 /** 77 * Return the URL to run a specific repair tool 78 * 79 * @since 2.6.0 bbPress (r5885) 80 * 81 * @param string $component 82 */ 83 function bbp_get_admin_repair_tool_run_url( $component = array() ) { 84 85 // Page 86 $page = ( 'repair' === $component['type'] ) 87 ? 'bbp-repair' 88 : 'bbp-upgrade'; 89 90 // Arguments 91 $args = array( 92 'page' => $page, 93 'action' => 'run', 94 'checked' => array( $component['id'] ) 95 ); 96 97 // Url 98 $nonced = wp_nonce_url( bbp_get_admin_repair_tool_page_url( $args ), 'bbpress-do-counts' ); 99 100 // Filter & return 101 return apply_filters( 'bbp_get_admin_repair_tool_run_url', $nonced, $component ); 102 } 103 103 104 104 /** … … 253 253 */ 254 254 function bbp_admin_repair_list_search_form() { 255 ?>255 ?> 256 256 257 257 <p class="search-box"> … … 798 798 // Create the "All" link 799 799 $current = empty( $selected ) ? 'current' : ''; 800 $links[] = $r['link_before'] . '<a href="' . esc_url( $tools_url ) . '" class="' . esc_attr( $current ) . '">' . sprintf( esc_html__( 'All %s', 'bbpress' ), $r['count_before'] . count( $tools ) . $r['count_after'] ) . '</a>' . $r['link_after']; 800 801 $all_text = sprintf( 802 /* translators: %s: Number of items */ 803 esc_html__( 'All %s', 'bbpress' ), 804 $r['count_before'] . count( $tools ) . $r['count_after'] 805 ); 806 807 $links[] = sprintf( 808 '%1$s<a href="%2$s" class="%3$s">%4$s</a>%5$s', 809 $r['link_before'], 810 esc_url( $tools_url ), 811 esc_attr( $current ), 812 $all_text, 813 $r['link_after'] 814 ); 801 815 802 816 // Loop through overheads and created links … … 922 936 // Define links 923 937 $links = array( 924 $r['link_before'] . '<a href="' . esc_url( $tools_url ) . '" class="' . esc_attr( $all_current ) . '">' . sprintf( esc_html__( 'All %s', 'bbpress' ), $all_count ) . '</a>' . $r['link_after'], 925 $r['link_before'] . '<a href="' . esc_url( $filter_url ) . '" class="' . esc_attr( $pending_current ) . '">' . sprintf( esc_html__( 'Pending %s', 'bbpress' ), $pending_count ) . '</a>' . $r['link_after'] 938 $r['link_before'] . '<a href="' . esc_url( $tools_url ) . '" class="' . esc_attr( $all_current ) . '">' . 939 sprintf( 940 /* translators: %s: Number of items */ 941 esc_html__( 'All %s', 'bbpress' ), 942 $all_count 943 ) . 944 '</a>' . $r['link_after'], 945 946 $r['link_before'] . '<a href="' . esc_url( $filter_url ) . '" class="' . esc_attr( $pending_current ) . '">' . 947 sprintf( 948 /* translators: %s: Number of pending items */ 949 esc_html__( 'Pending %s', 'bbpress' ), 950 $pending_count 951 ) . 952 '</a>' . $r['link_after'] 926 953 ); 927 954
Note: See TracChangeset
for help on using the changeset viewer.