Ticket #39148: 39148.patch
File 39148.patch, 10.0 KB (added by , 8 years ago) |
---|
-
src/wp-admin/edit-comments.php
83 83 } 84 84 85 85 if ( ! in_array( $doaction, array( 'approve', 'unapprove', 'spam', 'unspam', 'trash', 'delete' ), true ) ) { 86 $screen = get_current_screen()->id; 86 87 /** 87 88 * Fires when a custom bulk action should be handled. 88 89 * 89 90 * The redirect link should be modified with success or failure feedback 90 91 * from the action to be used to display feedback to the user. 91 92 * 93 * The dynamic hook name, `$screen`, refers to the current screen ID. 94 * 92 95 * @since 4.7.0 93 96 * 94 97 * @param string $redirect_url The redirect URL. 95 98 * @param string $doaction The action being taken. 96 99 * @param array $items The items to take the action on. 97 100 */ 98 $redirect_to = apply_filters( 'handle_bulk_actions-' . get_current_screen()->id, $redirect_to, $doaction, $comment_ids );101 $redirect_to = apply_filters( "handle_bulk_actions-{$screen}", $redirect_to, $doaction, $comment_ids ); 99 102 } 100 103 101 104 wp_defer_comment_counting( false ); -
src/wp-admin/includes/ajax-actions.php
2702 2702 $type = $ext_type; 2703 2703 2704 2704 /** This filter is documented in wp-admin/includes/media.php */ 2705 $html = apply_filters( $type . '_send_to_editor_url', $html, $src, $link_text );2705 $html = apply_filters( "{$type}_send_to_editor_url", $html, $src, $link_text ); 2706 2706 2707 2707 wp_send_json_success( $html ); 2708 2708 } -
src/wp-admin/includes/class-wp-list-table.php
732 732 * 733 733 * @param int $per_page Number of items to be displayed. Default 20. 734 734 */ 735 return (int) apply_filters( $option, $per_page );735 return (int) apply_filters( "{$option}", $per_page ); 736 736 } 737 737 738 738 /** -
src/wp-admin/includes/class-wp-screen.php
1162 1162 $per_page = apply_filters( 'edit_categories_per_page', $per_page ); 1163 1163 } else { 1164 1164 /** This filter is documented in wp-admin/includes/class-wp-list-table.php */ 1165 $per_page = apply_filters( $option, $per_page );1165 $per_page = apply_filters( "{$option}", $per_page ); 1166 1166 } 1167 1167 1168 1168 // Back compat -
src/wp-admin/includes/plugin.php
1025 1025 wp_register_plugin_realpath( WP_PLUGIN_DIR . '/' . $file ); 1026 1026 include( WP_PLUGIN_DIR . '/' . $file ); 1027 1027 1028 add_action( 'uninstall_' . $file, $callable );1028 add_action( "uninstall_{$file}", $callable ); 1029 1029 1030 1030 /** 1031 1031 * Fires in uninstall_plugin() once the plugin has been uninstalled. … … 1035 1035 * 1036 1036 * @since 2.7.0 1037 1037 */ 1038 do_action( 'uninstall_' . $file);1038 do_action( "uninstall_{$file}" ); 1039 1039 } 1040 1040 } 1041 1041 -
src/wp-admin/network/site-themes.php
124 124 check_admin_referer( 'bulk-themes' ); 125 125 $themes = (array) $_POST['checked']; 126 126 $n = count( $themes ); 127 $screen = get_current_screen()->id; 127 128 /** 128 129 * Fires when a custom bulk action should be handled. 129 130 * 130 131 * The redirect link should be modified with success or failure feedback 131 132 * from the action to be used to display feedback to the user. 132 133 * 134 * The dynamic hook name, `$screen`, refers to the current screen ID. 135 * 133 136 * @since 4.7.0 134 137 * 135 138 * @param string $redirect_url The redirect URL. … … 137 140 * @param array $items The items to take the action on. 138 141 * @param int $site_id The site id. 139 142 */ 140 $referer = apply_filters( 'handle_network_bulk_actions-' . get_current_screen()->id, $referer, $action, $themes, $id );143 $referer = apply_filters( "handle_network_bulk_actions-{$screen}", $referer, $action, $themes, $id ); 141 144 } else { 142 145 $action = 'error'; 143 146 $n = 'none'; -
src/wp-includes/author-template.php
148 148 * @param int $user_id The user ID for the value. 149 149 * @param int|bool $original_user_id The original user ID, as passed to the function. 150 150 */ 151 return apply_filters( 'get_the_author_' . $field, $value, $user_id, $original_user_id );151 return apply_filters( "get_the_author_{$field}", $value, $user_id, $original_user_id ); 152 152 } 153 153 154 154 /** … … 174 174 * @param string $author_meta The value of the metadata. 175 175 * @param int $user_id The user ID. 176 176 */ 177 echo apply_filters( 'the_author_' . $field, $author_meta, $user_id );177 echo apply_filters( "the_author_{$field}", $author_meta, $user_id ); 178 178 } 179 179 180 180 /** -
src/wp-includes/bookmark.php
383 383 384 384 if ( 'edit' == $context ) { 385 385 /** This filter is documented in wp-includes/post.php */ 386 $value = apply_filters( "edit_ $field", $value, $bookmark_id );386 $value = apply_filters( "edit_{$field}", $value, $bookmark_id ); 387 387 388 388 if ( 'link_notes' == $field ) { 389 389 $value = esc_html( $value ); // textarea_escaped … … 392 392 } 393 393 } elseif ( 'db' == $context ) { 394 394 /** This filter is documented in wp-includes/post.php */ 395 $value = apply_filters( "pre_ $field", $value );395 $value = apply_filters( "pre_{$field}", $value ); 396 396 } else { 397 397 /** This filter is documented in wp-includes/post.php */ 398 $value = apply_filters( $field, $value, $bookmark_id, $context );398 $value = apply_filters( "{$field}", $value, $bookmark_id, $context ); 399 399 400 400 if ( 'attribute' == $context ) { 401 401 $value = esc_attr( $value ); -
src/wp-includes/class-wp-customize-setting.php
480 480 return false; 481 481 } 482 482 483 $id_base = $this->id_data['base']; 484 483 485 /** 484 486 * Fires when the WP_Customize_Setting::save() method is called. 485 487 * 486 * The dynamic portion of the hook name, `$ this->id_data['base']` refers to488 * The dynamic portion of the hook name, `$id_base` refers to 487 489 * the base slug of the setting name. 488 490 * 489 491 * @since 3.4.0 490 492 * 491 493 * @param WP_Customize_Setting $this WP_Customize_Setting instance. 492 494 */ 493 do_action( 'customize_save_' . $this->id_data['base'], $this );495 do_action( "customize_save_{$id_base}", $this ); 494 496 495 497 $this->update( $value ); 496 498 } -
src/wp-includes/option.php
102 102 wp_cache_set( 'notoptions', $notoptions, 'options' ); 103 103 104 104 /** This filter is documented in wp-includes/option.php */ 105 return apply_filters( 'default_option_' . $option, $default, $option, $passed_default );105 return apply_filters( "default_option_{$option}", $default, $option, $passed_default ); 106 106 } 107 107 } 108 108 } … … 114 114 $value = $row->option_value; 115 115 } else { 116 116 /** This filter is documented in wp-includes/option.php */ 117 return apply_filters( 'default_option_' . $option, $default, $option, $passed_default );117 return apply_filters( "default_option_{$option}", $default, $option, $passed_default ); 118 118 } 119 119 } 120 120 … … 300 300 return false; 301 301 302 302 /** This filter is documented in wp-includes/option.php */ 303 if ( apply_filters( 'default_option_' . $option, false, $option, false ) === $old_value ) {303 if ( apply_filters( "default_option_{$option}", false, $option, false ) === $old_value ) { 304 304 // Default setting for new options is 'yes'. 305 305 if ( null === $autoload ) { 306 306 $autoload = 'yes'; … … 421 421 $notoptions = wp_cache_get( 'notoptions', 'options' ); 422 422 if ( !is_array( $notoptions ) || !isset( $notoptions[$option] ) ) 423 423 /** This filter is documented in wp-includes/option.php */ 424 if ( apply_filters( 'default_option_' . $option, false, $option, false ) !== get_option( $option ) )424 if ( apply_filters( "default_option_{$option}", false, $option, false ) !== get_option( $option ) ) 425 425 return false; 426 426 427 427 $serialized_value = maybe_serialize( $value ); -
src/wp-includes/post.php
2061 2061 * values include 'raw', 'edit', 'db', 'display', 2062 2062 * 'attribute' and 'js'. 2063 2063 */ 2064 $value = apply_filters( $field, $value, $post_id, $context );2064 $value = apply_filters( "{$field}", $value, $post_id, $context ); 2065 2065 } else { 2066 2066 $value = apply_filters( "post_{$field}", $value, $post_id, $context ); 2067 2067 } -
src/wp-includes/user.php
1208 1208 if ( $prefixed ) { 1209 1209 1210 1210 /** This filter is documented in wp-includes/post.php */ 1211 $value = apply_filters( $field, $value, $user_id, $context );1211 $value = apply_filters( "{$field}", $value, $user_id, $context ); 1212 1212 } else { 1213 1213 1214 1214 /**