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.


Built from https://develop.svn.wordpress.org/trunk@42343


git-svn-id: http://core.svn.wordpress.org/trunk@42172 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Gary Pendergast
2017-11-30 23:11:00 +00:00
parent 62be7ad218
commit aaf99e6913
610 changed files with 55731 additions and 43711 deletions

View File

@@ -20,23 +20,21 @@ class Bulk_Plugin_Upgrader_Skin extends Bulk_Upgrader_Skin {
public function add_strings() {
parent::add_strings();
$this->upgrader->strings['skin_before_update_header'] = __('Updating Plugin %1$s (%2$d/%3$d)');
$this->upgrader->strings['skin_before_update_header'] = __( 'Updating Plugin %1$s (%2$d/%3$d)' );
}
/**
*
* @param string $title
*/
public function before($title = '') {
parent::before($this->plugin_info['Title']);
public function before( $title = '' ) {
parent::before( $this->plugin_info['Title'] );
}
/**
*
* @param string $title
*/
public function after($title = '') {
parent::after($this->plugin_info['Title']);
public function after( $title = '' ) {
parent::after( $this->plugin_info['Title'] );
$this->decrement_update_count( 'plugin' );
}
@@ -44,12 +42,13 @@ class Bulk_Plugin_Upgrader_Skin extends Bulk_Upgrader_Skin {
*/
public function bulk_footer() {
parent::bulk_footer();
$update_actions = array(
$update_actions = array(
'plugins_page' => '<a href="' . self_admin_url( 'plugins.php' ) . '" target="_parent">' . __( 'Return to Plugins page' ) . '</a>',
'updates_page' => '<a href="' . self_admin_url( 'update-core.php' ) . '" target="_parent">' . __( 'Return to WordPress Updates page' ) . '</a>'
'updates_page' => '<a href="' . self_admin_url( 'update-core.php' ) . '" target="_parent">' . __( 'Return to WordPress Updates page' ) . '</a>',
);
if ( ! current_user_can( 'activate_plugins' ) )
if ( ! current_user_can( 'activate_plugins' ) ) {
unset( $update_actions['plugins_page'] );
}
/**
* Filters the list of action links available following bulk plugin updates.
@@ -61,7 +60,8 @@ class Bulk_Plugin_Upgrader_Skin extends Bulk_Upgrader_Skin {
*/
$update_actions = apply_filters( 'update_bulk_plugins_complete_actions', $update_actions, $this->plugin_info );
if ( ! empty($update_actions) )
$this->feedback(implode(' | ', (array)$update_actions));
if ( ! empty( $update_actions ) ) {
$this->feedback( implode( ' | ', (array) $update_actions ) );
}
}
}