D._¿àw._¿À$)_¿À*)_¿À3)_¿`¢6ÒU€;._¿ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÄ_¿@Í_¿Ä_¿׫Q‚å_Î7¡+¸Ÿá5Pó_¿Pó_¿’‹+àÆ_¿àÆ_¿àÿÿÿÿÿÿÿ𠪤ÿÇ_¿°!ª¤ÿà»_¿Ã_¿ˆÂ_¿' => 'checkbox', 'priority' => 90, ) ); // Add Post Navigation setting and control. $wp_customize->add_setting( 'tortuga_theme_options[post_navigation]', array( 'default' => true, 'type' => 'option', 'transport' => 'postMessage', 'sanitize_callback' => 'tortuga_sanitize_checkbox', ) ); $wp_customize->add_control( 'tortuga_theme_options[post_navigation]', array( 'label' => esc_html__( 'Display previous/next post navigation', 'tortuga' ), 'section' => 'tortuga_section_post', 'settings' => 'tortuga_theme_options[post_navigation]', 'type' => 'checkbox', 'priority' => 100, ) ); // Add Featured Images Headline. $wp_customize->add_control( new Tortuga_Customize_Header_Control( $wp_customize, 'tortuga_theme_options[featured_images]', array( 'label' => esc_html__( 'Featured Images', 'tortuga' ), 'section' => 'tortuga_section_post', 'settings' => array(), 'priority' => 110, ) ) ); // Add Setting and Control for featured images on blog and archives. $wp_customize->add_setting( 'tortuga_theme_options[post_image_archives]', array( 'default' => true, 'type' => 'option', 'transport' => 'postMessage', 'sanitize_callback' => 'tortuga_sanitize_checkbox', ) ); $wp_customize->add_control( 'tortuga_theme_options[post_image_archives]', array( 'label' => esc_html__( 'Display images on blog and archives', 'tortuga' ), 'section' => 'tortuga_section_post', 'settings' => 'tortuga_theme_options[post_image_archives]', 'type' => 'checkbox', 'priority' => 120, ) ); // Add Setting and Control for featured images on single posts. $wp_customize->add_setting( 'tortuga_theme_options[post_image_single]', array( 'default' => true, 'type' => 'option', 'transport' => 'refresh', 'sanitize_callback' => 'tortuga_sanitize_checkbox', ) ); $wp_customize->add_control( 'tortuga_theme_options[post_image_single]', array( 'label' => esc_html__( 'Display image on single posts', 'tortuga' ), 'section' => 'tortuga_section_post', 'settings' => 'tortuga_theme_options[post_image_single]', 'type' => 'checkbox', 'priority' => 130, ) ); // Add Partial for Excerpt Length and Post Images on blog and archives. $wp_customize->selective_refresh->add_partial( 'tortuga_blog_layout_partial', array( 'selector' => '.site-main .post-wrapper', 'settings' => array( 'tortuga_theme_options[excerpt_length]', 'tortuga_theme_options[post_image_archives]', ), 'render_callback' => 'tortuga_customize_partial_blog_layout', 'fallback_refresh' => false, ) ); } add_action( 'customize_register', 'tortuga_customize_register_post_settings' ); /** * Render the blog layout for the selective refresh partial. */ function tortuga_customize_partial_blog_layout() { while ( have_posts() ) { the_post(); get_template_part( 'template-parts/content' ); } }