wp/wp-admin/includes/class-theme-upgrader-skin.php
changeset 21 48c4eec2b7e6
parent 18 be944660c56a
equal deleted inserted replaced
20:7b1b88e27a20 21:48c4eec2b7e6
    49 
    49 
    50 		parent::__construct( $args );
    50 		parent::__construct( $args );
    51 	}
    51 	}
    52 
    52 
    53 	/**
    53 	/**
    54 	 * Action to perform following a single theme update.
    54 	 * Performs an action following a single theme update.
    55 	 *
    55 	 *
    56 	 * @since 2.8.0
    56 	 * @since 2.8.0
    57 	 */
    57 	 */
    58 	public function after() {
    58 	public function after() {
    59 		$this->decrement_update_count( 'theme' );
    59 		$this->decrement_update_count( 'theme' );
    88 					$update_actions['preview'] = sprintf(
    88 					$update_actions['preview'] = sprintf(
    89 						'<a href="%s" class="hide-if-no-customize load-customize">' .
    89 						'<a href="%s" class="hide-if-no-customize load-customize">' .
    90 						'<span aria-hidden="true">%s</span><span class="screen-reader-text">%s</span></a>',
    90 						'<span aria-hidden="true">%s</span><span class="screen-reader-text">%s</span></a>',
    91 						esc_url( $customize_url ),
    91 						esc_url( $customize_url ),
    92 						__( 'Customize' ),
    92 						__( 'Customize' ),
    93 						/* translators: %s: Theme name. */
    93 						/* translators: Hidden accessibility text. %s: Theme name. */
    94 						sprintf( __( 'Customize &#8220;%s&#8221;' ), $name )
    94 						sprintf( __( 'Customize &#8220;%s&#8221;' ), $name )
    95 					);
    95 					);
    96 				}
    96 				}
    97 			} elseif ( current_user_can( 'switch_themes' ) ) {
    97 			} elseif ( current_user_can( 'switch_themes' ) ) {
    98 				if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) {
    98 				if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) {
    99 					$update_actions['preview'] = sprintf(
    99 					$update_actions['preview'] = sprintf(
   100 						'<a href="%s" class="hide-if-no-customize load-customize">' .
   100 						'<a href="%s" class="hide-if-no-customize load-customize">' .
   101 						'<span aria-hidden="true">%s</span><span class="screen-reader-text">%s</span></a>',
   101 						'<span aria-hidden="true">%s</span><span class="screen-reader-text">%s</span></a>',
   102 						esc_url( $customize_url ),
   102 						esc_url( $customize_url ),
   103 						__( 'Live Preview' ),
   103 						__( 'Live Preview' ),
   104 						/* translators: %s: Theme name. */
   104 						/* translators: Hidden accessibility text. %s: Theme name. */
   105 						sprintf( __( 'Live Preview &#8220;%s&#8221;' ), $name )
   105 						sprintf( __( 'Live Preview &#8220;%s&#8221;' ), $name )
   106 					);
   106 					);
   107 				}
   107 				}
   108 
   108 
   109 				$update_actions['activate'] = sprintf(
   109 				$update_actions['activate'] = sprintf(
   110 					'<a href="%s" class="activatelink">' .
   110 					'<a href="%s" class="activatelink">' .
   111 					'<span aria-hidden="true">%s</span><span class="screen-reader-text">%s</span></a>',
   111 					'<span aria-hidden="true">%s</span><span class="screen-reader-text">%s</span></a>',
   112 					esc_url( $activate_link ),
   112 					esc_url( $activate_link ),
   113 					__( 'Activate' ),
   113 					_x( 'Activate', 'theme' ),
   114 					/* translators: %s: Theme name. */
   114 					/* translators: Hidden accessibility text. %s: Theme name. */
   115 					sprintf( _x( 'Activate &#8220;%s&#8221;', 'theme' ), $name )
   115 					sprintf( _x( 'Activate &#8220;%s&#8221;', 'theme' ), $name )
   116 				);
   116 				);
   117 			}
   117 			}
   118 
   118 
   119 			if ( ! $this->result || is_wp_error( $this->result ) || is_network_admin() ) {
   119 			if ( ! $this->result || is_wp_error( $this->result ) || is_network_admin() ) {