\r\n
\r\n
700, Green Lane, New York, USA<\/div>\r\n<\/div>\r\n<\/div>\r\n<\/div><\/li>\r\n<\/ul>\r\n<\/div>","filter":true,"visual":true}},"footer-2":{"nav_menu-1":{"title":"Our Services","nav_menu":15}},"footer-3":{"nav_menu-2":{"title":"Quick Links","nav_menu":16}}}
--------------------------------------------------------------------------------
/inc/anipat-metabox.php:
--------------------------------------------------------------------------------
1 | 'anipat_metaboxes',
7 | 'title' => esc_html__( 'Page Options', 'anipat-companion' ),
8 | 'post_types'=> array( 'page' ),
9 | 'priority' => 'high',
10 | 'autosave' => 'false',
11 | 'fields' => array(
12 | array(
13 | 'id' => $anipat_prefix . 'page_title',
14 | 'type' => 'text',
15 | // 'required' => true,
16 | 'name' => esc_html__( 'Page Title', 'anipat-companion' ),
17 | ),
18 | array(
19 | 'id' => $anipat_prefix . 'banner_img',
20 | 'type' => 'background',
21 | // 'required' => true,
22 | 'name' => esc_html__( 'Banner Image', 'anipat-companion' ),
23 | ),
24 | ),
25 | );
26 |
27 |
28 | return $meta_boxes;
29 | }
30 | add_filter( 'rwmb_meta_boxes', 'anipat_page_metabox' );
31 |
--------------------------------------------------------------------------------
/anipat-init.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/inc/elementor-widgets/assets/js/jquery.counterup.min.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * jquery.counterup.js 1.0
3 | *
4 | * Copyright 2013, Benjamin Intal http://gambit.ph @bfintal
5 | * Released under the GPL v2 License
6 | *
7 | * Date: Nov 26, 2013
8 | */(function(e){"use strict";e.fn.counterUp=function(t){var n=e.extend({time:400,delay:10},t);return this.each(function(){var t=e(this),r=n,i=function(){var e=[],n=r.time/r.delay,i=t.text(),s=/[0-9]+,[0-9]+/.test(i);i=i.replace(/,/g,"");var o=/^[0-9]+$/.test(i),u=/^[0-9]+\.[0-9]+$/.test(i),a=u?(i.split(".")[1]||[]).length:0;for(var f=n;f>=1;f--){var l=parseInt(i/n*f);u&&(l=parseFloat(i/n*f).toFixed(a));if(s)while(/(\d+)(\d{3})/.test(l.toString()))l=l.toString().replace(/(\d+)(\d{3})/,"$1,$2");e.unshift(l)}t.data("counterup-nums",e);t.text("0");var c=function(){t.text(t.data("counterup-nums").shift());if(t.data("counterup-nums").length)setTimeout(t.data("counterup-func"),r.delay);else{delete t.data("counterup-nums");t.data("counterup-nums",null);t.data("counterup-func",null)}};t.data("counterup-func",c);setTimeout(t.data("counterup-func"),r.delay)};t.waypoint(i,{offset:"100%",triggerOnce:!0})})}})(jQuery);
--------------------------------------------------------------------------------
/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': 'anipat_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 | $('.anipat-portfolio-load').html(data);
38 |
39 | var $container = $('.anipat-portfolio');
40 |
41 | $container.isotope('reloadItems').isotope({
42 | itemSelector: '.single_gallery_item',
43 | percentPosition: true,
44 | masonry: {
45 | columnWidth: '.single_gallery_item'
46 | }
47 | });
48 |
49 | var loaditems = parseInt(Incr) + parseInt(postNumber);
50 |
51 | if (portfolioloadajax.totalitems == loaditems) {
52 | $button.hide();
53 | }
54 |
55 | }
56 |
57 | });
58 |
59 | return false;
60 |
61 | });
62 |
63 |
64 | }
65 |
66 |
67 | })(jQuery);
--------------------------------------------------------------------------------
/inc/demo-data/anipat-customizer.dat:
--------------------------------------------------------------------------------
1 | a:4:{s:8:"template";s:6:"anipat";s:4:"mods";a:24:{i:0;b:0;s:18:"nav_menu_locations";a:3:{s:12:"primary-menu";i:14;s:12:"our-services";i:15;s:11:"quick-links";i:16;}s:18:"custom_css_post_id";i:-1;s:16:"sidebars_widgets";a:2:{s:4:"time";i:1639315498;s:4:"data";a:5:{s:19:"wp_inactive_widgets";a:0:{}s:19:"anipat-post-sidebar";a:3:{i:0;s:7:"block-2";i:1;s:7:"block-3";i:2;s:7:"block-4";}s:8:"footer-2";a:2:{i:0;s:7:"block-5";i:1;s:7:"block-6";}s:8:"footer-3";a:0:{}s:8:"footer-4";a:0:{}}}s:27:"anipat_footer_widget_toggle";b:1;s:28:"anipat_social_profile_toggle";b:1;s:22:"anipat_social_profiles";a:4:{i:0;a:4:{s:17:"social_link_title";s:9:"Facebook ";s:10:"social_url";s:1:"#";s:11:"social_icon";s:14:"fa fa-facebook";s:5:"index";i:0;}i:1;a:4:{s:17:"social_link_title";s:11:"Google Plus";s:10:"social_url";s:1:"#";s:11:"social_icon";s:17:"fa fa-google-plus";s:5:"index";i:1;}i:2;a:4:{s:17:"social_link_title";s:7:"Twitter";s:10:"social_url";s:1:"#";s:11:"social_icon";s:13:"fa fa-twitter";s:5:"index";i:2;}i:3;a:4:{s:17:"social_link_title";s:9:"Instagram";s:10:"social_url";s:1:"#";s:11:"social_icon";s:15:"fa fa-instagram";s:5:"index";i:3;}}s:23:"anipat_header_top_phone";s:13:"+880 4664 216";s:28:"anipat_header_top_time_table";s:22:"Mon - Sat 10:00 - 7:00";s:22:"anipat_header_bg_color";s:7:"#ffffff";s:24:"anipat_header_menu_color";s:7:"#131313";s:30:"anipat_header_menu_hover_color";s:7:"#808080";s:26:"anipat_dropdown_menu_color";s:7:"#131313";s:32:"anipat_dropdown_menu_hover_color";s:7:"#808080";s:18:"anipat_footer_text";s:36:"239 E 5th St, New York NY 10003, USA";s:15:"footer_logo_img";i:0;s:29:"anipat_footer_widget_bg_color";s:7:"#f8f8f8";s:34:"anipat_footer_widget_heading_color";s:7:"#2e2e2e";s:31:"anipat_footer_widget_text_color";s:7:"#7a7a7a";s:33:"anipat_footer_widget_anchor_color";s:7:"#7a7a7a";s:39:"anipat_footer_widget_anchor_hover_color";s:7:"#eb592d";s:16:"anipat_blog_meta";b:1;s:15:"anipat_like_btn";b:1;s:17:"anipat_blog_share";b:1;}s:7:"options";a:2:{s:9:"site_icon";s:1:"0";s:23:"nav_menus_created_posts";a:0:{}}s:6:"wp_css";s:0:"";}
--------------------------------------------------------------------------------
/anipat-companion.php:
--------------------------------------------------------------------------------
1 | parent();
58 |
59 |
60 |
61 | if( ( 'Anipat' == $current_theme->get( 'Name' ) ) || ( $is_parent && 'Anipat' == $is_parent->get( 'Name' ) ) ){
62 | require_once ANIPAT_COMPANION_DIR_PATH . 'anipat-init.php';
63 | }else{
64 |
65 | add_action( 'admin_notices', 'anipat_companion_admin_notice', 99 );
66 | function anipat_companion_admin_notice() {
67 | $url = 'https://demo.colorlib.com/anipat/';
68 | ?>
69 |
70 |
Anipat Companion plugin you have to also install the %1$sAnipat Theme%2$s', 'anipat-companion' ), '', '' ); ?>
71 |
72 |
--------------------------------------------------------------------------------
/inc/elementor-widgets/assets/css/owl.carousel.min.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Owl Carousel v2.2.1
3 | * Copyright 2013-2017 David Deutsch
4 | * Licensed under ()
5 | */
6 | .owl-carousel,.owl-carousel .owl-item{-webkit-tap-highlight-color:transparent;position:relative}.owl-carousel{display:none;width:100%;z-index:1}.owl-carousel .owl-stage{position:relative;-ms-touch-action:pan-Y;-moz-backface-visibility:hidden}.owl-carousel .owl-stage:after{content:".";display:block;clear:both;visibility:hidden;line-height:0;height:0}.owl-carousel .owl-stage-outer{position:relative;overflow:hidden;-webkit-transform:translate3d(0,0,0)}.owl-carousel .owl-item,.owl-carousel .owl-wrapper{-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0)}.owl-carousel .owl-item{min-height:1px;float:left;-webkit-backface-visibility:hidden;-webkit-touch-callout:none}.owl-carousel .owl-item img{display:block;width:100%}.owl-carousel .owl-dots.disabled,.owl-carousel .owl-nav.disabled{display:none}.no-js .owl-carousel,.owl-carousel.owl-loaded{display:block}.owl-carousel .owl-dot,.owl-carousel .owl-nav .owl-next,.owl-carousel .owl-nav .owl-prev{cursor:pointer;cursor:hand;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.owl-carousel.owl-loading{opacity:0;display:block}.owl-carousel.owl-hidden{opacity:0}.owl-carousel.owl-refresh .owl-item{visibility:hidden}.owl-carousel.owl-drag .owl-item{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.owl-carousel.owl-grab{cursor:move;cursor:grab}.owl-carousel.owl-rtl{direction:rtl}.owl-carousel.owl-rtl .owl-item{float:right}.owl-carousel .animated{animation-duration:1s;animation-fill-mode:both}.owl-carousel .owl-animated-in{z-index:0}.owl-carousel .owl-animated-out{z-index:1}.owl-carousel .fadeOut{animation-name:fadeOut}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}.owl-height{transition:height .5s ease-in-out}.owl-carousel .owl-item .owl-lazy{opacity:0;transition:opacity .4s ease}.owl-carousel .owl-item img.owl-lazy{transform-style:preserve-3d}.owl-carousel .owl-video-wrapper{position:relative;height:100%;background:#000}.owl-carousel .owl-video-play-icon{position:absolute;height:80px;width:80px;left:50%;top:50%;margin-left:-40px;margin-top:-40px;background:url(owl.video.play.png) no-repeat;cursor:pointer;z-index:1;-webkit-backface-visibility:hidden;transition:transform .1s ease}.owl-carousel .owl-video-play-icon:hover{-ms-transform:scale(1.3,1.3);transform:scale(1.3,1.3)}.owl-carousel .owl-video-playing .owl-video-play-icon,.owl-carousel .owl-video-playing .owl-video-tn{display:none}.owl-carousel .owl-video-tn{opacity:0;height:100%;background-position:center center;background-repeat:no-repeat;background-size:contain;transition:opacity .4s ease}.owl-carousel .owl-video-frame{position:relative;z-index:1;height:100%;width:100%}
--------------------------------------------------------------------------------
/inc/elementor-widgets/assets/js/progress-loader-canvas.js:
--------------------------------------------------------------------------------
1 | /* Credits:
2 | * https://www.developphp.com/video/JavaScript/Circular-Progress-Loader-Canvas-JavaScript-Programming-Tutorial
3 | */
4 |
5 | (function() {
6 | var Progress = function( element ) {
7 | this.context = element.getContext( "2d" );
8 | this.refElement = element.parentNode;
9 | this.loaded = 0;
10 | this.start = 4.72;
11 | this.width = this.context.canvas.width;
12 | this.height = this.context.canvas.height;
13 | this.total = parseInt( this.refElement.dataset.percent, 10 );
14 | this.timer = null;
15 | this.diff = 0;
16 | this.init();
17 | };
18 | Progress.prototype = {
19 | init: function() {
20 | var self = this;
21 | self.timer = setInterval(function() {
22 | self.run();
23 | }, 25);
24 | },
25 | run: function() {
26 | var self = this;
27 | self.diff = ( ( self.loaded / 100 ) * Math.PI * 2 * 10 ).toFixed( 2 );
28 | self.context.clearRect( 0, 0, self.width, self.height );
29 | self.context.lineWidth = 5;
30 | self.context.fillStyle = "#000";
31 | self.context.strokeStyle = "#4a7aec";
32 | self.context.textAlign = "center";
33 | self.context.fillText( self.loaded + "%", self.width * .5, self.height * .5 + 2, self.width );
34 | self.context.beginPath();
35 | self.context.arc( 35, 35, 30, self.start, self.diff / 10 + self.start, false );
36 | self.context.stroke();
37 | if( self.loaded >= self.total ) {
38 | clearInterval( self.timer );
39 | }
40 | self.loaded++;
41 | }
42 | };
43 | var CircularSkillBar = function( elements ) {
44 | this.bars = document.querySelectorAll( elements );
45 | if( this.bars.length > 0 ) {
46 | this.init();
47 | }
48 | };
49 | CircularSkillBar.prototype = {
50 | init: function() {
51 | this.tick = 25;
52 | this.progress();
53 | },
54 | progress: function() {
55 | var self = this;
56 | var index = 0;
57 | var firstCanvas = self.bars[0].querySelector( "canvas" );
58 | var firstProg = new Progress( firstCanvas );
59 | var timer = setInterval(function() {
60 | index++;
61 | var canvas = self.bars[index].querySelector('canvas');
62 |
63 | var prog = new Progress( canvas );
64 |
65 | if( index +1 == self.bars.length ) {
66 | clearInterval( timer );
67 | }
68 |
69 | }, self.tick * 100);
70 |
71 | }
72 | };
73 | document.addEventListener( "DOMContentLoaded", function() {
74 | var circularBars = new CircularSkillBar( ".single-pie-bar" );
75 | });
76 | })();
77 |
--------------------------------------------------------------------------------
/readme.txt:
--------------------------------------------------------------------------------
1 | === Plugin Name ===
2 | Contributors: colorlibplugins, silkalns
3 | Tags: woocommerce, widgets, plugin, demo, companion, home page, one page, parallax, social, portfolio, projects
4 | Requires at least: 5.2
5 | Tested up to: 5.6
6 | Stable tag: trunk
7 | License: GPLv3 or later
8 | License URI: http://www.gnu.org/licenses/gpl-3.0.html
9 |
10 | Anipat Companion is a companion plugin for Companion WordPress theme by Colorlib.com.
11 | == Description ==
12 |
13 | Anipat Companion is a companion for Anipat 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 `anipat-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' => 'Anipat Demo',
21 | 'local_import_file' => ANIPAT_COMPANION_DEMO_DIR_PATH .'anipat-demo.xml',
22 | 'local_import_widget_file' => ANIPAT_COMPANION_DEMO_DIR_PATH .'anipat-widgets-demo.wie',
23 | 'import_customizer_file_url' => plugins_url( 'anipat-customizer.dat', __FILE__ ),
24 | 'import_notice' => $demoImg,
25 | ),
26 | );
27 | }
28 | add_filter( 'pt-ocdi/import_files', 'anipat_import_files' );
29 |
30 |
31 | // demo import setup
32 | function anipat_after_import_setup() {
33 | // Assign menus to their locations.
34 | $main_menu = get_term_by( 'name', 'Main Menu', 'nav_menu' );
35 | $our_services = get_term_by( 'name', 'Our Services', 'nav_menu' );
36 | $quick_links = get_term_by( 'name', 'Quick Links', 'nav_menu' );
37 |
38 | set_theme_mod( 'nav_menu_locations', array(
39 | 'primary-menu' => $main_menu->term_id,
40 | 'our-services' => $our_services->term_id,
41 | 'quick-links' => $quick_links->term_id,
42 | )
43 | );
44 |
45 | // Assign front page and posts page (blog page).
46 | $front_page_id = get_page_by_title( 'Homepage' );
47 | $blog_page_id = get_page_by_title( 'Blog' );
48 |
49 | update_option( 'show_on_front', 'page' );
50 | update_option( 'page_on_front', $front_page_id->ID );
51 | update_option( 'page_for_posts', $blog_page_id->ID );
52 | update_option( 'posts_per_page', 3 );
53 |
54 | // Update the post to draft after import is done
55 | anipat_update_the_followed_post_page_status();
56 |
57 | // Add an option to check after import is done
58 | update_option( 'anipat-import-data', true );
59 |
60 | }
61 | add_action( 'pt-ocdi/after_import', 'anipat_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 anipat_import_plugin_page_setup( $default_settings ) {
68 | $default_settings['parent_slug'] = 'themes.php';
69 | $default_settings['page_title'] = esc_html__( 'One Click Demo Import' , 'anipat-companion' );
70 | $default_settings['menu_title'] = esc_html__( 'Import Demo Data' , 'anipat-companion' );
71 | $default_settings['capability'] = 'import';
72 | $default_settings['menu_slug'] = 'anipat-demo-import';
73 |
74 | return $default_settings;
75 | }
76 | add_filter( 'pt-ocdi/plugin_page_setup', 'anipat_import_plugin_page_setup' );
77 |
78 | // Enqueue scripts
79 | function anipat_demo_import_custom_scripts(){
80 |
81 |
82 | if( isset( $_GET['page'] ) && $_GET['page'] == 'anipat-demo-import' ){
83 | // style
84 | wp_enqueue_style( 'anipat-demo-import', plugins_url( 'css/demo-import.css', __FILE__ ), array(), '1.0', false );
85 | }
86 |
87 |
88 | }
89 | add_action( 'admin_enqueue_scripts', 'anipat_demo_import_custom_scripts' );
90 |
--------------------------------------------------------------------------------
/inc/elementor-widgets/assets/js/jquery.counterup.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * jquery.counterup.js 1.0
3 | *
4 | * Copyright 2013, Benjamin Intal http://gambit.ph @bfintal
5 | * Released under the GPL v2 License
6 | *
7 | * Date: Nov 26, 2013
8 | */
9 | (function( $ ){
10 | "use strict";
11 |
12 | $.fn.counterUp = function( options ) {
13 |
14 | // Defaults
15 | var settings = $.extend({
16 | 'time': 400,
17 | 'delay': 10
18 | }, options);
19 |
20 | return this.each(function(){
21 |
22 | // Store the object
23 | var $this = $(this);
24 | var $settings = settings;
25 |
26 | var counterUpper = function() {
27 | var nums = [];
28 | var divisions = $settings.time / $settings.delay;
29 | var num = $this.text();
30 | var isComma = /[0-9]+,[0-9]+/.test(num);
31 | num = num.replace(/,/g, '');
32 | var isInt = /^[0-9]+$/.test(num);
33 | var isFloat = /^[0-9]+\.[0-9]+$/.test(num);
34 | var decimalPlaces = isFloat ? (num.split('.')[1] || []).length : 0;
35 |
36 | // Generate list of incremental numbers to display
37 | for (var i = divisions; i >= 1; i--) {
38 |
39 | // Preserve as int if input was int
40 | var newNum = parseInt(num / divisions * i);
41 |
42 | // Preserve float if input was float
43 | if (isFloat) {
44 | newNum = parseFloat(num / divisions * i).toFixed(decimalPlaces);
45 | }
46 |
47 | // Preserve commas if input had commas
48 | if (isComma) {
49 | while (/(\d+)(\d{3})/.test(newNum.toString())) {
50 | newNum = newNum.toString().replace(/(\d+)(\d{3})/, '$1'+','+'$2');
51 | }
52 | }
53 |
54 | nums.unshift(newNum);
55 | }
56 |
57 | $this.data('counterup-nums', nums);
58 | $this.text('0');
59 |
60 | // Updates the number until we're done
61 | // var f = function() {
62 | // $this.text($this.data('counterup-nums').shift());
63 | // if ($this.data('counterup-nums').length) {
64 | // setTimeout($this.data('counterup-func'), $settings.delay);
65 | // } else {
66 | // delete $this.data('counterup-nums');
67 | // $this.data('counterup-nums', null);
68 | // $this.data('counterup-func', null);
69 | // }
70 | // };
71 | var f = function () {
72 | if (!$this.data('counterup-nums')) {
73 | return;
74 | }
75 | $this.text($this.data('counterup-nums').shift());
76 | if ($this.data('counterup-nums').length) {
77 | setTimeout($this.data('counterup-func'), $settings.delay);
78 | } else {
79 | delete $this.data('counterup-nums');
80 | $this.data('counterup-nums', null);
81 | $this.data('counterup-func', null);
82 | }
83 | };
84 | $this.data('counterup-func', f);
85 |
86 | // Start the count up
87 | setTimeout($this.data('counterup-func'), $settings.delay);
88 | };
89 |
90 | // Perform counts when the element gets into view
91 | $this.waypoint(counterUpper, { offset: '100%', triggerOnce: true });
92 | });
93 |
94 | };
95 |
96 | })( jQuery );
--------------------------------------------------------------------------------
/inc/elementor-widgets/assets/js/imagesLoaded.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * imagesLoaded PACKAGED v4.1.3
3 | * JavaScript is all like "You images are done yet or what?"
4 | * MIT License
5 | */
6 | !function(e,t){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",t):"object"==typeof module&&module.exports?module.exports=t():e.EvEmitter=t()}("undefined"!=typeof window?window:this,function(){function e(){}var t=e.prototype;return t.on=function(e,t){if(e&&t){var i=this._events=this._events||{},n=i[e]=i[e]||[];return-1==n.indexOf(t)&&n.push(t),this}},t.once=function(e,t){if(e&&t){this.on(e,t);var i=this._onceEvents=this._onceEvents||{},n=i[e]=i[e]||{};return n[t]=!0,this}},t.off=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){var n=i.indexOf(t);return-1!=n&&i.splice(n,1),this}},t.emitEvent=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){var n=0,o=i[n];t=t||[];for(var r=this._onceEvents&&this._onceEvents[e];o;){var s=r&&r[o];s&&(this.off(e,o),delete r[o]),o.apply(this,t),n+=s?0:1,o=i[n]}return this}},t.allOff=t.removeAllListeners=function(){delete this._events,delete this._onceEvents},e}),function(e,t){"use strict";"function"==typeof define&&define.amd?define(["ev-emitter/ev-emitter"],function(i){return t(e,i)}):"object"==typeof module&&module.exports?module.exports=t(e,require("ev-emitter")):e.imagesLoaded=t(e,e.EvEmitter)}("undefined"!=typeof window?window:this,function(e,t){function i(e,t){for(var i in t)e[i]=t[i];return e}function n(e){var t=[];if(Array.isArray(e))t=e;else if("number"==typeof e.length)for(var i=0;i
esc_html__( 'Show most latest blog post.', 'anipat-companion' ), )
34 | );
35 |
36 | }
37 |
38 | // This is where the action happens
39 | public function widget( $args, $instance ) {
40 | $title = apply_filters( 'anipat_blog_sectiontitle', $instance['sectiontitle'] );
41 | $postnumber = apply_filters( 'anipat_blog_postnumber', $instance['postnumber'] );
42 | $style = apply_filters( 'anipat_blog_style', $instance['style'] );
43 |
44 | // before and after widget arguments are defined by themes
45 | echo wp_kses_post( $args['before_widget'] );
46 | if ( ! empty( $title ) )
47 | echo wp_kses_post( $args['before_title'] . $title . $args['after_title'] );
48 |
49 |
50 | ?>
51 |
52 |
53 | 'post',
56 | 'posts_per_page' => esc_html( $postnumber ),
57 | );
58 |
59 | $query = new WP_Query( $blogargs );
60 |
61 | if( $query->have_posts() ):
62 | while( $query->have_posts() ):
63 | $query->the_post();
64 | ?>
65 |
69 |
72 |
73 | 'img-fluid']); ?>
74 |
75 |
81 |
82 |
85 |
88 |
96 |
102 |
103 |
104 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
150 |
151 |
152 | esc_html__( 'Add footer newsletter signup form.', 'anipat-companion' ), )
28 | );
29 |
30 | }
31 |
32 | // This is where the action happens
33 | public function widget( $args, $instance ) {
34 |
35 | $title = apply_filters( 'widget_title', $instance['title'] );
36 | $actionurl = apply_filters( 'widget_actionurl', $instance['actionurl'] );
37 | $desc = apply_filters( 'widget_desc', $instance['desc'] );
38 |
39 | // before and after widget arguments are defined by themes
40 | echo wp_kses_post( $args['before_widget'] );
41 | if ( ! empty( $title ) )
42 | echo wp_kses_post( $args['before_title'] . $title . $args['after_title'] );
43 | if( $desc ){
44 | echo ''.esc_html( $desc ).'
';
45 | }
46 | ?>
47 |
65 |
66 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 | start_controls_section(
49 | 'hero_content',
50 | [
51 | 'label' => __( 'Hero section content', 'anipat-companion' ),
52 | ]
53 | );
54 |
55 | $this->add_control(
56 | 'bg_img', [
57 | 'label' => __( 'BG Image', 'anipat-companion' ),
58 | 'label' => __( 'Best size is 1920x888', 'anipat-companion' ),
59 | 'type' => Controls_Manager::MEDIA,
60 | 'label_block' => true,
61 | ]
62 | );
63 | $this->add_control(
64 | 'pet_img', [
65 | 'label' => __( 'Pet Image', 'anipat-companion' ),
66 | 'label' => __( 'Best option is upload a tranparent image with the size 947x745', 'anipat-companion' ),
67 | 'type' => Controls_Manager::MEDIA,
68 | 'label_block' => true,
69 | ]
70 | );
71 | $this->add_control(
72 | 'sec_title', [
73 | 'label' => __( 'Section Title', 'anipat-companion' ),
74 | 'type' => Controls_Manager::TEXTAREA,
75 | 'label_block' => true,
76 | 'default' => 'We Care
Your Pets',
77 | ]
78 | );
79 | $this->add_control(
80 | 'sub_title', [
81 | 'label' => __( 'Section Text', 'anipat-companion' ),
82 | 'type' => Controls_Manager::TEXTAREA,
83 | 'label_block' => true,
84 | 'default' => 'Lorem ipsum dolor sit amet, consectetur
adipiscing elit, sed do eiusmod.',
85 | ]
86 | );
87 | $this->add_control(
88 | 'btn_title', [
89 | 'label' => __( 'Button Title', 'anipat-companion' ),
90 | 'type' => Controls_Manager::TEXT,
91 | 'label_block' => true,
92 | 'default' => __( 'Contact Us', 'anipat-companion' ),
93 | ]
94 | );
95 | $this->add_control(
96 | 'btn_url', [
97 | 'label' => __( 'Button URL', 'anipat-companion' ),
98 | 'type' => Controls_Manager::URL,
99 | 'label_block' => true,
100 | ]
101 | );
102 |
103 | $this->end_controls_section(); // End Hero content
104 |
105 |
106 | /**
107 | * Style Tab
108 | * ------------------------------ Style Title ------------------------------
109 | *
110 | */
111 | $this->start_controls_section(
112 | 'style_title', [
113 | 'label' => __( 'Style Hero Section', 'anipat-companion' ),
114 | 'tab' => Controls_Manager::TAB_STYLE,
115 | ]
116 | );
117 | $this->add_control(
118 | 'title_col', [
119 | 'label' => __( 'Big Title Color', 'anipat-companion' ),
120 | 'type' => Controls_Manager::COLOR,
121 | 'selectors' => [
122 | '{{WRAPPER}} .slider_area .single_slider .slider_text h3' => 'color: {{VALUE}};',
123 | ],
124 | ]
125 | );
126 | $this->add_control(
127 | 'text_col', [
128 | 'label' => __( 'Text Color', 'anipat-companion' ),
129 | 'type' => Controls_Manager::COLOR,
130 | 'selectors' => [
131 | '{{WRAPPER}} .slider_area .single_slider .slider_text p' => 'color: {{VALUE}};',
132 | ],
133 | ]
134 | );
135 | $this->add_control(
136 | 'btn_col', [
137 | 'label' => __( 'Button Color', 'anipat-companion' ),
138 | 'type' => Controls_Manager::COLOR,
139 | 'selectors' => [
140 | '{{WRAPPER}} .slider_area .single_slider .slider_text .boxed-btn4' => 'color: {{VALUE}};',
141 | '{{WRAPPER}} .slider_area .single_slider .slider_text .boxed-btn4:hover' => 'background: {{VALUE}}; border-color: {{VALUE}}; color: #fff',
142 | ],
143 | ]
144 | );
145 | $this->end_controls_section();
146 | }
147 |
148 | protected function render() {
149 | $settings = $this->get_settings();
150 | $sec_title = !empty( $settings['sec_title'] ) ? $settings['sec_title'] : '';
151 | $bg_img = !empty( $settings['bg_img']['url'] ) ? $settings['bg_img']['url'] : '';
152 | $pet_img = !empty( $settings['pet_img']['id'] ) ? wp_get_attachment_image( $settings['pet_img']['id'], 'anipat_hero_pet_thumb_947x745', '', array( 'alt' => $sec_title ) ) : '';
153 | $sub_title = !empty( $settings['sub_title'] ) ? $settings['sub_title'] : '';
154 | $btn_title = !empty( $settings['btn_title'] ) ? $settings['btn_title'] : '';
155 | $btn_url = !empty( $settings['btn_url']['url'] ) ? $settings['btn_url']['url'] : '';
156 | ?>
157 |
158 |
159 |
160 |
>
161 |
162 |
163 |
164 |
165 | '.wp_kses_post( nl2br($sec_title) ).'';
168 | }
169 | if ( $sub_title ) {
170 | echo '
'.wp_kses_post( nl2br($sub_title) ).'
';
171 | }
172 | if ( $btn_title ) {
173 | echo '
'.esc_html( $btn_title ).'';
174 | }
175 | ?>
176 |
177 |
178 |
179 |
180 |
181 |
186 |
187 |
188 |
189 |
190 | start_controls_section(
48 | 'left_content',
49 | [
50 | 'label' => __( 'Left Section Settings', 'anipat-companion' ),
51 | ]
52 | );
53 |
54 | $this->add_control(
55 | 'sec_img',
56 | [
57 | 'label' => esc_html__( 'Left Image', 'anipat-companion' ),
58 | 'description' => esc_html__( 'Best size is 514x669', 'anipat-companion' ),
59 | 'type' => Controls_Manager::MEDIA,
60 | 'label_block' => true,
61 | ]
62 | );
63 | $this->add_control(
64 | 'sec_title',
65 | [
66 | 'label' => esc_html__( 'Section Title', 'anipat-companion' ),
67 | 'type' => Controls_Manager::TEXTAREA,
68 | 'label_block' => true,
69 | 'default' => 'We care your pet
As you care',
70 | ]
71 | );
72 | $this->add_control(
73 | 'sec_text',
74 | [
75 | 'label' => esc_html__( 'Section Text', 'anipat-companion' ),
76 | 'type' => Controls_Manager::TEXTAREA,
77 | 'label_block' => true,
78 | 'default' => 'Lorem ipsum dolor sit , consectetur adipiscing elit, sed do
iusmod tempor incididunt ut labore et dolore magna aliqua.
Quis ipsum suspendisse ultrices gravida. Risus commodo
viverra maecenas accumsan.',
79 | ]
80 | );
81 | $this->add_control(
82 | 'btn_title',
83 | [
84 | 'label' => esc_html__( 'Button Title', 'anipat-companion' ),
85 | 'type' => Controls_Manager::TEXT,
86 | 'label_block' => true,
87 | 'default' => esc_html__( 'About Us', 'anipat-companion' ),
88 | ]
89 | );
90 | $this->add_control(
91 | 'btn_url',
92 | [
93 | 'label' => esc_html__( 'Button URL', 'anipat-companion' ),
94 | 'type' => Controls_Manager::URL,
95 | 'label_block' => true,
96 | ]
97 | );
98 | $this->end_controls_section(); // End left content
99 |
100 | //------------------------------ Style title ------------------------------
101 |
102 | // Top Section Styles
103 | $this->start_controls_section(
104 | 'about_sec_style', [
105 | 'label' => __( 'About Section Styles', 'anipat-companion' ),
106 | 'tab' => Controls_Manager::TAB_STYLE,
107 | ]
108 | );
109 |
110 | $this->add_control(
111 | 'title_col', [
112 | 'label' => __( 'Title Color', 'anipat-companion' ),
113 | 'type' => Controls_Manager::COLOR,
114 | 'selectors' => [
115 | '{{WRAPPER}} .pet_care_area .section_title h3' => 'color: {{VALUE}};',
116 | ],
117 | ]
118 | );
119 | $this->add_control(
120 | 'text_col', [
121 | 'label' => __( 'Text Color', 'anipat-companion' ),
122 | 'type' => Controls_Manager::COLOR,
123 | 'selectors' => [
124 | '{{WRAPPER}} .pet_care_area .section_title p' => 'color: {{VALUE}};',
125 | ],
126 | ]
127 | );
128 | $this->add_control(
129 | 'btn_col', [
130 | 'label' => __( 'Button Color', 'anipat-companion' ),
131 | 'type' => Controls_Manager::COLOR,
132 | 'selectors' => [
133 | '{{WRAPPER}} .pet_care_area .section_title .boxed-btn3' => 'background: {{VALUE}};',
134 | ],
135 | ]
136 | );
137 | $this->end_controls_section();
138 |
139 | }
140 |
141 | protected function render() {
142 | $settings = $this->get_settings();
143 | $sec_title = !empty( $settings['sec_title'] ) ? $settings['sec_title'] : '';
144 | $sec_img = !empty( $settings['sec_img']['id'] ) ? wp_get_attachment_image( $settings['sec_img']['id'], 'anipat_about_thumb_514x669', '', array( 'alt' => $sec_title ) ) : '';
145 | $sec_text = !empty( $settings['sec_text'] ) ? $settings['sec_text'] : '';
146 | $btn_title = !empty( $settings['btn_title'] ) ? $settings['btn_title'] : '';
147 | $btn_url = !empty( $settings['btn_url']['url'] ) ? $settings['btn_url']['url'] : '';
148 | ?>
149 |
150 |
151 |
152 |
153 |
154 |
163 |
164 |
165 |
166 | '.wp_kses_post(nl2br($sec_title)).'';
169 | }
170 | if ( $sec_text ) {
171 | echo '
'.wp_kses_post(nl2br($sec_text)).'
';
172 | }
173 | if ( $btn_title ) {
174 | echo '
'.esc_html($btn_title).'';
175 | }
176 | ?>
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 | esc_html__( 'Add footer social links.', 'anipat-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/home-contact.php:
--------------------------------------------------------------------------------
1 | start_controls_section(
48 | 'home_contact_content',
49 | [
50 | 'label' => __( 'Home Contact Settings', 'anipat-companion' ),
51 | ]
52 | );
53 |
54 | $this->add_control(
55 | 'sec_img',
56 | [
57 | 'label' => esc_html__( 'BG Image', 'anipat-companion' ),
58 | 'description' => esc_html__( 'Best size is 1920x609', 'anipat-companion' ),
59 | 'type' => Controls_Manager::MEDIA,
60 | 'label_block' => true,
61 | ]
62 | );
63 | $this->add_control(
64 | 'sec_title',
65 | [
66 | 'label' => esc_html__( 'Section Title', 'anipat-companion' ),
67 | 'type' => Controls_Manager::TEXT,
68 | 'label_block' => true,
69 | 'default' => esc_html__( 'Why go with Anipat?', 'anipat-companion' ),
70 | ]
71 | );
72 | $this->add_control(
73 | 'sec_text',
74 | [
75 | 'label' => esc_html__( 'Section Text', 'anipat-companion' ),
76 | 'type' => Controls_Manager::TEXTAREA,
77 | 'label_block' => true,
78 | 'default' => esc_html__( 'Because we know that even the best technology is only as good as the people behind it. 24/7 tech support.', 'anipat-companion' ),
79 | ]
80 | );
81 | $this->add_control(
82 | 'btn_title',
83 | [
84 | 'label' => esc_html__( 'Button Title', 'anipat-companion' ),
85 | 'type' => Controls_Manager::TEXT,
86 | 'label_block' => true,
87 | 'default' => esc_html__( 'Contact Us', 'anipat-companion' ),
88 | ]
89 | );
90 | $this->add_control(
91 | 'btn_url',
92 | [
93 | 'label' => esc_html__( 'Button URL', 'anipat-companion' ),
94 | 'type' => Controls_Manager::URL,
95 | 'label_block' => true,
96 | ]
97 | );
98 | $this->add_control(
99 | 'phone_number',
100 | [
101 | 'label' => esc_html__( 'Phone Number', 'anipat-companion' ),
102 | 'type' => Controls_Manager::TEXT,
103 | 'label_block' => true,
104 | 'default' => esc_html__( '+880 4664 216', 'anipat-companion' ),
105 | ]
106 | );
107 | $this->end_controls_section(); // End left content
108 |
109 | //------------------------------ Style title ------------------------------
110 |
111 | // Top Section Styles
112 | $this->start_controls_section(
113 | 'about_sec_style', [
114 | 'label' => __( 'About Section Styles', 'anipat-companion' ),
115 | 'tab' => Controls_Manager::TAB_STYLE,
116 | ]
117 | );
118 |
119 | $this->add_control(
120 | 'title_col', [
121 | 'label' => __( 'Title Color', 'anipat-companion' ),
122 | 'type' => Controls_Manager::COLOR,
123 | 'selectors' => [
124 | '{{WRAPPER}} .contact_anipat .contact_text .section_title h3' => 'color: {{VALUE}};',
125 | ],
126 | ]
127 | );
128 | $this->add_control(
129 | 'text_col', [
130 | 'label' => __( 'Text Color', 'anipat-companion' ),
131 | 'type' => Controls_Manager::COLOR,
132 | 'selectors' => [
133 | '{{WRAPPER}} .contact_anipat .contact_text .section_title p' => 'color: {{VALUE}};',
134 | '{{WRAPPER}} .contact_anipat .contact_text .contact_btn p' => 'color: {{VALUE}};',
135 | '{{WRAPPER}} .contact_anipat .contact_text .contact_btn p a' => 'color: {{VALUE}};',
136 | ],
137 | ]
138 | );
139 | $this->add_control(
140 | 'btn_col', [
141 | 'label' => __( 'Button Color', 'anipat-companion' ),
142 | 'type' => Controls_Manager::COLOR,
143 | 'selectors' => [
144 | '{{WRAPPER}} .contact_anipat .contact_text .boxed-btn4' => 'color: {{VALUE}};',
145 | '{{WRAPPER}} .contact_anipat .contact_text .boxed-btn4:hover' => 'color: #fff; background: {{VALUE}}; border-color: {{VALUE}}',
146 | ],
147 | ]
148 | );
149 | $this->end_controls_section();
150 |
151 | }
152 |
153 | protected function render() {
154 | $settings = $this->get_settings();
155 | $sec_title = !empty( $settings['sec_title'] ) ? $settings['sec_title'] : '';
156 | $sec_img = !empty( $settings['sec_img']['url'] ) ? $settings['sec_img']['url'] : '';
157 | $sec_text = !empty( $settings['sec_text'] ) ? $settings['sec_text'] : '';
158 | $btn_title = !empty( $settings['btn_title'] ) ? $settings['btn_title'] : '';
159 | $btn_url = !empty( $settings['btn_url']['url'] ) ? $settings['btn_url']['url'] : '';
160 | $phone_number = !empty( $settings['phone_number'] ) ? $settings['phone_number'] : '';
161 | ?>
162 |
163 |
193 | esc_html__( 'Add footer about content', 'anipat-companion' ), )
34 | );
35 |
36 | }
37 |
38 | // This is where the action happens
39 | public function widget( $args, $instance ) {
40 |
41 | $title = apply_filters( 'widget_title', $instance['title'] );
42 | $image = apply_filters( 'widget_image', $instance['image'] );
43 | $textarea = apply_filters( 'widget_textarea', $instance['textarea'] );
44 |
45 | // before and after widget arguments are defined by themes
46 | echo wp_kses_post( $args['before_widget'] );
47 | if ( ! empty( $title ) )
48 | echo wp_kses_post( $args['before_title'] . $title . $args['after_title'] );
49 |
50 |
51 | ?>
52 |
70 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
128 |
129 |
162 |
230 | start_controls_section(
49 | 'contact_info',
50 | [
51 | 'label' => __( 'Contact Info', 'anipat-companion' ),
52 | ]
53 | );
54 |
55 | $this->add_control(
56 | 'info', [
57 | 'label' => __( 'Create Contact Info', 'anipat-companion' ),
58 | 'type' => Controls_Manager::REPEATER,
59 | 'title_field' => '{{{ label }}}',
60 | 'fields' => [
61 | [
62 | 'name' => 'label',
63 | 'label' => __( 'Contact Info', 'anipat-companion' ),
64 | 'label_block' => true,
65 | 'type' => Controls_Manager::TEXT,
66 | 'default' => esc_html__( 'Dhaka, Bangladesh', 'anipat-companion' )
67 | ],
68 | [
69 | 'name' => 'desc',
70 | 'label' => __( 'Contact Descriptions', 'anipat-companion' ),
71 | 'type' => Controls_Manager::TEXTAREA,
72 | 'default' => esc_html__( 'Write something...', 'anipat-companion' )
73 | ],
74 | [
75 | 'name' => 'icon',
76 | 'label' => __( 'Icon', 'anipat-companion' ),
77 | 'type' => Controls_Manager::ICON,
78 | ]
79 |
80 | ],
81 | 'default' => [
82 | [
83 | 'label' => esc_html__( 'Buttonwood, California.', 'anipat-companion' ),
84 | 'desc' => esc_html__( 'Rosemead, CA 91770', 'anipat-companion' ),
85 | 'icon' => 'fa fa-home',
86 | ],
87 | [
88 | 'label' => esc_html__( '00 (440) 9865 562', 'anipat-companion' ),
89 | 'desc' => esc_html__( 'Mon to Fri 9am to 6pm', 'anipat-companion' ),
90 | 'icon' => 'fa fa-tablet',
91 | ],
92 | [
93 | 'label' => esc_html__( 'support@colorlib.com', 'anipat-companion' ),
94 | 'desc' => esc_html__( 'Send us your query anytime!', 'anipat-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', 'anipat-companion' ),
108 | ]
109 | );
110 | $this->add_control(
111 | 'contact_form_title',
112 | [
113 | 'label' => esc_html__( 'Contact Form Title', 'anipat-companion' ),
114 | 'type' => Controls_Manager::TEXT,
115 | 'label_block' => true,
116 | 'default' => esc_html__('Get in Touch', 'anipat-companion')
117 | ]
118 | );
119 | $this->add_control(
120 | 'contact_formshortcode',
121 | [
122 | 'label' => esc_html__( 'Form Shortcode', 'anipat-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', 'anipat-companion' ),
138 | 'tab' => Controls_Manager::TAB_STYLE,
139 | ]
140 | );
141 |
142 | $this->add_control(
143 | 'color_title', [
144 | 'label' => __( 'Right Text Title Color', 'anipat-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', 'anipat-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', 'anipat-companion' ),
165 | 'type' => Controls_Manager::COLOR,
166 | 'default' => '#8f9195',
167 | 'selectors' => [
168 | '{{WRAPPER}} .contact-info__icon i, .contact-info__icon span' => 'color: {{VALUE}};',
169 | ],
170 | ]
171 | );
172 |
173 | $this->end_controls_section();
174 |
175 |
176 | }
177 |
178 | protected function render() {
179 |
180 | $settings = $this->get_settings();
181 |
182 |
183 | ?>
184 |
223 |
224 | start_controls_section(
49 | 'team_content',
50 | [
51 | 'label' => __( 'Team Member contents', 'anipat-companion' ),
52 | ]
53 | );
54 |
55 | $this->add_control(
56 | 'sec_title',
57 | [
58 | 'label' => esc_html__( 'Section Title', 'anipat-companion' ),
59 | 'type' => Controls_Manager::TEXT,
60 | 'label_block' => true,
61 | 'default' => esc_html__( 'Our Team', 'anipat-companion' ),
62 | ]
63 | );
64 | $this->add_control(
65 | 'sub_title',
66 | [
67 | 'label' => esc_html__( 'Sub Title', 'anipat-companion' ),
68 | 'type' => Controls_Manager::TEXTAREA,
69 | 'label_block' => true,
70 | 'default' => esc_html__( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna.', 'anipat-companion' ),
71 | ]
72 | );
73 | $this->add_control(
74 | 'sliders', [
75 | 'label' => __( 'Create New Slider', 'anipat-companion' ),
76 | 'type' => Controls_Manager::REPEATER,
77 | 'title_field' => '{{{ member_name }}}',
78 | 'fields' => [
79 | [
80 | 'name' => 'member_img',
81 | 'label' => __( 'Member Image', 'anipat-companion' ),
82 | 'description' => __( 'Best size is 360x317', 'anipat-companion' ),
83 | 'label_block' => true,
84 | 'type' => Controls_Manager::MEDIA,
85 | ],
86 | [
87 | 'name' => 'member_name',
88 | 'label' => __( 'Member Name', 'anipat-companion' ),
89 | 'label_block' => true,
90 | 'type' => Controls_Manager::TEXT,
91 | 'default' => __( 'Rala Emaia', 'anipat-companion' ),
92 | ],
93 | [
94 | 'name' => 'member_designation',
95 | 'label' => __( 'Member Designation', 'anipat-companion' ),
96 | 'label_block' => true,
97 | 'type' => Controls_Manager::TEXT,
98 | 'default' => __( 'Senior Director', 'anipat-companion' ),
99 | ],
100 | ],
101 | 'default' => [
102 | [
103 | 'client_name' => __( 'Jhon Walker', 'anipat-companion' ),
104 | 'client_designation' => __( 'Head of web design', 'anipat-companion' ),
105 | ],
106 | [
107 | 'client_name' => __( 'jhon Smith', 'anipat-companion' ),
108 | 'client_designation' => __( 'Head of Development', 'anipat-companion' ),
109 | ],
110 | [
111 | 'client_name' => __( 'Rala Emaia', 'anipat-companion' ),
112 | 'client_designation' => __( 'Head of Design', 'anipat-companion' ),
113 | ],
114 | ]
115 | ]
116 | );
117 | $this->end_controls_section(); // End Hero content
118 |
119 |
120 | /**
121 | * Style Tab
122 | * ------------------------------ Style Title ------------------------------
123 | *
124 | */
125 | $this->start_controls_section(
126 | 'style_title', [
127 | 'label' => __( 'Style Team Section', 'anipat-companion' ),
128 | 'tab' => Controls_Manager::TAB_STYLE,
129 | ]
130 | );
131 | $this->add_control(
132 | 'title_col', [
133 | 'label' => __( 'Title Color', 'anipat-companion' ),
134 | 'type' => Controls_Manager::COLOR,
135 | 'selectors' => [
136 | '{{WRAPPER}} .team_area .section_title h3' => 'color: {{VALUE}};',
137 | ],
138 | ]
139 | );
140 | $this->add_control(
141 | 'sub_title_col', [
142 | 'label' => __( 'Sub Title Color', 'anipat-companion' ),
143 | 'type' => Controls_Manager::COLOR,
144 | 'selectors' => [
145 | '{{WRAPPER}} .team_area .section_title p' => 'color: {{VALUE}};',
146 | ],
147 | ]
148 | );
149 | $this->end_controls_section();
150 | }
151 |
152 | protected function render() {
153 | $settings = $this->get_settings();
154 | $sec_title = !empty( $settings['sec_title'] ) ? $settings['sec_title'] : '';
155 | $sub_title = !empty( $settings['sub_title'] ) ? $settings['sub_title'] : '';
156 | $sliders = !empty( $settings['sliders'] ) ? $settings['sliders'] : '';
157 | ?>
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 | '.esc_html($sec_title).'';
168 | }
169 | if ( $sub_title ) {
170 | echo '
'.wp_kses_post($sub_title).'
';
171 | }
172 |
173 | ?>
174 |
175 |
176 |
177 |
178 | 0 ) {
180 | foreach( $sliders as $item ) {
181 | $member_name = !empty( $item['member_name'] ) ? $item['member_name'] : '';
182 | $member_img = !empty( $item['member_img']['id'] ) ? wp_get_attachment_image( $item['member_img']['id'], 'anipat_team_thumb_360x317', '', array( 'alt' => $member_name ) ) : '';
183 | $member_designation = !empty( $item['member_designation'] ) ? $item['member_designation'] : '';
184 | ?>
185 |
186 |
187 |
191 | '.wp_kses_post($member_img).'
192 |
193 | ';
194 | }
195 | ?>
196 |
197 |
198 | '.esc_html($member_name).'';
201 | }
202 | if ( $member_designation ) {
203 | echo '
'.esc_html($member_designation).'
';
204 | }
205 |
206 | ?>
207 |
208 |
209 |
210 |
211 |
215 |
216 |
217 |
218 | start_controls_section(
49 | 'testimonial_content',
50 | [
51 | 'label' => __( 'Testimonial contents', 'anipat-companion' ),
52 | ]
53 | );
54 |
55 | $this->add_control(
56 | 'sliders', [
57 | 'label' => __( 'Create New Slider', 'anipat-companion' ),
58 | 'type' => Controls_Manager::REPEATER,
59 | 'title_field' => '{{{ client_name }}}',
60 | 'fields' => [
61 | [
62 | 'name' => 'client_img',
63 | 'label' => __( 'Client Image', 'anipat-companion' ),
64 | 'description' => __( 'Best size is 131x149', 'anipat-companion' ),
65 | 'label_block' => true,
66 | 'type' => Controls_Manager::MEDIA,
67 | ],
68 | [
69 | 'name' => 'client_name',
70 | 'label' => __( 'Client Name', 'anipat-companion' ),
71 | 'label_block' => true,
72 | 'type' => Controls_Manager::TEXT,
73 | 'default' => __( 'Jhon Walker', 'anipat-companion' ),
74 | ],
75 | [
76 | 'name' => 'client_designation',
77 | 'label' => __( 'Client Designation', 'anipat-companion' ),
78 | 'label_block' => true,
79 | 'type' => Controls_Manager::TEXT,
80 | 'default' => __( 'Head of web design', 'anipat-companion' ),
81 | ],
82 | [
83 | 'name' => 'text',
84 | 'label' => __( 'Review', 'anipat-companion' ),
85 | 'label_block' => true,
86 | 'type' => Controls_Manager::TEXTAREA,
87 | 'default' => __( 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exerci.', 'anipat-companion' ),
88 | ],
89 | ],
90 | 'default' => [
91 | [
92 | 'client_name' => __( 'Jhon Walker', 'anipat-companion' ),
93 | 'client_designation' => __( 'Head of web design', 'anipat-companion' ),
94 | 'text' => __( 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exerci.', 'anipat-companion' ),
95 | ],
96 | [
97 | 'client_name' => __( 'Jonathan Doe', 'anipat-companion' ),
98 | 'client_designation' => __( 'Head of web design', 'anipat-companion' ),
99 | 'text' => __( 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exerci.', 'anipat-companion' ),
100 | ],
101 | [
102 | 'client_name' => __( 'Jhon Doe', 'anipat-companion' ),
103 | 'client_designation' => __( 'Head of web design', 'anipat-companion' ),
104 | 'text' => __( 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exerci.', 'anipat-companion' ),
105 | ],
106 | ]
107 | ]
108 | );
109 | $this->end_controls_section(); // End Hero content
110 | }
111 |
112 | protected function render() {
113 | $this->load_widget_script();
114 | $settings = $this->get_settings();
115 | $sec_title = !empty( $settings['sec_title'] ) ? $settings['sec_title'] : '';
116 | $sliders = !empty( $settings['sliders'] ) ? $settings['sliders'] : '';
117 | ?>
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 | 0 ) {
127 | foreach( $sliders as $item ) {
128 | $client_name = !empty( $item['client_name'] ) ? $item['client_name'] : '';
129 | $client_img = !empty( $item['client_img']['id'] ) ? wp_get_attachment_image( $item['client_img']['id'], 'anipat_testimonial_thumb_131x149', '', array( 'alt' => $client_name ) ) : '';
130 | $client_designation = !empty( $item['client_designation'] ) ? $item['client_designation'] : '';
131 | $text = !empty( $item['text'] ) ? $item['text'] : '';
132 | ?>
133 |
134 |
135 |
139 | '.wp_kses_post($client_img).'
140 |
141 | ';
142 | }
143 | ?>
144 |
145 | '.esc_html($client_name).'';
148 | }
149 | if ( $client_designation ) {
150 | echo '
'.esc_html($client_designation).'';
151 | }
152 | if ( $text ) {
153 | echo '
'.wp_kses_post($text).'
';
154 | }
155 |
156 | ?>
157 |
158 |
159 |
160 |
164 |
165 |
166 |
167 |
168 |
169 |
170 | editor->is_edit_mode() === true ) {
175 | ?>
176 |
205 | start_controls_section(
49 | 'services_content',
50 | [
51 | 'label' => __( 'Services contents', 'anipat-companion' ),
52 | ]
53 | );
54 |
55 | $this->add_control(
56 | 'sec_title',
57 | [
58 | 'label' => esc_html__( 'Sec Title', 'anipat-companion' ),
59 | 'type' => Controls_Manager::TEXT,
60 | 'label_block' => true,
61 | 'default' => esc_html__( 'Services for every dog', 'anipat-companion' ),
62 | ]
63 | );
64 | $this->add_control(
65 | 'sub_title',
66 | [
67 | 'label' => esc_html__( 'Sub Title', 'anipat-companion' ),
68 | 'type' => Controls_Manager::TEXTAREA,
69 | 'label_block' => true,
70 | 'default' => esc_html__( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna.', 'anipat-companion' ),
71 | ]
72 | );
73 | $this->add_control(
74 | 'services', [
75 | 'label' => __( 'Create New Slider', 'anipat-companion' ),
76 | 'type' => Controls_Manager::REPEATER,
77 | 'title_field' => '{{{ title }}}',
78 | 'fields' => [
79 | [
80 | 'name' => 'service_icon',
81 | 'label' => __( 'Select Icon', 'anipat-companion' ),
82 | 'type' => Controls_Manager::SELECT,
83 | 'default' => 'service_icon_1',
84 | 'options' => [
85 | 'service_icon_1' => __( 'Service Icon 1', 'anipat-companion' ),
86 | 'service_icon_2' => __( 'Service Icon 2', 'anipat-companion' ),
87 | 'service_icon_3' => __( 'Service Icon 3', 'anipat-companion' ),
88 | ]
89 | ],
90 | [
91 | 'name' => 'title',
92 | 'label' => __( 'Title', 'anipat-companion' ),
93 | 'label_block' => true,
94 | 'type' => Controls_Manager::TEXT,
95 | 'default' => __( 'Pet Boarding', 'anipat-companion' ),
96 | ],
97 | [
98 | 'name' => 'text',
99 | 'label' => __( 'Text', 'anipat-companion' ),
100 | 'label_block' => true,
101 | 'type' => Controls_Manager::TEXTAREA,
102 | 'default' => __( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut', 'anipat-companion' ),
103 | ],
104 | ],
105 | 'default' => [
106 | [
107 | 'service_icon' => 'service_icon_1',
108 | 'title' => __( 'Pet Boarding', 'anipat-companion' ),
109 | 'text' => __( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut', 'anipat-companion' ),
110 | ],
111 | [
112 | 'service_icon' => 'service_icon_2',
113 | 'title' => __( 'Healthy Meals', 'anipat-companion' ),
114 | 'text' => __( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut', 'anipat-companion' ),
115 | ],
116 | [
117 | 'service_icon' => 'service_icon_3',
118 | 'title' => __( 'Pet Spa', 'anipat-companion' ),
119 | 'text' => __( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut', 'anipat-companion' ),
120 | ],
121 | ]
122 | ]
123 | );
124 | $this->end_controls_section(); // End Hero content
125 |
126 | //------------------------------ Style title ------------------------------
127 |
128 | // Top Section Styles
129 | $this->start_controls_section(
130 | 'service_sec_style', [
131 | 'label' => __( 'Service Section Styles', 'anipat-companion' ),
132 | 'tab' => Controls_Manager::TAB_STYLE,
133 | ]
134 | );
135 |
136 | $this->add_control(
137 | 'title_col', [
138 | 'label' => __( 'Title Color', 'anipat-companion' ),
139 | 'type' => Controls_Manager::COLOR,
140 | 'selectors' => [
141 | '{{WRAPPER}} .service_area .section_title h3' => 'color: {{VALUE}};',
142 | ],
143 | ]
144 | );
145 |
146 | $this->add_control(
147 | 'sub_title_col', [
148 | 'label' => __( 'Sub Title Color', 'anipat-companion' ),
149 | 'type' => Controls_Manager::COLOR,
150 | 'selectors' => [
151 | '{{WRAPPER}} .service_area .section_title p' => 'color: {{VALUE}};',
152 | ],
153 | ]
154 | );
155 |
156 | $this->add_control(
157 | 'service_border_col', [
158 | 'label' => __( 'Service Border Color', 'anipat-companion' ),
159 | 'type' => Controls_Manager::COLOR,
160 | 'selectors' => [
161 | '{{WRAPPER}} .service_area .single_service' => 'border-color: {{VALUE}};',
162 | '{{WRAPPER}} .service_area .single_service:hover' => 'border-color: transparent;',
163 | ],
164 | ]
165 | );
166 |
167 | $this->end_controls_section();
168 | }
169 |
170 | protected function render() {
171 | $settings = $this->get_settings();
172 | $sec_title = !empty( $settings['sec_title'] ) ? $settings['sec_title'] : '';
173 | $sub_title = !empty( $settings['sub_title'] ) ? $settings['sub_title'] : '';
174 | $services = !empty( $settings['services'] ) ? $settings['services'] : '';
175 | // ANIPAT_DIR_ICON_IMG_URI
176 | // ANIPAT_DIR_IMGS_URI
177 | ?>
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 | '.esc_html($sec_title).'';
188 | }
189 | if ( $sub_title ) {
190 | echo '
'.wp_kses_post($sub_title).'
';
191 | }
192 | ?>
193 |
194 |
195 |
196 |
197 | 0 ) {
199 | foreach( $services as $item ) {
200 | $service_icon = !empty( $item['service_icon'] ) ? ANIPAT_DIR_ICON_IMG_URI . $item['service_icon'] .'.png' : '';
201 | $service_icon_bg = ANIPAT_DIR_IMGS_URI . 'service_icon_bg.png';
202 | $title = !empty( $item['title'] ) ? $item['title'] : '';
203 | $text = !empty( $item['text'] ) ? $item['text'] : '';
204 | ?>
205 |
206 |
207 |
>
208 |
209 |
?>)
210 |
211 |
212 |
213 | '.esc_html($title).'';
216 | }
217 | if ( $text ) {
218 | echo '
'.wp_kses_post($text).'
';
219 | }
220 | ?>
221 |
222 |
223 |
224 |
228 |
229 |
230 |
231 | ', '
']
14 | });
15 | }
16 |
17 | if ($.fn.owlCarousel) {
18 | $(".anipat-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 | $(".anipat-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 | $(".anipat-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 | $('.anipat-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 = $('.anipat-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 |
171 | if ($('#clock').length > 0) {
172 | var clock = $('#clock');
173 | var eventTime = clock.data('event-time');
174 | clock.countdown(eventTime, function (event) {
175 | $(this).html(event.strftime(
176 | '
%D
Days%H
Hours%M
Minutes%S
Seconds'
177 | ));
178 | });
179 | }
180 |
181 | // Background video
182 | var $selector = $('[data-videoid]');
183 |
184 | if ($selector.length) {
185 | $selector.each(function () {
186 | var $this = $(this);
187 | $this.YTPlayer({
188 | fitToBackground: true,
189 | videoId: $this.data('videoid')
190 | });
191 | });
192 | }
193 |
194 | // MC Scripts
195 | var $subscribe = $('.anipat-subscribe-newsletter-area');
196 | if ($subscribe.length) {
197 | window.fnames = new Array();
198 | window.ftypes = new Array();
199 | fnames[0] = 'EMAIL';
200 | ftypes[0] = 'email';
201 | fnames[1] = 'FNAME';
202 | ftypes[1] = 'text';
203 | fnames[2] = 'LNAME';
204 | ftypes[2] = 'text';
205 | fnames[3] = 'ADDRESS';
206 | ftypes[3] = 'address';
207 | fnames[4] = 'PHONE';
208 | ftypes[4] = 'phone';
209 | fnames[5] = 'BIRTHDAY';
210 | ftypes[5] = 'birthday';
211 | }
212 |
213 | // Search listings
214 | var $form = $('.advanced-filtering-form');
215 | if ($form.length) {
216 | var searchBtn = $('.advanced-filtering-form button.boxed-btn2');
217 | searchBtn.click(function (event) {
218 | event.preventDefault();
219 | var output_text = $('.all-listings-together').prev();
220 | var search_text = $('.search-text').val();
221 | var search_category = $('.search-category .nice-select .current').text();
222 | var search_location = $('.search-location .nice-select .current').text();
223 | var search_area_from = $('.area-from .nice-select .current').text();
224 | var search_area_to = $('.area-to .nice-select .current').text();
225 | var price_both = $('.advanced-filtering-form #amount').val();
226 | var price_both = price_both.split(' - ');
227 | var price_min = price_both[0];
228 | var price_max = price_both[1];
229 |
230 | output_text.text('Loading...');
231 | console.log(search_text + search_category + search_location + search_area_from + search_area_to + price_min + price_max);
232 |
233 | // Custom function for displaying message
234 | function add_message(message, type) {
235 | var html = "
" + message + "
";
236 | $(".jam-confirmation-message").empty().append(html);
237 | $(".jam-confirmation-message").fadeIn();
238 | }
239 |
240 | // Getting values from the form
241 | var nonce = $("#_wpnonce").val();
242 | var data = new FormData();
243 | data.append('action', 'prop_datas');
244 | data.append('nonce', nonce);
245 | data.append('search_text', search_text);
246 | data.append('search_category', search_category);
247 | data.append('search_location', search_location);
248 | data.append('search_area_from', search_area_from);
249 | data.append('search_area_to', search_area_to);
250 | data.append('price_min', price_min);
251 | data.append('price_max', price_max);
252 | $.ajax({
253 | url: prop_datas.ajax_url,
254 | type: 'POST',
255 | dataType: 'json',
256 | data: data,
257 | nonce: nonce,
258 | processData: false,
259 | contentType: false,
260 | cache: false,
261 | success: function (data) {
262 | console.log(data);
263 | $('.all-listings-together').html(data);
264 | var search_result_count = $('.all-listings-together span.total-search-count').data('total-search-count');
265 | // console.log(search_result_count);
266 | if (search_result_count > 0) {
267 | output_text.text(search_result_count + ' Listings found');
268 | } else {
269 | output_text.text('');
270 | }
271 | // $form[0].reset();
272 | }
273 | })
274 |
275 | // Error
276 | .fail(function () {
277 | add_message(data.message ? data.message : 'Sorry! Something went wrong.', 'danger');
278 | })
279 |
280 | // Reset all fields
281 | // .always(function () {
282 | // event.target.reset();
283 | // });
284 |
285 | });
286 | }
287 |
288 | })(jQuery);
--------------------------------------------------------------------------------
/inc/elementor-widgets/assets/js/jquery.youtubebackground.js:
--------------------------------------------------------------------------------
1 | /*
2 | * YoutubeBackground - A wrapper for the Youtube API - Great for fullscreen background videos or just regular videos.
3 | *
4 | * Licensed under the MIT license:
5 | * http://www.opensource.org/licenses/mit-license.php
6 | *
7 | *
8 | * Version: 1.0.5
9 | *
10 | */
11 |
12 | // Chain of Responsibility pattern. Creates base class that can be overridden.
13 | if (typeof Object.create !== "function") {
14 | Object.create = function(obj) {
15 | function F() {}
16 | F.prototype = obj;
17 | return new F();
18 | };
19 | }
20 |
21 | (function($, window, document) {
22 | var
23 | loadAPI = function loadAPI(callback) {
24 |
25 | // Load Youtube API
26 | var tag = document.createElement('script'),
27 | head = document.getElementsByTagName('head')[0];
28 |
29 | if(window.location.origin == 'file://') {
30 | tag.src = 'http://www.youtube.com/iframe_api';
31 | } else {
32 | tag.src = '//www.youtube.com/iframe_api';
33 | }
34 |
35 | head.appendChild(tag);
36 |
37 | // Clean up Tags.
38 | head = null;
39 | tag = null;
40 |
41 | iframeIsReady(callback);
42 | },
43 | iframeIsReady = function iframeIsReady(callback) {
44 | // Listen for Gobal YT player callback
45 | if (typeof YT === 'undefined' && typeof window.loadingPlayer === 'undefined') {
46 | // Prevents Ready Event from being called twice
47 | window.loadingPlayer = true;
48 |
49 |
50 | // Creates deferred so, other players know when to wait.
51 | window.dfd = $.Deferred();
52 | window.onYouTubeIframeAPIReady = function() {
53 | window.onYouTubeIframeAPIReady = null;
54 | window.dfd.resolve( "done" );
55 | callback();
56 | };
57 | } else if (typeof YT === 'object') {
58 | callback();
59 | } else {
60 | window.dfd.done(function( name ) {
61 | callback();
62 | });
63 | }
64 | };
65 |
66 | // YTPlayer Object
67 | YTPlayer = {
68 | player: null,
69 |
70 | // Defaults
71 | defaults: {
72 | ratio: 16 / 9,
73 | videoId: 'LSmgKRx5pBo',
74 | mute: true,
75 | repeat: true,
76 | width: $(window).width(),
77 | playButtonClass: 'YTPlayer-play',
78 | pauseButtonClass: 'YTPlayer-pause',
79 | muteButtonClass: 'YTPlayer-mute',
80 | volumeUpClass: 'YTPlayer-volume-up',
81 | volumeDownClass: 'YTPlayer-volume-down',
82 | start: 0,
83 | pauseOnScroll: false,
84 | fitToBackground: true,
85 | playerVars: {
86 | iv_load_policy: 3,
87 | modestbranding: 1,
88 | autoplay: 1,
89 | controls: 0,
90 | showinfo: 0,
91 | wmode: 'opaque',
92 | branding: 0,
93 | autohide: 0
94 | },
95 | events: null
96 | },
97 |
98 | /**
99 | * @function init
100 | * Intializes YTPlayer object
101 | */
102 | init: function init(node, userOptions) {
103 | var self = this;
104 |
105 | self.userOptions = userOptions;
106 |
107 | self.$body = $('body'),
108 | self.$node = $(node),
109 | self.$window = $(window);
110 |
111 | // Setup event defaults with the reference to this
112 | self.defaults.events = {
113 | 'onReady': function(e) {
114 | self.onPlayerReady(e);
115 |
116 | // setup up pause on scroll
117 | if (self.options.pauseOnScroll) {
118 | self.pauseOnScroll();
119 | }
120 |
121 | // Callback for when finished
122 | if (typeof self.options.callback == 'function') {
123 | self.options.callback.call(this);
124 | }
125 | },
126 | 'onStateChange': function(e) {
127 | if (e.data === 1) {
128 |
129 | self.$node.find('img').fadeOut(400);
130 | self.$node.addClass('loaded');
131 | } else if (e.data === 0 && self.options.repeat) { // video ended and repeat option is set true
132 | self.player.seekTo(self.options.start);
133 | }
134 | }
135 | }
136 |
137 |
138 | self.options = $.extend(true, {}, self.defaults, self.userOptions);
139 | self.options.height = Math.ceil(self.options.width / self.options.ratio);
140 | self.ID = (new Date()).getTime();
141 | self.holderID = 'YTPlayer-ID-' + self.ID;
142 |
143 | if (self.options.fitToBackground) {
144 | self.createBackgroundVideo();
145 | } else {
146 | self.createContainerVideo();
147 | }
148 | // Listen for Resize Event
149 | self.$window.on('resize.YTplayer' + self.ID, function() {
150 | self.resize(self);
151 | });
152 |
153 | loadAPI(self.onYouTubeIframeAPIReady.bind(self));
154 |
155 | self.resize(self);
156 |
157 | return self;
158 | },
159 |
160 |
161 | /**
162 | * @function pauseOnScroll
163 | * Adds window events to pause video on scroll.
164 | */
165 | pauseOnScroll: function pauseOnScroll() {
166 | var self = this;
167 | self.$window.on('scroll.YTplayer' + self.ID, function() {
168 | var state = self.player.getPlayerState();
169 | if (state === 1) {
170 | self.player.pauseVideo();
171 | }
172 | });
173 | self.$window.scrollStopped(function(){
174 | var state = self.player.getPlayerState();
175 | if (state === 2) {
176 | self.player.playVideo();
177 | }
178 | });
179 | },
180 | /**
181 | * @function createContainerVideo
182 | * Adds HTML for video in a container
183 | */
184 | createContainerVideo: function createContainerVideo() {
185 | var self = this;
186 |
187 | /*jshint multistr: true */
188 | var $YTPlayerString = $('
\
191 |
');
192 |
193 | self.$node.append($YTPlayerString);
194 | self.$YTPlayerString = $YTPlayerString;
195 | $YTPlayerString = null;
196 | },
197 |
198 | /**
199 | * @function createBackgroundVideo
200 | * Adds HTML for video background
201 | */
202 | createBackgroundVideo: function createBackgroundVideo() {
203 | /*jshint multistr: true */
204 | var self = this,
205 | $YTPlayerString = $('
\
208 |
');
209 |
210 | self.$node.append($YTPlayerString);
211 | self.$YTPlayerString = $YTPlayerString;
212 | $YTPlayerString = null;
213 | },
214 |
215 | /**
216 | * @function resize
217 | * Resize event to change video size
218 | */
219 | resize: function resize(self) {
220 | //var self = this;
221 | var container = $(window);
222 |
223 | if (!self.options.fitToBackground) {
224 | container = self.$node;
225 | }
226 |
227 | var width = container.width(),
228 | pWidth, // player width, to be defined
229 | height = container.height(),
230 | pHeight, // player height, tbd
231 | $YTPlayerPlayer = $('#' + self.holderID);
232 |
233 | // when screen aspect ratio differs from video, video must center and underlay one dimension
234 | if (width / self.options.ratio < height) {
235 | pWidth = Math.ceil(height * self.options.ratio); // get new player width
236 | $YTPlayerPlayer.width(pWidth).height(height).css({
237 | left: (width - pWidth) / 2,
238 | top: 0
239 | }); // player width is greater, offset left; reset top
240 | } else { // new video width < window width (gap to right)
241 | pHeight = Math.ceil(width / self.options.ratio); // get new player height
242 | $YTPlayerPlayer.width(width).height(pHeight).css({
243 | left: 0,
244 | top: (height - pHeight) / 2
245 | }); // player height is greater, offset top; reset left
246 | }
247 |
248 | $YTPlayerPlayer = null;
249 | container = null;
250 | },
251 |
252 | /**
253 | * @function onYouTubeIframeAPIReady
254 | * @ params {object} YTPlayer object for access to options
255 | * Youtube API calls this function when the player is ready.
256 | */
257 | onYouTubeIframeAPIReady: function onYouTubeIframeAPIReady() {
258 | var self = this;
259 | self.player = new window.YT.Player(self.holderID, self.options);
260 | },
261 |
262 | /**
263 | * @function onPlayerReady
264 | * @ params {event} window event from youtube player
265 | */
266 | onPlayerReady: function onPlayerReady(e) {
267 | if (this.options.mute) {
268 | e.target.mute();
269 | }
270 | e.target.playVideo();
271 | },
272 |
273 | /**
274 | * @function getPlayer
275 | * returns youtube player
276 | */
277 | getPlayer: function getPlayer() {
278 | return this.player;
279 | },
280 |
281 | /**
282 | * @function destroy
283 | * destroys all!
284 | */
285 | destroy: function destroy() {
286 | var self = this;
287 |
288 | self.$node
289 | .removeData('yt-init')
290 | .removeData('ytPlayer')
291 | .removeClass('loaded');
292 |
293 | self.$YTPlayerString.remove();
294 |
295 | $(window).off('resize.YTplayer' + self.ID);
296 | $(window).off('scroll.YTplayer' + self.ID);
297 | self.$body = null;
298 | self.$node = null;
299 | self.$YTPlayerString = null;
300 | self.player.destroy();
301 | self.player = null;
302 | }
303 | };
304 |
305 | // Scroll Stopped event.
306 | $.fn.scrollStopped = function(callback) {
307 | var $this = $(this), self = this;
308 | $this.scroll(function(){
309 | if ($this.data('scrollTimeout')) {
310 | clearTimeout($this.data('scrollTimeout'));
311 | }
312 | $this.data('scrollTimeout', setTimeout(callback,250,self));
313 | });
314 | };
315 |
316 | // Create plugin
317 | $.fn.YTPlayer = function(options) {
318 |
319 | return this.each(function() {
320 | var el = this;
321 |
322 | $(el).data("yt-init", true);
323 | var player = Object.create(YTPlayer);
324 | player.init(el, options);
325 | $.data(el, "ytPlayer", player);
326 | });
327 | };
328 |
329 | })(jQuery, window, document);
--------------------------------------------------------------------------------
/inc/elementor-widgets/widgets/adopt.php:
--------------------------------------------------------------------------------
1 | start_controls_section(
49 | 'adopt_content',
50 | [
51 | 'label' => __( 'Adopt contents', 'anipat-companion' ),
52 | ]
53 | );
54 |
55 | $this->add_control(
56 | 'sec_title',
57 | [
58 | 'label' => esc_html__( 'Sec Title', 'anipat-companion' ),
59 | 'type' => Controls_Manager::TEXTAREA,
60 | 'label_block' => true,
61 | 'default' => '
We need your help Adopt Us',
62 | ]
63 | );
64 | $this->add_control(
65 | 'sec_text',
66 | [
67 | 'label' => esc_html__( 'Sub Title', 'anipat-companion' ),
68 | 'type' => Controls_Manager::TEXTAREA,
69 | 'label_block' => true,
70 | 'default' => 'Lorem ipsum dolor sit , consectetur adipiscing elit, sed do iusmod tempor incididunt ut labore et dolore magna aliqua. Quis ipsum suspendisse ultrices.',
71 | ]
72 | );
73 | $this->add_control(
74 | 'btn_title',
75 | [
76 | 'label' => esc_html__( 'Button Title', 'anipat-companion' ),
77 | 'type' => Controls_Manager::TEXT,
78 | 'label_block' => true,
79 | 'default' => esc_html__( 'Contact Us', 'anipat-companion' ),
80 | ]
81 | );
82 | $this->add_control(
83 | 'btn_url',
84 | [
85 | 'label' => esc_html__( 'Button URL', 'anipat-companion' ),
86 | 'type' => Controls_Manager::URL,
87 | 'label_block' => true,
88 | ]
89 | );
90 | $this->add_control(
91 | 'adopts', [
92 | 'label' => __( 'Create New Slider', 'anipat-companion' ),
93 | 'type' => Controls_Manager::REPEATER,
94 | 'title_field' => '{{{ counter_title }}}',
95 | 'fields' => [
96 | [
97 | 'name' => 'adopt_icon',
98 | 'label' => __( 'Select Icon', 'anipat-companion' ),
99 | 'type' => Controls_Manager::SELECT,
100 | 'default' => 'adopt_icon_1',
101 | 'options' => [
102 | 'adopt_icon_1' => __( 'Adopt Icon 1', 'anipat-companion' ),
103 | 'adopt_icon_2' => __( 'Adopt Icon 2', 'anipat-companion' ),
104 | 'adopt_icon_3' => __( 'Adopt Icon 3', 'anipat-companion' ),
105 | ]
106 | ],
107 | [
108 | 'name' => 'counter_val',
109 | 'label' => __( 'Counter Title', 'anipat-companion' ),
110 | 'label_block' => true,
111 | 'type' => Controls_Manager::TEXT,
112 | 'default' => __( '452', 'anipat-companion' ),
113 | ],
114 | [
115 | 'name' => 'counter_title',
116 | 'label' => __( 'Counter Title', 'anipat-companion' ),
117 | 'label_block' => true,
118 | 'type' => Controls_Manager::TEXT,
119 | 'default' => __( 'Pets Available', 'anipat-companion' ),
120 | ],
121 | ],
122 | 'default' => [
123 | [
124 | 'adopt_icon' => 'adopt_icon_1',
125 | 'counter_val' => __( '452', 'anipat-companion' ),
126 | 'counter_title' => __( 'Pets Available', 'anipat-companion' ),
127 | ],
128 | [
129 | 'adopt_icon' => 'adopt_icon_3',
130 | 'counter_val' => __( '52', 'anipat-companion' ),
131 | 'counter_title' => __( 'Pets Available', 'anipat-companion' ),
132 | ],
133 | [
134 | 'adopt_icon' => 'adopt_icon_2',
135 | 'counter_val' => __( '62', 'anipat-companion' ),
136 | 'counter_title' => __( 'Pets Available', 'anipat-companion' ),
137 | ],
138 | ]
139 | ]
140 | );
141 | $this->end_controls_section(); // End Hero content
142 |
143 | //------------------------------ Style title ------------------------------
144 |
145 | // Top Section Styles
146 | $this->start_controls_section(
147 | 'apartment_sec_style', [
148 | 'label' => __( 'Apartments Section Styles', 'anipat-companion' ),
149 | 'tab' => Controls_Manager::TAB_STYLE,
150 | ]
151 | );
152 |
153 | $this->add_control(
154 | 'title_col', [
155 | 'label' => __( 'Title Color', 'anipat-companion' ),
156 | 'type' => Controls_Manager::COLOR,
157 | 'selectors' => [
158 | '{{WRAPPER}} .adapt_area .section_title h3' => 'color: {{VALUE}};',
159 | '{{WRAPPER}} .adapt_area .adapt_about .single_adapt .adapt_content h3' => 'color: {{VALUE}};',
160 | ],
161 | ]
162 | );
163 |
164 | $this->add_control(
165 | 'text_col', [
166 | 'label' => __( 'Text Color', 'anipat-companion' ),
167 | 'type' => Controls_Manager::COLOR,
168 | 'selectors' => [
169 | '{{WRAPPER}} .adapt_area .section_title p' => 'color: {{VALUE}};',
170 | '{{WRAPPER}} .adapt_area .adapt_about .single_adapt .adapt_content p' => 'color: {{VALUE}};',
171 | ],
172 | ]
173 | );
174 | $this->add_control(
175 | 'btn_col', [
176 | 'label' => __( 'Button Color', 'anipat-companion' ),
177 | 'type' => Controls_Manager::COLOR,
178 | 'selectors' => [
179 | '{{WRAPPER}} .adapt_area .section_title .boxed-btn3' => 'background: {{VALUE}};',
180 | ],
181 | ]
182 | );
183 |
184 | $this->end_controls_section();
185 | }
186 |
187 | protected function render() {
188 | $settings = $this->get_settings();
189 | $sec_title = !empty( $settings['sec_title'] ) ? $settings['sec_title'] : '';
190 | $sec_text = !empty( $settings['sec_text'] ) ? $settings['sec_text'] : '';
191 | $btn_title = !empty( $settings['btn_title'] ) ? $settings['btn_title'] : '';
192 | $btn_url = !empty( $settings['btn_url']['url'] ) ? $settings['btn_url']['url'] : '';
193 | $adopts = !empty( $settings['adopts'] ) ? $settings['adopts'] : '';
194 | ?>
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 | '.wp_kses_post(nl2br($sec_title)).'';
206 | }
207 | if ( $sec_text ) {
208 | echo '
'.wp_kses_post(nl2br($sec_text)).'
';
209 | }
210 | if ( $btn_title ) {
211 | echo '
'.esc_html($btn_title).'';
212 | }
213 | ?>
214 |
215 |
216 |
217 |
218 |
219 |
220 | 0 ) {
222 | $counter = 0;
223 | foreach( $adopts as $item ) {
224 | $counter++;
225 | $adopt_icon = !empty( $item['adopt_icon'] ) ? ANIPAT_DIR_ICON_IMG_URI . $item['adopt_icon'] .'.png' : '';
226 | $counter_val = !empty( $item['counter_val'] ) ? $item['counter_val'] : '';
227 | $counter_title = !empty( $item['counter_title'] ) ? $item['counter_title'] : '';
228 | $wrapper_class_open = '
';
229 | $wrapper_class_close = '
';
230 | echo ($counter != 3) ? $wrapper_class_open : '';
231 | ?>
232 |
233 |
?>)
234 |
238 |
239 |
244 |
245 |
246 |
247 |
248 |
249 |
250 | esc_html__( 'Add footer contact info', 'anipat-companion' ), )
34 | );
35 |
36 | }
37 |
38 | // This is where the action happens
39 | public function widget( $args, $instance ) {
40 |
41 | $title = apply_filters( 'widget_contactinfo_title', $instance['title'] );
42 | $addressicon = apply_filters( 'widget_contactinfo_addressicon', $instance['addressicon'] );
43 | $address = apply_filters( 'widget_contactinfo_address', $instance['address'] );
44 | $pnumbericon = apply_filters( 'widget_contactinfo_pnumbericon', $instance['pnumbericon'] );
45 | $pnumber = apply_filters( 'widget_contactinfo_pnumber', $instance['pnumber'] );
46 | $emailicon = apply_filters( 'widget_contactinfo_emailicon', $instance['emailicon'] );
47 | $email = apply_filters( 'widget_contactinfo_email', $instance['email'] );
48 |
49 | // before and after widget arguments are defined by themes
50 | echo wp_kses_post( $args['before_widget'] );
51 | if ( ! empty( $title ) )
52 | echo wp_kses_post( $args['before_title'] . $title . $args['after_title'] );
53 |
54 |
55 | ?>
56 |
59 | ';
69 |
70 | }
71 | //
72 | if( $address ){
73 | echo anipat_paragraph_tag(
74 | array(
75 | 'text' => wp_kses_post( $address )
76 | )
77 | );
78 | }
79 | ?>
80 |
81 |
87 | ';
97 |
98 | }
99 | //
100 | if( $pnumber ){
101 | echo anipat_heading_tag(
102 | array(
103 | 'tag' => 'h2',
104 | 'text' => wp_kses_post( $pnumber )
105 | )
106 |
107 | );
108 | }
109 | ?>
110 |