3 * Upgrader API: Bulk_Plugin_Upgrader_Skin class
11 * Bulk Plugin Upgrader Skin for WordPress Plugin Upgrades.
14 * @since 4.6.0 Moved to its own file from wp-admin/includes/class-wp-upgrader-skins.php.
16 * @see Bulk_Upgrader_Skin
18 class Bulk_Plugin_Upgrader_Skin extends Bulk_Upgrader_Skin {
19 public $plugin_info = array(); // Plugin_Upgrader::bulk() will fill this in.
21 public function add_strings() {
22 parent::add_strings();
23 $this->upgrader->strings['skin_before_update_header'] = __('Updating Plugin %1$s (%2$d/%3$d)');
28 * @param string $title
30 public function before($title = '') {
31 parent::before($this->plugin_info['Title']);
36 * @param string $title
38 public function after($title = '') {
39 parent::after($this->plugin_info['Title']);
40 $this->decrement_update_count( 'plugin' );
46 public function bulk_footer() {
47 parent::bulk_footer();
48 $update_actions = array(
49 'plugins_page' => '<a href="' . self_admin_url( 'plugins.php' ) . '" target="_parent">' . __( 'Return to Plugins page' ) . '</a>',
50 'updates_page' => '<a href="' . self_admin_url( 'update-core.php' ) . '" target="_parent">' . __( 'Return to WordPress Updates page' ) . '</a>'
52 if ( ! current_user_can( 'activate_plugins' ) )
53 unset( $update_actions['plugins_page'] );
56 * Filters the list of action links available following bulk plugin updates.
60 * @param array $update_actions Array of plugin action links.
61 * @param array $plugin_info Array of information for the last-updated plugin.
63 $update_actions = apply_filters( 'update_bulk_plugins_complete_actions', $update_actions, $this->plugin_info );
65 if ( ! empty($update_actions) )
66 $this->feedback(implode(' | ', (array)$update_actions));