├── inc ├── demo-data │ ├── screen-image.jpg │ ├── css │ │ └── demo-import.css │ ├── hostza-customizer.dat │ ├── hostza-widgets-demo.wie │ └── demo-import.php ├── elementor-widgets │ ├── assets │ │ ├── css │ │ │ ├── elementor-edit.css │ │ │ ├── utility.css │ │ │ ├── owl.carousel.min.css │ │ │ └── magnific-popup.css │ │ ├── fonts │ │ │ └── themify-icon │ │ │ │ └── fonts │ │ │ │ ├── themify.eot │ │ │ │ ├── themify.ttf │ │ │ │ └── themify.woff │ │ └── js │ │ │ ├── map-active.js │ │ │ ├── progress-loader-canvas.js │ │ │ ├── jquery.counterup.js │ │ │ ├── imagesLoaded.js │ │ │ ├── hostza-companion-main.js │ │ │ ├── barfiller.js │ │ │ ├── waypoints.js │ │ │ └── jquery.youtubebackground.js │ └── widgets │ │ ├── single-pricing-table.php │ │ ├── hero-section.php │ │ ├── core-feature-tab-items.php │ │ ├── statistics.php │ │ ├── price-table.php │ │ ├── blog.php │ │ ├── simple-contact-section.php │ │ ├── faq-tab-item.php │ │ ├── support-section.php │ │ ├── contact.php │ │ ├── lets-launch.php │ │ ├── video-section.php │ │ └── core-features.php ├── hostza-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 ├── hostza-init.php ├── hostza-companion.php └── readme.txt /inc/demo-data/screen-image.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColorlibHQ/hostza-companion/master/inc/demo-data/screen-image.jpg -------------------------------------------------------------------------------- /inc/elementor-widgets/assets/css/elementor-edit.css: -------------------------------------------------------------------------------- 1 | .elementor-choices-label i { 2 | font-size: 18px !important; 3 | padding: 5px 0; 4 | } -------------------------------------------------------------------------------- /inc/elementor-widgets/assets/fonts/themify-icon/fonts/themify.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColorlibHQ/hostza-companion/master/inc/elementor-widgets/assets/fonts/themify-icon/fonts/themify.eot -------------------------------------------------------------------------------- /inc/elementor-widgets/assets/fonts/themify-icon/fonts/themify.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColorlibHQ/hostza-companion/master/inc/elementor-widgets/assets/fonts/themify-icon/fonts/themify.ttf -------------------------------------------------------------------------------- /inc/elementor-widgets/assets/fonts/themify-icon/fonts/themify.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColorlibHQ/hostza-companion/master/inc/elementor-widgets/assets/fonts/themify-icon/fonts/themify.woff -------------------------------------------------------------------------------- /inc/demo-data/css/demo-import.css: -------------------------------------------------------------------------------- 1 | .ocdi__demo-import-notice:not(:empty) { 2 | background-color: transparent !important; 3 | border-left: 0px !important; 4 | box-shadow: none !important; 5 | padding: 0px !important; 6 | } 7 | .ocdi__demo-import-notice img { 8 | border: 4px solid #dbe3ea; 9 | width: auto; 10 | } 11 | .about-wrap .ocdi__demo-import-notice img { 12 | width: auto; 13 | } 14 | .about-wrap img { 15 | width: auto; 16 | } -------------------------------------------------------------------------------- /inc/hostza-metabox.php: -------------------------------------------------------------------------------- 1 | 'page_single_metaboxs', 7 | 'title' => esc_html__( 'Page Footer Options', 'hostza-companion' ), 8 | 'post_types'=> array( 'page' ), 9 | 'priority' => 'high', 10 | 'autosave' => 'false', 11 | 'fields' => array( 12 | array( 13 | 'id' => $hostza_prefix . 'footer-background', 14 | 'type' => 'background', 15 | 'name' => esc_html__( 'Set The Footer Background', 'hostza-companion' ), 16 | ), 17 | ), 18 | ); 19 | 20 | 21 | return $meta_boxes; 22 | } 23 | add_filter( 'rwmb_meta_boxes', 'hostza_page_metabox' ); -------------------------------------------------------------------------------- /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 | .hostza-pt-100 { 5 | padding-top: 100px; 6 | } 7 | .hostza-pt-80 { 8 | padding-top: 80px; 9 | } 10 | .hostza-pt-70 { 11 | padding-top: 70px; 12 | } 13 | .hostza-pt-60 { 14 | padding-top: 60px; 15 | } 16 | .hostza-pt-50 { 17 | padding-top: 50px; 18 | } 19 | .hostza-pt-30 { 20 | padding-top: 30px; 21 | } 22 | .hostza-pb-100 { 23 | padding-bottom: 100px; 24 | } 25 | .hostza-pb-80 { 26 | padding-bottom: 80px; 27 | } 28 | .hostza-pb-70 { 29 | padding-bottom: 70px; 30 | } 31 | .hostza-pb-60 { 32 | padding-bottom: 60px; 33 | } 34 | .hostza-pb-50 { 35 | padding-bottom: 50px; 36 | } 37 | .hostza-pb-30 { 38 | padding-bottom: 30px; 39 | } 40 | -------------------------------------------------------------------------------- /hostza-init.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /inc/demo-data/hostza-customizer.dat: -------------------------------------------------------------------------------- 1 | a:4:{s:8:"template";s:6:"hostza";s:4:"mods";a:20:{i:0;b:0;s:18:"nav_menu_locations";a:3:{s:12:"primary-menu";i:28;s:12:"service-menu";i:32;s:15:"navigation-menu";i:29;}s:18:"custom_css_post_id";i:-1;s:27:"hostza_footer_widget_toggle";b:1;s:16:"hostza_blog_meta";b:1;s:15:"hostza_like_btn";b:1;s:17:"hostza_blog_share";b:1;s:11:"custom_logo";i:37;s:22:"hostza_footer_bg_color";s:7:"#2e004b";s:31:"hostza_footer_widget_text_color";s:7:"#999999";s:33:"hostza_footer_widget_anchor_color";s:7:"#bababa";s:32:"hostza_footer_widget_title_color";s:7:"#ffffff";s:39:"hostza_footer_widget_anchor_hover_color";s:7:"#00d363";s:22:"hostza_header_bg_color";s:7:"#2e004b";s:24:"hostza_header_menu_color";s:7:"#ffffff";s:30:"hostza_header_menu_hover_color";s:7:"#ffffff";s:29:"hostza_header_drop_menu_color";s:7:"#000000";s:35:"hostza_header_drop_menu_hover_color";s:7:"#000000";s:31:"hostza_header_menu_border_color";s:7:"#00d363";s:29:"hostza_header_right_btn_color";s:7:"#00d363";}s:7:"options";a:2:{s:9:"site_icon";s:2:"41";s:23:"nav_menus_created_posts";a:0:{}}s:6:"wp_css";s:0:"";} -------------------------------------------------------------------------------- /inc/demo-data/hostza-widgets-demo.wie: -------------------------------------------------------------------------------- 1 | {"sidebar_widgets":{"search-2":{"title":""},"categories-3":{"title":"Categories","count":1,"hierarchical":0,"dropdown":0},"hostza_blog_widget-1":{"sectiontitle":"Recent Post","postnumber":"4","style":"1"},"tag_cloud-1":{"title":"Tag Clouds","count":0,"taxonomy":"post_tag"},"hostza_newsletter-1":{"title":"Newsletter","actionurl":"https:\/\/spondonit.us12.list-manage.com\/subscribe\/post?u=1462626880ade1ac87bd9c93a&id=92a4423d01","desc":""}},"footer-1":{"text-3":{"title":"","text":"

+10 783 467 3789\r\n <\/a>
\r\n
hostza@support.com<\/a><\/p>","filter":true,"visual":true},"hostza_social_links-2":{"title":"","desc":"","facebook":"#","twitter":"#","linkedin":"","instagram":"#","dribbble":""}},"footer-2":{"nav_menu-2":{"title":"Service","nav_menu":32}},"footer-3":{"nav_menu-1":{"title":"Navigation","nav_menu":"29"}},"footer-4":{"hostza_newsletter-3":{"title":"Newsletter","actionurl":"https:\/\/spondonit.us12.list-manage.com\/subscribe\/post?u=1462626880ade1ac87bd9c93a&id=92a4423d01","desc":"Subscribe newsletter to get updates"}}} -------------------------------------------------------------------------------- /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' : 'hostza_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 | $( '.hostza-portfolio-load' ).html(data); 38 | 39 | var $container = $('.hostza-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); -------------------------------------------------------------------------------- /hostza-companion.php: -------------------------------------------------------------------------------- 1 | parent(); 57 | 58 | 59 | 60 | if( ( 'Hostza' == $current_theme->get( 'Name' ) ) || ( $is_parent && 'Hostza' == $is_parent->get( 'Name' ) ) ){ 61 | require_once HOSTZA_COMPANION_DIR_PATH . 'hostza-init.php'; 62 | }else{ 63 | 64 | add_action( 'admin_notices', 'hostza_companion_admin_notice', 99 ); 65 | function hostza_companion_admin_notice() { 66 | $url = 'https://demo.colorlib.com/hostza/'; 67 | ?> 68 |

69 |

Hostza Companion plugin you have to also install the %1$sHostza Theme%2$s', 'hostza-companion' ), '', '' ); ?>

70 |
71 | -------------------------------------------------------------------------------- /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.5.1 6 | Stable tag: trunk 7 | License: GPLv3 or later 8 | License URI: http://www.gnu.org/licenses/gpl-3.0.html 9 | 10 | Hostza 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 `hostza-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' => 'Hostza Demo', 21 | 'local_import_file' => HOSTZA_COMPANION_DEMO_DIR_PATH .'hostza-demo.xml', 22 | 'local_import_widget_file' => HOSTZA_COMPANION_DEMO_DIR_PATH .'hostza-widgets-demo.wie', 23 | 'import_customizer_file_url' => plugins_url( 'hostza-customizer.dat', __FILE__ ), 24 | 'import_notice' => $demoImg, 25 | ), 26 | ); 27 | } 28 | add_filter( 'pt-ocdi/import_files', 'hostza_import_files' ); 29 | 30 | 31 | // demo import setup 32 | function hostza_after_import_setup() { 33 | // Assign menus to their locations. 34 | $main_menu = get_term_by( 'name', 'Main Menu', 'nav_menu' ); 35 | $service_menu = get_term_by( 'name', 'Service', 'nav_menu' ); 36 | $navigation_menu = get_term_by( 'name', 'Navigation', 'nav_menu' ); 37 | 38 | set_theme_mod( 'nav_menu_locations', array( 39 | 'primary-menu' => $main_menu->term_id, 40 | 'service-menu' => $service_menu->term_id, 41 | 'navigation-menu' => $navigation_menu->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 | hostza_update_the_followed_post_page_status(); 56 | 57 | // Add an option to check after import is done 58 | update_option( 'hostza-import-data', true ); 59 | 60 | } 61 | add_action( 'pt-ocdi/after_import', 'hostza_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 hostza_import_plugin_page_setup( $default_settings ) { 68 | $default_settings['parent_slug'] = 'themes.php'; 69 | $default_settings['page_title'] = esc_html__( 'One Click Demo Import' , 'hostza-companion' ); 70 | $default_settings['menu_title'] = esc_html__( 'Import Demo Data' , 'hostza-companion' ); 71 | $default_settings['capability'] = 'import'; 72 | $default_settings['menu_slug'] = 'hostza-demo-import'; 73 | 74 | return $default_settings; 75 | } 76 | add_filter( 'pt-ocdi/plugin_page_setup', 'hostza_import_plugin_page_setup' ); 77 | 78 | // Enqueue scripts 79 | function hostza_demo_import_custom_scripts(){ 80 | 81 | 82 | if( isset( $_GET['page'] ) && $_GET['page'] == 'hostza-demo-import' ){ 83 | // style 84 | wp_enqueue_style( 'hostza-demo-import', plugins_url( 'css/demo-import.css', __FILE__ ), array(), '1.0', false ); 85 | } 86 | 87 | 88 | } 89 | add_action( 'admin_enqueue_scripts', 'hostza_demo_import_custom_scripts' ); 90 | 91 | 92 | -------------------------------------------------------------------------------- /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__('Hostza Instagram Photo Widget','hostza-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 = hostza_opt( 'hostza_igaccess_token' ); 42 | } 43 | 44 | /** 45 | * @param $screen_name string Instagram username 46 | * @param $image_limit int Number of images to retrieve 47 | * @param $image_width int Desired image width to retrieve 48 | * 49 | * @return array|bool Array of tweets or false if method fails 50 | */ 51 | public function get_items( $image_limit, $image_width ) { 52 | 53 | $transient = 'zoom_instagram_is_configured'; 54 | 55 | $response = wp_remote_get( sprintf( 'https://api.instagram.com/v1/users/self/media/recent/?access_token=%s&count=%s', $this->access_token, $image_limit ) ); 56 | 57 | 58 | if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) ) { 59 | set_transient( $transient, false, MINUTE_IN_SECONDS ); 60 | 61 | return false; 62 | } 63 | 64 | 65 | 66 | $data = json_decode( wp_remote_retrieve_body( $response ) ); 67 | 68 | $result = array(); 69 | $username = ''; 70 | 71 | foreach ( $data->data as $item ) { 72 | 73 | if(empty($username)){ 74 | $username = $item->user->username; 75 | } 76 | 77 | $result[] = array( 78 | 'link' => $item->link, 79 | 'image-url' => $item->images->{ $this->get_best_size( $image_width ) }->url, 80 | 'likes' => $item->likes->count, 81 | 'comments' => $item->comments->count, 82 | 'location' => !empty( $item->location->name ) ? $item->location->name : '' 83 | ); 84 | } 85 | 86 | $result = array('items' => $result, 'username'=> $username ); 87 | set_transient( $transient, $result, 30 * MINUTE_IN_SECONDS ); 88 | 89 | return $result; 90 | } 91 | 92 | /** 93 | * @param $screen_name string Instagram username 94 | * 95 | * @return bool|int Instagram user id or false on error 96 | */ 97 | protected function get_user_id( $screen_name ) { 98 | $user_id_option = 'zoom_instagram_uid_' . $screen_name; 99 | 100 | if ( false !== ( $user_id = get_option( $user_id_option ) ) ) { 101 | return $user_id; 102 | } 103 | 104 | $response = wp_remote_get( sprintf( 'https://api.instagram.com/v1/users/search?q=%s&access_token=%s', $screen_name, $this->access_token ) ); 105 | 106 | if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) ) { 107 | return false; 108 | } 109 | 110 | $result = json_decode( wp_remote_retrieve_body( $response ) ); 111 | 112 | if ( ! isset( $result->data ) ) { 113 | return false; 114 | } 115 | 116 | $user_id = false; 117 | 118 | foreach ( $result->data as $user ) { 119 | if ( $user->username === $screen_name ) { 120 | $user_id = $user->id; 121 | 122 | break; 123 | } 124 | } 125 | 126 | update_option( $user_id_option, $user_id ); 127 | 128 | return $user_id; 129 | } 130 | 131 | /** 132 | * @param $desired_width int Desired image width in pixels 133 | * 134 | * @return string Image size for Instagram API 135 | */ 136 | protected function get_best_size( $desired_width ) { 137 | $size = 'thumbnail'; 138 | $sizes = array( 139 | 'thumbnail' => 137, 140 | 'low_resolution' => 150, 141 | 'standard_resolution' => 640 142 | ); 143 | 144 | $diff = PHP_INT_MAX; 145 | 146 | foreach ( $sizes as $key => $value ) { 147 | if ( abs( $desired_width - $value ) < $diff ) { 148 | $size = $key; 149 | $diff = abs( $desired_width - $value ); 150 | } 151 | } 152 | 153 | return $size; 154 | } 155 | 156 | /** 157 | * Check if given access token is valid for Instagram Api. 158 | */ 159 | public static function is_access_token_valid( $access_token ) { 160 | $response = wp_remote_get( sprintf( 'https://api.instagram.com/v1/users/self/?access_token=%s', $access_token ) ); 161 | 162 | if ( is_wp_error( $response ) ) { 163 | return $response; 164 | } 165 | 166 | if ( 200 != wp_remote_retrieve_response_code( $response ) ) { 167 | return false; 168 | } 169 | 170 | return true; 171 | } 172 | 173 | public function is_configured() { 174 | $transient = 'zoom_instagram_is_configured'; 175 | 176 | if ( false !== ( $result = get_transient( $transient ) ) ) { 177 | if ( 'yes' === $result ) { 178 | return true; 179 | } 180 | 181 | if ( 'no' === $result ) { 182 | return false; 183 | } 184 | } 185 | 186 | $condition = $this->is_access_token_valid( $this->access_token ); 187 | 188 | if ( true === $condition ) { 189 | set_transient( $transient, 'yes', DAY_IN_SECONDS ); 190 | 191 | return true; 192 | } 193 | 194 | set_transient( $transient, 'no', DAY_IN_SECONDS ); 195 | 196 | return false; 197 | } 198 | 199 | public static function reset_cache() { 200 | delete_transient( 'zoom_instagram_is_configured' ); 201 | } 202 | 203 | public function get_access_token() { 204 | return $this->access_token; 205 | } 206 | 207 | public function set_access_token( $access_token ) { 208 | $this->access_token = $access_token; 209 | } 210 | } 211 | ?> -------------------------------------------------------------------------------- /inc/sidebar-widgets/blog-widget.php: -------------------------------------------------------------------------------- 1 | esc_html__( 'Show most latest blog post.', 'hostza-companion' ), ) 34 | ); 35 | 36 | } 37 | 38 | // This is where the action happens 39 | public function widget( $args, $instance ) { 40 | $title = apply_filters( 'hostza_blog_sectiontitle', $instance['sectiontitle'] ); 41 | $postnumber = apply_filters( 'hostza_blog_postnumber', $instance['postnumber'] ); 42 | $style = apply_filters( 'hostza_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.', 'hostza-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( 47 | 'single_pricing_item_content', 48 | [ 49 | 'label' => __( 'Single Pricing Item', 'hostza-companion' ), 50 | ] 51 | ); 52 | $this->add_control( 53 | 'sites', 54 | [ 55 | 'label' => __( 'Sites', 'hostza-companion' ), 56 | 'type' => Controls_Manager::TEXT, 57 | 'label_block' => true, 58 | 'default' => __( '1 Site', 'hostza-companion' ), 59 | ] 60 | ); 61 | $this->add_control( 62 | 'visits', 63 | [ 64 | 'label' => __( 'Visits Per Month', 'hostza-companion' ), 65 | 'type' => Controls_Manager::TEXT, 66 | 'label_block' => true, 67 | 'default' => __( '100k Visits Per Month', 'hostza-companion' ), 68 | ] 69 | ); 70 | $this->add_control( 71 | 'storage', 72 | [ 73 | 'label' => __( 'Storage', 'hostza-companion' ), 74 | 'type' => Controls_Manager::TEXT, 75 | 'label_block' => true, 76 | 'default' => __( '1GB Backups', 'hostza-companion' ), 77 | ] 78 | ); 79 | $this->add_control( 80 | 'ssl', 81 | [ 82 | 'label' => __( 'SSL Certificate', 'hostza-companion' ), 83 | 'type' => Controls_Manager::TEXT, 84 | 'label_block' => true, 85 | 'default' => __( 'Free SSL Certificate', 'your-plugin' ), 86 | ] 87 | ); 88 | $this->add_control( 89 | 'support', 90 | [ 91 | 'label' => __( 'Support', 'hostza-companion' ), 92 | 'type' => Controls_Manager::TEXT, 93 | 'label_block' => true, 94 | 'default' => __( 'Quick support', 'hostza-companion' ), 95 | ] 96 | ); 97 | $this->add_control( 98 | 'price', 99 | [ 100 | 'label' => __( 'Price', 'hostza-companion' ), 101 | 'type' => Controls_Manager::TEXT, 102 | 'label_block' => true, 103 | 'default' => __( '$2.5/m', 'hostza-companion' ), 104 | ] 105 | ); 106 | $this->add_control( 107 | 'btn_label', 108 | [ 109 | 'label' => __( 'Button Label', 'hostza-companion' ), 110 | 'type' => Controls_Manager::TEXT, 111 | 'label_block' => true, 112 | 'default' => __( 'Start Now', 'hostza-companion' ), 113 | ] 114 | ); 115 | $this->add_control( 116 | 'btn_url', 117 | [ 118 | 'label' => __( 'Button URL', 'hostza-companion' ), 119 | 'type' => Controls_Manager::URL, 120 | 'label_block' => true, 121 | ] 122 | ); 123 | $this->end_controls_section(); // End service content 124 | 125 | } 126 | 127 | protected function render() { 128 | $settings = $this->get_settings(); 129 | $sites = !empty( $settings['sites'] ) ? $settings['sites'] : ''; 130 | $visits = !empty( $settings['visits'] ) ? $settings['visits'] : ''; 131 | $storage = !empty( $settings['storage'] ) ? $settings['storage'] : ''; 132 | $ssl = !empty( $settings['ssl'] ) ? $settings['ssl'] : ''; 133 | $support = !empty( $settings['support'] ) ? $settings['support'] : ''; 134 | $price = !empty( $settings['price'] ) ? $settings['price'] : ''; 135 | $btn_label = !empty( $settings['btn_label'] ) ? $settings['btn_label'] : ''; 136 | $btn_url = !empty( $settings['btn_url']['url'] ) ? $settings['btn_url']['url'] : ''; 137 | ?> 138 | 139 |
140 |
141 | 160 |
161 | Start from {$price}

"; 164 | } 165 | if ( $btn_label ) { 166 | echo " 167 |
168 | 169 | {$btn_label} 170 | 171 |
172 | "; 173 | } 174 | ?> 175 |
176 | start_controls_section( 48 | 'hero_content', 49 | [ 50 | 'label' => __( 'Hero content', 'hostza-companion' ), 51 | ] 52 | ); 53 | 54 | $this->add_control( 55 | 'banner_img', [ 56 | 'label' => __( 'BG Image', 'hostza-companion' ), 57 | 'type' => Controls_Manager::MEDIA, 58 | 59 | ] 60 | ); 61 | $this->add_control( 62 | 'sub_title', [ 63 | 'label' => __( 'Sub Title', 'hostza-companion' ), 64 | 'type' => Controls_Manager::TEXT, 65 | 'label_block' => true, 66 | 'default' => 'The Best Domain & Hosting Provider In The Area' 67 | ] 68 | ); 69 | $this->add_control( 70 | 'big_title', [ 71 | 'label' => __( 'Big Title', 'hostza-companion' ), 72 | 'type' => Controls_Manager::TEXTAREA, 73 | 'label_block' => true, 74 | 'default' => 'Go Big with your next Domain' 75 | ] 76 | ); 77 | $this->add_control( 78 | 'action_page', [ 79 | 'label' => __( 'Action Page', 'hostza-companion' ), 80 | 'type' => Controls_Manager::URL, 81 | 'label_block' => true, 82 | ] 83 | ); 84 | $this->add_control( 85 | 'btn_label', [ 86 | 'label' => __( 'Button Label', 'hostza-companion' ), 87 | 'type' => Controls_Manager::TEXT, 88 | 'label_block' => true, 89 | 'default' => 'search' 90 | ] 91 | ); 92 | 93 | $this->end_controls_section(); // End Hero content 94 | 95 | 96 | /** 97 | * Style Tab 98 | * ------------------------------ Style Title ------------------------------ 99 | * 100 | */ 101 | $this->start_controls_section( 102 | 'style_title', [ 103 | 'label' => __( 'Style Hero Section', 'hostza-companion' ), 104 | 'tab' => Controls_Manager::TAB_STYLE, 105 | ] 106 | ); 107 | $this->add_control( 108 | 'sub_title_col', [ 109 | 'label' => __( 'Sub Title Color', 'hostza-companion' ), 110 | 'type' => Controls_Manager::COLOR, 111 | 'selectors' => [ 112 | '{{WRAPPER}} .slider_area .single_slider .slider_text p' => 'color: {{VALUE}};', 113 | ], 114 | ] 115 | ); 116 | $this->add_control( 117 | 'big_title_col', [ 118 | 'label' => __( 'Big Title Color', 'hostza-companion' ), 119 | 'type' => Controls_Manager::COLOR, 120 | 'selectors' => [ 121 | '{{WRAPPER}} .slider_area .single_slider .slider_text h3' => 'color: {{VALUE}};', 122 | ], 123 | ] 124 | ); 125 | $this->add_control( 126 | 'btn_bg_col', [ 127 | 'label' => __( 'Button Bg Color', 'hostza-companion' ), 128 | 'type' => Controls_Manager::COLOR, 129 | 'selectors' => [ 130 | '{{WRAPPER}} .slider_area .find_dowmain .find_dowmain_form button' => 'background: {{VALUE}};', 131 | ], 132 | ] 133 | ); 134 | 135 | $this->end_controls_section(); 136 | } 137 | 138 | protected function render() { 139 | $settings = $this->get_settings(); 140 | $banner_img = !empty( $settings['banner_img']['url'] ) ? $settings['banner_img']['url'] : ''; 141 | $sub_title = !empty( $settings['sub_title'] ) ? esc_html($settings['sub_title']) : ''; 142 | $big_title = !empty( $settings['big_title'] ) ? wp_kses_post(nl2br($settings['big_title'])) : ''; 143 | $action_page = !empty( $settings['action_page'] ) ? esc_url($settings['action_page']['url']) : '#'; 144 | $btn_label = !empty( $settings['btn_label'] ) ? esc_html($settings['btn_label']) : ''; 145 | ?> 146 | 147 | 148 |
149 |
> 150 |
151 |
152 |
153 |
154 | {$sub_title}

"; 157 | } 158 | if ( $big_title ) { 159 | echo "

{$big_title}

"; 160 | } 161 | ?> 162 |
163 |
164 | 165 | search"; 168 | } 169 | ?> 170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 | 179 | start_controls_section( 47 | 'core_feature_tab_content', 48 | [ 49 | 'label' => __( 'Core Feature Tab Item', 'hostza-companion' ), 50 | ] 51 | ); 52 | 53 | $this->add_control( 54 | 'feature_items', [ 55 | 'label' => __( 'Create New', 'hostza-companion' ), 56 | 'type' => Controls_Manager::REPEATER, 57 | 'title_field' => '{{{ item_title }}}', 58 | 'fields' => [ 59 | [ 60 | 'name' => 'item_icon', 61 | 'label' => __( 'Select Icon', 'hostza-companion' ), 62 | 'label_block' => true, 63 | 'type' => Controls_Manager::ICON, 64 | 'options' => hostza_themify_icon(), 65 | 'default' => 'flaticon-browser', 66 | ], 67 | [ 68 | 'name' => 'item_title', 69 | 'label' => __( 'Item Title', 'hostza-companion' ), 70 | 'label_block' => true, 71 | 'type' => Controls_Manager::TEXT, 72 | 'default' => __( 'Free Domain for 1st Year', 'hostza-companion' ), 73 | ], 74 | [ 75 | 'name' => 'item_text', 76 | 'label' => __( 'Item Text', 'hostza-companion' ), 77 | 'label_block' => true, 78 | 'type' => Controls_Manager::TEXTAREA, 79 | 'default' => __( 'Our set he for firmament morning sixth subdue darkness creeping gathered divide our let god moving.', 'hostza-companion' ), 80 | ], 81 | ], 82 | 'default' => [ 83 | [ 84 | 'item_icon' => 'flaticon-browser', 85 | 'item_title' => __( 'Free Domain for 1st Year', 'hostza-companion' ), 86 | 'item_text' => __( 'Our set he for firmament morning sixth subdue darkness creeping gathered divide our let god moving.', 'hostza-companion' ), 87 | ], 88 | [ 89 | 'item_icon' => 'flaticon-security', 90 | 'item_title' => __( 'Free SSL Certificate', 'hostza-companion' ), 91 | 'item_text' => __( 'Our set he for firmament morning sixth subdue darkness creeping gathered divide our let god moving.', 'hostza-companion' ), 92 | ], 93 | [ 94 | 'item_icon' => 'flaticon-like', 95 | 'item_title' => __( '30-Day Money-Back Guarantee', 'hostza-companion' ), 96 | 'item_text' => __( 'Our set he for firmament morning sixth subdue darkness creeping gathered divide our let god moving.', 'hostza-companion' ), 97 | ], 98 | [ 99 | 'item_icon' => 'flaticon-lock', 100 | 'item_title' => __( 'Spam Protection', 'hostza-companion' ), 101 | 'item_text' => __( 'Our set he for firmament morning sixth subdue darkness creeping gathered divide our let god moving.', 'hostza-companion' ), 102 | ], 103 | ] 104 | ] 105 | ); 106 | $this->end_controls_section(); // End service content 107 | 108 | } 109 | 110 | protected function render() { 111 | $settings = $this->get_settings(); 112 | $feature_items = !empty( $settings['feature_items'] ) ? $settings['feature_items'] : ''; 113 | 114 | echo '
'; 115 | if( is_array( $feature_items ) && count( $feature_items ) > 0 ) { 116 | foreach( $feature_items as $item ) { 117 | $item_icon = ( !empty( $item['item_icon'] ) ) ? esc_attr($item['item_icon']) : ''; 118 | $item_title = ( !empty( $item['item_title'] ) ) ? esc_html($item['item_title']) : ''; 119 | $item_text = ( !empty( $item['item_text'] ) ) ? esc_html($item['item_text']) : ''; 120 | ?> 121 |
122 |
123 | '; 125 | if ( $item_icon ) { 126 | echo ""; 127 | } 128 | echo '
'; 129 | ?> 130 |
131 | {$item_title}"; 134 | } 135 | if ( $item_text ) { 136 | echo "

{$item_text}

"; 137 | } 138 | ?> 139 |
140 |
141 |
142 | '; 146 | } 147 | } -------------------------------------------------------------------------------- /inc/elementor-widgets/assets/js/hostza-companion-main.js: -------------------------------------------------------------------------------- 1 | (function ($) { 2 | 'use strict'; 3 | 4 | if ($.fn.owlCarousel) { 5 | $(".hero-slides").owlCarousel({ 6 | items: 1, 7 | loop: true, 8 | autoplay: true, 9 | smartSpeed: 800, 10 | margin: 0, 11 | dots: false, 12 | nav: true, 13 | navText: ['', ''] 14 | }); 15 | } 16 | 17 | if ($.fn.owlCarousel) { 18 | $(".hostza-service-slides").owlCarousel({ 19 | items: 3, 20 | loop: true, 21 | autoplay: true, 22 | smartSpeed: 800, 23 | margin: 30, 24 | center: true, 25 | dots: false, 26 | nav: true, 27 | startPosition: 1, 28 | navText: ['', ''], 29 | responsive: { 30 | 0: { 31 | items: 1 32 | }, 33 | 576: { 34 | items: 2 35 | }, 36 | 768: { 37 | items: 3 38 | } 39 | } 40 | }); 41 | } 42 | 43 | if ($.fn.owlCarousel) { 44 | $(".hostza-workflow-slides").owlCarousel({ 45 | items: 3, 46 | loop: true, 47 | autoplay: true, 48 | smartSpeed: 800, 49 | margin: 30, 50 | center: true, 51 | dots: true, 52 | startPosition: 1, 53 | responsive: { 54 | 0: { 55 | items: 1 56 | }, 57 | 576: { 58 | items: 2 59 | }, 60 | 768: { 61 | items: 3 62 | } 63 | } 64 | }); 65 | } 66 | 67 | if ($.fn.owlCarousel) { 68 | $(".hostza-team-slides").owlCarousel({ 69 | items: 3, 70 | loop: true, 71 | autoplay: true, 72 | smartSpeed: 800, 73 | margin: 50, 74 | center: true, 75 | nav: true, 76 | navText: ['', ''], 77 | responsive: { 78 | 0: { 79 | items: 1 80 | }, 81 | 576: { 82 | items: 2 83 | }, 84 | 768: { 85 | items: 3 86 | } 87 | } 88 | }); 89 | } 90 | 91 | if ($.fn.owlCarousel) { 92 | $(".testimonials-slides").owlCarousel({ 93 | items: 3, 94 | loop: true, 95 | autoplay: true, 96 | smartSpeed: 1500, 97 | margin: 0, 98 | center: true, 99 | nav: true, 100 | navText: ['', ''], 101 | responsive: { 102 | 0: { 103 | items: 1 104 | }, 105 | 576: { 106 | items: 2 107 | }, 108 | 768: { 109 | items: 3 110 | } 111 | } 112 | }); 113 | } 114 | 115 | if ($.fn.barfiller) { 116 | 117 | $('.bar').each( function(){ 118 | var $this = $(this), 119 | $color = $this.data('color'); 120 | 121 | $this.barfiller({ 122 | tooltip: true, 123 | duration: 1000, 124 | barColor: $color, 125 | animateOnResize: true 126 | }); 127 | 128 | 129 | }) 130 | 131 | } 132 | if ($.fn.imagesLoaded) { 133 | $('.hostza-portfolio').imagesLoaded(function () { 134 | // filter items on button click 135 | $('.portfolio-menu').on('click', 'p', function () { 136 | var filterValue = $(this).attr('data-filter'); 137 | $grid.isotope({ 138 | filter: filterValue 139 | }); 140 | }); 141 | // init Isotope 142 | var $grid = $('.hostza-portfolio').isotope({ 143 | itemSelector: '.single_gallery_item', 144 | percentPosition: true, 145 | masonry: { 146 | columnWidth: '.single_gallery_item' 147 | } 148 | }); 149 | }); 150 | } 151 | 152 | $('.portfolio-menu button.btn').on('click', function () { 153 | $('.portfolio-menu button.btn').removeClass('active'); 154 | $(this).addClass('active'); 155 | }) 156 | if ($.fn.scrollUp) { 157 | $.scrollUp({ 158 | scrollSpeed: 1500, 159 | scrollText: '' 160 | }); 161 | } 162 | 163 | if ($.fn.counterUp) { 164 | $('.counter').counterUp({ 165 | delay: 10, 166 | time: 2000 167 | }); 168 | } 169 | 170 | // Background video 171 | var $selector = $('[data-videoid]'); 172 | 173 | if( $selector.length ){ 174 | $selector.each( function(){ 175 | var $this = $(this); 176 | $this.YTPlayer({ 177 | fitToBackground: true, 178 | videoId: $this.data('videoid') 179 | }); 180 | }); 181 | } 182 | 183 | // MC Scripts 184 | var $subscribe = $( '.hostza-subscribe-newsletter-area' ); 185 | if( $subscribe.length ){ 186 | window.fnames = new Array(); 187 | window.ftypes = new Array(); 188 | fnames[0]='EMAIL'; 189 | ftypes[0]='email'; 190 | fnames[1]='FNAME'; 191 | ftypes[1]='text'; 192 | fnames[2]='LNAME'; 193 | ftypes[2]='text'; 194 | fnames[3]='ADDRESS'; 195 | ftypes[3]='address'; 196 | fnames[4]='PHONE'; 197 | ftypes[4]='phone'; 198 | fnames[5]='BIRTHDAY'; 199 | ftypes[5]='birthday'; 200 | } 201 | 202 | 203 | 204 | })(jQuery); -------------------------------------------------------------------------------- /inc/elementor-widgets/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/elementor-widgets/widgets/statistics.php: -------------------------------------------------------------------------------- 1 | start_controls_section( 48 | 'statistics_contents', 49 | [ 50 | 'label' => __( 'Statistics content', 'hostza-companion' ), 51 | ] 52 | ); 53 | 54 | $this->add_control( 55 | 'statistics', [ 56 | 'label' => __( 'Create New', 'hostza-companion' ), 57 | 'type' => Controls_Manager::REPEATER, 58 | 'title_field' => '{{{ item_title }}}', 59 | 'fields' => [ 60 | [ 61 | 'name' => 'item_value', 62 | 'label' => __( 'Statistic Value', 'hostza-companion' ), 63 | 'label_block' => true, 64 | 'type' => Controls_Manager::TEXT, 65 | 'default' => __( '278390', 'hostza-companion' ), 66 | ], 67 | [ 68 | 'name' => 'item_title', 69 | 'label' => __( 'Item Title', 'hostza-companion' ), 70 | 'label_block' => true, 71 | 'type' => Controls_Manager::TEXT, 72 | 'default' => __( 'Client around the World', 'hostza-companion' ), 73 | ], 74 | ], 75 | 'default' => [ 76 | [ 77 | 'item_value' => __( '278390', 'hostza-companion' ), 78 | 'item_title' => __( 'Client around the World', 'hostza-companion' ), 79 | ], 80 | [ 81 | 'item_value' => __( '200', 'hostza-companion' ), 82 | 'item_title' => __( 'Dedicated team', 'hostza-companion' ), 83 | ], 84 | [ 85 | 'item_value' => __( '563278', 'hostza-companion' ), 86 | 'item_title' => __( 'Domain registation', 'hostza-companion' ), 87 | ], 88 | ] 89 | ] 90 | ); 91 | $this->end_controls_section(); // End service content 92 | 93 | /** 94 | * Style Tab 95 | * ------------------------------ Style Section Heading ------------------------------ 96 | * 97 | */ 98 | 99 | $this->start_controls_section( 100 | 'style_room_section', [ 101 | 'label' => __( 'Style Service Section', 'hostza-companion' ), 102 | 'tab' => Controls_Manager::TAB_STYLE, 103 | ] 104 | ); 105 | $this->add_control( 106 | 'sub_title_col', [ 107 | 'label' => __( 'Sub Title Color', 'hostza-companion' ), 108 | 'type' => Controls_Manager::COLOR, 109 | 'selectors' => [ 110 | '{{WRAPPER}} .team_area .section_title .sub_heading' => 'color: {{VALUE}};', 111 | ], 112 | ] 113 | ); 114 | $this->add_control( 115 | 'big_title_col', [ 116 | 'label' => __( 'Big Title Color', 'hostza-companion' ), 117 | 'type' => Controls_Manager::COLOR, 118 | 'selectors' => [ 119 | '{{WRAPPER}} .team_area .section_title h3' => 'color: {{VALUE}};', 120 | ], 121 | ] 122 | ); 123 | 124 | $this->add_control( 125 | 'member_styles_seperator', 126 | [ 127 | 'label' => esc_html__( 'Member Styles', 'hostza-companion' ), 128 | 'type' => Controls_Manager::HEADING, 129 | 'separator' => 'after' 130 | ] 131 | ); 132 | $this->add_control( 133 | 'member_name_col', [ 134 | 'label' => __( 'Member Name Color', 'hostza-companion' ), 135 | 'type' => Controls_Manager::COLOR, 136 | 'selectors' => [ 137 | '{{WRAPPER}} .team_area .single_team h3' => 'color: {{VALUE}};', 138 | ], 139 | ] 140 | ); 141 | $this->add_control( 142 | 'member_desig_color', [ 143 | 'label' => __( 'Member Designation Color', 'hostza-companion' ), 144 | 'type' => Controls_Manager::COLOR, 145 | 'selectors' => [ 146 | '{{WRAPPER}} .team_area .single_team p' => 'color: {{VALUE}};', 147 | ], 148 | ] 149 | ); 150 | $this->end_controls_section(); 151 | 152 | } 153 | 154 | protected function render() { 155 | $settings = $this->get_settings(); 156 | $statistics = !empty( $settings['statistics'] ) ? $settings['statistics'] : ''; 157 | ?> 158 | 159 |
160 |
161 |
162 | 0 ) { 164 | foreach( $statistics as $item ) { 165 | $item_value = ( !empty( $item['item_value'] ) ) ? esc_html( $item['item_value'] ) : ''; 166 | $item_title = ( !empty( $item['item_title'] ) ) ? esc_html( $item['item_title'] ) : ''; 167 | ?> 168 |
169 |
170 | {$item_value} 174 | "; 175 | } 176 | if ( $item_title ) { 177 | echo " 178 |

{$item_title}

179 | "; 180 | } 181 | ?> 182 |
183 |
184 | 188 |
189 |
190 |
191 | start_controls_section( 49 | 'price_table_content', 50 | [ 51 | 'label' => __( 'Price Table content', 'hostza-companion' ), 52 | ] 53 | ); 54 | 55 | $this->add_control( 56 | 'price_table', [ 57 | 'label' => __( 'Create New', 'hostza-companion' ), 58 | 'type' => Controls_Manager::REPEATER, 59 | 'title_field' => '{{{ package_title }}}', 60 | 'fields' => [ 61 | [ 62 | 'name' => 'package_title', 63 | 'label' => __( 'Package Title', 'hostza-companion' ), 64 | 'label_block' => true, 65 | 'type' => Controls_Manager::TEXT, 66 | 'default' => __( 'Starter', 'hostza-companion' ), 67 | ], 68 | [ 69 | 'name' => 'template_id', 70 | 'label' => __( 'Select Elementor Template', 'hostza-companion' ), 71 | 'label_block' => true, 72 | 'type' => Controls_Manager::SELECT, 73 | 'options' => get_elementor_templates(), 74 | ], 75 | ], 76 | 'default' => [ 77 | [ 78 | 'package_title' => __( 'Starter', 'hostza-companion' ), 79 | ], 80 | [ 81 | 'package_title' => __( 'Premium', 'hostza-companion' ), 82 | ], 83 | [ 84 | 'package_title' => __( 'Pro', 'hostza-companion' ), 85 | ], 86 | ] 87 | ] 88 | ); 89 | $this->end_controls_section(); // End service content 90 | 91 | /** 92 | * Style Tab 93 | * ------------------------------ Style Section Heading ------------------------------ 94 | * 95 | */ 96 | 97 | $this->start_controls_section( 98 | 'style_room_section', [ 99 | 'label' => __( 'Style Pricing Section', 'hostza-companion' ), 100 | 'tab' => Controls_Manager::TAB_STYLE, 101 | ] 102 | ); 103 | $this->add_control( 104 | 'first_item_bg_col', [ 105 | 'label' => __( 'All Item BG Color', 'hostza-companion' ), 106 | 'type' => Controls_Manager::COLOR, 107 | 'selectors' => [ 108 | '{{WRAPPER}} .package_prsing_area .single_prising .prising_header' => 'background: {{VALUE}};', 109 | ], 110 | ] 111 | ); 112 | $this->add_control( 113 | 'second_item_bg_col', [ 114 | 'label' => __( 'Second Item Bg Color', 'hostza-companion' ), 115 | 'type' => Controls_Manager::COLOR, 116 | 'selectors' => [ 117 | '{{WRAPPER}} .package_prsing_area .single_prising .prising_header.deep' => 'background: {{VALUE}};', 118 | ], 119 | ] 120 | ); 121 | $this->add_control( 122 | 'third_item_bg_col', [ 123 | 'label' => __( 'Third Item Bg Color', 'hostza-companion' ), 124 | 'type' => Controls_Manager::COLOR, 125 | 'selectors' => [ 126 | '{{WRAPPER}} .package_prsing_area .single_prising .prising_header.yellow' => 'background: {{VALUE}};', 127 | ], 128 | ] 129 | ); 130 | $this->add_control( 131 | 'button_pointer_col', [ 132 | 'label' => __( 'List pointer & Button Color', 'hostza-companion' ), 133 | 'type' => Controls_Manager::COLOR, 134 | 'selectors' => [ 135 | '{{WRAPPER}} .package_prsing_area .boxed_btn_green' => 'background: {{VALUE}};', 136 | '{{WRAPPER}} .package_prsing_area .single_prising .list ul li::before' => 'background: {{VALUE}};', 137 | '{{WRAPPER}} .package_prsing_area .boxed_btn_green:hover' => 'background: transparent; color: {{VALUE}} !important; border-color: {{VALUE}};', 138 | ], 139 | ] 140 | ); 141 | 142 | $this->end_controls_section(); 143 | 144 | } 145 | 146 | protected function render() { 147 | $settings = $this->get_settings(); 148 | $price_table = !empty( $settings['price_table'] ) ? $settings['price_table'] : ''; 149 | ?> 150 |
151 |
152 |
153 | 0 ){ 155 | $counter = 0; 156 | foreach ( $price_table as $item ) { 157 | $counter++; 158 | $package_title = !empty( $item['package_title'] ) ? esc_html($item['package_title']) : ''; 159 | $template_id = !empty( $item['template_id'] ) ? $item['template_id'] : ''; 160 | if ($counter === 1) { 161 | $dynamic_class = 'prising_header'; 162 | } else if ($counter === 2) { 163 | $dynamic_class = 'prising_header deep'; 164 | } else { 165 | $dynamic_class = 'prising_header yellow'; 166 | } 167 | ?> 168 |
169 |
170 |
171 | {$package_title}"; 174 | } 175 | ?> 176 |
177 | frontend->get_builder_content( $template_id, false ); 179 | ?> 180 |
181 |
182 | 186 |
187 |
188 |
189 | esc_html__( 'Add footer social links.', 'hostza-companion' ), ) 28 | ); 29 | 30 | } 31 | 32 | // This is where the action happens 33 | public function widget( $args, $instance ) { 34 | 35 | $title = apply_filters( 'widget_title', $instance['title'] ); 36 | $desc = apply_filters( 'widget_text', $instance['desc'] ); 37 | $facebook = apply_filters( 'widget_text', $instance['facebook'] ); 38 | $twitter = apply_filters( 'widget_text', $instance['twitter'] ); 39 | $linkedin = apply_filters( 'widget_text', $instance['linkedin'] ); 40 | $instagram = apply_filters( 'widget_text', $instance['instagram'] ); 41 | $dribbble = apply_filters( 'widget_text', $instance['dribbble'] ); 42 | 43 | // before and after widget arguments are defined by themes 44 | echo wp_kses_post( $args['before_widget'] ); 45 | if ( ! empty( $title ) ) 46 | echo wp_kses_post( $args['before_title'] . $title . $args['after_title'] ); 47 | 48 | 49 | if( $desc ){ 50 | echo '

'.esc_html( $desc ).'

'; 51 | } ?> 52 | 53 |
54 | '; 57 | } 58 | if( $twitter ){ 59 | echo ''; 60 | } 61 | if( $dribbble ){ 62 | echo ''; 63 | } 64 | if( $linkedin ){ 65 | echo ''; 66 | } 67 | if( $instagram ){ 68 | echo ''; 69 | } 70 | ?> 71 |
72 | 73 | 91 |

92 | 93 | 94 |

95 |

96 | 97 | 98 |

99 |

100 | 101 | 102 |

103 |

104 | 105 | 106 |

107 |

108 | 109 | 110 |

111 |

112 | 113 | 114 |

115 |

116 | 117 | 118 |

119 | 120 | =0;s={horizontal:{},vertical:{}};f=1;a={};u="waypoints-context-id";p="resize.waypoints";y="scroll.waypoints";v=1;w="waypoints-waypoint-ids";g="waypoint";m="waypoints";o=function(){function t(t){var e=this;this.$element=t;this.element=t[0];this.didResize=false;this.didScroll=false;this.id="context"+f++;this.oldScroll={x:t.scrollLeft(),y:t.scrollTop()};this.waypoints={horizontal:{},vertical:{}};t.data(u,this.id);a[this.id]=this;t.bind(y,function(){var t;if(!(e.didScroll||c)){e.didScroll=true;t=function(){e.doScroll();return e.didScroll=false};return r.setTimeout(t,n[m].settings.scrollThrottle)}});t.bind(p,function(){var t;if(!e.didResize){e.didResize=true;t=function(){n[m]("refresh");return e.didResize=false};return r.setTimeout(t,n[m].settings.resizeThrottle)}})}t.prototype.doScroll=function(){var t,e=this;t={horizontal:{newScroll:this.$element.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.$element.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}};if(c&&(!t.vertical.oldScroll||!t.vertical.newScroll)){n[m]("refresh")}n.each(t,function(t,r){var i,o,l;l=[];o=r.newScroll>r.oldScroll;i=o?r.forward:r.backward;n.each(e.waypoints[t],function(t,e){var n,i;if(r.oldScroll<(n=e.offset)&&n<=r.newScroll){return l.push(e)}else if(r.newScroll<(i=e.offset)&&i<=r.oldScroll){return l.push(e)}});l.sort(function(t,e){return t.offset-e.offset});if(!o){l.reverse()}return n.each(l,function(t,e){if(e.options.continuous||t===l.length-1){return e.trigger([i])}})});return this.oldScroll={x:t.horizontal.newScroll,y:t.vertical.newScroll}};t.prototype.refresh=function(){var t,e,r,i=this;r=n.isWindow(this.element);e=this.$element.offset();this.doScroll();t={horizontal:{contextOffset:r?0:e.left,contextScroll:r?0:this.oldScroll.x,contextDimension:this.$element.width(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:r?0:e.top,contextScroll:r?0:this.oldScroll.y,contextDimension:r?n[m]("viewportHeight"):this.$element.height(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}};return n.each(t,function(t,e){return n.each(i.waypoints[t],function(t,r){var i,o,l,s,f;i=r.options.offset;l=r.offset;o=n.isWindow(r.element)?0:r.$element.offset()[e.offsetProp];if(n.isFunction(i)){i=i.apply(r.element)}else if(typeof i==="string"){i=parseFloat(i);if(r.options.offset.indexOf("%")>-1){i=Math.ceil(e.contextDimension*i/100)}}r.offset=o-e.contextOffset+e.contextScroll-i;if(r.options.onlyOnScroll&&l!=null||!r.enabled){return}if(l!==null&&l<(s=e.oldScroll)&&s<=r.offset){return r.trigger([e.backward])}else if(l!==null&&l>(f=e.oldScroll)&&f>=r.offset){return r.trigger([e.forward])}else if(l===null&&e.oldScroll>=r.offset){return r.trigger([e.forward])}})})};t.prototype.checkEmpty=function(){if(n.isEmptyObject(this.waypoints.horizontal)&&n.isEmptyObject(this.waypoints.vertical)){this.$element.unbind([p,y].join(" "));return delete a[this.id]}};return t}();l=function(){function t(t,e,r){var i,o;r=n.extend({},n.fn[g].defaults,r);if(r.offset==="bottom-in-view"){r.offset=function(){var t;t=n[m]("viewportHeight");if(!n.isWindow(e.element)){t=e.$element.height()}return t-n(this).outerHeight()}}this.$element=t;this.element=t[0];this.axis=r.horizontal?"horizontal":"vertical";this.callback=r.handler;this.context=e;this.enabled=r.enabled;this.id="waypoints"+v++;this.offset=null;this.options=r;e.waypoints[this.axis][this.id]=this;s[this.axis][this.id]=this;i=(o=t.data(w))!=null?o:[];i.push(this.id);t.data(w,i)}t.prototype.trigger=function(t){if(!this.enabled){return}if(this.callback!=null){this.callback.apply(this.element,t)}if(this.options.triggerOnce){return this.destroy()}};t.prototype.disable=function(){return this.enabled=false};t.prototype.enable=function(){this.context.refresh();return this.enabled=true};t.prototype.destroy=function(){delete s[this.axis][this.id];delete this.context.waypoints[this.axis][this.id];return this.context.checkEmpty()};t.getWaypointsByElement=function(t){var e,r;r=n(t).data(w);if(!r){return[]}e=n.extend({},s.horizontal,s.vertical);return n.map(r,function(t){return e[t]})};return t}();d={init:function(t,e){var r;if(e==null){e={}}if((r=e.handler)==null){e.handler=t}this.each(function(){var t,r,i,s;t=n(this);i=(s=e.context)!=null?s:n.fn[g].defaults.context;if(!n.isWindow(i)){i=t.closest(i)}i=n(i);r=a[i.data(u)];if(!r){r=new o(i)}return new l(t,r,e)});n[m]("refresh");return this},disable:function(){return d._invoke(this,"disable")},enable:function(){return d._invoke(this,"enable")},destroy:function(){return d._invoke(this,"destroy")},prev:function(t,e){return d._traverse.call(this,t,e,function(t,e,n){if(e>0){return t.push(n[e-1])}})},next:function(t,e){return d._traverse.call(this,t,e,function(t,e,n){if(et.oldScroll.y})},left:function(t){if(t==null){t=r}return h._filter(t,"horizontal",function(t,e){return e.offset<=t.oldScroll.x})},right:function(t){if(t==null){t=r}return h._filter(t,"horizontal",function(t,e){return e.offset>t.oldScroll.x})},enable:function(){return h._invoke("enable")},disable:function(){return h._invoke("disable")},destroy:function(){return h._invoke("destroy")},extendFn:function(t,e){return d[t]=e},_invoke:function(t){var e;e=n.extend({},s.vertical,s.horizontal);return n.each(e,function(e,n){n[t]();return true})},_filter:function(t,e,r){var i,o;i=a[n(t).data(u)];if(!i){return[]}o=[];n.each(i.waypoints[e],function(t,e){if(r(i,e)){return o.push(e)}});o.sort(function(t,e){return t.offset-e.offset});return n.map(o,function(t){return t.element})}};n[m]=function(){var t,n;n=arguments[0],t=2<=arguments.length?e.call(arguments,1):[];if(h[n]){return h[n].apply(null,t)}else{return h.aggregate.call(null,n)}};n[m].settings={resizeThrottle:100,scrollThrottle:30};return i.load(function(){return n[m]("refresh")})})}).call(this); 10 | -------------------------------------------------------------------------------- /inc/elementor-widgets/widgets/blog.php: -------------------------------------------------------------------------------- 1 | start_controls_section( 50 | 'blog_content', 51 | [ 52 | 'label' => __( 'Latest Blog Header Setting', 'hostza-companion' ), 53 | ] 54 | ); 55 | $this->add_control( 56 | 'sec_title', 57 | [ 58 | 'label' => __( 'Section Title', 'hostza-companion' ), 59 | 'type' => Controls_Manager::TEXT, 60 | 'label_block' => true, 61 | 'default' => __( 'Latest News', 'hostza-companion' ) 62 | ] 63 | ); 64 | $this->add_control( 65 | 'sub_title', 66 | [ 67 | 'label' => __( 'Sub Title', 'hostza-companion' ), 68 | 'type' => Controls_Manager::TEXTAREA, 69 | 'label_block' => true, 70 | 'default' => 'Your domain control panel is designed for ease-of-use and
allows for all aspects of your domains.' 71 | ] 72 | ); 73 | 74 | $this->end_controls_section(); // End few words content 75 | 76 | // Blog post settings 77 | $this->start_controls_section( 78 | 'blog_post_sec', 79 | [ 80 | 'label' => __( 'Blog Post Settings', 'hostza-companion' ), 81 | ] 82 | ); 83 | $this->add_control( 84 | 'post_num', 85 | [ 86 | 'label' => esc_html__( 'Post Item', 'hostza-companion' ), 87 | 'type' => Controls_Manager::NUMBER, 88 | 'label_block' => false, 89 | 'default' => absint(3), 90 | 'min' => 1, 91 | 'max' => 6, 92 | ] 93 | ); 94 | $this->add_control( 95 | 'post_exc', 96 | [ 97 | 'label' => esc_html__( 'Post Excerpt Length', 'hostza-companion' ), 98 | 'type' => Controls_Manager::NUMBER, 99 | 'label_block' => false, 100 | 'default' => absint(13), 101 | 'min' => 5, 102 | 'max' => 20 103 | ] 104 | ); 105 | $this->add_control( 106 | 'post_order', 107 | [ 108 | 'label' => esc_html__( 'Post Order', 'hostza-companion' ), 109 | 'type' => Controls_Manager::SWITCHER, 110 | 'label_block' => false, 111 | 'label_on' => 'ASC', 112 | 'label_off' => 'DESC', 113 | 'default' => 'yes', 114 | 'options' => [ 115 | 'no' => 'ASC', 116 | 'yes' => 'DESC' 117 | ] 118 | ] 119 | ); 120 | 121 | $this->end_controls_section(); // End few words content 122 | 123 | //------------------------------ Style Section ------------------------------ 124 | $this->start_controls_section( 125 | 'style_section', [ 126 | 'label' => __( 'Style Section Heading', 'hostza-companion' ), 127 | 'tab' => Controls_Manager::TAB_STYLE, 128 | ] 129 | ); 130 | $this->add_control( 131 | 'color_secttitle', [ 132 | 'label' => __( 'Section Title Color', 'hostza-companion' ), 133 | 'type' => Controls_Manager::COLOR, 134 | 'selectors' => [ 135 | '{{WRAPPER}} .latest_new_area .section_title h3' => 'color: {{VALUE}};', 136 | ], 137 | ] 138 | ); 139 | $this->add_control( 140 | 'color_sec_sub_title', [ 141 | 'label' => __( 'Sub Title Color', 'hostza-companion' ), 142 | 'type' => Controls_Manager::COLOR, 143 | 'selectors' => [ 144 | '{{WRAPPER}} .latest_new_area .section_title p' => 'color: {{VALUE}};', 145 | ], 146 | ] 147 | ); 148 | $this->add_control( 149 | 'color_blog_cat', [ 150 | 'label' => __( 'Blog Category Color', 'hostza-companion' ), 151 | 'type' => Controls_Manager::COLOR, 152 | 'selectors' => [ 153 | '{{WRAPPER}} .latest_new_area .single_news .news_content .news_meta a' => 'color: {{VALUE}};', 154 | ], 155 | ] 156 | ); 157 | $this->add_control( 158 | 'color_blog_title', [ 159 | 'label' => __( 'Blog Title Color', 'hostza-companion' ), 160 | 'type' => Controls_Manager::COLOR, 161 | 'selectors' => [ 162 | '{{WRAPPER}} .latest_new_area .single_news .news_content h3 a' => 'color: {{VALUE}};', 163 | ], 164 | ] 165 | ); 166 | $this->add_control( 167 | 'color_blog_title_hover', [ 168 | 'label' => __( 'Blog Title Hover Color', 'hostza-companion' ), 169 | 'type' => Controls_Manager::COLOR, 170 | 'selectors' => [ 171 | '{{WRAPPER}} .latest_new_area .single_news .news_content h3 a:hover' => 'color: {{VALUE}};', 172 | ], 173 | ] 174 | ); 175 | 176 | $this->end_controls_section(); 177 | 178 | } 179 | 180 | protected function render() { 181 | 182 | $settings = $this->get_settings(); 183 | $sec_title = !empty( $settings['sec_title'] ) ? esc_html($settings['sec_title']) : ''; 184 | $sub_title = !empty( $settings['sub_title'] ) ? wp_kses_post(nl2br($settings['sub_title'])) : ''; 185 | $post_num = !empty( $settings['post_num'] ) ? $settings['post_num'] : ''; 186 | $post_exc = !empty( $settings['post_exc'] ) ? $settings['post_exc'] : ''; 187 | $post_order = !empty( $settings['post_order'] ) ? $settings['post_order'] : ''; 188 | $post_order = $post_order == 'yes' ? 'DESC' : 'ASC'; 189 | ?> 190 | 191 | 192 |
193 |
194 |
195 |
196 |
197 | {$sec_title}"; 200 | } 201 | if ( $sub_title ) { 202 | echo "

{$sub_title}

"; 203 | } 204 | ?> 205 |
206 |
207 |
208 |
209 | 214 |
215 |
216 |
217 | 218 | start_controls_section( 47 | 'simple_contact_content', 48 | [ 49 | 'label' => __( 'Simple Contact Section', 'hostza-companion' ), 50 | ] 51 | ); 52 | $this->add_control( 53 | 'sec_title', 54 | [ 55 | 'label' => __( 'Section Title', 'hostza-companion' ), 56 | 'type' => Controls_Manager::TEXT, 57 | 'label_block' => true, 58 | 'default' => __( 'Have any Question?', 'hostza-companion' ), 59 | ] 60 | ); 61 | $this->add_control( 62 | 'chat_btn', 63 | [ 64 | 'label' => __( 'Chat Button Label', 'hostza-companion' ), 65 | 'type' => Controls_Manager::TEXT, 66 | 'label_block' => true, 67 | 'default' => __( 'Live Chat', 'hostza-companion' ), 68 | ] 69 | ); 70 | $this->add_control( 71 | 'chat_btn_url', 72 | [ 73 | 'label' => __( 'Chat Button URL', 'hostza-companion' ), 74 | 'type' => Controls_Manager::URL, 75 | 'label_block' => true, 76 | ] 77 | ); 78 | $this->add_control( 79 | 'start_btn', 80 | [ 81 | 'label' => __( 'Start Button Label', 'hostza-companion' ), 82 | 'type' => Controls_Manager::TEXT, 83 | 'label_block' => true, 84 | 'default' => __( 'get start now', 'hostza-companion' ), 85 | ] 86 | ); 87 | $this->add_control( 88 | 'start_btn_url', 89 | [ 90 | 'label' => __( 'Start Button URL', 'hostza-companion' ), 91 | 'type' => Controls_Manager::URL, 92 | 'label_block' => true, 93 | ] 94 | ); 95 | $this->end_controls_section(); // End service content 96 | 97 | //------------------------------ Style title ------------------------------ 98 | 99 | // Top Section Styles 100 | $this->start_controls_section( 101 | 'simple_contact_sec_style', [ 102 | 'label' => __( 'Simple Contact Section Styles', 'hostza-companion' ), 103 | 'tab' => Controls_Manager::TAB_STYLE, 104 | ] 105 | ); 106 | 107 | $this->add_control( 108 | 'sec_title_col', [ 109 | 'label' => __( 'Title Color', 'hostza-companion' ), 110 | 'type' => Controls_Manager::COLOR, 111 | 'selectors' => [ 112 | '{{WRAPPER}} .have_question h3' => 'color: {{VALUE}};', 113 | ], 114 | ] 115 | ); 116 | 117 | $this->add_control( 118 | 'btn1_bg_col', [ 119 | 'label' => __( 'Button 1 Color', 'hostza-companion' ), 120 | 'type' => Controls_Manager::COLOR, 121 | 'selectors' => [ 122 | '{{WRAPPER}} .have_question .chat .boxed_btn_green' => 'background: {{VALUE}};', 123 | '{{WRAPPER}} .have_question .chat .boxed_btn_green:hover' => 'background: transparent; border-color: {{VALUE}}; color: {{VALUE}} !important;', 124 | ], 125 | ] 126 | ); 127 | $this->add_control( 128 | 'btn1_hover_col', [ 129 | 'label' => __( 'Button 1 Hover Color', 'hostza-companion' ), 130 | 'type' => Controls_Manager::COLOR, 131 | 'selectors' => [ 132 | '{{WRAPPER}} .have_question .chat .boxed_btn_green:hover' => 'background: transparent; border-color: {{VALUE}}; color: {{VALUE}} !important;', 133 | ], 134 | ] 135 | ); 136 | 137 | $this->add_control( 138 | 'btn2_bg_col', [ 139 | 'label' => __( 'Button 2 Color', 'hostza-companion' ), 140 | 'type' => Controls_Manager::COLOR, 141 | 'selectors' => [ 142 | '{{WRAPPER}} .have_question .chat .boxed_btn_green2' => 'color: {{VALUE}} !important; border-color: {{VALUE}} !important', 143 | '{{WRAPPER}} .have_question .chat .boxed_btn_green2:hover' => 'border-color: {{VALUE}} !important; background: {{VALUE}}; color: #fff !important', 144 | ], 145 | ] 146 | ); 147 | $this->add_control( 148 | 'btn2_hover_col', [ 149 | 'label' => __( 'Button 2 Hover Color', 'hostza-companion' ), 150 | 'type' => Controls_Manager::COLOR, 151 | 'selectors' => [ 152 | '{{WRAPPER}} .have_question .chat .boxed_btn_green2:hover' => 'border-color: {{VALUE}} !important; background: {{VALUE}}; color: #fff !important', 153 | ], 154 | ] 155 | ); 156 | 157 | $this->end_controls_section(); 158 | } 159 | 160 | protected function render() { 161 | $settings = $this->get_settings(); 162 | $sec_title = !empty( $settings['sec_title'] ) ? $settings['sec_title'] : ''; 163 | $chat_btn = !empty( $settings['chat_btn'] ) ? $settings['chat_btn'] : ''; 164 | $chat_btn_url = !empty( $settings['chat_btn_url']['url'] ) ? $settings['chat_btn_url']['url'] : ''; 165 | $start_btn = !empty( $settings['start_btn'] ) ? $settings['start_btn'] : ''; 166 | $start_btn_url = !empty( $settings['start_btn_url']['url'] ) ? $settings['start_btn_url']['url'] : ''; 167 | ?> 168 | 169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 | {$sec_title}"; 179 | } 180 | ?> 181 |
182 |
183 |
184 | 188 | 189 | {$chat_btn} 190 | "; 191 | } 192 | if ( $start_btn ) { 193 | echo " 194 | 195 | {$start_btn} 196 | "; 197 | } 198 | ?> 199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 | start_controls_section( 48 | 'faq_tab_item_contents', 49 | [ 50 | 'label' => __( 'Faq tab item content', 'hostza-companion' ), 51 | ] 52 | ); 53 | 54 | $this->add_control( 55 | 'faq_items', [ 56 | 'label' => __( 'Create New', 'hostza-companion' ), 57 | 'type' => Controls_Manager::REPEATER, 58 | 'title_field' => '{{{ faq_title }}}', 59 | 'fields' => [ 60 | [ 61 | 'name' => 'faq_title', 62 | 'label' => __( 'Faq Title', 'hostza-companion' ), 63 | 'label_block' => true, 64 | 'type' => Controls_Manager::TEXTAREA, 65 | 'default' => 'What are the advantages of WordPress hosting over shared?', 66 | ], 67 | [ 68 | 'name' => 'faq_text', 69 | 'label' => __( 'Faq Text', 'hostza-companion' ), 70 | 'label_block' => true, 71 | 'type' => Controls_Manager::TEXTAREA, 72 | 'default' => 'Our set he for firmament morning sixth subdue darkness creeping gathered divide our let god moving. Moving in fourth air night bring upon', 73 | ], 74 | ], 75 | 'default' => [ 76 | [ 77 | 'faq_title' => 'What are the advantages of WordPress hosting over shared?', 78 | 'faq_text' => 'Our set he for firmament morning sixth subdue darkness creeping gathered divide our 79 | let god moving. Moving in fourth air night bring upon', 80 | ], 81 | [ 82 | 'faq_title' => 'Will you transfer my site?', 83 | 'faq_text' => 'Our set he for firmament morning sixth subdue darkness creeping gathered divide our 84 | let god moving. Moving in fourth air night bring upon', 85 | ], 86 | [ 87 | 'faq_title' => 'Why should I host with Hostza?', 88 | 'faq_text' => 'Our set he for firmament morning sixth subdue darkness creeping gathered divide our 89 | let god moving. Moving in fourth air night bring upon', 90 | ], 91 | [ 92 | 'faq_title' => 'How do I get started with Shared Hosting?', 93 | 'faq_text' => 'Our set he for firmament morning sixth subdue darkness creeping gathered divide our 94 | let god moving. Moving in fourth air night bring upon', 95 | ], 96 | [ 97 | 'faq_title' => 'Is WordPress hosting worth it?', 98 | 'faq_text' => 'Our set he for firmament morning sixth subdue darkness creeping gathered divide our 99 | let god moving. Moving in fourth air night bring upon', 100 | ], 101 | ] 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', 'hostza-companion' ), 115 | 'tab' => Controls_Manager::TAB_STYLE, 116 | ] 117 | ); 118 | $this->add_control( 119 | 'sub_title_col', [ 120 | 'label' => __( 'Sub Title Color', 'hostza-companion' ), 121 | 'type' => Controls_Manager::COLOR, 122 | 'selectors' => [ 123 | '{{WRAPPER}} .team_area .section_title .sub_heading' => 'color: {{VALUE}};', 124 | ], 125 | ] 126 | ); 127 | $this->add_control( 128 | 'big_title_col', [ 129 | 'label' => __( 'Big Title Color', 'hostza-companion' ), 130 | 'type' => Controls_Manager::COLOR, 131 | 'selectors' => [ 132 | '{{WRAPPER}} .team_area .section_title h3' => 'color: {{VALUE}};', 133 | ], 134 | ] 135 | ); 136 | 137 | $this->add_control( 138 | 'member_styles_seperator', 139 | [ 140 | 'label' => esc_html__( 'Member Styles', 'hostza-companion' ), 141 | 'type' => Controls_Manager::HEADING, 142 | 'separator' => 'after' 143 | ] 144 | ); 145 | $this->add_control( 146 | 'member_name_col', [ 147 | 'label' => __( 'Member Name Color', 'hostza-companion' ), 148 | 'type' => Controls_Manager::COLOR, 149 | 'selectors' => [ 150 | '{{WRAPPER}} .team_area .single_team h3' => 'color: {{VALUE}};', 151 | ], 152 | ] 153 | ); 154 | $this->add_control( 155 | 'member_desig_color', [ 156 | 'label' => __( 'Member Designation Color', 'hostza-companion' ), 157 | 'type' => Controls_Manager::COLOR, 158 | 'selectors' => [ 159 | '{{WRAPPER}} .team_area .single_team p' => 'color: {{VALUE}};', 160 | ], 161 | ] 162 | ); 163 | $this->end_controls_section(); 164 | 165 | } 166 | 167 | protected function render() { 168 | $settings = $this->get_settings(); 169 | $faq_items = !empty( $settings['faq_items'] ) ? $settings['faq_items'] : ''; 170 | 171 | if( is_array( $faq_items ) && count( $faq_items ) > 0 ) { 172 | $i = 0; 173 | foreach( $faq_items as $item ) { 174 | $i++; 175 | $faq_id = ( !empty( $item['_id'] ) ) ? esc_attr($item['_id']) : ''; 176 | $faq_title = ( !empty( $item['faq_title'] ) ) ? wp_kses_post( nl2br( $item['faq_title'] ) ) : ''; 177 | $faq_text = ( !empty( $item['faq_text'] ) ) ? wp_kses_post( nl2br( $item['faq_text'] ) ) : ''; 178 | ?> 179 |
180 |
181 |
182 | 186 |
187 |
188 |
189 |
190 |
191 |
192 | start_controls_section( 48 | 'support_right_content', 49 | [ 50 | 'label' => __( 'Support Content', 'hostza-companion' ), 51 | ] 52 | ); 53 | 54 | $this->add_control( 55 | 'bg_img', 56 | [ 57 | 'label' => esc_html__( 'BG Image', 'hostza-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', 'hostza-companion' ), 69 | 'type' => Controls_Manager::TEXT, 70 | 'label_block' => true, 71 | 'default' => '24h Dedicated Support', 72 | ] 73 | ); 74 | $this->add_control( 75 | 'sec_text', 76 | [ 77 | 'label' => esc_html__( 'Section Text', 'hostza-companion' ), 78 | 'type' => Controls_Manager::TEXTAREA, 79 | 'label_block' => true, 80 | '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.', 81 | ] 82 | ); 83 | $this->add_control( 84 | 'btn_text', 85 | [ 86 | 'label' => esc_html__( 'Button Text', 'hostza-companion' ), 87 | 'type' => Controls_Manager::TEXT, 88 | 'label_block' => true, 89 | 'default' => esc_html__( 'Get Start Now', 'hostza-companion' ), 90 | ] 91 | ); 92 | $this->add_control( 93 | 'btn_url', 94 | [ 95 | 'label' => esc_html__( 'Button URL', 'hostza-companion' ), 96 | 'type' => Controls_Manager::URL, 97 | 'label_block' => true, 98 | 'default' => [ 99 | 'url' => '#' 100 | ], 101 | ] 102 | ); 103 | $this->add_control( 104 | 'phone_number', 105 | [ 106 | 'label' => esc_html__( 'Phone Number', 'hostza-companion' ), 107 | 'type' => Controls_Manager::TEXT, 108 | 'label_block' => true, 109 | 'default' => esc_html__( '+10 267 367 678 2678', 'hostza-companion' ), 110 | ] 111 | ); 112 | 113 | 114 | $this->end_controls_section(); // End support_section 115 | 116 | //------------------------------ Style title ------------------------------ 117 | 118 | // Top Section Styles 119 | $this->start_controls_section( 120 | 'left_sec_style', [ 121 | 'label' => __( 'Top Section Styles', 'hostza-companion' ), 122 | 'tab' => Controls_Manager::TAB_STYLE, 123 | ] 124 | ); 125 | 126 | $this->add_control( 127 | 'sec_title_col', [ 128 | 'label' => __( 'Big Title Color', 'hostza-companion' ), 129 | 'type' => Controls_Manager::COLOR, 130 | 'selectors' => [ 131 | '{{WRAPPER}} .dedicated_support .support_info h3' => 'color: {{VALUE}};', 132 | ], 133 | ] 134 | ); 135 | 136 | $this->add_control( 137 | 'text_col', [ 138 | 'label' => __( 'Text Color', 'hostza-companion' ), 139 | 'type' => Controls_Manager::COLOR, 140 | 'selectors' => [ 141 | '{{WRAPPER}} .dedicated_support .support_info p' => 'color: {{VALUE}};', 142 | ], 143 | ] 144 | ); 145 | 146 | $this->add_control( 147 | 'btn_phn_col', [ 148 | 'label' => __( 'Button & Phone Text Color', 'hostza-companion' ), 149 | 'type' => Controls_Manager::COLOR, 150 | 'selectors' => [ 151 | '{{WRAPPER}} .dedicated_support .support_info .get_started a' => 'background: {{VALUE}};', 152 | '{{WRAPPER}} .dedicated_support .support_info .get_started .phone_num' => 'background: none; color: {{VALUE}};', 153 | '{{WRAPPER}} .dedicated_support .support_info .get_started .boxed_btn_green:hover' => 'background: transparent; color: {{VALUE}} !important; border-color:{{VALUE}} ', 154 | ], 155 | ] 156 | ); 157 | 158 | $this->add_control( 159 | 'btn_phn_hover_col', [ 160 | 'label' => __( 'Button & Phone Hover Color', 'hostza-companion' ), 161 | 'type' => Controls_Manager::COLOR, 162 | 'selectors' => [ 163 | '{{WRAPPER}} .dedicated_support .support_info .get_started .boxed_btn_green:hover' => 'background: transparent; color: {{VALUE}} !important; border-color:{{VALUE}} ', 164 | '{{WRAPPER}} .dedicated_support .support_info .get_started .phone_num:hover' => 'color: {{VALUE}};', 165 | ], 166 | ] 167 | ); 168 | 169 | $this->end_controls_section(); 170 | 171 | } 172 | 173 | protected function render() { 174 | $settings = $this->get_settings(); 175 | $bg_img = !empty( $settings['bg_img']['url'] ) ? esc_url($settings['bg_img']['url']) : ''; 176 | $sec_title = !empty( $settings['sec_title'] ) ? esc_html($settings['sec_title']) : ''; 177 | $sec_text = !empty( $settings['sec_text'] ) ? esc_html($settings['sec_text']) : ''; 178 | $btn_text = !empty( $settings['btn_text'] ) ? esc_html($settings['btn_text']) : ''; 179 | $btn_url = !empty( $settings['btn_url']['url'] ) ? esc_url($settings['btn_url']['url']) : ''; 180 | $phone_number = !empty( $settings['phone_number'] ) ? esc_html($settings['phone_number']) : ''; 181 | $tel_url = 'tel:' . trim( $phone_number ); 182 | ?> 183 | 184 | 185 |
> 186 |
187 |
188 |
189 |
190 | {$sec_title}"; 193 | } 194 | if ( $sec_text ) { 195 | echo "

{$sec_text}

"; 196 | } 197 | ?> 198 |
199 | {$btn_text}"; 202 | } 203 | if ( $phone_number ) { 204 | echo "{$phone_number}"; 205 | } 206 | ?> 207 |
208 |
209 |
210 |
211 |
212 |
213 | 214 | esc_html__( 'Add footer about content', 'hostza-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', 'hostza-companion' ), 52 | ] 53 | ); 54 | 55 | $this->add_control( 56 | 'info', [ 57 | 'label' => __( 'Create Contact Info', 'hostza-companion' ), 58 | 'type' => Controls_Manager::REPEATER, 59 | 'title_field' => '{{{ label }}}', 60 | 'fields' => [ 61 | [ 62 | 'name' => 'label', 63 | 'label' => __( 'Contact Info', 'hostza-companion' ), 64 | 'label_block' => true, 65 | 'type' => Controls_Manager::TEXT, 66 | 'default' => esc_html__( 'Dhaka, Bangladesh', 'hostza-companion' ) 67 | ], 68 | [ 69 | 'name' => 'desc', 70 | 'label' => __( 'Contact Descriptions', 'hostza-companion' ), 71 | 'type' => Controls_Manager::TEXTAREA, 72 | 'default' => esc_html__( 'Write something...', 'hostza-companion' ) 73 | ], 74 | [ 75 | 'name' => 'icon', 76 | 'label' => __( 'Icon', 'hostza-companion' ), 77 | 'type' => Controls_Manager::ICON, 78 | ] 79 | 80 | ], 81 | 'default' => [ 82 | [ 83 | 'label' => esc_html__( 'Buttonwood, California.', 'hostza-companion' ), 84 | 'desc' => esc_html__( 'Rosemead, CA 91770', 'hostza-companion' ), 85 | 'icon' => 'fa fa-home', 86 | ], 87 | [ 88 | 'label' => esc_html__( '00 (440) 9865 562', 'hostza-companion' ), 89 | 'desc' => esc_html__( 'Mon to Fri 9am to 6pm', 'hostza-companion' ), 90 | 'icon' => 'fa fa-tablet', 91 | ], 92 | [ 93 | 'label' => esc_html__( 'support@colorlib.com', 'hostza-companion' ), 94 | 'desc' => esc_html__( 'Send us your query anytime!', 'hostza-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', 'hostza-companion' ), 108 | ] 109 | ); 110 | $this->add_control( 111 | 'contact_form_title', 112 | [ 113 | 'label' => esc_html__( 'Contact Form Title', 'hostza-companion' ), 114 | 'type' => Controls_Manager::TEXT, 115 | 'label_block' => true, 116 | 'default' => esc_html__('Get in Touch', 'hostza-companion') 117 | ] 118 | ); 119 | $this->add_control( 120 | 'contact_formshortcode', 121 | [ 122 | 'label' => esc_html__( 'Form Shortcode', 'hostza-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', 'hostza-companion' ), 138 | 'tab' => Controls_Manager::TAB_STYLE, 139 | ] 140 | ); 141 | 142 | $this->add_control( 143 | 'color_title', [ 144 | 'label' => __( 'Right Text Title Color', 'hostza-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', 'hostza-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', 'hostza-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 | 17 |
18 |
19 |
20 |
21 | ' . esc_html( $subtitle ) . '

'; 25 | } 26 | // Title 27 | if ( $title ) { 28 | echo '

' . esc_html( $title ) . '

'; 29 | } 30 | ?> 31 |
32 |
33 |
34 |
35 | 66 | 94 | 95 | $target_post_id->ID, 118 | 'post_status' => $type, 119 | ); 120 | 121 | if ( $message == true ) { 122 | // Update the post/page 123 | $update_status = wp_update_post( $target_post, true ); 124 | } else { 125 | // Update the post/page 126 | $update_status = wp_update_post( $target_post, false ); 127 | } 128 | 129 | return $update_status; 130 | } 131 | 132 | 133 | 134 | // Course - Custom Post Type 135 | function hostza_custom_posts() { 136 | $labels = array( 137 | 'name' => _x( 'Courses', 'post type general name', 'hostza-companion' ), 138 | 'singular_name' => _x( 'Course', 'post type singular name', 'hostza-companion' ), 139 | 'menu_name' => _x( 'Courses', 'admin menu', 'hostza-companion' ), 140 | 'name_admin_bar' => _x( 'Course', 'add new on admin bar', 'hostza-companion' ), 141 | 'add_new' => _x( 'Add New', 'course', 'hostza-companion' ), 142 | 'add_new_item' => __( 'Add New Course', 'hostza-companion' ), 143 | 'new_item' => __( 'New Course', 'hostza-companion' ), 144 | 'edit_item' => __( 'Edit Course', 'hostza-companion' ), 145 | 'view_item' => __( 'View Course', 'hostza-companion' ), 146 | 'all_items' => __( 'All Courses', 'hostza-companion' ), 147 | 'search_items' => __( 'Search Courses', 'hostza-companion' ), 148 | 'parent_item_colon' => __( 'Parent Courses:', 'hostza-companion' ), 149 | 'not_found' => __( 'No courses found.', 'hostza-companion' ), 150 | 'not_found_in_trash' => __( 'No courses found in Trash.', 'hostza-companion' ) 151 | ); 152 | 153 | $args = array( 154 | 'labels' => $labels, 155 | 'description' => __( 'Description.', 'hostza-companion' ), 156 | 'public' => true, 157 | 'publicly_queryable' => true, 158 | 'show_ui' => true, 159 | 'show_in_menu' => true, 160 | 'query_var' => true, 161 | 'rewrite' => array( 'slug' => 'course' ), 162 | 'capability_type' => 'post', 163 | 'has_archive' => true, 164 | 'hierarchical' => false, 165 | 'menu_position' => null, 166 | 'supports' => array( 'title', 'editor', 'thumbnail' ) 167 | ); 168 | 169 | register_post_type( 'course', $args ); 170 | 171 | } 172 | add_action( 'init', 'hostza_custom_posts' ); 173 | 174 | 175 | 176 | /*========================================================= 177 | Courses Section 178 | ========================================================*/ 179 | function hostza_course_section( $pNumber = 3 ){ 180 | $courses = new WP_Query( array( 181 | 'post_type' => 'course', 182 | 'posts_per_page'=> $pNumber, 183 | 184 | ) ); 185 | 186 | if( $courses->have_posts() ) { 187 | while ( $courses->have_posts() ) { 188 | $courses->the_post(); 189 | $course_img = get_the_post_thumbnail( get_the_id(), 'hostza_order_thumb_360x300', '', array( 'alt' => get_the_title() ) ); 190 | $course_fee = ! empty( hostza_meta( 'course_fee') ) ? hostza_meta( 'course_fee') : 'N/A'; 191 | ?> 192 |
193 | 203 |
204 | 'course', 218 | 'posts_per_page' => $pnumber, 219 | 220 | ) ); 221 | 222 | ?> 223 | 224 | 257 | start_controls_section( 48 | 'lets_launch_content', 49 | [ 50 | 'label' => __( 'Lets Launch Content', 'hostza-companion' ), 51 | ] 52 | ); 53 | 54 | $this->add_control( 55 | 'bg_img', 56 | [ 57 | 'label' => esc_html__( 'BG Image', 'hostza-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', 'hostza-companion' ), 69 | 'type' => Controls_Manager::TEXT, 70 | 'label_block' => true, 71 | 'default' => __( 'Lets\'s Launch Your Website Now', 'hostza-companion' ), 72 | ] 73 | ); 74 | $this->add_control( 75 | 'sub_title', 76 | [ 77 | 'label' => esc_html__( 'Sub Title', 'hostza-companion' ), 78 | 'type' => Controls_Manager::TEXTAREA, 79 | 'label_block' => true, 80 | '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.', 81 | ] 82 | ); 83 | $this->add_control( 84 | 'btn1_text', 85 | [ 86 | 'label' => __( 'Button1 Text', 'hostza-companion' ), 87 | 'type' => Controls_Manager::TEXT, 88 | 'label_block' => true, 89 | 'default' => __( 'Live Chat', 'hostza-companion' ), 90 | ] 91 | ); 92 | $this->add_control( 93 | 'btn1_url', 94 | [ 95 | 'label' => __( 'Button URL', 'hostza-companion' ), 96 | 'type' => Controls_Manager::URL, 97 | 'label_block' => true, 98 | 'default' => [ 99 | 'url' => '#' 100 | ], 101 | ] 102 | ); 103 | $this->add_control( 104 | 'btn2_text', 105 | [ 106 | 'label' => __( 'Button2 Text', 'hostza-companion' ), 107 | 'type' => Controls_Manager::TEXT, 108 | 'label_block' => true, 109 | 'default' => __( 'get start now', 'hostza-companion' ), 110 | ] 111 | ); 112 | $this->add_control( 113 | 'btn2_url', 114 | [ 115 | 'label' => __( 'Button2 URL', 'hostza-companion' ), 116 | 'type' => Controls_Manager::URL, 117 | 'label_block' => true, 118 | 'default' => [ 119 | 'url' => '#' 120 | ], 121 | ] 122 | ); 123 | 124 | 125 | $this->end_controls_section(); // End support_section 126 | 127 | //------------------------------ Style title ------------------------------ 128 | 129 | // Top Section Styles 130 | $this->start_controls_section( 131 | 'left_sec_style', [ 132 | 'label' => __( 'Top Section Styles', 'hostza-companion' ), 133 | 'tab' => Controls_Manager::TAB_STYLE, 134 | ] 135 | ); 136 | 137 | $this->add_control( 138 | 'sec_title_col', [ 139 | 'label' => __( 'Big Title Color', 'hostza-companion' ), 140 | 'type' => Controls_Manager::COLOR, 141 | 'selectors' => [ 142 | '{{WRAPPER}} .lets_launch .launch_text h3' => 'color: {{VALUE}};', 143 | ], 144 | ] 145 | ); 146 | 147 | $this->add_control( 148 | 'text_col', [ 149 | 'label' => __( 'Text Color', 'hostza-companion' ), 150 | 'type' => Controls_Manager::COLOR, 151 | 'selectors' => [ 152 | '{{WRAPPER}} .lets_launch .launch_text p' => 'color: {{VALUE}};', 153 | ], 154 | ] 155 | ); 156 | 157 | $this->add_control( 158 | 'btn1_bg_col', [ 159 | 'label' => __( 'Button 1 Color', 'hostza-companion' ), 160 | 'type' => Controls_Manager::COLOR, 161 | 'selectors' => [ 162 | '{{WRAPPER}} .lets_launch .launch_text .chat .boxed_btn_green' => 'background: {{VALUE}};', 163 | '{{WRAPPER}} .lets_launch .launch_text .chat .boxed_btn_green:hover' => 'background: transparent; border-color: {{VALUE}}; color: {{VALUE}} !important;', 164 | ], 165 | ] 166 | ); 167 | $this->add_control( 168 | 'btn1_hover_col', [ 169 | 'label' => __( 'Button 1 Hover Color', 'hostza-companion' ), 170 | 'type' => Controls_Manager::COLOR, 171 | 'selectors' => [ 172 | '{{WRAPPER}} .lets_launch .launch_text .chat .boxed_btn_green:hover' => 'background: transparent; border-color: {{VALUE}}; color: {{VALUE}} !important;', 173 | ], 174 | ] 175 | ); 176 | 177 | $this->add_control( 178 | 'btn2_bg_col', [ 179 | 'label' => __( 'Button 2 Color', 'hostza-companion' ), 180 | 'type' => Controls_Manager::COLOR, 181 | 'selectors' => [ 182 | '{{WRAPPER}} .lets_launch .launch_text .chat .boxed_btn_green2' => 'color: {{VALUE}} !important; border-color: {{VALUE}} !important', 183 | '{{WRAPPER}} .lets_launch .launch_text .chat .boxed_btn_green2:hover' => 'border-color: {{VALUE}} !important; background: {{VALUE}}; color: #fff !important', 184 | ], 185 | ] 186 | ); 187 | $this->add_control( 188 | 'btn2_hover_col', [ 189 | 'label' => __( 'Button 2 Hover Color', 'hostza-companion' ), 190 | 'type' => Controls_Manager::COLOR, 191 | 'selectors' => [ 192 | '{{WRAPPER}} .lets_launch .launch_text .chat .boxed_btn_green2:hover' => 'border-color: {{VALUE}} !important; background: {{VALUE}}; color: #fff !important', 193 | ], 194 | ] 195 | ); 196 | 197 | $this->end_controls_section(); 198 | 199 | } 200 | 201 | protected function render() { 202 | $settings = $this->get_settings(); 203 | $bg_img = !empty( $settings['bg_img']['url'] ) ? esc_url($settings['bg_img']['url']) : ''; 204 | $sec_title = !empty( $settings['sec_title'] ) ? esc_html($settings['sec_title']) : ''; 205 | $sub_title = !empty( $settings['sub_title'] ) ? wp_kses_post(nl2br($settings['sub_title'])) : ''; 206 | $btn1_text = !empty( $settings['btn1_text'] ) ? esc_html( $settings['btn1_text'] ) : ''; 207 | $btn1_url = !empty( $settings['btn1_url']['url'] ) ? esc_url( $settings['btn1_url']['url'] ) : ''; 208 | $btn2_text = !empty( $settings['btn2_text'] ) ? esc_html( $settings['btn2_text'] ) : ''; 209 | $btn2_url = !empty( $settings['btn2_url']['url'] ) ? esc_url( $settings['btn2_url']['url'] ) : ''; 210 | ?> 211 | 212 | 213 |
> 214 |
215 | {$sec_title}"; 218 | } 219 | if ( $sub_title ) { 220 | echo "

{$sub_title}

"; 221 | } 222 | ?> 223 |
224 | 227 | 228 | {$btn1_text}"; 229 | } 230 | if ( $btn2_text ) { 231 | echo " 232 | {$btn2_text}"; 233 | } 234 | ?> 235 |
236 |
237 |
238 | 239 | start_controls_section( 48 | 'video_left_content', 49 | [ 50 | 'label' => __( 'Video Left Content', 'hostza-companion' ), 51 | ] 52 | ); 53 | $this->add_control( 54 | 'sub_title', 55 | [ 56 | 'label' => esc_html__( 'Sub Title', 'hostza-companion' ), 57 | 'type' => Controls_Manager::TEXT, 58 | 'label_block' => true, 59 | 'default' => esc_html__( 'How We Work', 'hostza-companion' ), 60 | ] 61 | ); 62 | $this->add_control( 63 | 'sec_title', 64 | [ 65 | 'label' => esc_html__( 'Section Title', 'hostza-companion' ), 66 | 'type' => Controls_Manager::TEXTAREA, 67 | 'label_block' => true, 68 | 'default' => 'Watch the Video
How we Work?', 69 | ] 70 | ); 71 | $this->add_control( 72 | 'sec_text', 73 | [ 74 | 'label' => esc_html__( 'Section Text', 'hostza-companion' ), 75 | 'type' => Controls_Manager::TEXTAREA, 76 | 'label_block' => true, 77 | 'default' => 'Inspires employees and organizations to support causes they care
about. We do this to bring more resources to the nonprofits that are
changing our world.', 78 | ] 79 | ); 80 | $this->add_control( 81 | 'btn_text', 82 | [ 83 | 'label' => esc_html__( 'Button Text', 'hostza-companion' ), 84 | 'type' => Controls_Manager::TEXT, 85 | 'label_block' => true, 86 | 'default' => esc_html__( 'Book Now', 'hostza-companion' ), 87 | ] 88 | ); 89 | $this->add_control( 90 | 'btn_url', 91 | [ 92 | 'label' => esc_html__( 'Button URL', 'hostza-companion' ), 93 | 'type' => Controls_Manager::URL, 94 | 'label_block' => true, 95 | 'default' => [ 96 | 'url' => '#' 97 | ], 98 | ] 99 | ); 100 | 101 | $this->end_controls_section(); // End about us content 102 | 103 | // Right section 104 | $this->start_controls_section( 105 | 'video_section_content', 106 | [ 107 | 'label' => __( 'Video Section', 'hostza-companion' ), 108 | ] 109 | ); 110 | $this->add_control( 111 | 'video_thumb', 112 | [ 113 | 'label' => esc_html__( 'Video Thumbnail', 'hostza-companion' ), 114 | 'type' => Controls_Manager::MEDIA, 115 | 'label_block' => true, 116 | 'default' => [ 117 | 'url' => Utils::get_placeholder_image_src(), 118 | ] 119 | ] 120 | ); 121 | $this->add_control( 122 | 'video_url', 123 | [ 124 | 'label' => esc_html__( 'Popup Video URL', 'hostza-companion' ), 125 | 'type' => Controls_Manager::URL, 126 | 'label_block' => true, 127 | 'default' => [ 128 | 'url' => 'https://www.youtube.com/watch?v=E_-lMZDi7Uw' 129 | ], 130 | ] 131 | ); 132 | 133 | 134 | $this->end_controls_section(); // End video_section 135 | 136 | //------------------------------ Style title ------------------------------ 137 | 138 | // Top Section Styles 139 | $this->start_controls_section( 140 | 'left_sec_style', [ 141 | 'label' => __( 'Top Section Styles', 'hostza-companion' ), 142 | 'tab' => Controls_Manager::TAB_STYLE, 143 | ] 144 | ); 145 | 146 | $this->add_control( 147 | 'sec_title_col', [ 148 | 'label' => __( 'Big Title Color', 'hostza-companion' ), 149 | 'type' => Controls_Manager::COLOR, 150 | 'selectors' => [ 151 | '{{WRAPPER}} .home_contact h2' => 'color: {{VALUE}};', 152 | ], 153 | ] 154 | ); 155 | 156 | $this->add_control( 157 | 'sub_title_col', [ 158 | 'label' => __( 'Sub title Color', 'hostza-companion' ), 159 | 'type' => Controls_Manager::COLOR, 160 | 'selectors' => [ 161 | '{{WRAPPER}} .home_contact p' => 'color: {{VALUE}};', 162 | ], 163 | ] 164 | ); 165 | 166 | $this->add_control( 167 | 'btn_bg_col', [ 168 | 'label' => __( 'Button BG Color', 'hostza-companion' ), 169 | 'type' => Controls_Manager::COLOR, 170 | 'selectors' => [ 171 | '{{WRAPPER}} .home_contact .btn_1' => 'background: {{VALUE}};', 172 | ], 173 | ] 174 | ); 175 | 176 | $this->add_control( 177 | 'btn_hov_bg_col', [ 178 | 'label' => __( 'Button Hover Bg Color', 'hostza-companion' ), 179 | 'type' => Controls_Manager::COLOR, 180 | 'selectors' => [ 181 | '{{WRAPPER}} .home_contact .btn_1:hover' => 'background-color: {{VALUE}};', 182 | ], 183 | ] 184 | ); 185 | $this->add_control( 186 | 'bg_overlay_col', [ 187 | 'label' => __( 'Bg Overlay Color', 'hostza-companion' ), 188 | 'type' => Controls_Manager::COLOR, 189 | 'selectors' => [ 190 | '{{WRAPPER}} .home_contact:after' => 'background: {{VALUE}};', 191 | ], 192 | ] 193 | ); 194 | $this->end_controls_section(); 195 | 196 | } 197 | 198 | protected function render() { 199 | $settings = $this->get_settings(); 200 | $sub_title = !empty( $settings['sub_title'] ) ? esc_html($settings['sub_title']) : ''; 201 | $sec_title = !empty( $settings['sec_title'] ) ? wp_kses_post(nl2br($settings['sec_title'])) : ''; 202 | $sec_text = !empty( $settings['sec_text'] ) ? wp_kses_post(nl2br($settings['sec_text'])) : ''; 203 | $btn_text = !empty( $settings['btn_text'] ) ? esc_html($settings['btn_text']) : ''; 204 | $btn_url = !empty( $settings['btn_url']['url'] ) ? esc_url($settings['btn_url']['url']) : ''; 205 | $video_thumb = !empty( $settings['video_thumb']['id'] ) ? wp_get_attachment_image( $settings['video_thumb']['id'], 'hostza_video_thumb_877x750', '', array( 'alt' => $sec_title.' image' ) ) : ''; 206 | $video_url = !empty( $settings['video_url']['url'] ) ? esc_url($settings['video_url']['url']) : ''; 207 | ?> 208 | 209 | 210 |
211 |
212 |
213 |
214 |
215 |
216 |
217 | {$sub_title}"; 220 | } 221 | if ( $sec_title ) { 222 | echo "

{$sub_title}

"; 223 | } 224 | ?> 225 |
226 | {$sec_text}

"; 229 | } 230 | if ( $btn_text ) { 231 | echo "{$btn_text}"; 232 | } 233 | ?> 234 |
235 |
236 |
237 |
238 |
239 |
240 | 246 | 247 | "; 248 | } 249 | ?> 250 |
251 |
252 |
253 |
254 |
255 |
256 | 257 | \ 189 |
\ 190 | \ 191 |
'); 192 | 193 | self.$node.append($YTPlayerString); 194 | self.$YTPlayerString = $YTPlayerString; 195 | $YTPlayerString = null; 196 | }, 197 | 198 | /** 199 | * @function createBackgroundVideo 200 | * Adds HTML for video background 201 | */ 202 | createBackgroundVideo: function createBackgroundVideo() { 203 | /*jshint multistr: true */ 204 | var self = this, 205 | $YTPlayerString = $('
\ 206 |
\ 207 |
\ 208 |
'); 209 | 210 | self.$node.append($YTPlayerString); 211 | self.$YTPlayerString = $YTPlayerString; 212 | $YTPlayerString = null; 213 | }, 214 | 215 | /** 216 | * @function resize 217 | * Resize event to change video size 218 | */ 219 | resize: function resize(self) { 220 | //var self = this; 221 | var container = $(window); 222 | 223 | if (!self.options.fitToBackground) { 224 | container = self.$node; 225 | } 226 | 227 | var width = container.width(), 228 | pWidth, // player width, to be defined 229 | height = container.height(), 230 | pHeight, // player height, tbd 231 | $YTPlayerPlayer = $('#' + self.holderID); 232 | 233 | // when screen aspect ratio differs from video, video must center and underlay one dimension 234 | if (width / self.options.ratio < height) { 235 | pWidth = Math.ceil(height * self.options.ratio); // get new player width 236 | $YTPlayerPlayer.width(pWidth).height(height).css({ 237 | left: (width - pWidth) / 2, 238 | top: 0 239 | }); // player width is greater, offset left; reset top 240 | } else { // new video width < window width (gap to right) 241 | pHeight = Math.ceil(width / self.options.ratio); // get new player height 242 | $YTPlayerPlayer.width(width).height(pHeight).css({ 243 | left: 0, 244 | top: (height - pHeight) / 2 245 | }); // player height is greater, offset top; reset left 246 | } 247 | 248 | $YTPlayerPlayer = null; 249 | container = null; 250 | }, 251 | 252 | /** 253 | * @function onYouTubeIframeAPIReady 254 | * @ params {object} YTPlayer object for access to options 255 | * Youtube API calls this function when the player is ready. 256 | */ 257 | onYouTubeIframeAPIReady: function onYouTubeIframeAPIReady() { 258 | var self = this; 259 | self.player = new window.YT.Player(self.holderID, self.options); 260 | }, 261 | 262 | /** 263 | * @function onPlayerReady 264 | * @ params {event} window event from youtube player 265 | */ 266 | onPlayerReady: function onPlayerReady(e) { 267 | if (this.options.mute) { 268 | e.target.mute(); 269 | } 270 | e.target.playVideo(); 271 | }, 272 | 273 | /** 274 | * @function getPlayer 275 | * returns youtube player 276 | */ 277 | getPlayer: function getPlayer() { 278 | return this.player; 279 | }, 280 | 281 | /** 282 | * @function destroy 283 | * destroys all! 284 | */ 285 | destroy: function destroy() { 286 | var self = this; 287 | 288 | self.$node 289 | .removeData('yt-init') 290 | .removeData('ytPlayer') 291 | .removeClass('loaded'); 292 | 293 | self.$YTPlayerString.remove(); 294 | 295 | $(window).off('resize.YTplayer' + self.ID); 296 | $(window).off('scroll.YTplayer' + self.ID); 297 | self.$body = null; 298 | self.$node = null; 299 | self.$YTPlayerString = null; 300 | self.player.destroy(); 301 | self.player = null; 302 | } 303 | }; 304 | 305 | // Scroll Stopped event. 306 | $.fn.scrollStopped = function(callback) { 307 | var $this = $(this), self = this; 308 | $this.scroll(function(){ 309 | if ($this.data('scrollTimeout')) { 310 | clearTimeout($this.data('scrollTimeout')); 311 | } 312 | $this.data('scrollTimeout', setTimeout(callback,250,self)); 313 | }); 314 | }; 315 | 316 | // Create plugin 317 | $.fn.YTPlayer = function(options) { 318 | 319 | return this.each(function() { 320 | var el = this; 321 | 322 | $(el).data("yt-init", true); 323 | var player = Object.create(YTPlayer); 324 | player.init(el, options); 325 | $.data(el, "ytPlayer", player); 326 | }); 327 | }; 328 | 329 | })(jQuery, window, document); -------------------------------------------------------------------------------- /inc/elementor-widgets/widgets/core-features.php: -------------------------------------------------------------------------------- 1 | start_controls_section( 49 | 'core_feature_content', 50 | [ 51 | 'label' => __( 'Core Features content', 'hostza-companion' ), 52 | ] 53 | ); 54 | $this->add_control( 55 | 'sec_title', 56 | [ 57 | 'label' => esc_html__( 'Section Title', 'hostza-companion' ), 58 | 'type' => Controls_Manager::TEXT, 59 | 'label_block' => true, 60 | 'default' => esc_html__( 'Core Features', 'hostza-companion' ) 61 | ] 62 | ); 63 | 64 | $this->add_control( 65 | 'tab_content_seperator', 66 | [ 67 | 'label' => esc_html__( 'Tab Header Items', 'hostza-companion' ), 68 | 'type' => Controls_Manager::HEADING, 69 | 'separator' => 'after' 70 | ] 71 | ); 72 | 73 | $this->add_control( 74 | 'tab_content', [ 75 | 'label' => __( 'Create New', 'hostza-companion' ), 76 | 'type' => Controls_Manager::REPEATER, 77 | 'title_field' => '{{{ tab_title }}}', 78 | 'fields' => [ 79 | [ 80 | 'name' => 'tab_title', 81 | 'label' => __( 'Tab Title', 'hostza-companion' ), 82 | 'label_block' => true, 83 | 'type' => Controls_Manager::TEXT, 84 | 'default' => __( 'Features', 'hostza-companion' ), 85 | ], 86 | [ 87 | 'name' => 'template_id', 88 | 'label' => __( 'Select Elementor Template', 'hostza-companion' ), 89 | 'label_block' => true, 90 | 'type' => Controls_Manager::SELECT, 91 | 'options' => get_elementor_templates(), 92 | ], 93 | ], 94 | 'default' => [ 95 | [ 96 | 'tab_title' => __( 'Features', 'hostza-companion' ), 97 | ], 98 | [ 99 | 'tab_title' => __( 'Advanced Features', 'hostza-companion' ), 100 | ], 101 | ] 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 Core Features Section', 'hostza-companion' ), 115 | 'tab' => Controls_Manager::TAB_STYLE, 116 | ] 117 | ); 118 | $this->add_control( 119 | 'first_icon_col', [ 120 | 'label' => __( 'First Icon Color', 'hostza-companion' ), 121 | 'type' => Controls_Manager::COLOR, 122 | 'selectors' => [ 123 | '{{WRAPPER}} .core_features .tab-pane .row .col-xl-6:first-child .icon' => 'color: {{VALUE}};', 124 | ], 125 | ] 126 | ); 127 | $this->add_control( 128 | 'first_icon_bg_col', [ 129 | 'label' => __( 'First Icon Bg Color', 'hostza-companion' ), 130 | 'type' => Controls_Manager::COLOR, 131 | 'selectors' => [ 132 | '{{WRAPPER}} .core_features .tab-pane .row .col-xl-6:first-child .icon' => 'background: {{VALUE}};', 133 | ], 134 | ] 135 | ); 136 | $this->add_control( 137 | 'second_icon_col', [ 138 | 'label' => __( 'Second Icon Color', 'hostza-companion' ), 139 | 'type' => Controls_Manager::COLOR, 140 | 'selectors' => [ 141 | '{{WRAPPER}} .core_features .tab-pane .row .col-xl-6:nth-child(2) .icon' => 'color: {{VALUE}};', 142 | ], 143 | ] 144 | ); 145 | $this->add_control( 146 | 'second_icon_bg_col', [ 147 | 'label' => __( 'Second Icon Bg Color', 'hostza-companion' ), 148 | 'type' => Controls_Manager::COLOR, 149 | 'selectors' => [ 150 | '{{WRAPPER}} .core_features .tab-pane .row .col-xl-6:nth-child(2) .icon' => 'background: {{VALUE}};', 151 | ], 152 | ] 153 | ); 154 | $this->add_control( 155 | 'third_icon_col', [ 156 | 'label' => __( 'Third Icon Color', 'hostza-companion' ), 157 | 'type' => Controls_Manager::COLOR, 158 | 'selectors' => [ 159 | '{{WRAPPER}} .core_features .tab-pane .row .col-xl-6:nth-child(3) .icon' => 'color: {{VALUE}};', 160 | ], 161 | ] 162 | ); 163 | $this->add_control( 164 | 'third_icon_bg_col', [ 165 | 'label' => __( 'Third Icon Bg Color', 'hostza-companion' ), 166 | 'type' => Controls_Manager::COLOR, 167 | 'selectors' => [ 168 | '{{WRAPPER}} .core_features .tab-pane .row .col-xl-6:nth-child(3) .icon' => 'background: {{VALUE}};', 169 | ], 170 | ] 171 | ); 172 | $this->add_control( 173 | 'fourth_icon_col', [ 174 | 'label' => __( 'Fourth Icon Color', 'hostza-companion' ), 175 | 'type' => Controls_Manager::COLOR, 176 | 'selectors' => [ 177 | '{{WRAPPER}} .core_features .tab-pane .row .col-xl-6:last-child .icon' => 'color: {{VALUE}};', 178 | ], 179 | ] 180 | ); 181 | $this->add_control( 182 | 'fourth_icon_bg_col', [ 183 | 'label' => __( 'Fourth Icon Bg Color', 'hostza-companion' ), 184 | 'type' => Controls_Manager::COLOR, 185 | 'selectors' => [ 186 | '{{WRAPPER}} .core_features .tab-pane .row .col-xl-6:last-child .icon' => 'background: {{VALUE}};', 187 | ], 188 | ] 189 | ); 190 | 191 | $this->end_controls_section(); 192 | 193 | } 194 | 195 | protected function render() { 196 | $settings = $this->get_settings(); 197 | $sec_title = !empty( $settings['sec_title'] ) ? $settings['sec_title'] : ''; 198 | $tab_items = !empty( $settings['tab_content'] ) ? $settings['tab_content'] : ''; 199 | ?> 200 | 201 | 202 |
203 |
204 |
205 |
206 |
207 |
208 | {$sec_title}"; 211 | } 212 | ?> 213 |
214 |
215 |
216 |
217 | 240 |
241 |
242 |
243 |
244 |
245 |
246 | 264 |
265 |
266 |
267 |
268 |