Make WordPress Core

Ticket #37748: 37748.2.patch

File 37748.2.patch, 12.9 KB (added by ramiy, 9 years ago)
  • wp-admin/admin-footer.php

     
    8383 *
    8484 * @param string $hook_suffix The current admin page.
    8585 */
    86 do_action( "admin_print_footer_scripts-$hook_suffix" );
     86do_action( "admin_print_footer_scripts-{$hook_suffix}" );
    8787
    8888/**
    8989 * Prints any scripts and data queued for the footer.
     
    103103 * @global string $hook_suffix
    104104 * @param string $hook_suffix The current admin page.
    105105 */
    106 do_action( "admin_footer-$hook_suffix" );
     106do_action( "admin_footer-{$hook_suffix}" );
    107107
    108108// get_site_option() won't exist when auto upgrading from <= 2.7
    109109if ( function_exists('get_site_option') ) {
  • wp-admin/admin-header.php

     
    9696 *
    9797 * @since 2.6.0
    9898 */
    99 do_action( "admin_print_styles-$hook_suffix" );
     99do_action( "admin_print_styles-{$hook_suffix}" );
    100100
    101101/**
    102102 * Fires when styles are printed for all admin pages.
     
    110110 *
    111111 * @since 2.1.0
    112112 */
    113 do_action( "admin_print_scripts-$hook_suffix" );
     113do_action( "admin_print_scripts-{$hook_suffix}" );
    114114
    115115/**
    116116 * Fires when scripts are printed for all admin pages.
     
    127127 *
    128128 * @since 2.1.0
    129129 */
    130 do_action( "admin_head-$hook_suffix" );
     130do_action( "admin_head-{$hook_suffix}" );
    131131
    132132/**
    133133 * Fires in head section for all admin pages.
  • wp-admin/admin.php

     
    209209                 *
    210210                 * @since 2.1.0
    211211                 */
    212                 do_action( 'load-' . $page_hook );
     212                do_action( "load-{$page_hook}" );
    213213                if (! isset($_GET['noheader']))
    214214                        require_once(ABSPATH . 'wp-admin/admin-header.php');
    215215
     
    239239                 *
    240240                 * @since 1.5.0
    241241                 */
    242                 do_action( 'load-' . $plugin_page );
     242                do_action( "load-{$plugin_page}" );
    243243
    244244                if ( !isset($_GET['noheader']))
    245245                        require_once(ABSPATH . 'wp-admin/admin-header.php');
     
    278278         *
    279279         * @since 3.5.0
    280280         */
    281         do_action( 'load-importer-' . $importer );
     281        do_action( "load-importer-{$importer}" );
    282282
    283283        $parent_file = 'tools.php';
    284284        $submenu_file = 'import.php';
     
    326326         *
    327327         * @since 2.1.0
    328328         */
    329         do_action( 'load-' . $pagenow );
     329        do_action( "load-{$pagenow}" );
    330330
    331331        /*
    332332         * The following hooks are fired to ensure backward compatibility.
  • wp-admin/edit-form-advanced.php

     
    331331 *
    332332 * @param WP_Post $post Post object.
    333333 */
    334 do_action( 'add_meta_boxes_' . $post_type, $post );
     334do_action( "add_meta_boxes_{$post_type}", $post );
    335335
    336336/**
    337337 * Fires after meta boxes have been added.
  • wp-admin/includes/class-wp-automatic-updater.php

     
    176176                 * @param bool   $update Whether to update.
    177177                 * @param object $item   The update offer.
    178178                 */
    179                 $update = apply_filters( 'auto_update_' . $type, $update, $item );
     179                $update = apply_filters( "auto_update_{$type}", $update, $item );
    180180
    181181                if ( ! $update ) {
    182182                        if ( 'core' == $type )
  • wp-admin/includes/class-wp-ms-themes-list-table.php

     
    518518                 * @param WP_Theme $theme   The current WP_Theme object.
    519519                 * @param string   $context Status of the theme.
    520520                 */
    521                 $actions = apply_filters( "theme_action_links_$stylesheet", $actions, $theme, $context );
     521                $actions = apply_filters( "theme_action_links_{$stylesheet}", $actions, $theme, $context );
    522522
    523523                echo $this->row_actions( $actions, true );
    524524        }
     
    726726                 * @param WP_Theme $theme      Current WP_Theme object.
    727727                 * @param string   $status     Status of the theme.
    728728                 */
    729                 do_action( "after_theme_row_$stylesheet", $stylesheet, $theme, $status );
     729                do_action( "after_theme_row_{$stylesheet}", $stylesheet, $theme, $status );
    730730        }
    731731}
  • wp-admin/includes/class-wp-plugin-install-list-table.php

     
    200200                 *
    201201                 * @param array|bool $args Plugin Install API arguments.
    202202                 */
    203                 $args = apply_filters( "install_plugins_table_api_args_$tab", $args );
     203                $args = apply_filters( "install_plugins_table_api_args_{$tab}", $args );
    204204
    205205                if ( !$args )
    206206                        return;
  • wp-admin/includes/class-wp-plugins-list-table.php

     
    864864                 *                            'Inactive', 'Recently Activated', 'Upgrade', 'Must-Use',
    865865                 *                            'Drop-ins', 'Search'.
    866866                 */
    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 );
    868868        }
    869869
    870870        /**
  • wp-admin/includes/class-wp-theme-install-list-table.php

     
    134134                 *
    135135                 * @param array $args An array of themes API arguments.
    136136                 */
    137                 $args = apply_filters( 'install_themes_table_api_args_' . $tab, $args );
     137                $args = apply_filters( "install_themes_table_api_args_{$tab}", $args );
    138138
    139139                if ( ! $args )
    140140                        return;
  • wp-admin/includes/media.php

     
    619619         *
    620620         * @param string $upload_iframe_src The upload iframe source URL by type.
    621621         */
    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 );
    623623
    624624        return add_query_arg('TB_iframe', true, $upload_iframe_src);
    625625}
     
    787787                         * @param string $src   Media source URL.
    788788                         * @param string $title Media title.
    789789                         */
    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 );
    791791                } else {
    792792                        $align = '';
    793793                        $alt = esc_attr( wp_unslash( $_POST['alt'] ) );
  • wp-admin/includes/plugin.php

     
    588588                         * @param bool $network_wide Whether to enable the plugin for all sites in the network
    589589                         *                           or just the current site. Multisite only. Default is false.
    590590                         */
    591                         do_action( 'activate_' . $plugin, $network_wide );
     591                        do_action( "activate_{$plugin}", $network_wide );
    592592                }
    593593
    594594                if ( $network_wide ) {
  • wp-admin/includes/revision.php

     
    7070                 * @param string  null                  The context of whether the current revision is the old
    7171                 *                                      or the new one. Values are 'to' or 'from'.
    7272                 */
    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' ) : '';
    7474
    7575                /** 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' );
    7777
    7878                $args = array(
    7979                        'show_split_view' => true
  • wp-admin/media-upload.php

     
    9595         *
    9696         * @since 2.5.0
    9797         */
    98         do_action( "media_upload_$type" );
     98        do_action( "media_upload_{$type}" );
    9999} else {
    100100        /**
    101101         * Fires inside limited and specific upload-tab views in the legacy
     
    107107         *
    108108         * @since 2.5.0
    109109         */
    110         do_action( "media_upload_$tab" );
     110        do_action( "media_upload_{$tab}" );
    111111}
    112112
  • wp-admin/plugin-install.php

     
    6464 *
    6565 * @since 2.7.0
    6666 */
    67 do_action( "install_plugins_pre_$tab" );
     67do_action( "install_plugins_pre_{$tab}" );
    6868
    6969/*
    7070 * Call the pre upload action on every non-upload plugin install screen
     
    155155 *
    156156 * @param int $paged The current page number of the plugins list table.
    157157 */
    158 do_action( "install_plugins_$tab", $paged ); ?>
     158do_action( "install_plugins_{$tab}", $paged ); ?>
    159159
    160160        <span class="spinner"></span>
    161161</div>
  • wp-includes/option.php

     
    534534                 *
    535535                 * @param string $option Name of the deleted option.
    536536                 */
    537                 do_action( "delete_option_$option", $option );
     537                do_action( "delete_option_{$option}", $option );
    538538
    539539                /**
    540540                 * Fires after an option has been deleted.
     
    568568         *
    569569         * @param string $transient Transient name.
    570570         */
    571         do_action( 'delete_transient_' . $transient, $transient );
     571        do_action( "delete_transient_{$transient}", $transient );
    572572
    573573        if ( wp_using_ext_object_cache() ) {
    574574                $result = wp_cache_delete( $transient, 'transient' );
     
    758758                 * @param int    $expiration Time until expiration in seconds.
    759759                 * @param string $transient  The name of the transient.
    760760                 */
    761                 do_action( 'set_transient_' . $transient, $value, $expiration, $transient );
     761                do_action( "set_transient_{$transient}", $value, $expiration, $transient );
    762762
    763763                /**
    764764                 * Fires after the value for a transient has been set.
     
    12711271                 * @param string $option Name of the network option.
    12721272                 * @param mixed  $value  Value of the network option.
    12731273                 */
    1274                 do_action( 'add_site_option_' . $option, $option, $value );
     1274                do_action( "add_site_option_{$option}", $option, $value );
    12751275
    12761276                /**
    12771277                 * Fires after a network option has been successfully added.
     
    13271327         *
    13281328         * @param string $option Option name.
    13291329         */
    1330         do_action( 'pre_delete_site_option_' . $option, $option );
     1330        do_action( "pre_delete_site_option_{$option}", $option );
    13311331
    13321332        if ( ! is_multisite() ) {
    13331333                $result = delete_option( $option );
     
    13541354                 *
    13551355                 * @param string $option Name of the network option.
    13561356                 */
    1357                 do_action( 'delete_site_option_' . $option, $option );
     1357                do_action( "delete_site_option_{$option}", $option );
    13581358
    13591359                /**
    13601360                 * Fires after a network option has been deleted.
     
    14621462                 * @param mixed  $value     Current value of the network option.
    14631463                 * @param mixed  $old_value Old value of the network option.
    14641464                 */
    1465                 do_action( 'update_site_option_' . $option, $option, $value, $old_value );
     1465                do_action( "update_site_option_{$option}", $option, $value, $old_value );
    14661466
    14671467                /**
    14681468                 * Fires after the value of a network option has been successfully updated.
     
    15001500         *
    15011501         * @param string $transient Transient name.
    15021502         */
    1503         do_action( 'delete_site_transient_' . $transient, $transient );
     1503        do_action( "delete_site_transient_{$transient}", $transient );
    15041504
    15051505        if ( wp_using_ext_object_cache() ) {
    15061506                $result = wp_cache_delete( $transient, 'site-transient' );
     
    16711671                 * @param int    $expiration Time until expiration in seconds.
    16721672                 * @param string $transient  Transient name.
    16731673                 */
    1674                 do_action( 'set_site_transient_' . $transient, $value, $expiration, $transient );
     1674                do_action( "set_site_transient_{$transient}", $value, $expiration, $transient );
    16751675
    16761676                /**
    16771677                 * Fires after the value for a site transient has been set.