Make WordPress Core


Ignore:
Timestamp:
11/30/2017 11:09:33 PM (6 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/includes/class-bulk-theme-upgrader-skin.php

    r41161 r42343  
    2121    public function add_strings() {
    2222        parent::add_strings();
    23         $this->upgrader->strings['skin_before_update_header'] = __('Updating Theme %1$s (%2$d/%3$d)');
     23        $this->upgrader->strings['skin_before_update_header'] = __( 'Updating Theme %1$s (%2$d/%3$d)' );
    2424    }
    2525
    2626    /**
    27      *
    2827     * @param string $title
    2928     */
    30     public function before($title = '') {
    31         parent::before( $this->theme_info->display('Name') );
     29    public function before( $title = '' ) {
     30        parent::before( $this->theme_info->display( 'Name' ) );
    3231    }
    3332
    3433    /**
    35      *
    3634     * @param string $title
    3735     */
    38     public function after($title = '') {
    39         parent::after( $this->theme_info->display('Name') );
     36    public function after( $title = '' ) {
     37        parent::after( $this->theme_info->display( 'Name' ) );
    4038        $this->decrement_update_count( 'theme' );
    4139    }
     
    4543    public function bulk_footer() {
    4644        parent::bulk_footer();
    47         $update_actions =  array(
    48             'themes_page' => '<a href="' . self_admin_url( 'themes.php' ) . '" target="_parent">' . __( 'Return to Themes page' ) . '</a>',
    49             'updates_page' => '<a href="' . self_admin_url( 'update-core.php' ) . '" target="_parent">' . __( 'Return to WordPress Updates page' ) . '</a>'
     45        $update_actions = array(
     46            'themes_page'  => '<a href="' . self_admin_url( 'themes.php' ) . '" target="_parent">' . __( 'Return to Themes page' ) . '</a>',
     47            'updates_page' => '<a href="' . self_admin_url( 'update-core.php' ) . '" target="_parent">' . __( 'Return to WordPress Updates page' ) . '</a>',
    5048        );
    51         if ( ! current_user_can( 'switch_themes' ) && ! current_user_can( 'edit_theme_options' ) )
     49        if ( ! current_user_can( 'switch_themes' ) && ! current_user_can( 'edit_theme_options' ) ) {
    5250            unset( $update_actions['themes_page'] );
     51        }
    5352
    5453        /**
     
    6261        $update_actions = apply_filters( 'update_bulk_theme_complete_actions', $update_actions, $this->theme_info );
    6362
    64         if ( ! empty($update_actions) )
    65             $this->feedback(implode(' | ', (array)$update_actions));
     63        if ( ! empty( $update_actions ) ) {
     64            $this->feedback( implode( ' | ', (array) $update_actions ) );
     65        }
    6666    }
    6767}
Note: See TracChangeset for help on using the changeset viewer.