__('Primary Menu','personal_minimal'),
'footer-menu' => __('footer menu','personal_minimal')
)
);
register_sidebar( array(
'name' => __('Sidebar','personal_minimal'),
'id' => 'sidebar',
'description' => __('Common sidebar','personal_minimal'),
'before_widget' => '
',
'after_widget' => "
",
'before_title' => '',
) );
}
}
//theme customizer
add_action( 'customize_register', 'wpexpo_customize_register' );
function wpexpo_customize_register( $wp_customize )
{
//textarea Control
class Wpexpo_Customize_Textarea_Control extends WP_Customize_Control {
public $type = 'textarea';
public function render_content() {
?>
add_section( 'wpexpo_home_setting' , array(
'title' => __('Home Setting','personal_minimal'),
'priority' => 30,
) );
//settings
$wp_customize->add_setting( 'intro_image', array(
'default' => '',
'type' => 'theme_mod',
'capability' => 'edit_theme_options',
) );
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'intro_image', array(
'label' => __( 'Intro Image', 'personal_minimal' ),
'section' => 'wpexpo_home_setting',
'settings' => 'intro_image',
) ) );
//footer section
$wp_customize->add_section( 'wpexpo_footer_setting' , array(
'title' => __('Footer Setting','personal_minimal'),
'priority' => 31,
) );
$wp_customize->add_setting( 'footer_text', array(
'default' => get_bloginfo('name'),
'type' => 'theme_mod',
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
) );
$wp_customize->add_control( new Wpexpo_Customize_Textarea_Control( $wp_customize, 'footer_text', array(
'label' => 'Footer Text',
'section' => 'wpexpo_footer_setting',
'settings' => 'footer_text',
) ) );
$wp_customize->add_setting( 'footer_js_code', array(
'default' => '',
'type' => 'theme_mod',
'capability' => 'edit_theme_options',
) );
$wp_customize->add_control( new Wpexpo_Customize_Textarea_Control( $wp_customize, 'footer_js_code', array(
'label' => 'Footer JS code',
'section' => 'wpexpo_footer_setting',
'settings' => 'footer_js_code',
) ) );
$wp_customize->get_setting('blogname')->transport='postMessage';
$wp_customize->get_setting('blogdescription')->transport='postMessage';
if ( $wp_customize->is_preview() && ! is_admin() )
add_action( 'wp_footer', 'wpexpo_customize_preview', 21);
}
function wpexpo_customize_preview() {
?>
comment_type ) :
case 'pingback' :
case 'trackback' :
?>
id="li-comment-">
Home';
wp_list_pages('title_li=&depth=1&number=5');
echo '';
}