From 09234d21f07072872cbae06e0c4893b5a5fc0443 Mon Sep 17 00:00:00 2001 From: Ben Word Date: Sun, 19 Dec 2021 09:19:09 -0600 Subject: [PATCH] Remove customizer starter (#2904) --- app/admin.php | 36 --------------------------------- bootstrap/app.php | 2 +- bud.config.js | 1 - resources/scripts/customizer.js | 13 ------------ 4 files changed, 1 insertion(+), 51 deletions(-) delete mode 100644 app/admin.php delete mode 100644 resources/scripts/customizer.js diff --git a/app/admin.php b/app/admin.php deleted file mode 100644 index 23e43db..0000000 --- a/app/admin.php +++ /dev/null @@ -1,36 +0,0 @@ -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']); -}); diff --git a/bootstrap/app.php b/bootstrap/app.php index aa01fa0..eddc827 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -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( diff --git a/bud.config.js b/bud.config.js index 703d421..7f89df6 100644 --- a/bud.config.js +++ b/bud.config.js @@ -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', }) /** diff --git a/resources/scripts/customizer.js b/resources/scripts/customizer.js deleted file mode 100644 index fe4c03e..0000000 --- a/resources/scripts/customizer.js +++ /dev/null @@ -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)); -});