From 7086111ad4dd997e12a3220e1ee60c9b9bcf0bb8 Mon Sep 17 00:00:00 2001 From: Charles Date: Tue, 7 Jan 2020 13:06:14 +0100 Subject: Added wordpress --- .../customize/class-wp-customize-theme-control.php | 139 +++++++++++++++++++++ 1 file changed, 139 insertions(+) create mode 100644 srcs/wordpress/wp-includes/customize/class-wp-customize-theme-control.php (limited to 'srcs/wordpress/wp-includes/customize/class-wp-customize-theme-control.php') diff --git a/srcs/wordpress/wp-includes/customize/class-wp-customize-theme-control.php b/srcs/wordpress/wp-includes/customize/class-wp-customize-theme-control.php new file mode 100644 index 0000000..09ba810 --- /dev/null +++ b/srcs/wordpress/wp-includes/customize/class-wp-customize-theme-control.php @@ -0,0 +1,139 @@ +json['theme'] = $this->theme; + } + + /** + * Don't render the control content from PHP, as it's rendered via JS on load. + * + * @since 4.2.0 + */ + public function render_content() {} + + /** + * Render a JS template for theme display. + * + * @since 4.2.0 + */ + public function content_template() { + /* translators: %s: Theme name. */ + $details_label = sprintf( __( 'Details for theme: %s' ), '{{ data.theme.name }}' ); + /* translators: %s: Theme name. */ + $customize_label = sprintf( __( 'Customize theme: %s' ), '{{ data.theme.name }}' ); + /* translators: %s: Theme name. */ + $preview_label = sprintf( __( 'Live preview theme: %s' ), '{{ data.theme.name }}' ); + /* translators: %s: Theme name. */ + $install_label = sprintf( __( 'Install and preview theme: %s' ), '{{ data.theme.name }}' ); + ?> + <# if ( data.theme.active ) { #> +
+ <# } else { #> +
+ <# } #> + + <# if ( data.theme.screenshot && data.theme.screenshot[0] ) { #> +
+ +
+ <# } else { #> +
+ <# } #> + + + +
+ +
+ + <# if ( 'installed' === data.theme.type && data.theme.hasUpdate ) { #> +
+

+ ' . __( 'Update now' ) . '' + ); + } + ?> +

+
+ <# } #> + + <# if ( data.theme.active ) { #> +
+

+ {{ data.theme.name }} +

+
+ +
+
+

+ <# } else if ( 'installed' === data.theme.type ) { #> +
+

{{ data.theme.name }}

+
+ +
+
+

+ <# } else { #> +
+

{{ data.theme.name }}

+
+ +
+
+ <# } #> +
+