Make WordPress Core


Ignore:
Timestamp:
11/30/2017 11:09:33 PM (7 years ago)
Author:
pento
Message:

Code is Poetry.
WordPress' code just... wasn't.
This is now dealt with.

Props jrf, pento, netweb, GaryJ, jdgrimes, westonruter, Greg Sherwood from PHPCS, and everyone who's ever contributed to WPCS and PHPCS.
Fixes #41057.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/press-this.php

    r41794 r42343  
    77 */
    88
    9 define( 'IFRAME_REQUEST' , true );
     9define( 'IFRAME_REQUEST', true );
    1010
    1111/** WordPress Administration Bootstrap */
     
    2828    } elseif ( current_user_can( 'activate_plugins' ) ) {
    2929        if ( file_exists( WP_PLUGIN_DIR . '/' . $plugin_file ) ) {
    30             $url = wp_nonce_url( add_query_arg( array(
    31                 'action' => 'activate',
    32                 'plugin' => $plugin_file,
    33                 'from'   => 'press-this',
    34             ), admin_url( 'plugins.php' ) ), 'activate-plugin_' . $plugin_file );
     30            $url    = wp_nonce_url(
     31                add_query_arg(
     32                    array(
     33                        'action' => 'activate',
     34                        'plugin' => $plugin_file,
     35                        'from'   => 'press-this',
     36                    ), admin_url( 'plugins.php' )
     37                ), 'activate-plugin_' . $plugin_file
     38            );
    3539            $action = sprintf(
    3640                '<a href="%1$s" aria-label="%2$s">%2$s</a>',
     
    4044        } else {
    4145            if ( is_main_site() ) {
    42                 $url = wp_nonce_url( add_query_arg( array(
    43                     'action' => 'install-plugin',
    44                     'plugin' => $plugin_slug,
    45                     'from'   => 'press-this',
    46                 ), self_admin_url( 'update.php' ) ), 'install-plugin_' . $plugin_slug );
     46                $url    = wp_nonce_url(
     47                    add_query_arg(
     48                        array(
     49                            'action' => 'install-plugin',
     50                            'plugin' => $plugin_slug,
     51                            'from'   => 'press-this',
     52                        ), self_admin_url( 'update.php' )
     53                    ), 'install-plugin_' . $plugin_slug
     54                );
    4755                $action = sprintf(
    4856                    '<a href="%1$s" class="install-now" data-slug="%2$s" data-name="%2$s" aria-label="%3$s">%3$s</a>',
Note: See TracChangeset for help on using the changeset viewer.