<?php
/**
 * ReduxFramework Sample Config File
 * For full documentation, please visit: http://devs.redux.io/
 *
 * @package Redux Framework
 */

defined( 'ABSPATH' ) || exit;

if ( ! class_exists( 'Redux' ) ) {
	return;
}

// This is your option name where all the Redux data is stored.
$opt_name = 'codedokan';  // YOU MUST CHANGE THIS.  DO NOT USE 'redux_demo' IN YOUR PROJECT!!!

// Uncomment to disable demo mode.
/* Redux::disable_demo(); */  // phpcs:ignore Squiz.PHP.CommentedOutCode

$dir = dirname( __FILE__ ) . DIRECTORY_SEPARATOR;

/*
 * --> Used within different fields. Simply examples. Search for ACTUAL DECLARATION for field examples
 */

// Background Patterns Reader.
$sample_patterns_path = Redux_Core::$dir . '../sample/patterns/';
$sample_patterns_url  = Redux_Core::$url . '../sample/patterns/';
$sample_patterns      = array();

if ( is_dir( $sample_patterns_path ) ) {
	$sample_patterns_dir = opendir( $sample_patterns_path );

	if ( $sample_patterns_dir ) {

		// phpcs:ignore WordPress.CodeAnalysis.AssignmentInCondition
		while ( false !== ( $sample_patterns_file = readdir( $sample_patterns_dir ) ) ) {
			if ( stristr( $sample_patterns_file, '.png' ) !== false || stristr( $sample_patterns_file, '.jpg' ) !== false ) {
				$name              = explode( '.', $sample_patterns_file );
				$name              = str_replace( '.' . end( $name ), '', $sample_patterns_file );
				$sample_patterns[] = array(
					'alt' => $name,
					'img' => $sample_patterns_url . $sample_patterns_file,
				);
			}
		}
	}
}

// Used to execept HTML tags in description arguments where esc_html would remove.
$kses_exceptions = array(
	'a'      => array(
		'href' => array(),
	),
	'strong' => array(),
	'br'     => array(),
	'code'   => array(),
);

/*
 * ---> BEGIN ARGUMENTS
 */

/**
 * All the possible arguments for Redux.
 * For full documentation on arguments, please refer to: https://devs.redux.io/core/arguments/
 */
$theme = wp_get_theme(); // For use with some settings. Not necessary.

// TYPICAL -> Change these values as you need/desire.
$args = array(
	// This is where your data is stored in the database and also becomes your global variable name.
	'opt_name'                  => $opt_name,

	// Name that appears at the top of your panel.
	'display_name'              => $theme->get( 'Name' ),

	// Version that appears at the top of your panel.
	'display_version'           => $theme->get( 'Version' ),

	// Specify if the admin menu should appear or not. Options: menu or submenu (Under appearance only).
	'menu_type'                 => 'menu',

	// Show the sections below the admin menu item or not.
	'allow_sub_menu'            => true,

	// The text to appear in the admin menu.
	'menu_title'                => esc_html__( 'Hostitbd Themes Options', 'codedokan' ),

	// The text to appear on the page title.
	'page_title'                => esc_html__( 'Hostitbd Themes Options', 'codedokan' ),

	// Disable to create your own Google fonts loader.
	'disable_google_fonts_link' => true,

	// Show the panel pages on the admin bar.
	'admin_bar'                 => true,

	// Icon for the admin bar menu.
	'admin_bar_icon'            => 'dashicons-portfolio',

	// Priority for the admin bar menu.
	'admin_bar_priority'        => 50,

	// Sets a different name for your global variable other than the opt_name.
	'global_variable'           => $opt_name,

	// Show the time the page took to load, etc. (forced on while on localhost or when WP_DEBUG is enabled).
	'dev_mode'                  => false,

	// Enable basic customizer support.
	'customizer'                => false,

	// Allow the panel to open expanded.
	'open_expanded'             => false,

	// Disable the save warning when a user changes a field.
	'disable_save_warn'         => false,

	// Order where the menu appears in the admin area. If there is any conflict, something will not show. Warning.
	'page_priority'             => 20,

	// For a full list of options, visit: http://codex.wordpress.org/Function_Reference/add_submenu_page#Parameters.
	'page_parent'               => 'themes.php',

	// Permissions needed to access the options panel.
	'page_permissions'          => 'manage_options',

	// Specify a custom URL to an icon.
	'menu_icon'                 => '',

	// Force your panel to always open to a specific tab (by id).
	'last_tab'                  => '',

	// Icon displayed in the admin panel next to your menu_title.
	'page_icon'                 => 'icon-themes',

	// Page slug used to denote the panel, will be based off page title, then menu title, then opt_name if not provided.
	'page_slug'                 => $opt_name,

	// On load save the defaults to DB before user clicks save.
	'save_defaults'             => true,

	// Display the default value next to each field when not set to the default value.
	'default_show'              => false,

	// What to print by the field's title if the value shown is default.
	'default_mark'              => '*',

	// Shows the Import/Export panel when not used as a field.
	'show_import_export'        => true,

	// The time transinets will expire when the 'database' arg is set.
	'transient_time'            => 60 * MINUTE_IN_SECONDS,

	// Global shut-off for dynamic CSS output by the framework. Will also disable google fonts output.
	'output'                    => true,

	// Allows dynamic CSS to be generated for customizer and google fonts,
	// but stops the dynamic CSS from going to the page head.
	'output_tag'                => true,

	// Disable the footer credit of Redux. Please leave if you can help it.
	'footer_credit'             => 'Options panel created using hostitbd.com',

	// If you prefer not to use the CDN for ACE Editor.
	// You may download the Redux Vendor Support plugin to run locally or embed it in your code.
	'use_cdn'                   => true,

	// Set the theme of the option panel.  Use 'wp' to use a more modern style, default is classic.
	'admin_theme'               => 'wp',

	// Enable or disable flyout menus when hovering over a menu with submenus.
	'flyout_submenus'           => true,

	// Mode to display fonts (auto|block|swap|fallback|optional)
	// See: https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display.
	'font_display'              => 'swap',

	// HINTS.
	'hints'                     => array(
		'icon'          => 'el el-question-sign',
		'icon_position' => 'right',
		'icon_color'    => 'lightgray',
		'icon_size'     => 'normal',
		'tip_style'     => array(
			'color'   => 'red',
			'shadow'  => true,
			'rounded' => false,
			'style'   => '',
		),
		'tip_position'  => array(
			'my' => 'top left',
			'at' => 'bottom right',
		),
		'tip_effect'    => array(
			'show' => array(
				'effect'   => 'slide',
				'duration' => '500',
				'event'    => 'mouseover',
			),
			'hide' => array(
				'effect'   => 'slide',
				'duration' => '500',
				'event'    => 'click mouseleave',
			),
		),
	),

	// FUTURE -> Not in use yet, but reserved or partially implemented. Use at your own risk.
	// possible: options, theme_mods, theme_mods_expanded, transient. Not fully functional, warning!
	'database'                  => '',
	'network_admin'             => true,
	'search'                    => false,
);


// ADMIN BAR LINKS -> Setup custom links in the admin bar menu as external items.
// PLEASE CHANGE THEME BEFORE RELEASEING YOUR PRODUCT!!
// If these are left unchanged, they will not display in your panel!
$args['admin_bar_links'][] = array(
	'id'    => 'redux-docs',
	'href'  => '//devs.redux.io/',
	'title' => __( 'Documentation', 'codedokan' ),
);

$args['admin_bar_links'][] = array(
	'id'    => 'redux-support',
	'href'  => '//github.com/ReduxFramework/redux-framework/issues',
	'title' => __( 'Support', 'codedokan' ),
);

$args['admin_bar_links'][] = array(
	'id'    => 'redux-extensions',
	'href'  => 'redux.io/extensions',
	'title' => __( 'Extensions', 'codedokan' ),
);

// SOCIAL ICONS -> Setup custom links in the footer for quick links in your panel footer icons.
// PLEASE CHANGE THEME BEFORE RELEASEING YOUR PRODUCT!!
// If these are left unchanged, they will not display in your panel!
$args['share_icons'][] = array(
	'url'   => '//github.com/codedokan',
	'title' => 'Visit us on GitHub',
	'icon'  => 'el el-github',
);
$args['share_icons'][] = array(
	'url'   => '//www.facebook.com/hostitbd.com.official',
	'title' => 'Like us on Facebook',
	'icon'  => 'el el-facebook',
);
$args['share_icons'][] = array(
	'url'   => '//twitter.com/codedokan',
	'title' => 'Follow us on Twitter',
	'icon'  => 'el el-twitter',
);
$args['share_icons'][] = array(
	'url'   => '//www.linkedin.com/company/codedokan-com',
	'title' => 'Find us on LinkedIn',
	'icon'  => 'el el-linkedin',
);

// Panel Intro text -> before the form.
if ( ! isset( $args['global_variable'] ) || false !== $args['global_variable'] ) {
	if ( ! empty( $args['global_variable'] ) ) {
		$v = $args['global_variable'];
	} else {
		$v = str_replace( '-', '_', $args['opt_name'] );
	}

	// translators:  Panel opt_name.
	$args['intro_text'] = '<p>' . sprintf( esc_html__( '', 'codedokan' ), '<strong>' . $v . '</strong>' ) . '<p>';
} else {
	$args['intro_text'] = '<p>' . esc_html__( '', 'codedokan' ) . '</p>';
}

// Add content after the form.
$args['footer_text'] = '<p>' . esc_html__( '', 'codedokan' ) . '</p>';


Redux::set_args( $opt_name, $args );

/*
 * ---> END ARGUMENTS
 */

/*
 * ---> START HELP TABS
 */
$help_tabs = array(
	array(
		'id'      => 'redux-help-tab-1',
		'title'   => esc_html__( 'Theme Information 1', 'codedokan' ),
		'content' => '<p>' . esc_html__( 'This is the tab content, HTML is allowed.', 'codedokan' ) . '</p>',
	),
	array(
		'id'      => 'redux-help-tab-2',
		'title'   => esc_html__( 'Theme Information 2', 'codedokan' ),
		'content' => '<p>' . esc_html__( 'This is the tab content, HTML is allowed.', 'codedokan' ) . '</p>',
	),
);
Redux::set_help_tab( $opt_name, $help_tabs );

// Set the help sidebar.
$content = '<p>' . esc_html__( 'This is the sidebar content, HTML is allowed.', 'codedokan' ) . '</p>';

Redux::set_help_sidebar( $opt_name, $content );

/*
 * <--- END HELP TABS
 */

/*
 * ---> START SECTIONS
 */
 
 
 
 
 // -> START Activation Section
	Redux::setSection( $opt_name, array(
        'title'            => __( 'Activation Theme', 'codedokan' ),
        'id'               => 'purchase_theme',
        'icon'             => 'el el-home',
       'fields'           => array(
            array(
                'id'       => 'v_id',
                'type'     => 'password',
                'title'    => __( 'Theme Purchase code', 'codedokan' ),
                'subtitle' => __( 'Please Active Your Theme', 'codedokan' ),
                'desc' => __( 'For activation code Please Contect Hostitbd.com Helpline', 'codedokan' ),
                'default'  => '',
            ),
        ),
    ) );




// -> START Header Fields
Redux::set_section(
	$opt_name,
	array(
		'title'            => esc_html__( 'Header Options', 'codedokan' ),
		'id'               => 'header',
		'desc'             => esc_html__( '', 'codedokan' ),
		'customizer_width' => '400px',
		'icon'             => 'el el-edit',
	)
);
require_once Redux_Core::$dir . '../sample/codedokan/header/logo.php';
require_once Redux_Core::$dir . '../sample/codedokan/header/header-text.php';
require_once Redux_Core::$dir . '../sample/codedokan/header/custom-code.php';



// -> START Footer Fields
Redux::set_section(
	$opt_name,
	array(
		'title'            => esc_html__( 'Footer Options', 'codedokan' ),
		'id'               => 'footer',
		'desc'             => esc_html__( '', 'codedokan' ),
		'customizer_width' => '400px',
		'icon'             => 'el el-wrench',
	)
);
require_once Redux_Core::$dir . '../sample/codedokan/footer/footer-text.php';
require_once Redux_Core::$dir . '../sample/codedokan/footer/custom-code.php';



// -> START Category Section Fields
Redux::set_section(
	$opt_name,
	array(
		'title'            => esc_html__( 'HomePage Section', 'codedokan' ),
		'id'               => 'home_section',
		'desc'             => esc_html__( '', 'codedokan' ),
		'customizer_width' => '400px',
		'icon'             => 'el el-cogs',
	)
);
require_once Redux_Core::$dir . '../sample/codedokan/homepage/settings.php';
require_once Redux_Core::$dir . '../sample/codedokan/homepage/slider.php';
require_once Redux_Core::$dir . '../sample/codedokan/homepage/about.php';
require_once Redux_Core::$dir . '../sample/codedokan/homepage/menu.php';
require_once Redux_Core::$dir . '../sample/codedokan/homepage/sidebar.php';
require_once Redux_Core::$dir . '../sample/codedokan/homepage/announcement.php';
require_once Redux_Core::$dir . '../sample/codedokan/homepage/speech.php';
require_once Redux_Core::$dir . '../sample/codedokan/homepage/information.php';
require_once Redux_Core::$dir . '../sample/codedokan/homepage/teacher.php';
require_once Redux_Core::$dir . '../sample/codedokan/homepage/counter.php';
require_once Redux_Core::$dir . '../sample/codedokan/homepage/courses.php';
require_once Redux_Core::$dir . '../sample/codedokan/homepage/masterpiece.php';
require_once Redux_Core::$dir . '../sample/codedokan/homepage/video.php';
require_once Redux_Core::$dir . '../sample/codedokan/homepage/whychoose.php';
require_once Redux_Core::$dir . '../sample/codedokan/homepage/testimonial.php';
require_once Redux_Core::$dir . '../sample/codedokan/homepage/blog.php';
require_once Redux_Core::$dir . '../sample/codedokan/homepage/woocommerce.php';



// -> START Layout Fields
Redux::set_section(
	$opt_name,
	array(
		'title'            => esc_html__( 'Others Page', 'codedokan' ),
		'id'               => 'others_page',
		'desc'             => esc_html__( '', 'codedokan' ),
		'customizer_width' => '400px',
		'icon'             => 'el el-magic',
	)
);
require_once Redux_Core::$dir . '../sample/codedokan/others/students.php';
require_once Redux_Core::$dir . '../sample/codedokan/others/teachers.php';
require_once Redux_Core::$dir . '../sample/codedokan/others/single.php';
require_once Redux_Core::$dir . '../sample/codedokan/others/results.php';
require_once Redux_Core::$dir . '../sample/codedokan/others/noticeboard.php';
require_once Redux_Core::$dir . '../sample/codedokan/others/academic_calendar.php';
require_once Redux_Core::$dir . '../sample/codedokan/others/holiday.php';
require_once Redux_Core::$dir . '../sample/codedokan/others/quickcontact.php';
require_once Redux_Core::$dir . '../sample/codedokan/others/woocommerce.php';





// -> START Style.
Redux::set_section(
	$opt_name,
	array(
		'title'            => esc_html__( 'Style Section', 'codedokan' ),
		'id'               => 'style_section',
		'desc'             => esc_html__( '', 'codedokan' ),
		'customizer_width' => '700px',
		'icon'             => 'el el-font',
	)
);
require_once Redux_Core::$dir . '../sample/codedokan/style/header.php';
require_once Redux_Core::$dir . '../sample/codedokan/style/homepage.php';
require_once Redux_Core::$dir . '../sample/codedokan/style/footer.php';
require_once Redux_Core::$dir . '../sample/codedokan/style/custom.php';




 // -> START Support Section
Redux::set_section(
	$opt_name,
	array(
		'title'            => esc_html__( 'Support Information', 'codedokan' ),
		'id'               => 'support',
		'customizer_width' => '400px',
		'icon'             => 'el el-phone',
		'desc'  => wp_kses_post( __( '
		<ul>
		<li> <b> (Note : Only for Those, Who Have Purchased This Themes From Us)  </b> </li>
        <li><b> hostitbd.com </b> </li>
        <li> Website : <a href="http://www.hostitbd.com" target="_blank">hostitbd.com</a> </li>
        <li> Facebook : <a href="http://www.facebook.com/hostitbd.com.official" target="_blank">www.facebook.com/hostitbd.com.official</a> </li>
        <li> Email : <a href="mailto:support@hostitbd.com" target="_blank">support@hostitbd.com</a>, <a href="mailto:support@hostitbd.com" target="_blank">support@hostitbd.com</a> </li>
        <li> Mobile : +8801744977947, +8801954541585 </li>
        
        <li> LiveChat : <a href="https://hostitbd.com" target="_blank">Click Hare For LiveChat</a> </li>
		</ul>
		', 'codedokan' ) ),
	
	)
);




 // -> START More Theme Section
Redux::set_section(
	$opt_name,
	array(
		'title'            => esc_html__( 'Our More Themes', 'codedokan' ),
		'id'               => 'more-themes',
		'customizer_width' => '400px',
		'icon'             => 'el el-website',
		'desc'  => wp_kses_post( __( '
		
		Please Download Our Premium Wordpress Themes From <a href="http://www.hostitbd.com" target="_blank">hostitbd.com</a> Or Call : +8801744977947, +8801954541585 <br/>
		
		', 'codedokan' ) ),
	
	)
);



 // -> START Setup Tutorial Section
Redux::set_section(
	$opt_name,
	array(
		'title'            => esc_html__( 'Setup Tutorial', 'codedokan' ),
		'id'               => 'tutorial',
		'customizer_width' => '400px',
		'icon'             => 'el el-facetime-video',
		'desc'  => wp_kses_post( __( '
		<ul type="ol">
		
		<li> How To Install WordPress in Cpanel <a href="https://www.youtube.com/watch?v=LLmT0Ac-U2k" target="_blank"> Please Click Here </a> </li> 
		<li> How to Install WordPress Theme <a href="https://www.youtube.com/watch?v=j-EsTBF3LLg" target="_blank"> Please Click Here </a> </li> 
		<li> How to Create News Category in WordPress <a href="https://www.youtube.com/watch?v=q3omYhKpzsA" target="_blank"> Please Click Here </a> </li> 
		<li> How to Upload News in Online Newspaper <a href="https://www.youtube.com/watch?v=_FdkA7Jikl8" target="_blank"> Please Click Here </a> </li> 
		<li> How To Setup Theme Option in News Themes <a href="https://www.youtube.com/watch?v=UETZyovUhUo" target="_blank"> Please Click Here </a> </li> 
		<li> How to Upload and Setup Photos in Photo Gallery <a href="https://www.youtube.com/watch?v=i2GQbmuRxPw" target="_blank"> Please Click Here </a> </li> 
		<li> How to Upload and Setup Videos in Video Gallery <a href="https://www.youtube.com/watch?v=2ZzJIOMAKm0" target="_blank"> Please Click Here </a> </li> 
		<li> How to Setup Live TV in News Theme <a href="https://www.youtube.com/watch?v=OqiWUItA-HI" target="_blank"> Please Click Here </a> </li> 
		<li> How to Upload Staff Information in News Theme <a href="https://www.youtube.com/watch?v=Btt6TZ6X_ic" target="_blank"> Please Click Here </a> </li> 
		<li> How To Create Contact us Page By Contact Form 7 <a href="https://www.youtube.com/watch?v=-3I8QlQ9ufc" target="_blank"> Please Click Here </a> </li> 
		<li> How To Create News Sent Page in News Theme <a href="https://www.youtube.com/watch?v=5NA2LYwmykI" target="_blank"> Please Click Here </a> </li> 
		<li> How to Create Multiple Users and Manage in WordPress <a href="https://www.youtube.com/watch?v=FRmeJifsMjg" target="_blank"> Please Click Here </a> </li> 
		<li> How To Create Page, Author List & Registration Page <a href="https://www.youtube.com/watch?v=vZEIVQroMCg" target="_blank"> Please Click Here </a> </li> 
		<li> How To Create WordPress Menu <a href="https://www.youtube.com/watch?v=vZ4OsSlya98" target="_blank"> Please Click Here </a> </li> 
		<li> How to Upload Ads in WordPress News Paper Theme <a href="https://www.youtube.com/watch?v=wtOqnw53Dpw" target="_blank"> Please Click Here </a> </li> 
		<li> Some issues Solutions and use of Some Plugins <a href="https://www.youtube.com/watch?v=CIKDwcEaRU4" target="_blank"> Please Click Here </a> </li> 
		<li> How to Create a News Site in 6 Minutes with Demo Data <a href="https://www.youtube.com/watch?v=qtb4dbtF4_o" target="_blank"> Please Click Here </a> </li> 


		</ul>
		', 'codedokan' ) ),
	
	)
);


 // -> START Documentation Section
Redux::set_section(
	$opt_name,
	array(
		'title'            => esc_html__( 'Documentation', 'codedokan' ),
		'id'               => 'documentation',
		'customizer_width' => '400px',
		'icon'             => 'el el-question',
		'desc'  => wp_kses_post( __( '
		<ul>
		<li> Please Read Our Wordpress themes Documentation <a href="http://www.hostitbd.com/" target="_blank">Hostitbd.com/</a> Or Call : +8801744977947, +8801954541585 </li> 
		
		</ul>
		', 'codedokan' ) ),
	
	)
);

/**
 * Metaboxes
 */
require_once Redux_Core::$dir . '../sample/metaboxes.php';

/**
 * Raw README
 */
if ( file_exists( $dir . '/../README.md' ) ) {
	$section = array(
		'icon'   => 'el el-list-alt',
		'title'  => esc_html__( 'Documentation', 'codedokan' ),
		'fields' => array(
			array(
				'id'           => 'opt-raw-documentation',
				'type'         => 'raw',
				'markdown'     => true,
				'content_path' => dirname( __FILE__ ) . '/../README.md', // FULL PATH, not relative please.
			),
		),
	);

	Redux::set_section( $opt_name, $section );
}

Redux::set_section(
	$opt_name,
	array(
		'icon'            => 'el el-list-alt',
		'title'           => esc_html__( 'Customizer Only', 'codedokan' ),
		'desc'            => '<p class="description">' . esc_html__( 'This Section should be visible only in Customizer', 'codedokan' ) . '</p>',
		'customizer_only' => true,
		'fields'          => array(
			array(
				'id'              => 'opt-customizer-only',
				'type'            => 'select',
				'title'           => esc_html__( 'Customizer Only Option', 'codedokan' ),
				'subtitle'        => esc_html__( 'The subtitle is NOT visible in customizer', 'codedokan' ),
				'desc'            => esc_html__( 'The field desc is NOT visible in customizer.', 'codedokan' ),
				'customizer_only' => true,
				'options'         => array(
					'1' => esc_html__( 'Opt 1', 'codedokan' ),
					'2' => esc_html__( 'Opt 2', 'codedokan' ),
					'3' => esc_html__( 'Opt 3', 'codedokan' ),
				),
				'default'         => '2',
			),
		),
	)
);

/*
 * <--- END SECTIONS
 */

/*
 * YOU MUST PREFIX THE FUNCTIONS BELOW AND ACTION FUNCTION CALLS OR OTHER CONFIGS MAY OVERRIDE YOUR CODE.
 */

/*
 * --> Action hook examples.
 */

// Function to test the compiler hook and demo CSS output.
// Above 10 is a priority, but 2 in necessary to include the dynamically generated CSS to be sent to the function.
// add_filter('redux/options/' . $opt_name . '/compiler', 'compiler_action', 10, 3);
//
// Change the arguments after they've been declared, but before the panel is created.
// add_filter('redux/options/' . $opt_name . '/args', 'change_arguments' );
//
// Change the default value of a field after it's been set, but before it's been useds.
// add_filter('redux/options/' . $opt_name . '/defaults', 'change_defaults' );
//
// Dynamically add a section. Can be also used to modify sections/fields.
// add_filter('redux/options/' . $opt_name . '/sections', 'dynamic_section');
// .
if ( ! function_exists( 'compiler_action' ) ) {
	/**
	 * This is a test function that will let you see when the compiler hook occurs.
	 * It only runs if a field's value has changed and compiler=>true is set.
	 *
	 * @param array  $options        Options values.
	 * @param string $css            Compiler selector CSS values  compiler => array( CSS SELECTORS ).
	 * @param array  $changed_values Any values changed since last save.
	 */
	function compiler_action( array $options, string $css, array $changed_values ) {
		echo '<h1>The compiler hook has run!</h1>';
		echo '<pre>';
		// phpcs:ignore WordPress.PHP.DevelopmentFunctions
		print_r( $changed_values ); // Values that have changed since the last save.
		// echo '<br/>';
		// print_r($options); //Option values.
		// echo '<br/>';
		// print_r($css); // Compiler selector CSS values  compiler => array( CSS SELECTORS ).
		echo '</pre>';
	}
}

if ( ! function_exists( 'redux_validate_callback_function' ) ) {
	/**
	 * Custom function for the callback validation referenced above
	 *
	 * @param array $field          Field array.
	 * @param mixed $value          New value.
	 * @param mixed $existing_value Existing value.
	 *
	 * @return array
	 */
	function redux_validate_callback_function( array $field, $value, $existing_value ): array {
		$error   = false;
		$warning = false;

		// Do your validation.
		if ( 1 === (int) $value ) {
			$error = true;
			$value = $existing_value;
		} elseif ( 2 === (int) $value ) {
			$warning = true;
			$value   = $existing_value;
		}

		$return['value'] = $value;

		if ( true === $error ) {
			$field['msg']    = 'your custom error message';
			$return['error'] = $field;
		}

		if ( true === $warning ) {
			$field['msg']      = 'your custom warning message';
			$return['warning'] = $field;
		}

		return $return;
	}
}



function lk_active()
	{
		$timeout= timeout();
		$v = plugin_slug();  
		$l = md5($v.$timeout);
		global $codedokan;
		$lk = $codedokan['theme_bazar'];
			if($l == $lk)   
			{
				$notice = "Congratulations your license key is activated";
			}else{ 
			   $notice = "Sorry Your License Key is DeActive, For Activetion Key Contact hostitbd.com Helpline";
			}
			return $notice;
	 }
	 
 
 function sk_active()
	 {
		$theme = upload_limit();
		$version ="v_01";
		$tv = $theme.$version;
		global $codedokan;
		$sk = $codedokan['code_dokan'];
		if(md5($tv) == $sk)  
			{
				$notice = "Your Secret key is also activated";
			}else{ 
			   $notice = "Your Secret Key is DeActive, For Secret Key Contact hostitbd.com Helpline";
			}
			return $notice;
	 }


function themesbazar_admin_notices()
	 {
	 $lk = lk_active(); $sk = sk_active();
	 $add = $lk.' and '.$sk;
		echo '<div class="updated"><p>'.$add.'</p></div>';
	}









if ( ! function_exists( 'dynamic_section' ) ) {
	/**
	 * Custom function for filtering the sections array. Good for child themes to override or add to the sections.
	 * Simply include this function in the child themes functions.php file.
	 * NOTE: the defined constants for URLs, and directories will NOT be available at this point in a child theme,
	 * so you must use get_template_directory_uri() if you want to use any of the built-in icons.
	 *
	 * @param array $sections Section array.
	 *
	 * @return array
	 */
	function dynamic_section( array $sections ): array {
		$sections[] = array(
			'title'  => esc_html__( 'Section via hook', 'codedokan' ),
			'desc'   => '<p class="description">' . esc_html__( 'This is a section created by adding a filter to the sections array. Can be used by child themes to add/remove sections from the options.', 'codedokan' ) . '</p>',
			'icon'   => 'el el-paper-clip',

			// Leave this as a blank section, no options just some intro text set above.
			'fields' => array(),
		);

		return $sections;
	}
}

if ( ! function_exists( 'change_arguments' ) ) {
	/**
	 * Filter hook for filtering the args.
	 * Good for child themes to override or add to the args array. Can also be used in other functions.
	 *
	 * @param array $args Global arguments array.
	 *
	 * @return array
	 */
	function change_arguments( array $args ): array {
		$args['dev_mode'] = true;

		return $args;
	}
}

if ( ! function_exists( 'change_defaults' ) ) {
	/**
	 * Filter hook for filtering the default value of any given field. Very useful in development mode.
	 *
	 * @param array $defaults Default value array.
	 *
	 * @return array
	 */
	function change_defaults( array $defaults ): array {
		$defaults['str_replace'] = esc_html__( 'Testing filter hook!', 'codedokan' );

		return $defaults;
	}
}

if ( ! function_exists( 'redux_custom_sanitize' ) ) {
	/**
	 * Function to be used if the field santize argument.
	 * Return value MUST be the formatted or cleaned text to display.
	 *
	 * @param string $value Value to evaluate or clean.  Required.
	 *
	 * @return string
	 */
	function redux_custom_sanitize( string $value ): string {
		$return = '';

		foreach ( explode( ' ', $value ) as $w ) {
			foreach ( str_split( $w ) as $k => $v ) {
				if ( ( $k + 1 ) % 2 !== 0 && ctype_alpha( $v ) ) {
					$return .= mb_strtoupper( $v );
				} else {
					$return .= $v;
				}
			}

			$return .= ' ';
		}

		return $return;
	}
}