File: /var/www/html/site/newsite/wp-content/themes/ooze/inc/customizer/theme-options/read-time.php
<?php
$widgets_link = admin_url( 'widgets.php' );
/*Add foooter theme option*/
$wp_customize->add_section(
'read_time_options' ,
array(
'title' => __( 'Read Time Options', 'ooze' ),
'panel' => 'ooze_option_panel',
)
);
$wp_customize->add_setting(
'ooze_options[enable_read_time_option]',
array(
'default' => $default_options['enable_read_time_option'],
'sanitize_callback' => 'ooze_sanitize_checkbox',
)
);
$wp_customize->add_control(
'ooze_options[enable_read_time_option]',
array(
'label' => __( 'Enable Read Time Option', 'ooze' ),
'section' => 'read_time_options',
'type' => 'checkbox',
)
);
/*Display read time in*/
$wp_customize->add_setting(
'ooze_options[display_read_time_in]',
array(
'default' => $default_options['display_read_time_in'],
'sanitize_callback' => 'ooze_sanitize_checkbox_multiple',
)
);
$wp_customize->add_control(
new Ooze_Checkbox_Multiple(
$wp_customize,
'ooze_options[display_read_time_in]',
array(
'label' => __( 'Display Read Time', 'ooze' ),
'section' => 'read_time_options',
'choices' => array(
'home-page' => __('Homepage', 'ooze'),
'single-page' => __('Single Page', 'ooze'),
'archive-page' => __('Archive Page', 'ooze'),
)
)
)
);
$wp_customize->add_setting(
'ooze_options[words_per_minute]',
array(
'default' => $default_options['words_per_minute'],
'sanitize_callback' => 'absint',
)
);
$wp_customize->add_control(
'ooze_options[words_per_minute]',
array(
'label' => __('Words Per Minute', 'ooze'),
'description' => __('Number of Words per minut', 'ooze'),
'section' => 'read_time_options',
'type' => 'number',
'input_attrs' => array('min' => 1, 'max' => 300, 'style' => 'width: 150px;'),
)
);