`namespace` declarations appear on their own line in PHP FIG examples as well as in common PHP frameworks. While not officially part of PSR-2, we should still follow this common practice of not putting `namespace` declaration on the same line as `<?php`. - http://www.php-fig.org/psr/psr-2/ - https://github.com/laravel/laravel/blob/master/app/User.php#L1-L3 - https://github.com/symfony/filesystem/blob/master/Filesystem.php#L1-L12 - https://github.com/zendframework/zend-mail/blob/master/src/Address.php#L1-L10
19 lines
437 B
PHP
19 lines
437 B
PHP
<?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';
|
|
});
|
|
|
|
/**
|
|
* Customizer JS
|
|
*/
|
|
add_action('customize_preview_init', function () {
|
|
wp_enqueue_script('sage/customizer.js', asset_path('scripts/customizer.js'), ['customize-preview'], null, true);
|
|
});
|