Move src/ to app/

This commit is contained in:
Ben Word
2017-04-03 19:39:58 -06:00
parent 73b6b787e5
commit 80728a1b94
17 changed files with 16 additions and 15 deletions

24
app/admin.php Normal file
View File

@@ -0,0 +1,24 @@
<?php
namespace App;
/**
* Theme customizer
*/
add_action('customize_register', function (\WP_Customize_Manager $wp_customize) {
// Add postMessage support
$wp_customize->get_setting('blogname')->transport = 'postMessage';
$wp_customize->selective_refresh->add_partial('blogname', [
'selector' => '.brand',
'render_callback' => function () {
bloginfo('name');
}
]);
});
/**
* Customizer JS
*/
add_action('customize_preview_init', function () {
wp_enqueue_script('sage/customizer.js', asset_path('scripts/customizer.js'), ['customize-preview'], null, true);
});