wp/wp-admin/includes/class-bulk-theme-upgrader-skin.php
changeset 16 a86126ab1dd4
parent 9 177826044cd9
child 18 be944660c56a
equal deleted inserted replaced
15:3d4e9c994f10 16:a86126ab1dd4
    18 class Bulk_Theme_Upgrader_Skin extends Bulk_Upgrader_Skin {
    18 class Bulk_Theme_Upgrader_Skin extends Bulk_Upgrader_Skin {
    19 	public $theme_info = array(); // Theme_Upgrader::bulk_upgrade() will fill this in.
    19 	public $theme_info = array(); // Theme_Upgrader::bulk_upgrade() will fill this in.
    20 
    20 
    21 	public function add_strings() {
    21 	public function add_strings() {
    22 		parent::add_strings();
    22 		parent::add_strings();
    23 		/* translators: 1: name of theme being updated, 2: number of updating themes, 3: total number of themes being updated */
    23 		/* translators: 1: Theme name, 2: Number of the theme, 3: Total number of themes being updated. */
    24 		$this->upgrader->strings['skin_before_update_header'] = __( 'Updating Theme %1$s (%2$d/%3$d)' );
    24 		$this->upgrader->strings['skin_before_update_header'] = __( 'Updating Theme %1$s (%2$d/%3$d)' );
    25 	}
    25 	}
    26 
    26 
    27 	/**
    27 	/**
    28 	 * @param string $title
    28 	 * @param string $title
    41 
    41 
    42 	/**
    42 	/**
    43 	 */
    43 	 */
    44 	public function bulk_footer() {
    44 	public function bulk_footer() {
    45 		parent::bulk_footer();
    45 		parent::bulk_footer();
       
    46 
    46 		$update_actions = array(
    47 		$update_actions = array(
    47 			'themes_page'  => '<a href="' . self_admin_url( 'themes.php' ) . '" target="_parent">' . __( 'Return to Themes page' ) . '</a>',
    48 			'themes_page'  => sprintf(
    48 			'updates_page' => '<a href="' . self_admin_url( 'update-core.php' ) . '" target="_parent">' . __( 'Return to WordPress Updates page' ) . '</a>',
    49 				'<a href="%s" target="_parent">%s</a>',
       
    50 				self_admin_url( 'themes.php' ),
       
    51 				__( 'Return to Themes page' )
       
    52 			),
       
    53 			'updates_page' => sprintf(
       
    54 				'<a href="%s" target="_parent">%s</a>',
       
    55 				self_admin_url( 'update-core.php' ),
       
    56 				__( 'Return to WordPress Updates page' )
       
    57 			),
    49 		);
    58 		);
       
    59 
    50 		if ( ! current_user_can( 'switch_themes' ) && ! current_user_can( 'edit_theme_options' ) ) {
    60 		if ( ! current_user_can( 'switch_themes' ) && ! current_user_can( 'edit_theme_options' ) ) {
    51 			unset( $update_actions['themes_page'] );
    61 			unset( $update_actions['themes_page'] );
    52 		}
    62 		}
    53 
    63 
    54 		/**
    64 		/**