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

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