add_section( 'theme_info',
array(
'title' => __( 'Information Links', 'budget-hotel' ),
'priority' => 6,
)
);
/** Important Links */
$wp_customize->add_setting( 'theme_info_theme',
array(
'default' => '',
'sanitize_callback' => 'wp_kses_post',
)
);
$theme_info = '
';
$theme_info .= sprintf( __( '- View demo: %1$sClick here.%2$s
', 'budget-hotel' ), '', '' );
$theme_info .= sprintf( __( '- View documentation: %1$sClick here.%2$s
', 'budget-hotel' ), '', '' );
$theme_info .= sprintf( __( '- Theme info: %1$sClick here.%2$s
', 'budget-hotel' ), '', '' );
$theme_info .= sprintf( __( '- Support ticket: %1$sClick here.%2$s
', 'budget-hotel' ), '', '' );
$theme_info .= sprintf( __( '- More WordPress Themes: %1$sClick here.%2$s
', 'budget-hotel' ), '', '' );
$theme_info .= sprintf( __( '- Go Premium: %1$sClick here.%2$s
', 'budget-hotel' ), '', '' );
$theme_info .= '
';
$wp_customize->add_control( new Hotell_Note_Control( $wp_customize,
'theme_info_theme',
array(
'label' => __( 'Important Links' , 'budget-hotel' ),
'section' => 'theme_info',
'description' => $theme_info
)
)
);
}
/**
* Blog Settings For Homepage
*
* @package Budget Hotel
*/
function hotell_customize_register_home_blog_section( $wp_customize ){
$wp_customize->add_section(
'blog_sec_home',
array(
'title' => esc_html__( 'Blog Section', 'budget-hotel' ),
'priority' => 140,
'panel' => 'frontpage_settings'
)
);
/** Enable Blog section */
$wp_customize->add_setting(
'ed_blog_section',
array(
'default' => false,
'sanitize_callback' => 'hotell_sanitize_checkbox',
)
);
$wp_customize->add_control(
new Hotell_Toggle_Control(
$wp_customize,
'ed_blog_section',
array(
'section' => 'blog_sec_home',
'label' => __( 'Enable Blog Section', 'budget-hotel' ),
)
)
);
$wp_customize->add_setting(
'blog_subtitle',
array(
'default' => __( 'OUR BLOG', 'budget-hotel' ),
'sanitize_callback' => 'sanitize_text_field',
'transport' => 'postMessage'
)
);
$wp_customize->add_control(
'blog_subtitle',
array(
'section' => 'blog_sec_home',
'label' => __( 'Section Subtitle', 'budget-hotel' ),
'type' => 'text',
)
);
$wp_customize->selective_refresh->add_partial( 'blog_subtitle', array(
'selector' => '.home .news-and-blogs .container .section-header span.section-header__tag',
'render_callback' => 'hotell_get_blog_subtitle',
) );
$wp_customize->add_setting(
'blog_title',
array(
'default' => __( 'Our News And Blogs', 'budget-hotel' ),
'sanitize_callback' => 'sanitize_text_field',
'transport' => 'postMessage'
)
);
$wp_customize->add_control(
'blog_title',
array(
'section' => 'blog_sec_home',
'label' => __( 'Section Title', 'budget-hotel' ),
'type' => 'text',
)
);
$wp_customize->selective_refresh->add_partial( 'blog_title', array(
'selector' => '.home .news-and-blogs .container .section-header h2.section-header__title',
'render_callback' => 'hotell_get_blog_title',
) );
/** Content Text */
$wp_customize->add_setting(
'blog_content',
array(
'default' => '',
'sanitize_callback' => 'sanitize_text_field',
)
);
$wp_customize->add_control(
'blog_content',
array(
'section' => 'blog_sec_home',
'label' => __( 'Section Content', 'budget-hotel' ),
'type' => 'text',
)
);
}