add_panel( 'post_meta', array( 'title' => __( 'Meta Information', 'page-speed' ), 'description' => __( 'Meta information that is displayed around the post title and at the end of post can be set here.', 'page-speed' ), // Include html tags such as
'priority' => 45, // Mixed with top-level-section hierarchy. ) ); $description = __( 'Here you can customize the meta information above and below the post title, and after post content. Here is the list of shortcodes you can use.', 'page-speed' ) . '
[author], [cat]Filed under [/cat], [tag]Tagged with [/tag], [date_published], [date_updated], <hr class="separator">'; $wp_customize->add_section( 'home_page_meta', array( 'title' => __( 'Latest Posts', 'page-speed' ), 'panel' => 'post_meta', 'description' => $description, 'priority' => 30, ) ); $wp_customize->add_section( 'archives_meta', array( 'title' => __( 'Archives, Categories, Tags', 'page-speed' ), 'panel' => 'post_meta', 'description' => $description, 'priority' => 30, ) ); $wp_customize->add_section( 'single_post_meta', array( 'title' => __( 'Single post', 'page-speed' ), 'panel' => 'post_meta', 'description' => $description, 'priority' => 30, ) ); $wp_customize->add_section( 'single_page_meta', array( 'title' => __( 'Single page', 'page-speed' ), 'panel' => 'post_meta', 'description' => $description, 'priority' => 30, ) ); /** * Home */ $default = array( array( 'key' => 'Cat', 'value' => __( 'Filed under', 'page-speed' ) . ' ' ), ); $wp_customize->add_setting( 'home_meta_above_title', array( 'sanitize_callback' => 'helium_sanitize_post_meta', 'default' => array(), ) ); $wp_customize->add_setting( 'home_meta_below_title', array( 'sanitize_callback' => 'helium_sanitize_post_meta', 'default' => array(), ) ); $wp_customize->add_setting( 'home_meta_after_body', array( 'sanitize_callback' => 'helium_sanitize_post_meta', 'default' => $default, ) ); $wp_customize->add_control( new Helium_Customize_Control_Drag_Drop( $wp_customize, 'home_meta_above_title', array( 'label' => esc_html__( 'Meta above the post title', 'page-speed' ), 'section' => 'home_page_design', 'priority' => 12, 'type' => 'he_drag_drop', ) ) ); $wp_customize->add_control( new Helium_Customize_Control_Drag_Drop( $wp_customize, 'home_meta_below_title', array( 'label' => esc_html__( 'Meta below the post title', 'page-speed' ), 'section' => 'home_page_design', 'priority' => 12, 'type' => 'he_drag_drop', 'booom' => 'test variable' ) ) ); $wp_customize->add_control( new Helium_Customize_Control_Drag_Drop( $wp_customize, 'home_meta_after_body', array( 'label' => esc_html__( 'Meta after the post content', 'page-speed' ), 'section' => 'home_page_design', 'priority' => 12, 'type' => 'he_drag_drop', ) ) ); /** * Archives */ $default = array( array( 'key' => 'Tags', 'value' => __( 'Tagged with', 'page-speed' ) . ' ' ), ); $wp_customize->add_setting( 'archives_meta_above_title', array( 'sanitize_callback' => 'helium_sanitize_post_meta', 'default' => array(), ) ); $wp_customize->add_setting( 'archives_meta_below_title', array( 'sanitize_callback' => 'helium_sanitize_post_meta', 'default' => array(), ) ); $wp_customize->add_setting( 'archives_meta_after_body', array( 'sanitize_callback' => 'helium_sanitize_post_meta', 'default' => $default, ) ); $wp_customize->add_control( new Helium_Customize_Control_Drag_Drop( $wp_customize, 'archives_meta_above_title', array( 'label' => esc_html__( 'Meta above the post title', 'page-speed' ), 'section' => 'archives_design', 'priority' => 12, 'type' => 'he_drag_drop', ) ) ); $wp_customize->add_control( new Helium_Customize_Control_Drag_Drop( $wp_customize, 'archives_meta_below_title', array( 'label' => esc_html__( 'Meta below the post title', 'page-speed' ), 'section' => 'archives_design', 'priority' => 12, 'type' => 'he_drag_drop', ) ) ); $wp_customize->add_control( new Helium_Customize_Control_Drag_Drop( $wp_customize, 'archives_meta_after_body', array( 'label' => esc_html__( 'Meta after the post content', 'page-speed' ), 'section' => 'archives_design', 'priority' => 12, 'type' => 'he_drag_drop', ) ) ); /** * Single post */ $above_title_default = array( array( 'key' => 'Cat', 'value' => __( 'Filed under', 'page-speed' ) . ' ' ) ); $below_title_default = array( array( 'key' => 'Text', 'value' => __( 'Published by', 'page-speed' ) . ' ' ), array( 'key' => 'AuthorLink', 'value' => false ), array( 'key' => 'Text', 'value' => __( 'on', 'page-speed' ) . ' ' ), array( 'key' => 'Published', 'value' => false ), array( 'key' => 'Line', 'value' => false ), ); $after_content_default = array( array( 'key'=>'Tags' ,'value'=> __( 'Tagged with', 'page-speed' ) . ' ' ), ); $wp_customize->add_setting( 'single_post_meta_above_title', array( 'sanitize_callback' => 'helium_sanitize_post_meta', 'default' => $above_title_default, ) ); $wp_customize->add_setting( 'single_post_meta_below_title', array( 'sanitize_callback' => 'helium_sanitize_post_meta', 'default' => $below_title_default, ) ); $wp_customize->add_setting( 'single_post_meta_after_body', array( 'sanitize_callback' => 'helium_sanitize_post_meta', 'default' => $after_content_default, ) ); $wp_customize->add_control( new Helium_Customize_Control_Drag_Drop( $wp_customize, 'single_post_meta_above_title', array( 'label' => esc_html__( 'Meta above the post title', 'page-speed' ), 'section' => 'single_post_design', 'priority' => 12, 'type' => 'he_drag_drop', ) ) ); $wp_customize->add_control( new Helium_Customize_Control_Drag_Drop( $wp_customize, 'single_post_meta_below_title', array( 'label' => esc_html__( 'Meta below the post title', 'page-speed' ), 'section' => 'single_post_design', 'priority' => 12, 'type' => 'he_drag_drop', ) ) ); $wp_customize->add_control( new Helium_Customize_Control_Drag_Drop( $wp_customize, 'single_post_meta_after_body', array( 'label' => esc_html__( 'Meta after the post content', 'page-speed' ), 'section' => 'single_post_design', 'priority' => 12, 'type' => 'he_drag_drop', ) ) ); /** * Single page */ $above_title_default = array( array() ); $below_title_default = array( array( 'key' => 'Text', 'value' => __( 'Written by', 'page-speed' ) . ' ' ), array( 'key' => 'AuthorLink', 'value' => false ), array( 'key' => 'Line', 'value' => false ), ); $after_content_default = array( array( 'key' => 'Text', 'value' => __( 'Published on', 'page-speed' ) . ' ' ), array( 'key' => 'Published', 'value' => false ), ); $wp_customize->add_setting( 'single_page_meta_above_title', array( 'sanitize_callback' => 'helium_sanitize_post_meta', 'default' => $above_title_default, ) ); $wp_customize->add_setting( 'single_page_meta_below_title', array( 'sanitize_callback' => 'helium_sanitize_post_meta', 'default' => $below_title_default, ) ); $wp_customize->add_setting( 'single_page_meta_after_body', array( 'sanitize_callback' => 'helium_sanitize_post_meta', 'default' => $after_content_default, ) ); $wp_customize->add_control( new Helium_Customize_Control_Drag_Drop( $wp_customize, 'single_page_meta_above_title', array( 'label' => esc_html__( 'Meta above the post title', 'page-speed' ), 'section' => 'single_page_design', 'priority' => 12, 'type' => 'he_drag_drop', ) ) ); $wp_customize->add_control( new Helium_Customize_Control_Drag_Drop( $wp_customize, 'single_page_meta_below_title', array( 'label' => esc_html__( 'Meta below the post title', 'page-speed' ), 'section' => 'single_page_design', 'priority' => 12, 'type' => 'he_drag_drop', ) ) ); $wp_customize->add_control( new Helium_Customize_Control_Drag_Drop( $wp_customize, 'single_page_meta_after_body', array( 'label' => esc_html__( 'Meta after the post content', 'page-speed' ), 'section' => 'single_page_design', 'priority' => 12, 'type' => 'he_drag_drop', ) ) ); }