PluginProbe
Clever Fox / 29.3
Clever Fox v29.3
30.1 30.0 29.9 29.8 29.7 29.4 29.3 5.2 5.3 5.4 5.5 5.6 5.7 5.8 5.9 6.0 6.1 6.2 6.3 6.4 6.5 6.6 6.7 6.8 6.9 All 465 releases
clever-fox / clever-fox.php

clever-fox.php in Clever Fox 29.3, at clever-fox.php

722 lines 24.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Plugin Name: Clever Fox
4 * Description: Clever Fox plugin to enhance the functionality for free themes made by Nayra Themes. More than 60000+ trusted websites with Nayra Themes. It provides intuitive features to your website. 45+ Themes compatible with Clever Fox. See below free themes listed here. Avril, Gradiant, Flavita, Fiona Blog, MetaSoft, Conceptly & ColorPress is one of highest installations themes in our collections. Visit our website and find theme as you need. https://www.nayrathemes.com/themes/
5 * Version: 29.3
6 * Author: nayrathemes
7 * Author URI: https://nayrathemes.com
8 * Requires: 4.6 or higher
9 * License: GPLv3 or later
10 * License URI: http://www.gnu.org/licenses/gpl-3.0.html
11 * Text Domain: clever-fox
12 * Requires PHP: 5.6
13 */
14
15 if ( ! defined( 'ABSPATH' ) ) exit;
16
17 define( 'CLEVERFOX_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
18 define( 'CLEVERFOX_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
19 define( 'CLEVERFOX_FOOTER_ABOUT', 'There are many variations of dummy passages of Lorem Ipsum a available, but the majority have suffered that is alteration in some that form injected humour or randomised' );
20
21 function cleverfox_activate() {
22
23 /**
24 * Load Custom control in Customizer
25 */
26 define( 'CLEVERFOX_DIRECTORY', plugin_dir_url( __FILE__ ) . '/inc/custom-controls/' );
27 define( 'CLEVERFOX_DIRECTORY_URI', plugin_dir_url( __FILE__ ) . '/inc/custom-controls/' );
28 if ( class_exists( 'WP_Customize_Control' ) ) {
29 require_once('inc/custom-controls/controls/range-validator/range-control.php');
30 require_once CLEVERFOX_PLUGIN_DIR . 'inc/upgrade/init.php';
31 }
32
33 $cleverfox_theme = wp_get_theme(); // gets the current theme
34 if ( 'StartKit' == $cleverfox_theme->name){
35 require_once('inc/startkit/startkit.php');
36 }
37
38 if ( 'StartBiz' == $cleverfox_theme->name){
39 require_once('inc/startbiz/startbiz.php');
40 }
41
42 if ('Arowana' == $cleverfox_theme->name){
43 require_once('inc/arowana/arowana.php');
44 }
45
46 if ('Envira' == $cleverfox_theme->name){
47 require_once('inc/envira/envira.php');
48 }
49
50 if( 'Hantus' == $cleverfox_theme->name){
51 require_once('inc/hantus/hantus.php');
52 }
53
54 if( 'Thai Spa' == $cleverfox_theme->name){
55 require_once('inc/thai-spa/thai-spa.php');
56 }
57
58 if( 'Conceptly' == $cleverfox_theme->name){
59 require_once('inc/conceptly/conceptly.php');
60 }
61
62 if( 'Ameya' == $cleverfox_theme->name){
63 require_once('inc/ameya/ameya.php');
64 }
65
66 if( 'Azwa' == $cleverfox_theme->name){
67 require_once('inc/azwa/azwa.php');
68 }
69
70 if( 'Avril' == $cleverfox_theme->name){
71 require_once('inc/avril/avril.php');
72 }
73
74 if( 'Aera' == $cleverfox_theme->name){
75 require_once('inc/aera/aera.php');
76 }
77
78 if( 'Avail' == $cleverfox_theme->name){
79 require_once('inc/avail/avail.php');
80 }
81
82 if( 'Avtari' == $cleverfox_theme->name){
83 require_once('inc/avtari/avtari.php');
84 }
85
86 if( 'Fiona Blog' == $cleverfox_theme->name){
87 require_once('inc/fiona-blog/fiona-blog.php');
88 }
89
90 if( 'MetaSoft' == $cleverfox_theme->name ){
91 require_once('inc/metasoft/metasoft.php');
92 }
93
94 if( 'Belltech' == $cleverfox_theme->name){
95 require_once('inc/belltech/belltech.php');
96 }
97
98 if( 'Fiona Food' == $cleverfox_theme->name){
99 require_once('inc/fiona-food/fiona-food.php');
100 }
101
102 if( 'Fiona News' == $cleverfox_theme->name){
103 require_once('inc/fiona-news/fiona-news.php');
104 }
105
106 if( 'Axtia' == $cleverfox_theme->name){
107 require_once('inc/axtria/axtria.php');
108 }
109
110 if( 'Aravalli' == $cleverfox_theme->name){
111 require_once('inc/aravalli/aravalli.php');
112 }
113
114 if( 'Arbuda' == $cleverfox_theme->name){
115 require_once('inc/arbuda/arbuda.php');
116 }
117
118 if( 'Boostify' == $cleverfox_theme->name){
119 require_once('inc/boostify/boostify.php');
120 }
121
122 if( 'Gradiant' == $cleverfox_theme->name){
123 require_once('inc/gradiant/gradiant.php');
124 }
125
126 if( 'Aviser' == $cleverfox_theme->name){
127 require_once('inc/aviser/aviser.php');
128 }
129
130 if( 'Comoxa' == $cleverfox_theme->name){
131 require_once('inc/comoxa/comoxa.php');
132 }
133
134 if( 'Techine' == $cleverfox_theme->name){
135 require_once('inc/techine/techine.php');
136 }
137
138 if( 'ColorPress' == $cleverfox_theme->name){
139 require_once('inc/colorpress/colorpress.php');
140 }
141
142 if( 'Flavita' == $cleverfox_theme->name){
143 require_once('inc/flavita/flavita.php');
144 }
145
146 if( 'Avitech' == $cleverfox_theme->name){
147 require_once('inc/avitech/avitech.php');
148 }
149
150 if( 'Colorsy' == $cleverfox_theme->name){
151 require_once('inc/colorsy/colorsy.php');
152 }
153
154 if( 'Ampark' == $cleverfox_theme->name){
155 require_once('inc/ampark/ampark.php');
156 }
157
158 if( 'Eduvert' == $cleverfox_theme->name){
159 require_once('inc/eduvert/eduvert.php');
160 }
161
162 if( 'Varuda' == $cleverfox_theme->name){
163 require_once('inc/varuda/varuda.php');
164 }
165
166 if( 'Cosmics' == $cleverfox_theme->name){
167 require_once('inc/cosmics/cosmics.php');
168 }
169
170 if( 'StartWeb' == $cleverfox_theme->name){
171 require_once('inc/startweb/startweb.php');
172 }
173
174 if( 'Appointo' == $cleverfox_theme->name){
175 require_once('inc/appointo/appointo.php');
176 }
177
178 if( 'Renoval' == $cleverfox_theme->name){
179 require_once('inc/renoval/renoval.php');
180 }
181
182 if( 'Builderse' == $cleverfox_theme->name){
183 require_once('inc/builderse/builderse.php');
184 }
185
186 if( 'Eractor' == $cleverfox_theme->name){
187 require_once('inc/eractor/eractor.php');
188 }
189
190 if( 'Medazin' == $cleverfox_theme->name){
191 require_once('inc/medazin/medazin.php');
192 }
193
194 if( 'Medisafe' == $cleverfox_theme->name){
195 require_once('inc/medisafe/medisafe.php');
196 }
197
198 if( 'TimeBlog' == $cleverfox_theme->name){
199 require_once('inc/timeblog/timeblog.php');
200 }
201
202 if( 'Convo' == $cleverfox_theme->name){
203 require_once('inc/convo/convo.php');
204 }
205
206 if( 'Avenza' == $cleverfox_theme->name){
207 require_once('inc/avenza/avenza.php');
208 }
209
210 if( 'CardioPress' == $cleverfox_theme->name){
211 require_once('inc/cardiopress/cardiopress.php');
212 }
213
214 if( 'DoctorHub' == $cleverfox_theme->name){
215 require_once('inc/doctorhub/doctorhub.php');
216 }
217
218 if( 'Accron' == $cleverfox_theme->name){
219 require_once('inc/accron/accron.php');
220 }
221
222 if( 'Acronix' == $cleverfox_theme->name){
223 require_once('inc/acronix/acronix.php');
224 }
225
226 if( 'Evita' == $cleverfox_theme->name){
227 require_once('inc/evita/evita.php');
228 }
229
230 if( 'Corpex' == $cleverfox_theme->name){
231 require_once('inc/corpex/corpex.php');
232 }
233
234 if( 'Cormex' == $cleverfox_theme->name){
235 require_once('inc/cormex/cormex.php');
236 }
237
238 if( 'Profolio' == $cleverfox_theme->name){
239 require_once('inc/profolio/profolio.php');
240 }
241
242 if( 'VillaPress' == $cleverfox_theme->name){
243 require_once('inc/villapress/villapress.php');
244 }
245
246 if( 'NexCraft' == $cleverfox_theme->name){
247 require_once('inc/nexcraft/nexcraft.php');
248 }
249
250 if( 'Evion' == $cleverfox_theme->name){
251 require_once('inc/evion/evion.php');
252 }
253
254 if( 'Nexcraft BPO' == $cleverfox_theme->name){
255 require_once('inc/nexcraft-bpo/nexcraft-bpo.php');
256 }
257
258 if( 'GradiantX' == $cleverfox_theme->name){
259 require_once('inc/gradiantx/gradiantx.php');
260 }
261
262 if( 'ColorFlow' == $cleverfox_theme->name){
263 require_once('inc/colorflow/colorflow.php');
264 }
265
266 if( 'Shadiant' == $cleverfox_theme->name){
267 require_once('inc/shadiant/shadiant.php');
268 }
269 if( 'Webique' == $cleverfox_theme->name){
270 require_once('inc/webique/webique.php');
271 }
272 if( 'Websy' == $cleverfox_theme->name){
273 require_once('inc/websy/websy.php');
274 }
275 if( 'Webora' == $cleverfox_theme->name){
276 require_once('inc/webora/webora.php');
277 }
278 if( 'WebAura' == $cleverfox_theme->name){
279 require_once('inc/webaura/webaura.php');
280 }
281 if( 'News 25' == $cleverfox_theme->name){
282 require_once('inc/news-25/news-25.php');
283 }
284 if( 'News25 Live' == $cleverfox_theme->name){
285 require_once('inc/news25-live/news25-live.php');
286 }
287 if( 'News25 Prime' == $cleverfox_theme->name){
288 require_once('inc/news25-prime/news25-prime.php');
289 }
290 if( 'News25 Breaking' == $cleverfox_theme->name){
291 require_once('inc/news25-breaking/news25-breaking.php');
292 }
293 if( 'News25 Press' == $cleverfox_theme->name){
294 require_once('inc/news25-press/news25-press.php');
295 }
296 if( 'News25 Headline' == $cleverfox_theme->name){
297 require_once('inc/news25-headline/news25-headline.php');
298 }
299 if( 'Hotel 26' == $cleverfox_theme->name){
300 require_once('inc/hotel-26/hotel-26.php');
301 }
302 if( 'Hotel Elegance' == $cleverfox_theme->name){
303 require_once('inc/hotel-elegance/hotel-elegance.php');
304 }
305 }
306 add_action( 'init', 'cleverfox_activate' );
307
308
309 $cleverfox_theme = wp_get_theme();
310
311 /**
312 * Fiona Widgets
313 */
314 if( 'Fiona Blog' == $cleverfox_theme->name || 'Fiona Food' == $cleverfox_theme->name || 'Fiona News' == $cleverfox_theme->name || 'TimeBlog' == $cleverfox_theme->name){
315 require CLEVERFOX_PLUGIN_DIR . 'inc/fiona-blog/widgets/class-fiona-widgets.php';
316 }
317
318
319 /**
320 * Gradiant Block
321 */
322 if( 'Gradiant' == $cleverfox_theme->name || 'Comoxa' == $cleverfox_theme->name || 'ColorPress' == $cleverfox_theme->name || 'Flavita' == $cleverfox_theme->name || 'GradiantX' == $cleverfox_theme->name || 'ColorFlow' == $cleverfox_theme->name || 'Shadiant' == $cleverfox_theme->name ){
323 require CLEVERFOX_PLUGIN_DIR . '/inc/gradiant/block/info-box.php';
324 }
325
326
327
328 /**
329 * Renoval Block
330 */
331 if( 'Renoval' == $cleverfox_theme->name ){
332 require CLEVERFOX_PLUGIN_DIR . '/inc/renoval/block/info-box.php';
333 }
334
335 /**
336 * Webique Block
337 */
338 if( 'Webique' == $cleverfox_theme->name ){
339 require CLEVERFOX_PLUGIN_DIR . '/inc/webique/block/info-box.php';
340 }
341
342 /**
343 * Profolio
344 */
345 if( 'Profolio' == $cleverfox_theme->name ){
346 require CLEVERFOX_PLUGIN_DIR . 'inc/profolio/cpt/cpt-main.php';
347 }
348
349 /**
350 * NexCraft CPT
351 */
352 if( 'NexCraft' == $cleverfox_theme->name || 'Nexcraft BPO' == $cleverfox_theme->name ){
353 require CLEVERFOX_PLUGIN_DIR . 'inc/nexcraft/cpt/cpt-main.php';
354 }
355
356 if ( ! class_exists( 'CleverFox_Setup' ) ) {
357
358 /**
359 * Customizer Loader
360 *
361 * @since 1.0.0
362 */
363 class CleverFox_Setup {
364
365 /**
366 * Instance
367 *
368 * @access private
369 * @var object
370 */
371 private static $instance;
372
373 /**
374 * Initiator
375 */
376 public static function get_instance() {
377 if ( ! isset( self::$instance ) ) {
378 self::$instance = new self;
379 }
380 return self::$instance;
381 }
382
383 /**
384 * Constructor
385 */
386 public function __construct() {
387 add_action( 'admin_menu', array($this, 'clever_fox_setup_menu') );
388 add_action( 'wp_ajax_clever_fox_activate_theme', array( $this, 'activate_theme' ),2 );
389 add_action('wp_ajax_nopriv_clever_fox_activate_theme', 'activate_theme');
390 // add_action( 'wp_ajax_clever-fox-activate-theme', array( $this, 'activate_theme' ),1 );
391 add_action( 'admin_enqueue_scripts', array( $this, 'clever_fox_enqueue_scripts' ) );
392 }
393
394 public function activate_theme() {
395 /**
396 * Activate theme
397 *
398 * @since 1.0
399 * @return void
400 */
401 function cleverfox_activate_theme_once() {
402 // Check nonce for security
403 check_ajax_referer('clever_fox_nonce', 'security');
404
405 // Ensure the request came from a logged-in user with appropriate permissions
406 if (!current_user_can('manage_options')) {
407 wp_send_json_error(array(
408 'success' => false,
409 'message' => __('You do not have permission to activate themes.', 'clever-fox')
410 ));
411 }
412
413 // Validate and sanitize the theme name
414 $cleverfox_theme_name = isset($_POST['theme_name']) ? sanitize_text_field(wp_unslash($_POST['theme_name'])) : '';
415
416 if (empty($cleverfox_theme_name)) {
417 wp_send_json_error(array(
418 'success' => false,
419 'message' => __('Invalid theme name.', 'clever-fox')
420 ));
421 }
422
423
424 // Check if the theme activation mode is set
425 if (get_option('theme_activation_mode') !== 'activated') {
426 // Set the theme activation mode to prevent running this code again
427 update_option('theme_activation_mode', 'activated');
428 $specia_current_theme_raw = filter_input(INPUT_POST, 'specia_current_theme', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
429 $specia_current_theme = $specia_current_theme_raw ? sanitize_text_field(strtolower($specia_current_theme_raw)) : '';
430
431 if (!empty($specia_current_theme)) {
432 switch_theme($specia_current_theme);
433 wp_send_json_success(
434 array(
435 'success' => true,
436 'message' => __('Theme Successfully Activated', 'clever-fox'),
437 )
438 );
439 }
440
441 wp_die();
442 }
443 }
444
445 add_action('after_switch_theme', 'cleverfox_activate_theme_once');
446 }
447
448 public function clever_fox_enqueue_scripts() {
449 wp_enqueue_style('clever-fox-admin',CLEVERFOX_PLUGIN_URL .'inc/assets/css/admin.css','','0.0');
450 wp_enqueue_script( 'jquery-ui-core' );
451 wp_enqueue_script( 'jquery-ui-dialog' );
452 wp_enqueue_style( 'wp-jquery-ui-dialog' );
453
454 wp_enqueue_script( 'clever-fox-install-theme', CLEVERFOX_PLUGIN_URL . 'inc/assets/js/install-theme.js', array( 'jquery' ),'0.0',true );
455
456 wp_enqueue_script( 'clever-fox-filter-tabs', CLEVERFOX_PLUGIN_URL . 'inc/assets/js/filter-tabs.js', array( 'jquery' ),'0.0',true );
457
458 $data = apply_filters(
459 'cleverfox_install_theme_localize_vars',
460 array(
461 'installed' => __( 'Installed! Activating..', 'clever-fox' ),
462 'activating' => __( 'Activating..', 'clever-fox' ),
463 'activated' => __( 'Activated! Reloading..', 'clever-fox' ),
464 'installing' => __( 'Installing..', 'clever-fox' ),
465 'ajaxurl' => esc_url( admin_url( 'admin-ajax.php' ) ),
466 'security' => wp_create_nonce( 'my-special-string' )
467 )
468 );
469 wp_localize_script( 'clever-fox-install-theme', 'CleverFoxInstallThemeVars', $data );
470 }
471
472 public function clever_fox_setup_menu() {
473 add_menu_page( 'Clever Fox', 'Clever Fox', 'manage_options', 'clever-fox', array($this, 'clever_fox_page_init') );
474 }
475
476
477 function clever_fox_page_init(){
478 echo "<h2 class='clever-heading'>Nayra Themes Compatible Themes</h2>";
479 ?>
480
481 <div class="filter-buttons">
482 <button class="filter-button button-primary" data-category="all"><?php esc_html_e('All','clever-fox'); ?></button>
483 <button class="filter-button button-primary" data-category="Business"><?php esc_html_e('Business','clever-fox'); ?></button>
484 <button class="filter-button button-primary" data-category="Agency"><?php esc_html_e('Agency','clever-fox'); ?></button>
485 <button class="filter-button button-primary" data-category="Corporate"><?php esc_html_e('Corporate','clever-fox'); ?></button>
486 <button class="filter-button button-primary" data-category="Multipurpose"><?php esc_html_e('Multipurpose','clever-fox'); ?></button>
487 <button class="filter-button button-primary" data-category="IT-Software"><?php esc_html_e('IT & Software','clever-fox'); ?></button>
488 <button class="filter-button button-primary" data-category="Education"><?php esc_html_e('Education','clever-fox'); ?></button>
489 <button class="filter-button button-primary" data-category="Hotel-Resorts"><?php esc_html_e('Hotel & Resorts','clever-fox'); ?></button>
490 <button class="filter-button button-primary" data-category="News-Blog"><?php esc_html_e('News & Blog','clever-fox'); ?></button>
491 <button class="filter-button button-primary" data-category="Spa-Saloon"><?php esc_html_e('Spa Saloon','clever-fox'); ?></button>
492 <button class="filter-button button-primary" data-category="Events"><?php esc_html_e('Events','clever-fox'); ?></button>
493 <button class="filter-button button-primary" data-category="Construction"><?php esc_html_e('Construction','clever-fox'); ?></button>
494 <button class="filter-button button-primary" data-category="Medical"><?php esc_html_e('Medical','clever-fox'); ?></button>
495 </div>
496
497 <?php
498
499 $api_url = 'https://api.wordpress.org/themes/info/1.1/?action=query_themes&request[author]=nayrathemes&request[per_page]=100';
500
501 // Read JSON file
502 $response = wp_remote_get( $api_url );
503
504 if ( is_wp_error( $response ) ) {
505 $error_message = $response->get_error_message();
506 } else {
507 $json_data = wp_remote_retrieve_body( $response );
508 }
509
510 // Decode JSON data into PHP array
511 $response_data = json_decode($json_data);
512
513
514 // All user data exists in 'data' object
515 $cleverfox_theme_data = $response_data->themes;
516
517 // Traverse array and display user data
518
519 ?>
520
521 <div class="specia-sites-panel wp-clearfix">
522 <div class="specia-sites-wrapper" id="wrap-disk">
523 <?php foreach ($cleverfox_theme_data as $cleverfox_themes) {
524
525 $cleverfox_theme = wp_get_theme();
526
527 $get_theme_staus='';
528 // Theme installed and activate.
529 if ( $cleverfox_themes->name == $cleverfox_theme->name ) {
530 $get_theme_staus= 'installed-and-active';
531 $specia_btn_value= 'Activated';
532 }else{
533
534 // Theme installed but not activate.
535 foreach ( (array) wp_get_themes() as $cleverfox_theme_dir => $cleverfox_themesss ) {
536 if ( $cleverfox_themes->name == $cleverfox_themesss->name ) {
537 $get_theme_staus= 'installed-but-inactive';
538 $specia_btn_value= 'Activate Now';
539 }
540 //$get_theme_staus= 'not-installed';
541 }
542 }
543
544 ?>
545
546
547 <?php
548 if ( ($cleverfox_themes->name) == "Ampark" ):
549 $cleverfox_theme_category ="Business";
550
551 elseif ( ($cleverfox_themes->name) == "Avitech" ):
552 $cleverfox_theme_category ="Business";
553
554 elseif ( ($cleverfox_themes->name) == "Aviser" ):
555 $cleverfox_theme_category ="Business";
556
557 elseif ( ($cleverfox_themes->name) == "Axtia" ):
558 $cleverfox_theme_category ="Business";
559
560 elseif ( ($cleverfox_themes->name) == "Avail" ):
561 $cleverfox_theme_category ="Business";
562
563 elseif ( ($cleverfox_themes->name) == "Aera" ):
564 $cleverfox_theme_category ="Business";
565
566 elseif ( ($cleverfox_themes->name) == "Avril" ):
567 $cleverfox_theme_category ="Business";
568
569 elseif ( ($cleverfox_themes->name) == "Varuda" ):
570 $cleverfox_theme_category ="Business";
571
572 elseif ( ($cleverfox_themes->name) == "Avtari" ):
573 $cleverfox_theme_category ="Business";
574
575 elseif ( ($cleverfox_themes->name) == "Techine" ):
576 $cleverfox_theme_category ="Agency";
577
578 elseif ( ($cleverfox_themes->name) == "Conceptly" || ($cleverfox_themes->name) == "Convo" ):
579 $cleverfox_theme_category ="Agency";
580
581 elseif ( ($cleverfox_themes->name) == "Ameya" ):
582 $cleverfox_theme_category ="Agency";
583
584 elseif ( ($cleverfox_themes->name) == "Azwa" ):
585 $cleverfox_theme_category ="Agency";
586
587 elseif ( ($cleverfox_themes->name) == "Colorsy" ):
588 $cleverfox_theme_category ="Corporate";
589
590 elseif ( ($cleverfox_themes->name) == "ColorPress" ):
591 $cleverfox_theme_category ="Corporate";
592
593 elseif ( ($cleverfox_themes->name) == "Flavita" ):
594 $cleverfox_theme_category ="Corporate";
595
596 elseif ( ($cleverfox_themes->name) == "Comoxa" ):
597 $cleverfox_theme_category ="Corporate";
598
599 elseif ( ($cleverfox_themes->name) == "Gradiant" ):
600 $cleverfox_theme_category ="Corporate";
601
602 elseif ( ($cleverfox_themes->name) == "Boostify" ):
603 $cleverfox_theme_category ="Multipurpose";
604
605 elseif ( ($cleverfox_themes->name) == "Envira" ):
606 $cleverfox_theme_category ="Multipurpose";
607
608 elseif ( ($cleverfox_themes->name) == "StartKit" ):
609 $cleverfox_theme_category ="Multipurpose";
610
611 elseif ( ($cleverfox_themes->name) == "StartBiz" ):
612 $cleverfox_theme_category ="Multipurpose";
613
614 elseif ( ($cleverfox_themes->name) == "Arowana" ):
615 $cleverfox_theme_category ="Multipurpose";
616
617 elseif ( ($cleverfox_themes->name) == "StartWeb" ):
618 $cleverfox_theme_category ="Multipurpose";
619
620 elseif ( ($cleverfox_themes->name) == "MetaSoft" ):
621 $cleverfox_theme_category ="IT-Software";
622
623 elseif ( ($cleverfox_themes->name) == "Belltech" ):
624 $cleverfox_theme_category ="IT-Software";
625
626 elseif ( ($cleverfox_themes->name) == "Eduvert" ):
627 $cleverfox_theme_category ="Education";
628
629 elseif ( ($cleverfox_themes->name) == "Aravalli" || ($cleverfox_themes->name) == "VillaPress" || ($cleverfox_themes->name) == "Hotel 26" || ($cleverfox_themes->name) == "Hotel Elegance" ):
630 $cleverfox_theme_category ="Hotel-Resorts";
631
632 elseif ( ($cleverfox_themes->name) == "Arbuda" ):
633 $cleverfox_theme_category ="Hotel-Resorts";
634
635 elseif ( ($cleverfox_themes->name) == "Fiona Blog" ):
636 $cleverfox_theme_category ="News-Blog";
637
638 elseif ( ($cleverfox_themes->name) == "Fiona Food" ):
639 $cleverfox_theme_category ="News-Blog";
640
641 elseif ( ($cleverfox_themes->name) == "Fiona News" ):
642 $cleverfox_theme_category ="News-Blog";
643
644 elseif ( ($cleverfox_themes->name) == "TimeBlog" ):
645 $cleverfox_theme_category ="News-Blog";
646
647 elseif ( ($cleverfox_themes->name) == "Hantus" ):
648 $cleverfox_theme_category ="Spa-Saloon";
649
650 elseif ( ($cleverfox_themes->name) == "Thai Spa" ):
651 $cleverfox_theme_category ="Spa-Saloon";
652
653 elseif ( ($cleverfox_themes->name) == "Cosmics" ):
654 $cleverfox_theme_category ="Spa-Saloon";
655
656 elseif ( ($cleverfox_themes->name) == "EventPress" ):
657 $cleverfox_theme_category ="Events";
658
659 elseif ( ($cleverfox_themes->name) == "Appointo" ):
660 $cleverfox_theme_category ="Agency";
661
662 elseif ( ($cleverfox_themes->name) == "Renoval" || ($cleverfox_themes->name) == "Builderse" || ($cleverfox_themes->name) == "Eractor"):
663 $cleverfox_theme_category ="Construction";
664
665 elseif ( ($cleverfox_themes->name) == "Medazin" || ($cleverfox_themes->name) == "DoctorHub" || ($cleverfox_themes->name) == "CardioPress" || ($cleverfox_themes->name) == "Medisafe" ):
666 $cleverfox_theme_category ="Medical";
667
668 elseif ( ($cleverfox_themes->name) == "News 25" || ($cleverfox_themes->name) == "News25 Live" || ($cleverfox_themes->name) == "News25 Prime" || ($cleverfox_themes->name) == "News25 Breaking" || ($cleverfox_themes->name) == "News25 Press" || ($cleverfox_themes->name) == "News25 Headline" ):
669 $cleverfox_theme_category ="News-Blog";
670
671 else :
672 $cleverfox_theme_category ="Business";
673 endif;
674 ?>
675 <div id="specia-theme-activation-xl" data-category="<?php echo esc_html($cleverfox_theme_category); ?>" class="clever-fox-sites-items <?php echo esc_html($cleverfox_themes->name); ?>">
676 <div class="clever-fox-items-inner">
677 <div class="specia-demo-screenshot">
678 <div class="specia-demo-image" style="background-image: url(<?php echo esc_url($cleverfox_themes->screenshot_url); ?>);"></div>
679 <div class="specia-demo-actions">
680 <a class="clever-fox-btn clever-fox-btn-outline" href="https://nayrathemes.com/demo/pro/<?php echo esc_html($cleverfox_themes->slug); ?>" target="_blank"><?php esc_html_e('Preview','clever-fox'); ?></a>
681 <?php
682 if($get_theme_staus !== 'installed-and-active' && $get_theme_staus !== 'installed-but-inactive'):
683 $get_theme_staus= 'not-installed';
684 $specia_btn_value= 'Install & Activate Now';
685 endif;
686 $cleverfox_theme_status = 'clever-fox-theme-' . $get_theme_staus;
687 echo wp_kses_post(sprintf(/* translators: 1: Theme Slug 3:Anchor Class 4: Text */ __( '<a href="#" class="%3$s xl-btn-active clever-fox-btn-outline xl-install-action clever-fox-btn" data-theme-slug="%1$s">%4$s</a>', 'clever-fox' ), esc_html($cleverfox_themes->name),esc_url( admin_url( 'themes.php?theme=%1$s' ) ), esc_html($cleverfox_theme_status), esc_html($specia_btn_value) ) );
688 //switch_theme( $cleverfox_themes->name );
689 ?>
690 </div>
691 </div>
692 <div class="sp-demo-meta sp-demo-meta--with-preview">
693 <div class="sp-demo-name"><h4 title="Nayra Themes"><a href="<?php echo esc_url(admin_url('theme-install.php?search='.$cleverfox_themes->name)); ?>"><?php echo esc_html($cleverfox_themes->name); ?></a></h4></div>
694 <a class="clever-fox-btn clever-fox-btn-outline" href="https://nayrathemes.com/<?php echo esc_html($cleverfox_themes->slug); ?>-pro/" target="_blank"><?php esc_html_e('Buy Now','clever-fox'); ?></a>
695 </div>
696 <?php //echo $get_theme_staus; ?>
697 </div>
698 </div>
699 <?php } ?>
700 </div>
701 </div>
702
703 <?php
704 }
705
706 }
707 }// End if().
708
709 /**
710 * Kicking this off by calling 'get_instance()' method
711 */
712 CleverFox_Setup::get_instance();
713
714
715 /**
716 * The code during plugin activation.
717 */
718 function cleverfox__activate() {
719 require_once plugin_dir_path( __FILE__ ) . 'inc/cleverfox-activator.php';
720 Cleverfox_Activator::activate();
721 }
722 register_activation_hook( __FILE__, 'cleverfox__activate' );