Remove customizer starter (#2904)
This commit is contained in:
@@ -1,36 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Theme admin.
|
||||
*/
|
||||
|
||||
namespace App;
|
||||
|
||||
use WP_Customize_Manager;
|
||||
|
||||
use function Roots\bundle;
|
||||
|
||||
/**
|
||||
* Register the `.brand` selector to the blogname.
|
||||
*
|
||||
* @param \WP_Customize_Manager $wp_customize
|
||||
* @return void
|
||||
*/
|
||||
add_action('customize_register', function (WP_Customize_Manager $wp_customize) {
|
||||
$wp_customize->get_setting('blogname')->transport = 'postMessage';
|
||||
$wp_customize->selective_refresh->add_partial('blogname', [
|
||||
'selector' => '.brand',
|
||||
'render_callback' => function () {
|
||||
bloginfo('name');
|
||||
}
|
||||
]);
|
||||
});
|
||||
|
||||
/**
|
||||
* Register the customizer assets.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
add_action('customize_preview_init', function () {
|
||||
bundle('customizer')->enqueueJs(true, ['customize-preview']);
|
||||
});
|
||||
@@ -25,7 +25,7 @@
|
||||
|
|
||||
*/
|
||||
|
||||
collect(['helpers', 'setup', 'filters', 'admin'])
|
||||
collect(['helpers', 'setup', 'filters'])
|
||||
->each(function ($file) {
|
||||
if (! locate_template($file = "app/{$file}.php", true, true)) {
|
||||
wp_die(
|
||||
|
||||
@@ -14,7 +14,6 @@ module.exports = async (config) =>
|
||||
.entry({
|
||||
app: ['scripts/app.js', 'styles/app.css'],
|
||||
editor: ['scripts/editor.js', 'styles/editor.css'],
|
||||
customizer: 'scripts/customizer.js',
|
||||
})
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* This file allows you to add functionality to the Theme Customizer
|
||||
* live preview. jQuery is readily available.
|
||||
*
|
||||
* @see https://codex.wordpress.org/Theme_Customization_API
|
||||
*/
|
||||
|
||||
/**
|
||||
* Change the blog name value.
|
||||
*/
|
||||
wp.customize('blogname', (value) => {
|
||||
value.bind((to) => $('.brand').text(to));
|
||||
});
|
||||
Reference in New Issue
Block a user