Ticket #37748: 37748.3.patch
File 37748.3.patch, 23.6 KB (added by , 9 years ago) |
---|
-
wp-admin/admin-footer.php
83 83 * 84 84 * @param string $hook_suffix The current admin page. 85 85 */ 86 do_action( "admin_print_footer_scripts- $hook_suffix" );86 do_action( "admin_print_footer_scripts-{$hook_suffix}" ); 87 87 88 88 /** 89 89 * Prints any scripts and data queued for the footer. … … 103 103 * @global string $hook_suffix 104 104 * @param string $hook_suffix The current admin page. 105 105 */ 106 do_action( "admin_footer- $hook_suffix" );106 do_action( "admin_footer-{$hook_suffix}" ); 107 107 108 108 // get_site_option() won't exist when auto upgrading from <= 2.7 109 109 if ( function_exists('get_site_option') ) { -
wp-admin/admin-header.php
96 96 * 97 97 * @since 2.6.0 98 98 */ 99 do_action( "admin_print_styles- $hook_suffix" );99 do_action( "admin_print_styles-{$hook_suffix}" ); 100 100 101 101 /** 102 102 * Fires when styles are printed for all admin pages. … … 110 110 * 111 111 * @since 2.1.0 112 112 */ 113 do_action( "admin_print_scripts- $hook_suffix" );113 do_action( "admin_print_scripts-{$hook_suffix}" ); 114 114 115 115 /** 116 116 * Fires when scripts are printed for all admin pages. … … 127 127 * 128 128 * @since 2.1.0 129 129 */ 130 do_action( "admin_head- $hook_suffix" );130 do_action( "admin_head-{$hook_suffix}" ); 131 131 132 132 /** 133 133 * Fires in head section for all admin pages. -
wp-admin/admin.php
209 209 * 210 210 * @since 2.1.0 211 211 */ 212 do_action( 'load-' . $page_hook);212 do_action( "load-{$page_hook}" ); 213 213 if (! isset($_GET['noheader'])) 214 214 require_once(ABSPATH . 'wp-admin/admin-header.php'); 215 215 … … 239 239 * 240 240 * @since 1.5.0 241 241 */ 242 do_action( 'load-' . $plugin_page);242 do_action( "load-{$plugin_page}" ); 243 243 244 244 if ( !isset($_GET['noheader'])) 245 245 require_once(ABSPATH . 'wp-admin/admin-header.php'); … … 278 278 * 279 279 * @since 3.5.0 280 280 */ 281 do_action( 'load-importer-' . $importer);281 do_action( "load-importer-{$importer}" ); 282 282 283 283 $parent_file = 'tools.php'; 284 284 $submenu_file = 'import.php'; … … 326 326 * 327 327 * @since 2.1.0 328 328 */ 329 do_action( 'load-' . $pagenow);329 do_action( "load-{$pagenow}" ); 330 330 331 331 /* 332 332 * The following hooks are fired to ensure backward compatibility. -
wp-admin/edit-form-advanced.php
331 331 * 332 332 * @param WP_Post $post Post object. 333 333 */ 334 do_action( 'add_meta_boxes_' . $post_type, $post );334 do_action( "add_meta_boxes_{$post_type}", $post ); 335 335 336 336 /** 337 337 * Fires after meta boxes have been added. -
wp-admin/includes/class-wp-automatic-updater.php
176 176 * @param bool $update Whether to update. 177 177 * @param object $item The update offer. 178 178 */ 179 $update = apply_filters( 'auto_update_' . $type, $update, $item );179 $update = apply_filters( "auto_update_{$type}", $update, $item ); 180 180 181 181 if ( ! $update ) { 182 182 if ( 'core' == $type ) -
wp-admin/includes/class-wp-ms-themes-list-table.php
518 518 * @param WP_Theme $theme The current WP_Theme object. 519 519 * @param string $context Status of the theme. 520 520 */ 521 $actions = apply_filters( "theme_action_links_ $stylesheet", $actions, $theme, $context );521 $actions = apply_filters( "theme_action_links_{$stylesheet}", $actions, $theme, $context ); 522 522 523 523 echo $this->row_actions( $actions, true ); 524 524 } … … 726 726 * @param WP_Theme $theme Current WP_Theme object. 727 727 * @param string $status Status of the theme. 728 728 */ 729 do_action( "after_theme_row_ $stylesheet", $stylesheet, $theme, $status );729 do_action( "after_theme_row_{$stylesheet}", $stylesheet, $theme, $status ); 730 730 } 731 731 } -
wp-admin/includes/class-wp-plugin-install-list-table.php
200 200 * 201 201 * @param array|bool $args Plugin Install API arguments. 202 202 */ 203 $args = apply_filters( "install_plugins_table_api_args_ $tab", $args );203 $args = apply_filters( "install_plugins_table_api_args_{$tab}", $args ); 204 204 205 205 if ( !$args ) 206 206 return; -
wp-admin/includes/class-wp-plugins-list-table.php
864 864 * 'Inactive', 'Recently Activated', 'Upgrade', 'Must-Use', 865 865 * 'Drop-ins', 'Search'. 866 866 */ 867 do_action( "after_plugin_row_ $plugin_file", $plugin_file, $plugin_data, $status );867 do_action( "after_plugin_row_{$plugin_file}", $plugin_file, $plugin_data, $status ); 868 868 } 869 869 870 870 /** -
wp-admin/includes/class-wp-theme-install-list-table.php
134 134 * 135 135 * @param array $args An array of themes API arguments. 136 136 */ 137 $args = apply_filters( 'install_themes_table_api_args_' . $tab, $args );137 $args = apply_filters( "install_themes_table_api_args_{$tab}", $args ); 138 138 139 139 if ( ! $args ) 140 140 return; -
wp-admin/includes/media.php
619 619 * 620 620 * @param string $upload_iframe_src The upload iframe source URL by type. 621 621 */ 622 $upload_iframe_src = apply_filters( $type . '_upload_iframe_src', $upload_iframe_src );622 $upload_iframe_src = apply_filters( "{$type}_upload_iframe_src", $upload_iframe_src ); 623 623 624 624 return add_query_arg('TB_iframe', true, $upload_iframe_src); 625 625 } … … 787 787 * @param string $src Media source URL. 788 788 * @param string $title Media title. 789 789 */ 790 $html = apply_filters( $type . '_send_to_editor_url', $html, esc_url_raw( $src ), $title );790 $html = apply_filters( "{$type}_send_to_editor_url", $html, esc_url_raw( $src ), $title ); 791 791 } else { 792 792 $align = ''; 793 793 $alt = esc_attr( wp_unslash( $_POST['alt'] ) ); -
wp-admin/includes/plugin.php
588 588 * @param bool $network_wide Whether to enable the plugin for all sites in the network 589 589 * or just the current site. Multisite only. Default is false. 590 590 */ 591 do_action( 'activate_' . $plugin, $network_wide );591 do_action( "activate_{$plugin}", $network_wide ); 592 592 } 593 593 594 594 if ( $network_wide ) { … … 701 701 * @param bool $network_deactivating Whether the plugin is deactivated for all sites in the network 702 702 * or just the current site. Multisite only. Default is false. 703 703 */ 704 do_action( 'deactivate_' . $plugin, $network_deactivating );704 do_action( "deactivate_{$plugin}", $network_deactivating ); 705 705 706 706 /** 707 707 * Fires after a plugin is deactivated. -
wp-admin/includes/revision.php
70 70 * @param string null The context of whether the current revision is the old 71 71 * or the new one. Values are 'to' or 'from'. 72 72 */ 73 $content_from = $compare_from ? apply_filters( "_wp_post_revision_field_ $field", $compare_from->$field, $field, $compare_from, 'from' ) : '';73 $content_from = $compare_from ? apply_filters( "_wp_post_revision_field_{$field}", $compare_from->$field, $field, $compare_from, 'from' ) : ''; 74 74 75 75 /** This filter is documented in wp-admin/includes/revision.php */ 76 $content_to = apply_filters( "_wp_post_revision_field_ $field", $compare_to->$field, $field, $compare_to, 'to' );76 $content_to = apply_filters( "_wp_post_revision_field_{$field}", $compare_to->$field, $field, $compare_to, 'to' ); 77 77 78 78 $args = array( 79 79 'show_split_view' => true -
wp-admin/media-upload.php
95 95 * 96 96 * @since 2.5.0 97 97 */ 98 do_action( "media_upload_ $type" );98 do_action( "media_upload_{$type}" ); 99 99 } else { 100 100 /** 101 101 * Fires inside limited and specific upload-tab views in the legacy … … 107 107 * 108 108 * @since 2.5.0 109 109 */ 110 do_action( "media_upload_ $tab" );110 do_action( "media_upload_{$tab}" ); 111 111 } 112 112 -
wp-admin/plugin-install.php
64 64 * 65 65 * @since 2.7.0 66 66 */ 67 do_action( "install_plugins_pre_ $tab" );67 do_action( "install_plugins_pre_{$tab}" ); 68 68 69 69 /* 70 70 * Call the pre upload action on every non-upload plugin install screen … … 155 155 * 156 156 * @param int $paged The current page number of the plugins list table. 157 157 */ 158 do_action( "install_plugins_ $tab", $paged ); ?>158 do_action( "install_plugins_{$tab}", $paged ); ?> 159 159 160 160 <span class="spinner"></span> 161 161 </div> -
wp-includes/category-template.php
1259 1259 * 1260 1260 * @param array $links An array of term links. 1261 1261 */ 1262 $term_links = apply_filters( "term_links- $taxonomy", $links );1262 $term_links = apply_filters( "term_links-{$taxonomy}", $links ); 1263 1263 1264 1264 return $before . join( $sep, $term_links ) . $after; 1265 1265 } -
wp-includes/class-wp-customize-control.php
383 383 * 384 384 * @param WP_Customize_Control $this WP_Customize_Control instance. 385 385 */ 386 do_action( 'customize_render_control_' . $this->id, $this );386 do_action( "customize_render_control_{$this->id}", $this ); 387 387 388 388 $this->render(); 389 389 } -
wp-includes/class-wp-rewrite.php
1413 1413 * 1414 1414 * @param array $rules The rewrite rules generated for the current permastruct. 1415 1415 */ 1416 $rules = apply_filters( $permastructname . '_rewrite_rules', $rules );1416 $rules = apply_filters( "{$permastructname}_rewrite_rules", $rules ); 1417 1417 if ( 'post_tag' == $permastructname ) { 1418 1418 1419 1419 /** -
wp-includes/option.php
49 49 * Default false to skip it. 50 50 * @param string $option Option name. 51 51 */ 52 $pre = apply_filters( 'pre_option_' . $option, false, $option );52 $pre = apply_filters( "pre_option_{$option}", false, $option ); 53 53 if ( false !== $pre ) 54 54 return $pre; 55 55 … … 72 72 * in the database. 73 73 * @param string $option Option name. 74 74 */ 75 return apply_filters( 'default_option_' . $option, $default, $option );75 return apply_filters( "default_option_{$option}", $default, $option ); 76 76 } 77 77 78 78 $alloptions = wp_load_alloptions(); … … 133 133 * unserialized prior to being returned. 134 134 * @param string $option Option name. 135 135 */ 136 return apply_filters( 'option_' . $option, maybe_unserialize( $value ), $option );136 return apply_filters( "option_{$option}", maybe_unserialize( $value ), $option ); 137 137 } 138 138 139 139 /** … … 277 277 * @param mixed $old_value The old option value. 278 278 * @param string $option Option name. 279 279 */ 280 $value = apply_filters( 'pre_update_option_' . $option, $value, $old_value, $option );280 $value = apply_filters( "pre_update_option_{$option}", $value, $old_value, $option ); 281 281 282 282 /** 283 283 * Filters an option before its value is (maybe) serialized and updated. … … 534 534 * 535 535 * @param string $option Name of the deleted option. 536 536 */ 537 do_action( "delete_option_ $option", $option );537 do_action( "delete_option_{$option}", $option ); 538 538 539 539 /** 540 540 * Fires after an option has been deleted. … … 568 568 * 569 569 * @param string $transient Transient name. 570 570 */ 571 do_action( 'delete_transient_' . $transient, $transient );571 do_action( "delete_transient_{$transient}", $transient ); 572 572 573 573 if ( wp_using_ext_object_cache() ) { 574 574 $result = wp_cache_delete( $transient, 'transient' ); … … 624 624 * of the transient, and return the returned value. 625 625 * @param string $transient Transient name. 626 626 */ 627 $pre = apply_filters( 'pre_transient_' . $transient, false, $transient );627 $pre = apply_filters( "pre_transient_{$transient}", false, $transient ); 628 628 if ( false !== $pre ) 629 629 return $pre; 630 630 … … 661 661 * @param mixed $value Value of transient. 662 662 * @param string $transient Transient name. 663 663 */ 664 return apply_filters( 'transient_' . $transient, $value, $transient );664 return apply_filters( "transient_{$transient}", $value, $transient ); 665 665 } 666 666 667 667 /** … … 696 696 * @param int $expiration Time until expiration in seconds. 697 697 * @param string $transient Transient name. 698 698 */ 699 $value = apply_filters( 'pre_set_transient_' . $transient, $value, $expiration, $transient );699 $value = apply_filters( "pre_set_transient_{$transient}", $value, $expiration, $transient ); 700 700 701 701 /** 702 702 * Filters the expiration for a transient before its value is set. … … 709 709 * @param mixed $value New value of transient. 710 710 * @param string $transient Transient name. 711 711 */ 712 $expiration = apply_filters( 'expiration_of_transient_' . $transient, $expiration, $value, $transient );712 $expiration = apply_filters( "expiration_of_transient_{$transient}", $expiration, $value, $transient ); 713 713 714 714 if ( wp_using_ext_object_cache() ) { 715 715 $result = wp_cache_set( $transient, $value, 'transient', $expiration ); … … 758 758 * @param int $expiration Time until expiration in seconds. 759 759 * @param string $transient The name of the transient. 760 760 */ 761 do_action( 'set_transient_' . $transient, $value, $expiration, $transient );761 do_action( "set_transient_{$transient}", $value, $expiration, $transient ); 762 762 763 763 /** 764 764 * Fires after the value for a transient has been set. … … 1106 1106 * @param mixed $pre_option The default value to return if the option does not exist. 1107 1107 * @param string $option Option name. 1108 1108 */ 1109 $pre = apply_filters( 'pre_site_option_' . $option, false, $option );1109 $pre = apply_filters( "pre_site_option_{$option}", false, $option ); 1110 1110 1111 1111 if ( false !== $pre ) { 1112 1112 return $pre; … … 1130 1130 * in the database. 1131 1131 * @param string $option Option name. 1132 1132 */ 1133 return apply_filters( 'default_site_option_' . $option, $default, $option );1133 return apply_filters( "default_site_option_{$option}", $default, $option ); 1134 1134 } 1135 1135 1136 1136 if ( ! is_multisite() ) { … … 1174 1174 * @param mixed $value Value of network option. 1175 1175 * @param string $option Option name. 1176 1176 */ 1177 return apply_filters( 'site_option_' . $option, $value, $option );1177 return apply_filters( "site_option_{$option}", $value, $option ); 1178 1178 } 1179 1179 1180 1180 /** … … 1222 1222 * @param mixed $value Value of network option. 1223 1223 * @param string $option Option name. 1224 1224 */ 1225 $value = apply_filters( 'pre_add_site_option_' . $option, $value, $option );1225 $value = apply_filters( "pre_add_site_option_{$option}", $value, $option ); 1226 1226 1227 1227 $notoptions_key = "$network_id:notoptions"; 1228 1228 … … 1271 1271 * @param string $option Name of the network option. 1272 1272 * @param mixed $value Value of the network option. 1273 1273 */ 1274 do_action( 'add_site_option_' . $option, $option, $value );1274 do_action( "add_site_option_{$option}", $option, $value ); 1275 1275 1276 1276 /** 1277 1277 * Fires after a network option has been successfully added. … … 1327 1327 * 1328 1328 * @param string $option Option name. 1329 1329 */ 1330 do_action( 'pre_delete_site_option_' . $option, $option );1330 do_action( "pre_delete_site_option_{$option}", $option ); 1331 1331 1332 1332 if ( ! is_multisite() ) { 1333 1333 $result = delete_option( $option ); … … 1354 1354 * 1355 1355 * @param string $option Name of the network option. 1356 1356 */ 1357 do_action( 'delete_site_option_' . $option, $option );1357 do_action( "delete_site_option_{$option}", $option ); 1358 1358 1359 1359 /** 1360 1360 * Fires after a network option has been deleted. … … 1417 1417 * @param mixed $old_value Old value of the network option. 1418 1418 * @param string $option Option name. 1419 1419 */ 1420 $value = apply_filters( 'pre_update_site_option_' . $option, $value, $old_value, $option );1420 $value = apply_filters( "pre_update_site_option_{$option}", $value, $old_value, $option ); 1421 1421 1422 1422 if ( $value === $old_value ) { 1423 1423 return false; … … 1462 1462 * @param mixed $value Current value of the network option. 1463 1463 * @param mixed $old_value Old value of the network option. 1464 1464 */ 1465 do_action( 'update_site_option_' . $option, $option, $value, $old_value );1465 do_action( "update_site_option_{$option}", $option, $value, $old_value ); 1466 1466 1467 1467 /** 1468 1468 * Fires after the value of a network option has been successfully updated. … … 1500 1500 * 1501 1501 * @param string $transient Transient name. 1502 1502 */ 1503 do_action( 'delete_site_transient_' . $transient, $transient );1503 do_action( "delete_site_transient_{$transient}", $transient ); 1504 1504 1505 1505 if ( wp_using_ext_object_cache() ) { 1506 1506 $result = wp_cache_delete( $transient, 'site-transient' ); … … 1557 1557 * of the transient, and return the returned value. 1558 1558 * @param string $transient Transient name. 1559 1559 */ 1560 $pre = apply_filters( 'pre_site_transient_' . $transient, false, $transient );1560 $pre = apply_filters( "pre_site_transient_{$transient}", false, $transient ); 1561 1561 1562 1562 if ( false !== $pre ) 1563 1563 return $pre; … … 1593 1593 * @param mixed $value Value of site transient. 1594 1594 * @param string $transient Transient name. 1595 1595 */ 1596 return apply_filters( 'site_transient_' . $transient, $value, $transient );1596 return apply_filters( "site_transient_{$transient}", $value, $transient ); 1597 1597 } 1598 1598 1599 1599 /** … … 1625 1625 * @param mixed $value New value of site transient. 1626 1626 * @param string $transient Transient name. 1627 1627 */ 1628 $value = apply_filters( 'pre_set_site_transient_' . $transient, $value, $transient );1628 $value = apply_filters( "pre_set_site_transient_{$transient}", $value, $transient ); 1629 1629 1630 1630 $expiration = (int) $expiration; 1631 1631 … … 1640 1640 * @param mixed $value New value of site transient. 1641 1641 * @param string $transient Transient name. 1642 1642 */ 1643 $expiration = apply_filters( 'expiration_of_site_transient_' . $transient, $expiration, $value, $transient );1643 $expiration = apply_filters( "expiration_of_site_transient_{$transient}", $expiration, $value, $transient ); 1644 1644 1645 1645 if ( wp_using_ext_object_cache() ) { 1646 1646 $result = wp_cache_set( $transient, $value, 'site-transient', $expiration ); … … 1671 1671 * @param int $expiration Time until expiration in seconds. 1672 1672 * @param string $transient Transient name. 1673 1673 */ 1674 do_action( 'set_site_transient_' . $transient, $value, $expiration, $transient );1674 do_action( "set_site_transient_{$transient}", $value, $expiration, $transient ); 1675 1675 1676 1676 /** 1677 1677 * Fires after the value for a site transient has been set. -
wp-includes/taxonomy.php
871 871 * @param int|WP_Term $_term Term object or ID. 872 872 * @param string $taxonomy The taxonomy slug. 873 873 */ 874 $_term = apply_filters( "get_ $taxonomy", $_term, $taxonomy );874 $_term = apply_filters( "get_{$taxonomy}", $_term, $taxonomy ); 875 875 876 876 // Bail if a filter callback has changed the type of the `$_term` object. 877 877 if ( ! ( $_term instanceof WP_Term ) ) { … … 1915 1915 * by the parent function. WP_Error otherwise. 1916 1916 * @param array $object_ids List of term object IDs. 1917 1917 */ 1918 do_action( "delete_ $taxonomy", $term, $tt_id, $deleted_term, $object_ids );1918 do_action( "delete_{$taxonomy}", $term, $tt_id, $deleted_term, $object_ids ); 1919 1919 1920 1920 return true; 1921 1921 } … … 2406 2406 * @param int $term_id Term ID. 2407 2407 * @param int $tt_id Term taxonomy ID. 2408 2408 */ 2409 do_action( "create_ $taxonomy", $term_id, $tt_id );2409 do_action( "create_{$taxonomy}", $term_id, $tt_id ); 2410 2410 2411 2411 /** 2412 2412 * Filters the term ID after a new term is created. … … 2442 2442 * @param int $term_id Term ID. 2443 2443 * @param int $tt_id Term taxonomy ID. 2444 2444 */ 2445 do_action( "created_ $taxonomy", $term_id, $tt_id );2445 do_action( "created_{$taxonomy}", $term_id, $tt_id ); 2446 2446 2447 2447 return array('term_id' => $term_id, 'term_taxonomy_id' => $tt_id); 2448 2448 } … … 2987 2987 * @param int $term_id Term ID. 2988 2988 * @param int $tt_id Term taxonomy ID. 2989 2989 */ 2990 do_action( "edit_ $taxonomy", $term_id, $tt_id );2990 do_action( "edit_{$taxonomy}", $term_id, $tt_id ); 2991 2991 2992 2992 /** This filter is documented in wp-includes/taxonomy.php */ 2993 2993 $term_id = apply_filters( 'term_id_filter', $term_id, $tt_id ); … … 3016 3016 * @param int $term_id Term ID. 3017 3017 * @param int $tt_id Term taxonomy ID. 3018 3018 */ 3019 do_action( "edited_ $taxonomy", $term_id, $tt_id );3019 do_action( "edited_{$taxonomy}", $term_id, $tt_id ); 3020 3020 3021 3021 return array('term_id' => $term_id, 'term_taxonomy_id' => $tt_id); 3022 3022 } -
wp-includes/theme.php
902 902 * @param string $value The new value of the theme mod. 903 903 * @param string $old_value The current value of the theme mod. 904 904 */ 905 $mods[ $name ] = apply_filters( "pre_set_theme_mod_ $name", $value, $old_value );905 $mods[ $name ] = apply_filters( "pre_set_theme_mod_{$name}", $value, $old_value ); 906 906 907 907 $theme = get_option( 'stylesheet' ); 908 908 update_option( "theme_mods_$theme", $mods ); -
wp-login.php
431 431 * 432 432 * @since 2.8.0 433 433 */ 434 do_action( 'login_form_' . $action);434 do_action( "login_form_{$action}" ); 435 435 436 436 $http_post = ('POST' == $_SERVER['REQUEST_METHOD']); 437 437 $interim_login = isset($_REQUEST['interim-login']);