Merge branch 'master' into config-class
This commit is contained in:
@@ -8,6 +8,12 @@ namespace App;
|
||||
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');
|
||||
}
|
||||
]);
|
||||
});
|
||||
|
||||
/**
|
||||
|
||||
@@ -57,7 +57,7 @@ add_filter('template_include', function ($template) {
|
||||
echo template($template, $data);
|
||||
|
||||
// Return a blank file to make WordPress happy
|
||||
return dirname(__DIR__).'/index.php';
|
||||
return get_theme_file_path('index.php');
|
||||
}, PHP_INT_MAX);
|
||||
|
||||
/**
|
||||
|
||||
@@ -16,11 +16,12 @@ class BladeProvider extends ViewServiceProvider
|
||||
/**
|
||||
* @param ContainerContract $container
|
||||
* @param array $config
|
||||
* @SuppressWarnings(PHPMD.StaticAccess)
|
||||
*/
|
||||
public function __construct(ContainerContract $container = null, $config = [])
|
||||
{
|
||||
/** @noinspection PhpParamsInspection */
|
||||
parent::__construct($container ?: new Container);
|
||||
parent::__construct($container ?: Container::getInstance());
|
||||
|
||||
$this->app->bindIf('config', function () use ($config) {
|
||||
return $config;
|
||||
@@ -45,9 +46,7 @@ class BladeProvider extends ViewServiceProvider
|
||||
*/
|
||||
public function registerFilesystem()
|
||||
{
|
||||
$this->app->bindIf('files', function () {
|
||||
return new Filesystem;
|
||||
}, true);
|
||||
$this->app->bindIf('files', Filesystem::class, true);
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -56,9 +55,7 @@ class BladeProvider extends ViewServiceProvider
|
||||
*/
|
||||
public function registerEvents()
|
||||
{
|
||||
$this->app->bindIf('events', function () {
|
||||
return new Dispatcher;
|
||||
}, true);
|
||||
$this->app->bindIf('events', Dispatcher::class, true);
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
@@ -56,6 +56,12 @@ add_action('after_setup_theme', function () {
|
||||
*/
|
||||
add_theme_support('html5', ['caption', 'comment-form', 'comment-list', 'gallery', 'search-form']);
|
||||
|
||||
/**
|
||||
* Enable selective refresh for widgets in customizer
|
||||
* @link https://developer.wordpress.org/themes/advanced-topics/customizer-api/#theme-support-in-sidebars
|
||||
*/
|
||||
add_theme_support('customize-selective-refresh-widgets');
|
||||
|
||||
/**
|
||||
* Use main stylesheet for visual editor
|
||||
* @see assets/styles/layouts/_tinymce.scss
|
||||
|
||||
Reference in New Issue
Block a user