equal
deleted
inserted
replaced
249 * |
249 * |
250 * @since 3.1.0 |
250 * @since 3.1.0 |
251 * |
251 * |
252 * @global array $themes_allowedtags |
252 * @global array $themes_allowedtags |
253 * |
253 * |
254 * @param object $theme { |
254 * @param stdClass $theme { |
255 * An object that contains theme data returned by the WordPress.org API. |
255 * An object that contains theme data returned by the WordPress.org API. |
256 * |
256 * |
257 * @type string $name Theme name, e.g. 'Twenty Twenty-One'. |
257 * @type string $name Theme name, e.g. 'Twenty Twenty-One'. |
258 * @type string $slug Theme slug, e.g. 'twentytwentyone'. |
258 * @type string $slug Theme slug, e.g. 'twentytwentyone'. |
259 * @type string $version Theme version, e.g. '1.1'. |
259 * @type string $version Theme version, e.g. '1.1'. |
350 * |
350 * |
351 * @since 3.4.0 |
351 * @since 3.4.0 |
352 * |
352 * |
353 * @param string[] $actions An array of theme action links. Defaults are |
353 * @param string[] $actions An array of theme action links. Defaults are |
354 * links to Install Now, Preview, and Details. |
354 * links to Install Now, Preview, and Details. |
355 * @param WP_Theme $theme Theme object. |
355 * @param stdClass $theme An object that contains theme data returned by the |
|
356 * WordPress.org API. |
356 */ |
357 */ |
357 $actions = apply_filters( 'theme_install_actions', $actions, $theme ); |
358 $actions = apply_filters( 'theme_install_actions', $actions, $theme ); |
358 |
359 |
359 ?> |
360 ?> |
360 <a class="screenshot install-theme-preview" href="<?php echo esc_url( $preview_url ); ?>" title="<?php echo esc_attr( $preview_title ); ?>"> |
361 <a class="screenshot install-theme-preview" href="<?php echo esc_url( $preview_url ); ?>" title="<?php echo esc_attr( $preview_title ); ?>"> |
361 <img src="<?php echo esc_url( $theme->screenshot_url ); ?>" width="150" alt="" /> |
362 <img src="<?php echo esc_url( $theme->screenshot_url . '?ver=' . $theme->version ); ?>" width="150" alt="" /> |
362 </a> |
363 </a> |
363 |
364 |
364 <h3><?php echo $name; ?></h3> |
365 <h3><?php echo $name; ?></h3> |
365 <div class="theme-author"> |
366 <div class="theme-author"> |
366 <?php |
367 <?php |
410 |
411 |
411 /** |
412 /** |
412 * Prints the wrapper for the theme installer with a provided theme's data. |
413 * Prints the wrapper for the theme installer with a provided theme's data. |
413 * Used to make the theme installer work for no-js. |
414 * Used to make the theme installer work for no-js. |
414 * |
415 * |
415 * @param object $theme - A WordPress.org Theme API object. |
416 * @param stdClass $theme A WordPress.org Theme API object. |
416 */ |
417 */ |
417 public function theme_installer_single( $theme ) { |
418 public function theme_installer_single( $theme ) { |
418 ?> |
419 ?> |
419 <div id="theme-installer" class="wp-full-overlay single-theme"> |
420 <div id="theme-installer" class="wp-full-overlay single-theme"> |
420 <div class="wp-full-overlay-sidebar"> |
421 <div class="wp-full-overlay-sidebar"> |
430 /** |
431 /** |
431 * Prints the info for a theme (to be used in the theme installer modal). |
432 * Prints the info for a theme (to be used in the theme installer modal). |
432 * |
433 * |
433 * @global array $themes_allowedtags |
434 * @global array $themes_allowedtags |
434 * |
435 * |
435 * @param object $theme - A WordPress.org Theme API object. |
436 * @param stdClass $theme A WordPress.org Theme API object. |
436 */ |
437 */ |
437 public function install_theme_info( $theme ) { |
438 public function install_theme_info( $theme ) { |
438 global $themes_allowedtags; |
439 global $themes_allowedtags; |
439 |
440 |
440 if ( empty( $theme ) ) { |
441 if ( empty( $theme ) ) { |
499 /* translators: %s: Theme author. */ |
500 /* translators: %s: Theme author. */ |
500 printf( __( 'By %s' ), $author ); |
501 printf( __( 'By %s' ), $author ); |
501 ?> |
502 ?> |
502 </span> |
503 </span> |
503 <?php if ( isset( $theme->screenshot_url ) ) : ?> |
504 <?php if ( isset( $theme->screenshot_url ) ) : ?> |
504 <img class="theme-screenshot" src="<?php echo esc_url( $theme->screenshot_url ); ?>" alt="" /> |
505 <img class="theme-screenshot" src="<?php echo esc_url( $theme->screenshot_url . '?ver=' . $theme->version ); ?>" alt="" /> |
505 <?php endif; ?> |
506 <?php endif; ?> |
506 <div class="theme-details"> |
507 <div class="theme-details"> |
507 <?php |
508 <?php |
508 wp_star_rating( |
509 wp_star_rating( |
509 array( |
510 array( |
544 /** |
545 /** |
545 * Check to see if the theme is already installed. |
546 * Check to see if the theme is already installed. |
546 * |
547 * |
547 * @since 3.4.0 |
548 * @since 3.4.0 |
548 * |
549 * |
549 * @param object $theme - A WordPress.org Theme API object. |
550 * @param stdClass $theme A WordPress.org Theme API object. |
550 * @return string Theme status. |
551 * @return string Theme status. |
551 */ |
552 */ |
552 private function _get_theme_status( $theme ) { |
553 private function _get_theme_status( $theme ) { |
553 $status = 'install'; |
554 $status = 'install'; |
554 |
555 |