HEX
Server: Apache
System: Linux main79 6.1.0-52-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.180-1 (2026-08-03) x86_64
User: serwer143450 (7544)
PHP: 7.4.33
Disabled: opcache_reset, opcache_invalidate, opcache_compile_file, opcache_get_configuration, opcache_get_status
Upload Files
File: /home/platne/serwer143450/public_html/leasing.hillconnect.pl/wp-content/themes/anada/functions.php
<?php

/**
 * Anada functions and definitions
 *
 * @link https://developer.wordpress.org/themes/basics/theme-functions/
 *
 * @package Anada
 */

/**
 * Table of Contents:

 1. Required Files
 2. Register and Enqueue Styles.
 3. Register and Enqueue Scripts.
 4. Anada Theme Configuration
 5. Anada Widget Register
 6. Anada Functions
 
 */


/**
 * Required Files
 */

require_once get_template_directory() . '/inc/anada-class-wp-bootstrap-navwalker.php';

require_once get_template_directory() . '/inc/anada-options/config.php';

require_once get_template_directory() . '/inc/anada-options/color.php';

/*TGM PLUGIN*/
require_once get_template_directory() . '/tgm-plugin/recommend_plugins.php';

/**
 * Enqueue Google Fonts
 */

function anada_fonts_url() {
    $font_url = '';
    
    /*
    Translators: If there are characters in your language that are not supported
    by chosen font(s), translate this to 'off'. Do not translate into your own language.
     */
    if ( 'off' !== _x( 'on', 'Google font: on or off', 'anada' ) ) {
        $font_url = add_query_arg( 'family', urlencode( 'Nunito:200,300,400,600,700,800&subset=latin,latin-ext' ), "//fonts.googleapis.com/css" );
    }

    return $font_url;
}


/**
 * Register and Enqueue Styles.
 */

function anada_register_styles() {
	
    wp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/css/bootstrap.min.css' );
    wp_style_add_data( 'bootstrap', 'rtl', 'replace' );

    wp_enqueue_style( 'font-awesome', get_template_directory_uri() . '/css/font-awesome.min.css' );

    wp_enqueue_style( 'anada-icons', get_template_directory_uri() . '/css/themify-icons.css' );

    wp_enqueue_style( 'anada-flaticons', get_template_directory_uri() . '/css/flaticon-set.css' );

    wp_enqueue_style( 'magnific-popup', get_template_directory_uri() . '/css/magnific-popup.css' );

    wp_enqueue_style( 'owl-carousel', get_template_directory_uri() . '/css/owl.carousel.min.css' );

    wp_enqueue_style( 'owl-carousal-default', get_template_directory_uri() . '/css/owl.theme.default.min.css' );

    wp_enqueue_style( 'animate', get_template_directory_uri() . '/css/animate.css' );

    wp_enqueue_style( 'bootsnav', get_template_directory_uri() . '/css/bootsnav.css' );
    wp_style_add_data( 'bootsnav', 'rtl', 'replace' );

    wp_enqueue_style( 'anada-style', get_template_directory_uri() . '/css/style.css' );
    wp_style_add_data( 'anada-style', 'rtl', 'replace' );

    wp_enqueue_style( 'anada-responsive', get_template_directory_uri() . '/css/responsive.css' );
    wp_style_add_data( 'anada-responsive', 'rtl', 'replace' );

    wp_enqueue_style( 'anada-fonts', anada_fonts_url(), array(), '1.0.0' );

    if( class_exists( 'ReduxFrameworkPlugin' ) ) { 

    global $anada_options; 

    if ($anada_options['main_color_anada'] == 1) {
    wp_enqueue_style( 'anada-color', get_template_directory_uri() . '/css/theme-color/color-1.css' );
    }

    elseif ($anada_options['main_color_anada'] == 2) {
    wp_enqueue_style( 'anada-color', get_template_directory_uri() . '/css/theme-color/color-2.css' );
    } 

    elseif ($anada_options['main_color_anada'] == 3) {
    wp_enqueue_style( 'anada-color', get_template_directory_uri() . '/css/theme-color/color-3.css' );
    } 

    elseif ($anada_options['main_color_anada'] == 4) {
    wp_enqueue_style( 'anada-color', get_template_directory_uri() . '/css/theme-color/color-4.css' );
    } 

    elseif ($anada_options['main_color_anada'] == 5) {
    wp_enqueue_style( 'anada-color', get_template_directory_uri() . '/css/theme-color/color-5.css' );
    } 

    elseif ($anada_options['main_color_anada'] == 6) {
    wp_enqueue_style( 'anada-color', get_template_directory_uri() . '/css/theme-color/color-6.css' );
    } 

    } 
}

add_action( 'wp_enqueue_scripts', 'anada_register_styles' );


/**
 * Register and Enqueue Scripts.
 */
function anada_register_scripts() {

    wp_enqueue_script(
        'popper',
        get_template_directory_uri() . '/js/popper.min.js',
        array( 'jquery' ),
        '',
        true
    );

    if ( is_rtl() ) {

       wp_enqueue_script(
        'bootstrap',
        get_template_directory_uri() . '/js/bootstrap.min-rtl.js',
        array( 'jquery' ),
        '',
        true
    );

    } else {

       wp_enqueue_script(
        'bootstrap',
        get_template_directory_uri() . '/js/bootstrap.min.js',
        array( 'jquery' ),
        '',
        true
    );

    }

    wp_enqueue_script(
        'equal-height',
        get_template_directory_uri() . '/js/equal-height.min.js',
        array( 'jquery' ),
        '',
        true
    );

    wp_enqueue_script(
        'jquery-appear',
        get_template_directory_uri() . '/js/jquery.appear.js',
        array( 'jquery' ),
        '',
        true
    );

    wp_enqueue_script(
        'jquery-easing',
        get_template_directory_uri() . '/js/jquery.easing.min.js',
        array( 'jquery' ),
        '',
        true
    );

    wp_enqueue_script(
        'magnific-popup',
        get_template_directory_uri() . '/js/jquery.magnific-popup.min.js',
        array( 'jquery' ),
        '',
        true
    );

    wp_enqueue_script(
        'modernizr',
        get_template_directory_uri() . '/js/modernizr.custom.13711.js',
        array( 'jquery' ),
        '',
        true
    );


   wp_enqueue_script(
        'owl-carousel',
        get_template_directory_uri() . '/js/owl.carousel.min.js',
        array( 'jquery' ),
        '',
        true
    );

   wp_enqueue_script(
        'wow-min',
        get_template_directory_uri() . '/js/wow.min.js',
        array( 'jquery' ),
        '',
        true
    );

   wp_enqueue_script(
        'progress-bar',
        get_template_directory_uri() . '/js/progress-bar.min.js',
        array( 'jquery' ),
        '',
        true
    );

   wp_enqueue_script(
        'isotope',
        get_template_directory_uri() . '/js/isotope.pkgd.min.js',
        array( 'jquery' ),
        '',
        true
    );

   wp_enqueue_script(
        'imagesloaded',
        get_template_directory_uri() . '/js/imagesloaded.pkgd.min.js',
        array( 'jquery' ),
        '',
        true
    );

   wp_enqueue_script(
        'count-to',
        get_template_directory_uri() . '/js/count-to.js',
        array( 'jquery' ),
        '',
        true
    );

   wp_enqueue_script(
        'ytplayer',
        get_template_directory_uri() . '/js/YTPlayer.min.js',
        array( 'jquery' ),
        '',
        true
    );

   wp_enqueue_script(
        'circle-progress',
        get_template_directory_uri() . '/js/circle-progress.js',
        array( 'jquery' ),
        '',
        true
    );

   wp_enqueue_script(
        'bootsnav',
        get_template_directory_uri() . '/js/bootsnav.js',
        array( 'jquery' ),
        '',
        true
    );

   if ( is_rtl() ) {

       wp_enqueue_script(
            'anada-main',
            get_template_directory_uri() . '/js/main-rtl.js',
            array( 'jquery' ),
            '',
            true
    );

    } else {

       wp_enqueue_script(
            'anada-main',
            get_template_directory_uri() . '/js/main.js',
            array( 'jquery' ),
            '',
            true
    ); 

    }

}

add_action( 'wp_enqueue_scripts', 'anada_register_scripts' );

/**
 * Anada Theme Configuration
 */

function anada_theme_config(){

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

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

        add_image_size( 'anada-blog', 350, 262, false);
        add_image_size( 'anada-blog-2colum', 540, 405, false);
        add_image_size( 'anada-blog-standard', 920, 500, false);
        add_image_size( 'anada-blog-sidebar', 730, 400, false);

        if( class_exists( 'ReduxFrameworkPlugin' ) ) { 
            register_nav_menus(
                array(
                'main-menu' => 'Main Menu',
                'footer-menu' => 'Footer Menu',
                'additional-menu' => 'Additional Links',
                'usefull-menu' => 'Usefull Links',
                'services-menu' => 'Services',
                )
            ); 
        } else
        {
            register_nav_menus(
                array(
                'main-menu' => 'Main Menu',
                )
            ); 
        }

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

    if ( ! isset( $content_width ) ) $content_width = 900;

    $lang = get_template_directory_uri() . '/languages';
    load_theme_textdomain('anada', $lang);

}

add_action( 'after_setup_theme', 'anada_theme_config' , 0 );

/**
 * Anada Register Widgets
 */

add_action( 'widgets_init', 'anada_widgets_init' );
function anada_widgets_init() {

        register_sidebar( array(
        'name' => esc_html__( 'Main Sidebar', 'anada' ),
        'id' => 'main-sidebar',
        'description' => esc_html__( 'Widgets in this area will be shown on all posts and pages.', 'anada' ),
        'before_widget' => '<div class="sidebar-item category">',
        'after_widget' => '</div>',
        'before_title'  => '<div class="title"><h4>',
        'after_title'   => '</h4></div>',
    ) );
}

/**
 * Anada Functions
 */

function anada_category() {
 $categories = get_the_category();
      $separator = ' ';
      $output = '';
      if($categories){
          foreach($categories as $category) {
              $output .= '<li><a href="'.get_category_link($category->term_id ).'">'.$category->cat_name.'</a></li>'.$separator;
          }
          echo trim($output, $separator);
      }
}

function anada_pagination() {

global $wp_query;

if ( $wp_query->max_num_pages <= 1 ) return; 

$big = 999999999; // need an unlikely integer

$pages = paginate_links( array(
        'prev_text' => wp_specialchars_decode('<i class="fas fa-angle-double-left"></i>',ENT_QUOTES),
        'next_text' => wp_specialchars_decode('<i class="fas fa-angle-double-right"></i>',ENT_QUOTES),
        'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
        'format' => '?paged=%#%',
        'current' => max( 1, get_query_var('paged') ),
        'total' => $wp_query->max_num_pages,
        'type'  => 'array',
    ) );
    if( is_array( $pages ) ) {
        $paged = ( get_query_var('paged') == 0 ) ? 1 : get_query_var('paged');
        echo '<nav aria-label="navigation"><ul class="pagination">';
        foreach ( $pages as $page ) {
                echo "<li class='page-item'>$page</li>";
        }
       echo '</ul></nav>';
        }
}

add_filter( 'widget_tag_cloud_args', 'anada_change_tag_cloud_font_sizes');
function anada_change_tag_cloud_font_sizes( array $args ) {
    $args['default'] = '13';
    $args['smallest'] = '13';
    $args['largest'] = '13';
    $args['unit'] = 'px';

    return $args;
}

// Disable Front-End Edior

function vc_remove_frontend_links() {
    vc_disable_frontend(); // this will disable frontend editor
}
add_action( 'vc_after_init', 'vc_remove_frontend_links' );

// Anada Comments Display

function anada_theme_comment($comment, $args, $depth) {
    //echo 's';
   $GLOBALS['comment'] = $comment;
   $gravatar = get_avatar($comment,$size='80' ); ?>
    <div class="commen-item">
    <div class="avatar">
        <?php echo get_avatar($comment,$size='80' ); ?>
    </div>
    <div class="content">
        <div class="title">
            <h5><?php printf( get_comment_author_link()) ?></h5>
            <span><?php the_time('F j, Y'); ?></span>
        </div>
            <?php comment_text() ?>
        <div class="comments-info">
            <?php comment_reply_link(array_merge( $args, array('reply_text' => '<i class="fa fa-reply"></i>Reply' , 'depth' => $depth, 'max_depth' => $args['max_depth']))) ?>
            </div>
        </div>
    </div>
<?php
}

/**
 * Anada PreDefine Imports
 */

function anada_import_files() {
    return array(
        array(
            'import_file_name'           => 'Home Version 1',
            'categories'                 => array( 'MultiPage' ),
            'import_file_url'            => 'https://wordpressriverthemes.com/anada/themeforest/Demo/data.xml',
            'import_widget_file_url'     => 'https://wordpressriverthemes.com/anada/themeforest/Demo/widgets.wie',
            'import_customizer_file_url' => 'https://wordpressriverthemes.com/anada/themeforest/Demo/custom.dat',
            'import_redux'               => array(
                array(
                    'file_url'    => 'https://wordpressriverthemes.com/anada/themeforest/Demo/redux.json',
                    'option_name' => 'anada_options',
                ),
            ),
            'import_preview_image_url'   => 'https://wordpressriverthemes.com/anada/themeforest/index-1.jpg',
            'import_notice'                => esc_html__( 'Import process may take 2-5 minutes. If you facing any issues please contact our support.', 'anada' ),
            'preview_url'                => 'https://wordpressriverthemes.com/anada/',
        ),
        
        array(
            'import_file_name'           => 'Home Version 2',
            'categories'                 => array( 'MultiPage' ),
            'import_file_url'            => 'https://wordpressriverthemes.com/anada/themeforest/Demo/data.xml',
            'import_widget_file_url'     => 'https://wordpressriverthemes.com/anada/themeforest/Demo/widgets.wie',
            'import_customizer_file_url' => 'https://wordpressriverthemes.com/anada/themeforest/Demo/custom.dat',
            'import_redux'               => array(
                array(
                    'file_url'    => 'https://wordpressriverthemes.com/anada/themeforest/Demo/redux.json',
                    'option_name' => 'anada_options',
                ),
            ),
            'import_preview_image_url'   => 'https://wordpressriverthemes.com/anada/themeforest/index-2.jpg',
            'import_notice'                => esc_html__( 'Import process may take 2-5 minutes. If you facing any issues please contact our support.', 'anada' ),
            'preview_url'                => 'https://wordpressriverthemes.com/anada/home-version-2/',
        ),

        array(
            'import_file_name'           => 'Home Version 3',
            'categories'                 => array( 'MultiPage' ),
            'import_file_url'            => 'https://wordpressriverthemes.com/anada/themeforest/Demo/data.xml',
            'import_widget_file_url'     => 'https://wordpressriverthemes.com/anada/themeforest/Demo/widgets.wie',
            'import_customizer_file_url' => 'https://wordpressriverthemes.com/anada/themeforest/Demo/custom.dat',
            'import_redux'               => array(
                array(
                    'file_url'    => 'https://wordpressriverthemes.com/anada/themeforest/Demo/redux.json',
                    'option_name' => 'anada_options',
                ),
            ),
            'import_preview_image_url'   => 'https://wordpressriverthemes.com/anada/themeforest/index-3.jpg',
            'import_notice'                => esc_html__( 'Import process may take 2-5 minutes. If you facing any issues please contact our support.', 'anada' ),
            'preview_url'                => 'https://wordpressriverthemes.com/anada/home-version-three/',
        ),


        array(
            'import_file_name'           => 'Home Version 4',
            'categories'                 => array( 'MultiPage' ),
            'import_file_url'            => 'https://wordpressriverthemes.com/anada/themeforest/Demo/data.xml',
            'import_widget_file_url'     => 'https://wordpressriverthemes.com/anada/themeforest/Demo/widgets.wie',
            'import_customizer_file_url' => 'https://wordpressriverthemes.com/anada/themeforest/Demo/custom.dat',
            'import_redux'               => array(
                array(
                    'file_url'    => 'https://wordpressriverthemes.com/anada/themeforest/Demo/redux.json',
                    'option_name' => 'anada_options',
                ),
            ),
            'import_preview_image_url'   => 'https://wordpressriverthemes.com/anada/themeforest/index-4.jpg',
            'import_notice'                => esc_html__( 'Import process may take 2-5 minutes. If you facing any issues please contact our support.', 'anada' ),
            'preview_url'                => 'https://wordpressriverthemes.com/anada/home-version-four/',
        ),


        array(
            'import_file_name'           => 'Home Version 5',
            'categories'                 => array( 'MultiPage' ),
            'import_file_url'            => 'https://wordpressriverthemes.com/anada/themeforest/Demo/data.xml',
            'import_widget_file_url'     => 'https://wordpressriverthemes.com/anada/themeforest/Demo/widgets.wie',
            'import_customizer_file_url' => 'https://wordpressriverthemes.com/anada/themeforest/Demo/custom.dat',
            'import_redux'               => array(
                array(
                    'file_url'    => 'https://wordpressriverthemes.com/anada/themeforest/Demo/redux.json',
                    'option_name' => 'anada_options',
                ),
            ),
            'import_preview_image_url'   => 'https://wordpressriverthemes.com/anada/themeforest/index-5.jpg',
            'import_notice'                => esc_html__( 'Import process may take 2-5 minutes. If you facing any issues please contact our support.', 'anada' ),
            'preview_url'                => 'https://wordpressriverthemes.com/anada/home-version-five/',
        ),

        array(
            'import_file_name'           => 'Home Version 6',
            'categories'                 => array( 'MultiPage' ),
            'import_file_url'            => 'https://wordpressriverthemes.com/anada/themeforest/Demo/data.xml',
            'import_widget_file_url'     => 'https://wordpressriverthemes.com/anada/themeforest/Demo/widgets.wie',
            'import_customizer_file_url' => 'https://wordpressriverthemes.com/anada/themeforest/Demo/custom.dat',
            'import_redux'               => array(
                array(
                    'file_url'    => 'https://wordpressriverthemes.com/anada/themeforest/Demo/redux.json',
                    'option_name' => 'anada_options',
                ),
            ),
            'import_preview_image_url'   => 'https://wordpressriverthemes.com/anada/themeforest/index-6.jpg',
            'import_notice'                => esc_html__( 'Import process may take 2-5 minutes. If you facing any issues please contact our support.', 'anada' ),
            'preview_url'                => 'https://wordpressriverthemes.com/anada/home-version-six/',
        ),

        array(
            'import_file_name'           => 'Home Version 7',
            'categories'                 => array( 'MultiPage' ),
            'import_file_url'            => 'https://wordpressriverthemes.com/anada/themeforest/Demo/data.xml',
            'import_widget_file_url'     => 'https://wordpressriverthemes.com/anada/themeforest/Demo/widgets.wie',
            'import_customizer_file_url' => 'https://wordpressriverthemes.com/anada/themeforest/Demo/custom.dat',
            'import_redux'               => array(
                array(
                    'file_url'    => 'https://wordpressriverthemes.com/anada/themeforest/Demo/redux.json',
                    'option_name' => 'anada_options',
                ),
            ),
            'import_preview_image_url'   => 'https://wordpressriverthemes.com/anada/themeforest/index-7.jpg',
            'import_notice'                => esc_html__( 'Import process may take 2-5 minutes. If you facing any issues please contact our support.', 'anada' ),
            'preview_url'                => 'https://wordpressriverthemes.com/anada/home-version-seven/',
        ),

        array(
            'import_file_name'           => 'Home Version 8',
            'categories'                 => array( 'MultiPage' ),
            'import_file_url'            => 'https://wordpressriverthemes.com/anada/themeforest/Demo/data.xml',
            'import_widget_file_url'     => 'https://wordpressriverthemes.com/anada/themeforest/Demo/widgets.wie',
            'import_customizer_file_url' => 'https://wordpressriverthemes.com/anada/themeforest/Demo/custom.dat',
            'import_redux'               => array(
                array(
                    'file_url'    => 'https://wordpressriverthemes.com/anada/themeforest/Demo/redux.json',
                    'option_name' => 'anada_options',
                ),
            ),
            'import_preview_image_url'   => 'https://wordpressriverthemes.com/anada/themeforest/index-8.jpg',
            'import_notice'                => esc_html__( 'Import process may take 2-5 minutes. If you facing any issues please contact our support.', 'anada' ),
            'preview_url'                => 'https://wordpressriverthemes.com/anada/home-version-eight/',
        ),

        array(
            'import_file_name'           => 'Home Version 9',
            'categories'                 => array( 'MultiPage' ),
            'import_file_url'            => 'https://wordpressriverthemes.com/anada/themeforest/Demo/data.xml',
            'import_widget_file_url'     => 'https://wordpressriverthemes.com/anada/themeforest/Demo/widgets.wie',
            'import_customizer_file_url' => 'https://wordpressriverthemes.com/anada/themeforest/Demo/custom.dat',
            'import_redux'               => array(
                array(
                    'file_url'    => 'https://wordpressriverthemes.com/anada/themeforest/Demo/redux.json',
                    'option_name' => 'anada_options',
                ),
            ),
            'import_preview_image_url'   => 'https://wordpressriverthemes.com/anada/themeforest/index-9.jpeg',
            'import_notice'                => esc_html__( 'Import process may take 2-5 minutes. If you facing any issues please contact our support.', 'anada' ),
            'preview_url'                => 'https://wordpressriverthemes.com/anada/home-version-nine/',
        ),

        array(
            'import_file_name'           => 'OnePage Version 1',
            'categories'                 => array( 'OnePage' ),
            'import_file_url'            => 'https://wordpressriverthemes.com/anada/themeforest/Demo/data.xml',
            'import_widget_file_url'     => 'https://wordpressriverthemes.com/anada/themeforest/Demo/widgets.wie',
            'import_customizer_file_url' => 'https://wordpressriverthemes.com/anada/themeforest/Demo/custom.dat',
            'import_redux'               => array(
                array(
                    'file_url'    => 'https://wordpressriverthemes.com/anada/themeforest/Demo/redux.json',
                    'option_name' => 'anada_options',
                ),
            ),
            'import_preview_image_url'   => 'https://wordpressriverthemes.com/anada/themeforest/index-1.jpg',
            'import_notice'                => esc_html__( 'Import process may take 2-5 minutes. If you facing any issues please contact our support.', 'anada' ),
            'preview_url'                => 'https://wordpressriverthemes.com/anada/home-one-page/',
        ),
        
        array(
            'import_file_name'           => 'OnePage Version 2',
            'categories'                 => array( 'OnePage' ),
            'import_file_url'            => 'https://wordpressriverthemes.com/anada/themeforest/Demo/data.xml',
            'import_widget_file_url'     => 'https://wordpressriverthemes.com/anada/themeforest/Demo/widgets.wie',
            'import_customizer_file_url' => 'https://wordpressriverthemes.com/anada/themeforest/Demo/custom.dat',
            'import_redux'               => array(
                array(
                    'file_url'    => 'https://wordpressriverthemes.com/anada/themeforest/Demo/redux.json',
                    'option_name' => 'anada_options',
                ),
            ),
            'import_preview_image_url'   => 'https://wordpressriverthemes.com/anada/themeforest/index-2.jpg',
            'import_notice'                => esc_html__( 'Import process may take 2-5 minutes. If you facing any issues please contact our support.', 'anada' ),
            'preview_url'                => 'https://wordpressriverthemes.com/anada/home-version-two-one-page/',
        ),

        array(
            'import_file_name'           => 'OnePage Version 3',
            'categories'                 => array( 'OnePage' ),
            'import_file_url'            => 'https://wordpressriverthemes.com/anada/themeforest/Demo/data.xml',
            'import_widget_file_url'     => 'https://wordpressriverthemes.com/anada/themeforest/Demo/widgets.wie',
            'import_customizer_file_url' => 'https://wordpressriverthemes.com/anada/themeforest/Demo/custom.dat',
            'import_redux'               => array(
                array(
                    'file_url'    => 'https://wordpressriverthemes.com/anada/themeforest/Demo/redux.json',
                    'option_name' => 'anada_options',
                ),
            ),
            'import_preview_image_url'   => 'https://wordpressriverthemes.com/anada/themeforest/index-3.jpg',
            'import_notice'                => esc_html__( 'Import process may take 2-5 minutes. If you facing any issues please contact our support.', 'anada' ),
            'preview_url'                => 'https://wordpressriverthemes.com/anada/home-version-three-one-page/',
        ),


        array(
            'import_file_name'           => 'OnePage Version 4',
            'categories'                 => array( 'OnePage' ),
            'import_file_url'            => 'https://wordpressriverthemes.com/anada/themeforest/Demo/data.xml',
            'import_widget_file_url'     => 'https://wordpressriverthemes.com/anada/themeforest/Demo/widgets.wie',
            'import_customizer_file_url' => 'https://wordpressriverthemes.com/anada/themeforest/Demo/custom.dat',
            'import_redux'               => array(
                array(
                    'file_url'    => 'https://wordpressriverthemes.com/anada/themeforest/Demo/redux.json',
                    'option_name' => 'anada_options',
                ),
            ),
            'import_preview_image_url'   => 'https://wordpressriverthemes.com/anada/themeforest/index-4.jpg',
            'import_notice'                => esc_html__( 'Import process may take 2-5 minutes. If you facing any issues please contact our support.', 'anada' ),
            'preview_url'                => 'https://wordpressriverthemes.com/anada/home-version-four-one-page/',
        ),


        array(
            'import_file_name'           => 'OnePage Version 5',
            'categories'                 => array( 'OnePage' ),
            'import_file_url'            => 'https://wordpressriverthemes.com/anada/themeforest/Demo/data.xml',
            'import_widget_file_url'     => 'https://wordpressriverthemes.com/anada/themeforest/Demo/widgets.wie',
            'import_customizer_file_url' => 'https://wordpressriverthemes.com/anada/themeforest/Demo/custom.dat',
            'import_redux'               => array(
                array(
                    'file_url'    => 'https://wordpressriverthemes.com/anada/themeforest/Demo/redux.json',
                    'option_name' => 'anada_options',
                ),
            ),
            'import_preview_image_url'   => 'https://wordpressriverthemes.com/anada/themeforest/index-5.jpg',
            'import_notice'                => esc_html__( 'Import process may take 2-5 minutes. If you facing any issues please contact our support.', 'anada' ),
            'preview_url'                => 'https://wordpressriverthemes.com/anada/home-version-five-one-page/',
        ),

        array(
            'import_file_name'           => 'OnePage Version 6',
            'categories'                 => array( 'OnePage' ),
            'import_file_url'            => 'https://wordpressriverthemes.com/anada/themeforest/Demo/data.xml',
            'import_widget_file_url'     => 'https://wordpressriverthemes.com/anada/themeforest/Demo/widgets.wie',
            'import_customizer_file_url' => 'https://wordpressriverthemes.com/anada/themeforest/Demo/custom.dat',
            'import_redux'               => array(
                array(
                    'file_url'    => 'https://wordpressriverthemes.com/anada/themeforest/Demo/redux.json',
                    'option_name' => 'anada_options',
                ),
            ),
            'import_preview_image_url'   => 'https://wordpressriverthemes.com/anada/themeforest/index-6.jpg',
            'import_notice'                => esc_html__( 'Import process may take 2-5 minutes. If you facing any issues please contact our support.', 'anada' ),
            'preview_url'                => 'https://wordpressriverthemes.com/anada/home-version-six-one-page/',
        ),

        array(
            'import_file_name'           => 'OnePage Version 7',
            'categories'                 => array( 'OnePage' ),
            'import_file_url'            => 'https://wordpressriverthemes.com/anada/themeforest/Demo/data.xml',
            'import_widget_file_url'     => 'https://wordpressriverthemes.com/anada/themeforest/Demo/widgets.wie',
            'import_customizer_file_url' => 'https://wordpressriverthemes.com/anada/themeforest/Demo/custom.dat',
            'import_redux'               => array(
                array(
                    'file_url'    => 'https://wordpressriverthemes.com/anada/themeforest/Demo/redux.json',
                    'option_name' => 'anada_options',
                ),
            ),
            'import_preview_image_url'   => 'https://wordpressriverthemes.com/anada/themeforest/index-7.jpg',
            'import_notice'                => esc_html__( 'Import process may take 2-5 minutes. If you facing any issues please contact our support.', 'anada' ),
            'preview_url'                => 'https://wordpressriverthemes.com/anada/home-version-seven-one-page/',
        ),

        array(
            'import_file_name'           => 'OnePage Version 8',
            'categories'                 => array( 'OnePage' ),
            'import_file_url'            => 'https://wordpressriverthemes.com/anada/themeforest/Demo/data.xml',
            'import_widget_file_url'     => 'https://wordpressriverthemes.com/anada/themeforest/Demo/widgets.wie',
            'import_customizer_file_url' => 'https://wordpressriverthemes.com/anada/themeforest/Demo/custom.dat',
            'import_redux'               => array(
                array(
                    'file_url'    => 'https://wordpressriverthemes.com/anada/themeforest/Demo/redux.json',
                    'option_name' => 'anada_options',
                ),
            ),
            'import_preview_image_url'   => 'https://wordpressriverthemes.com/anada/themeforest/index-8.jpg',
            'import_notice'                => esc_html__( 'Import process may take 2-5 minutes. If you facing any issues please contact our support.', 'anada' ),
            'preview_url'                => 'https://wordpressriverthemes.com/anada/home-version-eight-one-page/',
        ),

        array(
            'import_file_name'           => 'OnePage Version 9',
            'categories'                 => array( 'OnePage' ),
            'import_file_url'            => 'https://wordpressriverthemes.com/anada/themeforest/Demo/data.xml',
            'import_widget_file_url'     => 'https://wordpressriverthemes.com/anada/themeforest/Demo/widgets.wie',
            'import_customizer_file_url' => 'https://wordpressriverthemes.com/anada/themeforest/Demo/custom.dat',
            'import_redux'               => array(
                array(
                    'file_url'    => 'https://wordpressriverthemes.com/anada/themeforest/Demo/redux.json',
                    'option_name' => 'anada_options',
                ),
            ),
            'import_preview_image_url'   => 'https://wordpressriverthemes.com/anada/themeforest/index-9.jpeg',
            'import_notice'                => esc_html__( 'Import process may take 2-5 minutes. If you facing any issues please contact our support.', 'anada' ),
            'preview_url'                => 'https://wordpressriverthemes.com/anada/home-version-nine-onepage/',
        ),

        array(
            'import_file_name'           => 'Dark Version 1',
            'categories'                 => array( 'Dark Versions' ),
            'import_file_url'            => 'https://wordpressriverthemes.com/anada/themeforest/Demo/data.xml',
            'import_widget_file_url'     => 'https://wordpressriverthemes.com/anada/themeforest/Demo/widgets.wie',
            'import_customizer_file_url' => 'https://wordpressriverthemes.com/anada/themeforest/Demo/custom.dat',
            'import_redux'               => array(
                array(
                    'file_url'    => 'https://wordpressriverthemes.com/anada/themeforest/Demo/redux.json',
                    'option_name' => 'anada_options',
                ),
            ),
            'import_preview_image_url'   => 'https://wordpressriverthemes.com/anada/themeforest/index-dark.jpeg',
            'import_notice'                => esc_html__( 'Import process may take 2-5 minutes. If you facing any issues please contact our support.', 'anada' ),
            'preview_url'                => 'https://wordpressriverthemes.com/anada/home-dark-version-one-page/',
        ),
        
        array(
            'import_file_name'           => 'Dark Version 2',
            'categories'                 => array( 'Dark Versions' ),
            'import_file_url'            => 'https://wordpressriverthemes.com/anada/themeforest/Demo/data.xml',
            'import_widget_file_url'     => 'https://wordpressriverthemes.com/anada/themeforest/Demo/widgets.wie',
            'import_customizer_file_url' => 'https://wordpressriverthemes.com/anada/themeforest/Demo/custom.dat',
            'import_redux'               => array(
                array(
                    'file_url'    => 'https://wordpressriverthemes.com/anada/themeforest/Demo/redux.json',
                    'option_name' => 'anada_options',
                ),
            ),
            'import_preview_image_url'   => 'https://wordpressriverthemes.com/anada/themeforest/index-dark-2.jpeg',
            'import_notice'                => esc_html__( 'Import process may take 2-5 minutes. If you facing any issues please contact our support.', 'anada' ),
            'preview_url'                => 'https://wordpressriverthemes.com/anada/dark-version-two-one-page/',
        ),

        array(
            'import_file_name'           => 'Dark Version 3',
            'categories'                 => array( 'Dark Versions' ),
            'import_file_url'            => 'https://wordpressriverthemes.com/anada/themeforest/Demo/data.xml',
            'import_widget_file_url'     => 'https://wordpressriverthemes.com/anada/themeforest/Demo/widgets.wie',
            'import_customizer_file_url' => 'https://wordpressriverthemes.com/anada/themeforest/Demo/custom.dat',
            'import_redux'               => array(
                array(
                    'file_url'    => 'https://wordpressriverthemes.com/anada/themeforest/Demo/redux.json',
                    'option_name' => 'anada_options',
                ),
            ),
            'import_preview_image_url'   => 'https://wordpressriverthemes.com/anada/themeforest/index-dark-3.jpeg',
            'import_notice'                => esc_html__( 'Import process may take 2-5 minutes. If you facing any issues please contact our support.', 'anada' ),
            'preview_url'                => 'https://wordpressriverthemes.com/anada/dark-version-three-one-page/',
        ),


        array(
            'import_file_name'           => 'Dark Version 4',
            'categories'                 => array( 'Dark Versions' ),
            'import_file_url'            => 'https://wordpressriverthemes.com/anada/themeforest/Demo/data.xml',
            'import_widget_file_url'     => 'https://wordpressriverthemes.com/anada/themeforest/Demo/widgets.wie',
            'import_customizer_file_url' => 'https://wordpressriverthemes.com/anada/themeforest/Demo/custom.dat',
            'import_redux'               => array(
                array(
                    'file_url'    => 'https://wordpressriverthemes.com/anada/themeforest/Demo/redux.json',
                    'option_name' => 'anada_options',
                ),
            ),
            'import_preview_image_url'   => 'https://wordpressriverthemes.com/anada/themeforest/index-dark-4.jpeg',
            'import_notice'                => esc_html__( 'Import process may take 2-5 minutes. If you facing any issues please contact our support.', 'anada' ),
            'preview_url'                => 'https://wordpressriverthemes.com/anada/dark-version-four-one-page/',
        ),


        array(
            'import_file_name'           => 'Dark Version 5',
            'categories'                 => array( 'Dark Versions' ),
            'import_file_url'            => 'https://wordpressriverthemes.com/anada/themeforest/Demo/data.xml',
            'import_widget_file_url'     => 'https://wordpressriverthemes.com/anada/themeforest/Demo/widgets.wie',
            'import_customizer_file_url' => 'https://wordpressriverthemes.com/anada/themeforest/Demo/custom.dat',
            'import_redux'               => array(
                array(
                    'file_url'    => 'https://wordpressriverthemes.com/anada/themeforest/Demo/redux.json',
                    'option_name' => 'anada_options',
                ),
            ),
            'import_preview_image_url'   => 'https://wordpressriverthemes.com/anada/themeforest/index-dark-5.jpeg',
            'import_notice'                => esc_html__( 'Import process may take 2-5 minutes. If you facing any issues please contact our support.', 'anada' ),
            'preview_url'                => 'https://wordpressriverthemes.com/anada/dark-version-five-one-page/',
        ),

        array(
            'import_file_name'           => 'Dark Version 6',
            'categories'                 => array( 'Dark Versions' ),
            'import_file_url'            => 'https://wordpressriverthemes.com/anada/themeforest/Demo/data.xml',
            'import_widget_file_url'     => 'https://wordpressriverthemes.com/anada/themeforest/Demo/widgets.wie',
            'import_customizer_file_url' => 'https://wordpressriverthemes.com/anada/themeforest/Demo/custom.dat',
            'import_redux'               => array(
                array(
                    'file_url'    => 'https://wordpressriverthemes.com/anada/themeforest/Demo/redux.json',
                    'option_name' => 'anada_options',
                ),
            ),
            'import_preview_image_url'   => 'https://wordpressriverthemes.com/anada/themeforest/index-dark-6.jpeg',
            'import_notice'                => esc_html__( 'Import process may take 2-5 minutes. If you facing any issues please contact our support.', 'anada' ),
            'preview_url'                => 'https://wordpressriverthemes.com/anada/home-dark-version-one-page/',
        ),

    );
}
add_filter( 'pt-ocdi/import_files', 'anada_import_files' );

function anada_ocdi_after_import( $selected_import ) {

    if ( 'Home Version 1' === $selected_import['import_file_name'] ) {

        // Assign menus to their locations.
        $main_menu = get_term_by( 'name', 'Main Menu 1', 'nav_menu' );
        
        // Assign front page and posts page (blog page).
        $front_page_id = get_page_by_title( 'Home' );

        update_option( 'show_on_front', 'page' );
        update_option( 'page_on_front', $front_page_id->ID );
        
    }

    elseif ( 'Home Version 2' === $selected_import['import_file_name'] ) {

        // Assign menus to their locations.
        $main_menu = get_term_by( 'name', 'Main Menu 2', 'nav_menu' );
        
        // Assign front page and posts page (blog page).
        $front_page_id = get_page_by_title( 'Home Version Two' );

        update_option( 'show_on_front', 'page' );
        update_option( 'page_on_front', $front_page_id->ID );
        
    }

    elseif ( 'Home Version 3' === $selected_import['import_file_name'] ) {

        // Assign menus to their locations.
        $main_menu = get_term_by( 'name', 'Main Menu 3', 'nav_menu' );
        
        // Assign front page and posts page (blog page).
        $front_page_id = get_page_by_title( 'Home Version Three' );

        update_option( 'show_on_front', 'page' );
        update_option( 'page_on_front', $front_page_id->ID );
        
    }

    elseif ( 'Home Version 4' === $selected_import['import_file_name'] ) {

        // Assign menus to their locations.
        $main_menu = get_term_by( 'name', 'Main Menu 4', 'nav_menu' );
        
        // Assign front page and posts page (blog page).
        $front_page_id = get_page_by_title( 'Home Version Four' );

        update_option( 'show_on_front', 'page' );
        update_option( 'page_on_front', $front_page_id->ID );
        
    }

    elseif ( 'Home Version 5' === $selected_import['import_file_name'] ) {

        // Assign menus to their locations.
        $main_menu = get_term_by( 'name', 'Main Menu 5', 'nav_menu' );
        
        // Assign front page and posts page (blog page).
        $front_page_id = get_page_by_title( 'Home Version Five' );

        update_option( 'show_on_front', 'page' );
        update_option( 'page_on_front', $front_page_id->ID );
        
    }

    elseif ( 'Home Version 6' === $selected_import['import_file_name'] ) {

        // Assign menus to their locations.
        $main_menu = get_term_by( 'name', 'Main Menu 6', 'nav_menu' );
        
        // Assign front page and posts page (blog page).
        $front_page_id = get_page_by_title( 'Home Version Six' );

        update_option( 'show_on_front', 'page' );
        update_option( 'page_on_front', $front_page_id->ID );
        
    }

    elseif ( 'Home Version 7' === $selected_import['import_file_name'] ) {

        // Assign menus to their locations.
        $main_menu = get_term_by( 'name', 'Main Menu 7', 'nav_menu' );
        
        // Assign front page and posts page (blog page).
        $front_page_id = get_page_by_title( 'Home Version Seven' );

        update_option( 'show_on_front', 'page' );
        update_option( 'page_on_front', $front_page_id->ID );
        
    }

    elseif ( 'Home Version 8' === $selected_import['import_file_name'] ) {

        // Assign menus to their locations.
        $main_menu = get_term_by( 'name', 'Main Menu 8', 'nav_menu' );
        
        // Assign front page and posts page (blog page).
        $front_page_id = get_page_by_title( 'Home Version Eight' );

        update_option( 'show_on_front', 'page' );
        update_option( 'page_on_front', $front_page_id->ID );
        
    }

    elseif ( 'Home Version 9' === $selected_import['import_file_name'] ) {

        // Assign menus to their locations.
        $main_menu = get_term_by( 'name', 'Main Menu 9', 'nav_menu' );
        
        // Assign front page and posts page (blog page).
        $front_page_id = get_page_by_title( 'Home Version Nine' );

        update_option( 'show_on_front', 'page' );
        update_option( 'page_on_front', $front_page_id->ID );
        
    }

    elseif ( 'OnePage Version 1' === $selected_import['import_file_name'] ) {

        // Assign menus to their locations.
        $main_menu = get_term_by( 'name', 'Home One Page', 'nav_menu' );
        
        // Assign front page and posts page (blog page).
        $front_page_id = get_page_by_title( 'Home Version One One Page' );

        update_option( 'show_on_front', 'page' );
        update_option( 'page_on_front', $front_page_id->ID );
        
    }

    elseif ( 'OnePage Version 2' === $selected_import['import_file_name'] ) {

        // Assign menus to their locations.
        $main_menu = get_term_by( 'name', 'Home Two Page', 'nav_menu' );
        
        // Assign front page and posts page (blog page).
        $front_page_id = get_page_by_title( 'Home Version Two One Page' );

        update_option( 'show_on_front', 'page' );
        update_option( 'page_on_front', $front_page_id->ID );
        
    }

    elseif ( 'OnePage Version 3' === $selected_import['import_file_name'] ) {

        // Assign menus to their locations.
        $main_menu = get_term_by( 'name', 'Home Three Page', 'nav_menu' );
        
        // Assign front page and posts page (blog page).
        $front_page_id = get_page_by_title( 'Home Version Three One Page' );

        update_option( 'show_on_front', 'page' );
        update_option( 'page_on_front', $front_page_id->ID );
        
    }

    elseif ( 'OnePage Version 4' === $selected_import['import_file_name'] ) {

        // Assign menus to their locations.
        $main_menu = get_term_by( 'name', 'Home Four Page', 'nav_menu' );
        
        // Assign front page and posts page (blog page).
        $front_page_id = get_page_by_title( 'Home Version Four One Page' );

        update_option( 'show_on_front', 'page' );
        update_option( 'page_on_front', $front_page_id->ID );
        
    }

    elseif ( 'OnePage Version 5' === $selected_import['import_file_name'] ) {

        // Assign menus to their locations.
        $main_menu = get_term_by( 'name', 'Home Page Five', 'nav_menu' );
        
        // Assign front page and posts page (blog page).
        $front_page_id = get_page_by_title( 'Home Version Five One Page' );

        update_option( 'show_on_front', 'page' );
        update_option( 'page_on_front', $front_page_id->ID );
        
    }

    elseif ( 'OnePage Version 6' === $selected_import['import_file_name'] ) {

        // Assign menus to their locations.
        $main_menu = get_term_by( 'name', 'Home Six Page', 'nav_menu' );
        
        // Assign front page and posts page (blog page).
        $front_page_id = get_page_by_title( 'Home Version Six One Page' );

        update_option( 'show_on_front', 'page' );
        update_option( 'page_on_front', $front_page_id->ID );
        
    }

    elseif ( 'OnePage Version 7' === $selected_import['import_file_name'] ) {

        // Assign menus to their locations.
        $main_menu = get_term_by( 'name', 'Home Seven Page', 'nav_menu' );
        
        // Assign front page and posts page (blog page).
        $front_page_id = get_page_by_title( 'Home Version Seven One Page' );

        update_option( 'show_on_front', 'page' );
        update_option( 'page_on_front', $front_page_id->ID );
        
    }

    elseif ( 'OnePage Version 8' === $selected_import['import_file_name'] ) {

        // Assign menus to their locations.
        $main_menu = get_term_by( 'name', 'Home Eight Page', 'nav_menu' );
        
        // Assign front page and posts page (blog page).
        $front_page_id = get_page_by_title( 'Home Version Eight One Page' );

        update_option( 'show_on_front', 'page' );
        update_option( 'page_on_front', $front_page_id->ID );
        
    }

    elseif ( 'OnePage Version 9' === $selected_import['import_file_name'] ) {

        // Assign menus to their locations.
        $main_menu = get_term_by( 'name', 'Home Nine Page', 'nav_menu' );
        
        // Assign front page and posts page (blog page).
        $front_page_id = get_page_by_title( 'Home Version Nine One Page' );

        update_option( 'show_on_front', 'page' );
        update_option( 'page_on_front', $front_page_id->ID );
        
    }

    elseif ( 'Dark Version 1' === $selected_import['import_file_name'] ) {

        // Assign menus to their locations.
        $main_menu = get_term_by( 'name', 'Home One Page', 'nav_menu' );
        
        // Assign front page and posts page (blog page).
        $front_page_id = get_page_by_title( 'Dark One' );

        update_option( 'show_on_front', 'page' );
        update_option( 'page_on_front', $front_page_id->ID );
        
    }

    elseif ( 'Dark Version 2' === $selected_import['import_file_name'] ) {

        // Assign menus to their locations.
        $main_menu = get_term_by( 'name', 'Home Two Page', 'nav_menu' );
        
        // Assign front page and posts page (blog page).
        $front_page_id = get_page_by_title( 'Dark Two' );

        update_option( 'show_on_front', 'page' );
        update_option( 'page_on_front', $front_page_id->ID );
        
    }

    elseif ( 'Dark Version 3' === $selected_import['import_file_name'] ) {

        // Assign menus to their locations.
        $main_menu = get_term_by( 'name', 'Home Three Page', 'nav_menu' );
        
        // Assign front page and posts page (blog page).
        $front_page_id = get_page_by_title( 'Dark Three' );

        update_option( 'show_on_front', 'page' );
        update_option( 'page_on_front', $front_page_id->ID );
        
    }

    elseif ( 'Dark Version 4' === $selected_import['import_file_name'] ) {

        // Assign menus to their locations.
        $main_menu = get_term_by( 'name', 'Home Four Page', 'nav_menu' );
        
        // Assign front page and posts page (blog page).
        $front_page_id = get_page_by_title( 'Dark Four' );

        update_option( 'show_on_front', 'page' );
        update_option( 'page_on_front', $front_page_id->ID );
        
    }

    elseif ( 'Dark Version 5' === $selected_import['import_file_name'] ) {

        // Assign menus to their locations.
        $main_menu = get_term_by( 'name', 'Home Page Five', 'nav_menu' );
        
        // Assign front page and posts page (blog page).
        $front_page_id = get_page_by_title( 'Dark Five' );

        update_option( 'show_on_front', 'page' );
        update_option( 'page_on_front', $front_page_id->ID );
        
    }

    elseif ( 'Dark Version 6' === $selected_import['import_file_name'] ) {

        // Assign menus to their locations.
        $main_menu = get_term_by( 'name', 'Home Six Page', 'nav_menu' );
        
        // Assign front page and posts page (blog page).
        $front_page_id = get_page_by_title( 'Dark Six' );

        update_option( 'show_on_front', 'page' );
        update_option( 'page_on_front', $front_page_id->ID );
        
    }

    // Assign menus to their locations.

    $footer_menu = get_term_by( 'name', 'Footer Menu', 'nav_menu' );
    $add_menu = get_term_by( 'name', 'Addtional Links', 'nav_menu' );
    $service_menu = get_term_by( 'name', 'Services', 'nav_menu' );
    $usefull_menu = get_term_by( 'name', 'Usefull Links', 'nav_menu' );

    set_theme_mod( 'nav_menu_locations', array(
            'main-menu' => $main_menu->term_id, // replace 'main-menu' here with the menu location identifier from register_nav_menu() function
            'footer-menu' => $footer_menu->term_id,
            'additional-menu' => $add_menu->term_id,
            'services-menu' => $service_menu->term_id,
            'usefull-menu' => $usefull_menu->term_id,
        )
    );
}
add_action( 'pt-ocdi/after_import', 'anada_ocdi_after_import' );