| Server IP : 104.26.5.103 / Your IP : 216.73.216.4 Web Server : nginx/1.27.1 System : Linux in-5 5.15.0-143-generic #153-Ubuntu SMP Fri Jun 13 19:10:45 UTC 2025 x86_64 User : arabianexpress ( 1872) PHP Version : 8.0.30 Disable Function : exec,passthru,shell_exec,system,proc_open,popen,parse_ini_file,show_source MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /storage/v9321/blueoceanprod/public_html/wp-content/themes/techkit/inc/customizer/settings/ |
Upload File : |
<?php
/**
* @author RadiusTheme
* @since 1.0
* @version 1.0
*/
namespace radiustheme\techkit\Customizer\Settings;
use radiustheme\techkit\Customizer\TechkitTheme_Customizer;
use radiustheme\techkit\Customizer\Controls\Customizer_Switch_Control;
use radiustheme\techkit\Customizer\Controls\Customizer_Image_Radio_Control;
/**
* Adds the individual sections, settings, and controls to the theme customizer
*/
class TechkitTheme_Blog_Post_Settings extends TechkitTheme_Customizer {
public function __construct() {
parent::instance();
$this->populated_default_data();
// Add Controls
add_action( 'customize_register', array( $this, 'register_blog_post_controls' ) );
}
/**
* Blog Post Controls
*/
public function register_blog_post_controls( $wp_customize ) {
// Blog Post Style
$wp_customize->add_setting( 'blog_style',
array(
'default' => $this->defaults['blog_style'],
'transport' => 'refresh',
'sanitize_callback' => 'rttheme_radio_sanitization'
)
);
$wp_customize->add_control( new Customizer_Image_Radio_Control( $wp_customize, 'blog_style',
array(
'label' => __( 'Blog/Archive Layout', 'techkit' ),
'description' => esc_html__( 'Blog Post layout variation you can selecr and use.', 'techkit' ),
'section' => 'blog_post_settings_section',
'choices' => array(
'style1' => array(
'image' => trailingslashit( get_template_directory_uri() ) . 'assets/img/blog1.png',
'name' => __( 'Layout 1', 'techkit' )
),
'style2' => array(
'image' => trailingslashit( get_template_directory_uri() ) . 'assets/img/blog3.png',
'name' => __( 'Layout 2', 'techkit' )
),
)
)
) );
$wp_customize->add_setting( 'post_content_limit',
array(
'default' => $this->defaults['post_content_limit'],
'transport' => 'refresh',
'sanitize_callback' => 'rttheme_text_sanitization',
)
);
$wp_customize->add_control( 'post_content_limit',
array(
'label' => __( 'Blog Content Limit', 'techkit' ),
'section' => 'blog_post_settings_section',
'type' => 'text',
)
);
$wp_customize->add_setting( 'post_content_limit',
array(
'default' => $this->defaults['post_content_limit'],
'transport' => 'refresh',
'sanitize_callback' => 'rttheme_text_sanitization',
)
);
$wp_customize->add_control( 'post_content_limit',
array(
'label' => __( 'Blog Content Limit', 'techkit' ),
'section' => 'blog_post_settings_section',
'type' => 'text',
)
);
$wp_customize->add_setting( 'blog_content',
array(
'default' => $this->defaults['blog_content'],
'transport' => 'refresh',
'sanitize_callback' => 'rttheme_switch_sanitization',
)
);
$wp_customize->add_control( new Customizer_Switch_Control( $wp_customize, 'blog_content',
array(
'label' => __( 'Show Content', 'techkit' ),
'section' => 'blog_post_settings_section',
)
) );
$wp_customize->add_setting( 'blog_date',
array(
'default' => $this->defaults['blog_date'],
'transport' => 'refresh',
'sanitize_callback' => 'rttheme_switch_sanitization',
)
);
$wp_customize->add_control( new Customizer_Switch_Control( $wp_customize, 'blog_date',
array(
'label' => __( 'Show Date', 'techkit' ),
'section' => 'blog_post_settings_section',
)
) );
$wp_customize->add_setting( 'blog_author_name',
array(
'default' => $this->defaults['blog_author_name'],
'transport' => 'refresh',
'sanitize_callback' => 'rttheme_switch_sanitization',
)
);
$wp_customize->add_control( new Customizer_Switch_Control( $wp_customize, 'blog_author_name',
array(
'label' => __( 'Show Author', 'techkit' ),
'section' => 'blog_post_settings_section',
)
) );
$wp_customize->add_setting( 'blog_comment_num',
array(
'default' => $this->defaults['blog_comment_num'],
'transport' => 'refresh',
'sanitize_callback' => 'rttheme_switch_sanitization',
)
);
$wp_customize->add_control( new Customizer_Switch_Control( $wp_customize, 'blog_comment_num',
array(
'label' => __( 'Show Comment', 'techkit' ),
'section' => 'blog_post_settings_section',
)
) );
$wp_customize->add_setting( 'blog_cats',
array(
'default' => $this->defaults['blog_cats'],
'transport' => 'refresh',
'sanitize_callback' => 'rttheme_switch_sanitization',
)
);
$wp_customize->add_control( new Customizer_Switch_Control( $wp_customize, 'blog_cats',
array(
'label' => __( 'Show Category', 'techkit' ),
'section' => 'blog_post_settings_section',
)
) );
$wp_customize->add_setting( 'blog_view',
array(
'default' => $this->defaults['blog_view'],
'transport' => 'refresh',
'sanitize_callback' => 'rttheme_switch_sanitization',
)
);
$wp_customize->add_control( new Customizer_Switch_Control( $wp_customize, 'blog_view',
array(
'label' => __( 'Show Views', 'techkit' ),
'section' => 'blog_post_settings_section',
)
) );
$wp_customize->add_setting( 'blog_length',
array(
'default' => $this->defaults['blog_length'],
'transport' => 'refresh',
'sanitize_callback' => 'rttheme_switch_sanitization',
)
);
$wp_customize->add_control( new Customizer_Switch_Control( $wp_customize, 'blog_length',
array(
'label' => __( 'Show Reading Length', 'techkit' ),
'section' => 'blog_post_settings_section',
)
) );
}
}
/**
* Initialise our Customizer settings only when they're required
*/
if ( class_exists( 'WP_Customize_Control' ) ) {
new TechkitTheme_Blog_Post_Settings();
}