Changeset 36015
- Timestamp:
- 12/18/2015 11:59:07 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/theme.php
r35729 r36015 164 164 $details_url = add_query_arg(array('TB_iframe' => 'true', 'width' => 1024, 'height' => 800), $update['url']); //Theme browser inside WP? replace this, Also, theme preview JS will override this on the available list. 165 165 $update_url = wp_nonce_url( admin_url( 'update.php?action=upgrade-theme&theme=' . urlencode( $stylesheet ) ), 'upgrade-theme_' . $stylesheet ); 166 $update_onclick = 'onclick="if ( confirm(\'' . esc_js( __("Updating this theme will lose any customizations you have made. 'Cancel' to stop, 'OK' to update.") ) . '\') ) {return true;}return false;"';167 166 168 167 if ( !is_multisite() ) { 169 168 if ( ! current_user_can('update_themes') ) { 170 $html = sprintf( '<p><strong>' . __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a>.' ) . '</strong></p>', 171 $theme_name, esc_url( $details_url ), esc_attr( $theme['Name'] ), $update['new_version'] ); 169 /* translators: 1: theme name, 2: theme details URL, 3: theme version number */ 170 $html = sprintf( '<p><strong>' . __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox">View version %3$s details</a>.' ) . '</strong></p>', 171 $theme_name, esc_url( $details_url ), $update['new_version'] ); 172 172 } elseif ( empty( $update['package'] ) ) { 173 $html = sprintf( '<p><strong>' . __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a>. <em>Automatic update is unavailable for this theme.</em>' ) . '</strong></p>', 174 $theme_name, esc_url( $details_url ), esc_attr( $theme['Name'] ), $update['new_version'] ); 173 /* translators: 1: theme name, 2: theme details URL, 3: theme version number */ 174 $html = sprintf( '<p><strong>' . __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox">View version %3$s details</a>. <em>Automatic update is unavailable for this theme.</em>' ) . '</strong></p>', 175 $theme_name, esc_url( $details_url ), $update['new_version'] ); 175 176 } else { 176 $html = sprintf( '<p><strong>' . __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a> or <a href="%5$s">update now</a>.' ) . '</strong></p>', 177 $theme_name, esc_url( $details_url ), esc_attr( $theme['Name'] ), $update['new_version'], $update_url, $update_onclick ); 177 /* translators: 1: theme name, 2: theme details URL, 3: theme version number, 4: theme update URL */ 178 $html = sprintf( '<p><strong>' . __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox">View version %3$s details</a> or <a href="%4$s">update now</a>.' ) . '</strong></p>', 179 $theme_name, esc_url( $details_url ), $update['new_version'], $update_url ); 178 180 } 179 181 }
Note: See TracChangeset
for help on using the changeset viewer.