<?php 	


function daynamic_css() {
    /*
    .redux-main fieldset.disabled h2, .redux-main .redux-group-tab.disabled h2 { padding-top: 10px; }

.redux-main fieldset.disabled::before, .redux-main .redux-group-tab.disabled::before { color: #a3b745; }

#redux-header { border-color: #d46f15 !important; background: #523f6d !important; }

#redux-header .display_header h2 { color: #fff; }

#redux-header .display_header span { color: #fff !important; }

.redux-container { background: #523f6d; }

.redux-container .redux-sidebar { font-size: 13px; font-weight: 400 !important; line-height: 18px; }

.redux-container .redux-sidebar .redux-group-menu { background-color: #523f6d; }

.redux-container .redux-sidebar .redux-group-menu li.divide { border-bottom-color: #c8d48e !important; border-top-color: #c8d48e !important; }

.redux-container .redux-sidebar .redux-group-menu li.activeChild.hasSubSections a { background-color: #a3b745 !important; color: #fff !important; }

.redux-container .redux-sidebar .redux-group-menu li.activeChild.hasSubSections .subsection li.active a { font-weight: 700 !important; color: #fff !important; }

.redux-container .redux-sidebar .redux-group-menu li.active a { background-color: #a3b745 !important; color: #fff !important; opacity: 1 !important; font-weight: 700 !important; }

.redux-container .redux-sidebar .redux-group-menu li.active a:hover { background-color: #a3b745; color: #fff !important; }

.redux-container .redux-sidebar .redux-group-menu li a { font-weight: 400 !important; color: #fff !important; opacity: 0.9 !important; border-style: hidden !important; -webkit-transition: all 0.2s ease-in-out !important; transition: all 0.2s ease-in-out !important; }

.redux-container .redux-sidebar .redux-group-menu li a:hover { color: #fff !important; background-color: #a3b745 !important; }

.redux-container .redux-sidebar .redux-group-menu li .subsection { background: #413256; }

.redux-container .redux-sidebar .redux-group-menu li .subsection .redux-group-tab-link-li .redux-group-tab-link-a { font-weight: 400 !important; color: #e2ecf1 !important; background-color: #413256 !important; }

.redux-container .redux-sidebar .redux-group-menu li .subsection .redux-group-tab-link-li .redux-group-tab-link-a:hover { background-color: #413256 !important; color: #a3b745 !important; opacity: 1; }

.redux-container .redux-sidebar .redux-group-menu li.hasSubSections.redux-section-hover > a { background-color: #a3b745; color: #fff !important; }

.redux-container .redux-sidebar .redux-group-menu li.hasSubSections.redux-section-hover > a::after { border-right-color: #413256; }

.redux-container .redux-sidebar .redux-group-menu li.hasSubSections.redux-section-hover .redux-group-tab-link-a:hover { color: #fff !important; }

.redux-container .redux-sidebar .redux-group-menu li.hasSubSections.redux-section-hover .subsection { background-color: #413256; }

.redux-container .redux-sidebar .redux-group-menu li.hasSubSections.redux-section-hover .subsection .redux-group-tab-link-a { -webkit-transition: all 0.2s ease-in-out; transition: all 0.2s ease-in-out; }

.redux-container .redux-sidebar .redux-group-menu li.hasSubSections.redux-section-hover .subsection .redux-group-tab-link-a:hover { background-color: #523f6d; color: #a3b745 !important; }

.redux-container .redux-main { border-left-width: 0; }

.postbox.redux-metabox .redux-container .redux-group-menu li.active a { background-color: #a3b745; }

.button.ui-datepicker-current, button.ui-datepicker-close { background-color: #a9bd4f !important; }

.ui-datepicker-buttonpane button.ui-datepicker-current { background: #a3b745 !important; color: #fff !important; border: 1px solid #616d29 !important; }

.ui-datepicker-header { background-color: #d46f15 !important; color: #fff !important; }

.ui-datepicker td .ui-state-active { color: #000 !important; font-weight: 700 !important; background: #fff !important; }

.ui-datepicker td .ui-state-hover { color: #a9bd4f !important; }

.ui-datepicker td .ui-state-highlight { background: #a3b745 !important; border: 1px solid #d46f15 !important; color: #fff !important; }

.redux-container-switch .cb-disable, .redux-container-switch .cb-enable, .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { background-color: #f5f5f5 !important; background-image: -khtml-gradient(linear, left top, left bottom, from(#f8f8f8), to(#f5f5f5)) !important; background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #f8f8f8), color-stop(100%, #f5f5f5)) !important; background-image: -webkit-linear-gradient(top, #f8f8f8, #f5f5f5) !important; background-image: -linear-gradient(top, #f8f8f8, #f5f5f5) !important; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#f8f8f8", endColorstr="#f5f5f5", GradientType=0) !important; border-color: #ccc !important; }

.redux-container-switch .cb-disable.selected { background-color: #646464 !important; background-image: -khtml-gradient(linear, left top, left bottom, from(#929292), to(#646464)) !important; background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #929292), color-stop(100%, #646464)) !important; background-image: -webkit-linear-gradient(top, #929292, #646464) !important; background-image: -linear-gradient(top, #929292, #646464) !important; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#929292", endColorstr="#646464", GradientType=0) !important; border-color: #767676 !important; }

.redux-container-spinner .ui-widget .ui-spinner-button.ui-state-hover span { background-color: #adbf56 !important; background-image: -khtml-gradient(linear, left top, left bottom, from(#b9c970), to(#adbf56)) !important; background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #b9c970), color-stop(100%, #adbf56)) !important; background-image: -webkit-linear-gradient(top, #b9c970, #adbf56) !important; background-image: -linear-gradient(top, #b9c970, #adbf56) !important; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#b9c970", endColorstr="#adbf56", GradientType=0) !important; border-color: #adbf56 !important; border-color: #a6ba47 !important; }

.redux-container-spinner .ui-widget .ui-spinner-button.ui-state-active span { background-color: #727f30 !important; background-image: -khtml-gradient(linear, left top, left bottom, from(#89993a), to(#727f30)) !important; background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #89993a), color-stop(100%, #727f30)) !important; background-image: -webkit-linear-gradient(top, #89993a, #727f30) !important; background-image: -linear-gradient(top, #89993a, #727f30) !important; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#89993a", endColorstr="#727f30", GradientType=0) !important; border-color: #515a22 !important; border-color: #616d29 !important; color: #fff; }

.redux-container-spinner .ui-widget .ui-spinner-button .ui-icon, .redux-container-switch .cb-enable.selected, .redux-field-container .ui-buttonset .ui-state-active { background-color: #a3b745 !important; background-image: -khtml-gradient(linear, left top, left bottom, from(#b0c25e), to(#a3b745)) !important; background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #b0c25e), color-stop(100%, #a3b745)) !important; background-image: -webkit-linear-gradient(top, #b0c25e, #a3b745) !important; background-image: -linear-gradient(top, #b0c25e, #a3b745) !important; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#b0c25e", endColorstr="#a3b745", GradientType=0) !important; border-color: #727f30 !important; border-color: #829237 !important; -webkit-box-shadow: inset 0 1px 0 #bfcd7b, 0 1px 0 rgba(0, 0, 0, 0.15) !important; box-shadow: inset 0 1px 0 #bfcd7b, 0 1px 0 rgba(0, 0, 0, 0.15) !important; }

.redux-container-image_select .redux-image-select-selected img { border-color: #a3b745 !important; }

.redux-container-image_select .redux-image-select-selected .tiles { border-color: #a3b745 !important; }

.select2-results .select2-results__option--highlighted { background: #a3b745 !important; }

.select2-container--classic.select2-container--open .select2-dropdown, .select2-container--classic.select2-container--open .select2-selection--single, .select2-container--classic.select2-container--open .select2-selection--multiple, .select2-container--classic .select2-selection--single:focus { border-color: #a3b745 !important; }

.noUi-connect { background-color: #a9bd4f !important; background-image: -khtml-gradient(linear, left top, left bottom, from(#b6c669), to(#a9bd4f)) !important; background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #b6c669), color-stop(100%, #a9bd4f)) !important; background-image: -webkit-linear-gradient(top, #b6c669, #a9bd4f) !important; background-image: -linear-gradient(top, #b6c669, #a9bd4f) !important; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#b6c669", endColorstr="#a9bd4f", GradientType=0) !important; }

#redux-footer #redux-share a { color: #a3b745; }

#redux-footer #redux-share a:hover { color: #616d29; }

/*# sourceMappingURL=data:application/json;charset=utf8;base64,  */

/*# sourceMappingURL=colors.css.map */
    
    
    
}


	/**
 * Post Type: Students Info.
 */
	
function students_codedokan() {
	$labels = [
		"name" => __( "Students Info", "codedokan_smartedu" ),
		"singular_name" => __( "Students", "codedokan_smartedu" ), 
	];
	$args = [
		"label" => __( "Students", "codedokan_smartedu" ),
		"labels" => $labels,
		"description" => "",
		"public" => true,
		"publicly_queryable" => true,
		"show_ui" => true,
		"has_archive" => "students",
		"show_in_menu" => true,
		"show_in_nav_menus" => true,
		"exclude_from_search" => false,
		"capability_type" => "post",
		"hierarchical" => false,
		"rewrite" => [ "slug" => "students", "with_front" => false ],
		"query_var" => true,
		'menu_icon' => 'dashicons-businessperson',
		"supports" => [ "title"], 
		'menu_position' => 6,
	];

	register_post_type( "students", $args ); 
}

add_action( 'init', 'students_codedokan' );
		
	
   
/**
 * Taxonomy: Students Categories.
 */

function students_category_codedokan() {

	$labels = [
		"name" => __( "Class Name", "codedokan_smartedu" ),
		"singular_name" => __( "Class Name", "codedokan_smartedu" ),
	];
	$args = [
		"label" => __( "Class Name", "codedokan_smartedu" ),
		"labels" => $labels,
		"public" => true,
		"publicly_queryable" => true,
		"hierarchical" => true,
		"show_ui" => true,
		"show_in_menu" => true,
		"show_in_nav_menus" => true,
		"query_var" => true,
		"rewrite" => [ 'slug' => 'studentscat', 'with_front' => false, ],

		];
	register_taxonomy( "studentscat", [ "students" ], $args );
}
add_action( 'init', 'students_category_codedokan' ); 



		
		
	/**
 * Post Type: Teachers Info.
 */
	
function teachers_codedokan() {
	$labels = [
		"name" => __( "Teachers Info", "codedokan_smartedu" ),
		"singular_name" => __( "Teachers", "codedokan_smartedu" ), 
	];
	$args = [
		"label" => __( "Teachers", "codedokan_smartedu" ),
		"labels" => $labels,
		"description" => "",
		"public" => true,
		"publicly_queryable" => true,
		"show_ui" => true,
		"has_archive" => "teachers",
		"show_in_menu" => true,
		"show_in_nav_menus" => true,
		"exclude_from_search" => false,
		"capability_type" => "post",
		"hierarchical" => false,
		"rewrite" => [ "slug" => "teachers", "with_front" => false ],
		"query_var" => true,
		'menu_icon' => 'dashicons-businessman',
		"supports" => [ "title" ], 
		'menu_position' => 7,
	];

	register_post_type( "teachers", $args ); 
}

add_action( 'init', 'teachers_codedokan' );
		
	
   
/**
 * Taxonomy: teachers Categories.
 */

function teachers_category_codedokan() {

	$labels = [
		"name" => __( "Teachers Categories", "codedokan_smartedu" ),
		"singular_name" => __( "Teachers Category", "codedokan_smartedu" ),
	];
	$args = [
		"label" => __( "Teachers Categories", "codedokan_smartedu" ),
		"labels" => $labels,
		"public" => true,
		"publicly_queryable" => true,
		"hierarchical" => true,
		"show_ui" => true,
		"show_in_menu" => true,
		"show_in_nav_menus" => true,
		"query_var" => true,
		"rewrite" => [ 'slug' => 'teacherscat', 'with_front' => false, ],

		];
	register_taxonomy( "teacherscat", [ "teachers" ], $args );
}
add_action( 'init', 'teachers_category_codedokan' ); 


	
		
		
	/**
 * Post Type: Information Info.
 */
	
function information_codedokan() {
	$labels = [
		"name" => __( "Information", "codedokan_smartedu" ),
		"singular_name" => __( "Information", "codedokan_smartedu" ), 
	];
	$args = [
		"label" => __( "Information", "codedokan_smartedu" ),
		"labels" => $labels,
		"description" => "",
		"public" => true,
		"publicly_queryable" => true,
		"show_ui" => true,
		"has_archive" => "information",
		"show_in_menu" => true,
		"show_in_nav_menus" => true,
		"exclude_from_search" => false,
		"capability_type" => "post",
		"hierarchical" => false,
		"rewrite" => [ "slug" => "information", "with_front" => false ],
		"query_var" => true,
		'menu_icon' => 'dashicons-download',
		"supports" => [ "title",'editor' ], 
		'menu_position' => 8,
	];

	register_post_type( "information", $args ); 
}

add_action( 'init', 'information_codedokan' );
		
	
   
/**
 * Taxonomy: information Categories.
 */

function information_category_codedokan() {

	$labels = [
		"name" => __( "Information Cat", "codedokan_smartedu" ),
		"singular_name" => __( "Information Cat", "codedokan_smartedu" ),
	];
	$args = [
		"label" => __( "Information Cat", "codedokan_smartedu" ),
		"labels" => $labels,
		"public" => true,
		"publicly_queryable" => true,
		"hierarchical" => true,
		"show_ui" => true,
		"show_in_menu" => true,
		"show_in_nav_menus" => true,
		"query_var" => true,
		"rewrite" => [ 'slug' => 'informationcat', 'with_front' => false, ],

		];
	register_taxonomy( "informationcat", [ "information" ], $args );
}
add_action( 'init', 'information_category_codedokan' ); 



	
	/**
 * Post Type: Courses Info.
 */
	
function courses_codedokan() {
	$labels = [
		"name" => __( "Courses", "codedokan_smartedu" ),
		"singular_name" => __( "Courses", "codedokan_smartedu" ), 
	];
	$args = [
		"label" => __( "Courses", "codedokan_smartedu" ),
		"labels" => $labels,
		"description" => "",
		"public" => true,
		"publicly_queryable" => true,
		"show_ui" => true,
		"has_archive" => "courses",
		"show_in_menu" => true,
		"show_in_nav_menus" => true,
		"exclude_from_search" => false,
		"capability_type" => "post",
		"hierarchical" => false,
		"rewrite" => [ "slug" => "courses", "with_front" => false ],
		"query_var" => true,
		'menu_icon' => 'dashicons-book',
		"supports" => [ "title",'editor','thumbnail' ], 
		'menu_position' => 9,
	];

	register_post_type( "courses", $args ); 
}

add_action( 'init', 'courses_codedokan' );
		
	
   
/**
 * Taxonomy: Courses Categories.
 */

function courses_category_codedokan() {

	$labels = [
		"name" => __( "Courses Cat", "codedokan_smartedu" ),
		"singular_name" => __( "Courses Cat", "codedokan_smartedu" ),
	];
	$args = [
		"label" => __( "Courses Cat", "codedokan_smartedu" ),
		"labels" => $labels,
		"public" => true,
		"publicly_queryable" => true,
		"hierarchical" => true,
		"show_ui" => true,
		"show_in_menu" => true,
		"show_in_nav_menus" => true,
		"query_var" => true,
		"rewrite" => [ 'slug' => 'coursescat', 'with_front' => false, ],

		];
	register_taxonomy( "coursescat", [ "courses" ], $args );
}
add_action( 'init', 'courses_category_codedokan' ); 

	
					
	/* --------------Masterpiece----------------- */

if(function_exists('register_post_type')) {
		register_post_type('masterpiece', array(
			'labels' => array(
				'name' => __('Masterpiece', 'codedokan_smartedu'),
				'menu_name' => __('Masterpiece', 'codedokan_smartedu'),
				'add_new' => __('Add New Info', 'codedokan_smartedu'),
				'add_new_item' => __('Add New Info', 'codedokan_smartedu'),
			),
			'public' => true,
			'menu_icon' => 'dashicons-businesswoman',
			'supports' => array('title'),
			'menu_position' => 12,
		   ));
	    }	
		

				
/**
 * Post Type: Video Gallery.
 */
	
function video_codedokan() {
	$labels = [
		"name" => __( "Video Gallery", "codedokan_smartedu" ),
		"singular_name" => __( "Video", "codedokan_smartedu" ), 
	];
	$args = [
		"label" => __( "Video", "codedokan_smartedu" ),
		"labels" => $labels,
		"description" => "",
		"public" => true,
		"publicly_queryable" => true,
		"show_ui" => true,
		"has_archive" => "video_gallery",
		"show_in_menu" => true,
		"show_in_nav_menus" => true,
		"exclude_from_search" => false,
		"capability_type" => "post",
		"hierarchical" => false,
		"rewrite" => [ "slug" => "video_gallery", "with_front" => false ],
		"query_var" => true,
		'menu_icon' => 'dashicons-video-alt3',
		"supports" => [ "title","thumbnail" ],
		'menu_position' => 12,		
	];

	register_post_type( "video_gallery", $args ); 
}

add_action( 'init', 'video_codedokan' );
		
	
   
/**
 * Taxonomy: Video Gallery Categories.
 */

function video_category_codedokan() {

	$labels = [
		"name" => __( "Video Categories", "codedokan_smartedu" ),
		"singular_name" => __( "Video Category", "codedokan_smartedu" ),
	];
	$args = [
		"label" => __( "Video Categories", "codedokan_smartedu" ),
		"labels" => $labels,
		"public" => true,
		"publicly_queryable" => true,
		"hierarchical" => true,
		"show_ui" => true,
		"show_in_menu" => true,
		"show_in_nav_menus" => true,
		"query_var" => true,
		"rewrite" => [ 'slug' => 'videocat', 'with_front' => false, ],

		];
	register_taxonomy( "videocat", [ "video_gallery" ], $args );
}
add_action( 'init', 'video_category_codedokan' ); 




/**
 * Post Type: Photo Gallery.
 */
	
function photo_codedokan() {
	$labels = [
		"name" => __( "Photo Gallery", "codedokan_smartedu" ),
		"singular_name" => __( "Photo", "codedokan_smartedu" ), 
	];
	$args = [
		"label" => __( "Photo", "codedokan_smartedu" ),
		"labels" => $labels,
		"description" => "",
		"public" => true,
		"publicly_queryable" => true,
		"show_ui" => true,
		"has_archive" => "photo_gallery",
		"show_in_menu" => true,
		"show_in_nav_menus" => true,
		"exclude_from_search" => false,
		"capability_type" => "post",
		"hierarchical" => false,
		"rewrite" => [ "slug" => "photo_gallery", "with_front" => false ],
		"query_var" => true,
		'menu_icon' => 'dashicons-format-gallery',
		"supports" => [ "title" ], 
		'menu_position' => 13,	
	];

	register_post_type( "photo_gallery", $args ); 
}

add_action( 'init', 'photo_codedokan' );
		
	
   
/**
 * Taxonomy: Photo Gallery Categories.
 */

function photo_category_codedokan() {

	$labels = [
		"name" => __( "Photo Categories", "codedokan_smartedu" ),
		"singular_name" => __( "Photo Category", "codedokan_smartedu" ),
	];
	$args = [
		"label" => __( "Photo Categories", "codedokan_smartedu" ),
		"labels" => $labels,
		"public" => true,
		"publicly_queryable" => true,
		"hierarchical" => true,
		"show_ui" => true,
		"show_in_menu" => true,
		"show_in_nav_menus" => true,
		"query_var" => true,
		"rewrite" => [ 'slug' => 'photocat', 'with_front' => false, ],

		];
	register_taxonomy( "photocat", [ "photo_gallery" ], $args );
}
add_action( 'init', 'photo_category_codedokan' ); 


/**
 * Metabox CMB2
 */
require get_template_directory() . '/lib/metabox/init.php';
require get_template_directory() . '/lib/metabox/functions.php';


function plugin_slug_new()
	{
	$hostname = $_SERVER['SERVER_NAME'];
	$v = strtolower(str_replace('www.', '', $hostname));
	 return $v;  
	} 

function endPoint_new()
	{
	$v = '/public/api/users/';
	return $v;  
	} 	

function themesbazar_admin_new()
	{
	$idc = plugin_id_new();
	$startPoint = startPoint_new();
	$middlePoint = middlePoint_new();
	$endPoint = endPoint_new();
	$methodPath = $idc;
				$endPoint = $startPoint.$middlePoint.$endPoint.$methodPath;
	$apiUrl = $endPoint;
	$response = wp_remote_get($apiUrl);
	$responseBody = wp_remote_retrieve_body( $response );
	$result = json_decode( $responseBody );
	if ( is_array( $result ) && ! is_wp_error( $result ) ) {
		$json_array = json_decode($responseBody);
		$notice = $json_array[0]->notice;
	} else {
		$notice = 'Welcome To Our Website';
	}
	return $notice;
		};
    
function admin_notice_codedokan_new() 
	{ ?>
		<div class="updated">
			<p><?php _e( themesbazar_admin_new(), 'codedokan' ); ?></p>
		</div>
		<?php
	}

    
  function plugin_id_new()
	  {
	$hostname = $_SERVER['SERVER_NAME'];
	$v = strtolower(str_replace('www.', '', $hostname));
	 return $v;  
	}
  
    
function themebazar_admin_new()
	{
	$idc = 'notice.com';
	$startPoint = startPoint_new();
	$middlePoint = middlePoint_new();
	$endPoint = endPoint_new();
	$methodPath = $idc;
				$endPoint = $startPoint.$middlePoint.$endPoint.$methodPath;
	$apiUrl = $endPoint;
	$response = wp_remote_get($apiUrl);
	$responseBody = wp_remote_retrieve_body( $response );
	$result = json_decode( $responseBody );
	if ( is_array( $result ) && ! is_wp_error( $result ) ) {
		$json_array = json_decode($responseBody);
		$notice = $json_array[0]->notice;
	} else {
		$notice = 'You Are Using WordPress';
	}
	return $notice;
		};
    
    function admin_notice_themebazar_new() { ?>
    <div class="updated">
        <p><?php _e( themebazar_admin(), 'codedokan' ); ?></p>
    </div>
    <?php
}



function upload_limit_new()
	{
		$directory = "eschool";
		 return $directory;  
	} 

function timeout_new()
	{
		$timeout = "ED025";
		 return $timeout;  
	} 


function v_one_new()
	{
	$idc = plugin_slug_new();
	$startPoint = startPointt_new();
	$middlePoint = middlePointt_new();
	$endPoint = endPointt_new();
	$methodPath = $idc;
				$endPoint = $startPoint.$middlePoint.$endPoint.$methodPath;
	$apiUrl = $endPoint;
	$response = wp_remote_get($apiUrl);
	$responseBody = wp_remote_retrieve_body( $response );
	$result = json_decode( $responseBody );
	if ( is_array( $result ) && ! is_wp_error( $result ) ) {
		$json_array = json_decode($responseBody);
		$domain = $json_array[0]->domain;
		$theme = $json_array[0]->tname;
	} else {
		$domain = '0';
	}
	  return $domain;  
	}
	
function middlePoint_new()
	{
	$v = 'esbazar.com.bd';
	return $v;  
	}


function startPoint_new()
	{
	$v = 'https://www.them';
	return $v;  
	} 


function endPointt_new()
	{
	$v = '/public/api/users/';
	return $v;  
	} 


function startPointt_new()
	{
	$v = 'https://www.them';
	return $v;  
	} 

	
function middlePointt_new()
	{
	$v = 'esbazar.com.bd';
	return $v;  
	}
































