2015-10-24 20:57:25 +02:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Customize API: WP_Customize_Theme_Control class
|
|
|
|
*
|
|
|
|
* @package WordPress
|
|
|
|
* @subpackage Customize
|
|
|
|
* @since 4.4.0
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Customize Theme Control class.
|
|
|
|
*
|
|
|
|
* @since 4.2.0
|
|
|
|
*
|
|
|
|
* @see WP_Customize_Control
|
|
|
|
*/
|
|
|
|
class WP_Customize_Theme_Control extends WP_Customize_Control {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Customize control type.
|
|
|
|
*
|
|
|
|
* @since 4.2.0
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
public $type = 'theme';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Theme object.
|
|
|
|
*
|
|
|
|
* @since 4.2.0
|
|
|
|
* @var WP_Theme
|
|
|
|
*/
|
|
|
|
public $theme;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Refresh the parameters passed to the JavaScript via JSON.
|
|
|
|
*
|
|
|
|
* @since 4.2.0
|
|
|
|
*
|
|
|
|
* @see WP_Customize_Control::to_json()
|
|
|
|
*/
|
|
|
|
public function to_json() {
|
|
|
|
parent::to_json();
|
|
|
|
$this->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() {
|
2019-09-03 02:41:05 +02:00
|
|
|
/* translators: %s: Theme name. */
|
Customize: Introduce a new experience for discovering, installing, and previewing themes within the customizer.
Unify the theme-browsing and theme-customization experiences by introducing a comprehensive theme browser and installer directly accessible in the customizer. Replaces the customizer theme switcher with a full-screen panel for discovering/browsing and installing themes available on WordPress.org. Themes can now be installed and previewed directly in the customizer without entering the wp-admin context. Also includes an extensible framework for browsing and installing themes from other sources.
Also includes CSS auto-prefixing added via `grunt precommit:css`.
For details, see: https://make.wordpress.org/core/2016/10/03/feature-proposal-a-new-experience-for-discovering-installing-and-previewing-themes-in-the-customizer/
Previously [38813] but reverted in [39140].
Fixes #37661, #34843, #38666.
Props celloexpressions, folletto, westonruter, karmatosed, melchoyce, afercia.
Built from https://develop.svn.wordpress.org/trunk@41648
git-svn-id: http://core.svn.wordpress.org/trunk@41482 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-29 22:13:50 +02:00
|
|
|
$details_label = sprintf( __( 'Details for theme: %s' ), '{{ data.theme.name }}' );
|
2019-09-03 02:41:05 +02:00
|
|
|
/* translators: %s: Theme name. */
|
Customize: Introduce a new experience for discovering, installing, and previewing themes within the customizer.
Unify the theme-browsing and theme-customization experiences by introducing a comprehensive theme browser and installer directly accessible in the customizer. Replaces the customizer theme switcher with a full-screen panel for discovering/browsing and installing themes available on WordPress.org. Themes can now be installed and previewed directly in the customizer without entering the wp-admin context. Also includes an extensible framework for browsing and installing themes from other sources.
Also includes CSS auto-prefixing added via `grunt precommit:css`.
For details, see: https://make.wordpress.org/core/2016/10/03/feature-proposal-a-new-experience-for-discovering-installing-and-previewing-themes-in-the-customizer/
Previously [38813] but reverted in [39140].
Fixes #37661, #34843, #38666.
Props celloexpressions, folletto, westonruter, karmatosed, melchoyce, afercia.
Built from https://develop.svn.wordpress.org/trunk@41648
git-svn-id: http://core.svn.wordpress.org/trunk@41482 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-29 22:13:50 +02:00
|
|
|
$customize_label = sprintf( __( 'Customize theme: %s' ), '{{ data.theme.name }}' );
|
2019-09-03 02:41:05 +02:00
|
|
|
/* translators: %s: Theme name. */
|
Customize: Introduce a new experience for discovering, installing, and previewing themes within the customizer.
Unify the theme-browsing and theme-customization experiences by introducing a comprehensive theme browser and installer directly accessible in the customizer. Replaces the customizer theme switcher with a full-screen panel for discovering/browsing and installing themes available on WordPress.org. Themes can now be installed and previewed directly in the customizer without entering the wp-admin context. Also includes an extensible framework for browsing and installing themes from other sources.
Also includes CSS auto-prefixing added via `grunt precommit:css`.
For details, see: https://make.wordpress.org/core/2016/10/03/feature-proposal-a-new-experience-for-discovering-installing-and-previewing-themes-in-the-customizer/
Previously [38813] but reverted in [39140].
Fixes #37661, #34843, #38666.
Props celloexpressions, folletto, westonruter, karmatosed, melchoyce, afercia.
Built from https://develop.svn.wordpress.org/trunk@41648
git-svn-id: http://core.svn.wordpress.org/trunk@41482 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-29 22:13:50 +02:00
|
|
|
$preview_label = sprintf( __( 'Live preview theme: %s' ), '{{ data.theme.name }}' );
|
2019-09-03 02:41:05 +02:00
|
|
|
/* translators: %s: Theme name. */
|
Customize: Introduce a new experience for discovering, installing, and previewing themes within the customizer.
Unify the theme-browsing and theme-customization experiences by introducing a comprehensive theme browser and installer directly accessible in the customizer. Replaces the customizer theme switcher with a full-screen panel for discovering/browsing and installing themes available on WordPress.org. Themes can now be installed and previewed directly in the customizer without entering the wp-admin context. Also includes an extensible framework for browsing and installing themes from other sources.
Also includes CSS auto-prefixing added via `grunt precommit:css`.
For details, see: https://make.wordpress.org/core/2016/10/03/feature-proposal-a-new-experience-for-discovering-installing-and-previewing-themes-in-the-customizer/
Previously [38813] but reverted in [39140].
Fixes #37661, #34843, #38666.
Props celloexpressions, folletto, westonruter, karmatosed, melchoyce, afercia.
Built from https://develop.svn.wordpress.org/trunk@41648
git-svn-id: http://core.svn.wordpress.org/trunk@41482 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-29 22:13:50 +02:00
|
|
|
$install_label = sprintf( __( 'Install and preview theme: %s' ), '{{ data.theme.name }}' );
|
2015-10-24 20:57:25 +02:00
|
|
|
?>
|
Customize: Introduce a new experience for discovering, installing, and previewing themes within the customizer.
Unify the theme-browsing and theme-customization experiences by introducing a comprehensive theme browser and installer directly accessible in the customizer. Replaces the customizer theme switcher with a full-screen panel for discovering/browsing and installing themes available on WordPress.org. Themes can now be installed and previewed directly in the customizer without entering the wp-admin context. Also includes an extensible framework for browsing and installing themes from other sources.
Also includes CSS auto-prefixing added via `grunt precommit:css`.
For details, see: https://make.wordpress.org/core/2016/10/03/feature-proposal-a-new-experience-for-discovering-installing-and-previewing-themes-in-the-customizer/
Previously [38813] but reverted in [39140].
Fixes #37661, #34843, #38666.
Props celloexpressions, folletto, westonruter, karmatosed, melchoyce, afercia.
Built from https://develop.svn.wordpress.org/trunk@41648
git-svn-id: http://core.svn.wordpress.org/trunk@41482 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-29 22:13:50 +02:00
|
|
|
<# if ( data.theme.active ) { #>
|
2017-10-03 17:44:46 +02:00
|
|
|
<div class="theme active" tabindex="0" aria-describedby="{{ data.section }}-{{ data.theme.id }}-action">
|
2015-10-24 20:57:25 +02:00
|
|
|
<# } else { #>
|
2017-10-03 17:44:46 +02:00
|
|
|
<div class="theme" tabindex="0" aria-describedby="{{ data.section }}-{{ data.theme.id }}-action">
|
2015-10-24 20:57:25 +02:00
|
|
|
<# } #>
|
|
|
|
|
Customize: Introduce a new experience for discovering, installing, and previewing themes within the customizer.
Unify the theme-browsing and theme-customization experiences by introducing a comprehensive theme browser and installer directly accessible in the customizer. Replaces the customizer theme switcher with a full-screen panel for discovering/browsing and installing themes available on WordPress.org. Themes can now be installed and previewed directly in the customizer without entering the wp-admin context. Also includes an extensible framework for browsing and installing themes from other sources.
Also includes CSS auto-prefixing added via `grunt precommit:css`.
For details, see: https://make.wordpress.org/core/2016/10/03/feature-proposal-a-new-experience-for-discovering-installing-and-previewing-themes-in-the-customizer/
Previously [38813] but reverted in [39140].
Fixes #37661, #34843, #38666.
Props celloexpressions, folletto, westonruter, karmatosed, melchoyce, afercia.
Built from https://develop.svn.wordpress.org/trunk@41648
git-svn-id: http://core.svn.wordpress.org/trunk@41482 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-29 22:13:50 +02:00
|
|
|
<# if ( data.theme.screenshot && data.theme.screenshot[0] ) { #>
|
2015-10-24 20:57:25 +02:00
|
|
|
<div class="theme-screenshot">
|
2022-03-17 23:21:07 +01:00
|
|
|
<img data-src="{{ data.theme.screenshot[0] }}?ver={{ data.theme.version }}" alt="" />
|
2015-10-24 20:57:25 +02:00
|
|
|
</div>
|
|
|
|
<# } else { #>
|
|
|
|
<div class="theme-screenshot blank"></div>
|
|
|
|
<# } #>
|
|
|
|
|
Customize: Introduce a new experience for discovering, installing, and previewing themes within the customizer.
Unify the theme-browsing and theme-customization experiences by introducing a comprehensive theme browser and installer directly accessible in the customizer. Replaces the customizer theme switcher with a full-screen panel for discovering/browsing and installing themes available on WordPress.org. Themes can now be installed and previewed directly in the customizer without entering the wp-admin context. Also includes an extensible framework for browsing and installing themes from other sources.
Also includes CSS auto-prefixing added via `grunt precommit:css`.
For details, see: https://make.wordpress.org/core/2016/10/03/feature-proposal-a-new-experience-for-discovering-installing-and-previewing-themes-in-the-customizer/
Previously [38813] but reverted in [39140].
Fixes #37661, #34843, #38666.
Props celloexpressions, folletto, westonruter, karmatosed, melchoyce, afercia.
Built from https://develop.svn.wordpress.org/trunk@41648
git-svn-id: http://core.svn.wordpress.org/trunk@41482 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-29 22:13:50 +02:00
|
|
|
<span class="more-details theme-details" id="{{ data.section }}-{{ data.theme.id }}-action" aria-label="<?php echo esc_attr( $details_label ); ?>"><?php _e( 'Theme Details' ); ?></span>
|
2016-10-19 05:20:29 +02:00
|
|
|
|
2017-12-01 00:11:00 +01:00
|
|
|
<div class="theme-author">
|
|
|
|
<?php
|
2019-09-03 02:41:05 +02:00
|
|
|
/* translators: Theme author name. */
|
2016-11-21 03:46:30 +01:00
|
|
|
printf( _x( 'By %s', 'theme author' ), '{{ data.theme.author }}' );
|
2017-12-01 00:11:00 +01:00
|
|
|
?>
|
|
|
|
</div>
|
2016-11-04 18:18:26 +01:00
|
|
|
|
Customize: Introduce a new experience for discovering, installing, and previewing themes within the customizer.
Unify the theme-browsing and theme-customization experiences by introducing a comprehensive theme browser and installer directly accessible in the customizer. Replaces the customizer theme switcher with a full-screen panel for discovering/browsing and installing themes available on WordPress.org. Themes can now be installed and previewed directly in the customizer without entering the wp-admin context. Also includes an extensible framework for browsing and installing themes from other sources.
Also includes CSS auto-prefixing added via `grunt precommit:css`.
For details, see: https://make.wordpress.org/core/2016/10/03/feature-proposal-a-new-experience-for-discovering-installing-and-previewing-themes-in-the-customizer/
Previously [38813] but reverted in [39140].
Fixes #37661, #34843, #38666.
Props celloexpressions, folletto, westonruter, karmatosed, melchoyce, afercia.
Built from https://develop.svn.wordpress.org/trunk@41648
git-svn-id: http://core.svn.wordpress.org/trunk@41482 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-29 22:13:50 +02:00
|
|
|
<# if ( 'installed' === data.theme.type && data.theme.hasUpdate ) { #>
|
2020-07-28 02:09:02 +02:00
|
|
|
<# if ( data.theme.updateResponse.compatibleWP && data.theme.updateResponse.compatiblePHP ) { #>
|
|
|
|
<div class="update-message notice inline notice-warning notice-alt" data-slug="{{ data.theme.id }}">
|
|
|
|
<p>
|
|
|
|
<?php
|
|
|
|
if ( is_multisite() ) {
|
|
|
|
_e( 'New version available.' );
|
|
|
|
} else {
|
|
|
|
printf(
|
|
|
|
/* translators: %s: "Update now" button. */
|
|
|
|
__( 'New version available. %s' ),
|
|
|
|
'<button class="button-link update-theme" type="button">' . __( 'Update now' ) . '</button>'
|
|
|
|
);
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<# } else { #>
|
2020-07-28 13:31:01 +02:00
|
|
|
<div class="update-message notice inline notice-error notice-alt" data-slug="{{ data.theme.id }}">
|
2020-07-28 02:09:02 +02:00
|
|
|
<p>
|
|
|
|
<# if ( ! data.theme.updateResponse.compatibleWP && ! data.theme.updateResponse.compatiblePHP ) { #>
|
|
|
|
<?php
|
2020-07-28 13:31:01 +02:00
|
|
|
printf(
|
|
|
|
/* translators: %s: Theme name. */
|
Administration: Replace contracted verb forms for better consistency.
This changeset replaces contracted verb forms like `doesn't`, `can't`, or `isn't` with non-contracted forms like `does not`, `cannot`, or `is not`, for better consistency across the WordPress administration. It also updates some corresponding unit tests strings.
Props Presskopp, socalchristina, aandrewdixon, francina, SergeyBiryukov, JeffPaul, audrasjb, hellofromTonya.
Fixes #38913.
See #39176.
Built from https://develop.svn.wordpress.org/trunk@52978
git-svn-id: http://core.svn.wordpress.org/trunk@52567 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-03-22 17:25:03 +01:00
|
|
|
__( 'There is a new version of %s available, but it does not work with your versions of WordPress and PHP.' ),
|
2020-07-28 13:31:01 +02:00
|
|
|
'{{{ data.theme.name }}}'
|
|
|
|
);
|
2020-07-28 02:09:02 +02:00
|
|
|
if ( current_user_can( 'update_core' ) && current_user_can( 'update_php' ) ) {
|
|
|
|
printf(
|
|
|
|
/* translators: 1: URL to WordPress Updates screen, 2: URL to Update PHP page. */
|
|
|
|
' ' . __( '<a href="%1$s">Please update WordPress</a>, and then <a href="%2$s">learn more about updating PHP</a>.' ),
|
|
|
|
self_admin_url( 'update-core.php' ),
|
|
|
|
esc_url( wp_get_update_php_url() )
|
|
|
|
);
|
|
|
|
wp_update_php_annotation( '</p><p><em>', '</em>' );
|
|
|
|
} elseif ( current_user_can( 'update_core' ) ) {
|
|
|
|
printf(
|
|
|
|
/* translators: %s: URL to WordPress Updates screen. */
|
|
|
|
' ' . __( '<a href="%s">Please update WordPress</a>.' ),
|
|
|
|
self_admin_url( 'update-core.php' )
|
|
|
|
);
|
|
|
|
} elseif ( current_user_can( 'update_php' ) ) {
|
|
|
|
printf(
|
|
|
|
/* translators: %s: URL to Update PHP page. */
|
|
|
|
' ' . __( '<a href="%s">Learn more about updating PHP</a>.' ),
|
|
|
|
esc_url( wp_get_update_php_url() )
|
|
|
|
);
|
|
|
|
wp_update_php_annotation( '</p><p><em>', '</em>' );
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
<# } else if ( ! data.theme.updateResponse.compatibleWP ) { #>
|
|
|
|
<?php
|
2020-07-28 13:31:01 +02:00
|
|
|
printf(
|
|
|
|
/* translators: %s: Theme name. */
|
Administration: Replace contracted verb forms for better consistency.
This changeset replaces contracted verb forms like `doesn't`, `can't`, or `isn't` with non-contracted forms like `does not`, `cannot`, or `is not`, for better consistency across the WordPress administration. It also updates some corresponding unit tests strings.
Props Presskopp, socalchristina, aandrewdixon, francina, SergeyBiryukov, JeffPaul, audrasjb, hellofromTonya.
Fixes #38913.
See #39176.
Built from https://develop.svn.wordpress.org/trunk@52978
git-svn-id: http://core.svn.wordpress.org/trunk@52567 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-03-22 17:25:03 +01:00
|
|
|
__( 'There is a new version of %s available, but it does not work with your version of WordPress.' ),
|
2020-07-28 13:31:01 +02:00
|
|
|
'{{{ data.theme.name }}}'
|
|
|
|
);
|
2020-07-28 02:09:02 +02:00
|
|
|
if ( current_user_can( 'update_core' ) ) {
|
|
|
|
printf(
|
|
|
|
/* translators: %s: URL to WordPress Updates screen. */
|
|
|
|
' ' . __( '<a href="%s">Please update WordPress</a>.' ),
|
|
|
|
self_admin_url( 'update-core.php' )
|
|
|
|
);
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
<# } else if ( ! data.theme.updateResponse.compatiblePHP ) { #>
|
|
|
|
<?php
|
2020-07-28 13:31:01 +02:00
|
|
|
printf(
|
|
|
|
/* translators: %s: Theme name. */
|
Administration: Replace contracted verb forms for better consistency.
This changeset replaces contracted verb forms like `doesn't`, `can't`, or `isn't` with non-contracted forms like `does not`, `cannot`, or `is not`, for better consistency across the WordPress administration. It also updates some corresponding unit tests strings.
Props Presskopp, socalchristina, aandrewdixon, francina, SergeyBiryukov, JeffPaul, audrasjb, hellofromTonya.
Fixes #38913.
See #39176.
Built from https://develop.svn.wordpress.org/trunk@52978
git-svn-id: http://core.svn.wordpress.org/trunk@52567 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-03-22 17:25:03 +01:00
|
|
|
__( 'There is a new version of %s available, but it does not work with your version of PHP.' ),
|
2020-07-28 13:31:01 +02:00
|
|
|
'{{{ data.theme.name }}}'
|
|
|
|
);
|
2020-07-28 02:09:02 +02:00
|
|
|
if ( current_user_can( 'update_php' ) ) {
|
|
|
|
printf(
|
|
|
|
/* translators: %s: URL to Update PHP page. */
|
|
|
|
' ' . __( '<a href="%s">Learn more about updating PHP</a>.' ),
|
|
|
|
esc_url( wp_get_update_php_url() )
|
|
|
|
);
|
|
|
|
wp_update_php_annotation( '</p><p><em>', '</em>' );
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
<# } #>
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<# } #>
|
Customize: Introduce a new experience for discovering, installing, and previewing themes within the customizer.
Unify the theme-browsing and theme-customization experiences by introducing a comprehensive theme browser and installer directly accessible in the customizer. Replaces the customizer theme switcher with a full-screen panel for discovering/browsing and installing themes available on WordPress.org. Themes can now be installed and previewed directly in the customizer without entering the wp-admin context. Also includes an extensible framework for browsing and installing themes from other sources.
Also includes CSS auto-prefixing added via `grunt precommit:css`.
For details, see: https://make.wordpress.org/core/2016/10/03/feature-proposal-a-new-experience-for-discovering-installing-and-previewing-themes-in-the-customizer/
Previously [38813] but reverted in [39140].
Fixes #37661, #34843, #38666.
Props celloexpressions, folletto, westonruter, karmatosed, melchoyce, afercia.
Built from https://develop.svn.wordpress.org/trunk@41648
git-svn-id: http://core.svn.wordpress.org/trunk@41482 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-29 22:13:50 +02:00
|
|
|
<# } #>
|
|
|
|
|
2020-07-27 17:04:03 +02:00
|
|
|
<# if ( ! data.theme.compatibleWP || ! data.theme.compatiblePHP ) { #>
|
|
|
|
<div class="notice notice-error notice-alt"><p>
|
|
|
|
<# if ( ! data.theme.compatibleWP && ! data.theme.compatiblePHP ) { #>
|
|
|
|
<?php
|
Administration: Replace contracted verb forms for better consistency.
This changeset replaces contracted verb forms like `doesn't`, `can't`, or `isn't` with non-contracted forms like `does not`, `cannot`, or `is not`, for better consistency across the WordPress administration. It also updates some corresponding unit tests strings.
Props Presskopp, socalchristina, aandrewdixon, francina, SergeyBiryukov, JeffPaul, audrasjb, hellofromTonya.
Fixes #38913.
See #39176.
Built from https://develop.svn.wordpress.org/trunk@52978
git-svn-id: http://core.svn.wordpress.org/trunk@52567 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-03-22 17:25:03 +01:00
|
|
|
_e( 'This theme does not work with your versions of WordPress and PHP.' );
|
2020-07-27 17:04:03 +02:00
|
|
|
if ( current_user_can( 'update_core' ) && current_user_can( 'update_php' ) ) {
|
|
|
|
printf(
|
|
|
|
/* translators: 1: URL to WordPress Updates screen, 2: URL to Update PHP page. */
|
|
|
|
' ' . __( '<a href="%1$s">Please update WordPress</a>, and then <a href="%2$s">learn more about updating PHP</a>.' ),
|
|
|
|
self_admin_url( 'update-core.php' ),
|
|
|
|
esc_url( wp_get_update_php_url() )
|
|
|
|
);
|
|
|
|
wp_update_php_annotation( '</p><p><em>', '</em>' );
|
|
|
|
} elseif ( current_user_can( 'update_core' ) ) {
|
|
|
|
printf(
|
|
|
|
/* translators: %s: URL to WordPress Updates screen. */
|
|
|
|
' ' . __( '<a href="%s">Please update WordPress</a>.' ),
|
|
|
|
self_admin_url( 'update-core.php' )
|
|
|
|
);
|
|
|
|
} elseif ( current_user_can( 'update_php' ) ) {
|
|
|
|
printf(
|
|
|
|
/* translators: %s: URL to Update PHP page. */
|
|
|
|
' ' . __( '<a href="%s">Learn more about updating PHP</a>.' ),
|
|
|
|
esc_url( wp_get_update_php_url() )
|
|
|
|
);
|
|
|
|
wp_update_php_annotation( '</p><p><em>', '</em>' );
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
<# } else if ( ! data.theme.compatibleWP ) { #>
|
|
|
|
<?php
|
Administration: Replace contracted verb forms for better consistency.
This changeset replaces contracted verb forms like `doesn't`, `can't`, or `isn't` with non-contracted forms like `does not`, `cannot`, or `is not`, for better consistency across the WordPress administration. It also updates some corresponding unit tests strings.
Props Presskopp, socalchristina, aandrewdixon, francina, SergeyBiryukov, JeffPaul, audrasjb, hellofromTonya.
Fixes #38913.
See #39176.
Built from https://develop.svn.wordpress.org/trunk@52978
git-svn-id: http://core.svn.wordpress.org/trunk@52567 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-03-22 17:25:03 +01:00
|
|
|
_e( 'This theme does not work with your version of WordPress.' );
|
2020-07-27 17:04:03 +02:00
|
|
|
if ( current_user_can( 'update_core' ) ) {
|
|
|
|
printf(
|
|
|
|
/* translators: %s: URL to WordPress Updates screen. */
|
|
|
|
' ' . __( '<a href="%s">Please update WordPress</a>.' ),
|
|
|
|
self_admin_url( 'update-core.php' )
|
|
|
|
);
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
<# } else if ( ! data.theme.compatiblePHP ) { #>
|
|
|
|
<?php
|
Administration: Replace contracted verb forms for better consistency.
This changeset replaces contracted verb forms like `doesn't`, `can't`, or `isn't` with non-contracted forms like `does not`, `cannot`, or `is not`, for better consistency across the WordPress administration. It also updates some corresponding unit tests strings.
Props Presskopp, socalchristina, aandrewdixon, francina, SergeyBiryukov, JeffPaul, audrasjb, hellofromTonya.
Fixes #38913.
See #39176.
Built from https://develop.svn.wordpress.org/trunk@52978
git-svn-id: http://core.svn.wordpress.org/trunk@52567 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-03-22 17:25:03 +01:00
|
|
|
_e( 'This theme does not work with your version of PHP.' );
|
2020-07-27 17:04:03 +02:00
|
|
|
if ( current_user_can( 'update_php' ) ) {
|
|
|
|
printf(
|
|
|
|
/* translators: %s: URL to Update PHP page. */
|
|
|
|
' ' . __( '<a href="%s">Learn more about updating PHP</a>.' ),
|
|
|
|
esc_url( wp_get_update_php_url() )
|
|
|
|
);
|
|
|
|
wp_update_php_annotation( '</p><p><em>', '</em>' );
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
<# } #>
|
|
|
|
</p></div>
|
|
|
|
<# } #>
|
|
|
|
|
Customize: Introduce a new experience for discovering, installing, and previewing themes within the customizer.
Unify the theme-browsing and theme-customization experiences by introducing a comprehensive theme browser and installer directly accessible in the customizer. Replaces the customizer theme switcher with a full-screen panel for discovering/browsing and installing themes available on WordPress.org. Themes can now be installed and previewed directly in the customizer without entering the wp-admin context. Also includes an extensible framework for browsing and installing themes from other sources.
Also includes CSS auto-prefixing added via `grunt precommit:css`.
For details, see: https://make.wordpress.org/core/2016/10/03/feature-proposal-a-new-experience-for-discovering-installing-and-previewing-themes-in-the-customizer/
Previously [38813] but reverted in [39140].
Fixes #37661, #34843, #38666.
Props celloexpressions, folletto, westonruter, karmatosed, melchoyce, afercia.
Built from https://develop.svn.wordpress.org/trunk@41648
git-svn-id: http://core.svn.wordpress.org/trunk@41482 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-29 22:13:50 +02:00
|
|
|
<# if ( data.theme.active ) { #>
|
2017-10-18 06:06:47 +02:00
|
|
|
<div class="theme-id-container">
|
|
|
|
<h3 class="theme-name" id="{{ data.section }}-{{ data.theme.id }}-name">
|
2020-01-20 15:27:04 +01:00
|
|
|
<span><?php _ex( 'Previewing:', 'theme' ); ?></span> {{ data.theme.name }}
|
2017-10-18 06:06:47 +02:00
|
|
|
</h3>
|
|
|
|
<div class="theme-actions">
|
|
|
|
<button type="button" class="button button-primary customize-theme" aria-label="<?php echo esc_attr( $customize_label ); ?>"><?php _e( 'Customize' ); ?></button>
|
|
|
|
</div>
|
Customize: Introduce a new experience for discovering, installing, and previewing themes within the customizer.
Unify the theme-browsing and theme-customization experiences by introducing a comprehensive theme browser and installer directly accessible in the customizer. Replaces the customizer theme switcher with a full-screen panel for discovering/browsing and installing themes available on WordPress.org. Themes can now be installed and previewed directly in the customizer without entering the wp-admin context. Also includes an extensible framework for browsing and installing themes from other sources.
Also includes CSS auto-prefixing added via `grunt precommit:css`.
For details, see: https://make.wordpress.org/core/2016/10/03/feature-proposal-a-new-experience-for-discovering-installing-and-previewing-themes-in-the-customizer/
Previously [38813] but reverted in [39140].
Fixes #37661, #34843, #38666.
Props celloexpressions, folletto, westonruter, karmatosed, melchoyce, afercia.
Built from https://develop.svn.wordpress.org/trunk@41648
git-svn-id: http://core.svn.wordpress.org/trunk@41482 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-29 22:13:50 +02:00
|
|
|
</div>
|
2023-09-14 03:25:16 +02:00
|
|
|
<?php
|
|
|
|
wp_admin_notice(
|
|
|
|
_x( 'Installed', 'theme' ),
|
|
|
|
array(
|
|
|
|
'type' => 'success',
|
|
|
|
'additional_classes' => array( 'notice-alt' ),
|
|
|
|
)
|
|
|
|
);
|
|
|
|
?>
|
Customize: Introduce a new experience for discovering, installing, and previewing themes within the customizer.
Unify the theme-browsing and theme-customization experiences by introducing a comprehensive theme browser and installer directly accessible in the customizer. Replaces the customizer theme switcher with a full-screen panel for discovering/browsing and installing themes available on WordPress.org. Themes can now be installed and previewed directly in the customizer without entering the wp-admin context. Also includes an extensible framework for browsing and installing themes from other sources.
Also includes CSS auto-prefixing added via `grunt precommit:css`.
For details, see: https://make.wordpress.org/core/2016/10/03/feature-proposal-a-new-experience-for-discovering-installing-and-previewing-themes-in-the-customizer/
Previously [38813] but reverted in [39140].
Fixes #37661, #34843, #38666.
Props celloexpressions, folletto, westonruter, karmatosed, melchoyce, afercia.
Built from https://develop.svn.wordpress.org/trunk@41648
git-svn-id: http://core.svn.wordpress.org/trunk@41482 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-29 22:13:50 +02:00
|
|
|
<# } else if ( 'installed' === data.theme.type ) { #>
|
Customize: Overlay incompatible banner for block themes.
Starting in 5.9, block themes are not compatible with (do not support) Customizer; rather, they use the Site Editor. Viewing installed themes in Customizer, this commit adds an overlay message to alert users and give them a way to activate the block theme. Clicking on the "Activate" button activates the block theme and redirects back to the Appearance > Themes interface, where the user can then enter the Site Editor for customization.
Non-block themes are not affected by this change and continue to work in Customizer.
Follow-up to [41648], [41893], [52279].
Props antonvlasenko, costdev, hellofromTonya, jffng, joyously, noisysocks, poena, shaunandrews.
Fixes #54549.
Built from https://develop.svn.wordpress.org/trunk@52371
git-svn-id: http://core.svn.wordpress.org/trunk@51963 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-14 16:33:01 +01:00
|
|
|
<# if ( data.theme.blockTheme ) { #>
|
|
|
|
<div class="theme-id-container">
|
|
|
|
<h3 class="theme-name" id="{{ data.section }}-{{ data.theme.id }}-name">{{ data.theme.name }}</h3>
|
|
|
|
<div class="theme-actions">
|
|
|
|
<# if ( data.theme.actions.activate ) { #>
|
|
|
|
<?php
|
|
|
|
/* translators: %s: Theme name. */
|
|
|
|
$aria_label = sprintf( _x( 'Activate %s', 'theme' ), '{{ data.name }}' );
|
|
|
|
?>
|
|
|
|
<a href="{{{ data.theme.actions.activate }}}" class="button button-primary activate" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _e( 'Activate' ); ?></a>
|
|
|
|
<# } #>
|
|
|
|
</div>
|
2017-10-18 06:06:47 +02:00
|
|
|
</div>
|
2023-09-14 03:25:16 +02:00
|
|
|
<?php $customizer_not_supported_message = __( 'This theme doesn\'t support Customizer.' ); ?>
|
Customize: Overlay incompatible banner for block themes.
Starting in 5.9, block themes are not compatible with (do not support) Customizer; rather, they use the Site Editor. Viewing installed themes in Customizer, this commit adds an overlay message to alert users and give them a way to activate the block theme. Clicking on the "Activate" button activates the block theme and redirects back to the Appearance > Themes interface, where the user can then enter the Site Editor for customization.
Non-block themes are not affected by this change and continue to work in Customizer.
Follow-up to [41648], [41893], [52279].
Props antonvlasenko, costdev, hellofromTonya, jffng, joyously, noisysocks, poena, shaunandrews.
Fixes #54549.
Built from https://develop.svn.wordpress.org/trunk@52371
git-svn-id: http://core.svn.wordpress.org/trunk@51963 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-14 16:33:01 +01:00
|
|
|
<# if ( data.theme.actions.activate ) { #>
|
|
|
|
<?php
|
2023-09-14 03:25:16 +02:00
|
|
|
$customizer_not_supported_message .= ' ' . sprintf(
|
Customize: Overlay incompatible banner for block themes.
Starting in 5.9, block themes are not compatible with (do not support) Customizer; rather, they use the Site Editor. Viewing installed themes in Customizer, this commit adds an overlay message to alert users and give them a way to activate the block theme. Clicking on the "Activate" button activates the block theme and redirects back to the Appearance > Themes interface, where the user can then enter the Site Editor for customization.
Non-block themes are not affected by this change and continue to work in Customizer.
Follow-up to [41648], [41893], [52279].
Props antonvlasenko, costdev, hellofromTonya, jffng, joyously, noisysocks, poena, shaunandrews.
Fixes #54549.
Built from https://develop.svn.wordpress.org/trunk@52371
git-svn-id: http://core.svn.wordpress.org/trunk@51963 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-14 16:33:01 +01:00
|
|
|
/* translators: %s: URL to the themes page (also it activates the theme). */
|
|
|
|
__( 'However, you can still <a href="%s">activate this theme</a>, and use the Site Editor to customize it.' ),
|
|
|
|
'{{{ data.theme.actions.activate }}}'
|
|
|
|
);
|
|
|
|
?>
|
|
|
|
<# } #>
|
2023-09-14 03:25:16 +02:00
|
|
|
|
|
|
|
<?php
|
|
|
|
wp_admin_notice(
|
|
|
|
$customizer_not_supported_message,
|
|
|
|
array(
|
|
|
|
'type' => 'error',
|
|
|
|
'additional_classes' => array( 'notice-alt' ),
|
|
|
|
)
|
|
|
|
);
|
|
|
|
?>
|
Customize: Overlay incompatible banner for block themes.
Starting in 5.9, block themes are not compatible with (do not support) Customizer; rather, they use the Site Editor. Viewing installed themes in Customizer, this commit adds an overlay message to alert users and give them a way to activate the block theme. Clicking on the "Activate" button activates the block theme and redirects back to the Appearance > Themes interface, where the user can then enter the Site Editor for customization.
Non-block themes are not affected by this change and continue to work in Customizer.
Follow-up to [41648], [41893], [52279].
Props antonvlasenko, costdev, hellofromTonya, jffng, joyously, noisysocks, poena, shaunandrews.
Fixes #54549.
Built from https://develop.svn.wordpress.org/trunk@52371
git-svn-id: http://core.svn.wordpress.org/trunk@51963 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-14 16:33:01 +01:00
|
|
|
<# } else { #>
|
|
|
|
<div class="theme-id-container">
|
|
|
|
<h3 class="theme-name" id="{{ data.section }}-{{ data.theme.id }}-name">{{ data.theme.name }}</h3>
|
|
|
|
<div class="theme-actions">
|
|
|
|
<# if ( data.theme.compatibleWP && data.theme.compatiblePHP ) { #>
|
|
|
|
<button type="button" class="button button-primary preview-theme" aria-label="<?php echo esc_attr( $preview_label ); ?>" data-slug="{{ data.theme.id }}"><?php _e( 'Live Preview' ); ?></button>
|
|
|
|
<# } else { #>
|
|
|
|
<button type="button" class="button button-primary disabled" aria-label="<?php echo esc_attr( $preview_label ); ?>"><?php _e( 'Live Preview' ); ?></button>
|
|
|
|
<# } #>
|
|
|
|
</div>
|
|
|
|
</div>
|
2023-09-14 03:25:16 +02:00
|
|
|
<?php
|
|
|
|
wp_admin_notice(
|
|
|
|
_x( 'Installed', 'theme' ),
|
|
|
|
array(
|
|
|
|
'type' => 'success',
|
|
|
|
'additional_classes' => array( 'notice-alt' ),
|
|
|
|
)
|
|
|
|
);
|
|
|
|
?>
|
Customize: Overlay incompatible banner for block themes.
Starting in 5.9, block themes are not compatible with (do not support) Customizer; rather, they use the Site Editor. Viewing installed themes in Customizer, this commit adds an overlay message to alert users and give them a way to activate the block theme. Clicking on the "Activate" button activates the block theme and redirects back to the Appearance > Themes interface, where the user can then enter the Site Editor for customization.
Non-block themes are not affected by this change and continue to work in Customizer.
Follow-up to [41648], [41893], [52279].
Props antonvlasenko, costdev, hellofromTonya, jffng, joyously, noisysocks, poena, shaunandrews.
Fixes #54549.
Built from https://develop.svn.wordpress.org/trunk@52371
git-svn-id: http://core.svn.wordpress.org/trunk@51963 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-14 16:33:01 +01:00
|
|
|
<# } #>
|
2015-10-24 20:57:25 +02:00
|
|
|
<# } else { #>
|
2017-10-18 06:06:47 +02:00
|
|
|
<div class="theme-id-container">
|
|
|
|
<h3 class="theme-name" id="{{ data.section }}-{{ data.theme.id }}-name">{{ data.theme.name }}</h3>
|
|
|
|
<div class="theme-actions">
|
2020-05-18 18:03:09 +02:00
|
|
|
<# if ( data.theme.compatibleWP && data.theme.compatiblePHP ) { #>
|
|
|
|
<button type="button" class="button button-primary theme-install preview" aria-label="<?php echo esc_attr( $install_label ); ?>" data-slug="{{ data.theme.id }}" data-name="{{ data.theme.name }}"><?php _e( 'Install & Preview' ); ?></button>
|
|
|
|
<# } else { #>
|
|
|
|
<button type="button" class="button button-primary disabled" aria-label="<?php echo esc_attr( $install_label ); ?>" disabled><?php _e( 'Install & Preview' ); ?></button>
|
|
|
|
<# } #>
|
2017-10-18 06:06:47 +02:00
|
|
|
</div>
|
2015-10-24 20:57:25 +02:00
|
|
|
</div>
|
|
|
|
<# } #>
|
|
|
|
</div>
|
2018-08-17 03:51:36 +02:00
|
|
|
<?php
|
2015-10-24 20:57:25 +02:00
|
|
|
}
|
|
|
|
}
|