├── inc ├── demo-data │ ├── screen-image.jpg │ ├── css │ │ └── demo-import.css │ ├── constructo-widgets-demo.wie │ ├── constructo-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 │ │ │ ├── jquery.counterup.min.js │ │ │ ├── map-active.js │ │ │ ├── progress-loader-canvas.js │ │ │ ├── jquery.counterup.js │ │ │ ├── imagesLoaded.js │ │ │ ├── barfiller.js │ │ │ └── waypoints.js │ └── widgets │ │ ├── business-expert-item.php │ │ ├── location-wise-listings.php │ │ ├── home-contact.php │ │ ├── call-to-action.php │ │ ├── contact.php │ │ ├── home-appointment.php │ │ ├── business-expert.php │ │ ├── projects.php │ │ ├── clients.php │ │ ├── features.php │ │ ├── popular-listing-categories.php │ │ ├── facilities.php │ │ ├── single-event.php │ │ └── hero-section.php ├── constructo-metabox.php ├── sidebar-widgets │ ├── instagram.php │ ├── blog-widget.php │ ├── newsletter-widget.php │ ├── social-links.php │ └── about-widget.php ├── instagram-api.php └── functions.php ├── js ├── common.js └── loadmore-ajax.js ├── constructo-init.php ├── constructo-companion.php └── readme.txt /inc/demo-data/screen-image.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColorlibHQ/constructo-plugin/main/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/constructo-plugin/main/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/constructo-plugin/main/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/constructo-plugin/main/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 | .constructo-pt-100 { 5 | padding-top: 100px; 6 | } 7 | .constructo-pt-80 { 8 | padding-top: 80px; 9 | } 10 | .constructo-pt-70 { 11 | padding-top: 70px; 12 | } 13 | .constructo-pt-60 { 14 | padding-top: 60px; 15 | } 16 | .constructo-pt-50 { 17 | padding-top: 50px; 18 | } 19 | .constructo-pt-30 { 20 | padding-top: 30px; 21 | } 22 | .constructo-pb-100 { 23 | padding-bottom: 100px; 24 | } 25 | .constructo-pb-80 { 26 | padding-bottom: 80px; 27 | } 28 | .constructo-pb-70 { 29 | padding-bottom: 70px; 30 | } 31 | .constructo-pb-60 { 32 | padding-bottom: 60px; 33 | } 34 | .constructo-pb-50 { 35 | padding-bottom: 50px; 36 | } 37 | .constructo-pb-30 { 38 | padding-bottom: 30px; 39 | } 40 | -------------------------------------------------------------------------------- /inc/demo-data/constructo-widgets-demo.wie: -------------------------------------------------------------------------------- 1 | {"constructo-post-sidebar":{"search-2":{"title":""},"categories-3":{"title":"Category","count":1,"hierarchical":0,"dropdown":0},"constructo_blog_widget-2":{"sectiontitle":"Recent Post","postnumber":"4","style":"1"},"tag_cloud-2":{"title":"Tag Clouds","count":0,"taxonomy":"post_tag"},"constructo_instagram_photo-2":{"title":"Instagram Feeds","insta_user":"hasanfardousrubel","insta_items":"6"},"constructo_newsletter-2":{"title":"Newsletter","actionurl":"https:\/\/spondonit.us12.list-manage.com\/subscribe\/post?u=1462626880ade1ac87bd9c93a&id=92a4423d01","desc":""}},"footer-2":{"nav_menu-2":{"title":"Departments","nav_menu":16}},"footer-3":{"nav_menu-3":{"title":"Useful Links","nav_menu":17}},"footer-4":{"text-2":{"title":"Address","text":"

\r\n 200, D-block, Green lane USA
\r\n +10 367 467 8934
\r\n constructo@contact.com\r\n <\/p>","filter":true,"visual":true}}} -------------------------------------------------------------------------------- /inc/elementor-widgets/assets/js/jquery.counterup.min.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 | */(function(e){"use strict";e.fn.counterUp=function(t){var n=e.extend({time:400,delay:10},t);return this.each(function(){var t=e(this),r=n,i=function(){var e=[],n=r.time/r.delay,i=t.text(),s=/[0-9]+,[0-9]+/.test(i);i=i.replace(/,/g,"");var o=/^[0-9]+$/.test(i),u=/^[0-9]+\.[0-9]+$/.test(i),a=u?(i.split(".")[1]||[]).length:0;for(var f=n;f>=1;f--){var l=parseInt(i/n*f);u&&(l=parseFloat(i/n*f).toFixed(a));if(s)while(/(\d+)(\d{3})/.test(l.toString()))l=l.toString().replace(/(\d+)(\d{3})/,"$1,$2");e.unshift(l)}t.data("counterup-nums",e);t.text("0");var c=function(){t.text(t.data("counterup-nums").shift());if(t.data("counterup-nums").length)setTimeout(t.data("counterup-func"),r.delay);else{delete t.data("counterup-nums");t.data("counterup-nums",null);t.data("counterup-func",null)}};t.data("counterup-func",c);setTimeout(t.data("counterup-func"),r.delay)};t.waypoint(i,{offset:"100%",triggerOnce:!0})})}})(jQuery); -------------------------------------------------------------------------------- /constructo-init.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /inc/demo-data/constructo-customizer.dat: -------------------------------------------------------------------------------- 1 | a:4:{s:8:"template";s:6:"constructo";s:4:"mods";a:16:{i:0;b:0;s:18:"nav_menu_locations";a:3:{s:12:"primary-menu";i:2;s:11:"departments";i:16;s:12:"useful-links";i:17;}s:18:"custom_css_post_id";i:-1;s:11:"custom_logo";i:37;s:27:"constructo_footer_widget_toggle";b:1;s:16:"constructo_blog_meta";b:1;s:15:"constructo_like_btn";b:1;s:17:"constructo_blog_share";b:1;s:15:"footer_logo_img";i:38;s:28:"constructo_social_profile_toggle";b:1;s:22:"constructo_social_profiles";a:3:{i:0;a:4:{s:17:"social_link_title";s:9:"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;}}s:18:"constructo_footer_text";s:65:"Firmament morning sixth subdue darkness creeping gathered divide.";s:22:"constructo_header_btn_text";s:19:"Make an Appointment";s:21:"constructo_header_btn_url";s:1:"#";s:23:"constructo_header_top_email";s:15:"info@constructo.com";s:23:"constructo_header_top_phone";s:6:"160160";}s:7:"options";a:2:{s:9:"site_icon";s:2:"51";s:23:"nav_menus_created_posts";a:0:{}}s:6:"wp_css";s:0:"";} -------------------------------------------------------------------------------- /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': 'constructo_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 | $('.constructo-portfolio-load').html(data); 38 | 39 | var $container = $('.constructo-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/constructo-metabox.php: -------------------------------------------------------------------------------- 1 | 'constructo_metaboxes', 7 | 'title' => esc_html__( 'Additional Options', 'constructo-companion' ), 8 | 'post_types'=> array( 'project' ), 9 | 'priority' => 'high', 10 | 'autosave' => 'false', 11 | 'fields' => array( 12 | array( 13 | 'id' => $constructo_prefix . 'project_excerpt_txt', 14 | 'type' => 'textarea', 15 | 'name' => esc_html__( 'Project Excerpt Text', 'constructo-companion' ), 16 | ), 17 | array( 18 | 'id' => $constructo_prefix . 'project_date', 19 | 'type' => 'date', 20 | 'js_options' => array( 21 | 'dateFormat' => 'dd-M-yy', 22 | 'showButtonPanel' => false, 23 | ), 24 | 'name' => esc_html__( 'Project Date', 'constructo-companion' ), 25 | ), 26 | array( 27 | 'id' => $constructo_prefix . 'project_location', 28 | 'type' => 'text', 29 | 'name' => esc_html__( 'Project Location', 'constructo-companion' ), 30 | ), 31 | array( 32 | 'id' => $constructo_prefix . 'project_imgs', 33 | 'type' => 'image_advanced', 34 | 'multiple' => true, 35 | 'name' => esc_html__( 'Project Images', 'constructo-companion' ), 36 | 'description' => esc_html__( 'Best size is 1146x680', 'constructo-companion' ), 37 | ), 38 | array( 39 | 'id' => $constructo_prefix . 'project_quote_txt', 40 | 'type' => 'textarea', 41 | 'name' => esc_html__( 'Project Quote Box', 'constructo-companion' ), 42 | ), 43 | array( 44 | 'id' => $constructo_prefix . 'project_left_txt', 45 | 'type' => 'textarea', 46 | 'name' => esc_html__( 'Project Left Box', 'constructo-companion' ), 47 | 'desc' => esc_html__( 'If the "Project Right Box" is empty then the "Project Left Box" will take the full width.', 'constructo-companion' ), 48 | ), 49 | array( 50 | 'id' => $constructo_prefix . 'project_right_txt', 51 | 'type' => 'textarea', 52 | 'name' => esc_html__( 'Project Right Box', 'constructo-companion' ), 53 | ), 54 | ), 55 | ); 56 | 57 | 58 | return $meta_boxes; 59 | } 60 | add_filter( 'rwmb_meta_boxes', 'constructo_page_metabox' ); 61 | -------------------------------------------------------------------------------- /constructo-companion.php: -------------------------------------------------------------------------------- 1 | parent(); 58 | 59 | 60 | 61 | if( ( 'Constructo' == $current_theme->get( 'Name' ) ) || ( $is_parent && 'Constructo' == $is_parent->get( 'Name' ) ) ){ 62 | require_once CONSTRUCTO_COMPANION_DIR_PATH . 'constructo-init.php'; 63 | }else{ 64 | 65 | add_action( 'admin_notices', 'constructo_companion_admin_notice', 99 ); 66 | function constructo_companion_admin_notice() { 67 | $url = 'https://demo.colorlib.com/constructo/'; 68 | ?> 69 |

70 |

Constructo Companion plugin you have to also install the %1$sConstructo Theme%2$s', 'constructo-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 | -------------------------------------------------------------------------------- /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.6 6 | Stable tag: trunk 7 | License: GPLv3 or later 8 | License URI: http://www.gnu.org/licenses/gpl-3.0.html 9 | 10 | Constructo 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 `constructo-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' => 'Constructo Demo', 21 | 'local_import_file' => CONSTRUCTO_COMPANION_DEMO_DIR_PATH .'constructo-demo.xml', 22 | 'local_import_widget_file' => CONSTRUCTO_COMPANION_DEMO_DIR_PATH .'constructo-widgets-demo.wie', 23 | 'import_customizer_file_url' => plugins_url( 'constructo-customizer.dat', __FILE__ ), 24 | 'import_notice' => $demoImg, 25 | ), 26 | ); 27 | } 28 | add_filter( 'pt-ocdi/import_files', 'constructo_import_files' ); 29 | 30 | 31 | // demo import setup 32 | function constructo_after_import_setup() { 33 | // Assign menus to their locations. 34 | $main_menu = get_term_by( 'name', 'Main Menu', 'nav_menu' ); 35 | $departments = get_term_by( 'name', 'Departments', 'nav_menu' ); 36 | $useful_links = get_term_by( 'name', 'Useful Links', 'nav_menu' ); 37 | 38 | set_theme_mod( 'nav_menu_locations', array( 39 | 'primary-menu' => $main_menu->term_id, 40 | 'departments' => $departments->term_id, 41 | 'useful-links' => $useful_links->term_id, 42 | ) 43 | ); 44 | 45 | // Assign front page and posts page (blog page). 46 | $front_page_id = get_page_by_title( 'Homepage' ); 47 | $blog_page_id = get_page_by_title( 'Blog' ); 48 | 49 | update_option( 'show_on_front', 'page' ); 50 | update_option( 'page_on_front', $front_page_id->ID ); 51 | update_option( 'page_for_posts', $blog_page_id->ID ); 52 | update_option( 'posts_per_page', 3 ); 53 | 54 | // Update the post to draft after import is done 55 | constructo_update_the_followed_post_page_status(); 56 | 57 | // Add an option to check after import is done 58 | update_option( 'constructo-import-data', true ); 59 | 60 | } 61 | add_action( 'pt-ocdi/after_import', 'constructo_after_import_setup' ); 62 | 63 | //disable the branding notice after successful demo import 64 | add_filter( 'pt-ocdi/disable_pt_branding', '__return_true' ); 65 | 66 | //change the location, title and other parameters of the plugin page 67 | function constructo_import_plugin_page_setup( $default_settings ) { 68 | $default_settings['parent_slug'] = 'themes.php'; 69 | $default_settings['page_title'] = esc_html__( 'One Click Demo Import' , 'constructo-companion' ); 70 | $default_settings['menu_title'] = esc_html__( 'Import Demo Data' , 'constructo-companion' ); 71 | $default_settings['capability'] = 'import'; 72 | $default_settings['menu_slug'] = 'constructo-demo-import'; 73 | 74 | return $default_settings; 75 | } 76 | add_filter( 'pt-ocdi/plugin_page_setup', 'constructo_import_plugin_page_setup' ); 77 | 78 | // Enqueue scripts 79 | function constructo_demo_import_custom_scripts(){ 80 | 81 | 82 | if( isset( $_GET['page'] ) && $_GET['page'] == 'constructo-demo-import' ){ 83 | // style 84 | wp_enqueue_style( 'constructo-demo-import', plugins_url( 'css/demo-import.css', __FILE__ ), array(), '1.0', false ); 85 | } 86 | 87 | 88 | } 89 | add_action( 'admin_enqueue_scripts', 'constructo_demo_import_custom_scripts' ); 90 | -------------------------------------------------------------------------------- /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__('Constructo Instagram Photo Widget','constructo-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 |
26 |
27 | 28 |
29 | 30 | 31 | 42 |

43 | 44 | 45 |

46 | 47 |

48 | 49 | 50 |

51 | 52 |

53 | 54 | 55 |

56 | 57 | 58 | access_token = constructo_opt( 'constructo_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/elementor-widgets/widgets/business-expert-item.php: -------------------------------------------------------------------------------- 1 | start_controls_section( 48 | 'core_feature_tab_content', 49 | [ 50 | 'label' => __( 'Business Expert Tab Item', 'constructo-companion' ), 51 | ] 52 | ); 53 | 54 | $this->add_control( 55 | 'feature_items', [ 56 | 'label' => __( 'Create New', 'constructo-companion' ), 57 | 'type' => Controls_Manager::REPEATER, 58 | 'title_field' => '{{{ item_title }}}', 59 | 'fields' => [ 60 | [ 61 | 'name' => 'business_img', 62 | 'label' => __( 'Business Image', 'constructo-companion' ), 63 | 'label_block' => true, 64 | 'type' => Controls_Manager::MEDIA, 65 | 'default' => [ 66 | 'url' => Utils::get_placeholder_image_src() 67 | ] 68 | ], 69 | [ 70 | 'name' => 'item_title', 71 | 'label' => __( 'Item Title', 'constructo-companion' ), 72 | 'label_block' => true, 73 | 'type' => Controls_Manager::TEXT, 74 | 'default' => __( 'Leading edge care for Your family', 'constructo-companion' ), 75 | ], 76 | [ 77 | 'name' => 'item_text', 78 | 'label' => __( 'Item Text', 'constructo-companion' ), 79 | 'label_block' => true, 80 | 'type' => Controls_Manager::TEXTAREA, 81 | 'default' => __( 'Esteem spirit temper too say adieus who direct esteem. It esteems luckily picture placing drawing. Apartments frequently or motionless on reasonable projecting expression.', 'constructo-companion' ), 82 | ], 83 | ], 84 | 'default' => [ 85 | [ 86 | 'business_img' => [ 87 | 'url' => Utils::get_placeholder_image_src() 88 | ], 89 | 'item_title' => __( 'Leading edge care for Your family', 'constructo-companion' ), 90 | 'item_text' => __( 'Esteem spirit temper too say adieus who direct esteem. It esteems luckily picture placing drawing. Apartments frequently or motionless on reasonable projecting expression.', 'constructo-companion' ), 91 | ], 92 | ] 93 | ] 94 | ); 95 | $this->end_controls_section(); // End service content 96 | 97 | } 98 | 99 | protected function render() { 100 | $settings = $this->get_settings(); 101 | $feature_items = !empty( $settings['feature_items'] ) ? $settings['feature_items'] : ''; 102 | 103 | // echo '
'; 104 | if( is_array( $feature_items ) && count( $feature_items ) > 0 ) { 105 | foreach( $feature_items as $item ) { 106 | $item_title = ( !empty( $item['item_title'] ) ) ? esc_html($item['item_title']) : ''; 107 | $item_text = ( !empty( $item['item_text'] ) ) ? esc_html($item['item_text']) : ''; 108 | $business_img = !empty( $item['business_img']['id'] ) ? wp_get_attachment_image( $item['business_img']['id'], 'constructo_business_expert_thumb_558x330', '', array('alt' => $item_title . ' image' ) ) : ''; 109 | ?> 110 |
111 |
112 |
113 |
114 | 115 |
116 | {$item_title}"; 119 | } 120 | if ( $item_text ) { 121 | echo "

{$item_text}

"; 122 | } 123 | ?> 124 |
125 |
126 |
127 | '; 129 | if ( $business_img ) { 130 | echo $business_img; 131 | } 132 | echo '
'; 133 | ?> 134 |
135 |
136 | '; 140 | } 141 | } -------------------------------------------------------------------------------- /inc/sidebar-widgets/blog-widget.php: -------------------------------------------------------------------------------- 1 | esc_html__( 'Show most latest blog post.', 'constructo-companion' ), ) 34 | ); 35 | 36 | } 37 | 38 | // This is where the action happens 39 | public function widget( $args, $instance ) { 40 | $title = apply_filters( 'constructo_blog_sectiontitle', $instance['sectiontitle'] ); 41 | $postnumber = apply_filters( 'constructo_blog_postnumber', $instance['postnumber'] ); 42 | $style = apply_filters( 'constructo_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 |
76 | 77 |

78 |
79 |

80 |
81 |
82 | 85 | 88 |
89 | 92 | 93 |
94 |
95 |
96 | 102 |
103 | 104 | 135 |

136 | 137 | 138 |

139 |

140 | 141 | 142 |

143 |

144 | 145 | 146 | 150 |

151 | 152 | esc_html__( 'Add footer newsletter signup form.', 'constructo-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 |
48 |
49 | 50 | 61 | 62 |
63 |
64 |
65 | 66 | 97 |

98 | 99 | 100 |

101 | 102 |

103 | 104 |

105 | 106 | 107 |

108 |

109 | 110 | 111 |

112 | 113 | start_controls_section( 48 | 'constructo_content', 49 | [ 50 | 'label' => __( 'Location Wise Listings content', 'constructo-companion' ), 51 | ] 52 | ); 53 | $this->add_control( 54 | 'sec_title', 55 | [ 56 | 'label' => esc_html__( 'Section Title', 'constructo-companion' ), 57 | 'type' => Controls_Manager::TEXT, 58 | 'label_block' => true, 59 | 'default' => esc_html__( 'Explore Europe', 'constructo-companion' ), 60 | ] 61 | ); 62 | $this->add_control( 63 | 'selected_countries', 64 | [ 65 | 'label' => esc_html__( 'Select Countries', 'constructo-companion' ), 66 | 'type' => Controls_Manager::SELECT2, 67 | 'label_block' => true, 68 | 'multiple' => true, 69 | // 'options' => constructo_get_taxonomies('listing_country'), 70 | // 'options' => [ 71 | // '1' => 'eita', 72 | // '2' => 'oita' 73 | // ], 74 | ] 75 | ); 76 | $this->end_controls_section(); // End service content 77 | 78 | /** 79 | * Style Tab 80 | * ------------------------------ Style Section Heading ------------------------------ 81 | * 82 | */ 83 | 84 | $this->start_controls_section( 85 | 'style_room_section', [ 86 | 'label' => __( 'Style Service Section', 'constructo-companion' ), 87 | 'tab' => Controls_Manager::TAB_STYLE, 88 | ] 89 | ); 90 | $this->add_control( 91 | 'big_title_col', [ 92 | 'label' => __( 'Section Title Color', 'constructo-companion' ), 93 | 'type' => Controls_Manager::COLOR, 94 | 'selectors' => [ 95 | '{{WRAPPER}} .expert_doctors_area .doctors_title h3' => 'color: {{VALUE}};', 96 | ], 97 | ] 98 | ); 99 | 100 | $this->add_control( 101 | 'single_item_styles_seperator', 102 | [ 103 | 'label' => esc_html__( 'Single Item Styles', 'constructo-companion' ), 104 | 'type' => Controls_Manager::HEADING, 105 | 'separator' => 'after' 106 | ] 107 | ); 108 | $this->add_control( 109 | 'member_name_col', [ 110 | 'label' => __( 'Member Name Color', 'constructo-companion' ), 111 | 'type' => Controls_Manager::COLOR, 112 | 'selectors' => [ 113 | '{{WRAPPER}} .expert_doctors_area .single_expert .experts_name h3' => 'color: {{VALUE}};', 114 | ], 115 | ] 116 | ); 117 | $this->add_control( 118 | 'member_desig_color', [ 119 | 'label' => __( 'Member Designation Color', 'constructo-companion' ), 120 | 'type' => Controls_Manager::COLOR, 121 | 'selectors' => [ 122 | '{{WRAPPER}} .expert_doctors_area .single_expert .experts_name span' => 'color: {{VALUE}};', 123 | ], 124 | ] 125 | ); 126 | 127 | $this->add_control( 128 | 'single_item_bg_styles_seperator', 129 | [ 130 | 'label' => esc_html__( 'Single Item Bg Styles', 'constructo-companion' ), 131 | 'type' => Controls_Manager::HEADING, 132 | 'separator' => 'after' 133 | ] 134 | ); 135 | $this->add_control( 136 | 'member_bg_color', [ 137 | 'label' => __( 'Bg Color', 'constructo-companion' ), 138 | 'type' => Controls_Manager::COLOR, 139 | 'selectors' => [ 140 | '{{WRAPPER}} .expert_doctors_area .single_expert .experts_name' => 'background: {{VALUE}};', 141 | ], 142 | ] 143 | ); 144 | $this->add_control( 145 | 'hover_member_bg_color', [ 146 | 'label' => __( 'Item Hover Bg Color', 'constructo-companion' ), 147 | 'type' => Controls_Manager::COLOR, 148 | 'selectors' => [ 149 | '{{WRAPPER}} .expert_doctors_area .single_expert:hover .experts_name' => 'background: {{VALUE}};', 150 | ], 151 | ] 152 | ); 153 | $this->end_controls_section(); 154 | 155 | } 156 | 157 | protected function render() { 158 | $settings = $this->get_settings(); 159 | $sec_title = !empty( $settings['sec_title'] ) ? $settings['sec_title'] : ''; 160 | $selected_countries = !empty( $settings['selected_countries'] ) ? $settings['selected_countries'] : ''; 161 | 162 | constructo_get_tabbed_contents( $sec_title, $selected_countries ); 163 | 164 | } 165 | } -------------------------------------------------------------------------------- /inc/elementor-widgets/assets/js/barfiller.js: -------------------------------------------------------------------------------- 1 | /* 2 | * File: jquery.barfiller.js 3 | * Version: 1.0.1 4 | * Description: A plugin that fills bars with a percentage you set. 5 | * Author: 9bit Studios 6 | * Copyright 2012, 9bit Studios 7 | * http://www.9bitstudios.com 8 | * Free to use and abuse under the MIT license. 9 | * http://www.opensource.org/licenses/mit-license.php 10 | */ 11 | 12 | (function ($) { 13 | 14 | $.fn.barfiller = function (options) { 15 | 16 | var defaults = $.extend({ 17 | barColor: '#16b597', 18 | tooltip: true, 19 | duration: 1000, 20 | animateOnResize: true, 21 | symbol: "%" 22 | }, options); 23 | 24 | 25 | /****************************** 26 | Private Variables 27 | *******************************/ 28 | 29 | var object = $(this); 30 | var settings = $.extend(defaults, options); 31 | var barWidth = object.width(); 32 | var fill = object.find('.fill'); 33 | var toolTip = object.find('.tip'); 34 | var fillPercentage = fill.attr('data-percentage'); 35 | var resizeTimeout; 36 | var transitionSupport = false; 37 | var transitionPrefix; 38 | 39 | /****************************** 40 | Public Methods 41 | *******************************/ 42 | 43 | var methods = { 44 | 45 | init: function() { 46 | return this.each(function () { 47 | if(methods.getTransitionSupport()) { 48 | transitionSupport = true; 49 | transitionPrefix = methods.getTransitionPrefix(); 50 | } 51 | 52 | methods.appendHTML(); 53 | methods.setEventHandlers(); 54 | methods.initializeItems(); 55 | }); 56 | }, 57 | 58 | /****************************** 59 | Append HTML 60 | *******************************/ 61 | 62 | appendHTML: function() { 63 | fill.css('background', settings.barColor); 64 | 65 | if(!settings.tooltip) { 66 | toolTip.css('display', 'none'); 67 | } 68 | toolTip.text(fillPercentage + settings.symbol); 69 | }, 70 | 71 | 72 | /****************************** 73 | Set Event Handlers 74 | *******************************/ 75 | setEventHandlers: function() { 76 | if(settings.animateOnResize) { 77 | $(window).on("resize", function(event){ 78 | clearTimeout(resizeTimeout); 79 | resizeTimeout = setTimeout(function() { 80 | methods.refill(); 81 | }, 300); 82 | }); 83 | } 84 | }, 85 | 86 | /****************************** 87 | Initialize 88 | *******************************/ 89 | 90 | initializeItems: function() { 91 | var pctWidth = methods.calculateFill(fillPercentage); 92 | object.find('.tipWrap').css({ display: 'inline' }); 93 | 94 | if(transitionSupport) 95 | methods.transitionFill(pctWidth); 96 | else 97 | methods.animateFill(pctWidth); 98 | }, 99 | 100 | getTransitionSupport: function() { 101 | 102 | var thisBody = document.body || document.documentElement, 103 | thisStyle = thisBody.style; 104 | var support = thisStyle.transition !== undefined || thisStyle.WebkitTransition !== undefined || thisStyle.MozTransition !== undefined || thisStyle.MsTransition !== undefined || thisStyle.OTransition !== undefined; 105 | return support; 106 | }, 107 | 108 | getTransitionPrefix: function() { 109 | if(/mozilla/.test(navigator.userAgent.toLowerCase()) && !/webkit/.test(navigator.userAgent.toLowerCase())) { 110 | return '-moz-transition'; 111 | } 112 | if(/webkit/.test(navigator.userAgent.toLowerCase())) { 113 | return '-webkit-transition'; 114 | } 115 | if(/opera/.test(navigator.userAgent.toLowerCase())) { 116 | return '-o-transition'; 117 | } 118 | if (/msie/.test(navigator.userAgent.toLowerCase())) { 119 | return '-ms-transition'; 120 | } 121 | else { 122 | return 'transition'; 123 | } 124 | }, 125 | 126 | getTransition: function(val, time, type) { 127 | 128 | var CSSObj; 129 | if(type === 'width') { 130 | CSSObj = { width : val }; 131 | } 132 | else if (type === 'left') { 133 | CSSObj = { left: val }; 134 | } 135 | 136 | time = time/1000; 137 | CSSObj[transitionPrefix] = type+' '+time+'s ease-in-out'; 138 | return CSSObj; 139 | 140 | }, 141 | 142 | refill: function() { 143 | fill.css('width', 0); 144 | toolTip.css('left', 0); 145 | barWidth = object.width(); 146 | methods.initializeItems(); 147 | }, 148 | 149 | calculateFill: function(percentage) { 150 | percentage = percentage * 0.01; 151 | var finalWidth = barWidth * percentage; 152 | return finalWidth; 153 | }, 154 | 155 | transitionFill: function(barWidth) { 156 | 157 | var toolTipOffset = barWidth - toolTip.width(); 158 | fill.css( methods.getTransition(barWidth, settings.duration, 'width')); 159 | toolTip.css( methods.getTransition(toolTipOffset, settings.duration, 'left')); 160 | 161 | }, 162 | 163 | animateFill: function(barWidth) { 164 | var toolTipOffset = barWidth - toolTip.width(); 165 | fill.stop().animate({width: '+=' + barWidth}, settings.duration); 166 | toolTip.stop().animate({left: '+=' + toolTipOffset}, settings.duration); 167 | } 168 | 169 | }; 170 | 171 | if (methods[options]) { // $("#element").pluginName('methodName', 'arg1', 'arg2'); 172 | return methods[options].apply(this, Array.prototype.slice.call(arguments, 1)); 173 | } else if (typeof options === 'object' || !options) { // $("#element").pluginName({ option: 1, option:2 }); 174 | return methods.init.apply(this); 175 | } else { 176 | $.error( 'Method "' + method + '" does not exist in barfiller plugin!'); 177 | } 178 | }; 179 | 180 | })(jQuery); -------------------------------------------------------------------------------- /inc/sidebar-widgets/social-links.php: -------------------------------------------------------------------------------- 1 | esc_html__( 'Add footer social links.', 'constructo-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/functions.php: -------------------------------------------------------------------------------- 1 | 'elementor_library', 21 | 'posts_per_page' => -1, 22 | ]; 23 | 24 | $page_templates = get_posts($args); 25 | 26 | if (!empty($page_templates) && !is_wp_error($page_templates)) { 27 | foreach ($page_templates as $post) { 28 | $options[$post->ID] = $post->post_title; 29 | } 30 | } 31 | return $options; 32 | } 33 | 34 | // Section Heading 35 | function constructo_section_heading( $title = '', $subtitle = '' ) { 36 | if( $title || $subtitle ) : 37 | ?> 38 |
39 |
40 |
41 |
42 | ' . esc_html( $subtitle ) . '

'; 46 | } 47 | // Title 48 | if ( $title ) { 49 | echo '

' . esc_html( $title ) . '

'; 50 | } 51 | ?> 52 |
53 |
54 |
55 |
56 | 87 | 115 | 116 | $target_post_id->ID, 139 | 'post_status' => $type, 140 | ); 141 | 142 | if ( $message == true ) { 143 | // Update the post/page 144 | $update_status = wp_update_post( $target_post, true ); 145 | } else { 146 | // Update the post/page 147 | $update_status = wp_update_post( $target_post, false ); 148 | } 149 | 150 | return $update_status; 151 | } 152 | 153 | 154 | 155 | // Project - Custom Post Type 156 | function project_custom_posts() { 157 | $labels = array( 158 | 'name' => _x( 'Project', 'post type general name', 'constructo-companion' ), 159 | 'singular_name' => _x( 'Project', 'post type singular name', 'constructo-companion' ), 160 | 'menu_name' => _x( 'Projects', 'admin menu', 'constructo-companion' ), 161 | 'name_admin_bar' => _x( 'Projects', 'add new on admin bar', 'constructo-companion' ), 162 | 'add_new' => _x( 'Add New', 'constructo', 'constructo-companion' ), 163 | 'add_new_item' => __( 'Add New Project', 'constructo-companion' ), 164 | 'new_item' => __( 'New Project', 'constructo-companion' ), 165 | 'edit_item' => __( 'Edit Project', 'constructo-companion' ), 166 | 'view_item' => __( 'View Project', 'constructo-companion' ), 167 | 'all_items' => __( 'All Projects', 'constructo-companion' ), 168 | 'search_items' => __( 'Search Project', 'constructo-companion' ), 169 | 'parent_item_colon' => __( 'Parent Project:', 'constructo-companion' ), 170 | 'not_found' => __( 'No Project found.', 'constructo-companion' ), 171 | 'not_found_in_trash' => __( 'No Project found in Trash.', 'constructo-companion' ) 172 | ); 173 | 174 | $args = array( 175 | 'labels' => $labels, 176 | 'description' => __( 'Description.', 'constructo-companion' ), 177 | 'public' => true, 178 | 'publicly_queryable' => true, 179 | 'show_ui' => true, 180 | 'show_in_menu' => true, 181 | // 'menu_icon' => 'dashicons-store', 182 | 'query_var' => true, 183 | 'rewrite' => array( 'slug' => 'project' ), 184 | 'capability_type' => 'post', 185 | 'has_archive' => true, 186 | 'hierarchical' => false, 187 | 'menu_position' => null, 188 | 'supports' => array( 'title', 'thumbnail' ) 189 | ); 190 | 191 | register_post_type( 'project', $args ); 192 | 193 | } 194 | add_action( 'init', 'project_custom_posts' ); 195 | 196 | /*========================================================= 197 | Project Section 198 | ========================================================*/ 199 | function constructo_get_projects( $project_order ){ 200 | $projecs = new WP_Query( array( 201 | 'post_type' => 'project', 202 | 'posts_per_page' => 4, 203 | 'order' => $project_order 204 | ) ); 205 | function get_project_img_part( $project_img ) { 206 | ?> 207 |
208 | 211 |
212 | 213 |
214 | 217 |
218 | 222 |
223 |
224 |

225 |

226 | Details 227 |
228 |
229 | have_posts() ) { 234 | while ( $projecs->have_posts() ) { 235 | $projecs->the_post(); 236 | $project_img = get_the_post_thumbnail( get_the_ID(), 'constructo_project_thumb_686x488', '', array( 'alt' => get_the_title() ) ); 237 | $project_exc = constructo_meta( 'project_excerpt_txt' ); 238 | $count++; 239 | ?> 240 |
241 | 250 |
251 | start_controls_section( 48 | 'home_contact_content', 49 | [ 50 | 'label' => __( 'Home Contact Settings', 'constructo-companion' ), 51 | ] 52 | ); 53 | $this->add_control( 54 | 'bg_img', 55 | [ 56 | 'label' => esc_html__( 'Bg Image', 'constructo-companion' ), 57 | 'description' => esc_html__( 'Best size is 1920x375', 'constructo-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 | 'sec_title', 67 | [ 68 | 'label' => esc_html__( 'Section Title', 'constructo-companion' ), 69 | 'type' => Controls_Manager::TEXTAREA, 70 | 'label_block' => true, 71 | 'default' => esc_html__( 'Are you looking for a Construction and Industrial Experts?', 'constructo-companion' ), 72 | ] 73 | ); 74 | $this->add_control( 75 | 'btn_title', 76 | [ 77 | 'label' => esc_html__( 'Button Title', 'constructo-companion' ), 78 | 'type' => Controls_Manager::TEXT, 79 | 'label_block' => true, 80 | 'default' => esc_html__( 'Contact Us', 'constructo-companion' ), 81 | ] 82 | ); 83 | $this->add_control( 84 | 'btn_url', 85 | [ 86 | 'label' => esc_html__( 'Button URL', 'constructo-companion' ), 87 | 'type' => Controls_Manager::URL, 88 | 'label_block' => true, 89 | 'default' => [ 90 | 'url' => '#' 91 | ], 92 | ] 93 | ); 94 | 95 | $this->end_controls_section(); // End left content 96 | 97 | //------------------------------ Style title ------------------------------ 98 | 99 | // Top Section Styles 100 | $this->start_controls_section( 101 | 'about_sec_style', [ 102 | 'label' => __( 'About Section Styles', 'constructo-companion' ), 103 | 'tab' => Controls_Manager::TAB_STYLE, 104 | ] 105 | ); 106 | 107 | $this->add_control( 108 | 'sub_title_col', [ 109 | 'label' => __( 'Sub Title Color', 'constructo-companion' ), 110 | 'type' => Controls_Manager::COLOR, 111 | 'selectors' => [ 112 | '{{WRAPPER}} .welcome_constructo_area .welcome_constructo_info h2' => 'color: {{VALUE}};', 113 | ], 114 | ] 115 | ); 116 | $this->add_control( 117 | 'sec_title_col', [ 118 | 'label' => __( 'Sec Title Color', 'constructo-companion' ), 119 | 'type' => Controls_Manager::COLOR, 120 | 'selectors' => [ 121 | '{{WRAPPER}} .welcome_constructo_area .welcome_constructo_info h3' => 'color: {{VALUE}};', 122 | ], 123 | ] 124 | ); 125 | $this->add_control( 126 | 'sec_text_col', [ 127 | 'label' => __( 'Sec Text Color', 'constructo-companion' ), 128 | 'type' => Controls_Manager::COLOR, 129 | 'selectors' => [ 130 | '{{WRAPPER}} .welcome_constructo_area .welcome_constructo_info p' => 'color: {{VALUE}};', 131 | '{{WRAPPER}} .welcome_constructo_area .welcome_constructo_info ul li' => 'color: {{VALUE}};', 132 | ], 133 | ] 134 | ); 135 | $this->add_control( 136 | 'list_circle_col', [ 137 | 'label' => __( 'List Item Icon Color', 'constructo-companion' ), 138 | 'type' => Controls_Manager::COLOR, 139 | 'selectors' => [ 140 | '{{WRAPPER}} .welcome_constructo_area .welcome_constructo_info ul li::before' => 'color: {{VALUE}};', 141 | ], 142 | ] 143 | ); 144 | 145 | $this->add_control( 146 | 'btn_styles_seperator', 147 | [ 148 | 'label' => esc_html__( 'Button Styles', 'constructo-companion' ), 149 | 'type' => Controls_Manager::HEADING, 150 | 'separator' => 'after' 151 | ] 152 | ); 153 | $this->add_control( 154 | 'btn_txt_col', [ 155 | 'label' => __( 'Button Text & Border Color', 'constructo-companion' ), 156 | 'type' => Controls_Manager::COLOR, 157 | 'selectors' => [ 158 | '{{WRAPPER}} .welcome_constructo_area .welcome_constructo_info .boxed-btn3-white-2' => 'color: {{VALUE}} !important; border-color: {{VALUE}}', 159 | '{{WRAPPER}} .welcome_constructo_area .welcome_constructo_info .boxed-btn3-white-2:hover' => 'background: {{VALUE}} !important; border-color: transparent', 160 | ], 161 | ] 162 | ); 163 | $this->add_control( 164 | 'btn_hvr_col', [ 165 | 'label' => __( 'Button Hover Color', 'constructo-companion' ), 166 | 'type' => Controls_Manager::COLOR, 167 | 'selectors' => [ 168 | '{{WRAPPER}} .welcome_constructo_area .welcome_constructo_info .boxed-btn3-white-2:hover' => 'color: {{VALUE}} !important', 169 | ], 170 | ] 171 | ); 172 | 173 | $this->end_controls_section(); 174 | 175 | } 176 | 177 | 178 | protected function render() { 179 | $settings = $this->get_settings(); 180 | $bg_img = !empty( $settings['bg_img']['url'] ) ? $settings['bg_img']['url'] : ''; 181 | $sec_title = !empty( $settings['sec_title'] ) ? $settings['sec_title'] : ''; 182 | $btn_title = !empty( $settings['btn_title'] ) ? $settings['btn_title'] : ''; 183 | $btn_url = !empty( $settings['btn_url']['url'] ) ? $settings['btn_url']['url'] : ''; 184 | ?> 185 | 186 | 187 |
> 188 |
189 |
190 |
191 |
192 | '.esc_html( $sec_title ).''; 195 | } 196 | ?> 197 |
198 |
199 |
200 |
201 | '.esc_html( $btn_title ).''; 204 | } 205 | ?> 206 | 207 |
208 |
209 |
210 |
211 |
212 | 213 | start_controls_section( 48 | 'call_to_action_content', 49 | [ 50 | 'label' => __( 'Call To Action Section', 'constructo-companion' ), 51 | ] 52 | ); 53 | $this->add_control( 54 | 'bg_img', 55 | [ 56 | 'label' => esc_html__( 'BG Image', 'constructo-companion' ), 57 | 'description' => esc_html__( 'Best size is 1920x700', 'constructo-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 | 'sec_title', 67 | [ 68 | 'label' => esc_html__( 'Sec Title', 'constructo-companion' ), 69 | 'type' => Controls_Manager::TEXT, 70 | 'label_block' => true, 71 | 'default' => esc_html__( 'Why Choose Us?', 'constructo-companion' ), 72 | ] 73 | ); 74 | $this->add_control( 75 | 'quote_txt', 76 | [ 77 | 'label' => esc_html__( 'Quote Text', 'constructo-companion' ), 78 | 'type' => Controls_Manager::TEXTAREA, 79 | 'label_block' => true, 80 | 'default' => esc_html__( '“Construction is a full service construction company offering building solutions from start to finish. Our staff has been operating on NYC for ten years.', 'constructo-companion' ), 81 | ] 82 | ); 83 | $this->add_control( 84 | 'sec_txt', 85 | [ 86 | 'label' => esc_html__( 'Section Text', 'constructo-companion' ), 87 | 'type' => Controls_Manager::TEXTAREA, 88 | 'label_block' => true, 89 | 'default' => esc_html__( 'There are many variations of passages of lorem Ipsum available, but the majority have suffered alteration in some form, by injected.', 'constructo-companion' ), 90 | ] 91 | ); 92 | $this->add_control( 93 | 'video_url', 94 | [ 95 | 'label' => esc_html__( 'Popup Video URL', 'constructo-companion' ), 96 | 'type' => Controls_Manager::URL, 97 | 'label_block' => true, 98 | 'default' => [ 99 | 'url' => 'https://www.youtube.com/watch?v=2qEX4KCEXeI' 100 | ] 101 | ] 102 | ); 103 | 104 | $this->end_controls_section(); // End emergency_contact_section 105 | 106 | //------------------------------ Style title ------------------------------ 107 | 108 | // Top Section Styles 109 | $this->start_controls_section( 110 | 'left_sec_style', [ 111 | 'label' => __( 'Top Section Styles', 'constructo-companion' ), 112 | 'tab' => Controls_Manager::TAB_STYLE, 113 | ] 114 | ); 115 | 116 | $this->add_control( 117 | 'text_col', [ 118 | 'label' => __( 'Text Color', 'constructo-companion' ), 119 | 'type' => Controls_Manager::COLOR, 120 | 'selectors' => [ 121 | '{{WRAPPER}} .Emergency_contact .single_emergency .info h3' => 'color: {{VALUE}};', 122 | '{{WRAPPER}} .Emergency_contact .single_emergency .info p' => 'color: {{VALUE}};', 123 | ], 124 | ] 125 | ); 126 | $this->add_control( 127 | 'button_col', [ 128 | 'label' => __( 'Button Text & Border Color', 'constructo-companion' ), 129 | 'type' => Controls_Manager::COLOR, 130 | 'selectors' => [ 131 | '{{WRAPPER}} .Emergency_contact .single_emergency .info_button .boxed-btn3-white' => 'color: {{VALUE}} !important; border-color: {{VALUE}};', 132 | '{{WRAPPER}} .Emergency_contact .single_emergency .info_button .boxed-btn3-white:hover' => 'color: {{VALUE}} !important; border-color: transparent;', 133 | ], 134 | ] 135 | ); 136 | 137 | $this->add_control( 138 | 'button_styles_seperator', 139 | [ 140 | 'label' => esc_html__( 'Button Styles', 'constructo-companion' ), 141 | 'type' => Controls_Manager::HEADING, 142 | 'separator' => 'after' 143 | ] 144 | ); 145 | $this->add_control( 146 | 'button_hover_col', [ 147 | 'label' => __( 'Button Hover Bg Color', 'constructo-companion' ), 148 | 'type' => Controls_Manager::COLOR, 149 | 'selectors' => [ 150 | '{{WRAPPER}} .Emergency_contact .single_emergency .info_button .boxed-btn3-white:hover' => 'background: {{VALUE}};', 151 | ], 152 | ] 153 | ); 154 | 155 | $this->add_control( 156 | 'overlay_color_styles_seperator', 157 | [ 158 | 'label' => esc_html__( 'Overlay Color Styles', 'constructo-companion' ), 159 | 'type' => Controls_Manager::HEADING, 160 | 'separator' => 'after' 161 | ] 162 | ); 163 | $this->add_control( 164 | 'sec_title_col', [ 165 | 'label' => __( 'Bg Overlay Color', 'constructo-companion' ), 166 | 'type' => Controls_Manager::COLOR, 167 | 'selectors' => [ 168 | '{{WRAPPER}} .Emergency_contact .single_emergency.overlay_skyblue::before' => 'background: {{VALUE}};', 169 | ], 170 | ] 171 | ); 172 | $this->end_controls_section(); 173 | 174 | } 175 | 176 | protected function render() { 177 | $settings = $this->get_settings(); 178 | $bg_img = !empty( $settings['bg_img']['url'] ) ? $settings['bg_img']['url'] : ''; 179 | $sec_title = !empty( $settings['sec_title'] ) ? $settings['sec_title'] : ''; 180 | $quote_txt = !empty( $settings['quote_txt'] ) ? $settings['quote_txt'] : ''; 181 | $sec_txt = !empty( $settings['sec_txt'] ) ? $settings['sec_txt'] : ''; 182 | $video_url = !empty( $settings['video_url']['url'] ) ? $settings['video_url']['url'] : ''; 183 | ?> 184 | 185 | 186 |
> 187 |
188 |
189 |
190 |
191 | '.esc_html($sec_title).''; 194 | } 195 | if ( $quote_txt ) { 196 | echo '

'.wp_kses_post($quote_txt).'

'; 197 | } 198 | if ( $sec_txt ) { 199 | echo '

'.wp_kses_post($sec_txt).'

'; 200 | } 201 | if ( $video_url ) { 202 | echo ' 203 |
204 | 205 | 206 | 207 |
208 | '; 209 | } 210 | ?> 211 | 212 |
213 |
214 |
215 |
216 |
217 | 218 | esc_html__( 'Add footer about content', 'constructo-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 |

113 |
114 | 115 | /> 116 | 117 | > 118 |
119 | 120 | 121 | 122 | /> 123 | 124 | 125 | 126 |
127 |
128 |

129 | 162 | 230 | start_controls_section( 49 | 'contact_info', 50 | [ 51 | 'label' => __( 'Contact Info', 'constructo-companion' ), 52 | ] 53 | ); 54 | 55 | $this->add_control( 56 | 'info', [ 57 | 'label' => __( 'Create Contact Info', 'constructo-companion' ), 58 | 'type' => Controls_Manager::REPEATER, 59 | 'title_field' => '{{{ label }}}', 60 | 'fields' => [ 61 | [ 62 | 'name' => 'label', 63 | 'label' => __( 'Contact Info', 'constructo-companion' ), 64 | 'label_block' => true, 65 | 'type' => Controls_Manager::TEXT, 66 | 'default' => esc_html__( 'Dhaka, Bangladesh', 'constructo-companion' ) 67 | ], 68 | [ 69 | 'name' => 'desc', 70 | 'label' => __( 'Contact Descriptions', 'constructo-companion' ), 71 | 'type' => Controls_Manager::TEXTAREA, 72 | 'default' => esc_html__( 'Write something...', 'constructo-companion' ) 73 | ], 74 | [ 75 | 'name' => 'icon', 76 | 'label' => __( 'Icon', 'constructo-companion' ), 77 | 'type' => Controls_Manager::ICON, 78 | ] 79 | 80 | ], 81 | 'default' => [ 82 | [ 83 | 'label' => esc_html__( 'Buttonwood, California.', 'constructo-companion' ), 84 | 'desc' => esc_html__( 'Rosemead, CA 91770', 'constructo-companion' ), 85 | 'icon' => 'fa fa-home', 86 | ], 87 | [ 88 | 'label' => esc_html__( '00 (440) 9865 562', 'constructo-companion' ), 89 | 'desc' => esc_html__( 'Mon to Fri 9am to 6pm', 'constructo-companion' ), 90 | 'icon' => 'fa fa-tablet', 91 | ], 92 | [ 93 | 'label' => esc_html__( 'support@colorlib.com', 'constructo-companion' ), 94 | 'desc' => esc_html__( 'Send us your query anytime!', 'constructo-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', 'constructo-companion' ), 108 | ] 109 | ); 110 | $this->add_control( 111 | 'contact_form_title', 112 | [ 113 | 'label' => esc_html__( 'Contact Form Title', 'constructo-companion' ), 114 | 'type' => Controls_Manager::TEXT, 115 | 'label_block' => true, 116 | 'default' => esc_html__('Get in Touch', 'constructo-companion') 117 | ] 118 | ); 119 | $this->add_control( 120 | 'contact_formshortcode', 121 | [ 122 | 'label' => esc_html__( 'Form Shortcode', 'constructo-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', 'constructo-companion' ), 138 | 'tab' => Controls_Manager::TAB_STYLE, 139 | ] 140 | ); 141 | 142 | $this->add_control( 143 | 'color_title', [ 144 | 'label' => __( 'Right Text Title Color', 'constructo-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', 'constructo-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', 'constructo-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 |
185 |
186 |
187 |
188 | ' . esc_html( $settings['contact_form_title'] ) . ''; 191 | } 192 | ?> 193 | 194 |
195 |
196 | 201 |
202 | 203 |
204 | 0 ): 206 | foreach( $settings[ 'info' ] as $info ): 207 | ?> 208 |
209 | 210 |
211 |

212 |

213 |
214 |
215 | 219 |
220 |
221 |
222 |
223 | 224 | start_controls_section( 48 | 'home_appointment_content', 49 | [ 50 | 'label' => __( 'Contact for Project Settings', 'constructo-companion' ), 51 | ] 52 | ); 53 | $this->add_control( 54 | 'bg_img', 55 | [ 56 | 'label' => esc_html__( 'BG Image', 'constructo-companion' ), 57 | 'type' => Controls_Manager::MEDIA, 58 | 'label_block' => true, 59 | 'default' => [ 60 | 'url' => Utils::get_placeholder_image_src(), 61 | ] 62 | ] 63 | ); 64 | $this->add_control( 65 | 'sec_title', 66 | [ 67 | 'label' => esc_html__( 'Section Title', 'constructo-companion' ), 68 | 'type' => Controls_Manager::TEXT, 69 | 'label_block' => true, 70 | 'default' => esc_html__( 'Let’s discuss for a project', 'constructo-companion' ), 71 | ] 72 | ); 73 | $this->add_control( 74 | 'sub_title', 75 | [ 76 | 'label' => esc_html__( 'Sub Title', 'constructo-companion' ), 77 | 'type' => Controls_Manager::TEXTAREA, 78 | 'label_block' => true, 79 | 'default' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua.', 80 | ] 81 | ); 82 | 83 | $this->add_control( 84 | 'btn_text', 85 | [ 86 | 'label' => esc_html__( 'Button Text', 'constructo-companion' ), 87 | 'type' => Controls_Manager::TEXT, 88 | 'label_block' => true, 89 | 'default' => esc_html__( '+10 672 457 356', 'constructo-companion' ), 90 | ] 91 | ); 92 | 93 | $this->add_control( 94 | 'btn_url', 95 | [ 96 | 'label' => esc_html__( 'Button URL', 'constructo-companion' ), 97 | 'type' => Controls_Manager::URL, 98 | 'label_block' => true, 99 | 'default' => [ 100 | 'url' => '#' 101 | ] 102 | ] 103 | ); 104 | 105 | $this->add_control( 106 | 'form_shortcode', 107 | [ 108 | 'label' => esc_html__( 'Form Shortcode', 'constructo-companion' ), 109 | 'type' => Controls_Manager::TEXT, 110 | 'label_block' => true, 111 | ] 112 | ); 113 | 114 | $this->end_controls_section(); // End about us content 115 | 116 | //------------------------------ Style title ------------------------------ 117 | 118 | // Home Contact Section Styles 119 | $this->start_controls_section( 120 | 'home_contact_sec_style', [ 121 | 'label' => __( 'Home Contact Section Styles', 'constructo-companion' ), 122 | 'tab' => Controls_Manager::TAB_STYLE, 123 | ] 124 | ); 125 | $this->add_control( 126 | 'sub_title_col', [ 127 | 'label' => __( 'Sub title Color', 'constructo-companion' ), 128 | 'type' => Controls_Manager::COLOR, 129 | 'selectors' => [ 130 | '{{WRAPPER}} .messege_area .section_title .sub_heading' => 'color: {{VALUE}};', 131 | ], 132 | ] 133 | ); 134 | $this->add_control( 135 | 'sec_title_col', [ 136 | 'label' => __( 'Big Title Color', 'constructo-companion' ), 137 | 'type' => Controls_Manager::COLOR, 138 | 'selectors' => [ 139 | '{{WRAPPER}} .messege_area .section_title h3' => 'color: {{VALUE}};', 140 | '{{WRAPPER}} .messege_area .section_title .seperator' => 'background: {{VALUE}};', 141 | ], 142 | ] 143 | ); 144 | 145 | $this->add_control( 146 | 'btn_styles_seperator', 147 | [ 148 | 'label' => esc_html__( 'Button Styles', 'constructo-companion' ), 149 | 'type' => Controls_Manager::HEADING, 150 | 'separator' => 'after' 151 | ] 152 | ); 153 | $this->add_control( 154 | 'btn_border_txt_col', [ 155 | 'label' => __( 'Button Border & Text Color', 'constructo-companion' ), 156 | 'type' => Controls_Manager::COLOR, 157 | 'selectors' => [ 158 | '{{WRAPPER}} .messege_area .messege .boxed-btn' => 'color: {{VALUE}} !important; border-color: {{VALUE}};', 159 | ], 160 | ] 161 | ); 162 | $this->add_control( 163 | 'btn_hvr_border_bg_col', [ 164 | 'label' => __( 'Button Hover Border & Bg Color', 'constructo-companion' ), 165 | 'type' => Controls_Manager::COLOR, 166 | 'selectors' => [ 167 | '{{WRAPPER}} .messege_area .messege .boxed-btn:hover' => 'background: {{VALUE}}; border-color: {{VALUE}};', 168 | ], 169 | ] 170 | ); 171 | $this->add_control( 172 | 'btn_hvr_txt_col', [ 173 | 'label' => __( 'Button Hover Text Color', 'constructo-companion' ), 174 | 'type' => Controls_Manager::COLOR, 175 | 'selectors' => [ 176 | '{{WRAPPER}} .messege_area .messege .boxed-btn:hover' => 'color: {{VALUE}} !important;;', 177 | ], 178 | ] 179 | ); 180 | $this->end_controls_section(); 181 | 182 | } 183 | 184 | protected function render() { 185 | $settings = $this->get_settings(); 186 | $bg_img = !empty( $settings['bg_img']['url'] ) ? $settings['bg_img']['url'] : ''; 187 | $sec_title = !empty( $settings['sec_title'] ) ? $settings['sec_title'] : ''; 188 | $sub_title = !empty( $settings['sub_title'] ) ? $settings['sub_title'] : ''; 189 | $btn_text = !empty( $settings['btn_text'] ) ? $settings['btn_text'] : ''; 190 | $btn_url = !empty( $settings['btn_url']['url'] ) ? $settings['btn_url']['url'] : ''; 191 | $form_shortcode = !empty( $settings['form_shortcode'] ) ? $settings['form_shortcode'] : ''; 192 | $inner_page_class = is_front_page() ? 'attending_area' : 'attending_area plus_padding'; 193 | ?> 194 | 195 | 196 |
> 197 |
198 |
199 |
200 |
201 | '.esc_html( $sec_title ).''; 204 | } 205 | if ( $sub_title ) { 206 | echo '

'.wp_kses_post( $sub_title ).'

'; 207 | } 208 | if ( $btn_text ) { 209 | echo ''.esc_html( $btn_text ).''; 210 | } 211 | ?> 212 |
213 |
214 |
215 |
216 | 221 |
222 |
223 |
224 |
225 |
226 | 227 | start_controls_section( 48 | 'business_expert_content', 49 | [ 50 | 'label' => __( 'Business Expert content', 'constructo-companion' ), 51 | ] 52 | ); 53 | $this->add_control( 54 | 'tab_content', [ 55 | 'label' => __( 'Create New', 'constructo-companion' ), 56 | 'type' => Controls_Manager::REPEATER, 57 | 'title_field' => '{{{ tab_title }}}', 58 | 'fields' => [ 59 | [ 60 | 'name' => 'tab_title', 61 | 'label' => __( 'Tab Title', 'constructo-companion' ), 62 | 'label_block' => true, 63 | 'type' => Controls_Manager::TEXT, 64 | 'default' => __( 'Excellent Services', 'constructo-companion' ), 65 | ], 66 | [ 67 | 'name' => 'template_id', 68 | 'label' => __( 'Select Elementor Template', 'constructo-companion' ), 69 | 'label_block' => true, 70 | 'type' => Controls_Manager::SELECT, 71 | 'options' => get_elementor_templates(), 72 | 'default' => array_key_first( get_elementor_templates() ), 73 | ], 74 | ], 75 | 'default' => [ 76 | [ 77 | 'tab_title' => __( 'Excellent Services', 'constructo-companion' ), 78 | ], 79 | [ 80 | 'tab_title' => __( 'Qualified Doctors', 'constructo-companion' ), 81 | ], 82 | [ 83 | 'tab_title' => __( 'Emergency Departments', 'constructo-companion' ), 84 | ], 85 | ] 86 | ] 87 | ); 88 | $this->end_controls_section(); // End service content 89 | 90 | /** 91 | * Style Tab 92 | * ------------------------------ Style Section Heading ------------------------------ 93 | * 94 | */ 95 | 96 | $this->start_controls_section( 97 | 'style_room_section', [ 98 | 'label' => __( 'Style Business Expert Section', 'constructo-companion' ), 99 | 'tab' => Controls_Manager::TAB_STYLE, 100 | ] 101 | ); 102 | $this->add_control( 103 | 'section_head_bg_col', [ 104 | 'label' => __( 'Section Head Bg Color', 'constructo-companion' ), 105 | 'type' => Controls_Manager::COLOR, 106 | 'selectors' => [ 107 | '{{WRAPPER}} .business_expert_area .business_tabs_area' => 'background: {{VALUE}};', 108 | ], 109 | ] 110 | ); 111 | 112 | $this->add_control( 113 | 'tab_content_styles_separator', [ 114 | 'label' => __( 'Tab Content Styles', 'constructo-companion' ), 115 | 'type' => Controls_Manager::HEADING, 116 | 'separator' => 'after' 117 | ] 118 | ); 119 | $this->add_control( 120 | 'icon_col', [ 121 | 'label' => __( 'Icon Color', 'constructo-companion' ), 122 | 'type' => Controls_Manager::COLOR, 123 | 'selectors' => [ 124 | '{{WRAPPER}} .business_expert_area .business_info .icon i' => 'color: {{VALUE}};', 125 | ], 126 | ] 127 | ); 128 | $this->add_control( 129 | 'icon_bg_col', [ 130 | 'label' => __( 'Icon Bg Color', 'constructo-companion' ), 131 | 'type' => Controls_Manager::COLOR, 132 | 'selectors' => [ 133 | '{{WRAPPER}} .business_expert_area .business_info .icon i' => 'background: {{VALUE}};', 134 | ], 135 | ] 136 | ); 137 | $this->add_control( 138 | 'title_col', [ 139 | 'label' => __( 'Title Color', 'constructo-companion' ), 140 | 'type' => Controls_Manager::COLOR, 141 | 'selectors' => [ 142 | '{{WRAPPER}} .business_expert_area .business_info h3' => 'color: {{VALUE}};', 143 | ], 144 | ] 145 | ); 146 | $this->add_control( 147 | 'text_col', [ 148 | 'label' => __( 'Text Color', 'constructo-companion' ), 149 | 'type' => Controls_Manager::COLOR, 150 | 'selectors' => [ 151 | '{{WRAPPER}} .business_expert_area .business_info p' => 'color: {{VALUE}};', 152 | ], 153 | ] 154 | ); 155 | 156 | $this->end_controls_section(); 157 | 158 | } 159 | 160 | protected function render() { 161 | $settings = $this->get_settings(); 162 | $tab_items = !empty( $settings['tab_content'] ) ? $settings['tab_content'] : ''; 163 | ?> 164 | 165 | 166 |
167 |
168 |
169 |
170 |
171 | 195 |
196 |
197 | 198 |
199 |
200 |
201 |
202 |
203 | 210 |
211 | frontend->get_builder_content( $template_id, false ); 213 | ?> 214 |
215 | 219 |
220 |
221 |
222 |
223 | 224 | start_controls_section( 48 | 'project_content', 49 | [ 50 | 'label' => __( 'Project content', 'constructo-companion' ), 51 | ] 52 | ); 53 | $this->add_control( 54 | 'sec_title', 55 | [ 56 | 'label' => __( 'Section Title', 'constructo-companion' ), 57 | 'type' => Controls_Manager::TEXT, 58 | 'label_block' => true, 59 | 'default' => __( 'Our Works', 'constructo-companion' ) 60 | ] 61 | ); 62 | $this->add_control( 63 | 'post_order', 64 | [ 65 | 'label' => esc_html__( 'Project Order', 'constructo-companion' ), 66 | 'type' => Controls_Manager::SWITCHER, 67 | 'label_block' => false, 68 | 'label_on' => 'DESC', 69 | 'label_off' => 'ASC', 70 | 'default' => 'yes', 71 | ] 72 | ); 73 | $this->end_controls_section(); // End right case content 74 | 75 | /** 76 | * Style Tab 77 | * ------------------------------ Style Section Heading ------------------------------ 78 | * 79 | */ 80 | 81 | $this->start_controls_section( 82 | 'style_room_section', [ 83 | 'label' => __( 'Style Service Section', 'constructo-companion' ), 84 | 'tab' => Controls_Manager::TAB_STYLE, 85 | 'condition' => [ 86 | 'style_type' => 'style_1' 87 | ], 88 | ] 89 | ); 90 | $this->add_control( 91 | 'sub_title_col', [ 92 | 'label' => __( 'Sub Title Color', 'constructo-companion' ), 93 | 'type' => Controls_Manager::COLOR, 94 | 'selectors' => [ 95 | '{{WRAPPER}} .lastest_project .section_title .sub_heading' => 'color: {{VALUE}};', 96 | ], 97 | ] 98 | ); 99 | $this->add_control( 100 | 'sec_title_col', [ 101 | 'label' => __( 'Section Title Color', 'constructo-companion' ), 102 | 'type' => Controls_Manager::COLOR, 103 | 'selectors' => [ 104 | '{{WRAPPER}} .lastest_project .section_title h3' => 'color: {{VALUE}};', 105 | '{{WRAPPER}} .lastest_project .section_title .seperator' => 'background: {{VALUE}};', 106 | ], 107 | ] 108 | ); 109 | 110 | $this->add_control( 111 | 'singl_item_styles_seperator', 112 | [ 113 | 'label' => esc_html__( 'Single Project Styles', 'constructo-companion' ), 114 | 'type' => Controls_Manager::HEADING, 115 | 'separator' => 'after' 116 | ] 117 | ); 118 | $this->add_control( 119 | 'proj_loc_col', [ 120 | 'label' => __( 'Project Location Color', 'constructo-companion' ), 121 | 'type' => Controls_Manager::COLOR, 122 | 'selectors' => [ 123 | '{{WRAPPER}} .lastest_project .section_title .sub_heading2' => 'color: {{VALUE}};', 124 | ], 125 | ] 126 | ); 127 | $this->add_control( 128 | 'proj_title_col', [ 129 | 'label' => __( 'Project Title Color', 'constructo-companion' ), 130 | 'type' => Controls_Manager::COLOR, 131 | 'selectors' => [ 132 | '{{WRAPPER}} .lastest_project .section_title h4' => 'color: {{VALUE}};', 133 | ], 134 | ] 135 | ); 136 | $this->add_control( 137 | 'proj_txt_col', [ 138 | 'label' => __( 'Project Text Color', 'constructo-companion' ), 139 | 'type' => Controls_Manager::COLOR, 140 | 'selectors' => [ 141 | '{{WRAPPER}} .lastest_project .section_title p' => 'color: {{VALUE}};', 142 | ], 143 | ] 144 | ); 145 | 146 | $this->add_control( 147 | 'singl_item_btn_styles_seperator', 148 | [ 149 | 'label' => esc_html__( 'Button Styles', 'constructo-companion' ), 150 | 'type' => Controls_Manager::HEADING, 151 | 'separator' => 'after' 152 | ] 153 | ); 154 | $this->add_control( 155 | 'btn_line_txt_col', [ 156 | 'label' => __( 'Button Border & Text Color', 'constructo-companion' ), 157 | 'type' => Controls_Manager::COLOR, 158 | 'selectors' => [ 159 | '{{WRAPPER}} .lastest_project .section_title .boxed-btn' => 'color: {{VALUE}} !important; border-color: {{VALUE}}', 160 | ], 161 | ] 162 | ); 163 | $this->add_control( 164 | 'btn_hvr_bg_col', [ 165 | 'label' => __( 'Button Hover Bg & Border Color', 'constructo-companion' ), 166 | 'type' => Controls_Manager::COLOR, 167 | 'selectors' => [ 168 | '{{WRAPPER}} .lastest_project .section_title .boxed-btn:hover' => 'background: {{VALUE}}; border-color: {{VALUE}}', 169 | ], 170 | ] 171 | ); 172 | $this->add_control( 173 | 'btn_hvr_txt_col', [ 174 | 'label' => __( 'Button Hover Text Color', 'constructo-companion' ), 175 | 'type' => Controls_Manager::COLOR, 176 | 'selectors' => [ 177 | '{{WRAPPER}} .lastest_project .section_title .boxed-btn:hover' => 'color: {{VALUE}} !important;', 178 | ], 179 | ] 180 | ); 181 | 182 | $this->end_controls_section(); 183 | 184 | //------------------------------ Services Item Style ------------------------------ 185 | $this->start_controls_section( 186 | 'style_serv_items_sec', [ 187 | 'label' => __( 'Style Single Item', 'constructo-companion' ), 188 | 'tab' => Controls_Manager::TAB_STYLE, 189 | 'condition' => [ 190 | 'style_type' => 'style_2' 191 | ], 192 | ] 193 | ); 194 | $this->add_control( 195 | 'big_titles_color', [ 196 | 'label' => __( 'Big Titles Color', 'constructo-companion' ), 197 | 'type' => Controls_Manager::COLOR, 198 | 'selectors' => [ 199 | '{{WRAPPER}} .project_details .project_details_left .single_details h3, .project_details .projects_details_info .details_info h3' => 'color: {{VALUE}};', 200 | ], 201 | ] 202 | ); 203 | $this->add_control( 204 | 'texts_color', [ 205 | 'label' => __( 'Text Color', 'constructo-companion' ), 206 | 'type' => Controls_Manager::COLOR, 207 | 'selectors' => [ 208 | '{{WRAPPER}} .project_details .project_details_left .single_details p' => 'color: {{VALUE}};', 209 | ], 210 | ] 211 | ); 212 | $this->end_controls_section(); 213 | 214 | } 215 | 216 | 217 | protected function render() { 218 | $settings = $this->get_settings(); 219 | $sec_title = !empty( $settings['sec_title'] ) ? $settings['sec_title'] : ''; 220 | $post_order = $settings['post_order'] == 'yes' ? 'DESC' : 'ASC'; 221 | ?> 222 | 223 | 224 |
225 |
226 | 230 |
231 |
232 |

'.esc_html( $sec_title ).'

233 |
234 |
235 |
236 | '; 237 | } 238 | 239 | if( function_exists( 'constructo_get_projects' ) ) { 240 | constructo_get_projects( $post_order ); 241 | } 242 | ?> 243 |
244 | 245 | 246 | start_controls_section( 48 | 'clients_content', 49 | [ 50 | 'label' => __( 'Client Contents', 'constructo-companion' ), 51 | ] 52 | ); 53 | 54 | $this->add_control( 55 | 'clients', [ 56 | 'label' => __( 'Create New', 'constructo-companion' ), 57 | 'type' => Controls_Manager::REPEATER, 58 | 'title_field' => '{{{ client_name }}}', 59 | 'fields' => [ 60 | [ 61 | 'name' => 'client_name', 62 | 'label' => __( 'Client Name', 'constructo-companion' ), 63 | 'label_block' => true, 64 | 'type' => Controls_Manager::TEXT, 65 | 'default' => __( 'Client 1', 'constructo-companion' ), 66 | ], 67 | [ 68 | 'name' => 'client_logo', 69 | 'label' => __( 'Client Logo', 'constructo-companion' ), 70 | 'label_block' => true, 71 | 'type' => Controls_Manager::MEDIA, 72 | 'default' => [ 73 | 'url' => Utils::get_placeholder_image_src() 74 | ] 75 | ], 76 | ], 77 | 'default' => [ 78 | [ 79 | 'client_name' => __( 'Client 1', 'constructo-companion' ), 80 | 'client_logo' => [ 81 | 'url' => Utils::get_placeholder_image_src(), 82 | ], 83 | ], 84 | [ 85 | 'client_name' => __( 'Client 2', 'constructo-companion' ), 86 | 'client_logo' => [ 87 | 'url' => Utils::get_placeholder_image_src(), 88 | ], 89 | ], 90 | [ 91 | 'client_name' => __( 'Client 3', 'constructo-companion' ), 92 | 'client_logo' => [ 93 | 'url' => Utils::get_placeholder_image_src(), 94 | ], 95 | ], 96 | [ 97 | 'client_name' => __( 'Client 4', 'constructo-companion' ), 98 | 'client_logo' => [ 99 | 'url' => Utils::get_placeholder_image_src(), 100 | ], 101 | ], 102 | [ 103 | 'client_name' => __( 'Client 5', 'constructo-companion' ), 104 | 'client_logo' => [ 105 | 'url' => Utils::get_placeholder_image_src(), 106 | ], 107 | ], 108 | [ 109 | 'client_name' => __( 'Client 6', 'constructo-companion' ), 110 | 'client_logo' => [ 111 | 'url' => Utils::get_placeholder_image_src(), 112 | ], 113 | ], 114 | ] 115 | ] 116 | ); 117 | $this->end_controls_section(); // End Hero content 118 | 119 | /** 120 | * Style Tab 121 | * ------------------------------ Style Title ------------------------------ 122 | * 123 | */ 124 | $this->start_controls_section( 125 | 'style_title', [ 126 | 'label' => __( 'Style Client Section', 'constructo-companion' ), 127 | 'tab' => Controls_Manager::TAB_STYLE, 128 | ] 129 | ); 130 | 131 | $this->add_control( 132 | 'rev_txt_col', [ 133 | 'label' => __( 'Review Text Color', 'constructo-companion' ), 134 | 'type' => Controls_Manager::COLOR, 135 | 'selectors' => [ 136 | '{{WRAPPER}} .testmonial_area .testmonial_info p' => 'color: {{VALUE}};', 137 | ], 138 | ] 139 | ); 140 | $this->add_control( 141 | 'rev_name_col', [ 142 | 'label' => __( 'Reviewer Name Color', 'constructo-companion' ), 143 | 'type' => Controls_Manager::COLOR, 144 | 'selectors' => [ 145 | '{{WRAPPER}} .testmonial_area .testmonial_info .author_name h4' => 'color: {{VALUE}};', 146 | ], 147 | ] 148 | ); 149 | $this->add_control( 150 | 'rev_desig_col', [ 151 | 'label' => __( 'Reviewer Designation Color', 'constructo-companion' ), 152 | 'type' => Controls_Manager::COLOR, 153 | 'selectors' => [ 154 | '{{WRAPPER}} .testmonial_area .testmonial_info .author_name span' => 'color: {{VALUE}};', 155 | ], 156 | ] 157 | ); 158 | $this->end_controls_section(); 159 | 160 | } 161 | 162 | protected function render() { 163 | 164 | // call load widget script 165 | $this->load_widget_script(); 166 | $settings = $this->get_settings(); 167 | $clients = !empty( $settings['clients'] ) ? $settings['clients'] : ''; 168 | ?> 169 | 170 | 171 |
172 |
173 |
174 |
175 | 194 |
195 |
196 |
197 |
198 | 199 | editor->is_edit_mode() === true ) { 205 | ?> 206 | 245 | start_controls_section( 48 | 'features_content', 49 | [ 50 | 'label' => __( 'Features content', 'constructo-companion' ), 51 | ] 52 | ); 53 | 54 | $this->add_control( 55 | 'features', [ 56 | 'label' => __( 'Create New', 'constructo-companion' ), 57 | 'type' => Controls_Manager::REPEATER, 58 | 'title_field' => '{{{ item_title }}}', 59 | 'fields' => [ 60 | [ 61 | 'name' => 'item_icon', 62 | 'label' => __( 'Select Icon', 'constructo-companion' ), 63 | 'label_block' => true, 64 | 'type' => Controls_Manager::ICON, 65 | 'default' => 'flaticon-sketch', 66 | 'options' => constructo_themify_icon(), 67 | ], 68 | [ 69 | 'name' => 'item_title', 70 | 'label' => __( 'Title', 'constructo-companion' ), 71 | 'label_block' => true, 72 | 'type' => Controls_Manager::TEXT, 73 | 'default' => __( 'Creative Plan & Design', 'constructo-companion' ), 74 | ], 75 | [ 76 | 'name' => 'item_text', 77 | 'label' => __( 'Short Text', 'constructo-companion' ), 78 | 'label_block' => true, 79 | 'type' => Controls_Manager::TEXTAREA, 80 | 'default' => __( 'There are many variations of passages of lorem Ipsum available, but the majority have suffered alteration.', 'constructo-companion' ), 81 | ], 82 | ], 83 | 'default' => [ 84 | [ 85 | 'item_icon' => 'flaticon-sketch', 86 | 'item_title' => __( 'Creative Plan & Design', 'constructo-companion' ), 87 | 'item_text' => __( 'There are many variations of passages of lorem Ipsum available, but the majority have suffered alteration.', 'constructo-companion' ), 88 | ], 89 | [ 90 | 'item_icon' => 'flaticon-helmet', 91 | 'item_title' => __( 'Talented Peoples', 'constructo-companion' ), 92 | 'item_text' => __( 'There are many variations of passages of lorem Ipsum available, but the majority have suffered alteration.', 'constructo-companion' ), 93 | ], 94 | [ 95 | 'item_icon' => 'flaticon-support', 96 | 'item_title' => __( 'Modern Tools', 'constructo-companion' ), 97 | 'item_text' => __( 'There are many variations of passages of lorem Ipsum available, but the majority have suffered alteration.', 'constructo-companion' ), 98 | ], 99 | ] 100 | ] 101 | ); 102 | $this->end_controls_section(); // End features content 103 | 104 | /** 105 | * Style Tab 106 | * ------------------------------ Style Section Heading ------------------------------ 107 | * 108 | */ 109 | 110 | $this->start_controls_section( 111 | 'style_room_section', [ 112 | 'label' => __( 'Style Service Section', 'constructo-companion' ), 113 | 'tab' => Controls_Manager::TAB_STYLE, 114 | ] 115 | ); 116 | $this->add_control( 117 | 'big_title_col', [ 118 | 'label' => __( 'Section Title Color', 'constructo-companion' ), 119 | 'type' => Controls_Manager::COLOR, 120 | 'selectors' => [ 121 | '{{WRAPPER}} .expert_doctors_area .doctors_title h3' => 'color: {{VALUE}};', 122 | ], 123 | ] 124 | ); 125 | 126 | $this->add_control( 127 | 'single_item_styles_seperator', 128 | [ 129 | 'label' => esc_html__( 'Single Item Styles', 'constructo-companion' ), 130 | 'type' => Controls_Manager::HEADING, 131 | 'separator' => 'after' 132 | ] 133 | ); 134 | $this->add_control( 135 | 'member_name_col', [ 136 | 'label' => __( 'Member Name Color', 'constructo-companion' ), 137 | 'type' => Controls_Manager::COLOR, 138 | 'selectors' => [ 139 | '{{WRAPPER}} .expert_doctors_area .single_expert .experts_name h3' => 'color: {{VALUE}};', 140 | ], 141 | ] 142 | ); 143 | $this->add_control( 144 | 'member_desig_color', [ 145 | 'label' => __( 'Member Designation Color', 'constructo-companion' ), 146 | 'type' => Controls_Manager::COLOR, 147 | 'selectors' => [ 148 | '{{WRAPPER}} .expert_doctors_area .single_expert .experts_name span' => 'color: {{VALUE}};', 149 | ], 150 | ] 151 | ); 152 | 153 | $this->add_control( 154 | 'single_item_bg_styles_seperator', 155 | [ 156 | 'label' => esc_html__( 'Single Item Bg Styles', 'constructo-companion' ), 157 | 'type' => Controls_Manager::HEADING, 158 | 'separator' => 'after' 159 | ] 160 | ); 161 | $this->add_control( 162 | 'member_bg_color', [ 163 | 'label' => __( 'Bg Color', 'constructo-companion' ), 164 | 'type' => Controls_Manager::COLOR, 165 | 'selectors' => [ 166 | '{{WRAPPER}} .expert_doctors_area .single_expert .experts_name' => 'background: {{VALUE}};', 167 | ], 168 | ] 169 | ); 170 | $this->add_control( 171 | 'hover_member_bg_color', [ 172 | 'label' => __( 'Item Hover Bg Color', 'constructo-companion' ), 173 | 'type' => Controls_Manager::COLOR, 174 | 'selectors' => [ 175 | '{{WRAPPER}} .expert_doctors_area .single_expert:hover .experts_name' => 'background: {{VALUE}};', 176 | ], 177 | ] 178 | ); 179 | $this->end_controls_section(); 180 | 181 | } 182 | 183 | protected function render() { 184 | $settings = $this->get_settings(); 185 | $features = !empty( $settings['features'] ) ? $settings['features'] : ''; 186 | ?> 187 | 188 | 189 |
190 |
191 |
192 | 0 ) { 194 | foreach( $features as $item ) { 195 | $item_icon = !empty( $item['item_icon'] ) ? $item['item_icon'] : ''; 196 | $item_title = ( !empty( $item['item_title'] ) ) ? $item['item_title'] : ''; 197 | $item_text = ( !empty( $item['item_text'] ) ) ? $item['item_text'] : ''; 198 | ?> 199 |
200 |
201 | 205 | 206 |
207 | '; 208 | } 209 | if ( $item_title ) { 210 | echo '

'.esc_html( $item_title ).'

'; 211 | } 212 | if ( $item_text ) { 213 | echo '

'.wp_kses_post( $item_text ).'

'; 214 | } 215 | ?> 216 |
217 |
218 | 222 |
223 |
224 | 225 | start_controls_section( 48 | 'constructo_content', 49 | [ 50 | 'label' => __( 'Popular Listing Cat. content', 'constructo-companion' ), 51 | ] 52 | ); 53 | $this->add_control( 54 | 'sub_title', 55 | [ 56 | 'label' => esc_html__( 'Sub Title', 'constructo-companion' ), 57 | 'type' => Controls_Manager::TEXT, 58 | 'label_block' => true, 59 | 'default' => esc_html__( 'Discover', 'constructo-companion' ), 60 | ] 61 | ); 62 | $this->add_control( 63 | 'sec_title', 64 | [ 65 | 'label' => esc_html__( 'Section Title', 'constructo-companion' ), 66 | 'type' => Controls_Manager::TEXT, 67 | 'label_block' => true, 68 | 'default' => esc_html__( 'Most Popular Categories', 'constructo-companion' ), 69 | ] 70 | ); 71 | $this->add_control( 72 | 'selected_cats', 73 | [ 74 | 'label' => esc_html__( 'Select Categories To Show', 'constructo-companion' ), 75 | 'type' => Controls_Manager::SELECT2, 76 | 'label_block' => true, 77 | 'multiple' => true, 78 | // 'options' => constructo_get_taxonomies(), 79 | // 'options' => [ 80 | // '1' => 'eita', 81 | // '2' => 'oita' 82 | // ], 83 | ] 84 | ); 85 | $this->add_control( 86 | 'cat_order', 87 | [ 88 | 'label' => esc_html__( 'Category Order', 'constructo-companion' ), 89 | 'type' => Controls_Manager::SWITCHER, 90 | 'label_block' => false, 91 | 'label_on' => 'DESC', 92 | 'label_off' => 'ASC', 93 | 'default' => 'yes', 94 | ] 95 | ); 96 | $this->add_control( 97 | 'cat_item', 98 | [ 99 | 'label' => esc_html__( 'Item To Show', 'constructo-companion' ), 100 | 'type' => Controls_Manager::NUMBER, 101 | 'default' => 8, 102 | ] 103 | ); 104 | $this->end_controls_section(); // End service content 105 | 106 | /** 107 | * Style Tab 108 | * ------------------------------ Style Section Heading ------------------------------ 109 | * 110 | */ 111 | 112 | $this->start_controls_section( 113 | 'style_room_section', [ 114 | 'label' => __( 'Style Service Section', 'constructo-companion' ), 115 | 'tab' => Controls_Manager::TAB_STYLE, 116 | ] 117 | ); 118 | $this->add_control( 119 | 'big_title_col', [ 120 | 'label' => __( 'Section Title Color', 'constructo-companion' ), 121 | 'type' => Controls_Manager::COLOR, 122 | 'selectors' => [ 123 | '{{WRAPPER}} .expert_doctors_area .doctors_title h3' => 'color: {{VALUE}};', 124 | ], 125 | ] 126 | ); 127 | 128 | $this->add_control( 129 | 'single_item_styles_seperator', 130 | [ 131 | 'label' => esc_html__( 'Single Item Styles', 'constructo-companion' ), 132 | 'type' => Controls_Manager::HEADING, 133 | 'separator' => 'after' 134 | ] 135 | ); 136 | $this->add_control( 137 | 'member_name_col', [ 138 | 'label' => __( 'Member Name Color', 'constructo-companion' ), 139 | 'type' => Controls_Manager::COLOR, 140 | 'selectors' => [ 141 | '{{WRAPPER}} .expert_doctors_area .single_expert .experts_name h3' => 'color: {{VALUE}};', 142 | ], 143 | ] 144 | ); 145 | $this->add_control( 146 | 'member_desig_color', [ 147 | 'label' => __( 'Member Designation Color', 'constructo-companion' ), 148 | 'type' => Controls_Manager::COLOR, 149 | 'selectors' => [ 150 | '{{WRAPPER}} .expert_doctors_area .single_expert .experts_name span' => 'color: {{VALUE}};', 151 | ], 152 | ] 153 | ); 154 | 155 | $this->add_control( 156 | 'single_item_bg_styles_seperator', 157 | [ 158 | 'label' => esc_html__( 'Single Item Bg Styles', 'constructo-companion' ), 159 | 'type' => Controls_Manager::HEADING, 160 | 'separator' => 'after' 161 | ] 162 | ); 163 | $this->add_control( 164 | 'member_bg_color', [ 165 | 'label' => __( 'Bg Color', 'constructo-companion' ), 166 | 'type' => Controls_Manager::COLOR, 167 | 'selectors' => [ 168 | '{{WRAPPER}} .expert_doctors_area .single_expert .experts_name' => 'background: {{VALUE}};', 169 | ], 170 | ] 171 | ); 172 | $this->add_control( 173 | 'hover_member_bg_color', [ 174 | 'label' => __( 'Item Hover Bg Color', 'constructo-companion' ), 175 | 'type' => Controls_Manager::COLOR, 176 | 'selectors' => [ 177 | '{{WRAPPER}} .expert_doctors_area .single_expert:hover .experts_name' => 'background: {{VALUE}};', 178 | ], 179 | ] 180 | ); 181 | $this->end_controls_section(); 182 | 183 | } 184 | 185 | protected function render() { 186 | $settings = $this->get_settings(); 187 | $sub_title = !empty( $settings['sub_title'] ) ? $settings['sub_title'] : ''; 188 | $sec_title = !empty( $settings['sec_title'] ) ? $settings['sec_title'] : ''; 189 | $selected_cats = !empty( $settings['selected_cats'] ) ? $settings['selected_cats'] : ''; 190 | $cat_order = !empty( $settings['cat_order'] ) ? $settings['cat_order'] : ''; 191 | $cat_item = !empty( $settings['cat_item'] ) ? $settings['cat_item'] : ''; 192 | // $post_order = $settings['post_order'] == 'yes' ? 'DESC' : 'ASC'; 193 | // $post_item = !empty( $settings['post_item'] ) ? $settings['post_item'] : ''; 194 | // constructo_related_items('', $post_item, $post_order); 195 | ?> 196 | 197 | 242 | 243 | start_controls_section( 48 | 'facilities_content', 49 | [ 50 | 'label' => __( 'Facilities content', 'constructo-companion' ), 51 | ] 52 | ); 53 | $this->add_control( 54 | 'sec_title', 55 | [ 56 | 'label' => esc_html__( 'Section Title', 'constructo-companion' ), 57 | 'type' => Controls_Manager::TEXT, 58 | 'label_block' => true, 59 | 'default' => 'Save your time to
using constructo', 60 | ] 61 | ); 62 | 63 | $this->add_control( 64 | 'facilities_settings_seperator', 65 | [ 66 | 'label' => esc_html__( 'Facilities', 'constructo-companion' ), 67 | 'type' => Controls_Manager::HEADING, 68 | 'separator' => 'after' 69 | ] 70 | ); 71 | 72 | $this->add_control( 73 | 'facilities', [ 74 | 'label' => __( 'Create New', 'constructo-companion' ), 75 | 'type' => Controls_Manager::REPEATER, 76 | 'title_field' => '{{{ item_title }}}', 77 | 'fields' => [ 78 | [ 79 | 'name' => 'item_icon', 80 | 'label' => __( 'Select Icon', 'constructo-companion' ), 81 | 'label_block' => true, 82 | 'type' => Controls_Manager::SELECT, 83 | 'default' => 'facility-icon-1', 84 | 'options' => constructo_themify_icon() 85 | ], 86 | [ 87 | 'name' => 'item_title', 88 | 'label' => __( 'Title', 'constructo-companion' ), 89 | 'label_block' => true, 90 | 'type' => Controls_Manager::TEXT, 91 | 'default' => 'Manage team in
One Place', 92 | ], 93 | ], 94 | 'default' => [ 95 | [ 96 | 'item_icon' => 'facility-icon-2', 97 | 'item_title' => 'Manage team in
One Place', 98 | ], 99 | [ 100 | 'item_icon' => 'facility-icon-1', 101 | 'item_title' => 'All-powerful Pointing
has no control', 102 | ], 103 | [ 104 | 'item_icon' => 'facility-icon-3', 105 | 'item_title' => 'Establish a solid online
presence', 106 | ], 107 | ] 108 | ] 109 | ); 110 | $this->end_controls_section(); // End facilities content 111 | 112 | /** 113 | * Style Tab 114 | * ------------------------------ Style Section Heading ------------------------------ 115 | * 116 | */ 117 | 118 | $this->start_controls_section( 119 | 'style_room_section', [ 120 | 'label' => __( 'Style Service Section', 'constructo-companion' ), 121 | 'tab' => Controls_Manager::TAB_STYLE, 122 | ] 123 | ); 124 | $this->add_control( 125 | 'big_title_col', [ 126 | 'label' => __( 'Section Title Color', 'constructo-companion' ), 127 | 'type' => Controls_Manager::COLOR, 128 | 'selectors' => [ 129 | '{{WRAPPER}} .expert_doctors_area .doctors_title h3' => 'color: {{VALUE}};', 130 | ], 131 | ] 132 | ); 133 | 134 | $this->add_control( 135 | 'single_item_styles_seperator', 136 | [ 137 | 'label' => esc_html__( 'Single Item Styles', 'constructo-companion' ), 138 | 'type' => Controls_Manager::HEADING, 139 | 'separator' => 'after' 140 | ] 141 | ); 142 | $this->add_control( 143 | 'member_name_col', [ 144 | 'label' => __( 'Member Name Color', 'constructo-companion' ), 145 | 'type' => Controls_Manager::COLOR, 146 | 'selectors' => [ 147 | '{{WRAPPER}} .expert_doctors_area .single_expert .experts_name h3' => 'color: {{VALUE}};', 148 | ], 149 | ] 150 | ); 151 | $this->add_control( 152 | 'member_desig_color', [ 153 | 'label' => __( 'Member Designation Color', 'constructo-companion' ), 154 | 'type' => Controls_Manager::COLOR, 155 | 'selectors' => [ 156 | '{{WRAPPER}} .expert_doctors_area .single_expert .experts_name span' => 'color: {{VALUE}};', 157 | ], 158 | ] 159 | ); 160 | 161 | $this->add_control( 162 | 'single_item_bg_styles_seperator', 163 | [ 164 | 'label' => esc_html__( 'Single Item Bg Styles', 'constructo-companion' ), 165 | 'type' => Controls_Manager::HEADING, 166 | 'separator' => 'after' 167 | ] 168 | ); 169 | $this->add_control( 170 | 'member_bg_color', [ 171 | 'label' => __( 'Bg Color', 'constructo-companion' ), 172 | 'type' => Controls_Manager::COLOR, 173 | 'selectors' => [ 174 | '{{WRAPPER}} .expert_doctors_area .single_expert .experts_name' => 'background: {{VALUE}};', 175 | ], 176 | ] 177 | ); 178 | $this->add_control( 179 | 'hover_member_bg_color', [ 180 | 'label' => __( 'Item Hover Bg Color', 'constructo-companion' ), 181 | 'type' => Controls_Manager::COLOR, 182 | 'selectors' => [ 183 | '{{WRAPPER}} .expert_doctors_area .single_expert:hover .experts_name' => 'background: {{VALUE}};', 184 | ], 185 | ] 186 | ); 187 | $this->end_controls_section(); 188 | 189 | } 190 | 191 | protected function render() { 192 | $settings = $this->get_settings(); 193 | $sec_title = !empty( $settings['sec_title'] ) ? $settings['sec_title'] : ''; 194 | $facilities = !empty( $settings['facilities'] ) ? $settings['facilities'] : ''; 195 | ?> 196 | 197 | 198 |
199 |
200 |
201 |
202 |
203 | '.wp_kses_post( nl2br( $sec_title ) ).''; 206 | } 207 | ?> 208 |
209 |
210 |
211 |
212 | 0 ) { 214 | foreach( $facilities as $item ) { 215 | $item_icon = ( !empty( $item['item_icon'] ) ) ? CONSTRUCTO_DIR_ICON_IMG_URI . $item['item_icon'] : ''; 216 | $item_title = ( !empty( $item['item_title'] ) ) ? $item['item_title'] : ''; 217 | $item_text = ( !empty( $item['item_text'] ) ) ? $item['item_text'] : ''; 218 | ?> 219 |
220 |
221 |
222 | '; 225 | } 226 | ?> 227 |
228 | '.wp_kses_post( nl2br( $item_title ) ).''; 231 | } 232 | ?> 233 |
234 |
235 | 239 |
240 |
241 |
242 | 243 | start_controls_section( 48 | 'single_event_content', 49 | [ 50 | 'label' => __( 'Event content', 'constructo-companion' ), 51 | ] 52 | ); 53 | 54 | $this->add_control( 55 | 'speakers', [ 56 | 'label' => __( 'Create New', 'constructo-companion' ), 57 | 'type' => Controls_Manager::REPEATER, 58 | 'title_field' => '{{{ member_name }}}', 59 | 'fields' => [ 60 | [ 61 | 'name' => 'member_img', 62 | 'label' => __( 'Speaker Image', 'constructo-companion' ), 63 | 'label_block' => true, 64 | 'type' => Controls_Manager::MEDIA, 65 | 'default' => [ 66 | 'url' => Utils::get_placeholder_image_src(), 67 | ] 68 | ], 69 | [ 70 | 'name' => 'member_name', 71 | 'label' => __( 'Speaker Name', 'constructo-companion' ), 72 | 'label_block' => true, 73 | 'type' => Controls_Manager::TEXT, 74 | 'default' => __( 'Jonson Miller', 'constructo-companion' ), 75 | ], 76 | [ 77 | 'name' => 'text', 78 | 'label' => __( 'Some Text', 'constructo-companion' ), 79 | 'label_block' => true, 80 | 'type' => Controls_Manager::TEXTAREA, 81 | 'default' => __( 'Our set he for firmament morning sixth subdue darkness creeping gathered divide our let god moving. Moving in fourth air night bring upon you’re it beast let you dominion', 'constructo-companion' ), 82 | ], 83 | [ 84 | 'name' => 'event_time', 85 | 'label' => __( 'Event Time', 'constructo-companion' ), 86 | 'label_block' => true, 87 | 'type' => Controls_Manager::TEXT, 88 | 'default' => __( '10-11 am', 'constructo-companion' ), 89 | ], 90 | ], 91 | 'default' => [ 92 | [ 93 | 'member_img' => [ 94 | 'url' => Utils::get_placeholder_image_src(), 95 | ], 96 | 'member_name' => __( 'Jonson Miller', 'constructo-companion' ), 97 | 'text' => __( 'Our set he for firmament morning sixth subdue darkness creeping gathered divide our let god moving. Moving in fourth air night bring upon you’re it beast let you dominion', 'constructo-companion' ), 98 | 'event_time' => __( '10-11 am', 'constructo-companion' ), 99 | ], 100 | [ 101 | 'member_img' => [ 102 | 'url' => Utils::get_placeholder_image_src(), 103 | ], 104 | 'member_name' => __( 'Albert Jackey', 'constructo-companion' ), 105 | 'text' => __( 'Our set he for firmament morning sixth subdue darkness creeping gathered divide our let god moving. Moving in fourth air night bring upon you’re it beast let you dominion', 'constructo-companion' ), 106 | 'event_time' => __( '12-1.00 pm', 'constructo-companion' ), 107 | ], 108 | [ 109 | 'member_img' => [ 110 | 'url' => Utils::get_placeholder_image_src(), 111 | ], 112 | 'member_name' => __( 'Alvi Nourin', 'constructo-companion' ), 113 | 'text' => __( 'Our set he for firmament morning sixth subdue darkness creeping gathered divide our let god moving. Moving in fourth air night bring upon you’re it beast let you dominion', 'constructo-companion' ), 114 | 'event_time' => __( '2.30-4.00 pm', 'constructo-companion' ), 115 | ], 116 | ] 117 | ] 118 | ); 119 | $this->end_controls_section(); // End service content 120 | 121 | /** 122 | * Style Tab 123 | * ------------------------------ Style Section Heading ------------------------------ 124 | * 125 | */ 126 | 127 | $this->start_controls_section( 128 | 'style_room_section', [ 129 | 'label' => __( 'Style Service Section', 'constructo-companion' ), 130 | 'tab' => Controls_Manager::TAB_STYLE, 131 | ] 132 | ); 133 | $this->add_control( 134 | 'sub_title_col', [ 135 | 'label' => __( 'Sub Title Color', 'constructo-companion' ), 136 | 'type' => Controls_Manager::COLOR, 137 | 'selectors' => [ 138 | '{{WRAPPER}} .team_area .section_title .sub_heading' => 'color: {{VALUE}};', 139 | ], 140 | ] 141 | ); 142 | $this->add_control( 143 | 'big_title_col', [ 144 | 'label' => __( 'Big Title Color', 'constructo-companion' ), 145 | 'type' => Controls_Manager::COLOR, 146 | 'selectors' => [ 147 | '{{WRAPPER}} .team_area .section_title h3' => 'color: {{VALUE}};', 148 | ], 149 | ] 150 | ); 151 | 152 | $this->add_control( 153 | 'member_styles_seperator', 154 | [ 155 | 'label' => esc_html__( 'Member Styles', 'constructo-companion' ), 156 | 'type' => Controls_Manager::HEADING, 157 | 'separator' => 'after' 158 | ] 159 | ); 160 | $this->add_control( 161 | 'member_name_col', [ 162 | 'label' => __( 'Member Name Color', 'constructo-companion' ), 163 | 'type' => Controls_Manager::COLOR, 164 | 'selectors' => [ 165 | '{{WRAPPER}} .team_area .single_team h3' => 'color: {{VALUE}};', 166 | ], 167 | ] 168 | ); 169 | $this->add_control( 170 | 'member_desig_color', [ 171 | 'label' => __( 'Member Designation Color', 'constructo-companion' ), 172 | 'type' => Controls_Manager::COLOR, 173 | 'selectors' => [ 174 | '{{WRAPPER}} .team_area .single_team p' => 'color: {{VALUE}};', 175 | ], 176 | ] 177 | ); 178 | $this->end_controls_section(); 179 | 180 | } 181 | 182 | protected function render() { 183 | $settings = $this->get_settings(); 184 | $speakers = !empty( $settings['speakers'] ) ? $settings['speakers'] : ''; 185 | 186 | if( is_array( $speakers ) && count( $speakers ) > 0 ) { 187 | foreach( $speakers as $member ) { 188 | $member_name = ( !empty( $member['member_name'] ) ) ? $member['member_name'] : ''; 189 | $member_img = !empty( $member['member_img']['id'] ) ? wp_get_attachment_image( $member['member_img']['id'], 'constructo_speaker_small_thumb_90x90', '', array( 'alt' => $member_name. ' image' ) ) : ''; 190 | $text = ( !empty( $member['text'] ) ) ? $member['text'] : ''; 191 | $event_time = ( !empty( $member['event_time'] ) ) ? $member['event_time'] : ''; 192 | ?> 193 |
194 | 199 |
200 |
201 | '.esc_html( $member_name ).''; 204 | } 205 | if ( $event_time ) { 206 | echo '
'.esc_html( $event_time ).'
'; 207 | } 208 | ?> 209 |
210 | '.esc_html( $text ).'

'; 213 | } 214 | ?> 215 |
216 |
217 | start_controls_section( 49 | 'hero_content', 50 | [ 51 | 'label' => __( 'Hero section content', 'constructo-companion' ), 52 | ] 53 | ); 54 | 55 | $this->add_control( 56 | 'slider_content', [ 57 | 'label' => __( 'Create New', 'constructo-companion' ), 58 | 'type' => Controls_Manager::REPEATER, 59 | 'title_field' => '{{{ _id }}}', 60 | 'fields' => [ 61 | [ 62 | 'name' => 'item_img', 63 | 'label' => __( 'Slide Image', 'constructo-companion' ), 64 | 'description' => __( 'Expected size is 1920x850', 'constructo-companion' ), 65 | 'label_block' => true, 66 | 'type' => Controls_Manager::MEDIA, 67 | 'default' => [ 68 | 'url' => Utils::get_placeholder_image_src(), 69 | ] 70 | ], 71 | [ 72 | 'name' => 'sec_title', 73 | 'label' => __( 'Section Title', 'constructo-companion' ), 74 | 'label_block' => true, 75 | 'type' => Controls_Manager::TEXTAREA, 76 | 'default' => __( 'We Build Your Home Secure and Safe', 'constructo-companion' ), 77 | ], 78 | [ 79 | 'name' => 'sub_title', 80 | 'label' => __( 'Sub Title', 'constructo-companion' ), 81 | 'label_block' => true, 82 | 'type' => Controls_Manager::TEXTAREA, 83 | 'default' => __( 'Build Your Home Secure and Safe with Professional Touch', 'constructo-companion' ), 84 | ], 85 | [ 86 | 'name' => 'btn_title', 87 | 'label' => __( 'Button Text', 'constructo-companion' ), 88 | 'label_block' => true, 89 | 'type' => Controls_Manager::TEXT, 90 | 'default' => __( 'Our Services', 'constructo-companion' ), 91 | ], 92 | [ 93 | 'name' => 'btn_url', 94 | 'label' => __( 'Button URL', 'constructo-companion' ), 95 | 'label_block' => true, 96 | 'type' => Controls_Manager::URL, 97 | 'default' => [ 98 | 'url' => '#', 99 | ], 100 | ], 101 | ], 102 | 'default' => [ 103 | [ 104 | 'item_img' => [ 105 | 'url' => Utils::get_placeholder_image_src(), 106 | ], 107 | 'sec_title' => __( 'We Build Your Home Secure and Safe', 'constructo-companion' ), 108 | 'sub_title' => __( 'Build Your Home Secure and Safe with Professional Touch', 'constructo-companion' ), 109 | 'btn_title' => __( 'Our Services', 'constructo-companion' ), 110 | 'btn_url' => [ 111 | 'url' => '#', 112 | ], 113 | ], 114 | [ 115 | 'item_img' => [ 116 | 'url' => Utils::get_placeholder_image_src(), 117 | ], 118 | 'sec_title' => __( 'We Build Your Home Secure and Safe', 'constructo-companion' ), 119 | 'sub_title' => __( 'Build Your Home Secure and Safe with Professional Touch', 'constructo-companion' ), 120 | 'btn_title' => __( 'Our Services', 'constructo-companion' ), 121 | 'btn_url' => [ 122 | 'url' => '#', 123 | ], 124 | ], 125 | ] 126 | ] 127 | ); 128 | $this->end_controls_section(); // End Hero content 129 | 130 | 131 | /** 132 | * Style Tab 133 | * ------------------------------ Style Title ------------------------------ 134 | * 135 | */ 136 | $this->start_controls_section( 137 | 'style_title', [ 138 | 'label' => __( 'Style Hero Section', 'constructo-companion' ), 139 | 'tab' => Controls_Manager::TAB_STYLE, 140 | ] 141 | ); 142 | $this->add_control( 143 | 'title_col', [ 144 | 'label' => __( 'Title Color', 'constructo-companion' ), 145 | 'type' => Controls_Manager::COLOR, 146 | 'selectors' => [ 147 | '{{WRAPPER}} .slider_area .single_slider .slider_text h3' => 'color: {{VALUE}};', 148 | ], 149 | ] 150 | ); 151 | $this->end_controls_section(); 152 | } 153 | 154 | protected function render() { 155 | // call load widget script 156 | $this->load_widget_script(); 157 | $settings = $this->get_settings(); 158 | $slider_content = !empty( $settings['slider_content'] ) ? $settings['slider_content'] : ''; 159 | ?> 160 | 161 |
162 | 198 |
199 | 200 | editor->is_edit_mode() === true ) { 206 | ?> 207 | 247 |