Created
August 17, 2020 03:07
-
-
Save TANVIRFAZLEY/5859ced189817b941d9f4141290c93af to your computer and use it in GitHub Desktop.
customizer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function sermon_customizer_settings($wp_customizer){ | |
$wp_customizer->add_section('sermon_settings', array( | |
'title' => esc_html__('Sermon Options', 'sermon'), | |
'priority' => 0, | |
)); | |
/** | |
Main Google Font Setting | |
**/ | |
$wp_customizer->add_setting( 'main_google_font_list', array( | |
'default' => 'Libre Baskerville', | |
'sanitize_callback' => 'sanitize_text_field', | |
)); | |
$wp_customizer->add_control( new Google_Font_Dropdown_Custom_Control( $wp_customizer, 'main_google_font_list', array( | |
'label' => __('Body Fonts','sermon'), | |
'section' => 'sermon_settings', | |
'settings' => 'main_google_font_list', | |
))); | |
$wp_customizer->add_setting('sermon_body_font_size',array( | |
'default'=>14, | |
'transport'=>'refresh', //postMessage | |
// 'type'=>'option' //theme_mod or option | |
)); | |
$wp_customizer->add_setting('sermon_title_font_size',array( | |
'default'=>24, | |
'transport'=>'refresh', //postMessage | |
// 'type'=>'option' //theme_mod or option | |
)); | |
$wp_customizer->add_setting('single_sermon_title_font_size',array( | |
'default'=>42, | |
'transport'=>'refresh', //postMessage | |
// 'type'=>'option' //theme_mod or option | |
)); | |
$wp_customizer->add_control('sermon_body_font_size_ctrl',array( | |
'label'=>__('Sermon Body Font Size','sermon'), | |
'description'=>__('Sermon body font size in px','sermon'), | |
'section'=>'sermon_settings', | |
'settings'=>'sermon_body_font_size', | |
'type'=>'number' | |
)); | |
$wp_customizer->add_control('sermon_title_font_size_ctrl',array( | |
'label'=>__('Sermon Title Font Size','sermon'), | |
'description'=>__('Sermon title font size in px','sermon'), | |
'section'=>'sermon_settings', | |
'settings'=>'sermon_title_font_size', | |
'type'=>'number' | |
)); | |
$wp_customizer->add_control('single_sermon_title_font_size_ctrl',array( | |
'label'=>__('Single Page Sermon Title Font Size','sermon'), | |
'description'=>__('Single page sermon title font size in px','sermon'), | |
'section'=>'sermon_settings', | |
'settings'=>'single_sermon_title_font_size', | |
'type'=>'number' | |
)); | |
} | |
add_action('customize_register','sermon_customizer_settings'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
all google fonts