1 Star 0 Fork 59

hobby-project/Sakura

forked from Mashiro/Sakura 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
customizer.php 929 Bytes
一键复制 编辑 原始数据 按行查看 历史
Mashiro 提交于 2018-05-26 18:59 . Initial commit
<?php
/**
* Akina Theme Customizer.
*
* @package Akina
*/
/**
* Add postMessage support for site title and description for the Theme Customizer.
*
* @param WP_Customize_Manager $wp_customize Theme Customizer object.
*/
function akina_customize_register( $wp_customize ) {
$wp_customize->get_setting( 'blogname' )->transport = 'postMessage';
$wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';
$wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage';
}
add_action( 'customize_register', 'akina_customize_register' );
/**
* Binds JS handlers to make Theme Customizer preview reload changes asynchronously.
*/
function akina_customize_preview_js() {
wp_enqueue_script( 'akina_customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), '20151215', true );
}
add_action( 'customize_preview_init', 'akina_customize_preview_js' );
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/hobby-project/Sakura.git
git@gitee.com:hobby-project/Sakura.git
hobby-project
Sakura
Sakura
3.x

搜索帮助