Advertisement
kalponikoronno

Kirki customizer 2

Mar 30th, 2020
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.86 KB | None | 0 0
  1. if ( class_exists( 'Kirki' ) ) {
  2.    
  3.     Kirki::add_config( 'theme_customizer_config_id', array(
  4.         'capability'    => 'edit_theme_options',
  5.         'option_type'   => 'theme_mod',
  6.     ) );
  7.    
  8.     Kirki::add_panel( 'theme_customizer_panel_id', array(
  9.         'priority'    => 10,
  10.         'title'       => esc_html__( 'Hello theme options', 'kirki' ),
  11.     ) );
  12.    
  13.     Kirki::add_section( 'theme_blog_homepage_settings', array(
  14.         'title'          => esc_html__( 'Blog settings', 'kirki' ),
  15.         'panel'          => 'theme_customizer_panel_id',
  16.         'priority'       => 160,
  17.     ) );
  18.    
  19.     Kirki::add_field( 'theme_customizer_config_id', [
  20.         'type'        => 'text',
  21.         'settings'    => 'blog_text_setting',
  22.         'label'    => esc_html__( 'Text Control', 'kirki' ),
  23.         'section'     => 'theme_blog_homepage_settings',
  24.         'default'  => esc_html__( 'This is a default value', 'kirki' ),
  25.         'priority'    => 10,
  26.     ] );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement