Clever Fox - Version 1.1.14

Version Description

Download this release

Release Info

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

Code changes from version 1.1.12 to 1.1.14

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: 1.1.12
7
  Author: nayrathemes
8
  Author URI: https://nayrathemes.com
9
  Text Domain: clever-fox
@@ -38,6 +38,21 @@ function cleverfox_activate() {
38
  require_once('inc/startkit/typography_style.php');
39
  require_once('inc/startkit/features/section-typography.php');
40
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
  if( 'Hantus' == $theme->name){
42
  require_once('inc/hantus/features/navigation.php');
43
  require_once('inc/hantus/features/section-slider.php');
@@ -71,6 +86,21 @@ if ( 'StartKit' == $theme->name){
71
  }
72
  }
73
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
74
  //Hantus
75
  if ( 'Hantus' == $theme->name){
76
  register_activation_hook( __FILE__, 'cleverfox_install_function');
@@ -90,8 +120,15 @@ if ( 'Hantus' == $theme->name){
90
  function cleverfox_startkit_home_page_sanitize_text( $input ) {
91
  return wp_kses_post( force_balance_tags( $input ) );
92
  }
 
 
 
 
 
 
93
  //Hantus Sainitize text
94
  function cleverfox_hantus_home_page_sanitize_text( $input ) {
95
  return wp_kses_post( force_balance_tags( $input ) );
96
  }
 
97
  ?>
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: 1.1.13
7
  Author: nayrathemes
8
  Author URI: https://nayrathemes.com
9
  Text Domain: clever-fox
38
  require_once('inc/startkit/typography_style.php');
39
  require_once('inc/startkit/features/section-typography.php');
40
  }
41
+
42
+ if ( 'StartBiz' == $theme->name){
43
+ require_once('inc/startkit/features/section-slider.php');
44
+ require_once('inc/startkit/features/section-info.php');
45
+ require_once('inc/startkit/features/section-service.php');
46
+ require_once('inc/startkit/features/section-testimonial.php');
47
+ require_once('inc/startkit/features/navigation.php');
48
+ require_once('inc/startbiz/sections/section-slider.php');
49
+ require_once('inc/startkit/sections/section-flash.php');
50
+ require_once('inc/startkit/sections/section-service.php');
51
+ require_once('inc/startkit/sections/section-testimonial.php');
52
+ require_once('inc/startkit/typography_style.php');
53
+ require_once('inc/startkit/features/section-typography.php');
54
+ }
55
+
56
  if( 'Hantus' == $theme->name){
57
  require_once('inc/hantus/features/navigation.php');
58
  require_once('inc/hantus/features/section-slider.php');
86
  }
87
  }
88
 
89
+ //StartBiz
90
+ if ( 'StartBiz' == $theme->name){
91
+ register_activation_hook( __FILE__, 'cleverfox_install_function');
92
+ function cleverfox_install_function()
93
+ {
94
+ $item_details_page = get_option('item_details_page');
95
+ if(!$item_details_page){
96
+ require_once('inc/startbiz/default-pages/upload-media.php');
97
+ require_once('inc/startkit/default-pages/home-page.php');
98
+ require_once('inc/startbiz/default-widgets/default-widget.php');
99
+ update_option( 'item_details_page', 'Done' );
100
+ }
101
+ }
102
+ }
103
+
104
  //Hantus
105
  if ( 'Hantus' == $theme->name){
106
  register_activation_hook( __FILE__, 'cleverfox_install_function');
120
  function cleverfox_startkit_home_page_sanitize_text( $input ) {
121
  return wp_kses_post( force_balance_tags( $input ) );
122
  }
123
+
124
+ //StartBiz Sainitize text
125
+ function cleverfox_startbiz_home_page_sanitize_text( $input ) {
126
+ return wp_kses_post( force_balance_tags( $input ) );
127
+ }
128
+
129
  //Hantus Sainitize text
130
  function cleverfox_hantus_home_page_sanitize_text( $input ) {
131
  return wp_kses_post( force_balance_tags( $input ) );
132
  }
133
+
134
  ?>
inc/startbiz/default-pages/upload-media.php ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $file = CLEVERFOX_PLUGIN_URL .'inc/startbiz/images/logo.png';
3
+ $ImagePath = CLEVERFOX_PLUGIN_URL .'inc/startbiz/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' => 'startkit 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( 'startkit_media_id', $ImageId );
33
+
34
+ ?>
inc/startbiz/default-widgets/default-widget.php ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $activate = array(
3
+ // 'sidebar-primary' => array(
4
+ // 'search-1',
5
+ // 'recent-posts-1',
6
+ // 'archives-1',
7
+ // ),
8
+ 'footer-widget-area' => array(
9
+ 'footer-widget-area',
10
+ 'recent-posts-1',
11
+ 'archives-1',
12
+ ),
13
+ 'footer-widget-area' => array(
14
+ 'text-1',
15
+ ),
16
+ );
17
+ /* the default titles will appear */
18
+ update_option('widget_text', array(
19
+ 1 => array('title' => '',
20
+ 'text'=>'<div class="footer-logo"><img class="img-responsive" src="'.CLEVERFOX_PLUGIN_URL.'inc/startbiz/images/footerlogo.png" alt="Logo" /><div>
21
+ <p class="widget-text">Gonsectetur adipi sicing elit, sed do eiusmod tempor incididunt labore et.dolore magna aliquauis a irure dolor eiusmod.</p><a href="#">Go for details <i class="fa fa-long-arrow-right"></i></a>
22
+ '),
23
+ 2 => array('title' => 'Recent Posts'),
24
+ 3 => array('title' => 'Categories'),
25
+ ));
26
+
27
+ update_option('sidebars_widgets', $activate);
28
+ $MediaId = get_option('startkit_media_id');
29
+ set_theme_mod( 'custom_logo', $MediaId[0] );
30
+ ?>
inc/startbiz/images/footerlogo.png ADDED
Binary file
inc/startbiz/images/logo.png ADDED
Binary file
inc/startbiz/sections/section-slider.php ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Slider section for the homepage.
4
+ */
5
+ if ( ! function_exists( 'start_startkit_slider' ) ) :
6
+
7
+ function start_startkit_slider() {
8
+
9
+ function startkit_get_slider_default() {
10
+ return apply_filters(
11
+ 'startkit_get_slider_default', json_encode(
12
+ array(
13
+ array(
14
+ "image_url" => CLEVERFOX_PLUGIN_URL .'inc/startkit/images/slider/slider01.jpg' ,
15
+ "link" => "#", "title" => "Strengths of Successful Businesses",
16
+ "text" => "Randomised words which don't look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anembarrassing hidden in the middle of text.",
17
+ "text2" => "Explore More",
18
+ "id" => "customizer_repeater_00070" ),
19
+
20
+ array("image_url" => CLEVERFOX_PLUGIN_URL .'inc/startkit/images/slider/slider02.jpg',
21
+ "link" => "#", "title" => "Strengths of Successful Businesses",
22
+ "text" => "Randomised words which don't look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anembarrassing hidden in the middle of text.",
23
+ "text2" => "Explore More",
24
+ "id" => "customizer_repeater_00071" ),
25
+
26
+ array(
27
+ "image_url" => CLEVERFOX_PLUGIN_URL .'inc/startkit/images/slider/slider03.jpg',
28
+ "link" => "#",
29
+ "title" => "Strengths of Successful Businesses",
30
+ "text" => "Randomised words which don't look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anembarrassing hidden in the middle of text.",
31
+ "text2" => "Explore More",
32
+ "id" => "customizer_repeater_00072" ),
33
+ )
34
+ )
35
+ );
36
+ }
37
+ $default_content = null;
38
+ if ( current_user_can( 'edit_theme_options' ) ) {
39
+ $default_content = startkit_get_slider_default();
40
+ }
41
+ $slider = get_theme_mod('slider',$default_content);
42
+ $slider_opacity = get_theme_mod('slider_opacity','0.3');
43
+ $hide_show_slider = get_theme_mod('hide_show_slider','1');
44
+
45
+ if($hide_show_slider == '1') {
46
+ ?>
47
+ <div class="row" id="lite-slite">
48
+ <div class="col-md-12">
49
+ <div class="header-slider">
50
+ <?php
51
+ if ( ! empty( $slider ) ) {
52
+ $allowed_html = array(
53
+ 'br' => array(),
54
+ 'em' => array(),
55
+ 'strong' => array(),
56
+ 'b' => array(),
57
+ 'i' => array(),
58
+ );
59
+ $slider = json_decode( $slider );
60
+ foreach ( $slider as $slide_item ) {
61
+ $title = ! empty( $slide_item->title ) ? apply_filters( 'startkit_translate_single_string', $slide_item->title, 'slider section' ) : '';
62
+ $text = ! empty( $slide_item->text ) ? apply_filters( 'startkit_translate_single_string', $slide_item->text, 'slider section' ) : '';
63
+ $button = ! empty( $slide_item->text2) ? apply_filters( 'startkit_translate_single_string', $slide_item->text2,'Learn More' ) : 'Read More';
64
+ $link = ! empty( $slide_item->link ) ? apply_filters( 'startkit_translate_single_string', $slide_item->link, 'slider section' ) : '';
65
+ $image = ! empty( $slide_item->image_url ) ? apply_filters( 'startkit_translate_single_string', $slide_item->image_url, 'slider section' ) : '';
66
+ ?>
67
+ <div class="header-single-slider">
68
+ <figure>
69
+ <?php if ( ! empty( $image ) ) : ?>
70
+ <img src="<?php echo esc_url( $image ); ?>" <?php if ( ! empty( $title ) ) : ?> alt="<?php echo esc_attr( $title ); ?>" title="<?php echo esc_attr( $title ); ?>" <?php endif; ?> />
71
+ <?php endif; ?>
72
+ <figcaption>
73
+ <div class="content" style="background: rgba(35, 48, 73,<?php echo $slider_opacity; ?>);">
74
+ <div class="container inner-content text-center" >
75
+ <?php if ( ! empty( $title ) ) : ?>
76
+ <h1><?php echo esc_html( $title ); ?></h1>
77
+ <?php endif; ?>
78
+ <?php if ( ! empty( $text ) ) : ?>
79
+ <p><?php echo esc_html( $text ); ?></p>
80
+ <?php endif; ?>
81
+ <a href="<?php echo esc_url( $link ); ?>" class="boxed-btn"><?php echo esc_html( $button ); ?><i class="icofont icofont-long-arrow-right"></i></a>
82
+ </div>
83
+ </div>
84
+ </figcaption>
85
+ </figure>
86
+ </div>
87
+ <?php }} ?>
88
+ </div>
89
+ </div>
90
+ </div>
91
+ <?php } ?>
92
+ </header>
93
+ <?php
94
+ }
95
+ endif;
96
+ if ( function_exists( 'start_startkit_slider' ) ) {
97
+ $section_priority = apply_filters( 'startkit_section_priority', 11, 'start_startkit_slider' );
98
+ add_action( 'startkit_sections', 'start_startkit_slider', absint( $section_priority ) );
99
+
100
+ }
inc/startkit/sections/section-slider.php CHANGED
@@ -88,12 +88,11 @@ if ( ! function_exists( 'start_startkit_slider' ) ) :
88
  </div>
89
  </div>
90
  </div>
91
- <?php
 
 
92
  }
93
- }
94
-
95
- endif;
96
-
97
  if ( function_exists( 'start_startkit_slider' ) ) {
98
  $section_priority = apply_filters( 'startkit_section_priority', 11, 'start_startkit_slider' );
99
  add_action( 'startkit_sections', 'start_startkit_slider', absint( $section_priority ) );
88
  </div>
89
  </div>
90
  </div>
91
+ <?php } ?>
92
+ </header>
93
+ <?php
94
  }
95
+ endif;
 
 
 
96
  if ( function_exists( 'start_startkit_slider' ) ) {
97
  $section_priority = apply_filters( 'startkit_section_priority', 11, 'start_startkit_slider' );
98
  add_action( 'startkit_sections', 'start_startkit_slider', absint( $section_priority ) );
readme.txt CHANGED
@@ -31,6 +31,9 @@ Clever Fox WordPress plugin is licensed under the GPL3 (https://www.gnu.org/lice
31
 
32
 
33
  == Changelog ==
 
 
 
34
  = 1.1.12 =
35
  * Slider Images Changed Of Startkit
36
 
31
 
32
 
33
  == Changelog ==
34
+ = 1.1.13 =
35
+ * Startbiz Theme Functionality Added
36
+
37
  = 1.1.12 =
38
  * Slider Images Changed Of Startkit
39