├── inc
├── demo-data
│ ├── screen-image.jpg
│ ├── css
│ │ └── demo-import.css
│ ├── fitfloss-widgets-demo.wie
│ ├── fitfloss-customizer.dat
│ └── demo-import.php
├── elementor-widgets
│ ├── assets
│ │ ├── css
│ │ │ ├── elementor-edit.css
│ │ │ ├── utility.css
│ │ │ ├── owl.carousel.min.css
│ │ │ └── magnific-popup.css
│ │ ├── fonts
│ │ │ └── themify-icon
│ │ │ │ └── fonts
│ │ │ │ ├── themify.eot
│ │ │ │ ├── themify.ttf
│ │ │ │ └── themify.woff
│ │ └── js
│ │ │ ├── map-active.js
│ │ │ ├── progress-loader-canvas.js
│ │ │ ├── jquery.counterup.js
│ │ │ ├── imagesLoaded.js
│ │ │ ├── fitfloss-companion-main.js
│ │ │ ├── barfiller.js
│ │ │ ├── waypoints.js
│ │ │ └── jquery.youtubebackground.js
│ └── widgets
│ │ ├── hero-section.php
│ │ ├── become-member.php
│ │ ├── popular-courses.php
│ │ ├── gallery-section.php
│ │ ├── contact.php
│ │ ├── about-us.php
│ │ ├── feature-section.php
│ │ ├── services.php
│ │ └── review-section.php
├── fitfloss-metabox.php
├── sidebar-widgets
│ ├── instagram.php
│ ├── blog-widget.php
│ ├── newsletter-widget.php
│ ├── social-links.php
│ ├── about-widget.php
│ └── contact-info.php
├── instagram-api.php
└── functions.php
├── js
├── common.js
└── loadmore-ajax.js
├── fitfloss-init.php
├── fitfloss-companion.php
└── readme.txt
/inc/demo-data/screen-image.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ColorlibHQ/fitfloss-companion/master/inc/demo-data/screen-image.jpg
--------------------------------------------------------------------------------
/inc/elementor-widgets/assets/css/elementor-edit.css:
--------------------------------------------------------------------------------
1 | .elementor-choices-label i {
2 | font-size: 18px !important;
3 | padding: 5px 0;
4 | }
--------------------------------------------------------------------------------
/inc/elementor-widgets/assets/fonts/themify-icon/fonts/themify.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ColorlibHQ/fitfloss-companion/master/inc/elementor-widgets/assets/fonts/themify-icon/fonts/themify.eot
--------------------------------------------------------------------------------
/inc/elementor-widgets/assets/fonts/themify-icon/fonts/themify.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ColorlibHQ/fitfloss-companion/master/inc/elementor-widgets/assets/fonts/themify-icon/fonts/themify.ttf
--------------------------------------------------------------------------------
/inc/elementor-widgets/assets/fonts/themify-icon/fonts/themify.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ColorlibHQ/fitfloss-companion/master/inc/elementor-widgets/assets/fonts/themify-icon/fonts/themify.woff
--------------------------------------------------------------------------------
/inc/demo-data/css/demo-import.css:
--------------------------------------------------------------------------------
1 | .ocdi__demo-import-notice:not(:empty) {
2 | background-color: transparent !important;
3 | border-left: 0px !important;
4 | box-shadow: none !important;
5 | padding: 0px !important;
6 | }
7 | .ocdi__demo-import-notice img {
8 | border: 4px solid #dbe3ea;
9 | width: auto;
10 | }
11 | .about-wrap .ocdi__demo-import-notice img {
12 | width: auto;
13 | }
14 | .about-wrap img {
15 | width: auto;
16 | }
--------------------------------------------------------------------------------
/js/common.js:
--------------------------------------------------------------------------------
1 | (function ($) {
2 | "use strict";
3 | /*-------------------------------------
4 | Instagram Photos
5 | -------------------------------------*/
6 | function cp_instagram_photos() {
7 | $('.cp-instagram-photos').each(function(){
8 | $.instagramFeed({
9 | 'username': $(this).data('username'),
10 | 'container': $(this),
11 | 'display_profile': false,
12 | 'display_biography': false,
13 | 'items': $(this).data('items'),
14 | 'margin': 0
15 | });
16 | console.log( $(this) );
17 | });
18 |
19 | }
20 | cp_instagram_photos();
21 | })(jQuery);
--------------------------------------------------------------------------------
/inc/elementor-widgets/assets/css/utility.css:
--------------------------------------------------------------------------------
1 | /* -------------------------
2 | :: utility Class
3 | ---------------------------- */
4 | .fitfloss-pt-100 {
5 | padding-top: 100px;
6 | }
7 | .fitfloss-pt-80 {
8 | padding-top: 80px;
9 | }
10 | .fitfloss-pt-70 {
11 | padding-top: 70px;
12 | }
13 | .fitfloss-pt-60 {
14 | padding-top: 60px;
15 | }
16 | .fitfloss-pt-50 {
17 | padding-top: 50px;
18 | }
19 | .fitfloss-pt-30 {
20 | padding-top: 30px;
21 | }
22 | .fitfloss-pb-100 {
23 | padding-bottom: 100px;
24 | }
25 | .fitfloss-pb-80 {
26 | padding-bottom: 80px;
27 | }
28 | .fitfloss-pb-70 {
29 | padding-bottom: 70px;
30 | }
31 | .fitfloss-pb-60 {
32 | padding-bottom: 60px;
33 | }
34 | .fitfloss-pb-50 {
35 | padding-bottom: 50px;
36 | }
37 | .fitfloss-pb-30 {
38 | padding-bottom: 30px;
39 | }
40 |
--------------------------------------------------------------------------------
/fitfloss-init.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/inc/demo-data/fitfloss-widgets-demo.wie:
--------------------------------------------------------------------------------
1 | {"fitfloss-post-sidebar":{"search-2":{"title":""},"categories-3":{"title":"Category","count":1,"hierarchical":0,"dropdown":0},"fitfloss_blog_widget-1":{"sectiontitle":"Recent Post","postnumber":"4","style":"1"},"tag_cloud-1":{"title":"Tag Clouds","count":0,"taxonomy":"post_tag"},"fitfloss_instagram_photo-1":{"title":"Instagram Feeds","insta_user":"hasanfardousrubel","insta_items":"6"},"fitfloss_newsletter-1":{"title":"Newsletter","actionurl":"https:\/\/spondonit.us12.list-manage.com\/subscribe\/post?u=1462626880ade1ac87bd9c93a&id=92a4423d01","desc":""}},"footer-1":{"text-1":{"title":"About Us","text":"The\u00a0state\u00a0of\u00a0Utah\u00a0in\u00a0the\u00a0United\u00a0States\u00a0is\u00a0home\u00a0to\u00a0lots\u00a0of\u00a0beautiful\u00a0National\u00a0Parks,\u00a0&\u00a0Bryce\u00a0Canyon\u00a0National\u00a0Park\u00a0ranks\u00a0as\u00a0three\u00a0of\u00a0the\u00a0most\u00a0magnificent\u00a0&\u00a0awe\u00a0inspiring.","filter":true,"visual":true}},"footer-2":{"fitfloss_contactinfo_widget-1":{"title":"Contact Us","addressicon":"","address":"56\/8, rockybeach road, santa monica, Los angeles, California - 59620","pnumbericon":"","pnumber":"012-6532-568-9746","emailicon":"","email":"012-6532-569-9748"}},"footer-3":{"fitfloss_newsletter-2":{"title":"Newsletter","actionurl":"https:\/\/spondonit.us12.list-manage.com\/subscribe\/post?u=1462626880ade1ac87bd9c93a&id=92a4423d01","desc":"Stay updated with our latest trends Seed heaven so said place winged over given forth fruit."}}}
--------------------------------------------------------------------------------
/inc/elementor-widgets/assets/js/map-active.js:
--------------------------------------------------------------------------------
1 | (function ($) {
2 | 'use strict';
3 |
4 | var map,
5 | $lat = $('[data-lat]').data('lat'),
6 | $lng = $('[data-lng]').data('lng'),
7 | $address = $('[data-address]').data('address');
8 |
9 | var latlng = new google.maps.LatLng( parseFloat($lat), parseFloat($lng));
10 | var stylez = [{
11 | featureType: "all",
12 | elementType: "all",
13 | stylers: [{
14 | saturation: -10
15 | }]
16 | }];
17 | var mapOptions = {
18 | zoom: 15,
19 | center: latlng,
20 | scrollwheel: false,
21 | scaleControl: false,
22 | disableDefaultUI: true,
23 | mapTypeControlOptions: {
24 | mapTypeIds: [google.maps.MapTypeId.ROADMAP, 'gMap']
25 | }
26 | };
27 | map = new google.maps.Map(document.getElementById("googleMap"), mapOptions);
28 | var geocoder_map = new google.maps.Geocoder();
29 | geocoder_map.geocode({
30 | 'address': $address
31 | }, function (results, status) {
32 | if (status == google.maps.GeocoderStatus.OK) {
33 | map.setCenter(results[0].geometry.location);
34 | var marker = new google.maps.Marker({
35 | map: map,
36 | position: map.getCenter()
37 | });
38 | } else {
39 | alert("Geocode was not successful for the following reason: " + status);
40 | }
41 | });
42 | var mapType = new google.maps.StyledMapType(stylez, {
43 | name: "Grayscale"
44 | });
45 | map.mapTypes.set('gMap', mapType);
46 | map.setMapTypeId('gMap');
47 |
48 | })(jQuery);
--------------------------------------------------------------------------------
/js/loadmore-ajax.js:
--------------------------------------------------------------------------------
1 | (function ($) {
2 | 'use strict';
3 |
4 | // Portfolio load more button Ajax
5 |
6 | var $loadbutton = $( '.loadAjax' );
7 |
8 | if( $loadbutton.length ){
9 |
10 | var postNumber = portfolioloadajax.postNumber,
11 | Incr = 0;
12 | //
13 | $loadbutton.on( 'click', function(){
14 |
15 |
16 | Incr = Incr + parseInt( postNumber) ;
17 |
18 | var $button = $( this ),
19 | $data;
20 |
21 | $data = {
22 | 'action' : 'fitfloss_portfolio_ajax',
23 | 'postNumber' : postNumber,
24 | 'postIncrNumber' : Incr,
25 | 'elsettings' : portfolioloadajax.elsettings
26 | };
27 |
28 | $.ajax({
29 |
30 | url : portfolioloadajax.action_url,
31 | data : $data,
32 | type : 'POST',
33 |
34 |
35 | success: function( data ){
36 |
37 | $( '.fitfloss-portfolio-load' ).html(data);
38 |
39 | var $container = $('.fitfloss-portfolio');
40 |
41 | $container.isotope('reloadItems').isotope({
42 | itemSelector: '.single_gallery_item',
43 | percentPosition: true,
44 | masonry: {
45 | columnWidth: '.single_gallery_item'
46 | }
47 | });
48 |
49 | var loaditems = parseInt( Incr ) + parseInt( postNumber );
50 |
51 | if( portfolioloadajax.totalitems == loaditems ){
52 | $button.hide();
53 | }
54 |
55 | }
56 |
57 | });
58 |
59 | return false;
60 |
61 | } );
62 |
63 |
64 | }
65 |
66 |
67 | })(jQuery);
--------------------------------------------------------------------------------
/inc/fitfloss-metabox.php:
--------------------------------------------------------------------------------
1 | 'event_single_metaboxs',
7 | 'title' => esc_html__( 'Page Additional Options', 'fitfloss-companion' ),
8 | 'post_types'=> array( 'course' ),
9 | 'priority' => 'high',
10 | 'autosave' => 'false',
11 | 'fields' => array(
12 | array(
13 | 'id' => $fitfloss_prefix . 'benifits',
14 | 'type' => 'textarea',
15 | 'name' => esc_html__( 'Course Benifits', 'fitfloss-companion' ),
16 | 'placeholder' => esc_html__( 'Describe The Course Benifits..', 'fitfloss-companion' ),
17 | ),
18 | array(
19 | 'id' => $fitfloss_prefix . 'trainer_name',
20 | 'type' => 'text',
21 | 'name' => esc_html__( 'Trainer Name', 'fitfloss-companion' ),
22 | 'placeholder' => esc_html__( 'Ex: George Mathews', 'fitfloss-companion' ),
23 | ),
24 | array(
25 | 'id' => $fitfloss_prefix . 'course_fee',
26 | 'type' => 'text',
27 | 'name' => esc_html__( 'Course Fee', 'fitfloss-companion' ),
28 | 'placeholder' => esc_html__( 'Ex: $230', 'fitfloss-companion' ),
29 | ),
30 | array(
31 | 'id' => $fitfloss_prefix . 'available_seats',
32 | 'type' => 'text',
33 | 'name' => esc_html__( 'Available Seats', 'fitfloss-companion' ),
34 | 'placeholder' => esc_html__( 'Ex: 15', 'fitfloss-companion' ),
35 | ),
36 | array(
37 | 'id' => $fitfloss_prefix . 'schedule_time',
38 | 'name' => esc_html__( 'Schedule Time', 'fitfloss-companion' ),
39 | 'type' => 'time',
40 | 'placeholder' => esc_html__( 'Ex: 02:30', 'fitfloss-companion' ),
41 | 'js_options' => array(
42 | 'stepMinute' => 10,
43 | 'controlType' => 'select'
44 | ),
45 | ),
46 | array(
47 | 'id' => $fitfloss_prefix . 'enroll_url',
48 | 'type' => 'text',
49 | 'name' => esc_html__( 'Course Enroll URL', 'fitfloss-companion' ),
50 | 'placeholder' => esc_html__( 'Ex: www.colorlib.com', 'fitfloss-companion' ),
51 | ),
52 | ),
53 | );
54 |
55 |
56 | return $meta_boxes;
57 | }
58 | add_filter( 'rwmb_meta_boxes', 'fitfloss_event_metabox' );
--------------------------------------------------------------------------------
/fitfloss-companion.php:
--------------------------------------------------------------------------------
1 | parent();
58 |
59 |
60 |
61 | if( ( 'Fitfloss' == $current_theme->get( 'Name' ) ) || ( $is_parent && 'Fitfloss' == $is_parent->get( 'Name' ) ) ){
62 | require_once FITFLOSS_COMPANION_DIR_PATH . 'fitfloss-init.php';
63 | }else{
64 |
65 | add_action( 'admin_notices', 'fitfloss_companion_admin_notice', 99 );
66 | function fitfloss_companion_admin_notice() {
67 | $url = 'https://demo.colorlib.com/fitfloss/';
68 | ?>
69 |
70 |
Fitfloss Companion plugin you have to also install the %1$sFitfloss Theme%2$s', 'fitfloss-companion' ), '', ' ' ); ?>
71 |
72 |
--------------------------------------------------------------------------------
/inc/elementor-widgets/assets/css/owl.carousel.min.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Owl Carousel v2.2.1
3 | * Copyright 2013-2017 David Deutsch
4 | * Licensed under ()
5 | */
6 | .owl-carousel,.owl-carousel .owl-item{-webkit-tap-highlight-color:transparent;position:relative}.owl-carousel{display:none;width:100%;z-index:1}.owl-carousel .owl-stage{position:relative;-ms-touch-action:pan-Y;-moz-backface-visibility:hidden}.owl-carousel .owl-stage:after{content:".";display:block;clear:both;visibility:hidden;line-height:0;height:0}.owl-carousel .owl-stage-outer{position:relative;overflow:hidden;-webkit-transform:translate3d(0,0,0)}.owl-carousel .owl-item,.owl-carousel .owl-wrapper{-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0)}.owl-carousel .owl-item{min-height:1px;float:left;-webkit-backface-visibility:hidden;-webkit-touch-callout:none}.owl-carousel .owl-item img{display:block;width:100%}.owl-carousel .owl-dots.disabled,.owl-carousel .owl-nav.disabled{display:none}.no-js .owl-carousel,.owl-carousel.owl-loaded{display:block}.owl-carousel .owl-dot,.owl-carousel .owl-nav .owl-next,.owl-carousel .owl-nav .owl-prev{cursor:pointer;cursor:hand;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.owl-carousel.owl-loading{opacity:0;display:block}.owl-carousel.owl-hidden{opacity:0}.owl-carousel.owl-refresh .owl-item{visibility:hidden}.owl-carousel.owl-drag .owl-item{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.owl-carousel.owl-grab{cursor:move;cursor:grab}.owl-carousel.owl-rtl{direction:rtl}.owl-carousel.owl-rtl .owl-item{float:right}.owl-carousel .animated{animation-duration:1s;animation-fill-mode:both}.owl-carousel .owl-animated-in{z-index:0}.owl-carousel .owl-animated-out{z-index:1}.owl-carousel .fadeOut{animation-name:fadeOut}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}.owl-height{transition:height .5s ease-in-out}.owl-carousel .owl-item .owl-lazy{opacity:0;transition:opacity .4s ease}.owl-carousel .owl-item img.owl-lazy{transform-style:preserve-3d}.owl-carousel .owl-video-wrapper{position:relative;height:100%;background:#000}.owl-carousel .owl-video-play-icon{position:absolute;height:80px;width:80px;left:50%;top:50%;margin-left:-40px;margin-top:-40px;background:url(owl.video.play.png) no-repeat;cursor:pointer;z-index:1;-webkit-backface-visibility:hidden;transition:transform .1s ease}.owl-carousel .owl-video-play-icon:hover{-ms-transform:scale(1.3,1.3);transform:scale(1.3,1.3)}.owl-carousel .owl-video-playing .owl-video-play-icon,.owl-carousel .owl-video-playing .owl-video-tn{display:none}.owl-carousel .owl-video-tn{opacity:0;height:100%;background-position:center center;background-repeat:no-repeat;background-size:contain;transition:opacity .4s ease}.owl-carousel .owl-video-frame{position:relative;z-index:1;height:100%;width:100%}
--------------------------------------------------------------------------------
/inc/elementor-widgets/assets/js/progress-loader-canvas.js:
--------------------------------------------------------------------------------
1 | /* Credits:
2 | * https://www.developphp.com/video/JavaScript/Circular-Progress-Loader-Canvas-JavaScript-Programming-Tutorial
3 | */
4 |
5 | (function() {
6 | var Progress = function( element ) {
7 | this.context = element.getContext( "2d" );
8 | this.refElement = element.parentNode;
9 | this.loaded = 0;
10 | this.start = 4.72;
11 | this.width = this.context.canvas.width;
12 | this.height = this.context.canvas.height;
13 | this.total = parseInt( this.refElement.dataset.percent, 10 );
14 | this.timer = null;
15 | this.diff = 0;
16 | this.init();
17 | };
18 | Progress.prototype = {
19 | init: function() {
20 | var self = this;
21 | self.timer = setInterval(function() {
22 | self.run();
23 | }, 25);
24 | },
25 | run: function() {
26 | var self = this;
27 | self.diff = ( ( self.loaded / 100 ) * Math.PI * 2 * 10 ).toFixed( 2 );
28 | self.context.clearRect( 0, 0, self.width, self.height );
29 | self.context.lineWidth = 5;
30 | self.context.fillStyle = "#000";
31 | self.context.strokeStyle = "#4a7aec";
32 | self.context.textAlign = "center";
33 | self.context.fillText( self.loaded + "%", self.width * .5, self.height * .5 + 2, self.width );
34 | self.context.beginPath();
35 | self.context.arc( 35, 35, 30, self.start, self.diff / 10 + self.start, false );
36 | self.context.stroke();
37 | if( self.loaded >= self.total ) {
38 | clearInterval( self.timer );
39 | }
40 | self.loaded++;
41 | }
42 | };
43 | var CircularSkillBar = function( elements ) {
44 | this.bars = document.querySelectorAll( elements );
45 | if( this.bars.length > 0 ) {
46 | this.init();
47 | }
48 | };
49 | CircularSkillBar.prototype = {
50 | init: function() {
51 | this.tick = 25;
52 | this.progress();
53 | },
54 | progress: function() {
55 | var self = this;
56 | var index = 0;
57 | var firstCanvas = self.bars[0].querySelector( "canvas" );
58 | var firstProg = new Progress( firstCanvas );
59 | var timer = setInterval(function() {
60 | index++;
61 | var canvas = self.bars[index].querySelector('canvas');
62 |
63 | var prog = new Progress( canvas );
64 |
65 | if( index +1 == self.bars.length ) {
66 | clearInterval( timer );
67 | }
68 |
69 | }, self.tick * 100);
70 |
71 | }
72 | };
73 | document.addEventListener( "DOMContentLoaded", function() {
74 | var circularBars = new CircularSkillBar( ".single-pie-bar" );
75 | });
76 | })();
77 |
--------------------------------------------------------------------------------
/inc/demo-data/fitfloss-customizer.dat:
--------------------------------------------------------------------------------
1 | a:4:{s:8:"template";s:8:"fitfloss";s:4:"mods";a:25:{i:0;b:0;s:18:"nav_menu_locations";a:1:{s:12:"primary-menu";i:28;}s:18:"custom_css_post_id";i:-1;s:28:"fitfloss_header_phone_number";s:17:"+440 1234 654 953";s:29:"fitfloss_footer_widget_toggle";b:1;s:30:"fitfloss_social_profile_toggle";b:1;s:24:"fitfloss_social_profiles";a:4:{i:0;a:4:{s:17:"social_link_title";s:8:"Facebook";s:10:"social_url";s:1:"#";s:11:"social_icon";s:14:"fa fa-facebook";s:5:"index";i:0;}i:1;a:4:{s:17:"social_link_title";s:7:"Twitter";s:10:"social_url";s:1:"#";s:11:"social_icon";s:13:"fa fa-twitter";s:5:"index";i:1;}i:2;a:4:{s:17:"social_link_title";s:9:"Instagram";s:10:"social_url";s:1:"#";s:11:"social_icon";s:15:"fa fa-instagram";s:5:"index";i:2;}i:3;a:4:{s:17:"social_link_title";s:8:"Dribbble";s:10:"social_url";s:1:"#";s:11:"social_icon";s:14:"fa fa-dribbble";s:5:"index";i:3;}}s:18:"fitfloss_blog_meta";b:1;s:17:"fitfloss_like_btn";b:1;s:19:"fitfloss_blog_share";b:1;s:11:"custom_logo";i:55;s:26:"fitfloss_book_btn_bg_color";s:7:"#ff0000";s:32:"fitfloss_book_btn_hover_bg_color";s:22:"rgba(252, 242, 166, 1)";s:24:"fitfloss_header_bg_color";s:7:"#ff0000";s:26:"fitfloss_header_menu_color";s:7:"#ffffff";s:32:"fitfloss_header_menu_hover_color";s:7:"#ff0000";s:28:"fitfloss_dropdown_menu_color";s:7:"#000000";s:34:"fitfloss_dropdown_menu_hover_color";s:7:"#ff0000";s:27:"fitfloss_book_btn_hvr_color";s:7:"#222222";s:20:"fitfloss_theme_color";s:7:"#ff0000";s:31:"fitfloss_footer_widget_bg_color";s:7:"#ff0000";s:36:"fitfloss_footer_widget_heading_color";s:7:"#ffffff";s:33:"fitfloss_footer_widget_text_color";s:7:"#ffffff";s:35:"fitfloss_footer_widget_anchor_color";s:7:"#ffffff";s:41:"fitfloss_footer_widget_anchor_hover_color";s:7:"#ffffff";}s:7:"options";a:22:{s:22:"woocommerce_demo_store";s:2:"no";s:29:"woocommerce_demo_store_notice";s:79:"This is a demo store for testing purposes — no orders shall be fulfilled.";s:29:"woocommerce_shop_page_display";s:0:"";s:36:"woocommerce_category_archive_display";s:0:"";s:35:"woocommerce_default_catalog_orderby";s:10:"menu_order";s:27:"woocommerce_catalog_columns";i:4;s:24:"woocommerce_catalog_rows";i:4;s:30:"woocommerce_single_image_width";s:3:"600";s:33:"woocommerce_thumbnail_image_width";s:3:"300";s:30:"woocommerce_thumbnail_cropping";s:3:"1:1";s:43:"woocommerce_thumbnail_cropping_custom_width";s:1:"4";s:44:"woocommerce_thumbnail_cropping_custom_height";s:1:"3";s:34:"woocommerce_checkout_company_field";s:8:"optional";s:36:"woocommerce_checkout_address_2_field";s:8:"optional";s:32:"woocommerce_checkout_phone_field";s:8:"required";s:46:"woocommerce_checkout_highlight_required_fields";s:3:"yes";s:55:"woocommerce_checkout_terms_and_conditions_checkbox_text";s:44:"I have read and agree to the website [terms]";s:40:"woocommerce_checkout_privacy_policy_text";s:161:"Your personal data will be used to process your order, support your experience throughout this website, and for other purposes described in our [privacy_policy].";s:26:"wp_page_for_privacy_policy";s:1:"0";s:25:"woocommerce_terms_page_id";s:0:"";s:9:"site_icon";s:2:"56";s:23:"nav_menus_created_posts";a:0:{}}s:6:"wp_css";s:0:"";}
--------------------------------------------------------------------------------
/readme.txt:
--------------------------------------------------------------------------------
1 | === Plugin Name ===
2 | Contributors: colorlibplugins, silkalns
3 | Tags: woocommerce, widgets, plugin, demo, companion, home page, one page, parallax, social, portfolio, projects
4 | Requires at least: 5.2
5 | Tested up to: 5.5.1
6 | Stable tag: trunk
7 | License: GPLv3 or later
8 | License URI: http://www.gnu.org/licenses/gpl-3.0.html
9 |
10 | Fitfloss Companion is a companion plugin for Companion WordPress theme by Colorlib.com.
11 | == Description ==
12 |
13 | Companion Companion is a companion for Companion One Page WordPress theme by Colorlib.com. This plugin won't do anything for other free or premium WordPress themes and you need to download and install Companion . If you are having problems with Companion theme or its companion plugin the fastest way to receive help is via our theme support forum .
14 |
15 | This plugin will add necessary WordPress widgets and allow to import demo content which will help you to with website setup.
16 |
17 | While Companion is a great one page WordPress theme it might not be for everyone therefore you might want to check other free WordPress themes that are created by Colorlib.
18 |
19 | = Plugin Options =
20 |
21 | * Creates required WordPress widgets to be used in theme
22 | * Creates demo(dummy) content for widgets to make them easier to use and understand how they work
23 | * Provides an option to import demo(dummy) content.
24 |
25 | = About Colorlib =
26 |
27 | Colorlib is the best and by far the most popular source for free and premium WordPress themes. Our themes has been downloaded over 1,5 million times and are used by developers, webmasters and regular users all over the world. We believe in open source and that's why we have made our themes free to use for private and commercial use.
28 |
29 | = Further Reading =
30 |
31 | If you are new to WordPress but are dedicated to make a website on your own Colorlib is the right place to start. Usually the trickiest part is to choose the right hosting because all hosting providers are not equal. We have outlined the best WordPress hosting providers and we hope you'll find them useful.
32 |
33 |
34 | == Installation ==
35 |
36 | This section describes how to install the plugin and get it working.
37 |
38 | 1. Upload the whole contents of the folder `fitfloss-companion` to the `/wp-content/plugins/` directory
39 | 2. Activate the plugin through the 'Plugins' menu in WordPress dashboard
40 | 3. Enjoy using it :)
41 |
42 |
43 | == Frequently Asked Questions ==
44 |
45 | = What themes this plugin supports? =
46 |
47 | Currently it works only with Companion theme.
48 |
49 | = Am I obligated to use it? =
50 |
51 | You can still use Companion theme without this plugin but you won't be able to import demo content and use theme specific widgets that you see on front page of theme demo.
52 |
53 | == Changelog ==
54 |
55 | = 1.0.0 =
56 | * Initial release.
57 |
--------------------------------------------------------------------------------
/inc/demo-data/demo-import.php:
--------------------------------------------------------------------------------
1 | ';
17 |
18 | return array(
19 | array(
20 | 'import_file_name' => 'Fitfloss Demo',
21 | 'local_import_file' => FITFLOSS_COMPANION_DEMO_DIR_PATH .'fitfloss-demo.xml',
22 | 'local_import_widget_file' => FITFLOSS_COMPANION_DEMO_DIR_PATH .'fitfloss-widgets-demo.wie',
23 | 'import_customizer_file_url' => plugins_url( 'fitfloss-customizer.dat', __FILE__ ),
24 | 'import_notice' => $demoImg,
25 | ),
26 | );
27 | }
28 | add_filter( 'pt-ocdi/import_files', 'fitfloss_import_files' );
29 |
30 |
31 | // demo import setup
32 | function fitfloss_after_import_setup() {
33 | // Assign menus to their locations.
34 | $main_menu = get_term_by( 'name', 'Main Menu', 'nav_menu' );
35 |
36 | set_theme_mod( 'nav_menu_locations', array(
37 | 'primary-menu' => $main_menu->term_id,
38 | )
39 | );
40 |
41 | // Assign front page and posts page (blog page).
42 | $front_page_id = get_page_by_title( 'Homepage' );
43 | $blog_page_id = get_page_by_title( 'Blog' );
44 |
45 | update_option( 'show_on_front', 'page' );
46 | update_option( 'page_on_front', $front_page_id->ID );
47 | update_option( 'page_for_posts', $blog_page_id->ID );
48 | update_option( 'posts_per_page', 3 );
49 | update_option( 'permalink_structure', '/%postname%/' );
50 | flush_rewrite_rules();
51 |
52 | // Update the post to draft after import is done
53 | fitfloss_update_the_followed_post_page_status();
54 |
55 | // Add an option to check after import is done
56 | update_option( 'fitfloss-import-data', true );
57 |
58 | }
59 | add_action( 'pt-ocdi/after_import', 'fitfloss_after_import_setup' );
60 |
61 | //disable the branding notice after successful demo import
62 | add_filter( 'pt-ocdi/disable_pt_branding', '__return_true' );
63 |
64 | //change the location, title and other parameters of the plugin page
65 | function fitfloss_import_plugin_page_setup( $default_settings ) {
66 | $default_settings['parent_slug'] = 'themes.php';
67 | $default_settings['page_title'] = esc_html__( 'One Click Demo Import' , 'fitfloss-companion' );
68 | $default_settings['menu_title'] = esc_html__( 'Import Demo Data' , 'fitfloss-companion' );
69 | $default_settings['capability'] = 'import';
70 | $default_settings['menu_slug'] = 'fitfloss-demo-import';
71 |
72 | return $default_settings;
73 | }
74 | add_filter( 'pt-ocdi/plugin_page_setup', 'fitfloss_import_plugin_page_setup' );
75 |
76 | // Enqueue scripts
77 | function fitfloss_demo_import_custom_scripts(){
78 |
79 |
80 | if( isset( $_GET['page'] ) && $_GET['page'] == 'fitfloss-demo-import' ){
81 | // style
82 | wp_enqueue_style( 'fitfloss-demo-import', plugins_url( 'css/demo-import.css', __FILE__ ), array(), '1.0', false );
83 | }
84 |
85 |
86 | }
87 | add_action( 'admin_enqueue_scripts', 'fitfloss_demo_import_custom_scripts' );
88 |
--------------------------------------------------------------------------------
/inc/elementor-widgets/assets/js/jquery.counterup.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * jquery.counterup.js 1.0
3 | *
4 | * Copyright 2013, Benjamin Intal http://gambit.ph @bfintal
5 | * Released under the GPL v2 License
6 | *
7 | * Date: Nov 26, 2013
8 | */
9 | (function( $ ){
10 | "use strict";
11 |
12 | $.fn.counterUp = function( options ) {
13 |
14 | // Defaults
15 | var settings = $.extend({
16 | 'time': 400,
17 | 'delay': 10
18 | }, options);
19 |
20 | return this.each(function(){
21 |
22 | // Store the object
23 | var $this = $(this);
24 | var $settings = settings;
25 |
26 | var counterUpper = function() {
27 | var nums = [];
28 | var divisions = $settings.time / $settings.delay;
29 | var num = $this.text();
30 | var isComma = /[0-9]+,[0-9]+/.test(num);
31 | num = num.replace(/,/g, '');
32 | var isInt = /^[0-9]+$/.test(num);
33 | var isFloat = /^[0-9]+\.[0-9]+$/.test(num);
34 | var decimalPlaces = isFloat ? (num.split('.')[1] || []).length : 0;
35 |
36 | // Generate list of incremental numbers to display
37 | for (var i = divisions; i >= 1; i--) {
38 |
39 | // Preserve as int if input was int
40 | var newNum = parseInt(num / divisions * i);
41 |
42 | // Preserve float if input was float
43 | if (isFloat) {
44 | newNum = parseFloat(num / divisions * i).toFixed(decimalPlaces);
45 | }
46 |
47 | // Preserve commas if input had commas
48 | if (isComma) {
49 | while (/(\d+)(\d{3})/.test(newNum.toString())) {
50 | newNum = newNum.toString().replace(/(\d+)(\d{3})/, '$1'+','+'$2');
51 | }
52 | }
53 |
54 | nums.unshift(newNum);
55 | }
56 |
57 | $this.data('counterup-nums', nums);
58 | $this.text('0');
59 |
60 | // Updates the number until we're done
61 | // var f = function() {
62 | // $this.text($this.data('counterup-nums').shift());
63 | // if ($this.data('counterup-nums').length) {
64 | // setTimeout($this.data('counterup-func'), $settings.delay);
65 | // } else {
66 | // delete $this.data('counterup-nums');
67 | // $this.data('counterup-nums', null);
68 | // $this.data('counterup-func', null);
69 | // }
70 | // };
71 | var f = function () {
72 | if (!$this.data('counterup-nums')) {
73 | return;
74 | }
75 | $this.text($this.data('counterup-nums').shift());
76 | if ($this.data('counterup-nums').length) {
77 | setTimeout($this.data('counterup-func'), $settings.delay);
78 | } else {
79 | delete $this.data('counterup-nums');
80 | $this.data('counterup-nums', null);
81 | $this.data('counterup-func', null);
82 | }
83 | };
84 | $this.data('counterup-func', f);
85 |
86 | // Start the count up
87 | setTimeout($this.data('counterup-func'), $settings.delay);
88 | };
89 |
90 | // Perform counts when the element gets into view
91 | $this.waypoint(counterUpper, { offset: '100%', triggerOnce: true });
92 | });
93 |
94 | };
95 |
96 | })( jQuery );
--------------------------------------------------------------------------------
/inc/sidebar-widgets/instagram.php:
--------------------------------------------------------------------------------
1 | esc_html__('Fitfloss Instagram Photo Widget','fitfloss-companion'),
10 | ));
11 | }
12 |
13 | // Output======================
14 | public function widget($args, $instance){
15 |
16 | $title = apply_filters( 'widget_title', $instance['title'] );
17 | $insta_user = apply_filters( 'widget_insta_user', $instance['insta_user'] );
18 | $insta_items = apply_filters( 'widget_insta_items', $instance['insta_items'] );
19 |
20 |
21 | echo wp_kses_post( $args['before_widget'] );
22 | if ( ! empty( $title ) )
23 | echo wp_kses_post( $args['before_title'] . $title . $args['after_title'] ); ?>
24 |
25 |
29 |
30 |
31 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 | access_token = fitfloss_opt( 'fitfloss_igaccess_token' );
42 | }
43 |
44 | /**
45 | * @param $screen_name string Instagram username
46 | * @param $image_limit int Number of images to retrieve
47 | * @param $image_width int Desired image width to retrieve
48 | *
49 | * @return array|bool Array of tweets or false if method fails
50 | */
51 | public function get_items( $image_limit, $image_width ) {
52 |
53 | $transient = 'zoom_instagram_is_configured';
54 |
55 | $response = wp_remote_get( sprintf( 'https://api.instagram.com/v1/users/self/media/recent/?access_token=%s&count=%s', $this->access_token, $image_limit ) );
56 |
57 |
58 | if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) ) {
59 | set_transient( $transient, false, MINUTE_IN_SECONDS );
60 |
61 | return false;
62 | }
63 |
64 |
65 |
66 | $data = json_decode( wp_remote_retrieve_body( $response ) );
67 |
68 | $result = array();
69 | $username = '';
70 |
71 | foreach ( $data->data as $item ) {
72 |
73 | if(empty($username)){
74 | $username = $item->user->username;
75 | }
76 |
77 | $result[] = array(
78 | 'link' => $item->link,
79 | 'image-url' => $item->images->{ $this->get_best_size( $image_width ) }->url,
80 | 'likes' => $item->likes->count,
81 | 'comments' => $item->comments->count,
82 | 'location' => !empty( $item->location->name ) ? $item->location->name : ''
83 | );
84 | }
85 |
86 | $result = array('items' => $result, 'username'=> $username );
87 | set_transient( $transient, $result, 30 * MINUTE_IN_SECONDS );
88 |
89 | return $result;
90 | }
91 |
92 | /**
93 | * @param $screen_name string Instagram username
94 | *
95 | * @return bool|int Instagram user id or false on error
96 | */
97 | protected function get_user_id( $screen_name ) {
98 | $user_id_option = 'zoom_instagram_uid_' . $screen_name;
99 |
100 | if ( false !== ( $user_id = get_option( $user_id_option ) ) ) {
101 | return $user_id;
102 | }
103 |
104 | $response = wp_remote_get( sprintf( 'https://api.instagram.com/v1/users/search?q=%s&access_token=%s', $screen_name, $this->access_token ) );
105 |
106 | if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) ) {
107 | return false;
108 | }
109 |
110 | $result = json_decode( wp_remote_retrieve_body( $response ) );
111 |
112 | if ( ! isset( $result->data ) ) {
113 | return false;
114 | }
115 |
116 | $user_id = false;
117 |
118 | foreach ( $result->data as $user ) {
119 | if ( $user->username === $screen_name ) {
120 | $user_id = $user->id;
121 |
122 | break;
123 | }
124 | }
125 |
126 | update_option( $user_id_option, $user_id );
127 |
128 | return $user_id;
129 | }
130 |
131 | /**
132 | * @param $desired_width int Desired image width in pixels
133 | *
134 | * @return string Image size for Instagram API
135 | */
136 | protected function get_best_size( $desired_width ) {
137 | $size = 'thumbnail';
138 | $sizes = array(
139 | 'thumbnail' => 137,
140 | 'low_resolution' => 150,
141 | 'standard_resolution' => 640
142 | );
143 |
144 | $diff = PHP_INT_MAX;
145 |
146 | foreach ( $sizes as $key => $value ) {
147 | if ( abs( $desired_width - $value ) < $diff ) {
148 | $size = $key;
149 | $diff = abs( $desired_width - $value );
150 | }
151 | }
152 |
153 | return $size;
154 | }
155 |
156 | /**
157 | * Check if given access token is valid for Instagram Api.
158 | */
159 | public static function is_access_token_valid( $access_token ) {
160 | $response = wp_remote_get( sprintf( 'https://api.instagram.com/v1/users/self/?access_token=%s', $access_token ) );
161 |
162 | if ( is_wp_error( $response ) ) {
163 | return $response;
164 | }
165 |
166 | if ( 200 != wp_remote_retrieve_response_code( $response ) ) {
167 | return false;
168 | }
169 |
170 | return true;
171 | }
172 |
173 | public function is_configured() {
174 | $transient = 'zoom_instagram_is_configured';
175 |
176 | if ( false !== ( $result = get_transient( $transient ) ) ) {
177 | if ( 'yes' === $result ) {
178 | return true;
179 | }
180 |
181 | if ( 'no' === $result ) {
182 | return false;
183 | }
184 | }
185 |
186 | $condition = $this->is_access_token_valid( $this->access_token );
187 |
188 | if ( true === $condition ) {
189 | set_transient( $transient, 'yes', DAY_IN_SECONDS );
190 |
191 | return true;
192 | }
193 |
194 | set_transient( $transient, 'no', DAY_IN_SECONDS );
195 |
196 | return false;
197 | }
198 |
199 | public static function reset_cache() {
200 | delete_transient( 'zoom_instagram_is_configured' );
201 | }
202 |
203 | public function get_access_token() {
204 | return $this->access_token;
205 | }
206 |
207 | public function set_access_token( $access_token ) {
208 | $this->access_token = $access_token;
209 | }
210 | }
211 | ?>
--------------------------------------------------------------------------------
/inc/sidebar-widgets/blog-widget.php:
--------------------------------------------------------------------------------
1 | esc_html__( 'Show most latest blog post.', 'fitfloss-companion' ), )
34 | );
35 |
36 | }
37 |
38 | // This is where the action happens
39 | public function widget( $args, $instance ) {
40 | $title = apply_filters( 'fitfloss_blog_sectiontitle', $instance['sectiontitle'] );
41 | $postnumber = apply_filters( 'fitfloss_blog_postnumber', $instance['postnumber'] );
42 | $style = apply_filters( 'fitfloss_blog_style', $instance['style'] );
43 |
44 | // before and after widget arguments are defined by themes
45 | echo wp_kses_post( $args['before_widget'] );
46 | if ( ! empty( $title ) )
47 | echo wp_kses_post( $args['before_title'] . $title . $args['after_title'] );
48 |
49 |
50 | ?>
51 |
52 |
53 | 'post',
56 | 'posts_per_page' => esc_html( $postnumber ),
57 | );
58 |
59 | $query = new WP_Query( $blogargs );
60 |
61 | if( $query->have_posts() ):
62 | while( $query->have_posts() ):
63 | $query->the_post();
64 | ?>
65 |
69 |
72 |
73 | 'img-fluid']); ?>
74 |
75 |
81 |
82 |
85 |
88 |
96 |
102 |
103 |
104 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 | >
148 | >
149 |
150 |
151 |
152 | esc_html__( 'Add footer newsletter signup form.', 'fitfloss-companion' ), )
28 | );
29 |
30 | }
31 |
32 | // This is where the action happens
33 | public function widget( $args, $instance ) {
34 |
35 | $title = apply_filters( 'widget_title', $instance['title'] );
36 | $actionurl = apply_filters( 'widget_actionurl', $instance['actionurl'] );
37 | $desc = apply_filters( 'widget_desc', $instance['desc'] );
38 |
39 | // before and after widget arguments are defined by themes
40 | echo wp_kses_post( $args['before_widget'] );
41 | if ( ! empty( $title ) )
42 | echo wp_kses_post( $args['before_title'] . $title . $args['after_title'] );
43 | if( $desc ){
44 | echo ''.esc_html( $desc ).'
';
45 | }
46 | ?>
47 |
65 |
66 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 | ', ' ']
14 | });
15 | }
16 |
17 | if ($.fn.owlCarousel) {
18 | $(".fitfloss-service-slides").owlCarousel({
19 | items: 3,
20 | loop: true,
21 | autoplay: true,
22 | smartSpeed: 800,
23 | margin: 30,
24 | center: true,
25 | dots: false,
26 | nav: true,
27 | startPosition: 1,
28 | navText: [' ', ' '],
29 | responsive: {
30 | 0: {
31 | items: 1
32 | },
33 | 576: {
34 | items: 2
35 | },
36 | 768: {
37 | items: 3
38 | }
39 | }
40 | });
41 | }
42 |
43 | if ($.fn.owlCarousel) {
44 | $(".fitfloss-workflow-slides").owlCarousel({
45 | items: 3,
46 | loop: true,
47 | autoplay: true,
48 | smartSpeed: 800,
49 | margin: 30,
50 | center: true,
51 | dots: true,
52 | startPosition: 1,
53 | responsive: {
54 | 0: {
55 | items: 1
56 | },
57 | 576: {
58 | items: 2
59 | },
60 | 768: {
61 | items: 3
62 | }
63 | }
64 | });
65 | }
66 |
67 | if ($.fn.owlCarousel) {
68 | $(".fitfloss-team-slides").owlCarousel({
69 | items: 3,
70 | loop: true,
71 | autoplay: true,
72 | smartSpeed: 800,
73 | margin: 50,
74 | center: true,
75 | nav: true,
76 | navText: [' ', ' '],
77 | responsive: {
78 | 0: {
79 | items: 1
80 | },
81 | 576: {
82 | items: 2
83 | },
84 | 768: {
85 | items: 3
86 | }
87 | }
88 | });
89 | }
90 |
91 | if ($.fn.owlCarousel) {
92 | $(".testimonials-slides").owlCarousel({
93 | items: 3,
94 | loop: true,
95 | autoplay: true,
96 | smartSpeed: 1500,
97 | margin: 0,
98 | center: true,
99 | nav: true,
100 | navText: [' ', ' '],
101 | responsive: {
102 | 0: {
103 | items: 1
104 | },
105 | 576: {
106 | items: 2
107 | },
108 | 768: {
109 | items: 3
110 | }
111 | }
112 | });
113 | }
114 |
115 | if ($.fn.barfiller) {
116 |
117 | $('.bar').each( function(){
118 | var $this = $(this),
119 | $color = $this.data('color');
120 |
121 | $this.barfiller({
122 | tooltip: true,
123 | duration: 1000,
124 | barColor: $color,
125 | animateOnResize: true
126 | });
127 |
128 |
129 | })
130 |
131 | }
132 | if ($.fn.imagesLoaded) {
133 | $('.fitfloss-portfolio').imagesLoaded(function () {
134 | // filter items on button click
135 | $('.portfolio-menu').on('click', 'p', function () {
136 | var filterValue = $(this).attr('data-filter');
137 | $grid.isotope({
138 | filter: filterValue
139 | });
140 | });
141 | // init Isotope
142 | var $grid = $('.fitfloss-portfolio').isotope({
143 | itemSelector: '.single_gallery_item',
144 | percentPosition: true,
145 | masonry: {
146 | columnWidth: '.single_gallery_item'
147 | }
148 | });
149 | });
150 | }
151 |
152 | $('.portfolio-menu button.btn').on('click', function () {
153 | $('.portfolio-menu button.btn').removeClass('active');
154 | $(this).addClass('active');
155 | })
156 | if ($.fn.scrollUp) {
157 | $.scrollUp({
158 | scrollSpeed: 1500,
159 | scrollText: ' '
160 | });
161 | }
162 |
163 | if ($.fn.counterUp) {
164 | $('.counter').counterUp({
165 | delay: 10,
166 | time: 2000
167 | });
168 | }
169 |
170 | // Background video
171 | var $selector = $('[data-videoid]');
172 |
173 | if( $selector.length ){
174 | $selector.each( function(){
175 | var $this = $(this);
176 | $this.YTPlayer({
177 | fitToBackground: true,
178 | videoId: $this.data('videoid')
179 | });
180 | });
181 | }
182 |
183 | // MC Scripts
184 | var $subscribe = $( '.fitfloss-subscribe-newsletter-area' );
185 | if( $subscribe.length ){
186 | window.fnames = new Array();
187 | window.ftypes = new Array();
188 | fnames[0]='EMAIL';
189 | ftypes[0]='email';
190 | fnames[1]='FNAME';
191 | ftypes[1]='text';
192 | fnames[2]='LNAME';
193 | ftypes[2]='text';
194 | fnames[3]='ADDRESS';
195 | ftypes[3]='address';
196 | fnames[4]='PHONE';
197 | ftypes[4]='phone';
198 | fnames[5]='BIRTHDAY';
199 | ftypes[5]='birthday';
200 | }
201 |
202 |
203 |
204 | })(jQuery);
--------------------------------------------------------------------------------
/inc/elementor-widgets/widgets/hero-section.php:
--------------------------------------------------------------------------------
1 | start_controls_section(
48 | 'hero_content',
49 | [
50 | 'label' => __( 'Hero content', 'fitfloss-companion' ),
51 | ]
52 | );
53 |
54 | $this->add_control(
55 | 'banner_img',
56 | [
57 | 'label' => esc_html__( 'Banner Image', 'fitfloss-companion' ),
58 | 'type' => Controls_Manager::MEDIA,
59 | 'label_block' => true,
60 | 'default' => [
61 | 'url' => Utils::get_placeholder_image_src(),
62 | ]
63 | ]
64 | );
65 | $this->add_control(
66 | 'sub_title',
67 | [
68 | 'label' => esc_html__( 'Banner Sub Title', 'fitfloss-companion' ),
69 | 'type' => Controls_Manager::TEXT,
70 | 'label_block' => true,
71 | 'default' => esc_html__( 'Working hard in order to get perfect shape.', 'fitfloss-companion' ),
72 | ]
73 | );
74 | $this->add_control(
75 | 'sec_title',
76 | [
77 | 'label' => esc_html__( 'Banner Big Title', 'fitfloss-companion' ),
78 | 'type' => Controls_Manager::TEXT,
79 | 'label_block' => true,
80 | 'default' => esc_html__( 'Fitfloss Fitness Studio', 'fitfloss-companion' ),
81 | ]
82 | );
83 | $this->add_control(
84 | 'btn_text',
85 | [
86 | 'label' => esc_html__( 'Button Text', 'fitfloss-companion' ),
87 | 'type' => Controls_Manager::TEXT,
88 | 'label_block' => true,
89 | 'default' => esc_html__( 'Browse Services', 'fitfloss-companion' ),
90 | ]
91 | );
92 | $this->add_control(
93 | 'btn_url',
94 | [
95 | 'label' => esc_html__( 'Button URL', 'fitfloss-companion' ),
96 | 'type' => Controls_Manager::URL,
97 | 'label_block' => true,
98 | 'default' => [
99 | 'url' => '#'
100 | ],
101 | ]
102 | );
103 |
104 | $this->end_controls_section(); // End Hero content
105 |
106 |
107 | /**
108 | * Style Tab
109 | * ------------------------------ Style Title ------------------------------
110 | *
111 | */
112 | $this->start_controls_section(
113 | 'style_title', [
114 | 'label' => __( 'Style Hero Section', 'fitfloss-companion' ),
115 | 'tab' => Controls_Manager::TAB_STYLE,
116 | ]
117 | );
118 | $this->add_control(
119 | 'sub_title_col', [
120 | 'label' => __( 'Sub Title Color', 'fitfloss-companion' ),
121 | 'type' => Controls_Manager::COLOR,
122 | 'selectors' => [
123 | '{{WRAPPER}} .banner_part .banner_text p' => 'color: {{VALUE}};',
124 | '{{WRAPPER}} .banner_part .banner_text p::after' => 'background-color: {{VALUE}};',
125 | ],
126 | ]
127 | );
128 | $this->add_control(
129 | 'big_title_col', [
130 | 'label' => __( 'Big Title Color', 'fitfloss-companion' ),
131 | 'type' => Controls_Manager::COLOR,
132 | 'selectors' => [
133 | '{{WRAPPER}} .banner_part .banner_text h1' => 'color: {{VALUE}};',
134 | ],
135 | ]
136 | );
137 | $this->add_control(
138 | 'btn_bg_col', [
139 | 'label' => __( 'Button Bg Color', 'fitfloss-companion' ),
140 | 'type' => Controls_Manager::COLOR,
141 | 'selectors' => [
142 | '{{WRAPPER}} .banner_part .banner_text .btn_1' => 'background: {{VALUE}};',
143 | ],
144 | ]
145 | );
146 | $this->add_control(
147 | 'btn_bg_hov_col', [
148 | 'label' => __( 'Button Bg Hover Color', 'fitfloss-companion' ),
149 | 'type' => Controls_Manager::COLOR,
150 | 'selectors' => [
151 | '{{WRAPPER}} .banner_part .banner_text .btn_1:hover' => 'background: {{VALUE}};',
152 | ],
153 | ]
154 | );
155 |
156 | $this->end_controls_section();
157 | }
158 |
159 | protected function render() {
160 | $settings = $this->get_settings();
161 | $banner_img = !empty( $settings['banner_img']['url'] ) ? $settings['banner_img']['url'] : '';
162 | $sub_title = !empty( $settings['sub_title'] ) ? $settings['sub_title'] : '';
163 | $sec_title = !empty( $settings['sec_title'] ) ? $settings['sec_title'] : '';
164 | $btn_text = !empty( $settings['btn_text'] ) ? $settings['btn_text'] : '';
165 | $btn_url = !empty( $settings['btn_url']['url'] ) ? $settings['btn_url']['url'] : '';
166 | ?>
167 |
168 |
169 |
184 |
185 | start_controls_section(
48 | 'become_member_content',
49 | [
50 | 'label' => __( 'Become Member Content', 'fitfloss-companion' ),
51 | ]
52 | );
53 | $this->add_control(
54 | 'sec_title',
55 | [
56 | 'label' => esc_html__( 'Video Title', 'fitfloss-companion' ),
57 | 'type' => Controls_Manager::TEXT,
58 | 'label_block' => true,
59 | 'default' => esc_html__( 'Many more Features are Waiting!', 'fitfloss-companion' ),
60 | ]
61 | );
62 | $this->add_control(
63 | 'sub_title',
64 | [
65 | 'label' => esc_html__( 'Sub Title', 'fitfloss-companion' ),
66 | 'type' => Controls_Manager::TEXTAREA,
67 | 'label_block' => true,
68 | 'default' => esc_html__( 'Thinking about overseas adventure travel? Have you put any thought into the best places to go when it comes to overseas adventure travel?', 'fitfloss-companion' ),
69 | ]
70 | );
71 | $this->add_control(
72 | 'btn_txt',
73 | [
74 | 'label' => esc_html__( 'Button Text', 'fitfloss-companion' ),
75 | 'type' => Controls_Manager::TEXT,
76 | 'label_block' => true,
77 | 'default' => esc_html__( 'Become A Member', 'fitfloss-companion' ),
78 | ]
79 | );
80 | $this->add_control(
81 | 'btn_url',
82 | [
83 | 'label' => esc_html__( 'Button URL', 'fitfloss-companion' ),
84 | 'type' => Controls_Manager::URL,
85 | 'label_block' => true,
86 | 'default' => [
87 | 'url' => '#'
88 | ],
89 | ]
90 | );
91 | $this->add_control(
92 | 'bg_img',
93 | [
94 | 'label' => esc_html__( 'Background Image', 'fitfloss-companion' ),
95 | 'type' => Controls_Manager::MEDIA,
96 | 'label_block' => true,
97 | 'default' => [
98 | 'url' => Utils::get_placeholder_image_src(),
99 | ]
100 | ]
101 | );
102 |
103 | $this->end_controls_section(); // End about us content
104 |
105 | //------------------------------ Style title ------------------------------
106 |
107 | // Top Section Styles
108 | $this->start_controls_section(
109 | 'left_sec_style', [
110 | 'label' => __( 'Top Section Styles', 'fitfloss-companion' ),
111 | 'tab' => Controls_Manager::TAB_STYLE,
112 | ]
113 | );
114 |
115 | $this->add_control(
116 | 'sec_title_col', [
117 | 'label' => __( 'Big Title Color', 'fitfloss-companion' ),
118 | 'type' => Controls_Manager::COLOR,
119 | 'selectors' => [
120 | '{{WRAPPER}} .become_member h2' => 'color: {{VALUE}};',
121 | ],
122 | ]
123 | );
124 |
125 | $this->add_control(
126 | 'sub_title_col', [
127 | 'label' => __( 'Sub title Color', 'fitfloss-companion' ),
128 | 'type' => Controls_Manager::COLOR,
129 | 'selectors' => [
130 | '{{WRAPPER}} .become_member p' => 'color: {{VALUE}};',
131 | ],
132 | ]
133 | );
134 |
135 | $this->add_control(
136 | 'btn_bg_col', [
137 | 'label' => __( 'Button BG Color', 'fitfloss-companion' ),
138 | 'type' => Controls_Manager::COLOR,
139 | 'selectors' => [
140 | '{{WRAPPER}} .become_member .btn_1' => 'background: {{VALUE}};',
141 | ],
142 | ]
143 | );
144 |
145 | $this->add_control(
146 | 'btn_hov_bg_col', [
147 | 'label' => __( 'Button Hover Bg Color', 'fitfloss-companion' ),
148 | 'type' => Controls_Manager::COLOR,
149 | 'selectors' => [
150 | '{{WRAPPER}} .become_member .btn_1:hover' => 'background-color: {{VALUE}};',
151 | ],
152 | ]
153 | );
154 | $this->add_control(
155 | 'bg_overlay_col', [
156 | 'label' => __( 'Bg Overlay Color', 'fitfloss-companion' ),
157 | 'type' => Controls_Manager::COLOR,
158 | 'selectors' => [
159 | '{{WRAPPER}} .become_member:after' => 'background: {{VALUE}};',
160 | ],
161 | ]
162 | );
163 | $this->end_controls_section();
164 |
165 | }
166 |
167 | protected function render() {
168 | $settings = $this->get_settings();
169 | $sec_title = !empty( $settings['sec_title'] ) ? $settings['sec_title'] : '';
170 | $sub_title = !empty( $settings['sub_title'] ) ? $settings['sub_title'] : '';
171 | $btn_txt = !empty( $settings['btn_txt'] ) ? $settings['btn_txt'] : '';
172 | $btn_url = !empty( $settings['btn_url']['url'] ) ? $settings['btn_url']['url'] : '';
173 | $bg_img = !empty( $settings['bg_img']['url'] ) ? $settings['bg_img']['url'] : '';
174 | ?>
175 |
176 |
177 |
190 |
191 | start_controls_section(
48 | 'popular_courses_content',
49 | [
50 | 'label' => __( 'Popular Courses Content', 'fitfloss-companion' ),
51 | ]
52 | );
53 |
54 | $this->add_control(
55 | 'sec_title',
56 | [
57 | 'label' => esc_html__( 'Section Title', 'fitfloss-companion' ),
58 | 'type' => Controls_Manager::TEXT,
59 | 'label_block' => true,
60 | 'default' => esc_html__( 'Our Popular Courses', 'fitfloss-companion' ),
61 | ]
62 | );
63 | $this->add_control(
64 | 'sub_title',
65 | [
66 | 'label' => esc_html__( 'Sub Title', 'fitfloss-companion' ),
67 | 'type' => Controls_Manager::TEXTAREA,
68 | 'label_block' => true,
69 | 'default' => esc_html__( 'As you pour the first glass of your favorite Chianti or Chardonnay and settle into an intimate Friday evening.', 'fitfloss-companion' ),
70 | ]
71 | );
72 | $this->add_control(
73 | 'show_items',
74 | [
75 | 'label' => esc_html__( 'Show Items', 'fitfloss-companion' ),
76 | 'type' => Controls_Manager::NUMBER,
77 | 'label_block' => true,
78 | 'default' => esc_html__( '3', 'fitfloss-companion' ),
79 | ]
80 | );
81 | $this->end_controls_section(); // End about us content
82 |
83 | //------------------------------ Style title ------------------------------
84 |
85 | // Top Section Styles
86 | $this->start_controls_section(
87 | 'left_sec_style', [
88 | 'label' => __( 'Popular Orders Styles', 'fitfloss-companion' ),
89 | 'tab' => Controls_Manager::TAB_STYLE,
90 | ]
91 | );
92 |
93 | $this->add_control(
94 | 'big_title_col', [
95 | 'label' => __( 'Big title Color', 'fitfloss-companion' ),
96 | 'type' => Controls_Manager::COLOR,
97 | 'selectors' => [
98 | '{{WRAPPER}} .popular_cource .section_tittle h2' => 'color: {{VALUE}};',
99 | ],
100 | ]
101 | );
102 |
103 | $this->add_control(
104 | 'text_col', [
105 | 'label' => __( 'Sub Title Color', 'fitfloss-companion' ),
106 | 'type' => Controls_Manager::COLOR,
107 | 'selectors' => [
108 | '{{WRAPPER}} .popular_cource .section_tittle p' => 'color: {{VALUE}};',
109 | ],
110 | ]
111 | );
112 | $this->end_controls_section();
113 |
114 |
115 | // Single Item Styles
116 | $this->start_controls_section(
117 | 'single_item_styles', [
118 | 'label' => __( 'Single item Styles', 'fitfloss-companion' ),
119 | 'tab' => Controls_Manager::TAB_STYLE,
120 | ]
121 | );
122 |
123 | $this->add_control(
124 | 'price_col', [
125 | 'label' => __( 'Course Fee Color', 'fitfloss-companion' ),
126 | 'type' => Controls_Manager::COLOR,
127 | 'selectors' => [
128 | '{{WRAPPER}} .popular_cource .single_popular_cource h3 span' => 'color: {{VALUE}};',
129 | ],
130 | ]
131 | );
132 |
133 | $this->add_control(
134 | 'btn_styles_seperator',
135 | [
136 | 'label' => esc_html__( 'Button Styles', 'fitfloss-companion' ),
137 | 'type' => Controls_Manager::HEADING,
138 | 'separator' => 'after'
139 | ]
140 | );
141 | $this->add_control(
142 | 'btn_txt_col', [
143 | 'label' => __( 'Button Color', 'fitfloss-companion' ),
144 | 'type' => Controls_Manager::COLOR,
145 | 'selectors' => [
146 | '{{WRAPPER}} .popular_cource .single_popular_cource .btn_2' => 'color: {{VALUE}}; border-color: {{VALUE}}',
147 | ],
148 | ]
149 | );
150 | $this->add_control(
151 | 'btn_hvr_styles_seperator',
152 | [
153 | 'label' => esc_html__( 'Button Hover Styles', 'fitfloss-companion' ),
154 | 'type' => Controls_Manager::HEADING,
155 | 'separator' => 'after'
156 | ]
157 | );
158 | $this->add_control(
159 | 'btn_hvr_bg_col', [
160 | 'label' => __( 'Button Hover Bg Color', 'fitfloss-companion' ),
161 | 'type' => Controls_Manager::COLOR,
162 | 'selectors' => [
163 | '{{WRAPPER}} .popular_cource .single_popular_cource .btn_2:hover' => 'background-color: {{VALUE}}; border-color: {{VALUE}};',
164 | ],
165 | ]
166 | );
167 | $this->add_control(
168 | 'btn_hvr_txt_col', [
169 | 'label' => __( 'Button Hover Text Color', 'fitfloss-companion' ),
170 | 'type' => Controls_Manager::COLOR,
171 | 'selectors' => [
172 | '{{WRAPPER}} .popular_cource .single_popular_cource .btn_2:hover' => 'color: {{VALUE}};',
173 | ],
174 | ]
175 | );
176 |
177 | $this->end_controls_section();
178 |
179 | }
180 |
181 | protected function render() {
182 | $settings = $this->get_settings();
183 | $sec_title = !empty( $settings['sec_title'] ) ? $settings['sec_title'] : '';
184 | $sub_title = !empty( $settings['sub_title'] ) ? $settings['sub_title'] : '';
185 | $show_items = !empty( $settings['show_items'] ) ? $settings['show_items'] : '';
186 | $dynamic_class = is_front_page() ? 'popular_cource section_padding' : 'popular_cource padding_top single_page_popular_cource';
187 | ?>
188 |
189 |
190 |
191 |
192 |
200 |
201 |
202 |
203 |
204 |
205 |
206 | esc_html__( 'Add footer social links.', 'fitfloss-companion' ), )
28 | );
29 |
30 | }
31 |
32 | // This is where the action happens
33 | public function widget( $args, $instance ) {
34 |
35 | $title = apply_filters( 'widget_title', $instance['title'] );
36 | $desc = apply_filters( 'widget_text', $instance['desc'] );
37 | $facebook = apply_filters( 'widget_text', $instance['facebook'] );
38 | $twitter = apply_filters( 'widget_text', $instance['twitter'] );
39 | $linkedin = apply_filters( 'widget_text', $instance['linkedin'] );
40 | $instagram = apply_filters( 'widget_text', $instance['instagram'] );
41 | $dribbble = apply_filters( 'widget_text', $instance['dribbble'] );
42 |
43 | // before and after widget arguments are defined by themes
44 | echo wp_kses_post( $args['before_widget'] );
45 | if ( ! empty( $title ) )
46 | echo wp_kses_post( $args['before_title'] . $title . $args['after_title'] );
47 |
48 |
49 | if( $desc ){
50 | echo ''.esc_html( $desc ).'
';
51 | } ?>
52 |
53 |
54 |
';
57 | }
58 | if( $twitter ){
59 | echo '
';
60 | }
61 | if( $dribbble ){
62 | echo '
';
63 | }
64 | if( $linkedin ){
65 | echo '
';
66 | }
67 | if( $instagram ){
68 | echo '
';
69 | }
70 | ?>
71 |
72 |
73 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 | =0;s={horizontal:{},vertical:{}};f=1;a={};u="waypoints-context-id";p="resize.waypoints";y="scroll.waypoints";v=1;w="waypoints-waypoint-ids";g="waypoint";m="waypoints";o=function(){function t(t){var e=this;this.$element=t;this.element=t[0];this.didResize=false;this.didScroll=false;this.id="context"+f++;this.oldScroll={x:t.scrollLeft(),y:t.scrollTop()};this.waypoints={horizontal:{},vertical:{}};t.data(u,this.id);a[this.id]=this;t.bind(y,function(){var t;if(!(e.didScroll||c)){e.didScroll=true;t=function(){e.doScroll();return e.didScroll=false};return r.setTimeout(t,n[m].settings.scrollThrottle)}});t.bind(p,function(){var t;if(!e.didResize){e.didResize=true;t=function(){n[m]("refresh");return e.didResize=false};return r.setTimeout(t,n[m].settings.resizeThrottle)}})}t.prototype.doScroll=function(){var t,e=this;t={horizontal:{newScroll:this.$element.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.$element.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}};if(c&&(!t.vertical.oldScroll||!t.vertical.newScroll)){n[m]("refresh")}n.each(t,function(t,r){var i,o,l;l=[];o=r.newScroll>r.oldScroll;i=o?r.forward:r.backward;n.each(e.waypoints[t],function(t,e){var n,i;if(r.oldScroll<(n=e.offset)&&n<=r.newScroll){return l.push(e)}else if(r.newScroll<(i=e.offset)&&i<=r.oldScroll){return l.push(e)}});l.sort(function(t,e){return t.offset-e.offset});if(!o){l.reverse()}return n.each(l,function(t,e){if(e.options.continuous||t===l.length-1){return e.trigger([i])}})});return this.oldScroll={x:t.horizontal.newScroll,y:t.vertical.newScroll}};t.prototype.refresh=function(){var t,e,r,i=this;r=n.isWindow(this.element);e=this.$element.offset();this.doScroll();t={horizontal:{contextOffset:r?0:e.left,contextScroll:r?0:this.oldScroll.x,contextDimension:this.$element.width(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:r?0:e.top,contextScroll:r?0:this.oldScroll.y,contextDimension:r?n[m]("viewportHeight"):this.$element.height(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}};return n.each(t,function(t,e){return n.each(i.waypoints[t],function(t,r){var i,o,l,s,f;i=r.options.offset;l=r.offset;o=n.isWindow(r.element)?0:r.$element.offset()[e.offsetProp];if(n.isFunction(i)){i=i.apply(r.element)}else if(typeof i==="string"){i=parseFloat(i);if(r.options.offset.indexOf("%")>-1){i=Math.ceil(e.contextDimension*i/100)}}r.offset=o-e.contextOffset+e.contextScroll-i;if(r.options.onlyOnScroll&&l!=null||!r.enabled){return}if(l!==null&&l<(s=e.oldScroll)&&s<=r.offset){return r.trigger([e.backward])}else if(l!==null&&l>(f=e.oldScroll)&&f>=r.offset){return r.trigger([e.forward])}else if(l===null&&e.oldScroll>=r.offset){return r.trigger([e.forward])}})})};t.prototype.checkEmpty=function(){if(n.isEmptyObject(this.waypoints.horizontal)&&n.isEmptyObject(this.waypoints.vertical)){this.$element.unbind([p,y].join(" "));return delete a[this.id]}};return t}();l=function(){function t(t,e,r){var i,o;r=n.extend({},n.fn[g].defaults,r);if(r.offset==="bottom-in-view"){r.offset=function(){var t;t=n[m]("viewportHeight");if(!n.isWindow(e.element)){t=e.$element.height()}return t-n(this).outerHeight()}}this.$element=t;this.element=t[0];this.axis=r.horizontal?"horizontal":"vertical";this.callback=r.handler;this.context=e;this.enabled=r.enabled;this.id="waypoints"+v++;this.offset=null;this.options=r;e.waypoints[this.axis][this.id]=this;s[this.axis][this.id]=this;i=(o=t.data(w))!=null?o:[];i.push(this.id);t.data(w,i)}t.prototype.trigger=function(t){if(!this.enabled){return}if(this.callback!=null){this.callback.apply(this.element,t)}if(this.options.triggerOnce){return this.destroy()}};t.prototype.disable=function(){return this.enabled=false};t.prototype.enable=function(){this.context.refresh();return this.enabled=true};t.prototype.destroy=function(){delete s[this.axis][this.id];delete this.context.waypoints[this.axis][this.id];return this.context.checkEmpty()};t.getWaypointsByElement=function(t){var e,r;r=n(t).data(w);if(!r){return[]}e=n.extend({},s.horizontal,s.vertical);return n.map(r,function(t){return e[t]})};return t}();d={init:function(t,e){var r;if(e==null){e={}}if((r=e.handler)==null){e.handler=t}this.each(function(){var t,r,i,s;t=n(this);i=(s=e.context)!=null?s:n.fn[g].defaults.context;if(!n.isWindow(i)){i=t.closest(i)}i=n(i);r=a[i.data(u)];if(!r){r=new o(i)}return new l(t,r,e)});n[m]("refresh");return this},disable:function(){return d._invoke(this,"disable")},enable:function(){return d._invoke(this,"enable")},destroy:function(){return d._invoke(this,"destroy")},prev:function(t,e){return d._traverse.call(this,t,e,function(t,e,n){if(e>0){return t.push(n[e-1])}})},next:function(t,e){return d._traverse.call(this,t,e,function(t,e,n){if(et.oldScroll.y})},left:function(t){if(t==null){t=r}return h._filter(t,"horizontal",function(t,e){return e.offset<=t.oldScroll.x})},right:function(t){if(t==null){t=r}return h._filter(t,"horizontal",function(t,e){return e.offset>t.oldScroll.x})},enable:function(){return h._invoke("enable")},disable:function(){return h._invoke("disable")},destroy:function(){return h._invoke("destroy")},extendFn:function(t,e){return d[t]=e},_invoke:function(t){var e;e=n.extend({},s.vertical,s.horizontal);return n.each(e,function(e,n){n[t]();return true})},_filter:function(t,e,r){var i,o;i=a[n(t).data(u)];if(!i){return[]}o=[];n.each(i.waypoints[e],function(t,e){if(r(i,e)){return o.push(e)}});o.sort(function(t,e){return t.offset-e.offset});return n.map(o,function(t){return t.element})}};n[m]=function(){var t,n;n=arguments[0],t=2<=arguments.length?e.call(arguments,1):[];if(h[n]){return h[n].apply(null,t)}else{return h.aggregate.call(null,n)}};n[m].settings={resizeThrottle:100,scrollThrottle:30};return i.load(function(){return n[m]("refresh")})})}).call(this);
10 |
--------------------------------------------------------------------------------
/inc/elementor-widgets/widgets/gallery-section.php:
--------------------------------------------------------------------------------
1 | start_controls_section(
48 | 'gallery_content',
49 | [
50 | 'label' => __( 'Galleries content', 'fitfloss-companion' ),
51 | ]
52 | );
53 | $this->add_control(
54 | 'fitflossgalleries', [
55 | 'label' => __( 'Create New', 'fitfloss-companion' ),
56 | 'type' => Controls_Manager::REPEATER,
57 | 'title_field' => '{{{ item_title }}}',
58 | 'fields' => [
59 | [
60 | 'name' => 'gallery_img',
61 | 'label' => __( 'Gallery Image', 'fitfloss-companion' ),
62 | 'label_block' => true,
63 | 'type' => Controls_Manager::MEDIA,
64 | ],
65 | [
66 | 'name' => 'item_title',
67 | 'label' => __( 'Gallery Title', 'fitfloss-companion' ),
68 | 'label_block' => true,
69 | 'type' => Controls_Manager::TEXT,
70 | 'default' => __( '1', 'fitfloss-companion' ),
71 | ],
72 | ],
73 | 'default' => [
74 | [
75 | 'gallery_img' => [
76 | 'url' => Utils::get_placeholder_image_src(),
77 | ],
78 | 'item_title' => __( '1', 'fitfloss-companion' ),
79 | ],
80 | [
81 | 'gallery_img' => [
82 | 'url' => Utils::get_placeholder_image_src(),
83 | ],
84 | 'item_title' => __( '2', 'fitfloss-companion' ),
85 | ],
86 | [
87 | 'gallery_img' => [
88 | 'url' => Utils::get_placeholder_image_src(),
89 | ],
90 | 'item_title' => __( '3', 'fitfloss-companion' ),
91 | ],
92 | [
93 | 'gallery_img' => [
94 | 'url' => Utils::get_placeholder_image_src(),
95 | ],
96 | 'item_title' => __( '4', 'fitfloss-companion' ),
97 | ],
98 | [
99 | 'gallery_img' => [
100 | 'url' => Utils::get_placeholder_image_src(),
101 | ],
102 | 'item_title' => __( '5', 'fitfloss-companion' ),
103 | ],
104 | [
105 | 'gallery_img' => [
106 | 'url' => Utils::get_placeholder_image_src(),
107 | ],
108 | 'item_title' => __( '6', 'fitfloss-companion' ),
109 | ],
110 | ]
111 | ]
112 | );
113 |
114 | $this->add_control(
115 | 'btn_text',
116 | [
117 | 'label' => esc_html__( 'Button Title', 'fitfloss-companion' ),
118 | 'type' => Controls_Manager::TEXT,
119 | 'label_block' => true,
120 | 'default' => esc_html__( 'Load More Images', 'fitfloss-companion' )
121 | ]
122 | );
123 | $this->add_control(
124 | 'btn_url',
125 | [
126 | 'label' => esc_html__( 'Button URL', 'fitfloss-companion' ),
127 | 'type' => Controls_Manager::URL,
128 | 'label_block' => true,
129 | 'default' => [
130 | 'url' => '#'
131 | ]
132 | ]
133 | );
134 | $this->end_controls_section(); // End Gallery content
135 |
136 | /**
137 | * Style Tab
138 | * ------------------------------ Style Gallery Section ------------------------------
139 | *
140 | */
141 |
142 | $this->start_controls_section(
143 | 'style_gallery_section', [
144 | 'label' => __( 'Style Gallery Section', 'fitfloss-companion' ),
145 | 'tab' => Controls_Manager::TAB_STYLE,
146 | ]
147 | );
148 | $this->add_control(
149 | 'btn_col', [
150 | 'label' => __( 'Button Color', 'fitfloss-companion' ),
151 | 'type' => Controls_Manager::COLOR,
152 | 'selectors' => [
153 | '{{WRAPPER}} .gallery_part .btn_2' => 'color: {{VALUE}}; border-color: {{VALUE}};',
154 | ],
155 | ]
156 | );
157 | $this->add_control(
158 | 'btn_hvr_col', [
159 | 'label' => __( 'Button Hover Color', 'fitfloss-companion' ),
160 | 'type' => Controls_Manager::COLOR,
161 | 'selectors' => [
162 | '{{WRAPPER}} .gallery_part .btn_2:hover' => 'color: {{VALUE}};',
163 | ],
164 | ]
165 | );
166 | $this->add_control(
167 | 'btn_hvr_bg_col', [
168 | 'label' => __( 'Button Hover Bg Color', 'fitfloss-companion' ),
169 | 'type' => Controls_Manager::COLOR,
170 | 'selectors' => [
171 | '{{WRAPPER}} .gallery_part .btn_2:hover' => 'border-color: {{VALUE}}; background: {{VALUE}}',
172 | ],
173 | ]
174 | );
175 | $this->end_controls_section();
176 |
177 | }
178 |
179 | protected function render() {
180 | $settings = $this->get_settings();
181 | $fitflossgalleries = !empty( $settings['fitflossgalleries'] ) ? $settings['fitflossgalleries'] : '';
182 | $btn_text = !empty( $settings['btn_text'] ) ? $settings['btn_text'] : '';
183 | $btn_url = !empty( $settings['btn_url']['url'] ) ? $settings['btn_url']['url'] : '';
184 | ?>
185 |
186 |
187 |
188 |
189 |
190 | 0 ) {
192 | foreach( $fitflossgalleries as $gallery ) {
193 | $gallery_img = !empty( $gallery['gallery_img']['id'] ) ? wp_get_attachment_image_src( $gallery['gallery_img']['id'], 'fitfloss_gallery_thumb_360x420' )[0] : '';
194 | $item_title = !empty( $gallery['item_title'] ) ? $gallery['item_title'] : '';
195 | ?>
196 |
201 |
205 |
208 |
209 |
210 |
211 |
212 | esc_html__( 'Add footer about content', 'fitfloss-companion' ), )
34 | );
35 |
36 | }
37 |
38 | // This is where the action happens
39 | public function widget( $args, $instance ) {
40 |
41 | $title = apply_filters( 'widget_title', $instance['title'] );
42 | $image = apply_filters( 'widget_image', $instance['image'] );
43 | $textarea = apply_filters( 'widget_textarea', $instance['textarea'] );
44 |
45 | // before and after widget arguments are defined by themes
46 | echo wp_kses_post( $args['before_widget'] );
47 | if ( ! empty( $title ) )
48 | echo wp_kses_post( $args['before_title'] . $title . $args['after_title'] );
49 |
50 |
51 | ?>
52 |
70 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 | :
112 |
128 |
129 |
162 |
230 | start_controls_section(
49 | 'contact_info',
50 | [
51 | 'label' => __( 'Contact Info', 'fitfloss-companion' ),
52 | ]
53 | );
54 |
55 | $this->add_control(
56 | 'info', [
57 | 'label' => __( 'Create Contact Info', 'fitfloss-companion' ),
58 | 'type' => Controls_Manager::REPEATER,
59 | 'title_field' => '{{{ label }}}',
60 | 'fields' => [
61 | [
62 | 'name' => 'label',
63 | 'label' => __( 'Contact Info', 'fitfloss-companion' ),
64 | 'label_block' => true,
65 | 'type' => Controls_Manager::TEXT,
66 | 'default' => esc_html__( 'Dhaka, Bangladesh', 'fitfloss-companion' )
67 | ],
68 | [
69 | 'name' => 'desc',
70 | 'label' => __( 'Contact Descriptions', 'fitfloss-companion' ),
71 | 'type' => Controls_Manager::TEXTAREA,
72 | 'default' => esc_html__( 'Write something...', 'fitfloss-companion' )
73 | ],
74 | [
75 | 'name' => 'icon',
76 | 'label' => __( 'Icon', 'fitfloss-companion' ),
77 | 'type' => Controls_Manager::ICON,
78 | ]
79 |
80 | ],
81 | 'default' => [
82 | [
83 | 'label' => esc_html__( 'Buttonwood, California.', 'fitfloss-companion' ),
84 | 'desc' => esc_html__( 'Rosemead, CA 91770', 'fitfloss-companion' ),
85 | 'icon' => 'fa fa-home',
86 | ],
87 | [
88 | 'label' => esc_html__( '00 (440) 9865 562', 'fitfloss-companion' ),
89 | 'desc' => esc_html__( 'Mon to Fri 9am to 6pm', 'fitfloss-companion' ),
90 | 'icon' => 'fa fa-tablet',
91 | ],
92 | [
93 | 'label' => esc_html__( 'support@colorlib.com', 'fitfloss-companion' ),
94 | 'desc' => esc_html__( 'Send us your query anytime!', 'fitfloss-companion' ),
95 | 'icon' => 'fa fa-envelope-o',
96 | ],
97 | ]
98 | ]
99 | );
100 |
101 | $this->end_controls_section(); // End Contact Info
102 |
103 | // ---------------------------------------- Contact Form ------------------------------
104 | $this->start_controls_section(
105 | 'contact_form',
106 | [
107 | 'label' => __( 'Contact Form', 'fitfloss-companion' ),
108 | ]
109 | );
110 | $this->add_control(
111 | 'contact_form_title',
112 | [
113 | 'label' => esc_html__( 'Contact Form Title', 'fitfloss-companion' ),
114 | 'type' => Controls_Manager::TEXT,
115 | 'label_block' => true,
116 | 'default' => esc_html__('Get in Touch', 'fitfloss-companion')
117 | ]
118 | );
119 | $this->add_control(
120 | 'contact_formshortcode',
121 | [
122 | 'label' => esc_html__( 'Form Shortcode', 'fitfloss-companion' ),
123 | 'type' => Controls_Manager::TEXT,
124 | 'label_block' => true
125 | ]
126 | );
127 | $this->end_controls_section(); // End Contact Form
128 |
129 |
130 | /**
131 | * Style Tab
132 | * ------------------------------ Style ------------------------------
133 | *
134 | */
135 | $this->start_controls_section(
136 | 'style_content_color', [
137 | 'label' => __( 'Style Content Color', 'fitfloss-companion' ),
138 | 'tab' => Controls_Manager::TAB_STYLE,
139 | ]
140 | );
141 |
142 | $this->add_control(
143 | 'color_title', [
144 | 'label' => __( 'Right Text Title Color', 'fitfloss-companion' ),
145 | 'type' => Controls_Manager::COLOR,
146 | 'default' => '#2a2a2a',
147 | 'selectors' => [
148 | '{{WRAPPER}} .contact-info .media-body h3' => 'color: {{VALUE}};',
149 | ],
150 | ]
151 | );
152 | $this->add_control(
153 | 'color_desc', [
154 | 'label' => __( 'Right Text Sub Title Color', 'fitfloss-companion' ),
155 | 'type' => Controls_Manager::COLOR,
156 | 'default' => '#8a8a8a',
157 | 'selectors' => [
158 | '{{WRAPPER}} .contact-info .media-body p' => 'color: {{VALUE}};',
159 | ],
160 | ]
161 | );
162 | $this->add_control(
163 | 'color_icon', [
164 | 'label' => __( 'Icon Color', 'fitfloss-companion' ),
165 | 'type' => Controls_Manager::COLOR,
166 | 'default' => '#8f9195',
167 | 'selectors' => [
168 | '{{WRAPPER}} .contact-info__icon i, .contact-info__icon span' => 'color: {{VALUE}};',
169 | ],
170 | ]
171 | );
172 |
173 | $this->end_controls_section();
174 |
175 |
176 | }
177 |
178 | protected function render() {
179 |
180 | $settings = $this->get_settings();
181 |
182 |
183 | ?>
184 |
223 |
224 |
17 |
18 |
19 |
20 |
21 | ' . esc_html( $subtitle ) . '';
25 | }
26 | // Title
27 | if ( $title ) {
28 | echo '
' . esc_html( $title ) . ' ';
29 | }
30 | ?>
31 |
32 |
33 |
34 |
35 |
66 |
67 | ';
70 | }
71 | ?>
72 |
73 |
74 | 'h4',
79 | 'text' => esc_html( $val['title'] )
80 | )
81 | );
82 | }
83 |
84 | if( !empty( $val['sub-title-url'] ) && !empty( $val['sub-title'] ) ){
85 | echo '
'.esc_html( $val['sub-title'] ).' ';
86 | }else{
87 | echo '
'.esc_html( $val['sub-title'] ).'
';
88 | }
89 | ?>
90 |
91 |
92 |
93 |
94 |
95 | $target_post_id->ID,
118 | 'post_status' => $type,
119 | );
120 |
121 | if ( $message == true ) {
122 | // Update the post/page
123 | $update_status = wp_update_post( $target_post, true );
124 | } else {
125 | // Update the post/page
126 | $update_status = wp_update_post( $target_post, false );
127 | }
128 |
129 | return $update_status;
130 | }
131 |
132 |
133 |
134 | // Course - Custom Post Type
135 | function fitfloss_custom_posts() {
136 | $labels = array(
137 | 'name' => _x( 'Courses', 'post type general name', 'fitfloss-companion' ),
138 | 'singular_name' => _x( 'Course', 'post type singular name', 'fitfloss-companion' ),
139 | 'menu_name' => _x( 'Courses', 'admin menu', 'fitfloss-companion' ),
140 | 'name_admin_bar' => _x( 'Course', 'add new on admin bar', 'fitfloss-companion' ),
141 | 'add_new' => _x( 'Add New', 'course', 'fitfloss-companion' ),
142 | 'add_new_item' => __( 'Add New Course', 'fitfloss-companion' ),
143 | 'new_item' => __( 'New Course', 'fitfloss-companion' ),
144 | 'edit_item' => __( 'Edit Course', 'fitfloss-companion' ),
145 | 'view_item' => __( 'View Course', 'fitfloss-companion' ),
146 | 'all_items' => __( 'All Courses', 'fitfloss-companion' ),
147 | 'search_items' => __( 'Search Courses', 'fitfloss-companion' ),
148 | 'parent_item_colon' => __( 'Parent Courses:', 'fitfloss-companion' ),
149 | 'not_found' => __( 'No courses found.', 'fitfloss-companion' ),
150 | 'not_found_in_trash' => __( 'No courses found in Trash.', 'fitfloss-companion' )
151 | );
152 |
153 | $args = array(
154 | 'labels' => $labels,
155 | 'description' => __( 'Description.', 'fitfloss-companion' ),
156 | 'public' => true,
157 | 'publicly_queryable' => true,
158 | 'show_ui' => true,
159 | 'show_in_menu' => true,
160 | 'query_var' => true,
161 | 'rewrite' => array( 'slug' => 'course' ),
162 | 'capability_type' => 'post',
163 | 'has_archive' => true,
164 | 'hierarchical' => false,
165 | 'menu_position' => null,
166 | 'supports' => array( 'title', 'editor', 'thumbnail' )
167 | );
168 |
169 | register_post_type( 'course', $args );
170 |
171 | }
172 | add_action( 'init', 'fitfloss_custom_posts' );
173 |
174 |
175 |
176 | /*=========================================================
177 | Courses Section
178 | ========================================================*/
179 | function fitfloss_course_section( $pNumber = 3 ){
180 | $courses = new WP_Query( array(
181 | 'post_type' => 'course',
182 | 'posts_per_page'=> $pNumber,
183 |
184 | ) );
185 |
186 | if( $courses->have_posts() ) {
187 | while ( $courses->have_posts() ) {
188 | $courses->the_post();
189 | $course_img = get_the_post_thumbnail( get_the_id(), 'fitfloss_order_thumb_360x300', '', array( 'alt' => get_the_title() ) );
190 | $course_fee = ! empty( fitfloss_meta( 'course_fee') ) ? fitfloss_meta( 'course_fee') : 'N/A';
191 | ?>
192 |
193 |
194 |
199 |
200 |
201 |
202 |
203 |
204 | 'course',
218 | 'posts_per_page' => $pnumber,
219 |
220 | ) );
221 |
222 | ?>
223 |
224 |
257 | start_controls_section(
48 | 'about_content',
49 | [
50 | 'label' => __( 'About Content', 'fitfloss-companion' ),
51 | ]
52 | );
53 | $this->add_control(
54 | 'sec_title',
55 | [
56 | 'label' => esc_html__( 'Section Title', 'fitfloss-companion' ),
57 | 'type' => Controls_Manager::TEXT,
58 | 'label_block' => true,
59 | 'default' => esc_html__( 'We are Fitfloss. A Dedicated Fitness Center Since 2004', 'fitfloss-companion' ),
60 | ]
61 | );
62 | $this->add_control(
63 | 'sec_text',
64 | [
65 | 'label' => esc_html__( 'About Text', 'fitfloss-companion' ),
66 | 'type' => Controls_Manager::TEXTAREA,
67 | 'label_block' => true,
68 | 'default' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.
',
69 | ]
70 | );
71 | $this->add_control(
72 | 'btn_text',
73 | [
74 | 'label' => esc_html__( 'Button Text', 'fitfloss-companion' ),
75 | 'type' => Controls_Manager::TEXT,
76 | 'label_block' => true,
77 | 'default' => esc_html__( 'Browse Services', 'fitfloss-companion' ),
78 | ]
79 | );
80 | $this->add_control(
81 | 'btn_url',
82 | [
83 | 'label' => esc_html__( 'Button URL', 'fitfloss-companion' ),
84 | 'type' => Controls_Manager::URL,
85 | 'label_block' => true,
86 | 'default' => [
87 | 'url' => '#'
88 | ],
89 | ]
90 | );
91 |
92 | $this->add_control(
93 | 'right_section_seperator',
94 | [
95 | 'label' => esc_html__( 'Right Section', 'fitfloss-companion' ),
96 | 'type' => Controls_Manager::HEADING,
97 | 'separator' => 'after'
98 | ]
99 | );
100 | $this->add_control(
101 | 'section_img',
102 | [
103 | 'label' => esc_html__( 'Section Image', 'fitfloss-companion' ),
104 | 'type' => Controls_Manager::MEDIA,
105 | 'label_block' => true,
106 | 'default' => [
107 | 'url' => Utils::get_placeholder_image_src(),
108 | ]
109 | ]
110 | );
111 |
112 | $this->end_controls_section(); // End about us content
113 |
114 | //------------------------------ Style title ------------------------------
115 |
116 | // Top Section Styles
117 | $this->start_controls_section(
118 | 'left_sec_style', [
119 | 'label' => __( 'About Section Styles', 'fitfloss-companion' ),
120 | 'tab' => Controls_Manager::TAB_STYLE,
121 | ]
122 | );
123 |
124 | $this->add_control(
125 | 'big_title_col', [
126 | 'label' => __( 'Big Title Color', 'fitfloss-companion' ),
127 | 'type' => Controls_Manager::COLOR,
128 | 'selectors' => [
129 | '{{WRAPPER}} .about_part .about_text h2' => 'color: {{VALUE}};',
130 | ],
131 | ]
132 | );
133 |
134 | $this->add_control(
135 | 'sec_txt_col', [
136 | 'label' => __( 'Text Color', 'fitfloss-companion' ),
137 | 'type' => Controls_Manager::COLOR,
138 | 'selectors' => [
139 | '{{WRAPPER}} .about_part .about_text p' => 'color: {{VALUE}};',
140 | ],
141 | ]
142 | );
143 |
144 | $this->add_control(
145 | 'btn_bg_col', [
146 | 'label' => __( 'Button Bg Color', 'fitfloss-companion' ),
147 | 'type' => Controls_Manager::COLOR,
148 | 'selectors' => [
149 | '{{WRAPPER}} .about_part .about_text .btn_1' => 'background-color: {{VALUE}};',
150 | ],
151 | ]
152 | );
153 | $this->add_control(
154 | 'btn_txt_col', [
155 | 'label' => __( 'Button Text Color', 'fitfloss-companion' ),
156 | 'type' => Controls_Manager::COLOR,
157 | 'selectors' => [
158 | '{{WRAPPER}} .about_part .about_text .btn_1' => 'color: {{VALUE}};',
159 | ],
160 | ]
161 | );
162 | $this->add_control(
163 | 'btn_hvr_styles_seperator',
164 | [
165 | 'label' => esc_html__( 'Button Hover Styles', 'fitfloss-companion' ),
166 | 'type' => Controls_Manager::HEADING,
167 | 'separator' => 'after'
168 | ]
169 | );
170 | $this->add_control(
171 | 'btn_hvr_bg_col', [
172 | 'label' => __( 'Button Hover Bg Color', 'fitfloss-companion' ),
173 | 'type' => Controls_Manager::COLOR,
174 | 'selectors' => [
175 | '{{WRAPPER}} .about_part .about_text .btn_1:hover' => 'background-color: {{VALUE}};',
176 | ],
177 | ]
178 | );
179 | $this->add_control(
180 | 'btn_hvr_txt_col', [
181 | 'label' => __( 'Button Hover Text Color', 'fitfloss-companion' ),
182 | 'type' => Controls_Manager::COLOR,
183 | 'selectors' => [
184 | '{{WRAPPER}} .about_part .about_text .btn_1:hover' => 'color: {{VALUE}} !important;',
185 | ],
186 | ]
187 | );
188 |
189 | $this->end_controls_section();
190 |
191 | }
192 |
193 | public function fitfloss_get_about_text_section( $sec_title, $about_text, $btn_text, $btn_url ) {
194 | ?>
195 |
202 |
207 |
216 | get_settings();
221 | $sec_title = !empty( $settings['sec_title'] ) ? $settings['sec_title'] : '';
222 | $about_text = !empty( $settings['sec_text'] ) ? $settings['sec_text'] : '';
223 | $btn_text = !empty( $settings['btn_text'] ) ? $settings['btn_text'] : '';
224 | $btn_url = !empty( $settings['btn_url']['url'] ) ? $settings['btn_url']['url'] : '';
225 | $section_img = !empty( $settings['section_img']['id'] ) ? wp_get_attachment_image( $settings['section_img']['id'], 'fitfloss_schedule_about_thumb_780x946', '', array( 'alt' => 'about image' ) ) : '';
226 | $dynamic_class = is_front_page() ? 'about_part padding_bottom overflow-hidden' : 'about_part padding_top overflow-hidden';
227 | ?>
228 |
229 |
230 |
231 |
232 |
233 | fitfloss_get_about_text_section( $sec_title, $about_text, $btn_text, $btn_url );
235 | $this->fitfloss_get_about_img_section( $section_img );
236 | ?>
237 |
238 |
239 |
240 |
241 | start_controls_section(
48 | 'feature_content',
49 | [
50 | 'label' => __( 'Features content', 'fitfloss-companion' ),
51 | ]
52 | );
53 | $this->add_control(
54 | 'sec_title',
55 | [
56 | 'label' => esc_html__( 'Section Title', 'fitfloss-companion' ),
57 | 'type' => Controls_Manager::TEXT,
58 | 'label_block' => true,
59 | 'default' => esc_html__( 'Why You Should Choose Us', 'fitfloss-companion' )
60 | ]
61 | );
62 |
63 | $this->add_control(
64 | 'sub_title',
65 | [
66 | 'label' => esc_html__( 'Sub Title', 'fitfloss-companion' ),
67 | 'type' => Controls_Manager::TEXTAREA,
68 | 'label_block' => true,
69 | 'default' => 'As you pour the first glass of your favorite Chianti or Chardonnay and settle into an intimate Friday evening.',
70 | ]
71 | );
72 |
73 | $this->add_control(
74 | 'feature_inner_settings_seperator',
75 | [
76 | 'label' => esc_html__( 'Feature Items', 'fitfloss-companion' ),
77 | 'type' => Controls_Manager::HEADING,
78 | 'separator' => 'after'
79 | ]
80 | );
81 |
82 | $this->add_control(
83 | 'fitflossfeatures', [
84 | 'label' => __( 'Create New', 'fitfloss-companion' ),
85 | 'type' => Controls_Manager::REPEATER,
86 | 'title_field' => '{{{ feature_title }}}',
87 | 'fields' => [
88 | [
89 | 'name' => 'feature_icon',
90 | 'label' => __( 'Feature Icon Image', 'fitfloss-companion' ),
91 | 'label_block' => true,
92 | 'type' => Controls_Manager::MEDIA
93 | ],
94 | [
95 | 'name' => 'feature_title',
96 | 'label' => __( 'Feature Title', 'fitfloss-companion' ),
97 | 'label_block' => true,
98 | 'type' => Controls_Manager::TEXT,
99 | 'default' => __( 'Quality Training', 'fitfloss-companion' ),
100 | ],
101 | [
102 | 'name' => 'feature_text',
103 | 'label' => __( 'Feature Text', 'fitfloss-companion' ),
104 | 'label_block' => true,
105 | 'type' => Controls_Manager::TEXTAREA,
106 | 'default' => __( 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam.', 'fitfloss-companion' ),
107 | ],
108 | ],
109 | 'default' => [
110 | [
111 | 'feature_icon' => [
112 | 'url' => Utils::get_placeholder_image_src(),
113 | ],
114 | 'feature_title' => __( 'Quality Training', 'fitfloss-companion' ),
115 | 'feature_text' => __( 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam.', 'fitfloss-companion' ),
116 | ],
117 | [
118 | 'feature_icon' => [
119 | 'url' => Utils::get_placeholder_image_src(),
120 | ],
121 | 'feature_title' => __( 'Flexible Timeframe', 'fitfloss-companion' ),
122 | 'feature_text' => __( 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam.', 'fitfloss-companion' ),
123 | ],
124 | [
125 | 'feature_icon' => [
126 | 'url' => Utils::get_placeholder_image_src(),
127 | ],
128 | 'feature_title' => __( 'Qualified Trainers', 'fitfloss-companion' ),
129 | 'feature_text' => __( 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam.', 'fitfloss-companion' ),
130 | ],
131 | [
132 | 'feature_icon' => [
133 | 'url' => Utils::get_placeholder_image_src(),
134 | ],
135 | 'feature_title' => __( 'Affordable Price', 'fitfloss-companion' ),
136 | 'feature_text' => __( 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam.', 'fitfloss-companion' ),
137 | ],
138 | ]
139 | ]
140 | );
141 | $this->end_controls_section(); // End service content
142 |
143 | /**
144 | * Style Tab
145 | * ------------------------------ Style Section Heading ------------------------------
146 | *
147 | */
148 |
149 | $this->start_controls_section(
150 | 'style_room_section', [
151 | 'label' => __( 'Style Service Section', 'fitfloss-companion' ),
152 | 'tab' => Controls_Manager::TAB_STYLE,
153 | ]
154 | );
155 | $this->add_control(
156 | 'big_title_col', [
157 | 'label' => __( 'Big Title Color', 'fitfloss-companion' ),
158 | 'type' => Controls_Manager::COLOR,
159 | 'selectors' => [
160 | '{{WRAPPER}} .our_feature .section_tittle h2' => 'color: {{VALUE}};',
161 | ],
162 | ]
163 | );
164 | $this->add_control(
165 | 'sub_title_col', [
166 | 'label' => __( 'Sub Title Color', 'fitfloss-companion' ),
167 | 'type' => Controls_Manager::COLOR,
168 | 'selectors' => [
169 | '{{WRAPPER}} .our_feature .section_tittle p' => 'color: {{VALUE}};',
170 | ],
171 | ]
172 | );
173 | $this->end_controls_section();
174 |
175 | }
176 |
177 | protected function render() {
178 | $settings = $this->get_settings();
179 | $sec_title = !empty( $settings['sec_title'] ) ? $settings['sec_title'] : '';
180 | $sub_title = !empty( $settings['sub_title'] ) ? $settings['sub_title'] : '';
181 | $fitflossfeatures = !empty( $settings['fitflossfeatures'] ) ? $settings['fitflossfeatures'] : '';
182 | $dynamic_class = is_front_page() ? 'service_part section_padding services_bg' : 'service_part section_padding';
183 | ?>
184 |
185 |
186 |
187 |
188 |
196 |
197 | 0 ) {
199 | foreach( $fitflossfeatures as $feature ) {
200 | $feature_icon = ( !empty( $feature['feature_icon']['id'] ) ) ? wp_get_attachment_image( $feature['feature_icon']['id'], 'fitfloss_np_thumb' ) : '';
201 | $feature_title = ( !empty( $feature['feature_title'] ) ) ? $feature['feature_title'] : '';
202 | $feature_text = ( !empty( $feature['feature_text'] ) ) ? $feature['feature_text'] : '';
203 | ?>
204 |
215 |
219 |
220 |
221 |
222 |
223 | \
189 |
\
190 | \
191 |
');
192 |
193 | self.$node.append($YTPlayerString);
194 | self.$YTPlayerString = $YTPlayerString;
195 | $YTPlayerString = null;
196 | },
197 |
198 | /**
199 | * @function createBackgroundVideo
200 | * Adds HTML for video background
201 | */
202 | createBackgroundVideo: function createBackgroundVideo() {
203 | /*jshint multistr: true */
204 | var self = this,
205 | $YTPlayerString = $('\
208 |
');
209 |
210 | self.$node.append($YTPlayerString);
211 | self.$YTPlayerString = $YTPlayerString;
212 | $YTPlayerString = null;
213 | },
214 |
215 | /**
216 | * @function resize
217 | * Resize event to change video size
218 | */
219 | resize: function resize(self) {
220 | //var self = this;
221 | var container = $(window);
222 |
223 | if (!self.options.fitToBackground) {
224 | container = self.$node;
225 | }
226 |
227 | var width = container.width(),
228 | pWidth, // player width, to be defined
229 | height = container.height(),
230 | pHeight, // player height, tbd
231 | $YTPlayerPlayer = $('#' + self.holderID);
232 |
233 | // when screen aspect ratio differs from video, video must center and underlay one dimension
234 | if (width / self.options.ratio < height) {
235 | pWidth = Math.ceil(height * self.options.ratio); // get new player width
236 | $YTPlayerPlayer.width(pWidth).height(height).css({
237 | left: (width - pWidth) / 2,
238 | top: 0
239 | }); // player width is greater, offset left; reset top
240 | } else { // new video width < window width (gap to right)
241 | pHeight = Math.ceil(width / self.options.ratio); // get new player height
242 | $YTPlayerPlayer.width(width).height(pHeight).css({
243 | left: 0,
244 | top: (height - pHeight) / 2
245 | }); // player height is greater, offset top; reset left
246 | }
247 |
248 | $YTPlayerPlayer = null;
249 | container = null;
250 | },
251 |
252 | /**
253 | * @function onYouTubeIframeAPIReady
254 | * @ params {object} YTPlayer object for access to options
255 | * Youtube API calls this function when the player is ready.
256 | */
257 | onYouTubeIframeAPIReady: function onYouTubeIframeAPIReady() {
258 | var self = this;
259 | self.player = new window.YT.Player(self.holderID, self.options);
260 | },
261 |
262 | /**
263 | * @function onPlayerReady
264 | * @ params {event} window event from youtube player
265 | */
266 | onPlayerReady: function onPlayerReady(e) {
267 | if (this.options.mute) {
268 | e.target.mute();
269 | }
270 | e.target.playVideo();
271 | },
272 |
273 | /**
274 | * @function getPlayer
275 | * returns youtube player
276 | */
277 | getPlayer: function getPlayer() {
278 | return this.player;
279 | },
280 |
281 | /**
282 | * @function destroy
283 | * destroys all!
284 | */
285 | destroy: function destroy() {
286 | var self = this;
287 |
288 | self.$node
289 | .removeData('yt-init')
290 | .removeData('ytPlayer')
291 | .removeClass('loaded');
292 |
293 | self.$YTPlayerString.remove();
294 |
295 | $(window).off('resize.YTplayer' + self.ID);
296 | $(window).off('scroll.YTplayer' + self.ID);
297 | self.$body = null;
298 | self.$node = null;
299 | self.$YTPlayerString = null;
300 | self.player.destroy();
301 | self.player = null;
302 | }
303 | };
304 |
305 | // Scroll Stopped event.
306 | $.fn.scrollStopped = function(callback) {
307 | var $this = $(this), self = this;
308 | $this.scroll(function(){
309 | if ($this.data('scrollTimeout')) {
310 | clearTimeout($this.data('scrollTimeout'));
311 | }
312 | $this.data('scrollTimeout', setTimeout(callback,250,self));
313 | });
314 | };
315 |
316 | // Create plugin
317 | $.fn.YTPlayer = function(options) {
318 |
319 | return this.each(function() {
320 | var el = this;
321 |
322 | $(el).data("yt-init", true);
323 | var player = Object.create(YTPlayer);
324 | player.init(el, options);
325 | $.data(el, "ytPlayer", player);
326 | });
327 | };
328 |
329 | })(jQuery, window, document);
--------------------------------------------------------------------------------
/inc/elementor-widgets/widgets/services.php:
--------------------------------------------------------------------------------
1 | start_controls_section(
48 | 'service_content',
49 | [
50 | 'label' => __( 'Services content', 'fitfloss-companion' ),
51 | ]
52 | );
53 | $this->add_control(
54 | 'sec_title',
55 | [
56 | 'label' => esc_html__( 'Section Title', 'fitfloss-companion' ),
57 | 'type' => Controls_Manager::TEXT,
58 | 'label_block' => true,
59 | 'default' => esc_html__( 'Our Services', 'fitfloss-companion' )
60 | ]
61 | );
62 |
63 | $this->add_control(
64 | 'sub_title',
65 | [
66 | 'label' => esc_html__( 'Sub Title', 'fitfloss-companion' ),
67 | 'type' => Controls_Manager::TEXTAREA,
68 | 'label_block' => true,
69 | 'default' => 'inappropriate behavior is often laughed off as “boys will be boys,” women face higher conduct standards especially in the workplace. That’s why it’s crucial that, as women.',
70 | ]
71 | );
72 |
73 | $this->add_control(
74 | 'service_inner_settings_seperator',
75 | [
76 | 'label' => esc_html__( 'Service Items', 'fitfloss-companion' ),
77 | 'type' => Controls_Manager::HEADING,
78 | 'separator' => 'after'
79 | ]
80 | );
81 |
82 | $this->add_control(
83 | 'fitflossservices', [
84 | 'label' => __( 'Create New', 'fitfloss-companion' ),
85 | 'type' => Controls_Manager::REPEATER,
86 | 'title_field' => '{{{ service_title }}}',
87 | 'fields' => [
88 | [
89 | 'name' => 'service_icon',
90 | 'label' => __( 'Service Icon', 'fitfloss-companion' ),
91 | 'label_block' => true,
92 | 'default' => 'fa fa-gift',
93 | 'type' => Controls_Manager::ICON,
94 | 'options' => fitfloss_themify_icon()
95 | ],
96 | [
97 | 'name' => 'service_title',
98 | 'label' => __( 'Service Title', 'fitfloss-companion' ),
99 | 'label_block' => true,
100 | 'type' => Controls_Manager::TEXT,
101 | 'default' => __( 'Birthday Catering', 'fitfloss-companion' ),
102 | ],
103 | [
104 | 'name' => 'service_text',
105 | 'label' => __( 'Service Text', 'fitfloss-companion' ),
106 | 'label_block' => true,
107 | 'type' => Controls_Manager::TEXTAREA,
108 | 'default' => __( 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', 'fitfloss-companion' ),
109 | ],
110 | ],
111 | 'default' => [
112 | [
113 | 'service_icon' => 'fa fa-gift',
114 | 'service_title' => __( 'Birthday Catering', 'fitfloss-companion' ),
115 | 'service_text' => __( 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', 'fitfloss-companion' ),
116 | ],
117 | [
118 | 'service_icon' => 'fa fa-gift',
119 | 'service_title' => __( 'Wedding Service', 'fitfloss-companion' ),
120 | 'service_text' => __( 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', 'fitfloss-companion' ),
121 | ],
122 | [
123 | 'service_icon' => 'fa fa-gift',
124 | 'service_title' => __( 'Party Catering', 'fitfloss-companion' ),
125 | 'service_text' => __( 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', 'fitfloss-companion' ),
126 | ],
127 | [
128 | 'service_icon' => 'fa fa-gift',
129 | 'service_title' => __( 'Event Catering', 'fitfloss-companion' ),
130 | 'service_text' => __( 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', 'fitfloss-companion' ),
131 | ],
132 | [
133 | 'service_icon' => 'fa fa-gift',
134 | 'service_title' => __( 'Corporate Service', 'fitfloss-companion' ),
135 | 'service_text' => __( 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', 'fitfloss-companion' ),
136 | ],
137 | [
138 | 'service_icon' => 'fa fa-gift',
139 | 'service_title' => __( 'Catering On Demand', 'fitfloss-companion' ),
140 | 'service_text' => __( 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', 'fitfloss-companion' ),
141 | ],
142 | ]
143 | ]
144 | );
145 | $this->end_controls_section(); // End service content
146 |
147 | /**
148 | * Style Tab
149 | * ------------------------------ Style Section Heading ------------------------------
150 | *
151 | */
152 |
153 | $this->start_controls_section(
154 | 'style_room_section', [
155 | 'label' => __( 'Style Service Section', 'fitfloss-companion' ),
156 | 'tab' => Controls_Manager::TAB_STYLE,
157 | ]
158 | );
159 | $this->add_control(
160 | 'big_title_col', [
161 | 'label' => __( 'Big Title Color', 'fitfloss-companion' ),
162 | 'type' => Controls_Manager::COLOR,
163 | 'selectors' => [
164 | '{{WRAPPER}} .service_area .section_title h3' => 'color: {{VALUE}};',
165 | ],
166 | ]
167 | );
168 | $this->add_control(
169 | 'sub_title_col', [
170 | 'label' => __( 'Sub Title Color', 'fitfloss-companion' ),
171 | 'type' => Controls_Manager::COLOR,
172 | 'selectors' => [
173 | '{{WRAPPER}} .service_area .section_title p' => 'color: {{VALUE}};',
174 | ],
175 | ]
176 | );
177 | $this->end_controls_section();
178 |
179 | //------------------------------ Services Item Style ------------------------------
180 | $this->start_controls_section(
181 | 'style_serv_items_sec', [
182 | 'label' => __( 'Style Single Item', 'fitfloss-companion' ),
183 | 'tab' => Controls_Manager::TAB_STYLE,
184 | ]
185 | );
186 | $this->add_control(
187 | 'item_icon_color', [
188 | 'label' => __( 'Icon Color', 'fitfloss-companion' ),
189 | 'type' => Controls_Manager::COLOR,
190 | 'selectors' => [
191 | '{{WRAPPER}} .service_area .single_service .service_icon i' => 'color: {{VALUE}};',
192 | ],
193 | ]
194 | );
195 | $this->add_control(
196 | 'item_title_color', [
197 | 'label' => __( 'Title Color', 'fitfloss-companion' ),
198 | 'type' => Controls_Manager::COLOR,
199 | 'selectors' => [
200 | '{{WRAPPER}} .service_area .single_service h4' => 'color: {{VALUE}};',
201 | ],
202 | ]
203 | );
204 | $this->add_control(
205 | 'item_text_color', [
206 | 'label' => __( 'Text Color', 'fitfloss-companion' ),
207 | 'type' => Controls_Manager::COLOR,
208 | 'selectors' => [
209 | '{{WRAPPER}} .service_area .single_service p' => 'color: {{VALUE}};',
210 | ],
211 | ]
212 | );
213 | $this->add_control(
214 | 'hvr_styles_seperator',
215 | [
216 | 'label' => esc_html__( 'Hover Styles', 'fitfloss-companion' ),
217 | 'type' => Controls_Manager::HEADING,
218 | 'separator' => 'after'
219 | ]
220 | );
221 | $this->add_control(
222 | 'item_hvr_bg_col', [
223 | 'label' => __( 'Item Hover Bg Color', 'fitfloss-companion' ),
224 | 'type' => Controls_Manager::COLOR,
225 | 'selectors' => [
226 | '{{WRAPPER}} .service_area .single_service:hover' => 'background-color: {{VALUE}};',
227 | ],
228 | ]
229 | );
230 | $this->add_control(
231 | 'item_hvr_text_col', [
232 | 'label' => __( 'Item Hover Text Color', 'fitfloss-companion' ),
233 | 'type' => Controls_Manager::COLOR,
234 | 'selectors' => [
235 | '{{WRAPPER}} .service_area .single_service:hover .service_icon i' => 'color: {{VALUE}};',
236 | '{{WRAPPER}} .service_area .single_service:hover h4' => 'color: {{VALUE}};',
237 | '{{WRAPPER}} .service_area .single_service:hover p' => 'color: {{VALUE}};',
238 | ],
239 | ]
240 | );
241 | $this->end_controls_section();
242 |
243 | }
244 |
245 | protected function render() {
246 | $settings = $this->get_settings();
247 | $sec_title = !empty( $settings['sec_title'] ) ? $settings['sec_title'] : '';
248 | $sub_title = !empty( $settings['sub_title'] ) ? $settings['sub_title'] : '';
249 | $fitflossservices = !empty( $settings['fitflossservices'] ) ? $settings['fitflossservices'] : '';
250 | $dynamic_class = is_front_page() ? 'service_part section_padding services_bg' : 'service_part section_padding';
251 | ?>
252 |
253 |
254 |
255 |
256 |
257 |
265 |
266 | 0 ) {
268 | foreach( $fitflossservices as $service ) {
269 | $service_icon = ( !empty( $service['service_icon'] ) ) ? $service['service_icon'] : '';
270 | $service_title = ( !empty( $service['service_title'] ) ) ? $service['service_title'] : '';
271 | $service_text = ( !empty( $service['service_text'] ) ) ? $service['service_text'] : '';
272 | ?>
273 |
274 |
275 |
276 |
277 |
278 |
279 |
280 |
281 |
282 |
286 |
287 |
288 |
289 |
290 | esc_html__( 'Add footer contact info', 'fitfloss-companion' ), )
34 | );
35 |
36 | }
37 |
38 | // This is where the action happens
39 | public function widget( $args, $instance ) {
40 |
41 | $title = apply_filters( 'widget_contactinfo_title', $instance['title'] );
42 | $addressicon = apply_filters( 'widget_contactinfo_addressicon', $instance['addressicon'] );
43 | $address = apply_filters( 'widget_contactinfo_address', $instance['address'] );
44 | $pnumbericon = apply_filters( 'widget_contactinfo_pnumbericon', $instance['pnumbericon'] );
45 | $pnumber = apply_filters( 'widget_contactinfo_pnumber', $instance['pnumber'] );
46 | $emailicon = apply_filters( 'widget_contactinfo_emailicon', $instance['emailicon'] );
47 | $email = apply_filters( 'widget_contactinfo_email', $instance['email'] );
48 |
49 | // before and after widget arguments are defined by themes
50 | echo wp_kses_post( $args['before_widget'] );
51 | if ( ! empty( $title ) )
52 | echo wp_kses_post( $args['before_title'] . $title . $args['after_title'] );
53 |
54 |
55 | ?>
56 |
59 | ';
69 |
70 | }
71 | //
72 | if( $address ){
73 | echo fitfloss_paragraph_tag(
74 | array(
75 | 'text' => wp_kses_post( $address )
76 | )
77 | );
78 | }
79 | ?>
80 |
81 |
87 | ';
97 |
98 | }
99 | //
100 | if( $pnumber ){
101 | echo fitfloss_heading_tag(
102 | array(
103 | 'tag' => 'h2',
104 | 'text' => wp_kses_post( $pnumber )
105 | )
106 |
107 | );
108 | }
109 | ?>
110 |
111 |
116 |
117 | ';
127 |
128 | }
129 | //
130 | if( $email ){
131 | echo fitfloss_heading_tag(
132 | array(
133 | 'tag' => 'h2',
134 | 'text' => wp_kses_post( $email )
135 | )
136 | );
137 | }
138 | ?>
139 |
140 |
143 |
201 |
202 |
203 |
204 |
205 |
206 | :
207 |
223 |
224 |
225 |
226 |
227 |
228 |
229 |
230 | :
231 |
247 |
248 |
249 |
250 |
251 |
252 |
253 |
254 | :
255 |
271 |
272 |
273 |
274 |
275 |
276 |
277 |
310 |
378 | start_controls_section(
48 | 'reviews_content',
49 | [
50 | 'label' => __( 'Review Contents', 'fitfloss-companion' ),
51 | ]
52 | );
53 |
54 | $this->add_control(
55 | 'sec_title',
56 | [
57 | 'label' => esc_html__( 'Section Title', 'fitfloss-companion' ),
58 | 'type' => Controls_Manager::TEXT,
59 | 'label_block' => true,
60 | 'default' => esc_html__( 'What Customer’s Say About Us', 'fitfloss-companion' ),
61 | ]
62 | );
63 | $this->add_control(
64 | 'sub_title',
65 | [
66 | 'label' => esc_html__( 'Sub Title', 'fitfloss-companion' ),
67 | 'type' => Controls_Manager::TEXTAREA,
68 | 'label_block' => true,
69 | 'default' => 'As you pour the first glass of your favorite Chianti or Chardonnay and settle into an intimate Friday evening.',
70 | ]
71 | );
72 | $this->add_control(
73 | 'reviews_inner_settings_seperator',
74 | [
75 | 'label' => esc_html__( 'Review Items', 'fitfloss-companion' ),
76 | 'type' => Controls_Manager::HEADING,
77 | 'separator' => 'after'
78 | ]
79 | );
80 |
81 | $this->add_control(
82 | 'reviews_contents', [
83 | 'label' => __( 'Create New', 'fitfloss-companion' ),
84 | 'type' => Controls_Manager::REPEATER,
85 | 'title_field' => '{{{ reviewer_name }}}',
86 | 'fields' => [
87 | [
88 | 'name' => 'reviewr_img',
89 | 'label' => __( 'Reviewer Image', 'fitfloss-companion' ),
90 | 'label_block' => true,
91 | 'type' => Controls_Manager::MEDIA,
92 | ],
93 | [
94 | 'name' => 'reviewer_name',
95 | 'label' => __( 'Reviewer Name', 'fitfloss-companion' ),
96 | 'label_block' => true,
97 | 'type' => Controls_Manager::TEXT,
98 | 'default' => __( 'Helena Phillips', 'fitfloss-companion' ),
99 | ],
100 | [
101 | 'name' => 'reviewer_designation',
102 | 'label' => __( 'Reviewer Designation', 'fitfloss-companion' ),
103 | 'label_block' => true,
104 | 'type' => Controls_Manager::TEXT,
105 | 'default' => __( 'CEO at Google', 'fitfloss-companion' ),
106 | ],
107 | [
108 | 'name' => 'review_txt',
109 | 'label' => __( 'Review Text', 'fitfloss-companion' ),
110 | 'label_block' => true,
111 | 'type' => Controls_Manager::TEXTAREA,
112 | 'default' => __( 'Accessories Here you can find the best computer accessory for your laptop, monitor, printer, scanner, speaker, projector, hardware and more.', 'fitfloss-companion' ),
113 | ],
114 | ],
115 | 'default' => [
116 | [
117 | 'reviewr_img' => [
118 | 'url' => Utils::get_placeholder_image_src(),
119 | ],
120 | 'reviewer_name' => __( 'Helena Phillips', 'fitfloss-companion' ),
121 | 'reviewer_designation' => __( 'CEO at Google', 'fitfloss-companion' ),
122 | 'review_txt' => __( 'Accessories Here you can find the best computer accessory for your laptop, monitor, printer, scanner, speaker, projector, hardware and more.', 'fitfloss-companion' ),
123 | ],
124 | [
125 | 'reviewr_img' => [
126 | 'url' => Utils::get_placeholder_image_src(),
127 | ],
128 | 'reviewer_name' => __( 'John Doe', 'fitfloss-companion' ),
129 | 'reviewer_designation' => __( 'CEO at Apple', 'fitfloss-companion' ),
130 | 'review_txt' => __( 'Accessories Here you can find the best computer accessory for your laptop, monitor, printer, scanner, speaker, projector, hardware and more.', 'fitfloss-companion' ),
131 | ],
132 | [
133 | 'reviewr_img' => [
134 | 'url' => Utils::get_placeholder_image_src(),
135 | ],
136 | 'reviewer_name' => __( 'Helena Phillips', 'fitfloss-companion' ),
137 | 'reviewer_designation' => __( 'CEO at HTC', 'fitfloss-companion' ),
138 | 'review_txt' => __( 'Accessories Here you can find the best computer accessory for your laptop, monitor, printer, scanner, speaker, projector, hardware and more.', 'fitfloss-companion' ),
139 | ],
140 | [
141 | 'reviewr_img' => [
142 | 'url' => Utils::get_placeholder_image_src(),
143 | ],
144 | 'reviewer_name' => __( 'Jonathan Doe', 'fitfloss-companion' ),
145 | 'reviewer_designation' => __( 'CEO at Samsung', 'fitfloss-companion' ),
146 | 'review_txt' => __( 'Accessories Here you can find the best computer accessory for your laptop, monitor, printer, scanner, speaker, projector, hardware and more.', 'fitfloss-companion' ),
147 | ],
148 | [
149 | 'reviewr_img' => [
150 | 'url' => Utils::get_placeholder_image_src(),
151 | ],
152 | 'reviewer_name' => __( 'Helena Phillips', 'fitfloss-companion' ),
153 | 'reviewer_designation' => __( 'CEO at Google', 'fitfloss-companion' ),
154 | 'review_txt' => __( 'Accessories Here you can find the best computer accessory for your laptop, monitor, printer, scanner, speaker, projector, hardware and more.', 'fitfloss-companion' ),
155 | ],
156 | [
157 | 'reviewr_img' => [
158 | 'url' => Utils::get_placeholder_image_src(),
159 | ],
160 | 'reviewer_name' => __( 'Helena Phillips', 'fitfloss-companion' ),
161 | 'reviewer_designation' => __( 'CEO at Google', 'fitfloss-companion' ),
162 | 'review_txt' => __( 'Accessories Here you can find the best computer accessory for your laptop, monitor, printer, scanner, speaker, projector, hardware and more.', 'fitfloss-companion' ),
163 | ],
164 | [
165 | 'reviewr_img' => [
166 | 'url' => Utils::get_placeholder_image_src(),
167 | ],
168 | 'reviewer_name' => __( 'Helena Phillips', 'fitfloss-companion' ),
169 | 'reviewer_designation' => __( 'CEO at Google', 'fitfloss-companion' ),
170 | 'review_txt' => __( 'Accessories Here you can find the best computer accessory for your laptop, monitor, printer, scanner, speaker, projector, hardware and more.', 'fitfloss-companion' ),
171 | ],
172 | ]
173 | ]
174 | );
175 | $this->end_controls_section(); // End Hero content
176 |
177 | /**
178 | * Style Tab
179 | * ------------------------------ Style Title ------------------------------
180 | *
181 | */
182 | $this->start_controls_section(
183 | 'style_title', [
184 | 'label' => __( 'Style Review Section', 'fitfloss-companion' ),
185 | 'tab' => Controls_Manager::TAB_STYLE,
186 | ]
187 | );
188 |
189 | $this->add_control(
190 | 'rev_title_col', [
191 | 'label' => __( 'Title Color', 'fitfloss-companion' ),
192 | 'type' => Controls_Manager::COLOR,
193 | 'selectors' => [
194 | '{{WRAPPER}} .client_review .section_tittle h2' => 'color: {{VALUE}};',
195 | ],
196 | ]
197 | );
198 | $this->add_control(
199 | 'rev_txt_col', [
200 | 'label' => __( 'Sub Title Color', 'fitfloss-companion' ),
201 | 'type' => Controls_Manager::COLOR,
202 | 'selectors' => [
203 | '{{WRAPPER}} .client_review .section_tittle p' => 'color: {{VALUE}};',
204 | ],
205 | ]
206 | );
207 |
208 | $this->add_control(
209 | 'single_item_styles_seperator',
210 | [
211 | 'label' => esc_html__( 'Single Item Styles', 'fitfloss-companion' ),
212 | 'type' => Controls_Manager::HEADING,
213 | 'separator' => 'after'
214 | ]
215 | );
216 | $this->add_control(
217 | 'reviewer_name_col', [
218 | 'label' => __( 'Reviewer Name Color', 'fitfloss-companion' ),
219 | 'type' => Controls_Manager::COLOR,
220 | 'selectors' => [
221 | '{{WRAPPER}} .client_review .client_review_single h4' => 'color: {{VALUE}};',
222 | ],
223 | ]
224 | );
225 | $this->add_control(
226 | 'reviewer_desig_col', [
227 | 'label' => __( 'Reviewer Designation Color', 'fitfloss-companion' ),
228 | 'type' => Controls_Manager::COLOR,
229 | 'selectors' => [
230 | '{{WRAPPER}} .client_review .client_review_single span' => 'color: {{VALUE}};',
231 | ],
232 | ]
233 | );
234 | $this->add_control(
235 | 'review_text_col', [
236 | 'label' => __( 'Review Text Color', 'fitfloss-companion' ),
237 | 'type' => Controls_Manager::COLOR,
238 | 'selectors' => [
239 | '{{WRAPPER}} .client_review .client_review_single p' => 'color: {{VALUE}};',
240 | ],
241 | ]
242 | );
243 | $this->add_control(
244 | 'slider_active_nav_col', [
245 | 'label' => __( 'Slider Active Nav Color', 'fitfloss-companion' ),
246 | 'type' => Controls_Manager::COLOR,
247 | 'selectors' => [
248 | '{{WRAPPER}} .client_review .owl-dots .active' => 'background-color: {{VALUE}}!important;',
249 | ],
250 | ]
251 | );
252 | $this->end_controls_section();
253 |
254 | }
255 |
256 | protected function render() {
257 |
258 | // call load widget script
259 | $this->load_widget_script();
260 | $settings = $this->get_settings();
261 | $sec_title = !empty( $settings['sec_title'] ) ? $settings['sec_title'] : '';
262 | $sub_title = !empty( $settings['sub_title'] ) ? $settings['sub_title'] : '';
263 | $reviews = !empty( $settings['reviews_contents'] ) ? $settings['reviews_contents'] : '';
264 | ?>
265 |
266 |
267 |
268 |
269 |
277 |
278 |
279 |
280 | 0 ){
282 | foreach ( $reviews as $review ) {
283 | $reviewer_name = !empty( $review['reviewer_name'] ) ? $review['reviewer_name'] : '';
284 | $reviewr_img = !empty( $review['reviewr_img']['id'] ) ? wp_get_attachment_image( $review['reviewr_img']['id'], 'fitfloss_widget_post_thumb', '', array('alt' => $reviewer_name . ' image' ) ) : '';
285 | $reviewer_designation = !empty( $review['reviewer_designation'] ) ? $review['reviewer_designation'] : '';
286 | $review_txt = !empty( $review['review_txt'] ) ? $review['review_txt'] : '';
287 | ?>
288 |
289 |
294 |
295 |
296 |
297 |
298 |
302 |
303 |
304 |
305 |
306 |
307 |
308 | editor->is_edit_mode() === true ) {
314 | ?>
315 |
345 |