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 “%s”' ), $name ) |
94 sprintf( __( 'Customize “%s”' ), $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 “%s”' ), $name ) |
105 sprintf( __( 'Live Preview “%s”' ), $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 “%s”', 'theme' ), $name ) |
115 sprintf( _x( 'Activate “%s”', '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() ) { |