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/includes/class-language-pack-upgrader-skin.php

    r41161 r42343  
    1717 */
    1818class Language_Pack_Upgrader_Skin extends WP_Upgrader_Skin {
    19     public $language_update = null;
    20     public $done_header = false;
    21     public $done_footer = false;
     19    public $language_update        = null;
     20    public $done_header            = false;
     21    public $done_footer            = false;
    2222    public $display_footer_actions = true;
    2323
    2424    /**
    25      *
    2625     * @param array $args
    2726     */
    2827    public function __construct( $args = array() ) {
    29         $defaults = array( 'url' => '', 'nonce' => '', 'title' => __( 'Update Translations' ), 'skip_header_footer' => false );
    30         $args = wp_parse_args( $args, $defaults );
     28        $defaults = array(
     29            'url'                => '',
     30            'nonce'              => '',
     31            'title'              => __( 'Update Translations' ),
     32            'skip_header_footer' => false,
     33        );
     34        $args     = wp_parse_args( $args, $defaults );
    3135        if ( $args['skip_header_footer'] ) {
    32             $this->done_header = true;
    33             $this->done_footer = true;
     36            $this->done_header            = true;
     37            $this->done_footer            = true;
    3438            $this->display_footer_actions = false;
    3539        }
     
    4852
    4953    /**
    50      *
    5154     * @param string|WP_Error $error
    5255     */
     
    6770    public function bulk_footer() {
    6871        $this->decrement_update_count( 'translation' );
    69         $update_actions = array();
     72        $update_actions                 = array();
    7073        $update_actions['updates_page'] = '<a href="' . self_admin_url( 'update-core.php' ) . '" target="_parent">' . __( 'Return to WordPress Updates page' ) . '</a>';
    7174
     
    7982        $update_actions = apply_filters( 'update_translations_complete_actions', $update_actions );
    8083
    81         if ( $update_actions && $this->display_footer_actions )
     84        if ( $update_actions && $this->display_footer_actions ) {
    8285            $this->feedback( implode( ' | ', $update_actions ) );
     86        }
    8387    }
    8488}
Note: See TracChangeset for help on using the changeset viewer.