theme_installer();
+ }
+
+
+
+ /*
+ * Prints a theme from the WordPress.org API.
+ *
+ * @param object $theme An object that contains theme data returned by the WordPress.org API.
+ *
+ * Example theme data:
+ * object(stdClass)[59]
+ * public 'name' => string 'Magazine Basic' (length=14)
+ * public 'slug' => string 'magazine-basic' (length=14)
+ * public 'version' => string '1.1' (length=3)
+ * public 'author' => string 'tinkerpriest' (length=12)
+ * public 'preview_url' => string 'http://wp-themes.com/?magazine-basic' (length=36)
+ * public 'screenshot_url' => string 'http://wp-themes.com/wp-content/themes/magazine-basic/screenshot.png' (length=68)
+ * public 'rating' => float 80
+ * public 'num_ratings' => int 1
+ * public 'homepage' => string 'http://wordpress.org/extend/themes/magazine-basic' (length=49)
+ * public 'description' => string 'A basic magazine style layout with a fully customizable layout through a backend interface. Designed by c.bavota of Tinker Priest Media.' (length=214)
+ * public 'download_link' => string 'http://wordpress.org/extend/themes/download/magazine-basic.1.1.zip' (length=66)
+ */
+ function single_row( $theme ) {
+ global $themes_allowedtags;
+
+ if ( empty( $theme ) )
+ return;
+
+ $name = wp_kses( $theme->name, $themes_allowedtags );
+ $author = wp_kses( $theme->author, $themes_allowedtags );
+
+ $preview_title = sprintf( __('Preview “%s”'), $name );
+ $preview_url = add_query_arg( array(
+ 'tab' => 'theme-information',
+ 'theme' => $theme->slug,
+ ) );
+
+ ?>
+
+
+
+
+
by %2$s' ), $name, $author );
+ ?>
+
+ install_theme_info( $theme );
+ }
+
+ /*
+ * Prints the wrapper for the theme installer.
+ */
+ function theme_installer() {
?>
@@ -173,4 +229,71 @@
}
+ /*
+ * Prints the wrapper for the theme installer with a provided theme's data.
+ * Used to make the theme installer work for no-js.
+ *
+ * @param object $theme - A WordPress.org Theme API object.
+ */
+ function theme_installer_single( $theme ) {
+ $class = 'wp-full-overlay';
+ if ( $theme )
+ $class .= ' single-theme';
+
+ ?>
+