PluginProbe
Clever Fox / 29.9
Clever Fox v29.9
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.9, at clever-fox.php

728 lines 25.0 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.9
6 * Author: nayrathemes
7 * Author URI: https://nayrathemes.com
8 * Requires at least : 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: 7.4
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 if( 'Hotel Prime' == $cleverfox_theme->name){
306 require_once('inc/hotel-prime/hotel-prime.php');
307 }
308 if( 'Axivo' == $cleverfox_theme->name){
309 require_once('inc/axivo/axivo.php');
310 }
311 }
312 add_action( 'init', 'cleverfox_activate' );
313
314
315 $cleverfox_theme = wp_get_theme();
316
317 /**
318 * Fiona Widgets
319 */
320 if( 'Fiona Blog' == $cleverfox_theme->name || 'Fiona Food' == $cleverfox_theme->name || 'Fiona News' == $cleverfox_theme->name || 'TimeBlog' == $cleverfox_theme->name){
321 require CLEVERFOX_PLUGIN_DIR . 'inc/fiona-blog/widgets/class-fiona-widgets.php';
322 }
323
324
325 /**
326 * Gradiant Block
327 */
328 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 ){
329 require CLEVERFOX_PLUGIN_DIR . '/inc/gradiant/block/info-box.php';
330 }
331
332
333
334 /**
335 * Renoval Block
336 */
337 if( 'Renoval' == $cleverfox_theme->name ){
338 require CLEVERFOX_PLUGIN_DIR . '/inc/renoval/block/info-box.php';
339 }
340
341 /**
342 * Webique Block
343 */
344 if( 'Webique' == $cleverfox_theme->name ){
345 require CLEVERFOX_PLUGIN_DIR . '/inc/webique/block/info-box.php';
346 }
347
348 /**
349 * Profolio
350 */
351 if( 'Profolio' == $cleverfox_theme->name ){
352 require CLEVERFOX_PLUGIN_DIR . 'inc/profolio/cpt/cpt-main.php';
353 }
354
355 /**
356 * NexCraft CPT
357 */
358 if( 'NexCraft' == $cleverfox_theme->name || 'Nexcraft BPO' == $cleverfox_theme->name ){
359 require CLEVERFOX_PLUGIN_DIR . 'inc/nexcraft/cpt/cpt-main.php';
360 }
361
362 if ( ! class_exists( 'CleverFox_Setup' ) ) {
363
364 /**
365 * Customizer Loader
366 *
367 * @since 1.0.0
368 */
369 class CleverFox_Setup {
370
371 /**
372 * Instance
373 *
374 * @access private
375 * @var object
376 */
377 private static $instance;
378
379 /**
380 * Initiator
381 */
382 public static function get_instance() {
383 if ( ! isset( self::$instance ) ) {
384 self::$instance = new self;
385 }
386 return self::$instance;
387 }
388
389 /**
390 * Constructor
391 */
392 public function __construct() {
393 add_action( 'admin_menu', array($this, 'clever_fox_setup_menu') );
394 add_action( 'wp_ajax_clever_fox_activate_theme', array( $this, 'activate_theme' ),2 );
395 add_action('wp_ajax_nopriv_clever_fox_activate_theme', 'activate_theme');
396 // add_action( 'wp_ajax_clever-fox-activate-theme', array( $this, 'activate_theme' ),1 );
397 add_action( 'admin_enqueue_scripts', array( $this, 'clever_fox_enqueue_scripts' ) );
398 }
399
400 public function activate_theme() {
401 /**
402 * Activate theme
403 *
404 * @since 1.0
405 * @return void
406 */
407 function cleverfox_activate_theme_once() {
408 // Check nonce for security
409 check_ajax_referer('clever_fox_nonce', 'security');
410
411 // Ensure the request came from a logged-in user with appropriate permissions
412 if (!current_user_can('manage_options')) {
413 wp_send_json_error(array(
414 'success' => false,
415 'message' => __('You do not have permission to activate themes.', 'clever-fox')
416 ));
417 }
418
419 // Validate and sanitize the theme name
420 $cleverfox_theme_name = isset($_POST['theme_name']) ? sanitize_text_field(wp_unslash($_POST['theme_name'])) : '';
421
422 if (empty($cleverfox_theme_name)) {
423 wp_send_json_error(array(
424 'success' => false,
425 'message' => __('Invalid theme name.', 'clever-fox')
426 ));
427 }
428
429
430 // Check if the theme activation mode is set
431 if (get_option('theme_activation_mode') !== 'activated') {
432 // Set the theme activation mode to prevent running this code again
433 update_option('theme_activation_mode', 'activated');
434 $specia_current_theme_raw = filter_input(INPUT_POST, 'specia_current_theme', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
435 $specia_current_theme = $specia_current_theme_raw ? sanitize_text_field(strtolower($specia_current_theme_raw)) : '';
436
437 if (!empty($specia_current_theme)) {
438 switch_theme($specia_current_theme);
439 wp_send_json_success(
440 array(
441 'success' => true,
442 'message' => __('Theme Successfully Activated', 'clever-fox'),
443 )
444 );
445 }
446
447 wp_die();
448 }
449 }
450
451 add_action('after_switch_theme', 'cleverfox_activate_theme_once');
452 }
453
454 public function clever_fox_enqueue_scripts() {
455 wp_enqueue_style('clever-fox-admin',CLEVERFOX_PLUGIN_URL .'inc/assets/css/admin.css','','0.0');
456 wp_enqueue_script( 'jquery-ui-core' );
457 wp_enqueue_script( 'jquery-ui-dialog' );
458 wp_enqueue_style( 'wp-jquery-ui-dialog' );
459
460 wp_enqueue_script( 'clever-fox-install-theme', CLEVERFOX_PLUGIN_URL . 'inc/assets/js/install-theme.js', array( 'jquery' ),'0.0',true );
461
462 wp_enqueue_script( 'clever-fox-filter-tabs', CLEVERFOX_PLUGIN_URL . 'inc/assets/js/filter-tabs.js', array( 'jquery' ),'0.0',true );
463
464 $data = apply_filters(
465 'cleverfox_install_theme_localize_vars',
466 array(
467 'installed' => __( 'Installed! Activating..', 'clever-fox' ),
468 'activating' => __( 'Activating..', 'clever-fox' ),
469 'activated' => __( 'Activated! Reloading..', 'clever-fox' ),
470 'installing' => __( 'Installing..', 'clever-fox' ),
471 'ajaxurl' => esc_url( admin_url( 'admin-ajax.php' ) ),
472 'security' => wp_create_nonce( 'my-special-string' )
473 )
474 );
475 wp_localize_script( 'clever-fox-install-theme', 'CleverFoxInstallThemeVars', $data );
476 }
477
478 public function clever_fox_setup_menu() {
479 add_menu_page( 'Clever Fox', 'Clever Fox', 'manage_options', 'clever-fox', array($this, 'clever_fox_page_init') );
480 }
481
482
483 function clever_fox_page_init(){
484 echo "<h2 class='clever-heading'>Nayra Themes Compatible Themes</h2>";
485 ?>
486
487 <div class="filter-buttons">
488 <button class="filter-button button-primary" data-category="all"><?php esc_html_e('All','clever-fox'); ?></button>
489 <button class="filter-button button-primary" data-category="Business"><?php esc_html_e('Business','clever-fox'); ?></button>
490 <button class="filter-button button-primary" data-category="Agency"><?php esc_html_e('Agency','clever-fox'); ?></button>
491 <button class="filter-button button-primary" data-category="Corporate"><?php esc_html_e('Corporate','clever-fox'); ?></button>
492 <button class="filter-button button-primary" data-category="Multipurpose"><?php esc_html_e('Multipurpose','clever-fox'); ?></button>
493 <button class="filter-button button-primary" data-category="IT-Software"><?php esc_html_e('IT & Software','clever-fox'); ?></button>
494 <button class="filter-button button-primary" data-category="Education"><?php esc_html_e('Education','clever-fox'); ?></button>
495 <button class="filter-button button-primary" data-category="Hotel-Resorts"><?php esc_html_e('Hotel & Resorts','clever-fox'); ?></button>
496 <button class="filter-button button-primary" data-category="News-Blog"><?php esc_html_e('News & Blog','clever-fox'); ?></button>
497 <button class="filter-button button-primary" data-category="Spa-Saloon"><?php esc_html_e('Spa Saloon','clever-fox'); ?></button>
498 <button class="filter-button button-primary" data-category="Events"><?php esc_html_e('Events','clever-fox'); ?></button>
499 <button class="filter-button button-primary" data-category="Construction"><?php esc_html_e('Construction','clever-fox'); ?></button>
500 <button class="filter-button button-primary" data-category="Medical"><?php esc_html_e('Medical','clever-fox'); ?></button>
501 </div>
502
503 <?php
504
505 $api_url = 'https://api.wordpress.org/themes/info/1.1/?action=query_themes&request[author]=nayrathemes&request[per_page]=100';
506
507 // Read JSON file
508 $response = wp_remote_get( $api_url );
509
510 if ( is_wp_error( $response ) ) {
511 $error_message = $response->get_error_message();
512 } else {
513 $json_data = wp_remote_retrieve_body( $response );
514 }
515
516 // Decode JSON data into PHP array
517 $response_data = json_decode($json_data);
518
519
520 // All user data exists in 'data' object
521 $cleverfox_theme_data = $response_data->themes;
522
523 // Traverse array and display user data
524
525 ?>
526
527 <div class="specia-sites-panel wp-clearfix">
528 <div class="specia-sites-wrapper" id="wrap-disk">
529 <?php foreach ($cleverfox_theme_data as $cleverfox_themes) {
530
531 $cleverfox_theme = wp_get_theme();
532
533 $get_theme_staus='';
534 // Theme installed and activate.
535 if ( $cleverfox_themes->name == $cleverfox_theme->name ) {
536 $get_theme_staus= 'installed-and-active';
537 $specia_btn_value= 'Activated';
538 }else{
539
540 // Theme installed but not activate.
541 foreach ( (array) wp_get_themes() as $cleverfox_theme_dir => $cleverfox_themesss ) {
542 if ( $cleverfox_themes->name == $cleverfox_themesss->name ) {
543 $get_theme_staus= 'installed-but-inactive';
544 $specia_btn_value= 'Activate Now';
545 }
546 //$get_theme_staus= 'not-installed';
547 }
548 }
549
550 ?>
551
552
553 <?php
554 if ( ($cleverfox_themes->name) == "Ampark" || ($cleverfox_themes->name) == "Axivo" ):
555 $cleverfox_theme_category ="Business";
556
557 elseif ( ($cleverfox_themes->name) == "Avitech" ):
558 $cleverfox_theme_category ="Business";
559
560 elseif ( ($cleverfox_themes->name) == "Aviser" ):
561 $cleverfox_theme_category ="Business";
562
563 elseif ( ($cleverfox_themes->name) == "Axtia" ):
564 $cleverfox_theme_category ="Business";
565
566 elseif ( ($cleverfox_themes->name) == "Avail" ):
567 $cleverfox_theme_category ="Business";
568
569 elseif ( ($cleverfox_themes->name) == "Aera" ):
570 $cleverfox_theme_category ="Business";
571
572 elseif ( ($cleverfox_themes->name) == "Avril" ):
573 $cleverfox_theme_category ="Business";
574
575 elseif ( ($cleverfox_themes->name) == "Varuda" ):
576 $cleverfox_theme_category ="Business";
577
578 elseif ( ($cleverfox_themes->name) == "Avtari" ):
579 $cleverfox_theme_category ="Business";
580
581 elseif ( ($cleverfox_themes->name) == "Techine" ):
582 $cleverfox_theme_category ="Agency";
583
584 elseif ( ($cleverfox_themes->name) == "Conceptly" || ($cleverfox_themes->name) == "Convo" ):
585 $cleverfox_theme_category ="Agency";
586
587 elseif ( ($cleverfox_themes->name) == "Ameya" ):
588 $cleverfox_theme_category ="Agency";
589
590 elseif ( ($cleverfox_themes->name) == "Azwa" ):
591 $cleverfox_theme_category ="Agency";
592
593 elseif ( ($cleverfox_themes->name) == "Colorsy" ):
594 $cleverfox_theme_category ="Corporate";
595
596 elseif ( ($cleverfox_themes->name) == "ColorPress" ):
597 $cleverfox_theme_category ="Corporate";
598
599 elseif ( ($cleverfox_themes->name) == "Flavita" ):
600 $cleverfox_theme_category ="Corporate";
601
602 elseif ( ($cleverfox_themes->name) == "Comoxa" ):
603 $cleverfox_theme_category ="Corporate";
604
605 elseif ( ($cleverfox_themes->name) == "Gradiant" ):
606 $cleverfox_theme_category ="Corporate";
607
608 elseif ( ($cleverfox_themes->name) == "Boostify" ):
609 $cleverfox_theme_category ="Multipurpose";
610
611 elseif ( ($cleverfox_themes->name) == "Envira" ):
612 $cleverfox_theme_category ="Multipurpose";
613
614 elseif ( ($cleverfox_themes->name) == "StartKit" ):
615 $cleverfox_theme_category ="Multipurpose";
616
617 elseif ( ($cleverfox_themes->name) == "StartBiz" ):
618 $cleverfox_theme_category ="Multipurpose";
619
620 elseif ( ($cleverfox_themes->name) == "Arowana" ):
621 $cleverfox_theme_category ="Multipurpose";
622
623 elseif ( ($cleverfox_themes->name) == "StartWeb" ):
624 $cleverfox_theme_category ="Multipurpose";
625
626 elseif ( ($cleverfox_themes->name) == "MetaSoft" ):
627 $cleverfox_theme_category ="IT-Software";
628
629 elseif ( ($cleverfox_themes->name) == "Belltech" ):
630 $cleverfox_theme_category ="IT-Software";
631
632 elseif ( ($cleverfox_themes->name) == "Eduvert" ):
633 $cleverfox_theme_category ="Education";
634
635 elseif ( ($cleverfox_themes->name) == "Aravalli" || ($cleverfox_themes->name) == "VillaPress" || ($cleverfox_themes->name) == "Hotel 26" || ($cleverfox_themes->name) == "Hotel Elegance" || ($cleverfox_themes->name) == "Hotel Prime" ):
636 $cleverfox_theme_category ="Hotel-Resorts";
637
638 elseif ( ($cleverfox_themes->name) == "Arbuda" ):
639 $cleverfox_theme_category ="Hotel-Resorts";
640
641 elseif ( ($cleverfox_themes->name) == "Fiona Blog" ):
642 $cleverfox_theme_category ="News-Blog";
643
644 elseif ( ($cleverfox_themes->name) == "Fiona Food" ):
645 $cleverfox_theme_category ="News-Blog";
646
647 elseif ( ($cleverfox_themes->name) == "Fiona News" ):
648 $cleverfox_theme_category ="News-Blog";
649
650 elseif ( ($cleverfox_themes->name) == "TimeBlog" ):
651 $cleverfox_theme_category ="News-Blog";
652
653 elseif ( ($cleverfox_themes->name) == "Hantus" ):
654 $cleverfox_theme_category ="Spa-Saloon";
655
656 elseif ( ($cleverfox_themes->name) == "Thai Spa" ):
657 $cleverfox_theme_category ="Spa-Saloon";
658
659 elseif ( ($cleverfox_themes->name) == "Cosmics" ):
660 $cleverfox_theme_category ="Spa-Saloon";
661
662 elseif ( ($cleverfox_themes->name) == "EventPress" ):
663 $cleverfox_theme_category ="Events";
664
665 elseif ( ($cleverfox_themes->name) == "Appointo" ):
666 $cleverfox_theme_category ="Agency";
667
668 elseif ( ($cleverfox_themes->name) == "Renoval" || ($cleverfox_themes->name) == "Builderse" || ($cleverfox_themes->name) == "Eractor"):
669 $cleverfox_theme_category ="Construction";
670
671 elseif ( ($cleverfox_themes->name) == "Medazin" || ($cleverfox_themes->name) == "DoctorHub" || ($cleverfox_themes->name) == "CardioPress" || ($cleverfox_themes->name) == "Medisafe" ):
672 $cleverfox_theme_category ="Medical";
673
674 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" ):
675 $cleverfox_theme_category ="News-Blog";
676
677 else :
678 $cleverfox_theme_category ="Business";
679 endif;
680 ?>
681 <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); ?>">
682 <div class="clever-fox-items-inner">
683 <div class="specia-demo-screenshot">
684 <div class="specia-demo-image" style="background-image: url(<?php echo esc_url($cleverfox_themes->screenshot_url); ?>);"></div>
685 <div class="specia-demo-actions">
686 <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>
687 <?php
688 if($get_theme_staus !== 'installed-and-active' && $get_theme_staus !== 'installed-but-inactive'):
689 $get_theme_staus= 'not-installed';
690 $specia_btn_value= 'Install & Activate Now';
691 endif;
692 $cleverfox_theme_status = 'clever-fox-theme-' . $get_theme_staus;
693 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) ) );
694 //switch_theme( $cleverfox_themes->name );
695 ?>
696 </div>
697 </div>
698 <div class="sp-demo-meta sp-demo-meta--with-preview">
699 <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>
700 <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>
701 </div>
702 <?php //echo $get_theme_staus; ?>
703 </div>
704 </div>
705 <?php } ?>
706 </div>
707 </div>
708
709 <?php
710 }
711
712 }
713 }// End if().
714
715 /**
716 * Kicking this off by calling 'get_instance()' method
717 */
718 CleverFox_Setup::get_instance();
719
720
721 /**
722 * The code during plugin activation.
723 */
724 function cleverfox__activate() {
725 require_once plugin_dir_path( __FILE__ ) . 'inc/cleverfox-activator.php';
726 Cleverfox_Activator::activate();
727 }
728 register_activation_hook( __FILE__, 'cleverfox__activate' );