Clever Fox - Version 2.8

Version Description

  • Avail Theme Functionality Added
  • Tags Updated
Download this release

Release Info

Developer nayrathemes
Plugin Icon 128x128 Clever Fox
Version 2.8
Comparing to
See all releases

Code changes from version 2.7 to 2.8

clever-fox.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Clever Fox
4
  Plugin URI:
5
  Description: The Clever Fox plugin adds sections functionality to the Startkit theme and Others Nayra's Themes. This plugin for only startkit themes. Clever Fox is a plugin build to enhance the functionality of WordPress Theme made by Nayra Themes.
6
- Version: 2.7
7
  Author: nayrathemes
8
  Author URI: https://nayrathemes.com
9
  Text Domain: clever-fox
3
  Plugin Name: Clever Fox
4
  Plugin URI:
5
  Description: The Clever Fox plugin adds sections functionality to the Startkit theme and Others Nayra's Themes. This plugin for only startkit themes. Clever Fox is a plugin build to enhance the functionality of WordPress Theme made by Nayra Themes.
6
+ Version: 2.8
7
  Author: nayrathemes
8
  Author URI: https://nayrathemes.com
9
  Text Domain: clever-fox
inc/assets/js/owl.carousel.min.js CHANGED
@@ -39,7 +39,7 @@ jQuery(function($) {
39
  loop: true,
40
  dots: false,
41
  navText: ['<i class="fa fa-arrow-left"></i>', '<i class="fa fa-arrow-right"></i>'],
42
- autoHeight: $("body").hasClass("aera-theme") ? true : false,
43
  autoplay: true,
44
  autoplayTimeout: 9000,
45
  animateIn: $("body").hasClass("aera-theme") ? false : 'pulse',
39
  loop: true,
40
  dots: false,
41
  navText: ['<i class="fa fa-arrow-left"></i>', '<i class="fa fa-arrow-right"></i>'],
42
+ autoHeight: $("body").hasClass("aera-theme") || $("body").hasClass("avail-theme") ? true : false,
43
  autoplay: true,
44
  autoplayTimeout: 9000,
45
  animateIn: $("body").hasClass("aera-theme") ? false : 'pulse',
inc/avail/avail.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * @package Avril
4
  */
5
 
6
  require CLEVERFOX_PLUGIN_DIR . 'inc/avril/extras.php';
1
  <?php
2
  /**
3
+ * @package Avail
4
  */
5
 
6
  require CLEVERFOX_PLUGIN_DIR . 'inc/avril/extras.php';
inc/avail/default-pages/home-page.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ //post status and options
3
+ $post = array(
4
+ 'comment_status' => 'closed',
5
+ 'ping_status' => 'closed' ,
6
+ 'post_author' => 1,
7
+ 'post_date' => date('Y-m-d H:i:s'),
8
+ 'post_name' => 'Home',
9
+ 'post_status' => 'publish' ,
10
+ 'post_title' => 'Home',
11
+ 'post_type' => 'page',
12
+ );
13
+ //insert page and save the id
14
+ $newvalue = wp_insert_post( $post, false );
15
+ if ( $newvalue && ! is_wp_error( $newvalue ) ){
16
+ update_post_meta( $newvalue, '_wp_page_template', 'templates/template-homepage.php' );
17
+
18
+ // Use a static front page
19
+ $page = get_page_by_title('Home');
20
+ update_option( 'show_on_front', 'page' );
21
+ update_option( 'page_on_front', $page->ID );
22
+
23
+ }
24
+ ?>
inc/avail/default-pages/upload-media.php ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $file = CLEVERFOX_PLUGIN_URL .'inc/avail/images/logo.png';
3
+ $ImagePath = CLEVERFOX_PLUGIN_URL .'inc/avail/images';
4
+
5
+ $images = array(
6
+ $ImagePath. '/logo.png',
7
+ );
8
+ $parent_post_id = null;
9
+ foreach($images as $name) {
10
+ $filename = basename($name);
11
+ $upload_file = wp_upload_bits($filename, null, file_get_contents($name));
12
+ if (!$upload_file['error']) {
13
+ $wp_filetype = wp_check_filetype($filename, null );
14
+ $attachment = array(
15
+ 'post_mime_type' => $wp_filetype['type'],
16
+ 'post_parent' => $parent_post_id,
17
+ 'post_title' => preg_replace('/\.[^.]+$/', '', $filename),
18
+ 'post_excerpt' => 'avril caption',
19
+ 'post_status' => 'inherit'
20
+ );
21
+ $ImageId[] = $attachment_id = wp_insert_attachment( $attachment, $upload_file['file'], $parent_post_id );
22
+
23
+ if (!is_wp_error($attachment_id)) {
24
+ require_once(ABSPATH . "wp-admin" . '/includes/image.php');
25
+ $attachment_data = wp_generate_attachment_metadata( $attachment_id, $upload_file['file'] );
26
+ wp_update_attachment_metadata( $attachment_id, $attachment_data );
27
+ }
28
+ }
29
+
30
+ }
31
+
32
+ update_option( 'avril_media_id', $ImageId );
inc/avail/default-widgets/default-widget.php ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $activate = array(
3
+ 'avril-sidebar-primary' => array(
4
+ 'search-1',
5
+ 'recent-posts-1',
6
+ 'archives-1',
7
+ ),
8
+ 'avril-footer-widget-area' => array(
9
+ 'text-1',
10
+ 'categories-1',
11
+ 'archives-1',
12
+ 'search-1',
13
+ )
14
+ );
15
+ /* the default titles will appear */
16
+ update_option('widget_text', array(
17
+ 1 => array('title' => '',
18
+ 'text'=>'<div class="footer-logo"><img src="'.CLEVERFOX_PLUGIN_URL.'inc/avail/images/logo.png" alt=""></div>
19
+ <p>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.</p>
20
+ '),
21
+ 2 => array('title' => 'Recent Posts'),
22
+ 3 => array('title' => 'Categories'),
23
+ ));
24
+ update_option('widget_categories', array(
25
+ 1 => array('title' => 'Categories'),
26
+ 2 => array('title' => 'Categories')));
27
+
28
+ update_option('widget_archives', array(
29
+ 1 => array('title' => 'Archives'),
30
+ 2 => array('title' => 'Archives')));
31
+
32
+ update_option('widget_search', array(
33
+ 1 => array('title' => 'Search'),
34
+ 2 => array('title' => 'Search')));
35
+
36
+ update_option('sidebars_widgets', $activate);
37
+ $MediaId = get_option('avril_media_id');
38
+ set_theme_mod( 'custom_logo', $MediaId[0] );
inc/avail/images/cta-image.png CHANGED
Binary file
inc/avail/images/logo.png ADDED
Binary file
inc/avail/sections/section-slider.php CHANGED
@@ -5,11 +5,6 @@ if ( ! function_exists( 'avril_lite_slider' ) ) :
5
  function avril_lite_slider() {
6
  $slider = get_theme_mod('slider',avril_get_slider_default());
7
  ?>
8
- <style type="text/css">
9
- .theme-slider:after {
10
- background: #d61523;
11
- }
12
- </style>
13
  <section id="slider-section" class="slider-wrapper">
14
  <div class="main-slider owl-carousel owl-theme">
15
  <?php
5
  function avril_lite_slider() {
6
  $slider = get_theme_mod('slider',avril_get_slider_default());
7
  ?>
 
 
 
 
 
8
  <section id="slider-section" class="slider-wrapper">
9
  <div class="main-slider owl-carousel owl-theme">
10
  <?php
inc/cleverfox-activator.php CHANGED
@@ -75,6 +75,12 @@ class Cleverfox_Activator {
75
  require CLEVERFOX_PLUGIN_DIR . 'inc/aera/default-widgets/default-widget.php';
76
  }
77
 
 
 
 
 
 
 
78
  update_option( 'item_details_page', 'Done' );
79
  }
80
  }
75
  require CLEVERFOX_PLUGIN_DIR . 'inc/aera/default-widgets/default-widget.php';
76
  }
77
 
78
+ if ( 'Avail' == $theme->name){
79
+ require CLEVERFOX_PLUGIN_DIR . 'inc/avail/default-pages/upload-media.php';
80
+ require CLEVERFOX_PLUGIN_DIR . 'inc/avail/default-pages/home-page.php';
81
+ require CLEVERFOX_PLUGIN_DIR . 'inc/avail/default-widgets/default-widget.php';
82
+ }
83
+
84
  update_option( 'item_details_page', 'Done' );
85
  }
86
  }
readme.txt CHANGED
@@ -1,6 +1,6 @@
1
  === Clever Fox ===
2
  Contributors: nayrathemes
3
- Tags: startkit, startbiz, arowana, envira, hantus, conceptly
4
  Requires at least: 4.0
5
  Tested up to: 5.6
6
  License: GPLv3 or later
@@ -34,6 +34,7 @@ Clever Fox is a plugin build to enhance the functionality of WordPress Theme mad
34
  - [Ameya](https://wordpress.org/themes/ameya/)
35
  - [Azwa](https://wordpress.org/themes/azwa/)
36
  - [Avril](https://wordpress.org/themes/avril/)
 
37
 
38
  == License ==
39
 
@@ -43,6 +44,10 @@ Clever Fox WordPress plugin is licensed under the GPL3 (https://www.gnu.org/lice
43
 
44
  == Changelog ==
45
 
 
 
 
 
46
  = 2.7 =
47
  * Heading Control Added
48
  * Removed Tabs & Select Control
1
  === Clever Fox ===
2
  Contributors: nayrathemes
3
+ Tags: demo, sections, customizer, widget, settings
4
  Requires at least: 4.0
5
  Tested up to: 5.6
6
  License: GPLv3 or later
34
  - [Ameya](https://wordpress.org/themes/ameya/)
35
  - [Azwa](https://wordpress.org/themes/azwa/)
36
  - [Avril](https://wordpress.org/themes/avril/)
37
+ - [Aera](https://wordpress.org/themes/aera/)
38
 
39
  == License ==
40
 
44
 
45
  == Changelog ==
46
 
47
+ = 2.8 =
48
+ * Avail Theme Functionality Added
49
+ * Tags Updated
50
+
51
  = 2.7 =
52
  * Heading Control Added
53
  * Removed Tabs & Select Control