whoami7 - Manager
:
/
home
/
qbizpnmr
/
public_html
/
wp-content
/
themes
/
axtra
/
Upload File:
files >> /home/qbizpnmr/public_html/wp-content/themes/axtra/functions.php
<?php require_once "includes/axtra-site-checker.php"; require_once get_template_directory() . '/includes/loader.php'; function axtra_setup_theme() { load_theme_textdomain( 'axtra', get_template_directory() . '/languages' ); // Add default posts and comments RSS feed links to head. /* * 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( 'custom-header' ); add_theme_support( 'custom-background' ); add_theme_support( 'woocommerce' ); add_theme_support( 'wc-product-gallery-lightbox'); /* * 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_theme_support( 'automatic-feed-links' ); add_theme_support( 'align-wide' ); add_theme_support( 'wp-block-styles' ); add_theme_support( 'editor-styles' ); add_theme_support( 'post', 'page-attributes' ); // Set the default content width. $GLOBALS['content_width'] = 525; /*---------- Register image sizes ----------*/ //Register image sizes add_image_size( 'axtra_550x670', 550, 670, true ); //axtra_550x670 Our Projects add_image_size( 'axtra_945x1000', 945, 1000, true ); //axtra_945x1000 Our Projects add_image_size( 'axtra_520x700', 520, 700, true ); //axtra_520x700 Our Projects add_image_size( 'axtra_390x450', 390, 450, true ); //axtra_945x1000 Latest News add_image_size( 'axtra_700x576', 700, 576, true ); //axtra_700x576 Our Projects add_image_size( 'axtra_390x260', 390, 260, true ); //axtra_390x260 Latest News add_image_size( 'axtra_432x550', 432, 550, true ); //axtra_432x550 Our Team add_image_size( 'axtra_770x980', 770, 980, true ); //axtra_770x980 Our Projects add_image_size( 'axtra_520x700', 520, 700, true ); //axtra_520x700 Our Projects add_image_size( 'axtra_765x1000', 765, 1000, true ); //axtra_765x1000 Team Detail add_image_size( 'axtra_1170x500', 1170, 500, true ); //axtra_1170x500 Our Blog add_image_size( 'axtra_542x689', 542, 689, true ); //axtra_1170x500 Our Blog add_image_size( 'extra_655x830', 655, 830, true ); //extra_655x830 Select Work add_image_size( 'extra_655x450', 655, 450, true ); //extra_655x450 Select Work add_image_size( 'extra_440x580', 440, 580, true ); //extra_440x580 Select Work add_image_size( 'extra_330x400', 330, 400, true ); //extra_330x400 Select Work add_image_size( 'axtra_419x750', 419, 750, true ); //axtra_419x750 showcase_carousel add_image_size( 'extra_1820x500', 1820, 500, true ); //extra_1820x500 Portfolio Masonry add_image_size( 'extra_850x500', 850, 500, true ); //extra_850x500 Portfolio Masonry add_image_size( 'axtra_440x560', 440, 560, true ); //axtra_440x560 Product Carousel /*---------- Register image sizes ends ----------*/ // This theme uses wp_nav_menu() in two locations. register_nav_menus( array( 'main_menu' => esc_html__( 'Main Menu', 'axtra' ), 'sidebar_menu' => esc_html__( 'Header Sidebar Menu', 'axtra' ), 'footer_menu' => esc_html__( 'Footer Menu', 'axtra' ), ) ); /* * Switch default core markup for search form, comment form, and comments * to output valid HTML5. */ add_theme_support( 'html5', array( 'comment-form', 'comment-list', 'gallery', 'caption', ) ); // Add theme support for Custom Logo. add_theme_support( 'custom-logo', array( 'width' => 250, 'height' => 250, 'flex-width' => true, ) ); // Add theme support for selective refresh for widgets. add_theme_support( 'customize-selective-refresh-widgets' ); /* * This theme styles the visual editor to resemble the theme style, * specifically font, colors, and column width. */ add_editor_style(); add_action( 'admin_init', 'axtra_admin_init', 2000000 ); } /** * [axtra_admin_init] * * @param array $data [description] * * @return [type] [description] */ function axtra_admin_init() { remove_action( 'admin_notices', array( 'ReduxFramework', '_admin_notices' ), 99 ); } add_action( 'after_setup_theme', 'axtra_setup_theme' ); add_action( 'after_setup_theme', 'axtra_load_default_hooks' ); /*---------- Sidebar settings ----------*/ /** * [axtra_widgets_init] * * @param array $data [description] * * @return [type] [description] */ function axtra_widgets_init() { global $wp_registered_sidebars; $theme_options = get_theme_mod( 'axtra' . '_options-mods' ); register_sidebar( array( 'name' => esc_html__( 'Default Sidebar', 'axtra' ), 'id' => 'default-sidebar', 'description' => esc_html__( 'Widgets in this area will be shown on the right-hand side.', 'axtra' ), 'before_widget' => '<div id="%1$s" class="widget wow wcfadeUp %2$s">', 'after_widget' => '</div>', 'before_title' => '<h6 class="widget__title-2">', 'after_title' => '</h6>' ) ); register_sidebar(array( 'name' => esc_html__('Footer Widget', 'axtra'), 'id' => 'footer-sidebar', 'description' => esc_html__('Widgets in this area will be shown in Footer Area.', 'axtra'), 'before_widget'=>'<div id="%1$s" class="footer-widget footer__widget %2$s">', 'after_widget'=>'</div>', 'before_title' => '<h2 class="footer__widget-title">', 'after_title' => '</h2>' )); if ( class_exists( '\Elementor\Plugin' )){ register_sidebar(array( 'name' => esc_html__('Footer Two Widget', 'axtra'), 'id' => 'footer-sidebar2', 'description' => esc_html__('Widgets in this area will be shown in Footer Area.', 'axtra'), 'before_widget'=>'<div class="col-lg-3 col-md-6 col-sm-12 footer-column"><div id="%1$s" class="footer-widget footer__item-6 %2$s">', 'after_widget'=>'</div></div>', 'before_title' => '<h2 class="footer__item-title">', 'after_title' => '</h2>' )); register_sidebar(array( 'name' => esc_html__('Footer Three Widget', 'axtra'), 'id' => 'footer-sidebar3', 'description' => esc_html__('Widgets in this area will be shown in Footer Area.', 'axtra'), 'before_widget'=>'<div id="%1$s" class="footer-widget categories_item %2$s">', 'after_widget'=>'</div>', 'before_title' => '<h4 class="cat_title">', 'after_title' => '</h4>' )); register_sidebar(array( 'name' => esc_html__('Footer Four Widget', 'axtra'), 'id' => 'footer-sidebar4', 'description' => esc_html__('Widgets in this area will be shown in Footer Area.', 'axtra'), 'before_widget'=>'<div id="%1$s" class="footer-widget woocomerce__footer-category %2$s">', 'after_widget'=>'</div>', 'before_title' => '<span class="woocomerce__footer-title">', 'after_title' => '</span>' )); register_sidebar(array( 'name' => esc_html__( 'Blog Listing', 'axtra' ), 'id' => 'blog-sidebar', 'description' => esc_html__( 'Widgets in this area will be shown on the right-hand side.', 'axtra' ), 'before_widget'=>'<div id="%1$s" class="widget wow wcfadeUp %2$s">', 'after_widget'=>'</div>', 'before_title' => '<h6 class="widget__title-2">', 'after_title' => '</h6>' )); register_sidebar(array( 'name' => esc_html__( 'Shop Listing', 'axtra' ), 'id' => 'shop-sidebar', 'description' => esc_html__( 'Widgets in this area will be shown on the right-hand side.', 'axtra' ), 'before_widget'=>'<div id="%1$s" class="shop-widget %2$s">', 'after_widget'=>'</div>', 'before_title' => '<h3 class="woocomerce__shopsidebar-title">', 'after_title' => '</h3>' )); } if ( ! is_object( axtra_WSH() ) ) { return; } $sidebars = axtra_set( $theme_options, 'custom_sidebar_name' ); foreach ( array_filter( (array) $sidebars ) as $sidebar ) { if ( axtra_set( $sidebar, 'topcopy' ) ) { continue; } $name = $sidebar; if ( ! $name ) { continue; } $slug = str_replace( ' ', '_', $name ); register_sidebar( array( 'name' => $name, 'id' => sanitize_title( $slug ), 'before_widget' => '<div id="%1$s" class="%2$s widget wow wcfadeUp">', 'after_widget' => '</div>', 'before_title' => '<h6 class="widget__title-2">', 'after_title' => '</h6>', ) ); } update_option( 'wp_registered_sidebars', $wp_registered_sidebars ); } add_action( 'widgets_init', 'axtra_widgets_init' ); /*---------- Sidebar settings ends ----------*/ /*---------- Gutenberg settings ----------*/ function axtra_gutenberg_editor_palette_styles() { add_theme_support( 'editor-color-palette', array( array( 'name' => esc_html__( 'strong yellow', 'axtra' ), 'slug' => 'strong-yellow', 'color' => '#f7bd00', ), array( 'name' => esc_html__( 'strong white', 'axtra' ), 'slug' => 'strong-white', 'color' => '#fff', ), array( 'name' => esc_html__( 'light black', 'axtra' ), 'slug' => 'light-black', 'color' => '#242424', ), array( 'name' => esc_html__( 'very light gray', 'axtra' ), 'slug' => 'very-light-gray', 'color' => '#797979', ), array( 'name' => esc_html__( 'very dark black', 'axtra' ), 'slug' => 'very-dark-black', 'color' => '#000000', ), ) ); add_theme_support( 'editor-font-sizes', array( array( 'name' => esc_html__( 'Small', 'axtra' ), 'size' => 10, 'slug' => 'small' ), array( 'name' => esc_html__( 'Normal', 'axtra' ), 'size' => 15, 'slug' => 'normal' ), array( 'name' => esc_html__( 'Large', 'axtra' ), 'size' => 24, 'slug' => 'large' ), array( 'name' => esc_html__( 'Huge', 'axtra' ), 'size' => 36, 'slug' => 'huge' ) ) ); } add_action( 'after_setup_theme', 'axtra_gutenberg_editor_palette_styles' ); /*---------- Gutenberg settings ends ----------*/ /*---------- Enqueue Styles and Scripts ----------*/ function axtra_enqueue_scripts() { $options = axtra_WSH()->option(); $header_meta = get_post_meta( get_the_ID(), 'header_style_settings'); $header_option = $options->get( 'header_style_settings' ); $header = ( $header_meta ) ? $header_meta['0'] : $header_option; if( $options->get( 'primary' ) ){ $primary = str_replace( '#', '' , $options->get( 'primary' )); }else{ $primary = str_replace( '#', '' , '#c9f31d' ); } if( $options->get( 'secondary' ) ){ $secondary = str_replace( '#', '' , $options->get( 'secondary' )); } else{ $secondary = str_replace( '#', '' , '#2c2c2c' ); } if( $options->get( 'black' ) ){ $black = str_replace( '#', '' , $options->get( 'black' )); } else{ $black = str_replace( '#', '' , '#000' ); } if( $options->get( 'white' ) ){ $white = str_replace( '#', '' , $options->get( 'white' )); } else{ $white = str_replace( '#', '' , '#ffffff' ); } if( $options->get( 'gray' ) ){ $gray = str_replace( '#', '' , $options->get( 'gray' )); } else{ $gray = str_replace( '#', '' , '#c2c2c2' ); } if( $options->get( 'pink' ) ){ $pink = str_replace( '#', '' , $options->get( 'pink' )); } else{ $pink = str_replace( '#', '' , '#FAEDE9' ); } if( $options->get( 'bg_line' ) ){ $bg_line = str_replace( '#', '' , $options->get( 'bg_line' )); } else{ $bg_line = str_replace( '#', '' , '#1e1e1e' ); } //styles wp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/assets/css/bootstrap.min.css' ); wp_enqueue_style( 'axtra-all', get_template_directory_uri() . '/assets/css/all.min.css' ); wp_enqueue_style( 'swiper-bundle', get_template_directory_uri() . '/assets/css/swiper-bundle.min.css' ); wp_enqueue_style( 'progressbar', get_template_directory_uri() . '/assets/css/progressbar.css' ); wp_enqueue_style( 'axtra-meanmenu', get_template_directory_uri() . '/assets/css/meanmenu.min.css' ); wp_enqueue_style( 'axtra-main', get_stylesheet_uri() ); wp_enqueue_style( 'axtra-main-style', get_template_directory_uri() . '/assets/css/master.css' ); wp_enqueue_style( 'axtra-custom', get_template_directory_uri() . '/assets/css/custom.css' ); wp_enqueue_style( 'axtra-tut', get_template_directory_uri() . '/assets/css/tut.css' ); wp_enqueue_style( 'axtra-gutenberg', get_template_directory_uri() . '/assets/css/gutenberg.css' ); //wp_enqueue_style( 'axtra-main-color-scheme', get_template_directory_uri() . '/assets/css/color.php?primary='.$primary.'&secondary='.$secondary.'&black='.$black.'&white='.$white.'&gray='.$gray.'&pink='.$pink.'&bg_line='.$bg_line.''); //scripts wp_enqueue_script( 'jquery-ui-core'); wp_enqueue_script( 'bootstrap-bundle', get_template_directory_uri().'/assets/js/bootstrap.bundle.min.js', array( 'jquery' ), '2.1.2', true ); wp_enqueue_script( 'swiper-bundle', get_template_directory_uri().'/assets/js/swiper-bundle.min.js', array( 'jquery' ), '2.1.2', true ); wp_enqueue_script( 'counter', get_template_directory_uri().'/assets/js/counter.js', array( 'jquery' ), '2.1.2', true ); wp_enqueue_script( 'gsap', get_template_directory_uri().'/assets/js/gsap.min.js', array( 'jquery' ), '2.1.2', true ); wp_enqueue_script( 'scroll-trigge', get_template_directory_uri().'/assets/js/ScrollTrigger.min.js', array( 'jquery' ), '2.1.2', true ); wp_enqueue_script( 'scroll-to-plugin', get_template_directory_uri().'/assets/js/ScrollToPlugin.min.js', array( 'jquery' ), '2.1.2', true ); wp_enqueue_script( 'scroll-smoother', get_template_directory_uri().'/assets/js/ScrollSmoother.min.js', array( 'jquery' ), '2.1.2', true ); wp_enqueue_script( 'split-text', get_template_directory_uri().'/assets/js/SplitText.min.js', array( 'jquery' ), '2.1.2', true ); wp_enqueue_script( 'chroma', get_template_directory_uri().'/assets/js/chroma.min.js', array( 'jquery' ), '2.1.2', true ); wp_enqueue_script( 'mixitup', get_template_directory_uri().'/assets/js/mixitup.min.js', array( 'jquery' ), '2.1.2', true ); wp_enqueue_script( 'vanilla-tilt', get_template_directory_uri().'/assets/js/vanilla-tilt.js', array( 'jquery' ), '2.1.2', true ); wp_enqueue_script( 'meanmenu', get_template_directory_uri().'/assets/js/jquery.meanmenu.min.js', array( 'jquery' ), '2.1.2', true ); wp_enqueue_script( 'axtra-main-script', get_template_directory_uri().'/assets/js/main.js', array(), false, true ); if( is_singular() ) wp_enqueue_script('comment-reply'); } add_action( 'wp_enqueue_scripts', 'axtra_enqueue_scripts' ); /*---------- Enqueue styles and scripts ends ----------*/ /*---------- Google fonts ----------*/ function axtra_fonts_url() { $fonts_url = ''; $font_families['Kanit'] = 'Kanit:300,400,500,600,700&display=swap'; $font_families['Overlock'] = 'Overlock:400,700,900&display=swap'; $font_families['Plus+Jakarta+Sans'] = 'Plus Jakarta Sans:300,400,500,600,700&display=swap'; $font_families = apply_filters( 'AXTRA/includes/classes/header_enqueue/font_families', $font_families ); $query_args = array( 'family' => urlencode( implode( '|', $font_families ) ), 'subset' => urlencode( 'latin,latin-ext' ), ); $protocol = is_ssl() ? 'https' : 'http'; $fonts_url = add_query_arg( $query_args, $protocol . '://fonts.googleapis.com/css' ); return esc_url_raw($fonts_url); } function axtra_theme_styles() { wp_enqueue_style( 'axtra-theme-fonts', axtra_fonts_url(), array(), null ); } add_action( 'wp_enqueue_scripts', 'axtra_theme_styles' ); add_action( 'admin_enqueue_scripts', 'axtra_theme_styles' ); /*---------- Google fonts ends ----------*/ /*---------- More functions ----------*/ // 1) axtra_set function /** * [axtra_set description] * * @param array $data [description] * * @return [type] [description] */ if ( ! function_exists( 'axtra_set' ) ) { function axtra_set( $var, $key, $def = '' ) { if ( is_object( $var ) && isset( $var->$key ) ) { return $var->$key; } elseif ( is_array( $var ) && isset( $var[ $key ] ) ) { return $var[ $key ]; } elseif ( $def ) { return $def; } else { return false; } } } // 2) axtra_add_editor_styles function function axtra_add_editor_styles() { add_editor_style( 'editor-style.css' ); } add_action( 'admin_init', 'axtra_add_editor_styles' ); // 3) Add specific CSS class by filter body class. add_filter( 'body_class', 'custom_class' ); function custom_class( $classes ) { $options = axtra_WSH()->option(); $dark_meta = get_post_meta( get_the_ID(), 'yt_dark_layout'); $rtl_support_option = $options->get( 'rtl_support'); $dark_option = $options->get( 'yt_dark_layout' ); $dark_layout = ( $dark_meta ) ? $dark_meta['0'] : $dark_option; $header_meta = get_post_meta( get_the_ID(), 'header_style_settings'); $header_option = $options->get( 'header_style_settings' ); $header = ( $header_meta ) ? $header_meta['0'] : $header_option; if ( $dark_layout ) { $classes[] = 'dark'; }elseif( $rtl_support_option ){ $classes[] = 'dir-rtl'; } elseif( $header == 'header_v9' ){ $classes[] = 'cf-custom-class'; } return $classes; } add_filter('doing_it_wrong_trigger_error', function () {return false;}, 10, 0); // 4) axtra_related_products_limit function function axtra_related_products_limit() { global $product; $args['posts_per_page'] = 6; return $args; } add_filter( 'woocommerce_output_related_products_args', 'axtra_related_products_args', 20 ); function axtra_related_products_args( $args ) { $args['posts_per_page'] = 4; // 4 related products $args['columns'] = 1; // arranged in 2 columns return $args; } class Axtra_M49792AC1 { public $plugin_file=__FILE__; public $responseObj; public $licenseMessage; public $showMessage=false; public $slug="axtra"; function __construct() { add_action( 'admin_print_styles', [ $this, 'SetAdminStyle' ] ); $licenseKey=get_option("Axtra_lic_Key",""); $liceEmail=get_option( "Axtra_lic_email",""); $templateDir=get_stylesheet_directory(); //or dirname(__FILE__); if(Axtra_Site_Checker::CheckWPPlugin($licenseKey,$liceEmail,$this->licenseMessage,$this->responseObj,$templateDir."/style.css")){ add_action( 'admin_menu', [$this,'ActiveAdminMenu'],99999); add_action( 'admin_post_Axtra_el_deactivate_license', [ $this, 'action_deactivate_license' ] ); }else{ if(!empty($licenseKey) && !empty($this->licenseMessage)){ $this->showMessage=true; } update_option("Axtra_lic_Key","") || add_option("Axtra_lic_Key",""); add_action( 'admin_post_Axtra_el_activate_license', [ $this, 'action_activate_license' ] ); add_action( 'admin_menu', [$this,'InactiveMenu']); } } function SetAdminStyle() { wp_register_style( "AxtraLic", get_theme_file_uri("assets/css/_lic_style.css"),10); wp_enqueue_style( "AxtraLic" ); } function ActiveAdminMenu(){ add_menu_page ( "Axtra License", "Axtra License", "activate_plugins", 'axtra', [$this,"Activated"], get_theme_file_uri("assets/images/menu-icon.png") , 3); //add_submenu_page( 'axtra', "Axtra License", "License Info", "activate_plugins", 'axtra'."_license", [$this,"Activated"] ); images/favicon.png } function InactiveMenu() { add_menu_page( "Axtra License", "Axtra License", 'activate_plugins', 'axtra', [$this,"LicenseForm"], get_theme_file_uri("assets/images/menu-icon.png"), 3 ); } function action_activate_license(){ check_admin_referer( 'el-license' ); $licenseKey=!empty($_POST['el_license_key'])?$_POST['el_license_key']:""; $licenseEmail=!empty($_POST['el_license_email'])?$_POST['el_license_email']:""; update_option("Axtra_lic_Key",$licenseKey) || add_option("Axtra_lic_Key",$licenseKey); update_option("Axtra_lic_email",$licenseEmail) || add_option("Axtra_lic_email",$licenseEmail); update_option('_site_transient_update_themes',''); wp_safe_redirect(admin_url( 'admin.php?page='.'axtra')); } function action_deactivate_license() { check_admin_referer( 'el-license' ); $message=""; if(Axtra_Site_Checker::RemoveLicenseKey(__FILE__,$message)){ update_option("Axtra_lic_Key","") || add_option("Axtra_lic_Key",""); update_option('_site_transient_update_themes',''); } wp_safe_redirect(admin_url( 'admin.php?page='.'axtra')); } function Activated(){ ?> <form method="post" action="<?php echo esc_url( admin_url( 'admin-post.php' ) ); ?>"> <input type="hidden" name="action" value="Axtra_el_deactivate_license"/> <div class="el-license-container"> <h3 class="el-license-title"> <div class="axtra-li-active-header"> <span><img src="<?php echo get_theme_file_uri("assets/images/favicon.png"); ?>" /><?php echo esc_html__(" Axtra License",'axtra');?></span> <a href="<?php echo esc_url(admin_url( 'themes.php?page=axtra_options' )); ?>"><?php echo esc_html__('Settings','axtra'); ?></a> </div> </h3> <hr> <ul class="el-license-info"> <li> <div> <span class="el-license-info-title"><?php echo esc_html__("Status",'axtra');?></span> <?php if ( $this->responseObj->is_valid ) : ?> <span class="el-license-valid"><?php echo esc_html__("Valid",'axtra');?></span> <?php else : ?> <span class="el-license-valid"><?php echo esc_html__("Invalid",'axtra');?></span> <?php endif; ?> </div> </li> <li> <div> <span class="el-license-info-title"><?php echo esc_html__("License Type",'axtra');?></span> <?php echo esc_html($this->responseObj->license_title); ?> </div> </li> <li> <div> <span class="el-license-info-title"><?php echo esc_html__("License Expired on",'axtra');?></span> <?php echo wp_kses_post( $this->responseObj->expire_date ); if(!empty($this->responseObj->expire_renew_link)){ ?> <a target="_blank" class="el-blue-btn" href="<?php echo esc_url($this->responseObj->expire_renew_link); ?>"><?php echo esc_html__('Renew','axtra') ?></a> <?php } ?> </div> </li> <li> <div> <span class="el-license-info-title"><?php echo esc_html__("Support Expired on",'axtra');?></span> <?php echo wp_kses_post( $this->responseObj->support_end ); if(!empty($this->responseObj->support_renew_link)){ ?> <a target="_blank" class="el-blue-btn" href="<?php echo esc_url($this->responseObj->support_renew_link); ?>"><?php echo esc_html__('Renew','axtra') ?></a> <?php } ?> </div> </li> <li> <div> <span class="el-license-info-title"><?php _e("Your License Key",'axtra');?></span> <span class="el-license-key"><?php echo esc_attr( substr($this->responseObj->license_key,0,9)."XXXXXXXX-XXXXXXXX".substr($this->responseObj->license_key,-9) ); ?></span> </div> </li> </ul> <div class="el-license-active-btn"> <?php wp_nonce_field( 'el-license' ); ?> <?php submit_button( 'Deactivate' ); ?> </div> </div> </form> <?php } function LicenseForm() { ?> <form method="post" action="<?php echo esc_url( admin_url( 'admin-post.php' ) ); ?>"> <input type="hidden" name="action" value="Axtra_el_activate_license"/> <div class="el-license-container"> <h3 class="el-license-title"><img src="<?php echo get_theme_file_uri("assets/images/favicon.png"); ?>" /> <?php _e("Axtra Licensing",'axtra');?></h3> <hr> <hr> <?php if(!empty($this->showMessage) && !empty($this->licenseMessage)){ ?> <div class="notice notice-error is-dismissible"> <p><?php echo wp_kses_post($this->licenseMessage); ?></p> </div> <?php } ?> <p><?php echo esc_html__('Please go to your themeforest account to get license code','axtra') ?></p> <div class="el-license-field"> <label for="el_license_key"><?php echo esc_html__("License code",'axtra');?></label> <input type="text" class="regular-text code" name="el_license_key" size="50" placeholder="xxxxxxxx-xxxxxxxx-xxxxxxxx-xxxxxxxx" required="required"> </div> <div class="el-license-field"> <label for="el_license_key"><?php echo esc_html__("Email Address",'axtra');?></label> <?php $purchaseEmail = get_option( "Axtra_lic_email", get_bloginfo( 'admin_email' )); ?> <input type="text" class="regular-text code" name="el_license_email" size="50" value="<?php echo esc_attr($purchaseEmail); ?>" placeholder="envatu@gmail.com" required="required"> <div><small><?php echo esc_html__("We will send update news of this product by this email address, don't worry, we hate spam",'axtra');?></small></div> </div> <div class="el-license-active-btn"> <?php wp_nonce_field( 'el-license' ); ?> <?php submit_button('Activate'); ?> </div> <div class="api-varifucation" style="text-align:center; display:inline-block;position: absolute; right: 10px;bottom: 5px;"> <?php $response = wp_remote_get('https://themecrowdy.com/wp-json/licensor/'); $code = wp_remote_retrieve_response_code( $response ); if ( ( !is_wp_error($response)) && (200 === wp_remote_retrieve_response_code( $response ) ) ) { $responseBody = $response['body']; if( json_last_error() === JSON_ERROR_NONE ) { echo '<p style="border:1px solid #e1e1e1; padding: 5px"> Api varified</p>'; }else{ echo "<p>Api failed {$code }</p>"; } }else{ echo "<p>Api failed {$code }</p>"; } ?> </div> </div> </form> <?php } } new Axtra_M49792AC1();
Copyright ©2021 || Defacer Indonesia