├── inc ├── elementor-widgets │ ├── assets │ │ ├── css │ │ │ ├── elementor-edit.css │ │ │ ├── slick.css │ │ │ └── owl.carousel.css │ │ ├── fonts │ │ │ └── themify-icon │ │ │ │ └── fonts │ │ │ │ ├── themify.eot │ │ │ │ ├── themify.ttf │ │ │ │ └── themify.woff │ │ └── js │ │ │ ├── datarc-companion-main.js │ │ │ ├── countdowntime.js │ │ │ ├── map-custom.js │ │ │ └── slick-custom.js │ ├── widgets │ │ ├── section-heading.php │ │ ├── progress.php │ │ ├── testimonial.php │ │ ├── datarc-blog.php │ │ ├── call-to-action.php │ │ ├── datarc-about.php │ │ ├── datarc-banner.php │ │ ├── datarc-contact.php │ │ ├── few-words.php │ │ ├── portfolio.php │ │ ├── pricing.php │ │ └── team-member.php │ └── elementor-widget.php ├── demo-data │ ├── screen-image.png │ ├── css │ │ └── demo-import.css │ ├── datarc-widgets-demo.json │ ├── datarc-customizer.dat │ └── demo-import.php ├── datarc-meta │ └── datarc-meta-config.php ├── sidebar-widgets │ ├── instagram-widget.php │ └── newsletter-widget.php ├── instagram-api.php └── functions.php ├── .gitignore ├── datarc-init.php ├── js └── loadmore-ajax.js ├── datarc-companion.php └── readme.txt /inc/elementor-widgets/assets/css/elementor-edit.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /inc/demo-data/screen-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColorlibHQ/datarc-companion/master/inc/demo-data/screen-image.png -------------------------------------------------------------------------------- /inc/elementor-widgets/assets/fonts/themify-icon/fonts/themify.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColorlibHQ/datarc-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/datarc-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/datarc-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 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.log 2 | wp-config.php 3 | wp-content/advanced-cache.php 4 | wp-content/backup-db/ 5 | wp-content/backups/ 6 | wp-content/blogs.dir/ 7 | wp-content/cache/ 8 | wp-content/upgrade/ 9 | wp-content/uploads/ 10 | wp-content/mu-plugins/ 11 | wp-content/wp-cache-config.php 12 | wp-content/plugins/hello.php 13 | 14 | /.htaccess 15 | /license.txt 16 | /readme.html 17 | /sitemap.xml 18 | /sitemap.xml.gz 19 | *.DS_Store 20 | .idea 21 | /.idea 22 | datarc-companion.zip -------------------------------------------------------------------------------- /datarc-init.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /inc/demo-data/datarc-widgets-demo.json: -------------------------------------------------------------------------------- 1 | {"datarc-post-sidebar":{"search-2":{"title":""},"recent-posts-2":{"title":"","number":5},"recent-comments-2":{"title":"","number":5},"archives-2":{"title":"","count":0,"dropdown":0},"categories-2":{"title":"","count":0,"hierarchical":0,"dropdown":0},"meta-2":{"title":""}},"footer-1":{"text-2":{"title":"ABOUT AGENCY","text":"The world has become so fast paced that people don\u2019t want to stand by reading a page of information, they would much rather look at a presentation and understand the message. It has come to a point","filter":true,"visual":true}},"footer-2":{"nav_menu-2":{"title":"NAVIGATION LINKS","nav_menu":2}},"footer-3":{"datarc_newsletter_widget-2":{"title":"About","actionurl":"","desc":"For business professionals caught between high OEM price and mediocre print and graphic output,"}},"footer-4":{"datarc_instagram_widget-2":{"title":"INSTAFEED","itemnumber":"8"}}} -------------------------------------------------------------------------------- /inc/demo-data/datarc-customizer.dat: -------------------------------------------------------------------------------- 1 | a:4:{s:8:"template";s:6:"datarc";s:4:"mods";a:16:{i:0;b:0;s:18:"nav_menu_locations";a:3:{s:11:"social-menu";i:2;s:12:"onepage-menu";i:9;s:12:"primary-menu";i:10;}s:18:"custom_css_post_id";i:-1;s:16:"sidebars_widgets";a:2:{s:4:"time";i:1535959890;s:4:"data";a:7:{s:19:"wp_inactive_widgets";a:0:{}s:19:"datarc-post-sidebar";a:6:{i:0;s:8:"search-2";i:1;s:14:"recent-posts-2";i:2;s:17:"recent-comments-2";i:3;s:10:"archives-2";i:4;s:12:"categories-2";i:5;s:6:"meta-2";}s:18:"datarc-woo-sidebar";a:0:{}s:8:"footer-1";a:0:{}s:8:"footer-2";a:0:{}s:8:"footer-3";a:0:{}s:8:"footer-4";a:0:{}}}s:35:"datarc-headersocial-toggle-settings";b:1;s:32:"datarc-searchopt-toggle-settings";b:1;s:29:"datarc-widget-toggle-settings";b:1;s:35:"datarc-footersocial-toggle-settings";b:1;s:39:"datarc_footer_widgettitlecolor_settings";s:7:"#ffffff";s:21:"datarc_igaccess_token";s:51:"1418025861.1677ed0.cf75b706a9da414e8b919bbd02819957";s:11:"custom_logo";i:208;s:20:"datarc_headerbgcolor";s:7:"#3c408f";s:30:"datarc-copyright-text-settings";s:45:"Copyright © 2018 - 2019 All rights reserved.";s:19:"datarc_fof_text_one";s:17:"Ooops 404 Error !";s:19:"datarc_fof_text_two";s:63:"Either something went wrong or the page dose’t exist anymore.";s:17:"datarc_themecolor";s:7:"#00ff8c";}s:7:"options";a:2:{s:9:"site_icon";s:3:"209";s:23:"nav_menus_created_posts";a:0:{}}s:6:"wp_css";s:0:"";} -------------------------------------------------------------------------------- /inc/elementor-widgets/assets/js/datarc-companion-main.js: -------------------------------------------------------------------------------- 1 | (function ($) { 2 | 'use strict'; 3 | 4 | // owlCarousel 5 | var $testimonialcs = $('.active-testimonial-carousel'); 6 | 7 | if( $testimonialcs.length ){ 8 | $testimonialcs.owlCarousel({ 9 | loop:true, 10 | dot: true, 11 | items: 3, 12 | margin: 30, 13 | autoplay:true, 14 | autoplayTimeout:3000, 15 | autoplayHoverPause:true, 16 | animateOut: 'fadeOutLeft', 17 | animateIn: 'fadeInRight', 18 | responsive:{ 19 | 0:{ 20 | items:1, 21 | }, 22 | 600:{ 23 | items:3, 24 | } 25 | } 26 | }); 27 | 28 | } 29 | 30 | 31 | // MC Scripts 32 | var $subscribe = $( '.datarc-subscribe-newsletter-area' ); 33 | if( $subscribe.length ){ 34 | window.fnames = new Array(); 35 | window.ftypes = new Array(); 36 | fnames[0]='EMAIL'; 37 | ftypes[0]='email'; 38 | fnames[1]='FNAME'; 39 | ftypes[1]='text'; 40 | fnames[2]='LNAME'; 41 | ftypes[2]='text'; 42 | fnames[3]='ADDRESS'; 43 | ftypes[3]='address'; 44 | fnames[4]='PHONE'; 45 | ftypes[4]='phone'; 46 | fnames[5]='BIRTHDAY'; 47 | ftypes[5]='birthday'; 48 | } 49 | 50 | 51 | 52 | })(jQuery); -------------------------------------------------------------------------------- /inc/elementor-widgets/assets/js/countdowntime.js: -------------------------------------------------------------------------------- 1 | (function ($) { 2 | "use strict"; 3 | 4 | function getTimeRemaining(endtime) { 5 | var t = Date.parse(endtime) - Date.parse(new Date()); 6 | var seconds = Math.floor((t / 1000) % 60); 7 | var minutes = Math.floor((t / 1000 / 60) % 60); 8 | var hours = Math.floor((t / (1000 * 60 * 60)) % 24); 9 | var days = Math.floor(t / (1000 * 60 * 60 * 24)); 10 | return { 11 | 'total': t, 12 | 'days': days, 13 | 'hours': hours, 14 | 'minutes': minutes, 15 | 'seconds': seconds 16 | }; 17 | } 18 | 19 | function initializeClock(id, endtime) { 20 | var daysSpan = $('.days'); 21 | var hoursSpan = $('.hours'); 22 | var minutesSpan = $('.minutes'); 23 | var secondsSpan = $('.seconds'); 24 | 25 | function updateClock() { 26 | var t = getTimeRemaining(endtime); 27 | 28 | daysSpan.html(t.days); 29 | hoursSpan.html(('0' + t.hours).slice(-2)); 30 | minutesSpan.html(('0' + t.minutes).slice(-2)); 31 | secondsSpan.html(('0' + t.seconds).slice(-2)) 32 | 33 | if (t.total <= 0) { 34 | clearInterval(timeinterval); 35 | } 36 | } 37 | 38 | updateClock(); 39 | var timeinterval = setInterval(updateClock, 1000); 40 | } 41 | 42 | var day = $( '.days' ).data('days'); 43 | 44 | var deadline = new Date(Date.parse(new Date()) + day * 24 * 60 * 60 * 1000 + 13 * 60 * 60 * 1000); 45 | 46 | initializeClock('clockdiv', deadline); 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' : 'datarc_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 | success: function( data ){ 35 | 36 | $( '.item-removable' ).remove(); 37 | $( '.datarc-portfolio-load' ).before( data ); 38 | //$( '.datarc-portfolio-load' ).after(); 39 | 40 | mixitup( '#filter-content' ).forceRefresh(); 41 | 42 | var loaditems = parseInt( Incr ) + parseInt( postNumber ); 43 | 44 | if( portfolioloadajax.totalitems <= loaditems ){ 45 | 46 | $button.hide(); 47 | } 48 | 49 | } 50 | 51 | }); 52 | 53 | return false; 54 | 55 | } ); 56 | 57 | 58 | } 59 | 60 | 61 | })(jQuery); -------------------------------------------------------------------------------- /inc/elementor-widgets/assets/css/slick.css: -------------------------------------------------------------------------------- 1 | /* Slider */ 2 | .slick-slider 3 | { 4 | position: relative; 5 | 6 | display: block; 7 | box-sizing: border-box; 8 | 9 | -webkit-user-select: none; 10 | -moz-user-select: none; 11 | -ms-user-select: none; 12 | user-select: none; 13 | 14 | -webkit-touch-callout: none; 15 | -khtml-user-select: none; 16 | -ms-touch-action: pan-y; 17 | touch-action: pan-y; 18 | -webkit-tap-highlight-color: transparent; 19 | } 20 | 21 | .slick-list 22 | { 23 | position: relative; 24 | 25 | display: block; 26 | overflow: hidden; 27 | 28 | margin: 0; 29 | padding: 0; 30 | } 31 | .slick-list:focus 32 | { 33 | outline: none; 34 | } 35 | .slick-list.dragging 36 | { 37 | cursor: pointer; 38 | cursor: hand; 39 | } 40 | 41 | .slick-slider .slick-track, 42 | .slick-slider .slick-list 43 | { 44 | -webkit-transform: translate3d(0, 0, 0); 45 | -moz-transform: translate3d(0, 0, 0); 46 | -ms-transform: translate3d(0, 0, 0); 47 | -o-transform: translate3d(0, 0, 0); 48 | transform: translate3d(0, 0, 0); 49 | } 50 | 51 | .slick-track 52 | { 53 | position: relative; 54 | top: 0; 55 | left: 0; 56 | 57 | display: block; 58 | margin-left: auto; 59 | margin-right: auto; 60 | } 61 | .slick-track:before, 62 | .slick-track:after 63 | { 64 | display: table; 65 | 66 | content: ''; 67 | } 68 | .slick-track:after 69 | { 70 | clear: both; 71 | } 72 | .slick-loading .slick-track 73 | { 74 | visibility: hidden; 75 | } 76 | 77 | .slick-slide 78 | { 79 | display: none; 80 | float: left; 81 | 82 | height: 100%; 83 | min-height: 1px; 84 | } 85 | [dir='rtl'] .slick-slide 86 | { 87 | float: right; 88 | } 89 | .slick-slide img 90 | { 91 | display: block; 92 | } 93 | .slick-slide.slick-loading img 94 | { 95 | display: none; 96 | } 97 | .slick-slide.dragging img 98 | { 99 | pointer-events: none; 100 | } 101 | .slick-initialized .slick-slide 102 | { 103 | display: block; 104 | } 105 | .slick-loading .slick-slide 106 | { 107 | visibility: hidden; 108 | } 109 | .slick-vertical .slick-slide 110 | { 111 | display: block; 112 | 113 | height: auto; 114 | 115 | border: 1px solid transparent; 116 | } 117 | .slick-arrow.slick-hidden { 118 | display: none; 119 | } 120 | -------------------------------------------------------------------------------- /datarc-companion.php: -------------------------------------------------------------------------------- 1 | parent(); 58 | 59 | 60 | if( ( 'Datarc' == $current_theme->get( 'Name' ) ) || ( $is_parent && 'Datarc' == $is_parent->get( 'Name' ) ) ){ 61 | require_once DATARC_COMPANION_DIR_PATH . 'datarc-init.php'; 62 | }else{ 63 | 64 | add_action( 'admin_notices', 'datarc_companion_admin_notice', 99 ); 65 | function datarc_companion_admin_notice() { 66 | $url = 'https://wordpress.org/themes/datarc/'; 67 | ?> 68 |
69 |

Datarc Companion plugin you have to also install the %1$sDatarc Theme%2$s', 'datarc-companion' ), '', '' ); ?>

70 |
71 | -------------------------------------------------------------------------------- /inc/datarc-meta/datarc-meta-config.php: -------------------------------------------------------------------------------- 1 | 29 | 42 | post_type) 59 | return $post_id; 60 | 61 | $meta_footeropt = ""; 62 | 63 | if(isset($_POST["footeropt"])) 64 | { 65 | $meta_footeropt = $_POST["footeropt"]; 66 | } 67 | update_post_meta( $post_id, "_datarc_footer_opt", sanitize_text_field( $meta_footeropt ) ); 68 | 69 | } 70 | 71 | add_action("save_post", "datarc_save_page_page_footer_settings_meta", 10, 3); 72 | ?> -------------------------------------------------------------------------------- /inc/elementor-widgets/assets/js/map-custom.js: -------------------------------------------------------------------------------- 1 | (function ($) { 2 | // USE STRICT 3 | "use strict"; 4 | 5 | $(document).ready(function () { 6 | 7 | var selector_map = $('#google_map'); 8 | var img_pin = selector_map.attr('data-pin'); 9 | var data_map_x = selector_map.attr('data-map-x'); 10 | var data_map_y = selector_map.attr('data-map-y'); 11 | var scrollwhell = selector_map.attr('data-scrollwhell'); 12 | var draggable = selector_map.attr('data-draggable'); 13 | 14 | if (img_pin == null) { 15 | img_pin = 'images/icons/location.png'; 16 | } 17 | if (data_map_x == null || data_map_y == null) { 18 | data_map_x = 40.007749; 19 | data_map_y = -93.266572; 20 | } 21 | if (scrollwhell == null) { 22 | scrollwhell = 0; 23 | } 24 | 25 | if (draggable == null) { 26 | draggable = 0; 27 | } 28 | 29 | var style = []; 30 | 31 | var latitude = data_map_x, 32 | longitude = data_map_y, 33 | map_zoom = 14; 34 | 35 | var locations = [ 36 | ['

'+datarcmapmarkertext.map_markertext+'

' 37 | , latitude, longitude, 2] 38 | ]; 39 | 40 | if (selector_map !== undefined) { 41 | var map = new google.maps.Map(document.getElementById('google_map'), { 42 | zoom: 15, 43 | scrollwheel: scrollwhell, 44 | navigationControl: true, 45 | mapTypeControl: false, 46 | scaleControl: false, 47 | draggable: draggable, 48 | styles: style, 49 | center: new google.maps.LatLng(latitude, longitude), 50 | mapTypeId: google.maps.MapTypeId.ROADMAP 51 | }); 52 | } 53 | 54 | var infowindow = new google.maps.InfoWindow(); 55 | 56 | var marker, i; 57 | 58 | for (i = 0; i < locations.length; i++) { 59 | 60 | marker = new google.maps.Marker({ 61 | position: new google.maps.LatLng(locations[i][1], locations[i][2]), 62 | map: map, 63 | icon: img_pin 64 | }); 65 | 66 | google.maps.event.addListener(marker, 'click', (function(marker, i) { 67 | return function() { 68 | infowindow.setContent(locations[i][0]); 69 | infowindow.open(map, marker); 70 | } 71 | })(marker, i)); 72 | } 73 | 74 | }); 75 | 76 | })(jQuery); -------------------------------------------------------------------------------- /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: 3.8 5 | Tested up to: 5.0 6 | Stable tag: 1.0.0 7 | License: GPLv3 or later 8 | License URI: http://www.gnu.org/licenses/gpl-3.0.html 9 | 10 | DataRC Companion is a companion plugin for DataRC WordPress theme by Colorlib.com. 11 | 12 | == Description == 13 | 14 | DataRC Companion is a companion for DataRC 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 DataRC. If you are having problems with DataRC theme or its companion plugin the fastest way to receive help is via our theme support forum. 15 | 16 | This plugin will add necessary WordPress options and allow to import demo content which will help you to with website setup. 17 | 18 | While DataRC 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. 19 | 20 | = Plugin Options = 21 | 22 | * Creates required WordPress options to be used in theme 23 | * Creates demo(dummy) content for options to make them easier to use and understand how they work 24 | * Provides an option to import demo(dummy) content. 25 | 26 | = About Colorlib = 27 | 28 | 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. 29 | 30 | = Further Reading = 31 | 32 | 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. 33 | 34 | 35 | == Installation == 36 | 37 | This section describes how to install the plugin and get it working. 38 | 39 | 1. Upload the whole contents of the folder `datarc-companion` to the `/wp-content/plugins/` directory 40 | 2. Activate the plugin through the 'Plugins' menu in WordPress dashboard 41 | 3. Enjoy using it :) 42 | 43 | 44 | == Frequently Asked Questions == 45 | 46 | = What themes this plugin supports? = 47 | 48 | Currently it works only with DataRC theme. 49 | 50 | = Am I obligated to use it? = 51 | 52 | You can still use DataRC theme without this plugin but you won't be able to import demo content and use theme specific options that you see on front page of theme demo. 53 | 54 | == Changelog == 55 | 56 | = 1.0.0 = 57 | * Initial release. -------------------------------------------------------------------------------- /inc/demo-data/demo-import.php: -------------------------------------------------------------------------------- 1 | '; 17 | 18 | return array( 19 | array( 20 | 'import_file_name' => 'Datarc Demo', 21 | 'local_import_file' => DATARC_COMPANION_DEMO_DIR_PATH .'datarc-demo.xml', 22 | 'local_import_widget_file' => DATARC_COMPANION_DEMO_DIR_PATH .'datarc-widgets-demo.json', 23 | 'import_customizer_file_url' => plugins_url( 'datarc-customizer.dat', __FILE__ ), 24 | 'import_notice' => $demoImg, 25 | ), 26 | ); 27 | } 28 | add_filter( 'pt-ocdi/import_files', 'datarc_import_files' ); 29 | 30 | // demo import setup 31 | function datarc_after_import_setup() { 32 | // Assign menus to their locations. 33 | $main_menu = get_term_by( 'name', 'Primary Menu', 'nav_menu' ); 34 | $onepage_menu = get_term_by( 'name', 'One Page Menu', 'nav_menu' ); 35 | $social_menu = get_term_by( 'name', 'Social Menu', 'nav_menu' ); 36 | 37 | set_theme_mod( 'nav_menu_locations', array( 38 | 'primary-menu' => $main_menu->term_id, 39 | 'onepage-menu' => $onepage_menu->term_id, 40 | 'social-menu' => $social_menu->term_id, 41 | ) 42 | ); 43 | 44 | // Assign front page and posts page (blog page). 45 | $front_page_id = get_page_by_title( 'Home' ); 46 | $blog_page_id = get_page_by_title( 'Blog' ); 47 | 48 | update_option( 'show_on_front', 'page' ); 49 | update_option( 'page_on_front', $front_page_id->ID ); 50 | update_option( 'page_for_posts', $blog_page_id->ID ); 51 | update_option( 'datarc_demodata_import', 'yes' ); 52 | 53 | } 54 | add_action( 'pt-ocdi/after_import', 'datarc_after_import_setup' ); 55 | 56 | //disable the branding notice after successful demo import 57 | add_filter( 'pt-ocdi/disable_pt_branding', '__return_true' ); 58 | 59 | //change the location, title and other parameters of the plugin page 60 | function datarc_import_plugin_page_setup( $default_settings ) { 61 | $default_settings['parent_slug'] = 'themes.php'; 62 | $default_settings['page_title'] = esc_html__( 'One Click Demo Import' , 'datarc-companion' ); 63 | $default_settings['menu_title'] = esc_html__( 'Import Demo Data' , 'datarc-companion' ); 64 | $default_settings['capability'] = 'import'; 65 | $default_settings['menu_slug'] = 'datarc-demo-import'; 66 | 67 | return $default_settings; 68 | } 69 | add_filter( 'pt-ocdi/plugin_page_setup', 'datarc_import_plugin_page_setup' ); 70 | 71 | // Enqueue scripts 72 | function datarc_demo_import_custom_scripts(){ 73 | 74 | 75 | if( isset( $_GET['page'] ) && $_GET['page'] == 'datarc-demo-import' ){ 76 | // style 77 | wp_enqueue_style( 'datarc-demo-import', plugins_url( 'css/demo-import.css', __FILE__ ), array(), '1.0', false ); 78 | } 79 | 80 | 81 | } 82 | add_action( 'admin_enqueue_scripts', 'datarc_demo_import_custom_scripts' ); 83 | 84 | 85 | 86 | ?> -------------------------------------------------------------------------------- /inc/sidebar-widgets/instagram-widget.php: -------------------------------------------------------------------------------- 1 | esc_html__( 'Add footer instagram widget.', 'datarc' ), ) 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 | $itemnumber = apply_filters( 'widget_itemnumber', $instance['itemnumber'] ); 37 | 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 | 44 | $api = datarc_instagram_instance(); 45 | 46 | $getitems = $api->get_items( $itemnumber, '40' ); 47 | 48 | 49 | 50 | 51 | $items = $getitems['items']; 52 | 53 | $username = $getitems['username']; 54 | 55 | 56 | if( is_array( $items ) && count( $items ) > 0 ): 57 | 58 | ?> 59 | 60 | 70 | 71 | 97 |

98 | 99 | 100 |

101 | 102 |

103 | 104 | 105 | 106 |

107 | 108 | 109 | esc_html__( 'Add footer newsletter signup form.', 'datarc' ), ) 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 | // mc validation 40 | wp_enqueue_script( 'mc-validate'); 41 | 42 | // before and after widget arguments are defined by themes 43 | echo wp_kses_post( $args['before_widget'] ); 44 | if ( ! empty( $title ) ) 45 | echo wp_kses_post( $args['before_title'] . $title . $args['after_title'] ); 46 | 47 | 48 | ?> 49 | 50 | 51 | '.esc_html( $desc ).'

'; 54 | } 55 | ?> 56 |
57 |
58 | 59 |
60 | 61 |
62 | 63 | 64 |
65 |
66 | 67 | 68 |
69 |
70 | 71 | 72 | 103 |

104 | 105 | 106 |

107 | 108 |

109 | 110 |

Enter here your MailChimp action URL. How to

111 | 112 | 113 |

114 |

115 | 116 | 117 |

118 | 119 | access_token = datarc_opt( 'datarc_igaccess_token' ); 42 | } 43 | 44 | /** 45 | * @param $screen_name string Instagram username 46 | * @param $image_limit int Number of images to retrieve 47 | * @param $image_width int Desired image width to retrieve 48 | * 49 | * @return array|bool Array of tweets or false if method fails 50 | */ 51 | public function get_items( $image_limit, $image_width ) { 52 | 53 | $transient = 'zoom_instagram_is_configured'; 54 | 55 | $response = wp_remote_get( sprintf( 'https://api.instagram.com/v1/users/self/media/recent/?access_token=%s&count=%s', $this->access_token, $image_limit ) ); 56 | 57 | 58 | if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) ) { 59 | set_transient( $transient, false, MINUTE_IN_SECONDS ); 60 | 61 | return false; 62 | } 63 | 64 | 65 | 66 | $data = json_decode( wp_remote_retrieve_body( $response ) ); 67 | 68 | $result = array(); 69 | $username = ''; 70 | 71 | foreach ( $data->data as $item ) { 72 | 73 | if(empty($username)){ 74 | $username = $item->user->username; 75 | } 76 | 77 | $result[] = array( 78 | 'link' => $item->link, 79 | 'image-url' => $item->images->{ $this->get_best_size( $image_width ) }->url, 80 | 'likes' => $item->likes->count, 81 | 'comments' => $item->comments->count, 82 | 'location' => !empty( $item->location->name ) ? $item->location->name : '' 83 | ); 84 | } 85 | 86 | $result = array('items' => $result, 'username'=> $username ); 87 | set_transient( $transient, $result, 30 * MINUTE_IN_SECONDS ); 88 | 89 | return $result; 90 | } 91 | 92 | /** 93 | * @param $screen_name string Instagram username 94 | * 95 | * @return bool|int Instagram user id or false on error 96 | */ 97 | protected function get_user_id( $screen_name ) { 98 | $user_id_option = 'zoom_instagram_uid_' . $screen_name; 99 | 100 | if ( false !== ( $user_id = get_option( $user_id_option ) ) ) { 101 | return $user_id; 102 | } 103 | 104 | $response = wp_remote_get( sprintf( 'https://api.instagram.com/v1/users/search?q=%s&access_token=%s', $screen_name, $this->access_token ) ); 105 | 106 | if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) ) { 107 | return false; 108 | } 109 | 110 | $result = json_decode( wp_remote_retrieve_body( $response ) ); 111 | 112 | if ( ! isset( $result->data ) ) { 113 | return false; 114 | } 115 | 116 | $user_id = false; 117 | 118 | foreach ( $result->data as $user ) { 119 | if ( $user->username === $screen_name ) { 120 | $user_id = $user->id; 121 | 122 | break; 123 | } 124 | } 125 | 126 | update_option( $user_id_option, $user_id ); 127 | 128 | return $user_id; 129 | } 130 | 131 | /** 132 | * @param $desired_width int Desired image width in pixels 133 | * 134 | * @return string Image size for Instagram API 135 | */ 136 | protected function get_best_size( $desired_width ) { 137 | $size = 'thumbnail'; 138 | $sizes = array( 139 | 'thumbnail' => 137, 140 | 'low_resolution' => 150, 141 | 'standard_resolution' => 640 142 | ); 143 | 144 | $diff = PHP_INT_MAX; 145 | 146 | foreach ( $sizes as $key => $value ) { 147 | if ( abs( $desired_width - $value ) < $diff ) { 148 | $size = $key; 149 | $diff = abs( $desired_width - $value ); 150 | } 151 | } 152 | 153 | return $size; 154 | } 155 | 156 | /** 157 | * Check if given access token is valid for Instagram Api. 158 | */ 159 | public static function is_access_token_valid( $access_token ) { 160 | $response = wp_remote_get( sprintf( 'https://api.instagram.com/v1/users/self/?access_token=%s', $access_token ) ); 161 | 162 | if ( is_wp_error( $response ) ) { 163 | return $response; 164 | } 165 | 166 | if ( 200 != wp_remote_retrieve_response_code( $response ) ) { 167 | return false; 168 | } 169 | 170 | return true; 171 | } 172 | 173 | public function is_configured() { 174 | $transient = 'zoom_instagram_is_configured'; 175 | 176 | if ( false !== ( $result = get_transient( $transient ) ) ) { 177 | if ( 'yes' === $result ) { 178 | return true; 179 | } 180 | 181 | if ( 'no' === $result ) { 182 | return false; 183 | } 184 | } 185 | 186 | $condition = $this->is_access_token_valid( $this->access_token ); 187 | 188 | if ( true === $condition ) { 189 | set_transient( $transient, 'yes', DAY_IN_SECONDS ); 190 | 191 | return true; 192 | } 193 | 194 | set_transient( $transient, 'no', DAY_IN_SECONDS ); 195 | 196 | return false; 197 | } 198 | 199 | public static function reset_cache() { 200 | delete_transient( 'zoom_instagram_is_configured' ); 201 | } 202 | 203 | public function get_access_token() { 204 | return $this->access_token; 205 | } 206 | 207 | public function set_access_token( $access_token ) { 208 | $this->access_token = $access_token; 209 | } 210 | } 211 | ?> -------------------------------------------------------------------------------- /inc/elementor-widgets/widgets/section-heading.php: -------------------------------------------------------------------------------- 1 | start_controls_section( 48 | 'sh_content', 49 | [ 50 | 'label' => __( 'Section Heading', 'datarc-companion' ), 51 | ] 52 | ); 53 | $this->add_control( 54 | 'sh_sectiontitle', 55 | [ 56 | 'label' => esc_html__( 'Title', 'datarc-companion' ), 57 | 'label_block' => true, 58 | 'type' => Controls_Manager::TEXT, 59 | ] 60 | ); 61 | $this->add_control( 62 | 'sh_sectionsubtitle', 63 | [ 64 | 'label' => esc_html__( 'Sub Title', 'datarc-companion' ), 65 | 'label_block' => true, 66 | 'type' => Controls_Manager::TEXT, 67 | ] 68 | ); 69 | 70 | 71 | $this->end_controls_section(); // End few words content 72 | 73 | 74 | //------------------------------ Style Section ------------------------------ 75 | $this->start_controls_section( 76 | 'style_section', [ 77 | 'label' => __( 'Style Section', 'datarc-companion' ), 78 | 'tab' => Controls_Manager::TAB_STYLE, 79 | ] 80 | ); 81 | $this->add_control( 82 | 'color_secttitle', [ 83 | 'label' => __( 'Section Title Color', 'datarc-companion' ), 84 | 'type' => Controls_Manager::COLOR, 85 | 'default' => '#333333', 86 | 'selectors' => [ 87 | '{{WRAPPER}} .product-area-title .h1' => 'color: {{VALUE}};', 88 | ], 89 | ] 90 | ); 91 | $this->add_group_control( 92 | Group_Control_Typography::get_type(), [ 93 | 'name' => 'typography_secttitle', 94 | 'selector' => '{{WRAPPER}} .product-area-title .h1', 95 | ] 96 | ); 97 | $this->add_group_control( 98 | Group_Control_Text_Shadow::get_type(), [ 99 | 'name' => 'text_shadow_secttitle', 100 | 'selector' => '{{WRAPPER}} .product-area-title .h1', 101 | ] 102 | ); 103 | 104 | $this->add_control( 105 | 'color_sectsubtitle', [ 106 | 'label' => __( 'Section Sub Title Color', 'datarc-companion' ), 107 | 'type' => Controls_Manager::COLOR, 108 | 'default' => '#777', 109 | 'selectors' => [ 110 | '{{WRAPPER}} .product-area-title p' => 'color: {{VALUE}};', 111 | ], 112 | ] 113 | ); 114 | $this->add_group_control( 115 | Group_Control_Typography::get_type(), [ 116 | 'name' => 'typography_sectsubtitle', 117 | 'selector' => '{{WRAPPER}} .product-area-title p', 118 | ] 119 | ); 120 | $this->add_group_control( 121 | Group_Control_Text_Shadow::get_type(), [ 122 | 'name' => 'text_shadow_sectsubtitle', 123 | 'selector' => '{{WRAPPER}} .product-area-title p', 124 | ] 125 | ); 126 | $this->end_controls_section(); 127 | 128 | 129 | 130 | 131 | } 132 | 133 | protected function render() { 134 | 135 | $settings = $this->get_settings(); 136 | 137 | if( !empty( $settings['sh_sectiontitle'] ) || !empty( $settings['sh_sectionsubtitle'] ) ): 138 | ?> 139 |
140 |
141 | 'text-uppercase', 147 | 'text' => esc_html( $settings['sh_sectionsubtitle'] ), 148 | ) 149 | ); 150 | } 151 | // Title 152 | if( !empty( $settings['sh_sectiontitle'] ) ){ 153 | echo datarc_heading_tag( 154 | array( 155 | 'tag' => 'h2', 156 | 'class' => 'h1', 157 | 'text' => esc_html( $settings['sh_sectiontitle'] ), 158 | ) 159 | ); 160 | } 161 | ?> 162 |
163 |
164 | ', 53 | nextArrow:'', 54 | }); 55 | 56 | $('.slick1').on('afterChange', function(event, slick, currentSlide){ 57 | for(var i=0; i', 96 | nextArrow:'', 97 | responsive: [ 98 | { 99 | breakpoint: 1200, 100 | settings: { 101 | slidesToShow: 4, 102 | slidesToScroll: 4 103 | } 104 | }, 105 | { 106 | breakpoint: 992, 107 | settings: { 108 | slidesToShow: 3, 109 | slidesToScroll: 3 110 | } 111 | }, 112 | { 113 | breakpoint: 768, 114 | settings: { 115 | slidesToShow: 2, 116 | slidesToScroll: 2 117 | } 118 | }, 119 | { 120 | breakpoint: 576, 121 | settings: { 122 | slidesToShow: 1, 123 | slidesToScroll: 1 124 | } 125 | } 126 | ] 127 | }); 128 | 129 | 130 | /*[ Slick3 ] 131 | ===========================================================*/ 132 | $('.slick3').slick({ 133 | slidesToShow: 1, 134 | slidesToScroll: 1, 135 | fade: true, 136 | dots: true, 137 | appendDots: $('.wrap-slick3-dots'), 138 | dotsClass:'slick3-dots', 139 | infinite: true, 140 | autoplay: false, 141 | autoplaySpeed: 6000, 142 | arrows: false, 143 | customPaging: function(slick, index) { 144 | var portrait = $(slick.$slides[index]).data('thumb'); 145 | return '
'; 146 | }, 147 | }); 148 | 149 | 150 | 151 | })(jQuery); -------------------------------------------------------------------------------- /inc/elementor-widgets/widgets/progress.php: -------------------------------------------------------------------------------- 1 | start_controls_section( 49 | 'progress_memcontent', 50 | [ 51 | 'label' => __( 'Progress Bar', 'datarc-companion' ), 52 | ] 53 | ); 54 | $this->add_control( 55 | 'progressbar', [ 56 | 'label' => __( 'Create Progress Bar', 'datarc-companion' ), 57 | 'type' => Controls_Manager::REPEATER, 58 | 'title_field' => '{{{ label }}}', 59 | 'fields' => [ 60 | [ 61 | 'name' => 'label', 62 | 'label' => __( 'Title', 'datarc-companion' ), 63 | 'type' => Controls_Manager::TEXT, 64 | 'label_block' => true, 65 | 'default' => 'WEB DESIGN' 66 | ], 67 | [ 68 | 'name' => 'percentage', 69 | 'label' => __( 'Percentage', 'datarc-companion' ), 70 | 'type' => Controls_Manager::TEXT, 71 | ] 72 | ], 73 | ] 74 | ); 75 | 76 | $this->end_controls_section(); // End progress bar content 77 | 78 | 79 | //------------------------------ Style progress Content ------------------------------ 80 | $this->start_controls_section( 81 | 'style_progress', [ 82 | 'label' => __( 'Style Progress Bar Info', 'datarc-companion' ), 83 | 'tab' => Controls_Manager::TAB_STYLE, 84 | ] 85 | ); 86 | $this->add_control( 87 | 'progressbar_border', 88 | [ 89 | 'label' => __( 'Progress Bar Border Color', 'datarc-companion' ), 90 | 'type' => \Elementor\Controls_Manager::HEADING, 91 | 'separator' => 'before', 92 | ] 93 | ); 94 | $this->add_control( 95 | 'color_pbborder', [ 96 | 'label' => __( 'Border Color', 'datarc-companion' ), 97 | 'type' => Controls_Manager::COLOR, 98 | 'selectors' => [ 99 | '{{WRAPPER}} .progressBar-background' => 'stroke: {{VALUE}};', 100 | ], 101 | ] 102 | ); 103 | // 104 | $this->add_control( 105 | 'progressbar_pbactborder', 106 | [ 107 | 'label' => __( 'Progress Bar Active Border Color', 'datarc-companion' ), 108 | 'type' => \Elementor\Controls_Manager::HEADING, 109 | 'separator' => 'before', 110 | ] 111 | ); 112 | 113 | $this->add_control( 114 | 'color_activeborder', [ 115 | 'label' => __( 'Active Border Color', 'datarc-companion' ), 116 | 'type' => Controls_Manager::COLOR, 117 | 'selectors' => [ 118 | '{{WRAPPER}} .progressBar-circle' => 'stroke: {{VALUE}};', 119 | ], 120 | ] 121 | ); 122 | // 123 | $this->add_control( 124 | 'progressbar_percentage', 125 | [ 126 | 'label' => __( 'Percentage Style', 'datarc-companion' ), 127 | 'type' => \Elementor\Controls_Manager::HEADING, 128 | 'separator' => 'before', 129 | ] 130 | ); 131 | $this->add_control( 132 | 'color_percentage', [ 133 | 'label' => __( 'Percentage Color', 'datarc-companion' ), 134 | 'type' => Controls_Manager::COLOR, 135 | 'selectors' => [ 136 | '{{WRAPPER}} .progressBar-percentage' => 'color: {{VALUE}};', 137 | ], 138 | ] 139 | ); 140 | 141 | // 142 | $this->add_control( 143 | 'progressbar_title', 144 | [ 145 | 'label' => __( 'Title Style', 'datarc-companion' ), 146 | 'type' => \Elementor\Controls_Manager::HEADING, 147 | 'separator' => 'before', 148 | ] 149 | ); 150 | $this->add_control( 151 | 'color_title', [ 152 | 'label' => __( 'Title Color', 'datarc-companion' ), 153 | 'type' => Controls_Manager::COLOR, 154 | 'selectors' => [ 155 | '{{WRAPPER}} .list p' => 'color: {{VALUE}};', 156 | ], 157 | ] 158 | ); 159 | 160 | $this->end_controls_section(); 161 | 162 | 163 | } 164 | 165 | protected function render() { 166 | 167 | $settings = $this->get_settings(); 168 | 169 | ?> 170 | 171 |
172 |
173 | 174 | 0 ): 176 | foreach( $settings['progressbar'] as $progressbar ): 177 | 178 | ?> 179 |
180 |
181 |
182 |
183 | 184 | 185 | 186 | 187 | 188 |
189 |
190 | esc_html( $progressbar['label'] ), 195 | 'class' => 'text-uppercase' 196 | ) 197 | ); 198 | } 199 | ?> 200 |
201 |
202 | 206 | 207 |
208 |
209 | 210 | 26 |
27 | 'post', 30 | 'posts_per_page' => esc_html( $postnumber ), 31 | ); 32 | 33 | $query = new WP_Query( $args ); 34 | 35 | if( $query->have_posts() ): 36 | while( $query->have_posts() ): 37 | $query->the_post(); 38 | ?> 39 |
40 | 41 |
42 | 'img-fluid' ) ); 44 | ?> 45 |
46 |
47 | 48 | 49 | 50 |
51 |
52 |
53 |
54 | 55 | 56 |
57 |
58 | 63 |
64 | 71 |
72 |
73 |
74 | 'text-uppercase', 80 | 'text' => esc_html( $subtitle ), 81 | ) 82 | ); 83 | } 84 | // Title 85 | if( $title ){ 86 | echo datarc_heading_tag( 87 | array( 88 | 'tag' => 'h2', 89 | 'class' => 'h1', 90 | 'text' => esc_html( $title ), 91 | ) 92 | ); 93 | } 94 | ?> 95 |
96 |
97 |
98 | 108 |
109 | [text* datarc-name placeholder "Full Name"] 110 |
111 |
112 | [email* datarc-email placeholder "Email Address"] 113 |
114 |
115 | [text* datarc-subject placeholder "Subject"] 116 |
117 | 118 |
119 | [textarea datarc-message placeholder "Type your message here..."] 120 |
121 |
122 |
123 | '; 124 | 125 | return $template; 126 | 127 | } else { 128 | return $template; 129 | } 130 | } 131 | add_filter( 'wpcf7_default_template', 'datarc_contact7_form_content', 10, 2 ); 132 | 133 | // Enqueue scripts 134 | add_action( 'wp_enqueue_scripts', 'datarc_companion_frontend_scripts', 99 ); 135 | function datarc_companion_frontend_scripts() { 136 | 137 | wp_enqueue_script( 'datarc-loadmore-script', plugins_url( '../js/loadmore-ajax.js', __FILE__ ), array( 'jquery' ), '1.0', true ); 138 | 139 | } 140 | 141 | // 142 | add_action( 'wp_ajax_datarc_portfolio_ajax', 'datarc_portfolio_ajax' ); 143 | add_action( 'wp_ajax_nopriv_datarc_portfolio_ajax', 'datarc_portfolio_ajax' ); 144 | 145 | function datarc_portfolio_ajax( ){ 146 | 147 | ob_start(); 148 | 149 | if( !empty( $_POST['elsettings'] ) ): 150 | 151 | 152 | $items = array_slice( $_POST['elsettings'], $_POST['postNumber'] ); 153 | 154 | $i = 0; 155 | 156 | foreach( $items as $val ): 157 | 158 | $tagclass = sanitize_title_with_dashes( $val['label'] ); 159 | $i++; 160 | 161 | $imgUrl = !empty( $val['img']['url'] ) ? $val['img']['url'] : ''; 162 | ?> 163 |
164 |
165 | esc_html( $val['sub-title'] ) 171 | ) 172 | ); 173 | } 174 | ?> 175 |
176 | 'h5', 181 | 'class' => 'text-uppercase', 182 | 'text' => esc_html( $val['title'] ) 183 | ) 184 | ); 185 | } 186 | ?> 187 |
188 |
189 | 190 | -------------------------------------------------------------------------------- /inc/elementor-widgets/widgets/testimonial.php: -------------------------------------------------------------------------------- 1 | start_controls_section( 49 | 'testimonial_content', 50 | [ 51 | 'label' => __( 'Testimonial content', 'datarc-companion' ), 52 | ] 53 | ); 54 | $this->add_control( 55 | 'datarctestimonial', [ 56 | 'label' => __( 'Create Quote', 'datarc-companion' ), 57 | 'type' => Controls_Manager::REPEATER, 58 | 'title_field' => '{{{ label }}}', 59 | 'fields' => [ 60 | [ 61 | 'name' => 'label', 62 | 'label' => __( 'Quote Author Name', 'datarc-companion' ), 63 | 'label_block' => true, 64 | 'type' => Controls_Manager::TEXT, 65 | 'default' => esc_html__( 'Jim Morison', 'datarc-companion' ) 66 | ], 67 | [ 68 | 'name' => 'designation', 69 | 'label' => __( 'Author Designation', 'datarc-companion' ), 70 | 'type' => Controls_Manager::TEXT, 71 | 'default' => esc_html__( 'Company CEO', 'datarc-companion' ) 72 | ], 73 | [ 74 | 'name' => 'quotetext', 75 | 'label' => __( 'Quote Text', 'datarc-companion' ), 76 | 'type' => Controls_Manager::TEXTAREA, 77 | 'default' => esc_html__( 'Etiam nec odio vestibulum est mattis effic iturut magna. Pellentesque sit am et tellus blandit. Etiam nec odio vestibul. Etiam nec odio vestibulum est mat tis effic iturut magna. Pellentesque sit amet tellus blandit.', 'datarc-companion' ) 78 | ], 79 | [ 80 | 'name' => 'img', 81 | 'label' => __( 'Quote Author image', 'datarc-companion' ), 82 | 'type' => Controls_Manager::MEDIA, 83 | ] 84 | 85 | ], 86 | ] 87 | ); 88 | $this->end_controls_section(); // End testimonial content 89 | 90 | //------------------------------ Style Content ------------------------------ 91 | $this->start_controls_section( 92 | 'style_content', [ 93 | 'label' => __( 'Content Color', 'datarc-companion' ), 94 | 'tab' => Controls_Manager::TAB_STYLE, 95 | ] 96 | ); 97 | $this->add_control( 98 | 'color_boxbg', [ 99 | 'label' => __( 'Box background color.', 'datarc-companion' ), 100 | 'type' => Controls_Manager::COLOR, 101 | 'selectors' => [ 102 | '{{WRAPPER}} .single-testimonial' => 'background-color: {{VALUE}};', 103 | ], 104 | ] 105 | ); 106 | $this->add_control( 107 | 'color_authname', [ 108 | 'label' => __( 'Color for author name.', 'datarc-companion' ), 109 | 'type' => Controls_Manager::COLOR, 110 | 'selectors' => [ 111 | '{{WRAPPER}} .single-testimonial .author h6' => 'color: {{VALUE}};', 112 | ], 113 | ] 114 | ); 115 | 116 | $this->add_control( 117 | 'color_authdesignation', [ 118 | 'label' => __( 'Color for designation.', 'datarc-companion' ), 119 | 'type' => Controls_Manager::COLOR, 120 | 'selectors' => [ 121 | '{{WRAPPER}} .single-testimonial .author span' => 'color: {{VALUE}};', 122 | ], 123 | ] 124 | ); 125 | 126 | $this->add_control( 127 | 'color_authcontent', [ 128 | 'label' => __( 'Color for content.', 'datarc-companion' ), 129 | 'type' => Controls_Manager::COLOR, 130 | 'selectors' => [ 131 | '{{WRAPPER}} .single-testimonial p' => 'color: {{VALUE}};', 132 | ], 133 | ] 134 | ); 135 | 136 | 137 | $this->end_controls_section(); 138 | 139 | 140 | } 141 | 142 | protected function render() { 143 | 144 | $settings = $this->get_settings(); 145 | 146 | ?> 147 | 148 |
149 |
150 | 209 |
210 |
211 | 212 | start_controls_section( 49 | 'blog_content', 50 | [ 51 | 'label' => __( 'Blgo', 'datarc-companion' ), 52 | ] 53 | ); 54 | $this->add_control( 55 | 'blog_sectiontitle', 56 | [ 57 | 'label' => esc_html__( 'Section Title', 'datarc-companion' ), 58 | 'label_block' => true, 59 | 'type' => Controls_Manager::TEXT, 60 | ] 61 | ); 62 | $this->add_control( 63 | 'blog_sectionsubtitle', 64 | [ 65 | 'label' => esc_html__( 'Section Sub Title', 'datarc-companion' ), 66 | 'label_block' => true, 67 | 'type' => Controls_Manager::TEXT, 68 | ] 69 | ); 70 | $this->add_control( 71 | 'blog_limit', 72 | [ 73 | 'label' => esc_html__( 'Post Limit', 'datarc-companion' ), 74 | 'type' => Controls_Manager::TEXT, 75 | 'default' => 3 76 | ] 77 | ); 78 | 79 | $this->end_controls_section(); // End few words content 80 | 81 | //------------------------------ Style text ------------------------------ 82 | $this->start_controls_section( 83 | 'style_color', [ 84 | 'label' => __( 'Style Text Color', 'datarc-companion' ), 85 | 'tab' => Controls_Manager::TAB_STYLE, 86 | ] 87 | ); 88 | $this->add_control( 89 | 'color_blogtitle', [ 90 | 'label' => __( 'Blog Title Color', 'datarc-companion' ), 91 | 'type' => Controls_Manager::COLOR, 92 | 'default' => '#222', 93 | 'selectors' => [ 94 | '{{WRAPPER}} .single-publish .top h6 a' => 'color: {{VALUE}};', 95 | ], 96 | ] 97 | ); 98 | $this->add_control( 99 | 'color_blogtitlehov', [ 100 | 'label' => __( 'Blog Title Hover Color', 'datarc-companion' ), 101 | 'type' => Controls_Manager::COLOR, 102 | 'default' => '#222', 103 | 'selectors' => [ 104 | '{{WRAPPER}} .single-publish .top h6 a:hover' => 'color: {{VALUE}};', 105 | ], 106 | ] 107 | ); 108 | $this->add_control( 109 | 'color_blogtext', [ 110 | 'label' => __( 'Blog Text Color', 'datarc-companion' ), 111 | 'type' => Controls_Manager::COLOR, 112 | 'default' => '#777', 113 | 'selectors' => [ 114 | '{{WRAPPER}} .single-publish p' => 'color: {{VALUE}};', 115 | '{{WRAPPER}} .single-publish .top a' => 'color: {{VALUE}};', 116 | '{{WRAPPER}} .single-publish .top .line' => 'color: {{VALUE}};', 117 | '{{WRAPPER}} .single-publish .details-btn .lnr-arrow-right' => 'color: {{VALUE}};', 118 | ], 119 | ] 120 | ); 121 | 122 | $this->end_controls_section(); 123 | 124 | //------------------------------ Style Section ------------------------------ 125 | $this->start_controls_section( 126 | 'style_section', [ 127 | 'label' => __( 'Style Section', 'datarc-companion' ), 128 | 'tab' => Controls_Manager::TAB_STYLE, 129 | ] 130 | ); 131 | $this->add_control( 132 | 'color_secttitle', [ 133 | 'label' => __( 'Section Title Color', 'datarc-companion' ), 134 | 'type' => Controls_Manager::COLOR, 135 | 'default' => '#333333', 136 | 'selectors' => [ 137 | '{{WRAPPER}} .product-area-title .h1' => 'color: {{VALUE}};', 138 | ], 139 | ] 140 | ); 141 | $this->add_group_control( 142 | Group_Control_Typography::get_type(), [ 143 | 'name' => 'typography_secttitle', 144 | 'selector' => '{{WRAPPER}} .product-area-title .h1', 145 | ] 146 | ); 147 | $this->add_group_control( 148 | Group_Control_Text_Shadow::get_type(), [ 149 | 'name' => 'text_shadow_secttitle', 150 | 'selector' => '{{WRAPPER}} .product-area-title .h1', 151 | ] 152 | ); 153 | 154 | $this->add_control( 155 | 'color_sectsubtitle', [ 156 | 'label' => __( 'Section Sub Title Color', 'datarc-companion' ), 157 | 'type' => Controls_Manager::COLOR, 158 | 'default' => '#777', 159 | 'selectors' => [ 160 | '{{WRAPPER}} .product-area-title p' => 'color: {{VALUE}};', 161 | ], 162 | ] 163 | ); 164 | $this->add_group_control( 165 | Group_Control_Typography::get_type(), [ 166 | 'name' => 'typography_sectsubtitle', 167 | 'selector' => '{{WRAPPER}} .product-area-title p', 168 | ] 169 | ); 170 | $this->add_group_control( 171 | Group_Control_Text_Shadow::get_type(), [ 172 | 'name' => 'text_shadow_sectsubtitle', 173 | 'selector' => '{{WRAPPER}} .product-area-title p', 174 | ] 175 | ); 176 | $this->end_controls_section(); 177 | 178 | //------------------------------ Style Button ------------------------------ 179 | $this->start_controls_section( 180 | 'style_btn', [ 181 | 'label' => __( 'Style Button', 'datarc-companion' ), 182 | 'tab' => Controls_Manager::TAB_STYLE, 183 | ] 184 | ); 185 | $this->add_control( 186 | 'color_btntextcolor', [ 187 | 'label' => __( 'Button Text Color', 'datarc-companion' ), 188 | 'type' => Controls_Manager::COLOR, 189 | 'default' => '#fff', 190 | 'selectors' => [ 191 | '{{WRAPPER}} .details-btn:hover span' => 'color: {{VALUE}};', 192 | ], 193 | ] 194 | ); 195 | $this->add_control( 196 | 'color_btnborder', [ 197 | 'label' => __( 'Button Border Color', 'datarc-companion' ), 198 | 'type' => Controls_Manager::COLOR, 199 | 'default' => '#00ff8c', 200 | 'selectors' => [ 201 | '{{WRAPPER}} .single-publish .details-btn' => 'border-color: {{VALUE}};', 202 | ], 203 | ] 204 | ); 205 | $this->add_control( 206 | 'color_btnbg', [ 207 | 'label' => __( 'Button Background Color', 'datarc-companion' ), 208 | 'type' => Controls_Manager::COLOR, 209 | 'default' => '#00ff8c', 210 | 'selectors' => [ 211 | '{{WRAPPER}} .details-btn:hover' => 'background-color: {{VALUE}};', 212 | ], 213 | ] 214 | ); 215 | 216 | 217 | $this->end_controls_section(); 218 | 219 | 220 | } 221 | 222 | protected function render() { 223 | 224 | $settings = $this->get_settings(); 225 | 226 | ?> 227 |
228 |
229 | 236 |
237 |
238 | 239 | start_controls_section( 49 | 'cta_content', 50 | [ 51 | 'label' => __( 'Call to action content', 'datarc-companion' ), 52 | ] 53 | ); 54 | $this->add_control( 55 | 'title', 56 | [ 57 | 'label' => esc_html__( 'Title', 'datarc-companion' ), 58 | 'type' => Controls_Manager::TEXT, 59 | 'label_block' => true, 60 | 'default' => esc_html__( 'Are you Ready to have a Talk?', 'datarc-companion' ) 61 | ] 62 | ); 63 | $this->end_controls_section(); // End service content 64 | 65 | // ---------------------------------------- Button ------------------------------ 66 | $this->start_controls_section( 67 | 'ctc_btn', 68 | [ 69 | 'label' => __( 'Button', 'datarc-companion' ), 70 | ] 71 | ); 72 | $this->add_control( 73 | 'btnlabel', [ 74 | 'label' => __( 'Button Label', 'datarc-companion' ), 75 | 'type' => Controls_Manager::TEXT, 76 | ] 77 | ); 78 | $this->add_control( 79 | 'btnurl', [ 80 | 'label' => __( 'Button Url', 'datarc-companion' ), 81 | 'type' => Controls_Manager::URL, 82 | ] 83 | ); 84 | $this->end_controls_section(); // End button content 85 | 86 | 87 | 88 | //------------------------------ Style title ------------------------------ 89 | $this->start_controls_section( 90 | 'style_title', [ 91 | 'label' => __( 'Style Title', 'datarc-companion' ), 92 | 'tab' => Controls_Manager::TAB_STYLE, 93 | ] 94 | ); 95 | $this->add_control( 96 | 'color_title', [ 97 | 'label' => __( 'Title Color', 'datarc-companion' ), 98 | 'type' => Controls_Manager::COLOR, 99 | 'default' => '#fff', 100 | 'selectors' => [ 101 | '{{WRAPPER}} .cta-area h5' => 'color: {{VALUE}};', 102 | ], 103 | ] 104 | ); 105 | $this->add_group_control( 106 | Group_Control_Typography::get_type(), [ 107 | 'name' => 'typography_title', 108 | 'selector' => '{{WRAPPER}} .cta-area h5', 109 | ] 110 | ); 111 | $this->add_group_control( 112 | Group_Control_Text_Shadow::get_type(), [ 113 | 'name' => 'text_shadow_title', 114 | 'selector' => '{{WRAPPER}} .cta-area h5', 115 | ] 116 | ); 117 | $this->end_controls_section(); 118 | 119 | //------------------------------ Style Button ------------------------------ 120 | $this->start_controls_section( 121 | 'style_btn', [ 122 | 'label' => __( 'Style Button', 'datarc-companion' ), 123 | 'tab' => Controls_Manager::TAB_STYLE, 124 | ] 125 | ); 126 | $this->add_control( 127 | 'color_btntext', [ 128 | 'label' => __( 'Button Text Color', 'datarc-companion' ), 129 | 'type' => Controls_Manager::COLOR, 130 | 'default' => '#fff', 131 | 'selectors' => [ 132 | '{{WRAPPER}} .cta-area .primary-btn' => 'color: {{VALUE}};', 133 | ], 134 | ] 135 | ); 136 | $this->add_control( 137 | 'color_btnhovtext', [ 138 | 'label' => __( 'Button Hover Text Color', 'datarc-companion' ), 139 | 'type' => Controls_Manager::COLOR, 140 | 'default' => '#fff', 141 | 'selectors' => [ 142 | '{{WRAPPER}} .cta-area .primary-btn:hover' => 'color: {{VALUE}};', 143 | ], 144 | ] 145 | ); 146 | $this->add_control( 147 | 'color_btnbg', [ 148 | 'label' => __( 'Button background Color', 'datarc-companion' ), 149 | 'type' => Controls_Manager::COLOR, 150 | 'selectors' => [ 151 | '{{WRAPPER}} .cta-area .primary-btn' => 'background-color: {{VALUE}};', 152 | ], 153 | ] 154 | ); 155 | $this->add_control( 156 | 'color_btnhovbg', [ 157 | 'label' => __( 'Button Hover background Color', 'datarc-companion' ), 158 | 'type' => Controls_Manager::COLOR, 159 | 'selectors' => [ 160 | '{{WRAPPER}} .cta-area .primary-btn:hover' => 'background-color: {{VALUE}};', 161 | ], 162 | ] 163 | ); 164 | $this->add_control( 165 | 'color_btnbord', [ 166 | 'label' => __( 'Button border Color', 'datarc-companion' ), 167 | 'type' => Controls_Manager::COLOR, 168 | 'selectors' => [ 169 | '{{WRAPPER}} .cta-area .primary-btn' => 'border-color: {{VALUE}};', 170 | ], 171 | ] 172 | ); 173 | $this->add_control( 174 | 'color_btnhovbord', [ 175 | 'label' => __( 'Button Hover border Color', 'datarc-companion' ), 176 | 'type' => Controls_Manager::COLOR, 177 | 'selectors' => [ 178 | '{{WRAPPER}} .cta-area .primary-btn:hover' => 'border-color: {{VALUE}};', 179 | ], 180 | ] 181 | ); 182 | $this->add_group_control( 183 | Group_Control_Typography::get_type(), [ 184 | 'name' => 'typography_btn', 185 | 'selector' => '{{WRAPPER}} .cta-area .primary-btn', 186 | ] 187 | ); 188 | 189 | $this->end_controls_section(); 190 | 191 | } 192 | 193 | protected function render() { 194 | 195 | $settings = $this->get_settings(); 196 | 197 | // Overlay 198 | $overlay = ''; 199 | if( !empty( $settings['cta_bgoverlay'] ) ){ 200 | $overlay = 'bg-overlay'; 201 | } 202 | // Background Image 203 | $bgUrl = ''; 204 | if( !empty( $settings['cta_bg_image']['url'] ) ){ 205 | $bgUrl = $settings['cta_bg_image']['url']; 206 | } 207 | 208 | // Background style 209 | $bgstyle = ''; 210 | if( !empty( $settings['style_bg'] ) && 'style_01' != $settings['style_bg'] ){ 211 | $bgstyle = ' bg-fixed'; 212 | } 213 | 214 | ?> 215 | 216 |
> 217 |
218 |
219 |
220 | 'h5', 226 | 'class' => 'text-uppercase', 227 | 'text' => esc_html( $settings['title'] ) 228 | ) 229 | ); 230 | } 231 | // Button 232 | if( !empty( $settings['btnlabel'] ) && !empty( $settings['btnurl']['url'] ) ){ 233 | $target = ''; 234 | if( !empty( $settings['btnurl']['is_external'] ) ){ 235 | $target = '_blank'; 236 | } 237 | echo datarc_anchor_tag( 238 | array( 239 | 'url' => esc_url( $settings['btnurl']['url'] ), 240 | 'text' => esc_html( $settings['btnlabel'] ).'', 241 | 'class' => 'primary-btn d-inline-flex text-uppercase align-items-center', 242 | 'target' => esc_attr( $target ), 243 | ) 244 | ); 245 | } 246 | ?> 247 |
248 |
249 |
250 |
251 | 252 | start_controls_section( 50 | 'aboutus_heading', 51 | [ 52 | 'label' => __( 'Section Heading', 'datarc-companion' ), 53 | ] 54 | ); 55 | $this->add_control( 56 | 'aboutus_headingsubtile', 57 | [ 58 | 'label' => esc_html__( 'Sub Title', 'datarc-companion' ), 59 | 'type' => Controls_Manager::TEXT, 60 | 'default' => 'ABOUT OUR DIGITAL AGENCY', 61 | 'label_block' => true 62 | ] 63 | ); 64 | $this->add_control( 65 | 'aboutus_headingshortdesc', 66 | [ 67 | 'label' => esc_html__( 'Short Description', 'datarc-companion' ), 68 | 'type' => Controls_Manager::WYSIWYG, 69 | 'default' => 'Write something' 70 | ] 71 | ); 72 | $this->end_controls_section(); // End title 73 | 74 | // ---------------------------------------- About content ------------------------------ 75 | $this->start_controls_section( 76 | 'about_content', 77 | [ 78 | 'label' => __( 'About Content', 'datarc-companion' ), 79 | ] 80 | ); 81 | $this->add_control( 82 | 'aboutus', [ 83 | 'label' => __( 'Create About Content', 'datarc-companion' ), 84 | 'type' => Controls_Manager::REPEATER, 85 | 'title_field' => '{{{ label }}}', 86 | 'fields' => [ 87 | [ 88 | 'name' => 'label', 89 | 'label' => __( 'Title', 'datarc-companion' ), 90 | 'type' => Controls_Manager::TEXT, 91 | 'label_block' => true, 92 | 'default' => 'ADDICTION WHIT GAMBLING' 93 | ], 94 | [ 95 | 'name' => 'iconimg', 96 | 'label' => __( 'Image Icon', 'datarc-companion' ), 97 | 'type' => Controls_Manager::MEDIA, 98 | ], 99 | [ 100 | 'name' => 'desc', 101 | 'label' => __( 'Descriptions', 'datarc-companion' ), 102 | 'type' => Controls_Manager::TEXTAREA, 103 | ], 104 | [ 105 | 'name' => 'btnurl', 106 | 'label' => __( 'Button Url', 'datarc-companion' ), 107 | 'type' => Controls_Manager::TEXT, 108 | ] 109 | ], 110 | ] 111 | ); 112 | 113 | $this->end_controls_section(); // End content 114 | 115 | /** 116 | * Style Tab 117 | * ------------------------------ Style ------------------------------ 118 | * 119 | */ 120 | $this->start_controls_section( 121 | 'stylecolor', [ 122 | 'label' => __( 'Style Color', 'datarc-companion' ), 123 | 'tab' => Controls_Manager::TAB_STYLE, 124 | ] 125 | ); 126 | $this->add_control( 127 | 'color_title', [ 128 | 'label' => __( 'Title Color', 'datarc-companion' ), 129 | 'type' => Controls_Manager::COLOR, 130 | 'default' => '#777', 131 | 'selectors' => [ 132 | '{{WRAPPER}} .section-title h3' => 'color: {{VALUE}};', 133 | ], 134 | ] 135 | ); 136 | $this->add_control( 137 | 'color_titlebold', [ 138 | 'label' => __( 'Bold Title Color', 'datarc-companion' ), 139 | 'type' => Controls_Manager::COLOR, 140 | 'default' => '#222', 141 | 'selectors' => [ 142 | '{{WRAPPER}} .section-title h3 b' => 'color: {{VALUE}};', 143 | ], 144 | ] 145 | ); 146 | $this->add_control( 147 | 'color_content', [ 148 | 'label' => __( 'Sub Title Color', 'datarc-companion' ), 149 | 'type' => Controls_Manager::COLOR, 150 | 'default' => '#777', 151 | 'selectors' => [ 152 | '{{WRAPPER}} .section-title p' => 'color: {{VALUE}};', 153 | ], 154 | ] 155 | ); 156 | 157 | 158 | $this->end_controls_section(); 159 | 160 | 161 | } 162 | 163 | protected function render() { 164 | 165 | $settings = $this->get_settings(); 166 | 167 | ?> 168 | 169 | 170 |
171 |
172 | 175 |
176 |
177 |
178 | esc_html( $settings['aboutus_headingsubtile'] ), 183 | 'class' => 'text-uppercase' 184 | ) 185 | ); 186 | } 187 | // 188 | if( !empty( $settings['aboutus_headingshortdesc'] ) ){ 189 | echo datarc_get_textareahtml_output( $settings['aboutus_headingshortdesc'] ); 190 | } 191 | ?> 192 |
193 |
194 |
195 | 198 |
199 | 0 ): 201 | foreach( $settings['aboutus'] as $abcontent ): 202 | ?> 203 |
204 |
205 | '; 208 | if( !empty( $abcontent['iconimg']['url'] ) ){ 209 | echo datarc_img_tag( 210 | array( 211 | 'url' => esc_url( $abcontent['iconimg']['url'] ), 212 | 'class' => 'img-fluid' 213 | ) 214 | ); 215 | } 216 | echo '
'; 217 | } 218 | ?> 219 |
220 | 'h5', 226 | 'class' => 'text-uppercase', 227 | 'text' => esc_html( $abcontent['label'] ) 228 | ) 229 | ); 230 | } 231 | // Description 232 | if( !empty( $abcontent['desc'] ) ){ 233 | echo datarc_paragraph_tag( 234 | array( 235 | 'text' => esc_html( $abcontent['desc'] ) 236 | ) 237 | ); 238 | } 239 | // 240 | if( !empty( $abcontent['btnurl'] ) ){ 241 | echo ''.esc_html__( 'Explore', 'datarc-companion' ).''; 242 | } 243 | ?> 244 |
245 | 246 |
247 | 251 |
252 | 253 |
254 | start_controls_section( 50 | 'banner_content', 51 | [ 52 | 'label' => __( 'Banner Section Content', 'datarc-companion' ), 53 | ] 54 | ); 55 | $this->add_control( 56 | 'banner_titleone', 57 | [ 58 | 'label' => esc_html__( 'Title #1', 'datarc-companion' ), 59 | 'type' => Controls_Manager::TEXT, 60 | 'label_block' => true 61 | ] 62 | ); 63 | $this->add_control( 64 | 'banner_titletwo', 65 | [ 66 | 'label' => esc_html__( 'Title #2', 'datarc-companion' ), 67 | 'type' => Controls_Manager::TEXT, 68 | 'label_block' => true 69 | ] 70 | ); 71 | $this->add_control( 72 | 'banner_btnlabel', 73 | [ 74 | 'label' => esc_html__( 'Button Label', 'datarc-companion' ), 75 | 'type' => Controls_Manager::TEXT, 76 | 'label_block' => true, 77 | 'default' => esc_html__( 'Explore Us', 'datarc-companion' ) 78 | ] 79 | ); 80 | $this->add_control( 81 | 'banner_btnurl', 82 | [ 83 | 'label' => esc_html__( 'Button Url', 'datarc-companion' ), 84 | 'type' => Controls_Manager::URL, 85 | 'show_external' => false 86 | ] 87 | ); 88 | 89 | $this->end_controls_section(); // End content 90 | 91 | 92 | //------------------------------ Style title ------------------------------ 93 | $this->start_controls_section( 94 | 'style_textcolor', [ 95 | 'label' => __( 'Style Content', 'datarc-companion' ), 96 | 'tab' => Controls_Manager::TAB_STYLE, 97 | ] 98 | ); 99 | $this->add_control( 100 | 'color_titleone', [ 101 | 'label' => __( 'Title #1 Color', 'datarc-companion' ), 102 | 'type' => Controls_Manager::COLOR, 103 | 'default' => '#fff', 104 | 'selectors' => [ 105 | '{{WRAPPER}} .banner-content p' => 'color: {{VALUE}};', 106 | ], 107 | ] 108 | ); 109 | $this->add_group_control( 110 | Group_Control_Typography::get_type(), [ 111 | 'name' => 'typography_titleone', 112 | 'scheme' => Scheme_Typography::TYPOGRAPHY_1, 113 | 'selector' => '{{WRAPPER}} .banner-content p', 114 | ] 115 | ); 116 | $this->add_control( 117 | 'color_titletwo', [ 118 | 'label' => __( 'Title #2 Color', 'datarc-companion' ), 119 | 'type' => Controls_Manager::COLOR, 120 | 'default' => '#fff', 121 | 'selectors' => [ 122 | '{{WRAPPER}} .banner-content h1' => 'color: {{VALUE}};', 123 | ], 124 | ] 125 | ); 126 | $this->add_group_control( 127 | Group_Control_Typography::get_type(), [ 128 | 'name' => 'typography_titletwo', 129 | 'scheme' => Scheme_Typography::TYPOGRAPHY_1, 130 | 'selector' => '{{WRAPPER}} .banner-content h1', 131 | ] 132 | ); 133 | $this->add_group_control( 134 | Group_Control_Background::get_type(), 135 | [ 136 | 'name' => 'banneroverlay', 137 | 'label' => __( 'Overlay Background', 'datarc-companion' ), 138 | 'separator' => 'before', 139 | 'description' => esc_html__( 'Set banner overlay background color.', 'datarc-companion' ), 140 | 'types' => [ 'gradient' ], 141 | 'selector' => '{{WRAPPER}} .banner-area .overlay-bg', 142 | ] 143 | ); 144 | $this->end_controls_section(); 145 | 146 | //------------------------------ Style button ------------------------------ 147 | $this->start_controls_section( 148 | 'style_btn', [ 149 | 'label' => __( 'Style Button', 'datarc-companion' ), 150 | 'tab' => Controls_Manager::TAB_STYLE, 151 | ] 152 | ); 153 | $this->add_control( 154 | 'color_btnlabel', [ 155 | 'label' => __( 'Button Label Color', 'datarc-companion' ), 156 | 'type' => Controls_Manager::COLOR, 157 | 'default' => '#fff', 158 | 'selectors' => [ 159 | '{{WRAPPER}} .primary-btn.banner-btn' => 'color: {{VALUE}};', 160 | ], 161 | ] 162 | ); 163 | $this->add_control( 164 | 'color_btnhoverlabel', [ 165 | 'label' => __( 'Button Hover Label Color', 'datarc-companion' ), 166 | 'type' => Controls_Manager::COLOR, 167 | 'default' => '#fff', 168 | 'selectors' => [ 169 | '{{WRAPPER}} .primary-btn.banner-btn:hover' => 'color: {{VALUE}};', 170 | ], 171 | ] 172 | ); 173 | $this->add_control( 174 | 'color_btnborder', [ 175 | 'label' => __( 'Button Border Color', 'datarc-companion' ), 176 | 'type' => Controls_Manager::COLOR, 177 | 'default' => '#00ff8c', 178 | 'selectors' => [ 179 | '{{WRAPPER}} .primary-btn.banner-btn' => 'border-color: {{VALUE}};', 180 | ], 181 | ] 182 | ); 183 | $this->add_control( 184 | 'color_btnhovborder', [ 185 | 'label' => __( 'Button Hover Border Color', 'datarc-companion' ), 186 | 'type' => Controls_Manager::COLOR, 187 | 'default' => '#00ff8c', 188 | 'selectors' => [ 189 | '{{WRAPPER}} .primary-btn.banner-btn:hover' => 'border-color: {{VALUE}};', 190 | ], 191 | ] 192 | ); 193 | $this->add_control( 194 | 'color_btnbg', [ 195 | 'label' => __( 'Button Background Color', 'datarc-companion' ), 196 | 'type' => Controls_Manager::COLOR, 197 | 'default' => '', 198 | 'selectors' => [ 199 | '{{WRAPPER}} .primary-btn.banner-btn' => 'background-color: {{VALUE}};', 200 | ], 201 | ] 202 | ); 203 | $this->add_control( 204 | 'color_btnhovbg', [ 205 | 'label' => __( 'Button Hover Background Color', 'datarc-companion' ), 206 | 'type' => Controls_Manager::COLOR, 207 | 'default' => '#00ff8c', 208 | 'selectors' => [ 209 | '{{WRAPPER}} .primary-btn.banner-btn:hover' => 'background-color: {{VALUE}};', 210 | ], 211 | ] 212 | ); 213 | 214 | 215 | $this->end_controls_section(); 216 | 217 | 218 | } 219 | 220 | protected function render() { 221 | 222 | $settings = $this->get_settings(); 223 | 224 | ?> 225 | 266 | 267 | start_controls_section( 49 | 'contact_sectheading', 50 | [ 51 | 'label' => __( 'Section Heading', 'datarc-companion' ), 52 | ] 53 | ); 54 | $this->add_control( 55 | 'contact_sectiontitle', 56 | [ 57 | 'label' => esc_html__( 'Section Title', 'datarc-companion' ), 58 | 'label_block' => true, 59 | 'type' => Controls_Manager::TEXT, 60 | ] 61 | ); 62 | $this->add_control( 63 | 'contact_sectionsubtitle', 64 | [ 65 | 'label' => esc_html__( 'Section Sub Title', 'datarc-companion' ), 66 | 'label_block' => true, 67 | 'type' => Controls_Manager::TEXT, 68 | ] 69 | ); 70 | 71 | $this->end_controls_section(); // End Contact Section Heading 72 | 73 | // ---------------------------------------- Contact Info ------------------------------ 74 | 75 | $this->start_controls_section( 76 | 'contact_info', 77 | [ 78 | 'label' => __( 'Contact Info', 'datarc-companion' ), 79 | ] 80 | ); 81 | $this->add_control( 82 | 'contact_shortinfo', 83 | [ 84 | 'label' => esc_html__( 'Short Info', 'datarc-companion' ), 85 | 'type' => Controls_Manager::WYSIWYG, 86 | ] 87 | ); 88 | $this->add_control( 89 | 'contact_addressonetitle_sepa', 90 | [ 91 | 'label' => __( 'Address Box #1 Info', 'datarc-companion' ), 92 | 'type' => \Elementor\Controls_Manager::HEADING, 93 | 'separator' => 'before', 94 | ] 95 | ); 96 | $this->add_control( 97 | 'contact_addressonetitle', 98 | [ 99 | 'label' => esc_html__( 'Address Box #1 Title', 'datarc-companion' ), 100 | 'type' => Controls_Manager::TEXT, 101 | 'label_block' => true 102 | ] 103 | ); 104 | $this->add_control( 105 | 'contact_addressone', 106 | [ 107 | 'label' => esc_html__( 'Address Box #1', 'datarc-companion' ), 108 | 'type' => Controls_Manager::WYSIWYG, 109 | ] 110 | ); 111 | $this->add_control( 112 | 'contact_addresstwotitle_sepa', 113 | [ 114 | 'label' => __( 'Address Box #2 Info', 'datarc-companion' ), 115 | 'type' => \Elementor\Controls_Manager::HEADING, 116 | 'separator' => 'before', 117 | ] 118 | ); 119 | $this->add_control( 120 | 'contact_addresstwotitle', 121 | [ 122 | 'label' => esc_html__( 'Address Box #2 Title', 'datarc-companion' ), 123 | 'type' => Controls_Manager::TEXT, 124 | 'label_block' => true 125 | ] 126 | ); 127 | $this->add_control( 128 | 'contact_addresstwo', 129 | [ 130 | 'label' => esc_html__( 'Address Box #2', 'datarc-companion' ), 131 | 'type' => Controls_Manager::WYSIWYG, 132 | ] 133 | ); 134 | $this->end_controls_section(); // End Contact Info 135 | 136 | // ---------------------------------------- Contact Form ------------------------------ 137 | 138 | $this->start_controls_section( 139 | 'contact_form', 140 | [ 141 | 'label' => __( 'Contact Form', 'datarc-companion' ), 142 | ] 143 | ); 144 | $this->add_control( 145 | 'contact_formshortcode', 146 | [ 147 | 'label' => esc_html__( 'Form Shortcode', 'datarc-companion' ), 148 | 'type' => Controls_Manager::WYSIWYG, 149 | ] 150 | ); 151 | $this->end_controls_section(); // End Contact Form 152 | 153 | 154 | 155 | /** 156 | * Style Tab 157 | * ------------------------------ Style Section Heading ------------------------------ 158 | * 159 | */ 160 | $this->start_controls_section( 161 | 'style_sh_color', [ 162 | 'label' => __( 'Style Section Heading', 'datarc-companion' ), 163 | 'tab' => Controls_Manager::TAB_STYLE, 164 | ] 165 | ); 166 | $this->add_control( 167 | 'color_title', [ 168 | 'label' => __( 'Title Color', 'datarc-companion' ), 169 | 'type' => Controls_Manager::COLOR, 170 | 'default' => '#222', 171 | 'selectors' => [ 172 | '{{WRAPPER}} .product-area-title h2.h1' => 'color: {{VALUE}};', 173 | ], 174 | ] 175 | ); 176 | $this->add_control( 177 | 'color_subtitle', [ 178 | 'label' => __( 'Sub title color', 'datarc-companion' ), 179 | 'type' => Controls_Manager::COLOR, 180 | 'default' => '#777', 181 | 'selectors' => [ 182 | '{{WRAPPER}} .product-area-title p' => 'color: {{VALUE}};', 183 | ], 184 | ] 185 | ); 186 | 187 | $this->end_controls_section(); 188 | 189 | 190 | /** 191 | * Style Tab 192 | * ------------------------------ Style ------------------------------ 193 | * 194 | */ 195 | $this->start_controls_section( 196 | 'style_content_color', [ 197 | 'label' => __( 'Style Content Color', 'datarc-companion' ), 198 | 'tab' => Controls_Manager::TAB_STYLE, 199 | ] 200 | ); 201 | 202 | $this->add_control( 203 | 'color_btntext', [ 204 | 'label' => __( 'Text color', 'datarc-companion' ), 205 | 'type' => Controls_Manager::COLOR, 206 | 'default' => '#ffffff', 207 | 'selectors' => [ 208 | '{{WRAPPER}} .section-full' => 'color: {{VALUE}};', 209 | ], 210 | ] 211 | ); 212 | $this->add_control( 213 | 'color_border', [ 214 | 'label' => __( 'Heading color', 'datarc-companion' ), 215 | 'type' => Controls_Manager::COLOR, 216 | 'default' => '#ffffff', 217 | 'selectors' => [ 218 | '{{WRAPPER}} .address h6' => 'color: {{VALUE}};', 219 | ], 220 | ] 221 | ); 222 | $this->add_control( 223 | 'color_fbtntextcolor', [ 224 | 'label' => __( 'Form Button Label color', 'datarc-companion' ), 225 | 'type' => Controls_Manager::COLOR, 226 | 'default' => '#222222', 227 | 'selectors' => [ 228 | '{{WRAPPER}} .contact-form .primary-btn' => 'color: {{VALUE}};', 229 | ], 230 | ] 231 | ); 232 | $this->add_control( 233 | 'color_btnhovlc', [ 234 | 'label' => __( 'Form Button Hover Label color', 'datarc-companion' ), 235 | 'type' => Controls_Manager::COLOR, 236 | 'default' => '#00ff8c', 237 | 'selectors' => [ 238 | '{{WRAPPER}} .contact-form .primary-btn:hover' => 'color: {{VALUE}};', 239 | ], 240 | ] 241 | ); 242 | 243 | 244 | $this->end_controls_section(); 245 | 246 | 247 | } 248 | 249 | protected function render() { 250 | 251 | $settings = $this->get_settings(); 252 | 253 | 254 | ?> 255 |
256 |
257 | 261 |
262 |
263 | 268 |
269 | '; 272 | echo '
'; 273 | if( !empty( $settings['contact_addressonetitle'] ) ){ 274 | echo datarc_heading_tag( 275 | array( 276 | 'tag' => 'h6', 277 | 'class' => 'text-uppercase mb-15', 278 | 'text' => esc_html( $settings['contact_addressonetitle'] ) 279 | ) 280 | ); 281 | } 282 | echo datarc_get_textareahtml_output( $settings['contact_addressone'] ); 283 | echo '
'; 284 | echo '
'; 285 | 286 | } 287 | if( !empty( $settings['contact_addresstwo'] ) || !empty( $settings['contact_addresstwotitle'] ) ){ 288 | echo '
'; 289 | echo '
'; 290 | if( !empty( $settings['contact_addresstwotitle'] ) ){ 291 | echo datarc_heading_tag( 292 | array( 293 | 'tag' => 'h6', 294 | 'class' => 'text-uppercase mb-15', 295 | 'text' => esc_html( $settings['contact_addresstwotitle'] ) 296 | ) 297 | ); 298 | } 299 | echo datarc_get_textareahtml_output( $settings['contact_addresstwo'] ); 300 | echo '
'; 301 | echo '
'; 302 | } 303 | ?> 304 |
305 |
306 |
307 | 312 |
313 |
314 | 315 |
316 | start_controls_section( 50 | 'fewwords_content', 51 | [ 52 | 'label' => __( 'Few Words', 'datarc-companion' ), 53 | ] 54 | ); 55 | $this->add_control( 56 | 'fewwords_subtitle', 57 | [ 58 | 'label' => esc_html__( 'Sub Title', 'datarc-companion' ), 59 | 'type' => Controls_Manager::TEXT, 60 | ] 61 | ); 62 | $this->add_control( 63 | 'fewwords_title', 64 | [ 65 | 'label' => esc_html__( 'Title', 'datarc-companion' ), 66 | 'type' => Controls_Manager::TEXT, 67 | ] 68 | ); 69 | $this->add_control( 70 | 'fewwords_desc', 71 | [ 72 | 'label' => esc_html__( 'Descriptions', 'datarc-companion' ), 73 | 'type' => Controls_Manager::WYSIWYG, 74 | ] 75 | ); 76 | $this->end_controls_section(); // End few words content 77 | 78 | // ---------------------------------------- Few Words Button ------------------------------ 79 | $this->start_controls_section( 80 | 'fewwords_button', 81 | [ 82 | 'label' => __( 'Button', 'datarc-companion' ), 83 | ] 84 | ); 85 | $this->add_control( 86 | 'fewwords_btnlabel', 87 | [ 88 | 'label' => esc_html__( 'Label', 'datarc-companion' ), 89 | 'type' => Controls_Manager::TEXT, 90 | 'label_block' => true 91 | ] 92 | ); 93 | $this->add_control( 94 | 'fewwords_btnurl', 95 | [ 96 | 'label' => esc_html__( 'Button Url', 'datarc-companion' ), 97 | 'type' => Controls_Manager::URL, 98 | 'show_external' => false, 99 | ] 100 | ); 101 | $this->end_controls_section(); // End speaker info 102 | 103 | //------------------------------ Style title ------------------------------ 104 | $this->start_controls_section( 105 | 'style_title', [ 106 | 'label' => __( 'Style Title', 'datarc-companion' ), 107 | 'tab' => Controls_Manager::TAB_STYLE, 108 | ] 109 | ); 110 | $this->add_control( 111 | 'color_title', [ 112 | 'label' => __( 'Title Color', 'datarc-companion' ), 113 | 'type' => Controls_Manager::COLOR, 114 | 'default' => '#fff', 115 | 'selectors' => [ 116 | '{{WRAPPER}} .studio-content h2' => 'color: {{VALUE}};', 117 | ], 118 | ] 119 | ); 120 | $this->add_group_control( 121 | Group_Control_Typography::get_type(), [ 122 | 'name' => 'typography_title', 123 | 'selector' => '{{WRAPPER}} .studio-content h2', 124 | ] 125 | ); 126 | 127 | $this->end_controls_section(); 128 | 129 | //------------------------------ Style sub title ------------------------------ 130 | $this->start_controls_section( 131 | 'style_subtitle', [ 132 | 'label' => __( 'Style Sub Title', 'datarc-companion' ), 133 | 'tab' => Controls_Manager::TAB_STYLE, 134 | ] 135 | ); 136 | $this->add_control( 137 | 'color_subtitle', [ 138 | 'label' => __( 'Sub Title Color', 'datarc-companion' ), 139 | 'type' => Controls_Manager::COLOR, 140 | 'default' => '#fff', 141 | 'selectors' => [ 142 | '{{WRAPPER}} .studio-content p.subtitle' => 'color: {{VALUE}};', 143 | ], 144 | ] 145 | ); 146 | $this->add_group_control( 147 | Group_Control_Typography::get_type(), [ 148 | 'name' => 'typography_subtitle', 149 | 'selector' => '{{WRAPPER}} .studio-content p.subtitle', 150 | ] 151 | ); 152 | $this->end_controls_section(); 153 | 154 | //------------------------------ Style Description ------------------------------ 155 | $this->start_controls_section( 156 | 'style_desc', [ 157 | 'label' => __( 'Style Description', 'datarc-companion' ), 158 | 'tab' => Controls_Manager::TAB_STYLE, 159 | ] 160 | ); 161 | $this->add_control( 162 | 'color_text', [ 163 | 'label' => __( 'Text Color', 'datarc-companion' ), 164 | 'type' => Controls_Manager::COLOR, 165 | 'default' => '#fff', 166 | 'selectors' => [ 167 | '{{WRAPPER}} .studio-content .desc p' => 'color: {{VALUE}};', 168 | ], 169 | ] 170 | ); 171 | $this->add_group_control( 172 | Group_Control_Typography::get_type(), [ 173 | 'name' => 'typography_desc', 174 | 'selector' => '{{WRAPPER}} .studio-content .desc p', 175 | ] 176 | ); 177 | $this->end_controls_section(); 178 | 179 | //------------------------------ Style Left side Background ------------------------------ 180 | $this->start_controls_section( 181 | 'style_lsbg', [ 182 | 'label' => __( 'Style Left Side Background', 'datarc-companion' ), 183 | 'tab' => Controls_Manager::TAB_STYLE, 184 | ] 185 | ); 186 | $this->add_group_control( 187 | Group_Control_Background::get_type(), 188 | [ 189 | 'name' => 'lsbg', 190 | 'label' => __( 'Background', 'datarc-companion' ), 191 | 'types' => [ 'gradient', 'classic' ], 192 | 'selector' => '{{WRAPPER}} .studio-area:before', 193 | ] 194 | ); 195 | 196 | 197 | $this->end_controls_section(); 198 | 199 | //------------------------------ Style Right Side Background ------------------------------ 200 | $this->start_controls_section( 201 | 'style_rsbg', [ 202 | 'label' => __( 'Style Right Side Background', 'datarc-companion' ), 203 | 'tab' => Controls_Manager::TAB_STYLE, 204 | ] 205 | ); 206 | $this->add_group_control( 207 | Group_Control_Background::get_type(), 208 | [ 209 | 'name' => 'rsbg', 210 | 'label' => __( 'Background', 'datarc-companion' ), 211 | 'types' => [ 'gradient', 'classic' ], 212 | 'selector' => '{{WRAPPER}} .studio-area:after', 213 | ] 214 | ); 215 | 216 | $this->end_controls_section(); 217 | 218 | 219 | //------------------------------ Style Button ------------------------------ 220 | $this->start_controls_section( 221 | 'style_btn', [ 222 | 'label' => __( 'Style Button', 'datarc-companion' ), 223 | 'tab' => Controls_Manager::TAB_STYLE, 224 | ] 225 | ); 226 | $this->add_control( 227 | 'color_btntext', [ 228 | 'label' => __( 'Button Text Color', 'datarc-companion' ), 229 | 'type' => Controls_Manager::COLOR, 230 | 'default' => '#fff', 231 | 'selectors' => [ 232 | '{{WRAPPER}} .studio-content .primary-btn' => 'color: {{VALUE}};', 233 | ], 234 | ] 235 | ); 236 | $this->add_control( 237 | 'color_btnhovtext', [ 238 | 'label' => __( 'Button Hover Text Color', 'datarc-companion' ), 239 | 'type' => Controls_Manager::COLOR, 240 | 'default' => '#fff', 241 | 'selectors' => [ 242 | '{{WRAPPER}} .studio-content .primary-btn:hover' => 'color: {{VALUE}};', 243 | ], 244 | ] 245 | ); 246 | $this->add_control( 247 | 'color_btnbg', [ 248 | 'label' => __( 'Button background Color', 'datarc-companion' ), 249 | 'type' => Controls_Manager::COLOR, 250 | 'selectors' => [ 251 | '{{WRAPPER}} .studio-content .primary-btn' => 'background-color: {{VALUE}};', 252 | ], 253 | ] 254 | ); 255 | $this->add_control( 256 | 'color_btnhovbg', [ 257 | 'label' => __( 'Button Hover background Color', 'datarc-companion' ), 258 | 'type' => Controls_Manager::COLOR, 259 | 'selectors' => [ 260 | '{{WRAPPER}} .studio-content .primary-btn:hover' => 'background-color: {{VALUE}};', 261 | ], 262 | ] 263 | ); 264 | $this->add_control( 265 | 'color_btnbord', [ 266 | 'label' => __( 'Button border Color', 'datarc-companion' ), 267 | 'type' => Controls_Manager::COLOR, 268 | 'selectors' => [ 269 | '{{WRAPPER}} .studio-content .primary-btn' => 'border-color: {{VALUE}};', 270 | ], 271 | ] 272 | ); 273 | $this->add_control( 274 | 'color_btnhovbord', [ 275 | 'label' => __( 'Button Hover border Color', 'datarc-companion' ), 276 | 'type' => Controls_Manager::COLOR, 277 | 'selectors' => [ 278 | '{{WRAPPER}} .studio-content .primary-btn:hover' => 'border-color: {{VALUE}};', 279 | ], 280 | ] 281 | ); 282 | $this->add_group_control( 283 | Group_Control_Typography::get_type(), [ 284 | 'name' => 'typography_btn', 285 | 'selector' => '{{WRAPPER}} .studio-content .primary-btn', 286 | ] 287 | ); 288 | 289 | $this->end_controls_section(); 290 | 291 | 292 | 293 | } 294 | 295 | protected function render() { 296 | 297 | $settings = $this->get_settings(); 298 | // Content Position 299 | $pos = 'order-1'; 300 | if( !empty( $settings['fewwords_contentpos'] ) ){ 301 | $pos = ''; 302 | } 303 | // Background Image 304 | $bg = ''; 305 | if( !empty( $settings['image_bg']['url'] )){ 306 | $bg = $settings['image_bg']['url']; 307 | } 308 | 309 | ?> 310 | 311 |
312 |
313 |
314 |
315 |
316 | esc_html( $settings['fewwords_subtitle'] ), 322 | 'class' => 'subtitle' 323 | ) 324 | ); 325 | } 326 | // Title 327 | if( !empty( $settings['fewwords_title'] ) ){ 328 | echo datarc_heading_tag( 329 | array( 330 | 'tag' => 'h2', 331 | 'class' => 'h1 mb-20', 332 | 'text' => esc_html( $settings['fewwords_title'] ) 333 | ) 334 | ); 335 | } 336 | ?> 337 |
338 | 343 |
344 | '.esc_html( $settings['fewwords_btnlabel'] ).''; 347 | } 348 | ?> 349 |
350 |
351 |
352 |
353 |
354 | 355 | start_controls_section( 50 | 'portfolio_content', 51 | [ 52 | 'label' => __( 'Portfolio Settings', 'datarc-companion' ), 53 | ] 54 | ); 55 | $this->add_control( 56 | 'subtitle', 57 | [ 58 | 'label' => esc_html__( 'Sub Title', 'datarc-companion' ), 59 | 'type' => Controls_Manager::TEXT, 60 | 'label_block' => true, 61 | 'default' => esc_html__( 'OUR WORK', 'datarc-companion' ) 62 | ] 63 | ); 64 | $this->add_control( 65 | 'title', 66 | [ 67 | 'label' => esc_html__( 'Title', 'datarc-companion' ), 68 | 'type' => Controls_Manager::TEXT, 69 | 'label_block' => true, 70 | 'default' => esc_html__( 'See our Online Portfolio', 'datarc-companion' ) 71 | ] 72 | ); 73 | $this->add_control( 74 | 'itemsnumber', 75 | [ 76 | 'label' => esc_html__( 'Items per section', 'datarc-companion' ), 77 | 'type' => Controls_Manager::NUMBER, 78 | 'label_block' => true 79 | ] 80 | ); 81 | $this->add_control( 82 | 'loadbtnswitch', 83 | [ 84 | 'label' => esc_html__( 'Load More Button', 'datarc-companion' ), 85 | 'type' => Controls_Manager::SWITCHER, 86 | ] 87 | ); 88 | $this->end_controls_section(); // End portfolio content 89 | 90 | // ---------------------------------------- Portfolio Content ------------------------------ 91 | 92 | $this->start_controls_section( 93 | 'portfolios', 94 | [ 95 | 'label' => __( 'Portfolio', 'datarc-companion' ), 96 | ] 97 | ); 98 | 99 | $this->add_control( 100 | 'portfolios_rept', [ 101 | 'label' => __( 'Create Portfolios', 'datarc-companion' ), 102 | 'type' => Controls_Manager::REPEATER, 103 | 'title_field' => '{{{ label }}}', 104 | 'fields' => [ 105 | [ 106 | 'name' => 'label', 107 | 'label' => __( 'Tag', 'datarc-companion' ), 108 | 'type' => Controls_Manager::TEXT, 109 | 'default' => esc_html__( 'Web Template', 'datarc-companion' ) 110 | ], 111 | [ 112 | 'name' => 'title', 113 | 'label' => __( 'Title', 'datarc-companion' ), 114 | 'type' => Controls_Manager::TEXT, 115 | 'label_block' => true, 116 | 'default' => esc_html__( 'DFR Corp. Branding', 'datarc-companion' ) 117 | ], 118 | [ 119 | 'name' => 'sub-title', 120 | 'label' => __( 'Sub Title', 'datarc-companion' ), 121 | 'type' => Controls_Manager::TEXT, 122 | 'label_block' => true, 123 | 'default' => esc_html__( 'Brand Identity', 'datarc-companion' ) 124 | ], 125 | [ 126 | 'name' => 'img', 127 | 'label' => __( 'Image', 'datarc-companion' ), 128 | 'type' => Controls_Manager::MEDIA 129 | ] 130 | ], 131 | ] 132 | ); 133 | 134 | $this->end_controls_section(); // End portfolio content 135 | 136 | //------------------------------ Style title ------------------------------ 137 | $this->start_controls_section( 138 | 'style_title', [ 139 | 'label' => __( 'Style Title', 'datarc-companion' ), 140 | 'tab' => Controls_Manager::TAB_STYLE, 141 | ] 142 | ); 143 | $this->add_control( 144 | 'color_title', [ 145 | 'label' => __( 'Title Color', 'datarc-companion' ), 146 | 'type' => Controls_Manager::COLOR, 147 | 'default' => '#222', 148 | 'selectors' => [ 149 | '{{WRAPPER}} .product-area-title h2' => 'color: {{VALUE}};', 150 | ], 151 | ] 152 | ); 153 | $this->add_group_control( 154 | Group_Control_Typography::get_type(), [ 155 | 'name' => 'typography_title', 156 | 'selector' => '{{WRAPPER}} .product-area-title h2', 157 | ] 158 | ); 159 | 160 | $this->end_controls_section(); 161 | 162 | //------------------------------ Style Sub Title ------------------------------ 163 | $this->start_controls_section( 164 | 'style_subtitle', [ 165 | 'label' => __( 'Style Sub Title', 'datarc-companion' ), 166 | 'tab' => Controls_Manager::TAB_STYLE, 167 | ] 168 | ); 169 | $this->add_control( 170 | 'color_subtitle', [ 171 | 'label' => __( 'Text Color', 'datarc-companion' ), 172 | 'type' => Controls_Manager::COLOR, 173 | 'default' => '#777', 174 | 'selectors' => [ 175 | '{{WRAPPER}} .product-area-title p' => 'color: {{VALUE}};', 176 | ], 177 | ] 178 | ); 179 | $this->add_group_control( 180 | Group_Control_Typography::get_type(), [ 181 | 'name' => 'typography_subtitle', 182 | 'selector' => '{{WRAPPER}} .product-area-title p', 183 | ] 184 | ); 185 | 186 | $this->end_controls_section(); 187 | 188 | 189 | //------------------------------ Style Image Hover ------------------------------ 190 | $this->start_controls_section( 191 | 'portfolio_imghover', [ 192 | 'label' => __( 'Style Portfolio Hover', 'datarc-companion' ), 193 | 'tab' => Controls_Manager::TAB_STYLE, 194 | ] 195 | ); 196 | $this->add_group_control( 197 | Group_Control_Background::get_type(), 198 | [ 199 | 'name' => 'portfolioimghoverbg', 200 | 'label' => __( 'Background', 'datarc-companion' ), 201 | 'types' => [ 'gradient' ], 202 | 'selector' => '{{WRAPPER}} .single-filter-content .overlay-bg-content', 203 | ] 204 | ); 205 | $this->add_control( 206 | 'portfolio_overlaytextcolor', [ 207 | 'label' => __( 'Hover Text Color', 'datarc-companion' ), 208 | 'type' => Controls_Manager::COLOR, 209 | 'default' => '#fff', 210 | 'selectors' => [ 211 | '{{WRAPPER}} .single-filter-content .overlay p' => 'color: {{VALUE}};', 212 | '{{WRAPPER}} .single-filter-content .overlay h5' => 'color: {{VALUE}};', 213 | ], 214 | ] 215 | ); 216 | 217 | $this->end_controls_section(); 218 | 219 | //------------------------------ Style Tab ------------------------------ 220 | $this->start_controls_section( 221 | 'style_tab', [ 222 | 'label' => __( 'Style Tab', 'datarc-companion' ), 223 | 'tab' => Controls_Manager::TAB_STYLE, 224 | ] 225 | ); 226 | $this->add_control( 227 | 'color_tab', [ 228 | 'label' => __( 'Tab Color', 'datarc-companion' ), 229 | 'type' => Controls_Manager::COLOR, 230 | 'selectors' => [ 231 | '{{WRAPPER}} .controls a.filter' => 'color: {{VALUE}};', 232 | ], 233 | ] 234 | ); 235 | $this->add_control( 236 | 'color_tabhover', [ 237 | 'label' => __( 'Tab Hover Color', 'datarc-companion' ), 238 | 'type' => Controls_Manager::COLOR, 239 | 'selectors' => [ 240 | '{{WRAPPER}} .controls a.filter.active' => 'color: {{VALUE}};', 241 | '{{WRAPPER}} .controls .filter:hover' => 'color: {{VALUE}};', 242 | ], 243 | ] 244 | ); 245 | 246 | $this->end_controls_section(); 247 | 248 | } 249 | 250 | protected function render() { 251 | 252 | $settings = $this->get_settings(); 253 | 254 | 255 | $title = $subtitle = ''; 256 | // Title 257 | 258 | if( !empty( $settings['title'] ) ){ 259 | $title = $settings['title']; 260 | } 261 | // Sub title 262 | if( !empty( $settings['subtitle'] ) ){ 263 | $subtitle = $settings['subtitle']; 264 | } 265 | 266 | $portfoliosItems = $settings['portfolios_rept']; 267 | 268 | // Total items count 269 | $totalItems = count( $portfoliosItems ); 270 | 271 | // localize 272 | wp_localize_script( 273 | 'datarc-loadmore-script', 274 | 'portfolioloadajax', 275 | array( 276 | 'action_url' => admin_url( 'admin-ajax.php' ), 277 | 'postNumber' => esc_html( $settings['itemsnumber'] ), 278 | 'elsettings' => $portfoliosItems, 279 | 'totalitems' => $totalItems 280 | ) 281 | ); 282 | 283 | ?> 284 |
285 |
286 | 0 ): 293 | ?> 294 |
295 | 296 | 297 | 298 | '.esc_html( $tag ).''; 309 | } 310 | 311 | echo $tabs; 312 | ?> 313 |
314 | 317 |
318 | 319 |
320 | 332 |
333 |
334 | esc_html( $val['sub-title'] ) 339 | ) 340 | ); 341 | } 342 | ?> 343 |
344 | 'h5', 349 | 'class' => 'text-uppercase', 350 | 'text' => esc_html( $val['title'] ) 351 | ) 352 | ); 353 | } 354 | ?> 355 |
356 |
357 | 367 | 368 |
369 | $settings['itemsnumber'] ): 371 | ?> 372 |
373 | 374 |
375 | 378 |
379 | start_controls_section( 50 | 'pricing_tblhead', 51 | [ 52 | 'label' => __( 'Table Heading', 'datarc-companion' ), 53 | ] 54 | ); 55 | $this->add_control( 56 | 'pricing_title', 57 | [ 58 | 'label' => esc_html__( 'Title', 'datarc-companion' ), 59 | 'type' => Controls_Manager::TEXT, 60 | ] 61 | ); 62 | $this->add_control( 63 | 'pricing_icon', 64 | [ 65 | 'label' => esc_html__( 'Icon', 'datarc-companion' ), 66 | 'type' => Controls_Manager::ICON, 67 | ] 68 | ); 69 | 70 | $this->end_controls_section(); // End pricing table head 71 | 72 | // ---------------------------------------- Pricing table price ------------------------------ 73 | $this->start_controls_section( 74 | 'pricing_tblprice', 75 | [ 76 | 'label' => __( 'Price Info', 'datarc-companion' ), 77 | ] 78 | ); 79 | $this->add_control( 80 | 'pricing_price', 81 | [ 82 | 'label' => esc_html__( 'Price', 'datarc-companion' ), 83 | 'type' => Controls_Manager::TEXT, 84 | ] 85 | ); 86 | $this->add_control( 87 | 'pricing_duration', 88 | [ 89 | 'label' => esc_html__( 'Duration', 'datarc-companion' ), 90 | 'type' => Controls_Manager::TEXT, 91 | ] 92 | ); 93 | 94 | $this->end_controls_section(); // End price 95 | 96 | // ---------------------------------------- Pricing table features ------------------------------ 97 | $this->start_controls_section( 98 | 'pricing_tblfeatures', 99 | [ 100 | 'label' => __( 'Features', 'datarc-companion' ), 101 | ] 102 | ); 103 | $this->add_control( 104 | 'pricingfeatures', [ 105 | 'label' => __( 'Features', 'datarc-companion' ), 106 | 'type' => Controls_Manager::REPEATER, 107 | 'title_field' => '{{{ label }}}', 108 | 'fields' => [ 109 | [ 110 | 'name' => 'label', 111 | 'label' => __( 'Feature', 'datarc-companion' ), 112 | 'type' => Controls_Manager::TEXT, 113 | 'label_block' => true, 114 | 'default' => '2.5 GB Photos' 115 | ] 116 | 117 | ], 118 | ] 119 | ); 120 | 121 | $this->end_controls_section(); // End features 122 | 123 | // ---------------------------------------- Pricing table Button ------------------------------ 124 | $this->start_controls_section( 125 | 'pricing_tblbutton', 126 | [ 127 | 'label' => __( 'Button', 'datarc-companion' ), 128 | ] 129 | ); 130 | $this->add_control( 131 | 'pricing_btnlabel', 132 | [ 133 | 'label' => esc_html__( 'Label', 'datarc-companion' ), 134 | 'type' => Controls_Manager::TEXT, 135 | ] 136 | ); 137 | $this->add_control( 138 | 'pricing_btnurl', 139 | [ 140 | 'label' => esc_html__( 'URL', 'datarc-companion' ), 141 | 'type' => Controls_Manager::TEXT, 142 | ] 143 | ); 144 | 145 | $this->end_controls_section(); // End table button 146 | 147 | 148 | 149 | //------------------------------ Style Table Heading ------------------------------ 150 | $this->start_controls_section( 151 | 'style_tblheading', [ 152 | 'label' => __( 'Style Table Heading', 'datarc-companion' ), 153 | 'tab' => Controls_Manager::TAB_STYLE, 154 | ] 155 | ); 156 | $this->add_control( 157 | 'color_icon', [ 158 | 'label' => __( 'Icon Color', 'datarc-companion' ), 159 | 'type' => Controls_Manager::COLOR, 160 | 'default' => '#00ff8c', 161 | 'selectors' => [ 162 | '{{WRAPPER}} .single-pricing-table .top .head span' => 'color: {{VALUE}};', 163 | ], 164 | ] 165 | ); 166 | $this->add_control( 167 | 'color_title', [ 168 | 'label' => __( 'Title Color', 'datarc-companion' ), 169 | 'type' => Controls_Manager::COLOR, 170 | 'default' => '#fff', 171 | 'selectors' => [ 172 | '{{WRAPPER}} .single-pricing-table .top .head h5' => 'color: {{VALUE}};', 173 | ], 174 | ] 175 | ); 176 | $this->add_control( 177 | 'color_pricing', [ 178 | 'label' => __( 'Pricing Color', 'datarc-companion' ), 179 | 'type' => Controls_Manager::COLOR, 180 | 'default' => '#00ff8c', 181 | 'selectors' => [ 182 | '{{WRAPPER}} .single-pricing-table .top .package .price' => 'color: {{VALUE}};', 183 | ], 184 | ] 185 | ); 186 | $this->add_control( 187 | 'color_duration', [ 188 | 'label' => __( 'Duration Color', 'datarc-companion' ), 189 | 'type' => Controls_Manager::COLOR, 190 | 'default' => '#fff', 191 | 'selectors' => [ 192 | '{{WRAPPER}} .single-pricing-table .top .package span' => 'color: {{VALUE}};', 193 | ], 194 | ] 195 | ); 196 | 197 | $this->end_controls_section(); 198 | 199 | //------------------------------ Style Features ------------------------------ 200 | $this->start_controls_section( 201 | 'style_features', [ 202 | 'label' => __( 'Style Features', 'datarc-companion' ), 203 | 'tab' => Controls_Manager::TAB_STYLE, 204 | ] 205 | ); 206 | $this->add_control( 207 | 'color_feature', [ 208 | 'label' => __( 'Feature Color', 'datarc-companion' ), 209 | 'type' => Controls_Manager::COLOR, 210 | 'default' => '#777', 211 | 'selectors' => [ 212 | '{{WRAPPER}} .feature li' => 'color: {{VALUE}};', 213 | ], 214 | ] 215 | ); 216 | $this->add_control( 217 | 'color_featurebg', [ 218 | 'label' => __( 'Feature Background Color', 'datarc-companion' ), 219 | 'type' => Controls_Manager::COLOR, 220 | 'selectors' => [ 221 | '{{WRAPPER}} .single-pricing-table .bottom' => 'background-color: {{VALUE}};', 222 | ], 223 | ] 224 | ); 225 | 226 | $this->end_controls_section(); 227 | 228 | //------------------------------ Style Button ------------------------------ 229 | $this->start_controls_section( 230 | 'style_button', [ 231 | 'label' => __( 'Style Button', 'datarc-companion' ), 232 | 'tab' => Controls_Manager::TAB_STYLE, 233 | ] 234 | ); 235 | $this->add_control( 236 | 'color_btnlabel', [ 237 | 'label' => __( 'Button Label Color', 'datarc-companion' ), 238 | 'type' => Controls_Manager::COLOR, 239 | 'default' => '#222', 240 | 'selectors' => [ 241 | '{{WRAPPER}} .primary-btn' => 'color: {{VALUE}};', 242 | ], 243 | ] 244 | ); 245 | $this->add_control( 246 | 'color_btnhoverlabel', [ 247 | 'label' => __( 'Button Hover Label Color', 'datarc-companion' ), 248 | 'type' => Controls_Manager::COLOR, 249 | 'default' => '#fff', 250 | 'selectors' => [ 251 | '{{WRAPPER}} .primary-btn:hover' => 'color: {{VALUE}};', 252 | ], 253 | ] 254 | ); 255 | $this->add_control( 256 | 'color_btnborder', [ 257 | 'label' => __( 'Button Border Color', 'datarc-companion' ), 258 | 'type' => Controls_Manager::COLOR, 259 | 'default' => '#00ff8c', 260 | 'selectors' => [ 261 | '{{WRAPPER}} .primary-btn' => 'border-color: {{VALUE}};', 262 | ], 263 | ] 264 | ); 265 | $this->add_control( 266 | 'color_btnhovborder', [ 267 | 'label' => __( 'Button Hover Border Color', 'datarc-companion' ), 268 | 'type' => Controls_Manager::COLOR, 269 | 'default' => '#00ff8c', 270 | 'selectors' => [ 271 | '{{WRAPPER}} .primary-btn:hover' => 'border-color: {{VALUE}};', 272 | ], 273 | ] 274 | ); 275 | $this->add_control( 276 | 'color_btnbg', [ 277 | 'label' => __( 'Button Background Color', 'datarc-companion' ), 278 | 'type' => Controls_Manager::COLOR, 279 | 'selectors' => [ 280 | '{{WRAPPER}} .primary-btn' => 'background-color: {{VALUE}};', 281 | ], 282 | ] 283 | ); 284 | $this->add_control( 285 | 'color_btnhovbg', [ 286 | 'label' => __( 'Button Hover Background Color', 'datarc-companion' ), 287 | 'type' => Controls_Manager::COLOR, 288 | 'default' => '#00ff8c', 289 | 'selectors' => [ 290 | '{{WRAPPER}} .primary-btn:hover' => 'background-color: {{VALUE}};', 291 | ], 292 | ] 293 | ); 294 | 295 | $this->end_controls_section(); 296 | 297 | // ---------------------------------------- Style table heading color ------------------------------ 298 | $this->start_controls_section( 299 | 'style_tblheadingbg', 300 | [ 301 | 'label' => __( 'Heading Background Color', 'datarc-companion' ), 302 | 'tab' => Controls_Manager::TAB_STYLE, 303 | ] 304 | ); 305 | $this->add_group_control( 306 | Group_Control_Background::get_type(), 307 | [ 308 | 'name' => 'styleheadingbgdf', 309 | 'label' => __( 'Background', 'datarc-companion' ), 310 | 'types' => [ 'gradient' ], 311 | 'selector' => '{{WRAPPER}} .single-pricing-table .top', 312 | ] 313 | ); 314 | 315 | $this->end_controls_section(); // End table button 316 | 317 | } 318 | 319 | protected function render() { 320 | 321 | $settings = $this->get_settings(); 322 | 323 | $pos = ''; 324 | if( !empty( $settings['featuresvtwo_imgpos'] ) ){ 325 | $pos = 'order-last'; 326 | } 327 | 328 | ?> 329 |
330 |
331 |
332 | 333 |
'; 337 | } 338 | // Pricing title 339 | if( !empty( $settings['pricing_title'] ) ){ 340 | echo datarc_heading_tag( 341 | array( 342 | 'tag' => 'h5', 343 | 'text' => esc_html( $settings['pricing_title'] ), 344 | 'class' => 'text-uppercase' 345 | ) 346 | ); 347 | } 348 | ?> 349 |
350 |
351 | 'div', 357 | 'text' => esc_html( $settings['pricing_price'] ), 358 | 'class' => 'price' 359 | ) 360 | ); 361 | } 362 | // duration 363 | if( !empty( $settings['pricing_duration'] ) ){ 364 | echo datarc_other_tag( 365 | array( 366 | 'tag' => 'span', 367 | 'text' => esc_html( $settings['pricing_duration'] ) 368 | ) 369 | ); 370 | } 371 | ?> 372 | 373 |
374 |
375 | 376 |
377 |
    378 | 0 ){ 380 | foreach( $settings['pricingfeatures'] as $feature ){ 381 | if( !empty( $feature['label'] ) ){ 382 | echo '
  • '.esc_html( $feature['label'] ).'
  • '; 383 | } 384 | } 385 | } 386 | ?> 387 |
388 | '.esc_html( $settings['pricing_btnlabel'] ).''; 391 | } 392 | ?> 393 |
394 |
395 | 396 | init_hooks(); 134 | do_action( 'press_elements_loaded' ); 135 | } 136 | 137 | 138 | /** 139 | * Init Hooks 140 | * 141 | * Hook into actions and filters. 142 | * 143 | * @since 1.7.0 144 | * 145 | * @access private 146 | */ 147 | private function init_hooks() { 148 | add_action( 'init', [ $this, 'init' ] ); 149 | } 150 | 151 | 152 | /** 153 | * Init Datarc Elementor Widget 154 | * 155 | * Load the plugin after Elementor (and other plugins) are loaded. 156 | * 157 | * @since 1.0.0 158 | * @since 1.7.0 The logic moved from a standalone function to this class method. 159 | * 160 | * @access public 161 | */ 162 | public function init() { 163 | 164 | if ( !did_action( 'elementor/loaded' ) ) { 165 | add_action( 'admin_notices', [ $this, 'admin_notice_missing_main_plugin' ] ); 166 | return; 167 | } 168 | 169 | // Check for required Elementor version 170 | 171 | if ( !version_compare( ELEMENTOR_VERSION, self::MINIMUM_ELEMENTOR_VERSION, '>=' ) ) { 172 | add_action( 'admin_notices', [ $this, 'admin_notice_minimum_elementor_version' ] ); 173 | return; 174 | } 175 | 176 | // Check for required PHP version 177 | 178 | if ( version_compare( PHP_VERSION, self::MINIMUM_PHP_VERSION, '<' ) ) { 179 | add_action( 'admin_notices', [ $this, 'admin_notice_minimum_php_version' ] ); 180 | return; 181 | } 182 | 183 | // Add new Elementor Categories 184 | add_action( 'elementor/elements/categories_registered', [ $this, 'add_elementor_category' ] ); 185 | // Register Widget Scripts 186 | add_action( 'elementor/frontend/after_register_scripts', [ $this, 'register_widget_scripts' ] ); 187 | // Register Widget Styles 188 | add_action( 'admin_enqueue_scripts', [ $this, 'register_admin_styles' ] ); 189 | add_action( 'elementor/frontend/after_enqueue_styles', [ $this, 'register_widget_styles' ] ); 190 | add_action( 'elementor/editor/before_enqueue_scripts', [ $this, 'register_widget_styles' ] ); 191 | 192 | // Register New Widgets 193 | add_action( 'elementor/widgets/widgets_registered', [ $this, 'on_widgets_registered' ] ); 194 | 195 | // Datarc Companion enqueue style and scripts 196 | add_action( 'wp_enqueue_scripts', [ $this, 'enqueue_element_widgets_scripts' ] ); 197 | 198 | } 199 | 200 | /** 201 | * Admin notice 202 | * 203 | * Warning when the site doesn't have Elementor installed or activated. 204 | * 205 | * @since 1.1.0 206 | * @since 1.7.0 Moved from a standalone function to a class method. 207 | * 208 | * @access public 209 | */ 210 | public function admin_notice_missing_main_plugin() { 211 | $message = sprintf( 212 | /* translators: 1: Elementor */ 213 | esc_html__( '"%1$s" requires "%2$s" to be installed and activated.', 'datarc-companion' ), 214 | '' . esc_html__( 'Datarc Theme', 'datarc-companion' ) . '', 215 | '' . esc_html__( 'Elementor', 'datarc-companion' ) . '' 216 | ); 217 | printf( '

%1$s

', $message ); 218 | } 219 | 220 | /** 221 | * Admin notice 222 | * 223 | * Warning when the site doesn't have a minimum required Elementor version. 224 | * 225 | * @since 1.1.0 226 | * @since 1.7.0 Moved from a standalone function to a class method. 227 | * 228 | * @access public 229 | */ 230 | public function admin_notice_minimum_elementor_version() { 231 | $message = sprintf( 232 | /* translators: 1: Elementor 2: Required Elementor version */ 233 | esc_html__( '"%1$s" requires "%2$s" version %3$s or greater.', 'datarc-companion' ), 234 | '' . esc_html__( 'Datarc', 'datarc-companion' ) . '', 235 | '' . esc_html__( 'Elementor', 'datarc-companion' ) . '', 236 | self::MINIMUM_ELEMENTOR_VERSION 237 | ); 238 | printf( '

%1$s

', $message ); 239 | } 240 | 241 | /** 242 | * Admin notice 243 | * 244 | * Warning when the site doesn't have a minimum required PHP version. 245 | * 246 | * @access public 247 | */ 248 | public function admin_notice_minimum_php_version() { 249 | $message = sprintf( 250 | /* translators: 1: PHP 2: Required PHP version */ 251 | esc_html__( '"%1$s" requires "%2$s" version %3$s or greater.', 'datarc-companion' ), 252 | '' . esc_html__( 'Datarc', 'datarc-companion' ) . '', 253 | '' . esc_html__( 'PHP', 'datarc-companion' ) . '', 254 | self::MINIMUM_PHP_VERSION 255 | ); 256 | printf( '

%1$s

', $message ); 257 | } 258 | 259 | /** 260 | * Add new Elementor Categories 261 | * 262 | * Register new widget categories for Datarc widgets. 263 | * 264 | * @access public 265 | */ 266 | public function add_elementor_category() { 267 | 268 | \Elementor\Plugin::instance()->elements_manager->add_category( 'datarc-elements', [ 269 | 'title' => __( 'Datarc Elements', 'datarc-companion' ), 270 | ], 1 ); 271 | 272 | } 273 | 274 | /** 275 | * Enqueue Widgets Scripts 276 | * 277 | * Enqueue custom scripts required to run datarc elementor widgets. 278 | * 279 | * @access public 280 | */ 281 | public function enqueue_element_widgets_scripts() { 282 | // googlr map api key 283 | $apiKey = datarc_opt('datarc_map_apikey'); 284 | 285 | /****************** 286 | Enqueue Css 287 | ******************/ 288 | 289 | wp_enqueue_style( 'owl-carousel', plugins_url( 'assets/css/owl.carousel.css', __FILE__ ), array(), '1.0.0', 'all' ); 290 | 291 | /***************** 292 | Enqueue Js 293 | ******************/ 294 | 295 | // mailchimp validate js 296 | wp_register_script( 'mc-validate', '//s3.amazonaws.com/downloads.mailchimp.com/js/mc-validate.js' ); 297 | // countdowntime js 298 | wp_enqueue_script( 'countdowntime', plugins_url( 'assets/js/countdowntime.js', __FILE__ ), array('jquery'), '1.0.0', true ); 299 | 300 | 301 | 302 | // owl carousel js 303 | wp_enqueue_script( 'owl-carousel', plugins_url( 'assets/js/owl.carousel.min.js', __FILE__ ), array('jquery'), '1.0', true ); 304 | 305 | // datarc companion main js 306 | wp_enqueue_script( 'datarc-companion', plugins_url( 'assets/js/datarc-companion-main.js', __FILE__ ), array('jquery'), '1.0', true ); 307 | 308 | 309 | } 310 | 311 | /** 312 | * Register Widget Scripts 313 | * 314 | * Register custom scripts required to run. 315 | * 316 | * @access public 317 | */ 318 | public function register_widget_scripts() { 319 | 320 | 321 | } 322 | 323 | /** 324 | * Register Widget Styles 325 | * 326 | * Register custom styles required to run Datarc. 327 | * 328 | * @access public 329 | */ 330 | public function register_widget_styles() { 331 | // Typing Effect 332 | wp_enqueue_style( 'datarc-companion-elementor-edit', plugins_url( '/assets/css/elementor-edit.css', __FILE__ ) ); 333 | } 334 | 335 | 336 | /** 337 | * Register Admin Styles 338 | * 339 | * Register custom styles required to Datarc Companion WordPress Admin Dashboard. 340 | * 341 | * @access public 342 | */ 343 | public function register_admin_styles() { 344 | } 345 | 346 | /** 347 | * Register New Widgets 348 | * 349 | * Include Datarc Companion widgets files and register them in Elementor. 350 | * 351 | * @since 1.0.0 352 | * @since 1.7.1 The method moved to this class. 353 | * 354 | * @access public 355 | */ 356 | public function on_widgets_registered() { 357 | $this->include_widgets(); 358 | $this->register_widgets(); 359 | } 360 | 361 | /** 362 | * Include Widgets Files 363 | * 364 | * Load datarc companion widgets files. 365 | * 366 | * @since 1.0.0 367 | * @since 1.7.1 The method moved to this class. 368 | * 369 | * @access private 370 | */ 371 | private function include_widgets() { 372 | 373 | require_once DATARC_COMPANION_EW_DIR_PATH . 'widgets/datarc-banner.php'; 374 | require_once DATARC_COMPANION_EW_DIR_PATH . 'widgets/section-heading.php'; 375 | require_once DATARC_COMPANION_EW_DIR_PATH . 'widgets/portfolio.php'; 376 | 377 | require_once DATARC_COMPANION_EW_DIR_PATH . 'widgets/datarc-blog.php'; 378 | require_once DATARC_COMPANION_EW_DIR_PATH . 'widgets/call-to-action.php'; 379 | require_once DATARC_COMPANION_EW_DIR_PATH . 'widgets/team-member.php'; 380 | require_once DATARC_COMPANION_EW_DIR_PATH . 'widgets/testimonial.php'; 381 | require_once DATARC_COMPANION_EW_DIR_PATH . 'widgets/progress.php'; 382 | require_once DATARC_COMPANION_EW_DIR_PATH . 'widgets/services.php'; 383 | require_once DATARC_COMPANION_EW_DIR_PATH . 'widgets/few-words.php'; 384 | require_once DATARC_COMPANION_EW_DIR_PATH . 'widgets/pricing.php'; 385 | 386 | require_once DATARC_COMPANION_EW_DIR_PATH . 'widgets/datarc-about.php'; 387 | require_once DATARC_COMPANION_EW_DIR_PATH . 'widgets/datarc-contact.php'; 388 | 389 | } 390 | 391 | /** 392 | * Register Widgets 393 | * 394 | * Register datarc companion widgets. 395 | * 396 | * @since 1.0.0 397 | * @since 1.7.1 The method moved to this class. 398 | * 399 | * @access private 400 | */ 401 | private function register_widgets() { 402 | // Register elements widgets 403 | \Elementor\Plugin::instance()->widgets_manager->register_widget_type( new \Datarcelementor\Widgets\Datarc_Banner() ); 404 | \Elementor\Plugin::instance()->widgets_manager->register_widget_type( new \Datarcelementor\Widgets\Datarc_Portfolio() ); 405 | \Elementor\Plugin::instance()->widgets_manager->register_widget_type( new \Datarcelementor\Widgets\Datarc_sh() ); 406 | 407 | \Elementor\Plugin::instance()->widgets_manager->register_widget_type( new \Datarcelementor\Widgets\Datarc_Blog() ); 408 | \Elementor\Plugin::instance()->widgets_manager->register_widget_type( new \Datarcelementor\Widgets\Datarc_Cat() ); 409 | \Elementor\Plugin::instance()->widgets_manager->register_widget_type( new \Datarcelementor\Widgets\Datarc_Team_Member() ); 410 | \Elementor\Plugin::instance()->widgets_manager->register_widget_type( new \Datarcelementor\Widgets\Datarc_Testimonial() ); 411 | \Elementor\Plugin::instance()->widgets_manager->register_widget_type( new \Datarcelementor\Widgets\Datarc_Progress() ); 412 | \Elementor\Plugin::instance()->widgets_manager->register_widget_type( new \Datarcelementor\Widgets\Datarc_Services() ); 413 | \Elementor\Plugin::instance()->widgets_manager->register_widget_type( new \Datarcelementor\Widgets\Datarc_Few_Words() ); 414 | \Elementor\Plugin::instance()->widgets_manager->register_widget_type( new \Datarcelementor\Widgets\Datarc_Pricing() ); 415 | 416 | 417 | \Elementor\Plugin::instance()->widgets_manager->register_widget_type( new \Datarcelementor\Widgets\Datarc_About() ); 418 | \Elementor\Plugin::instance()->widgets_manager->register_widget_type( new \Datarcelementor\Widgets\Datarc_Contact() ); 419 | 420 | } 421 | 422 | } 423 | } 424 | // Make sure the same function is not loaded twice in free/premium versions. 425 | 426 | 427 | 428 | if ( !function_exists( 'datarc_el_widgets_load' ) ) { 429 | /** 430 | * Load Datarc elementor widget 431 | * 432 | * Main instance of Press_Elements. 433 | * 434 | * @since 1.0.0 435 | * @since 1.7.0 The logic moved from this function to a class method. 436 | */ 437 | function datarc_el_widgets_load() { 438 | return Datarc_El_Widgets::instance(); 439 | } 440 | 441 | // Run datarc elementor widget 442 | datarc_el_widgets_load(); 443 | } 444 | 445 | 446 | add_action( 'wp_enqueue_scripts', function() { 447 | wp_dequeue_style('elementor-global'); 448 | }); -------------------------------------------------------------------------------- /inc/elementor-widgets/widgets/team-member.php: -------------------------------------------------------------------------------- 1 | start_controls_section( 50 | 'team_sectcontent', 51 | [ 52 | 'label' => __( 'Team Section Top', 'datarc-companion' ), 53 | ] 54 | ); 55 | $this->add_control( 56 | 'sect_title', [ 57 | 'label' => __( 'Title', 'datarc-companion' ), 58 | 'type' => Controls_Manager::TEXT, 59 | 60 | ] 61 | ); 62 | $this->add_control( 63 | 'sect_subtitle', [ 64 | 'label' => __( 'Sub Title', 'datarc-companion' ), 65 | 'type' => Controls_Manager::TEXT, 66 | 67 | ] 68 | ); 69 | 70 | $this->end_controls_section(); // End section top content 71 | // ---------------------------------------- Team Member content ------------------------------ 72 | $this->start_controls_section( 73 | 'team_memcontent', 74 | [ 75 | 'label' => __( 'Team Member', 'datarc-companion' ), 76 | ] 77 | ); 78 | $this->add_control( 79 | 'teamslider', [ 80 | 'label' => __( 'Create Team Member', 'datarc-companion' ), 81 | 'type' => Controls_Manager::REPEATER, 82 | 'title_field' => '{{{ label }}}', 83 | 'fields' => [ 84 | [ 85 | 'name' => 'label', 86 | 'label' => __( 'Name', 'datarc-companion' ), 87 | 'type' => Controls_Manager::TEXT, 88 | 'label_block' => true, 89 | 'default' => 'Name' 90 | ], 91 | [ 92 | 'name' => 'desig', 93 | 'label' => __( 'Designation', 'datarc-companion' ), 94 | 'type' => Controls_Manager::TEXT, 95 | ], 96 | [ 97 | 'name' => 'desc', 98 | 'label' => __( 'Descriptions', 'datarc-companion' ), 99 | 'type' => Controls_Manager::TEXTAREA, 100 | ], 101 | [ 102 | 'name' => 'img', 103 | 'label' => __( 'Photo', 'datarc-companion' ), 104 | 'type' => Controls_Manager::MEDIA, 105 | ], 106 | [ 107 | 'name' => 'fburl', 108 | 'label' => __( 'Facebook Url', 'datarc-companion' ), 109 | 'type' => Controls_Manager::URL, 110 | 'show_external' => false, 111 | ], 112 | [ 113 | 'name' => 'twiturl', 114 | 'label' => __( 'Twitter Url', 'datarc-companion' ), 115 | 'type' => Controls_Manager::URL, 116 | 'show_external' => false, 117 | ], 118 | [ 119 | 'name' => 'pinturl', 120 | 'label' => __( 'Pinterest Url', 'datarc-companion' ), 121 | 'type' => Controls_Manager::URL, 122 | 'show_external' => false, 123 | ], 124 | [ 125 | 'name' => 'driburl', 126 | 'label' => __( 'Dribbble Url', 'datarc-companion' ), 127 | 'type' => Controls_Manager::URL, 128 | 'show_external' => false, 129 | ], 130 | ], 131 | ] 132 | ); 133 | 134 | $this->end_controls_section(); // End Team Member content 135 | 136 | /** 137 | * Style Tab 138 | * ------------------------------ Style Title ------------------------------ 139 | * 140 | */ 141 | $this->start_controls_section( 142 | 'style_title', [ 143 | 'label' => __( 'Style Title', 'datarc-companion' ), 144 | 'tab' => Controls_Manager::TAB_STYLE, 145 | ] 146 | ); 147 | 148 | $this->add_control( 149 | 'color_title', [ 150 | 'label' => __( 'Title Color', 'datarc-companion' ), 151 | 'type' => Controls_Manager::COLOR, 152 | 'selectors' => [ 153 | '{{WRAPPER}} .product-area-title h2.h1' => 'color: {{VALUE}};', 154 | ], 155 | ] 156 | ); 157 | $this->add_group_control( 158 | Group_Control_Typography::get_type(), [ 159 | 'name' => 'typography_title', 160 | 'selector' => '{{WRAPPER}} .product-area-title h2.h1', 161 | ] 162 | ); 163 | $this->add_group_control( 164 | Group_Control_Text_Shadow::get_type(), [ 165 | 'name' => 'text_shadow_title', 166 | 'selector' => '{{WRAPPER}} .product-area-title h2.h1', 167 | ] 168 | ); 169 | $this->end_controls_section(); 170 | 171 | 172 | //------------------------------ Style Sub Title ------------------------------ 173 | $this->start_controls_section( 174 | 'style_subtitle', [ 175 | 'label' => __( 'Style Sub Title', 'datarc-companion' ), 176 | 'tab' => Controls_Manager::TAB_STYLE, 177 | ] 178 | ); 179 | $this->add_control( 180 | 'color_subtitle', [ 181 | 'label' => __( 'Title Color', 'datarc-companion' ), 182 | 'type' => Controls_Manager::COLOR, 183 | 'selectors' => [ 184 | '{{WRAPPER}} .product-area-title p' => 'color: {{VALUE}};', 185 | ], 186 | ] 187 | ); 188 | $this->add_group_control( 189 | Group_Control_Typography::get_type(), [ 190 | 'name' => 'typography_subtitle', 191 | 'selector' => '{{WRAPPER}} .product-area-title p', 192 | ] 193 | ); 194 | $this->add_group_control( 195 | Group_Control_Text_Shadow::get_type(), [ 196 | 'name' => 'text_shadow_subtitle', 197 | 'selector' => '{{WRAPPER}} .product-area-title p', 198 | ] 199 | ); 200 | $this->end_controls_section(); 201 | 202 | 203 | //------------------------------ Style Team Member Content ------------------------------ 204 | $this->start_controls_section( 205 | 'style_teaminfo', [ 206 | 'label' => __( 'Style Team Member Info', 'datarc-companion' ), 207 | 'tab' => Controls_Manager::TAB_STYLE, 208 | ] 209 | ); 210 | $this->add_control( 211 | 'team_imghov', 212 | [ 213 | 'label' => __( 'Member Image Hover Color', 'datarc-companion' ), 214 | 'type' => \Elementor\Controls_Manager::HEADING, 215 | 'separator' => 'before', 216 | ] 217 | ); 218 | $this->add_group_control( 219 | Group_Control_Background::get_type(), 220 | [ 221 | 'name' => 'memberimghoverbg', 222 | 'label' => __( 'Background', 'datarc-companion' ), 223 | 'types' => [ 'gradient' ], 224 | 'selector' => '{{WRAPPER}} .single-member .thumb .overlay-member', 225 | ] 226 | ); 227 | // 228 | $this->add_control( 229 | 'team_nameopt', 230 | [ 231 | 'label' => __( 'Name Style', 'datarc-companion' ), 232 | 'type' => \Elementor\Controls_Manager::HEADING, 233 | 'separator' => 'before', 234 | ] 235 | ); 236 | $this->add_control( 237 | 'color_name', [ 238 | 'label' => __( 'Name Color', 'datarc-companion' ), 239 | 'type' => Controls_Manager::COLOR, 240 | 'selectors' => [ 241 | '{{WRAPPER}} .single-member .desc h5' => 'color: {{VALUE}};', 242 | ], 243 | ] 244 | ); 245 | $this->add_group_control( 246 | Group_Control_Typography::get_type(), [ 247 | 'name' => 'typography_name', 248 | 'selector' => '{{WRAPPER}} .single-member .desc h5', 249 | ] 250 | ); 251 | // 252 | $this->add_control( 253 | 'team_desigopt', 254 | [ 255 | 'label' => __( 'Designation Style', 'datarc-companion' ), 256 | 'type' => \Elementor\Controls_Manager::HEADING, 257 | 'separator' => 'before', 258 | ] 259 | ); 260 | $this->add_control( 261 | 'color_desigopt', [ 262 | 'label' => __( 'Designation Color', 'datarc-companion' ), 263 | 'type' => Controls_Manager::COLOR, 264 | 'selectors' => [ 265 | '{{WRAPPER}} .single-member .desc p' => 'color: {{VALUE}};', 266 | ], 267 | ] 268 | ); 269 | $this->add_group_control( 270 | Group_Control_Typography::get_type(), [ 271 | 'name' => 'typography_desigopt', 272 | 'selector' => '{{WRAPPER}} .single-member .desc p', 273 | ] 274 | ); 275 | 276 | // 277 | $this->add_control( 278 | 'team_discopt', 279 | [ 280 | 'label' => __( 'Description Style', 'datarc-companion' ), 281 | 'type' => \Elementor\Controls_Manager::HEADING, 282 | 'separator' => 'before', 283 | ] 284 | ); 285 | $this->add_control( 286 | 'color_discopt', [ 287 | 'label' => __( 'Description Color', 'datarc-companion' ), 288 | 'type' => Controls_Manager::COLOR, 289 | 'selectors' => [ 290 | '{{WRAPPER}} .single-member .overlay-member p' => 'color: {{VALUE}};', 291 | ], 292 | ] 293 | ); 294 | 295 | // 296 | $this->add_control( 297 | 'team_iconopt', 298 | [ 299 | 'label' => __( 'Icon Style', 'datarc-companion' ), 300 | 'type' => \Elementor\Controls_Manager::HEADING, 301 | 'separator' => 'before', 302 | ] 303 | ); 304 | $this->add_control( 305 | 'color_iconopt', [ 306 | 'label' => __( 'Icon Color', 'datarc-companion' ), 307 | 'type' => Controls_Manager::COLOR, 308 | 'selectors' => [ 309 | '{{WRAPPER}} .single-member .thumb .overlay-member .social a' => 'color: {{VALUE}};', 310 | ], 311 | ] 312 | ); 313 | $this->add_control( 314 | 'color_iconhovopt', [ 315 | 'label' => __( 'Icon Hover Color', 'datarc-companion' ), 316 | 'type' => Controls_Manager::COLOR, 317 | 'selectors' => [ 318 | '{{WRAPPER}} .single-member .thumb .overlay-member .social a:hover' => 'color: {{VALUE}};', 319 | ], 320 | ] 321 | ); 322 | $this->add_control( 323 | 'typography_iconopt', 324 | [ 325 | 'label' => __( 'Icon Font Size', 'datarc-companion' ), 326 | 'type' => Controls_Manager::SLIDER, 327 | 'size_units' => [ 'px', '%' ], 328 | 'range' => [ 329 | 'px' => [ 330 | 'min' => 0, 331 | 'max' => 1000, 332 | 'step' => 1, 333 | ], 334 | '%' => [ 335 | 'min' => 0, 336 | 'max' => 100, 337 | ], 338 | ], 339 | 'default' => [ 340 | 'unit' => 'px', 341 | 'size' => 14, 342 | ], 343 | 'selectors' => [ 344 | '{{WRAPPER}} .single-member .thumb .overlay-member .social a' => 'font-size: {{SIZE}}{{UNIT}};', 345 | ], 346 | ] 347 | ); 348 | 349 | $this->end_controls_section(); 350 | 351 | } 352 | 353 | protected function render() { 354 | 355 | $settings = $this->get_settings(); 356 | 357 | ?> 358 | 359 |
360 |
361 | 365 | 366 |
367 | 368 | 0 ): 370 | foreach( $settings['teamslider'] as $team ): 371 | 372 | // Member Picture 373 | $bgUrl = ''; 374 | if( !empty( $team['img']['url'] ) ){ 375 | $bgUrl = $team['img']['url']; 376 | } 377 | 378 | 379 | ?> 380 |
381 |
382 |
> 383 |
384 | esc_html( $team['desc'] ), 390 | ) 391 | ); 392 | } 393 | ?> 394 |
395 | 398 | 420 | 423 |
424 |
425 |
426 | 'h5', 432 | 'class' => 'text-uppercase', 433 | 'text' => esc_html( $team['label'] ) 434 | ) 435 | ); 436 | } 437 | // Designation 438 | if( !empty( $team['desig'] ) ){ 439 | echo datarc_paragraph_tag( 440 | array( 441 | 'text' => esc_html( $team['desig'] ) 442 | ) 443 | ); 444 | } 445 | ?> 446 |
447 |
448 |
449 | 453 | 454 |
455 |
456 |
457 | 458 |