HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux vm8 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: afleverb (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //var/www/drakkar_site_dev/wp-content/plugins/spicebox/inc/innofit/customizer/news-section.php
<?php
	//Latest News Section
	$wp_customize->add_section('innofit_latest_news_section',array(
			'title' => __('Latest News settings','innofit'),
			'panel' => 'section_settings',
			'priority'       => 11,
			));
		
			
			// Enable news section
			$wp_customize->add_setting( 'latest_news_section_enable' , array( 'default' => 'on',   'sanitize_callback' => 'innofit_sanitize_radio',) );
			$wp_customize->add_control(	'latest_news_section_enable' , array(
					'label'    => __( 'Enable Home News section', 'innofit' ),
					'section'  => 'innofit_latest_news_section',
					'type'     => 'radio',
					'choices' => array(
						'on'=>__('ON', 'innofit'),
						'off'=>__('OFF', 'innofit')
					)
			));

		// News section title
		$wp_customize->add_setting( 'home_news_section_title',array(
		'capability'     => 'edit_theme_options',
		'default' => __('Latest News','innofit'),
		'sanitize_callback' => 'spiceb_innofit_home_page_sanitize_text',
		'transport'         => $selective_refresh,
		));	
		$wp_customize->add_control( 'home_news_section_title',array(
		'label'   => __('Title','innofit'),
		'section' => 'innofit_latest_news_section',
		'type' => 'text',
		));	
		
		//News section discription
		$wp_customize->add_setting( 'home_news_section_discription',array(
		'default'=> __('From our blog','innofit'),
		'sanitize_callback' => 'spiceb_innofit_home_page_sanitize_text',
		'transport'         => $selective_refresh,
		));	
		$wp_customize->add_control( 'home_news_section_discription',array(
		'label'   => __('Description','innofit'),
		'section' => 'innofit_latest_news_section',
		'type' => 'textarea',
		));	

		// enable / disable meta section 
		$wp_customize->add_setting(
			'home_meta_section_settings',
			array('capability'  => 'edit_theme_options',
			'default' => true,
			'sanitize_callback' => 'innofit_sanitize_checkbox',
			
			));
		$wp_customize->add_control(
			'home_meta_section_settings',
			array(
				'type' => 'checkbox',
				'label' => __('Enable post meta in blog section','innofit'),
				'section' => 'innofit_latest_news_section',
			)
		);

		
	/**
	* Add selective refresh for Front page testimonial section controls.
	*/
	
	$wp_customize->selective_refresh->add_partial( 'home_news_section_title', array(
		'selector'            => '.home-blog .section-header p',
		'settings'            => 'home_news_section_title',
		'render_callback'  => 'home_news_section_title_render_callback',
	
	) );
	
	$wp_customize->selective_refresh->add_partial( 'home_news_section_discription', array(
		'selector'            => '.home-blog .section-header h1',
		'settings'            => 'home_news_section_discription',
		'render_callback'  => 'home_news_section_discription_render_callback',
	
	) );	
		

?>