first commit
This commit is contained in:
3
wp-content/plugins/thinkai-plugin/assets/admin.css
Normal file
3
wp-content/plugins/thinkai-plugin/assets/admin.css
Normal file
@@ -0,0 +1,3 @@
|
||||
.post-type-thinkai_service .cmb-row.cmb-type-checkbox.cmb2-id-enable-sidebar-setting {
|
||||
display: none !important;
|
||||
}
|
||||
0
wp-content/plugins/thinkai-plugin/assets/admin2.css
Normal file
0
wp-content/plugins/thinkai-plugin/assets/admin2.css
Normal file
@@ -0,0 +1,32 @@
|
||||
.radio-image-item .field-radio-image{
|
||||
display: none;
|
||||
}
|
||||
.radio-image-item{
|
||||
border:1px solid #eaeaea;
|
||||
position:relative;
|
||||
}
|
||||
.radio-image-item label{
|
||||
cursor: pointer;
|
||||
}
|
||||
.radio-image-item:not(:first-child){
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
.radio-image-item label img{
|
||||
width:100%;
|
||||
}
|
||||
.radio-image-item.selected{
|
||||
-webkit-box-shadow: 0px 0px 5px 2px rgba(201, 243, 29, 0.75);
|
||||
-moz-box-shadow: 0px 0px 5px 2px rgba(201, 243, 29,0.75);
|
||||
box-shadow: 0px 0px 5px 2px rgba(201, 243, 29,0.75);
|
||||
}
|
||||
.radio-image-item.selected:before{
|
||||
content:'selected';
|
||||
position:absolute;
|
||||
right:0px;
|
||||
top:0px;
|
||||
background:#c9f31d;
|
||||
font-size:12px;
|
||||
padding:6px;
|
||||
color:#121212;
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<dwsync>
|
||||
<file name="particles-config.js" server="ftp.wp1.themevibrant.com/newwp/thinkai/wp-content/" local="133596465026016838" remote="133596285000000000" Dst="0" />
|
||||
<file name="particles.min.js" server="ftp.wp1.themevibrant.com/newwp/thinkai/wp-content/" local="133596465026244590" remote="133596285000000000" Dst="0" />
|
||||
<file name="banner.js" server="ftp.wp1.themevibrant.com/newwp/thinkai/wp-content/" local="133596466229793216" remote="133596286200000000" Dst="0" />
|
||||
</dwsync>
|
||||
63
wp-content/plugins/thinkai-plugin/assets/js/accordion.js
Normal file
63
wp-content/plugins/thinkai-plugin/assets/js/accordion.js
Normal file
@@ -0,0 +1,63 @@
|
||||
(function($) {
|
||||
|
||||
"use strict";
|
||||
var accordion_script_js = function($scope, $) {
|
||||
|
||||
|
||||
/*--------------------------------------------------------------
|
||||
Accordion Active Style1
|
||||
--------------------------------------------------------------*/
|
||||
function accordionActive() {
|
||||
if ($('.accordion-box-style1').length) {
|
||||
$(".accordion-box-style1").on('click', '.acc-accord-btn', function () {
|
||||
|
||||
if ($(this).hasClass('active') !== true) {
|
||||
$('.acc-accordion .acc-accord-btn').removeClass('active');
|
||||
|
||||
}
|
||||
|
||||
if ($(this).next('.acc-accord-content').is(':visible')) {
|
||||
$(this).removeClass('active');
|
||||
$(this).next('.acc-accord-content').slideUp(500);
|
||||
} else {
|
||||
$(this).addClass('active');
|
||||
$('.acc-accordion .acc-accord-content').slideUp(500);
|
||||
$(this).next('.acc-accord-content').slideDown(500);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------
|
||||
Accordion Active Style2
|
||||
--------------------------------------------------------------*/
|
||||
function accordionActive2() {
|
||||
if ($('.accordion-box-style2').length) {
|
||||
$(".accordion-box-style2").on('click', '.accord-btn', function () {
|
||||
|
||||
if ($(this).hasClass('active') !== true) {
|
||||
$('.accordion .accord-btn').removeClass('active');
|
||||
|
||||
}
|
||||
|
||||
if ($(this).next('.accord-content').is(':visible')) {
|
||||
$(this).removeClass('active');
|
||||
$(this).next('.accord-content').slideUp(500);
|
||||
} else {
|
||||
$(this).addClass('active');
|
||||
$('.accordion .accord-content').slideUp(500);
|
||||
$(this).next('.accord-content').slideDown(500);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
accordionActive();
|
||||
accordionActive2();
|
||||
|
||||
};
|
||||
$(window).on('elementor/frontend/init', function () {
|
||||
elementorFrontend.hooks.addAction('frontend/element_ready/thinkai_faqs.default', accordion_script_js);
|
||||
});
|
||||
|
||||
})(window.jQuery);
|
||||
92
wp-content/plugins/thinkai-plugin/assets/js/banner.js
Normal file
92
wp-content/plugins/thinkai-plugin/assets/js/banner.js
Normal file
@@ -0,0 +1,92 @@
|
||||
(function($) {
|
||||
|
||||
"use strict";
|
||||
var banner_script_js = function($scope, $) {
|
||||
|
||||
// Curved Circle
|
||||
if ($('.curved-circle').length) {
|
||||
$('.curved-circle').circleType({
|
||||
position: 'absolute',
|
||||
dir: 1,
|
||||
radius: 85,
|
||||
forceHeight: true,
|
||||
forceWidth: true
|
||||
});
|
||||
}
|
||||
|
||||
// Curved Circle 2
|
||||
if ($('.curved-circle-2').length) {
|
||||
$('.curved-circle-2').circleType({
|
||||
position: 'absolute',
|
||||
dir: 1,
|
||||
radius: 80,
|
||||
forceHeight: true,
|
||||
forceWidth: true
|
||||
});
|
||||
}
|
||||
|
||||
//Jquery Curved 3
|
||||
if ($('.curved-circle-3').length) {
|
||||
$('.curved-circle-3').circleType({
|
||||
position: 'absolute',
|
||||
dir: 1,
|
||||
radius: -57,
|
||||
forceHeight: true,
|
||||
forceWidth: true
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// Vegas Slider
|
||||
if ($(".slider-bg-slide").length) {
|
||||
$(".slider-bg-slide").each(function () {
|
||||
var Self = $(this);
|
||||
var bgSlidesOptions = Self.data("options");
|
||||
var bannersTwoSlides = Self.vegas(bgSlidesOptions);
|
||||
});
|
||||
}
|
||||
|
||||
//Banner Carousel
|
||||
if ($(".thm-owl__carousel").length) {
|
||||
$(".thm-owl__carousel").each(function () {
|
||||
let elm = $(this);
|
||||
let options = elm.data('owl-options');
|
||||
let thmOwlCarousel = elm.owlCarousel(options);
|
||||
});
|
||||
}
|
||||
|
||||
// particular Animation
|
||||
if ($(".particular").length) {
|
||||
$(".particular").jParticle({
|
||||
background: "rgba(0,0,0, 0.0)",
|
||||
color: "#e7e3ed",
|
||||
particlesNumber: 150,
|
||||
particle: {
|
||||
speed: 20
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// particular Animation
|
||||
if ($(".particular-top").length) {
|
||||
$(".particular-top").jParticle({
|
||||
background: "rgba(0,0,0, 0.0)",
|
||||
color: "#e7e3ed",
|
||||
particlesNumber: 150,
|
||||
particle: {
|
||||
speed: 20,
|
||||
width: 1
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
};
|
||||
$(window).on('elementor/frontend/init', function () {
|
||||
elementorFrontend.hooks.addAction('frontend/element_ready/thinkai_banner.default', banner_script_js);
|
||||
elementorFrontend.hooks.addAction('frontend/element_ready/thinkai_about_us.default', banner_script_js);
|
||||
});
|
||||
|
||||
})(window.jQuery);
|
||||
21
wp-content/plugins/thinkai-plugin/assets/js/cm-counter.js
Normal file
21
wp-content/plugins/thinkai-plugin/assets/js/cm-counter.js
Normal file
@@ -0,0 +1,21 @@
|
||||
(function($) {
|
||||
|
||||
"use strict";
|
||||
var cm_counter_script_js = function($scope, $) {
|
||||
|
||||
if ($('.time-countdown-two').length) {
|
||||
$('.time-countdown-two').each(function () {
|
||||
var Self = $(this);
|
||||
var countDate = Self.data('countdown-time'); // getting date
|
||||
|
||||
Self.countdown(countDate, function (event) {
|
||||
$(this).html('<li> <div class="box"> <span class="days">' + event.strftime('%D') + '</span> <span class="timeRef">days</span> </div> </li> <li> <div class="box"> <span class="hours">' + event.strftime('%H') + '</span> <span class="timeRef clr-1">Hours</span> </div> </li> <li> <div class="box"> <span class="minutes">' + event.strftime('%M') + '</span> <span class="timeRef clr-2">Minutes</span> </div> </li> <li> <div class="box"> <span class="seconds">' + event.strftime('%S') + '</span> <span class="timeRef clr-3">Seconds</span> </div> </li>');
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
$(window).on('elementor/frontend/init', function () {
|
||||
elementorFrontend.hooks.addAction('frontend/element_ready/thinkai_coming_soon.default', cm_counter_script_js);
|
||||
});
|
||||
|
||||
})(window.jQuery);
|
||||
@@ -0,0 +1,45 @@
|
||||
(function($) {
|
||||
|
||||
"use strict";
|
||||
var feature_carousels_script_js = function($scope, $) {
|
||||
|
||||
/*--------------------------------------------------------------
|
||||
Owl Slider
|
||||
--------------------------------------------------------------*/
|
||||
function thmOwlInit() {
|
||||
if ($(".thm-owl__carousel").length) {
|
||||
$(".thm-owl__carousel").each(function () {
|
||||
let elm = $(this);
|
||||
let options = elm.data('owl-options');
|
||||
let thmOwlCarousel = elm.owlCarousel(options);
|
||||
});
|
||||
}
|
||||
|
||||
if ($(".thm-owl__carousel--custom-nav").length) {
|
||||
$(".thm-owl__carousel--custom-nav").each(function () {
|
||||
let elm = $(this);
|
||||
let owlNavPrev = elm.data('owl-nav-prev');
|
||||
let owlNavNext = elm.data('owl-nav-next');
|
||||
$(owlNavPrev).on("click", function (e) {
|
||||
elm.trigger('prev.owl.carousel');
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
$(owlNavNext).on("click", function (e) {
|
||||
elm.trigger('next.owl.carousel');
|
||||
e.preventDefault();
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
thmOwlInit();
|
||||
};
|
||||
$(window).on('elementor/frontend/init', function () {
|
||||
elementorFrontend.hooks.addAction('frontend/element_ready/thinkai_feature_carousel.default', feature_carousels_script_js);
|
||||
elementorFrontend.hooks.addAction('frontend/element_ready/thinkai_testimonial_carousel.default', feature_carousels_script_js);
|
||||
elementorFrontend.hooks.addAction('frontend/element_ready/thinkai_clients_Carousel.default', feature_carousels_script_js);
|
||||
elementorFrontend.hooks.addAction('frontend/element_ready/thinkai_blog_carousel.default', feature_carousels_script_js);
|
||||
});
|
||||
|
||||
})(window.jQuery);
|
||||
118
wp-content/plugins/thinkai-plugin/assets/js/particles-config.js
Normal file
118
wp-content/plugins/thinkai-plugin/assets/js/particles-config.js
Normal file
@@ -0,0 +1,118 @@
|
||||
|
||||
if (('#particles-js').length) {
|
||||
particlesJS("particles-js", {
|
||||
"particles": {
|
||||
"number": {
|
||||
"value": 180,
|
||||
"density": {
|
||||
"enable": true,
|
||||
"value_area": 800
|
||||
}
|
||||
},
|
||||
"color": {
|
||||
"value": "#e1dee5" //mh--------- dot color
|
||||
},
|
||||
"shape": {
|
||||
"type": "circle",
|
||||
"stroke": {
|
||||
"width": 1, //// dot width mh
|
||||
"color": "#e1dee5" //// dot border color mh
|
||||
},
|
||||
"polygon": {
|
||||
"nb_sides": 5
|
||||
},
|
||||
"image": {
|
||||
"src": "img/github.svg",
|
||||
"width": 100,
|
||||
"height": 100
|
||||
}
|
||||
},
|
||||
"opacity": {
|
||||
"value": 1.0, //// mh opacity
|
||||
"random": false,
|
||||
"anim": {
|
||||
"enable": false,
|
||||
"speed": 1,
|
||||
"opacity_min": 1.0,
|
||||
"sync": false
|
||||
}
|
||||
},
|
||||
"size": {
|
||||
"value": 2, // width dot
|
||||
"random": true,
|
||||
"anim": {
|
||||
"enable": false,
|
||||
"speed": 10,
|
||||
"size_min": 0.1,
|
||||
"sync": false
|
||||
}
|
||||
},
|
||||
"line_linked": {
|
||||
"enable": true,
|
||||
"distance": 150, // dot many mh
|
||||
"color": "#e1dee5", // line color mh--------
|
||||
"opacity": 1.0, //--------
|
||||
"width": 1
|
||||
},
|
||||
"move": {
|
||||
"enable": true,
|
||||
"speed": 6,
|
||||
"direction": "none",
|
||||
"random": false,
|
||||
"straight": false,
|
||||
"out_mode": "out",
|
||||
"bounce": false,
|
||||
"attract": {
|
||||
"enable": false,
|
||||
"rotateX": 600,
|
||||
"rotateY": 1200
|
||||
}
|
||||
}
|
||||
},
|
||||
"interactivity": {
|
||||
"detect_on": "canvas",
|
||||
"events": {
|
||||
"onhover": {
|
||||
"enable": true,
|
||||
"mode": "repulse"
|
||||
},
|
||||
"onclick": {
|
||||
"enable": true,
|
||||
"mode": "push"
|
||||
},
|
||||
"resize": true
|
||||
},
|
||||
"modes": {
|
||||
"grab": {
|
||||
"distance": 400,
|
||||
"line_linked": {
|
||||
"opacity": 1
|
||||
}
|
||||
},
|
||||
"bubble": {
|
||||
"distance": 400,
|
||||
"size": 40,
|
||||
"duration": 2,
|
||||
"opacity": 8,
|
||||
"speed": 3
|
||||
},
|
||||
"repulse": {
|
||||
"distance": 100,
|
||||
"duration": 0.4
|
||||
},
|
||||
"push": {
|
||||
"particles_nb": 4
|
||||
},
|
||||
"remove": {
|
||||
"particles_nb": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"retina_detect": true
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
12
wp-content/plugins/thinkai-plugin/assets/js/particles.min.js
vendored
Normal file
12
wp-content/plugins/thinkai-plugin/assets/js/particles.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
50
wp-content/plugins/thinkai-plugin/assets/js/pricing-tabs.js
Normal file
50
wp-content/plugins/thinkai-plugin/assets/js/pricing-tabs.js
Normal file
@@ -0,0 +1,50 @@
|
||||
(function($) {
|
||||
|
||||
"use strict";
|
||||
var pricing_tab_script_js = function($scope, $) {
|
||||
|
||||
if ($("#switch-toggle-tab").length) {
|
||||
var toggleSwitch = $("#switch-toggle-tab label.switch");
|
||||
var TabTitle = $("#switch-toggle-tab li");
|
||||
var monthTabTitle = $("#switch-toggle-tab li.month");
|
||||
var yearTabTitle = $("#switch-toggle-tab li.year");
|
||||
var monthTabContent = $("#month");
|
||||
var yearTabContent = $("#year");
|
||||
// hidden show deafult;
|
||||
monthTabContent.fadeIn();
|
||||
yearTabContent.fadeOut();
|
||||
|
||||
function toggleHandle() {
|
||||
if (toggleSwitch.hasClass("on")) {
|
||||
monthTabContent.fadeIn();
|
||||
yearTabContent.fadeOut();
|
||||
monthTabTitle.addClass("active");
|
||||
yearTabTitle.removeClass("active");
|
||||
} else {
|
||||
monthTabContent.fadeOut();
|
||||
yearTabContent.fadeIn();
|
||||
yearTabTitle.addClass("active");
|
||||
monthTabTitle.removeClass("active");
|
||||
}
|
||||
}
|
||||
monthTabTitle.on("click", function () {
|
||||
toggleSwitch.addClass("on").removeClass("off");
|
||||
toggleHandle();
|
||||
return false;
|
||||
});
|
||||
yearTabTitle.on("click", function () {
|
||||
toggleSwitch.addClass("off").removeClass("on");
|
||||
toggleHandle();
|
||||
return false;
|
||||
});
|
||||
toggleSwitch.on("click", function () {
|
||||
toggleSwitch.toggleClass("on off");
|
||||
toggleHandle();
|
||||
});
|
||||
}
|
||||
};
|
||||
$(window).on('elementor/frontend/init', function () {
|
||||
elementorFrontend.hooks.addAction('frontend/element_ready/thinkai_pricing_plan.default', pricing_tab_script_js);
|
||||
});
|
||||
|
||||
})(window.jQuery);
|
||||
55
wp-content/plugins/thinkai-plugin/assets/js/video-banner.js
Normal file
55
wp-content/plugins/thinkai-plugin/assets/js/video-banner.js
Normal file
@@ -0,0 +1,55 @@
|
||||
(function($) {
|
||||
|
||||
"use strict";
|
||||
var video_banner_script_js = function($scope, $) {
|
||||
|
||||
// Video------------------
|
||||
if ($(".video-holder-wrap").length > 0) {
|
||||
function videoint() {
|
||||
const w = $(".background-vimeo").data("vim"),
|
||||
bvc = $(".background-vimeo"),
|
||||
bvmc = $(".media-container"),
|
||||
bvfc = $(".background-vimeo iframe "),
|
||||
vch = $(".video-container");
|
||||
bvc.append('<iframe src="//player.vimeo.com/video/' + w + '?background=1" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen ></iframe>');
|
||||
$(".video-holder").height(bvmc.height());
|
||||
if ($(window).width() > 1024) {
|
||||
if ($(".video-holder").length > 0)
|
||||
if (bvmc.height() / 9 * 16 > bvmc.width()) {
|
||||
bvfc.height(bvmc.height()).width(bvmc.height() / 9 * 16);
|
||||
bvfc.css({
|
||||
"margin-left": -1 * $("iframe").width() / 2 + "px",
|
||||
top: "-75px",
|
||||
"margin-top": "0px"
|
||||
});
|
||||
} else {
|
||||
bvfc.width($(window).width()).height($(window).width() / 16 * 9);
|
||||
bvfc.css({
|
||||
"margin-left": -1 * $("iframe").width() / 2 + "px",
|
||||
"margin-top": -1 * $("iframe").height() / 2 + "px",
|
||||
top: "50%"
|
||||
});
|
||||
}
|
||||
} else if ($(window).width() < 760) {
|
||||
$(".video-holder").height(bvmc.height());
|
||||
bvfc.height(bvmc.height());
|
||||
} else {
|
||||
$(".video-holder").height(bvmc.height());
|
||||
bvfc.height(bvmc.height());
|
||||
}
|
||||
vch.css("width", $(window).width() + "px");
|
||||
vch.css("height", Number(720 / 1280 * $(window).width()) + "px");
|
||||
if (vch.height() < $(window).height()) {
|
||||
vch.css("height", $(window).height() + "px");
|
||||
vch.css("width", Number(1280 / 720 * $(window).height()) + "px");
|
||||
}
|
||||
}
|
||||
videoint();
|
||||
}
|
||||
|
||||
};
|
||||
$(window).on('elementor/frontend/init', function () {
|
||||
elementorFrontend.hooks.addAction('frontend/element_ready/thinkai_video_banner.default', video_banner_script_js);
|
||||
});
|
||||
|
||||
})(window.jQuery);
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<dwsync>
|
||||
<file name="project_masonry.php" server="ftp.wp1.themevibrant.com/newwp/thinkai/wp-content/" local="133596421685277385" remote="133596241200000000" Dst="0" />
|
||||
<file name="banner.php" server="ftp.wp1.themevibrant.com/newwp/thinkai/wp-content/" local="133596464655841436" remote="133596284400000000" Dst="0" />
|
||||
<file name="blog_list_view.php" server="ftp.wp1.themevibrant.com/newwp/thinkai/wp-content/" local="133596468071767503" remote="133596288000000000" Dst="0" />
|
||||
</dwsync>
|
||||
488
wp-content/plugins/thinkai-plugin/elementor/about_us.php
Normal file
488
wp-content/plugins/thinkai-plugin/elementor/about_us.php
Normal file
@@ -0,0 +1,488 @@
|
||||
<?php namespace THINKAIPLUGIN\Element;
|
||||
|
||||
use Elementor\Controls_Manager;
|
||||
use Elementor\Controls_Stack;
|
||||
use Elementor\Group_Control_Typography;
|
||||
use Elementor\Group_Control_Border;
|
||||
use Elementor\Repeater;
|
||||
use Elementor\Widget_Base;
|
||||
use Elementor\Utils;
|
||||
use Elementor\Group_Control_Text_Shadow;
|
||||
use \Elementor\Group_Control_Box_Shadow;
|
||||
use \Elementor\Group_Control_Background;
|
||||
use \Elementor\Group_Control_Image_Size;
|
||||
use \Elementor\Group_Control_Text_Stroke;
|
||||
use Elementor\Plugin;
|
||||
|
||||
/**
|
||||
* Elementor button widget.
|
||||
* Elementor widget that displays a button with the ability to control every
|
||||
* aspect of the button design.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class About_Us extends Widget_Base {
|
||||
|
||||
/**
|
||||
* Get widget name.
|
||||
* Retrieve button widget name.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget name.
|
||||
*/
|
||||
public function get_name() {
|
||||
return 'thinkai_about_us';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget title.
|
||||
* Retrieve button widget title.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget title.
|
||||
*/
|
||||
public function get_title() {
|
||||
return esc_html__( 'Thinkai About Us', 'thinkai' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget icon.
|
||||
* Retrieve button widget icon.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget icon.
|
||||
*/
|
||||
public function get_icon() {
|
||||
return 'eicon-gallery-grid';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget categories.
|
||||
* Retrieve the list of categories the button widget belongs to.
|
||||
* Used to determine where to display the widget in the editor.
|
||||
*
|
||||
* @since 2.0.0
|
||||
* @access public
|
||||
* @return array Widget categories.
|
||||
*/
|
||||
public function get_categories() {
|
||||
return [ 'thinkai' ];
|
||||
}
|
||||
|
||||
public function get_script_depends() {
|
||||
wp_register_script( 'curved-script', YT_URL . 'assets/js/banner.js', [ 'elementor-frontend' ], '1.0.0', true );
|
||||
return [ 'curved-script' ];
|
||||
}
|
||||
|
||||
/**
|
||||
* Register button widget controls.
|
||||
* Adds different input fields to allow the user to change and customize the widget settings.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*/
|
||||
protected function register_controls() {
|
||||
$this->start_controls_section(
|
||||
'about_us',
|
||||
[
|
||||
'label' => esc_html__( 'Thinkai About Us', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
|
||||
//Layout
|
||||
$this->add_control(
|
||||
'layout_control',
|
||||
[
|
||||
'label' => esc_html__( 'Layout Style', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => '1',
|
||||
'options' => array(
|
||||
'1' => esc_html__( 'Style One ', 'thinkai'),
|
||||
'2' => esc_html__( 'Style Two ', 'thinkai'),
|
||||
),
|
||||
]
|
||||
);
|
||||
|
||||
//show_particles
|
||||
$this->add_control(
|
||||
'show_particles',
|
||||
[
|
||||
'label' => esc_html__( 'Enable Particles', 'thinkai' ),
|
||||
'type' => Controls_Manager::SWITCHER,
|
||||
'label_on' => esc_html__( 'On', 'thinkai' ),
|
||||
'label_off' => esc_html__( 'Off', 'thinkai' ),
|
||||
'return_value' => 'yes',
|
||||
'default' => 'no',
|
||||
'condition' => [
|
||||
'layout_control' => '2',
|
||||
],
|
||||
]
|
||||
);
|
||||
//features_list
|
||||
$this->add_control(
|
||||
'features_list',
|
||||
[
|
||||
'label' => __( 'Feature List', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::TEXTAREA,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'placeholder' => __( 'Enter your List', 'thinkai' ),
|
||||
'condition' => [
|
||||
'layout_control' => '2',
|
||||
],
|
||||
]
|
||||
);
|
||||
//Shape img
|
||||
$this->add_control(
|
||||
'shape_img',
|
||||
[
|
||||
'label' => __( 'Shape Image', 'thinkai' ),
|
||||
'type' => Controls_Manager::MEDIA,
|
||||
'default' => ['url' => Utils::get_placeholder_image_src(),],
|
||||
'condition' => [
|
||||
'layout_control' => '1',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
//Feature img
|
||||
$this->add_control(
|
||||
'feature_img',
|
||||
[
|
||||
'label' => __( 'Feature Image', 'thinkai' ),
|
||||
'type' => Controls_Manager::MEDIA,
|
||||
'default' => ['url' => Utils::get_placeholder_image_src(),],
|
||||
'condition' => [
|
||||
'layout_control' => '2'
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
//show_Round Text
|
||||
$this->add_control(
|
||||
'show_round_text',
|
||||
[
|
||||
'label' => esc_html__( 'Enable Round Text', 'thinkai' ),
|
||||
'type' => Controls_Manager::SWITCHER,
|
||||
'label_on' => esc_html__( 'On', 'thinkai' ),
|
||||
'label_off' => esc_html__( 'Off', 'thinkai' ),
|
||||
'return_value' => 'yes',
|
||||
'default' => 'no',
|
||||
'condition' => [
|
||||
'layout_control' => '2',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'round_text_v1',
|
||||
[
|
||||
'label' => __( 'Round Text V1', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'default' => esc_html__( 'AI-Driven Visual Wonders', 'thinkai' ),
|
||||
'condition' => [
|
||||
'layout_control' => '2',
|
||||
'show_round_text' => 'yes',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'round_text_v2',
|
||||
[
|
||||
'label' => __( 'Round Text V2', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'default' => esc_html__( 'AI-Driven Visual Wonders', 'thinkai' ),
|
||||
'condition' => [
|
||||
'layout_control' => '2',
|
||||
'show_round_text' => 'yes',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
//Sub Title
|
||||
$this->add_control(
|
||||
'subtitle',
|
||||
[
|
||||
'label' => __( 'Sub Title', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'default' => esc_html__( '[ ABOUT THINKAI ]', 'thinkai' ),
|
||||
'condition' => [
|
||||
'layout_control' => ['1','2']
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
//Title
|
||||
$this->add_control(
|
||||
'title',
|
||||
[
|
||||
'label' => __( 'Title', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::TEXTAREA,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'placeholder' => __( 'Enter your title', 'thinkai' ),
|
||||
'condition' => [
|
||||
'layout_control' => ['1','2']
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
|
||||
//Banner Carousel Repeater
|
||||
$repeater = new Repeater();
|
||||
$repeater->add_control(
|
||||
'tab_title',
|
||||
[
|
||||
'label' => __( 'Title', 'thinkai' ),
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'label_block' => true,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'placeholder' => __( 'Enter your title', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
//Text
|
||||
$repeater->add_control(
|
||||
'tab_text',
|
||||
[
|
||||
'label' => __( 'Description', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::TEXTAREA,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'placeholder' => __( 'Enter your Description', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
//Feature img
|
||||
$repeater->add_control(
|
||||
'feature_image',
|
||||
[
|
||||
'label' => __( 'Feature Image', 'thinkai' ),
|
||||
'type' => Controls_Manager::MEDIA,
|
||||
'default' => ['url' => Utils::get_placeholder_image_src(),],
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'tabs',
|
||||
[
|
||||
'label' => __('Add Tabs Item', 'thinkai'),
|
||||
'type' => Controls_Manager::REPEATER,
|
||||
'fields' => $repeater->get_controls(),
|
||||
'title_field' => '{{{ tab_title }}}',
|
||||
'condition' => [
|
||||
'layout_control' => '1'
|
||||
],
|
||||
'default' => [
|
||||
[
|
||||
'tab_title' => esc_html__( 'Our Experience', 'thinkai' ),
|
||||
'tab_text' => esc_html__( 'Repudiated and annoyances accepted the wise man therefore always holds in these matters to this principle of selection he rejects pleasures to secure other greater pleasures or else he endures.', 'thinkai' ),
|
||||
],
|
||||
[
|
||||
'tab_title' => esc_html__( 'Our Leadership', 'thinkai' ),
|
||||
'tab_text' => esc_html__( 'Repudiated and annoyances accepted the wise man therefore always holds in these matters to this principle of selection he rejects pleasures to secure other greater pleasures or else he endures.', 'thinkai' ),
|
||||
],
|
||||
[
|
||||
'tab_title' => esc_html__( 'Impact &Commitment', 'thinkai' ),
|
||||
'tab_text' => esc_html__( 'Repudiated and annoyances accepted the wise man therefore always holds in these matters to this principle of selection he rejects pleasures to secure other greater pleasures or else he endures.', 'thinkai' ),
|
||||
],
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->end_controls_section();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Render button widget output on the frontend.
|
||||
* Written in PHP and used to generate the final HTML.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*/
|
||||
protected function render() {
|
||||
$settings = $this->get_settings_for_display();
|
||||
$allowed_tags = wp_kses_allowed_html('post');
|
||||
?>
|
||||
|
||||
<?php if($settings['layout_control'] == '2') :?>
|
||||
|
||||
<!--Start Intro Style1-->
|
||||
<section class="Intro-style1">
|
||||
<?php if($settings['show_particles'] == 'yes'){ ?>
|
||||
<div id="particles-js"></div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="Intro-style1__bg" <?php if($settings['feature_img']){ ?>style="background-image: url(<?php echo esc_url(wp_get_attachment_url($settings['feature_img']['id'])); ?>);"<?php } ?>>
|
||||
|
||||
<?php if($settings['show_round_text'] == 'yes'){ ?>
|
||||
<div class="about-round-text-box">
|
||||
<?php if($settings['round_text_v1']){ ?>
|
||||
<div class="about-round-text1">
|
||||
<?php echo wp_kses($settings['round_text_v1'], true); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if($settings['round_text_v2']){ ?>
|
||||
<div class="about-round-text2">
|
||||
<?php echo wp_kses($settings['round_text_v2'], true); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="overlay-logo">
|
||||
<span class="icon-thm-logo1"></span>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$features_list = $settings['features_list'];
|
||||
if(!empty($features_list)){
|
||||
$features_list = explode("\n", ($features_list));
|
||||
?>
|
||||
<!--Start Scrolling Text Style6-->
|
||||
<div class="scrolling-text-style6">
|
||||
<div class="inner">
|
||||
<ul class="clearfix marquee_mode">
|
||||
<?php foreach($features_list as $features): ?>
|
||||
<li data-hover="<?php echo wp_kses($features, true); ?>">
|
||||
<?php echo wp_kses($features, true); ?>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if($settings['subtitle'] || $settings['title']){ ?>
|
||||
<!--End Scrolling Text Style6-->
|
||||
<div class="container">
|
||||
<div class="intro-style1__content">
|
||||
<div class="sec-title sec-title-animation animation-style3">
|
||||
<?php if($settings['subtitle']){ ?>
|
||||
<div class="sub-title">
|
||||
<h4><?php echo wp_kses($settings['subtitle'], true); ?></h4>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if($settings['title']){ ?>
|
||||
<h2 class="title-animation">
|
||||
<?php echo wp_kses($settings['title'], true); ?>
|
||||
</h2>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</section>
|
||||
<!--End Intro Style1-->
|
||||
|
||||
<?php else: ?>
|
||||
|
||||
<!--Start About Style4-->
|
||||
<section class="about-style4">
|
||||
<div class="container">
|
||||
<div class="about-style4__tab">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<!--Start About Style4 Content-->
|
||||
<div class="col-xl-6">
|
||||
<div class="about-style4__content">
|
||||
<?php if($settings['shape_img']){ ?>
|
||||
<div class="shape1">
|
||||
<img src="<?php echo esc_url(wp_get_attachment_url($settings['shape_img']['id'])); ?>" alt="<?php bloginfo( 'name' ); ?>">
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if($settings['subtitle'] || $settings['title']){ ?>
|
||||
<div class="sec-title sec-title-animation animation-style2">
|
||||
<?php if($settings['subtitle']){ ?>
|
||||
<div class="sub-title">
|
||||
<h4><?php echo wp_kses($settings['subtitle'], true); ?></h4>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if($settings['title']){ ?>
|
||||
<h2 class="title-animation">
|
||||
<?php echo wp_kses($settings['title'], true); ?>
|
||||
</h2>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
<div class="about-style4-tab__button">
|
||||
<ul class="tabs-button-box clearfix">
|
||||
<?php
|
||||
foreach($settings['tabs'] as $key => $items):
|
||||
?>
|
||||
<li data-tab="#experience<?php echo esc_attr($key); ?>" class="tab-btn-item <?php if($key == 0) echo 'active-btn-item'; ?>">
|
||||
<span><?php echo wp_kses($items['tab_title'], true); ?></span>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--End About Style4 Content-->
|
||||
|
||||
<!--Start About Style4 Img-->
|
||||
<div class="col-xl-6">
|
||||
<div class="tabs-content-box">
|
||||
<?php
|
||||
foreach($settings['tabs'] as $key => $items):
|
||||
?>
|
||||
<!--Tab-->
|
||||
<div class="tab-content-box-item <?php if($key == 0) echo 'tab-content-box-item-active'; ?>" id="experience<?php echo esc_attr($key); ?>">
|
||||
<div class="about-style4-tab-content-box-item">
|
||||
<div class="about-style4__img">
|
||||
<div class="title-box">
|
||||
<h2><?php echo wp_kses($items['tab_title'], true); ?></h2>
|
||||
<p>
|
||||
<?php echo wp_kses($items['tab_text'], true); ?>
|
||||
</p>
|
||||
</div>
|
||||
<div class="about-style4__img1">
|
||||
<img src="<?php echo esc_url(wp_get_attachment_url($items['feature_image']['id'])); ?>" alt="<?php bloginfo( 'name' ); ?>">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
<!--End About Style4 Img-->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!--End About Style4-->
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
}
|
||||
}
|
||||
1645
wp-content/plugins/thinkai-plugin/elementor/banner.php
Normal file
1645
wp-content/plugins/thinkai-plugin/elementor/banner.php
Normal file
File diff suppressed because it is too large
Load Diff
295
wp-content/plugins/thinkai-plugin/elementor/blog_carousel.php
Normal file
295
wp-content/plugins/thinkai-plugin/elementor/blog_carousel.php
Normal file
@@ -0,0 +1,295 @@
|
||||
<?php
|
||||
|
||||
namespace THINKAIPLUGIN\Element;
|
||||
|
||||
use Elementor\Controls_Manager;
|
||||
use Elementor\Controls_Stack;
|
||||
use Elementor\Group_Control_Typography;
|
||||
use Elementor\Group_Control_Border;
|
||||
use Elementor\Repeater;
|
||||
use Elementor\Widget_Base;
|
||||
use Elementor\Utils;
|
||||
use Elementor\Group_Control_Text_Shadow;
|
||||
use \Elementor\Group_Control_Box_Shadow;
|
||||
use \Elementor\Group_Control_Background;
|
||||
use \Elementor\Group_Control_Image_Size;
|
||||
use \Elementor\Group_Control_Text_Stroke;
|
||||
use Elementor\Plugin;
|
||||
|
||||
/**
|
||||
* Elementor button widget.
|
||||
* Elementor widget that displays a button with the ability to control every
|
||||
* aspect of the button design.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class Blog_Carousel extends Widget_Base {
|
||||
|
||||
/**
|
||||
* Get widget name.
|
||||
* Retrieve button widget name.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget name.
|
||||
*/
|
||||
public function get_name() {
|
||||
return 'thinkai_blog_carousel';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget title.
|
||||
* Retrieve button widget title.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget title.
|
||||
*/
|
||||
public function get_title() {
|
||||
return esc_html__( 'Thinkai Blog Carousel', 'thinkai' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget icon.
|
||||
* Retrieve button widget icon.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget icon.
|
||||
*/
|
||||
public function get_icon() {
|
||||
return 'eicon-gallery-grid';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget categories.
|
||||
* Retrieve the list of categories the button widget belongs to.
|
||||
* Used to determine where to display the widget in the editor.
|
||||
*
|
||||
* @since 2.0.0
|
||||
* @access public
|
||||
* @return array Widget categories.
|
||||
*/
|
||||
public function get_categories() {
|
||||
return [ 'thinkai' ];
|
||||
}
|
||||
|
||||
public function get_script_depends() {
|
||||
wp_register_script( 'blog-carousel-script', YT_URL . 'assets/js/feature-carousel.js', [ 'elementor-frontend' ], '1.0.0', true );
|
||||
return [ 'blog-carousel-script' ];
|
||||
}
|
||||
|
||||
/**
|
||||
* Register button widget controls.
|
||||
* Adds different input fields to allow the user to change and customize the widget settings.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*/
|
||||
protected function register_controls() {
|
||||
$this->start_controls_section(
|
||||
'blog_carousel',
|
||||
[
|
||||
'label' => esc_html__( 'Thinkai Blog Carousel', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
|
||||
//Author
|
||||
$this->add_control(
|
||||
'author',
|
||||
[
|
||||
'label' => esc_html__( 'Show Author', 'thinkai' ),
|
||||
'type' => Controls_Manager::SWITCHER,
|
||||
'label_on' => esc_html__( 'On', 'thinkai' ),
|
||||
'label_off' => esc_html__( 'Off', 'thinkai' ),
|
||||
'return_value' => 'yes',
|
||||
'default' => 'yes',
|
||||
]
|
||||
);
|
||||
//Date
|
||||
$this->add_control(
|
||||
'date',
|
||||
[
|
||||
'label' => esc_html__( 'Show Date', 'thinkai' ),
|
||||
'type' => Controls_Manager::SWITCHER,
|
||||
'label_on' => esc_html__( 'On', 'thinkai' ),
|
||||
'label_off' => esc_html__( 'Off', 'thinkai' ),
|
||||
'return_value' => 'yes',
|
||||
'default' => 'yes',
|
||||
]
|
||||
);
|
||||
//category
|
||||
$this->add_control(
|
||||
'category',
|
||||
[
|
||||
'label' => esc_html__( 'Show category', 'thinkai' ),
|
||||
'type' => Controls_Manager::SWITCHER,
|
||||
'label_on' => esc_html__( 'On', 'thinkai' ),
|
||||
'label_off' => esc_html__( 'Off', 'thinkai' ),
|
||||
'return_value' => 'yes',
|
||||
'default' => 'yes',
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'query_number',
|
||||
[
|
||||
'label' => esc_html__( 'Number of post', 'thinkai' ),
|
||||
'type' => Controls_Manager::NUMBER,
|
||||
'default' => 3,
|
||||
'min' => 1,
|
||||
'max' => 100,
|
||||
'step' => 1,
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'query_orderby',
|
||||
[
|
||||
'label' => esc_html__( 'Order By', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'date',
|
||||
'options' => array(
|
||||
'date' => esc_html__( 'Date', 'thinkai' ),
|
||||
'title' => esc_html__( 'Title', 'thinkai' ),
|
||||
'menu_order' => esc_html__( 'Menu Order', 'thinkai' ),
|
||||
'rand' => esc_html__( 'Random', 'thinkai' ),
|
||||
),
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'query_order',
|
||||
[
|
||||
'label' => esc_html__( 'Order', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'DESC',
|
||||
'options' => array(
|
||||
'DESC' => esc_html__( 'DESC', 'thinkai' ),
|
||||
'ASC' => esc_html__( 'ASC', 'thinkai' ),
|
||||
),
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'query_category',
|
||||
[
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'label' => esc_html__('Category', 'thinkai'),
|
||||
'label_block' => true,
|
||||
'multiple' => true,
|
||||
'options' => get_blog_categories()
|
||||
]
|
||||
);
|
||||
$this->end_controls_section();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Render button widget output on the frontend.
|
||||
* Written in PHP and used to generate the final HTML.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*/
|
||||
protected function render() {
|
||||
$settings = $this->get_settings_for_display();
|
||||
$allowed_tags = wp_kses_allowed_html('post');
|
||||
|
||||
$category = $settings[ 'category' ];
|
||||
$date = $settings[ 'date' ];
|
||||
$author = $settings[ 'author' ];
|
||||
|
||||
$paged = get_query_var('paged');
|
||||
$paged = thinkai_set($_REQUEST, 'paged') ? esc_attr($_REQUEST['paged']) : $paged;
|
||||
|
||||
$this->add_render_attribute( 'wrapper', 'class', 'templatepath-thinkai' );
|
||||
$argst = array(
|
||||
'post_type' => 'post',
|
||||
'posts_per_page' => thinkai_set( $settings, 'query_number' ),
|
||||
'orderby' => thinkai_set( $settings, 'query_orderby' ),
|
||||
'order' => thinkai_set( $settings, 'query_order' ),
|
||||
'paged' => $paged
|
||||
);
|
||||
if( thinkai_set( $settings, 'query_category' ) ) $args['category_name'] = thinkai_set( $settings, 'query_category' );
|
||||
$query = new \WP_Query( $argst );
|
||||
if ( $query->have_posts() )
|
||||
|
||||
{ ?>
|
||||
|
||||
<!--Start Blog Style2-->
|
||||
<section class="blog-style2 p-0 m-0">
|
||||
<div class="container">
|
||||
|
||||
<div class="owl-carousel owl-theme thm-owl__carousel blog-style2__carousel" data-owl-options='{
|
||||
"loop": true,
|
||||
"autoplay": false,
|
||||
"margin": 30,
|
||||
"nav": false,
|
||||
"dots": false,
|
||||
"smartSpeed": 500,
|
||||
"autoplayTimeout": 10000,
|
||||
"navText": ["<span class=\"left icon-right-arrow-4\"></span>","<span class=\"right icon-right-arrow-4\"></span>"],
|
||||
"responsive": {
|
||||
"0": {
|
||||
"items": 1
|
||||
},
|
||||
"768": {
|
||||
"items": 1
|
||||
},
|
||||
"992": {
|
||||
"items": 2
|
||||
},
|
||||
"1200": {
|
||||
"items": 3
|
||||
}
|
||||
}
|
||||
}'>
|
||||
|
||||
<?php
|
||||
global $post;
|
||||
while ( $query->have_posts() ) : $query->the_post();
|
||||
$post_thumbnail_id = get_post_thumbnail_id($post->ID);
|
||||
$post_thumbnail_url = wp_get_attachment_url($post_thumbnail_id);
|
||||
?>
|
||||
<!--Start Single Blog Style2-->
|
||||
<div class="blog-style2-single-outer-box hover-background-active">
|
||||
<div class="blog-style2__single">
|
||||
<div class="blog-style2__single-title">
|
||||
<h3><a href="<?php echo esc_url( get_the_permalink( get_the_id() ) );?>"><?php the_title(); ?></a></h3>
|
||||
</div>
|
||||
<?php if( $category == 'yes' && has_category() ){?>
|
||||
<div class="blog-style2__single-category">
|
||||
<span><?php the_category(' ');?></span>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="blog-style2__single-post">
|
||||
<?php if( $author == 'yes' || $date == 'yes' ){ ?>
|
||||
<div class="author-box">
|
||||
<?php if( $author == 'yes'){?><h5><a href="<?php echo esc_url(get_author_posts_url( get_the_author_meta('ID') )); ?>"><?php the_author(); ?></a></h5><?php } ?>
|
||||
<?php if( $date == 'yes' ){?><p><?php echo get_the_date(''); ?></p><?php } ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="btn-box">
|
||||
<a href="<?php echo esc_url( get_the_permalink( get_the_id() ) );?>">
|
||||
<span class="icon-right-arrow1"></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php if($post_thumbnail_url){ ?>
|
||||
<div class="blog-style2__single-overlay">
|
||||
<div class="blog-style2__single-overlay__bg" data-src="<?php echo esc_url($post_thumbnail_url); ?>"></div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<!--End Single Blog Style2-->
|
||||
<?php endwhile; ?>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!--End Blog Style2-->
|
||||
|
||||
<?php }
|
||||
wp_reset_postdata();
|
||||
}
|
||||
}
|
||||
454
wp-content/plugins/thinkai-plugin/elementor/blog_grid.php
Normal file
454
wp-content/plugins/thinkai-plugin/elementor/blog_grid.php
Normal file
@@ -0,0 +1,454 @@
|
||||
<?php
|
||||
|
||||
namespace THINKAIPLUGIN\Element;
|
||||
|
||||
use Elementor\Controls_Manager;
|
||||
use Elementor\Controls_Stack;
|
||||
use Elementor\Group_Control_Typography;
|
||||
use Elementor\Group_Control_Border;
|
||||
use Elementor\Repeater;
|
||||
use Elementor\Widget_Base;
|
||||
use Elementor\Utils;
|
||||
use Elementor\Group_Control_Text_Shadow;
|
||||
use \Elementor\Group_Control_Box_Shadow;
|
||||
use \Elementor\Group_Control_Background;
|
||||
use \Elementor\Group_Control_Image_Size;
|
||||
use \Elementor\Group_Control_Text_Stroke;
|
||||
use Elementor\Plugin;
|
||||
|
||||
/**
|
||||
* Elementor button widget.
|
||||
* Elementor widget that displays a button with the ability to control every
|
||||
* aspect of the button design.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class Blog_Grid extends Widget_Base {
|
||||
|
||||
/**
|
||||
* Get widget name.
|
||||
* Retrieve button widget name.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget name.
|
||||
*/
|
||||
public function get_name() {
|
||||
return 'thinkai_blog_grid';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget title.
|
||||
* Retrieve button widget title.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget title.
|
||||
*/
|
||||
public function get_title() {
|
||||
return esc_html__( 'Thinkai Blog Grid', 'thinkai' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget icon.
|
||||
* Retrieve button widget icon.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget icon.
|
||||
*/
|
||||
public function get_icon() {
|
||||
return 'eicon-gallery-grid';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget categories.
|
||||
* Retrieve the list of categories the button widget belongs to.
|
||||
* Used to determine where to display the widget in the editor.
|
||||
*
|
||||
* @since 2.0.0
|
||||
* @access public
|
||||
* @return array Widget categories.
|
||||
*/
|
||||
public function get_categories() {
|
||||
return [ 'thinkai' ];
|
||||
}
|
||||
|
||||
/**
|
||||
* Register button widget controls.
|
||||
* Adds different input fields to allow the user to change and customize the widget settings.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*/
|
||||
protected function register_controls() {
|
||||
$this->start_controls_section(
|
||||
'blog_grid',
|
||||
[
|
||||
'label' => esc_html__( 'Thinkai Blog Grid', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'layout_control',
|
||||
[
|
||||
'label' => esc_html__( 'Layout Style', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => '1',
|
||||
'options' => array(
|
||||
'1' => esc_html__( 'Style One', 'thinkai'),
|
||||
'2' => esc_html__( 'Style Two', 'thinkai'),
|
||||
'3' => esc_html__( 'Style Three', 'thinkai'),
|
||||
),
|
||||
]
|
||||
);
|
||||
//Author
|
||||
$this->add_control(
|
||||
'author',
|
||||
[
|
||||
'label' => esc_html__( 'Show Author', 'thinkai' ),
|
||||
'type' => Controls_Manager::SWITCHER,
|
||||
'label_on' => esc_html__( 'On', 'thinkai' ),
|
||||
'label_off' => esc_html__( 'Off', 'thinkai' ),
|
||||
'return_value' => 'yes',
|
||||
'default' => 'yes',
|
||||
]
|
||||
);
|
||||
//Date
|
||||
$this->add_control(
|
||||
'date',
|
||||
[
|
||||
'label' => esc_html__( 'Show Date', 'thinkai' ),
|
||||
'type' => Controls_Manager::SWITCHER,
|
||||
'label_on' => esc_html__( 'On', 'thinkai' ),
|
||||
'label_off' => esc_html__( 'Off', 'thinkai' ),
|
||||
'return_value' => 'yes',
|
||||
'default' => 'yes',
|
||||
]
|
||||
);
|
||||
//category
|
||||
$this->add_control(
|
||||
'category',
|
||||
[
|
||||
'label' => esc_html__( 'Show category', 'thinkai' ),
|
||||
'type' => Controls_Manager::SWITCHER,
|
||||
'label_on' => esc_html__( 'On', 'thinkai' ),
|
||||
'label_off' => esc_html__( 'Off', 'thinkai' ),
|
||||
'return_value' => 'yes',
|
||||
'default' => 'yes',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'query_number',
|
||||
[
|
||||
'label' => esc_html__( 'Number of post', 'thinkai' ),
|
||||
'type' => Controls_Manager::NUMBER,
|
||||
'default' => 3,
|
||||
'min' => 1,
|
||||
'max' => 100,
|
||||
'step' => 1,
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'query_orderby',
|
||||
[
|
||||
'label' => esc_html__( 'Order By', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'date',
|
||||
'options' => array(
|
||||
'date' => esc_html__( 'Date', 'thinkai' ),
|
||||
'title' => esc_html__( 'Title', 'thinkai' ),
|
||||
'menu_order' => esc_html__( 'Menu Order', 'thinkai' ),
|
||||
'rand' => esc_html__( 'Random', 'thinkai' ),
|
||||
),
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'query_order',
|
||||
[
|
||||
'label' => esc_html__( 'Order', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'DESC',
|
||||
'options' => array(
|
||||
'DESC' => esc_html__( 'DESC', 'thinkai' ),
|
||||
'ASC' => esc_html__( 'ASC', 'thinkai' ),
|
||||
),
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'query_category',
|
||||
[
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'label' => esc_html__('Category', 'thinkai'),
|
||||
'label_block' => true,
|
||||
'multiple' => true,
|
||||
'options' => get_blog_categories()
|
||||
]
|
||||
);
|
||||
|
||||
//Pagination
|
||||
$this->add_control(
|
||||
'show_pagination',
|
||||
[
|
||||
'label' => __( 'Enable/Disable Pagination Style', 'thinkai' ),
|
||||
'type' => Controls_Manager::SWITCHER,
|
||||
'label_on' => __( 'Show', 'thinkai' ),
|
||||
'label_off' => __( 'Hide', 'thinkai' ),
|
||||
'return_value' => 'yes',
|
||||
'default' => 'no',
|
||||
'condition' => ['layout_control' => ['1','3'] ],
|
||||
]
|
||||
);
|
||||
$this->end_controls_section();
|
||||
|
||||
/**Grid Setting Start**/
|
||||
$this->start_controls_section(
|
||||
'grid',
|
||||
[
|
||||
'label' => esc_html__( 'Grid Setting', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'col_grid',
|
||||
[
|
||||
'label' => esc_html__( 'Choose Column', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'three',
|
||||
'options' => array(
|
||||
'one' => esc_html__( 'One Column Grid ', 'thinkai'),
|
||||
'two' => esc_html__( 'Two Column Grid', 'thinkai' ),
|
||||
'three' => esc_html__( 'Three Column Grid', 'thinkai' ),
|
||||
'four' => esc_html__( 'Four Column Grid', 'thinkai' ),
|
||||
'five' => esc_html__( 'Six Column Grid', 'thinkai' ),
|
||||
),
|
||||
]
|
||||
);
|
||||
$this->end_controls_section();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Render button widget output on the frontend.
|
||||
* Written in PHP and used to generate the final HTML.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*/
|
||||
protected function render() {
|
||||
$settings = $this->get_settings_for_display();
|
||||
$allowed_tags = wp_kses_allowed_html('post');
|
||||
$layout = $settings[ 'layout_control' ];
|
||||
|
||||
$grid_col = $settings['col_grid'];
|
||||
if( $grid_col == 'one' ){
|
||||
$classes = 'col-xl-12 col-lg-12 col-md-12 col-sm-12';
|
||||
}elseif( $grid_col == 'two' ){
|
||||
$classes = 'col-xl-6 col-lg-6 col-md-12 col-sm-12';
|
||||
}elseif( $grid_col == 'four' ){
|
||||
$classes = 'col-xl-3 col-lg-3 col-md-12 col-sm-12';
|
||||
}elseif( $grid_col == 'five' ){
|
||||
$classes = 'col-xl-2 col-lg-2 col-md-12 col-sm-12';
|
||||
}else{
|
||||
$classes = 'col-xl-4 col-lg-4 col-md-12 col-sm-12';
|
||||
};
|
||||
|
||||
$category = $settings[ 'category' ];
|
||||
$date = $settings[ 'date' ];
|
||||
$author = $settings[ 'author' ];
|
||||
|
||||
$paged = get_query_var('paged');
|
||||
$paged = thinkai_set($_REQUEST, 'paged') ? esc_attr($_REQUEST['paged']) : $paged;
|
||||
|
||||
$this->add_render_attribute( 'wrapper', 'class', 'templatepath-thinkai' );
|
||||
$argst = array(
|
||||
'post_type' => 'post',
|
||||
'posts_per_page' => thinkai_set( $settings, 'query_number' ),
|
||||
'orderby' => thinkai_set( $settings, 'query_orderby' ),
|
||||
'order' => thinkai_set( $settings, 'query_order' ),
|
||||
'paged' => $paged
|
||||
);
|
||||
if( thinkai_set( $settings, 'query_category' ) ) $args['category_name'] = thinkai_set( $settings, 'query_category' );
|
||||
$query = new \WP_Query( $argst );
|
||||
if ( $query->have_posts() )
|
||||
|
||||
{ ?>
|
||||
|
||||
|
||||
<?php if( $layout == 3 ): ?>
|
||||
|
||||
<!--Start Blog Page Two-->
|
||||
<section class="blog-page-two p-0 m-0">
|
||||
<div class="row">
|
||||
<?php
|
||||
global $post;
|
||||
while ( $query->have_posts() ) : $query->the_post();
|
||||
$post_thumbnail_id = get_post_thumbnail_id($post->ID);
|
||||
$post_thumbnail_url = wp_get_attachment_url($post_thumbnail_id);
|
||||
?>
|
||||
<!--Start Single Blog Style2-->
|
||||
<div class="<?php echo esc_attr( $classes );?>">
|
||||
<div class="blog-style2-single-outer-box hover-background-active">
|
||||
<div class="blog-style2__single">
|
||||
<div class="blog-style2__single-title">
|
||||
<h3><a href="<?php echo esc_url( get_the_permalink( get_the_id() ) );?>"><?php the_title(); ?></a> </h3>
|
||||
</div>
|
||||
|
||||
<?php if( $category == 'yes' && has_category() ){?>
|
||||
<div class="blog-style2__single-category">
|
||||
<span><?php the_category(' ');?></span>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="blog-style2__single-post">
|
||||
<?php if( $author == 'yes' || $date == 'yes' ){ ?>
|
||||
<div class="author-box">
|
||||
<?php if( $author == 'yes'){?><h5><a href="<?php echo esc_url(get_author_posts_url( get_the_author_meta('ID') )); ?>"><?php the_author(); ?></a></h5><?php } ?>
|
||||
<?php if( $date == 'yes' ){?><p><?php echo get_the_date(''); ?></p><?php } ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="btn-box">
|
||||
<a href="<?php echo esc_url( get_the_permalink( get_the_id() ) );?>">
|
||||
<span class="icon-right-arrow1"></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if($post_thumbnail_url){ ?>
|
||||
<div class="blog-style2__single-overlay">
|
||||
<div class="blog-style2__single-overlay__bg" data-src="<?php echo esc_url($post_thumbnail_url); ?>"></div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--End Single Blog Style2-->
|
||||
<?php endwhile; ?>
|
||||
</div>
|
||||
|
||||
<?php if($settings['show_pagination']){ ?>
|
||||
<div class="styled-pagination-style2 clearfix">
|
||||
<?php thinkai_the_pagination2(array('total'=>$query->max_num_pages, 'next_text' => 'Next Page <i class="icon-right-arrow1 right"></i> ', 'prev_text' => '<i class="icon-left-arrow1 left"></i> Prev Page')); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
</section>
|
||||
<!--End Blog Page Two-->
|
||||
|
||||
<?php elseif( $layout == 2 ): ?>
|
||||
|
||||
<!--Start Blog Style1-->
|
||||
<section class="blog-style1 p-0 m-0">
|
||||
<div class="row">
|
||||
<?php
|
||||
while ( $query->have_posts() ) : $query->the_post();
|
||||
?>
|
||||
<!--Start Blog Style1 Single-->
|
||||
<div class="<?php echo esc_attr( $classes );?>">
|
||||
<div class="blog-style1__single blog-style1__single--style2">
|
||||
<?php if(has_post_thumbnail()){ ?>
|
||||
<div class="blog-style1__single-img">
|
||||
<?php the_post_thumbnail('thinkai_370x320'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="blog-style1__single-content">
|
||||
<div class="blog-style1__single-content-top">
|
||||
<?php if( $author == 'yes' || $date == 'yes' ){ ?>
|
||||
<div class="text-box">
|
||||
<?php if( $author == 'yes'){?><h4><?php the_author(); ?></h4><?php } ?>
|
||||
<?php if( $date == 'yes' ){?><p><?php echo get_the_date(''); ?></p><?php } ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="btn-box">
|
||||
<a href="<?php echo esc_url( get_the_permalink( get_the_id() ) );?>"><span class="icon-right-arrow1"></span></a>
|
||||
</div>
|
||||
</div>
|
||||
<h2>
|
||||
<a href="<?php echo esc_url( get_the_permalink( get_the_id() ) );?>">
|
||||
<?php the_title(); ?>
|
||||
</a>
|
||||
</h2>
|
||||
|
||||
<?php if( $category == 'yes' && has_category() ){?>
|
||||
<div class="category-box">
|
||||
<?php the_category(' ');?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--End Blog Style1 Single-->
|
||||
<?php endwhile; ?>
|
||||
</div>
|
||||
</section>
|
||||
<!--End Blog Style1-->
|
||||
|
||||
<?php else: ?>
|
||||
|
||||
<!--Start Blog Style1-->
|
||||
<section class="blog-style1 p-0 m-0">
|
||||
<div class="row">
|
||||
<?php
|
||||
while ( $query->have_posts() ) : $query->the_post();
|
||||
?>
|
||||
<!--Start Blog Style1 Single-->
|
||||
<div class="<?php echo esc_attr( $classes );?>">
|
||||
<div class="blog-style1__single">
|
||||
<?php if(has_post_thumbnail()){ ?>
|
||||
<div class="blog-style1__single-img">
|
||||
<?php the_post_thumbnail('thinkai_370x320'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="blog-style1__single-content">
|
||||
<div class="blog-style1__single-content-top">
|
||||
<?php if( $author == 'yes' || $date == 'yes' ){ ?>
|
||||
<div class="text-box">
|
||||
<?php if( $author == 'yes'){?><h4><?php the_author(); ?></h4><?php } ?>
|
||||
<?php if( $date == 'yes' ){?><p><?php echo get_the_date(''); ?></p><?php } ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="btn-box">
|
||||
<a href="<?php echo esc_url( get_the_permalink( get_the_id() ) );?>"><span class="icon-right-arrow1"></span></a>
|
||||
</div>
|
||||
</div>
|
||||
<h2>
|
||||
<a href="<?php echo esc_url( get_the_permalink( get_the_id() ) );?>">
|
||||
<?php the_title(); ?>
|
||||
</a>
|
||||
</h2>
|
||||
|
||||
<?php if( $category == 'yes' && has_category() ){?>
|
||||
<div class="category-box">
|
||||
<?php the_category(' ');?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--End Blog Style1 Single-->
|
||||
<?php endwhile; ?>
|
||||
|
||||
<?php if($settings['show_pagination']){ ?>
|
||||
<div class="styled-pagination-style2 clearfix">
|
||||
<?php thinkai_the_pagination2(array('total'=>$query->max_num_pages, 'next_text' => 'Next Page <i class="icon-right-arrow1 right"></i> ', 'prev_text' => '<i class="icon-left-arrow1 left"></i> Prev Page')); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</section>
|
||||
<!--End Blog Style1-->
|
||||
|
||||
<?php endif; ?>
|
||||
<?php }
|
||||
wp_reset_postdata();
|
||||
}
|
||||
}
|
||||
273
wp-content/plugins/thinkai-plugin/elementor/blog_list_view.php
Normal file
273
wp-content/plugins/thinkai-plugin/elementor/blog_list_view.php
Normal file
@@ -0,0 +1,273 @@
|
||||
<?php
|
||||
|
||||
namespace THINKAIPLUGIN\Element;
|
||||
|
||||
use Elementor\Controls_Manager;
|
||||
use Elementor\Controls_Stack;
|
||||
use Elementor\Group_Control_Typography;
|
||||
use Elementor\Group_Control_Border;
|
||||
use Elementor\Repeater;
|
||||
use Elementor\Widget_Base;
|
||||
use Elementor\Utils;
|
||||
use Elementor\Group_Control_Text_Shadow;
|
||||
use \Elementor\Group_Control_Box_Shadow;
|
||||
use \Elementor\Group_Control_Background;
|
||||
use \Elementor\Group_Control_Image_Size;
|
||||
use \Elementor\Group_Control_Text_Stroke;
|
||||
use Elementor\Plugin;
|
||||
|
||||
/**
|
||||
* Elementor button widget.
|
||||
* Elementor widget that displays a button with the ability to control every
|
||||
* aspect of the button design.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class Blog_List_View extends Widget_Base {
|
||||
|
||||
/**
|
||||
* Get widget name.
|
||||
* Retrieve button widget name.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget name.
|
||||
*/
|
||||
public function get_name() {
|
||||
return 'thinkai_blog_list_view';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget title.
|
||||
* Retrieve button widget title.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget title.
|
||||
*/
|
||||
public function get_title() {
|
||||
return esc_html__( 'Thinkai Blog List View', 'thinkai' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget icon.
|
||||
* Retrieve button widget icon.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget icon.
|
||||
*/
|
||||
public function get_icon() {
|
||||
return 'eicon-gallery-grid';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget categories.
|
||||
* Retrieve the list of categories the button widget belongs to.
|
||||
* Used to determine where to display the widget in the editor.
|
||||
*
|
||||
* @since 2.0.0
|
||||
* @access public
|
||||
* @return array Widget categories.
|
||||
*/
|
||||
public function get_categories() {
|
||||
return [ 'thinkai' ];
|
||||
}
|
||||
|
||||
/**
|
||||
* Register button widget controls.
|
||||
* Adds different input fields to allow the user to change and customize the widget settings.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*/
|
||||
protected function register_controls() {
|
||||
$this->start_controls_section(
|
||||
'blog_list_view',
|
||||
[
|
||||
'label' => esc_html__( 'Thinkai Blog List View', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
|
||||
//Author
|
||||
$this->add_control(
|
||||
'author',
|
||||
[
|
||||
'label' => esc_html__( 'Show Author', 'thinkai' ),
|
||||
'type' => Controls_Manager::SWITCHER,
|
||||
'label_on' => esc_html__( 'On', 'thinkai' ),
|
||||
'label_off' => esc_html__( 'Off', 'thinkai' ),
|
||||
'return_value' => 'yes',
|
||||
'default' => 'yes',
|
||||
]
|
||||
);
|
||||
//Date
|
||||
$this->add_control(
|
||||
'date',
|
||||
[
|
||||
'label' => esc_html__( 'Show Date', 'thinkai' ),
|
||||
'type' => Controls_Manager::SWITCHER,
|
||||
'label_on' => esc_html__( 'On', 'thinkai' ),
|
||||
'label_off' => esc_html__( 'Off', 'thinkai' ),
|
||||
'return_value' => 'yes',
|
||||
'default' => 'yes',
|
||||
]
|
||||
);
|
||||
//category
|
||||
$this->add_control(
|
||||
'category',
|
||||
[
|
||||
'label' => esc_html__( 'Show category', 'thinkai' ),
|
||||
'type' => Controls_Manager::SWITCHER,
|
||||
'label_on' => esc_html__( 'On', 'thinkai' ),
|
||||
'label_off' => esc_html__( 'Off', 'thinkai' ),
|
||||
'return_value' => 'yes',
|
||||
'default' => 'yes',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'query_number',
|
||||
[
|
||||
'label' => esc_html__( 'Number of post', 'thinkai' ),
|
||||
'type' => Controls_Manager::NUMBER,
|
||||
'default' => 3,
|
||||
'min' => 1,
|
||||
'max' => 100,
|
||||
'step' => 1,
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'query_orderby',
|
||||
[
|
||||
'label' => esc_html__( 'Order By', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'date',
|
||||
'options' => array(
|
||||
'date' => esc_html__( 'Date', 'thinkai' ),
|
||||
'title' => esc_html__( 'Title', 'thinkai' ),
|
||||
'menu_order' => esc_html__( 'Menu Order', 'thinkai' ),
|
||||
'rand' => esc_html__( 'Random', 'thinkai' ),
|
||||
),
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'query_order',
|
||||
[
|
||||
'label' => esc_html__( 'Order', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'DESC',
|
||||
'options' => array(
|
||||
'DESC' => esc_html__( 'DESC', 'thinkai' ),
|
||||
'ASC' => esc_html__( 'ASC', 'thinkai' ),
|
||||
),
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'query_category',
|
||||
[
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'label' => esc_html__('Category', 'thinkai'),
|
||||
'label_block' => true,
|
||||
'multiple' => true,
|
||||
'options' => get_blog_categories()
|
||||
]
|
||||
);
|
||||
$this->end_controls_section();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Render button widget output on the frontend.
|
||||
* Written in PHP and used to generate the final HTML.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*/
|
||||
protected function render() {
|
||||
$settings = $this->get_settings_for_display();
|
||||
$allowed_tags = wp_kses_allowed_html('post');
|
||||
|
||||
$category = $settings[ 'category' ];
|
||||
$date = $settings[ 'date' ];
|
||||
$author = $settings[ 'author' ];
|
||||
|
||||
$paged = get_query_var('paged');
|
||||
$paged = thinkai_set($_REQUEST, 'paged') ? esc_attr($_REQUEST['paged']) : $paged;
|
||||
|
||||
$this->add_render_attribute( 'wrapper', 'class', 'templatepath-thinkai' );
|
||||
$argst = array(
|
||||
'post_type' => 'post',
|
||||
'posts_per_page' => thinkai_set( $settings, 'query_number' ),
|
||||
'orderby' => thinkai_set( $settings, 'query_orderby' ),
|
||||
'order' => thinkai_set( $settings, 'query_order' ),
|
||||
'paged' => $paged
|
||||
);
|
||||
if( thinkai_set( $settings, 'query_category' ) ) $args['category_name'] = thinkai_set( $settings, 'query_category' );
|
||||
$query = new \WP_Query( $argst );
|
||||
if ( $query->have_posts() )
|
||||
|
||||
{ ?>
|
||||
|
||||
|
||||
<!--Start Blog Page Four-->
|
||||
<section class="blog-page-four p-0 m-0">
|
||||
<div class="blog-page-four__content">
|
||||
<?php
|
||||
while ( $query->have_posts() ) : $query->the_post();
|
||||
?>
|
||||
<!--Start Single Blog Style3-->
|
||||
<div class="blog-style3__single">
|
||||
<div class="row align-items-center">
|
||||
<?php if(has_post_thumbnail()){ ?>
|
||||
<div class="col-xl-6">
|
||||
<div class="blog-style3__single-img">
|
||||
<?php the_post_thumbnail('thinkai_360x290'); ?>
|
||||
<a href="<?php echo esc_url( get_the_permalink( get_the_id() ) );?>"><span class="fa fa-link"></span></a>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="col-xl-6">
|
||||
<div class="blog-style3__single-content">
|
||||
<?php if( $category == 'yes' && has_category() ){?>
|
||||
<div class="category-box">
|
||||
<?php the_category(' ');?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<h3>
|
||||
<a href="<?php echo esc_url( get_the_permalink( get_the_id() ) );?>">
|
||||
<?php the_title(); ?>
|
||||
</a>
|
||||
</h3>
|
||||
<div class="blog-style3__single-content-bottom">
|
||||
<?php if( $author == 'yes' || $date == 'yes' ){ ?>
|
||||
<div class="text-box">
|
||||
<?php if( $author == 'yes'){?><h5><?php the_author(); ?></h5><?php } ?>
|
||||
<?php if( $date == 'yes' ){?><p><?php echo get_the_date(''); ?></p><?php } ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="btn-box">
|
||||
<a href="<?php echo esc_url( get_the_permalink( get_the_id() ) );?>">
|
||||
<span class="icon-right-arrow1"></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--End Single Blog Style3-->
|
||||
<?php endwhile; ?>
|
||||
</div>
|
||||
</section>
|
||||
<!--End Blog Page Four-->
|
||||
|
||||
<?php }
|
||||
wp_reset_postdata();
|
||||
}
|
||||
}
|
||||
442
wp-content/plugins/thinkai-plugin/elementor/button.php
Normal file
442
wp-content/plugins/thinkai-plugin/elementor/button.php
Normal file
@@ -0,0 +1,442 @@
|
||||
<?php namespace THINKAIPLUGIN\Element;
|
||||
|
||||
use Elementor\Controls_Manager;
|
||||
use Elementor\Controls_Stack;
|
||||
use Elementor\Group_Control_Typography;
|
||||
use Elementor\Group_Control_Border;
|
||||
use Elementor\Repeater;
|
||||
use Elementor\Widget_Base;
|
||||
use Elementor\Utils;
|
||||
use Elementor\Group_Control_Text_Shadow;
|
||||
use \Elementor\Group_Control_Box_Shadow;
|
||||
use \Elementor\Group_Control_Background;
|
||||
use \Elementor\Group_Control_Text_Stroke;
|
||||
use Elementor\Plugin;
|
||||
/**
|
||||
* Elementor button widget.
|
||||
* Elementor widget that displays a button with the ability to control every
|
||||
* aspect of the button design.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class Button extends Widget_Base {
|
||||
/**
|
||||
* Get widget name.
|
||||
* Retrieve button widget name.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget name.
|
||||
*/
|
||||
public function get_name() {
|
||||
return 'thinkai_button';
|
||||
}
|
||||
/**
|
||||
* Get widget title.
|
||||
* Retrieve button widget title.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget title.
|
||||
*/
|
||||
public function get_title() {
|
||||
return esc_html__( 'Thinkai Button', 'thinkai' );
|
||||
}
|
||||
/**
|
||||
* Get widget icon.
|
||||
* Retrieve button widget icon.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget icon.
|
||||
*/
|
||||
public function get_icon() {
|
||||
return 'eicon-button';
|
||||
}
|
||||
/**
|
||||
* Get widget categories.
|
||||
* Retrieve the list of categories the button widget belongs to.
|
||||
* Used to determine where to display the widget in the editor.
|
||||
*
|
||||
* @since 2.0.0
|
||||
* @access public
|
||||
* @return array Widget categories.
|
||||
*/
|
||||
public function get_categories() {
|
||||
return [ 'thinkai' ];
|
||||
}
|
||||
/**
|
||||
* Register button widget controls.
|
||||
* Adds different input fields to allow the user to change and customize the widget settings.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*/
|
||||
protected function register_controls() {
|
||||
$this->start_controls_section(
|
||||
'button',
|
||||
[
|
||||
'label' => esc_html__( 'Thinkai Button', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'btn_style',
|
||||
[
|
||||
'label' => esc_html__( 'Choose Button Style', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => '1',
|
||||
'options' => array(
|
||||
'1' => esc_html__( 'Style One ', 'thinkai'),
|
||||
'2' => esc_html__( 'Style Two', 'thinkai' ),
|
||||
'3' => esc_html__( 'Style Three', 'thinkai' ),
|
||||
'4' => esc_html__( 'Style Four', 'thinkai' ),
|
||||
),
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'btn_title',
|
||||
[
|
||||
'label' => __( 'Button Title', 'thinkai' ),
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'label_block' => true,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'placeholder' => __( 'Enter your Button Title Here', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'link_option',
|
||||
[
|
||||
'label' => esc_html__( 'Select link Option', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'extranal',
|
||||
'options' => array(
|
||||
'extranal' => esc_html__( 'Extranal ', 'thinkai'),
|
||||
'page' => esc_html__( 'Page ', 'thinkai'),
|
||||
),
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'link',
|
||||
[
|
||||
'label' => __( 'External Link', 'thinkai' ),
|
||||
'type' => Controls_Manager::URL,
|
||||
'label_block' => true,
|
||||
'placeholder' => __( 'https://your-link.com', 'thinkai' ),
|
||||
'show_external' => true,
|
||||
'default' => [
|
||||
'url' => '',
|
||||
'is_external' => true,
|
||||
'nofollow' => true,
|
||||
],
|
||||
'condition' => [
|
||||
'link_option' => 'extranal'
|
||||
]
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'page_select',
|
||||
[
|
||||
'label' => esc_html__( 'Select Page', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::SELECT2,
|
||||
'default' => 'extranal',
|
||||
'options' => thinkai_page_list(),
|
||||
'condition' => [
|
||||
'link_option' => 'page'
|
||||
]
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
/**Button Style**/
|
||||
$this->start_controls_section(
|
||||
'button_style',
|
||||
[
|
||||
'label' => esc_html__('Button Style Setting', 'thinkai'),
|
||||
'tab' => Controls_Manager::TAB_STYLE,
|
||||
]
|
||||
);
|
||||
$this->add_responsive_control(
|
||||
'general_align',
|
||||
[
|
||||
'label' => esc_html__( 'Alignment', 'thinkai' ),
|
||||
'type' => Controls_Manager::CHOOSE,
|
||||
'options' => [
|
||||
'left' => [
|
||||
'title' => esc_html__( 'Left', 'thinkai' ),
|
||||
'icon' => 'eicon-text-align-left',
|
||||
],
|
||||
'center' => [
|
||||
'title' => esc_html__( 'Center', 'thinkai' ),
|
||||
'icon' => 'eicon-text-align-center',
|
||||
],
|
||||
'right' => [
|
||||
'title' => esc_html__( 'Right', 'thinkai' ),
|
||||
'icon' => 'eicon-text-align-right',
|
||||
],
|
||||
],
|
||||
'default' => '',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .yt-btn' => 'text-align: {{VALUE}}',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->start_controls_tabs( 'thinkai_tabs_btn' );
|
||||
|
||||
$this->start_controls_tab(
|
||||
'thinkai_tab_btn_normal',
|
||||
[
|
||||
'label' => __( 'Normal', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
$this->add_responsive_control(
|
||||
'btn_width_size',
|
||||
[
|
||||
'label' => __( 'Width', 'thinkai' ),
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'size_units' => [ 'px', 'em', '%', 'custom' ],
|
||||
'range' => [
|
||||
'px' => [
|
||||
'min' => 0,
|
||||
'max' => 500,
|
||||
],
|
||||
'%' => [
|
||||
'min' => 0,
|
||||
'max' => 100,
|
||||
],
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .thinkai-btn' => 'width: {{SIZE}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_responsive_control(
|
||||
'btn_height_size',
|
||||
[
|
||||
'label' => __( 'Height', 'thinkai' ),
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'size_units' => [ 'px', 'em', '%', 'custom' ],
|
||||
'range' => [
|
||||
'px' => [
|
||||
'min' => 0,
|
||||
'max' => 500,
|
||||
],
|
||||
'%' => [
|
||||
'min' => 0,
|
||||
'max' => 100,
|
||||
],
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .thinkai-btn' => 'height: {{SIZE}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_responsive_control(
|
||||
'btn_margin',
|
||||
[
|
||||
'label' => __( 'Margin', 'thinkai' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', 'em', '%' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .thinkai-btn' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
|
||||
],
|
||||
|
||||
'frontend_available' => true,
|
||||
]
|
||||
);
|
||||
$this->add_responsive_control(
|
||||
'btn_padding',
|
||||
[
|
||||
'label' => __( 'Padding', 'thinkai' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', 'em', '%' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .thinkai-btn' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
|
||||
],
|
||||
|
||||
'frontend_available' => true,
|
||||
]
|
||||
);
|
||||
$this->add_group_control(
|
||||
Group_Control_Border::get_type(),
|
||||
[
|
||||
'name' => 'btn_border_type',
|
||||
'selector' =>
|
||||
'{{WRAPPER}} .thinkai-btn',
|
||||
'separator' => 'before',
|
||||
]
|
||||
);
|
||||
$this->add_group_control(
|
||||
Group_Control_Box_Shadow::get_type(),
|
||||
[
|
||||
'name' => 'border_box_shadow',
|
||||
'selector' =>
|
||||
'{{WRAPPER}} .thinkai-btn',
|
||||
'separator' => 'before',
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'btn_border_radius',
|
||||
[
|
||||
'label' => esc_html__('Border Radius', 'thinkai'),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'separator' => 'before',
|
||||
'size_units' => ['px'],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .thinkai-btn' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'btn_title_typography',
|
||||
'label' => __('Button Text Typography', 'thinkai'),
|
||||
'selector' =>
|
||||
'{{WRAPPER}} .thinkai-btn',
|
||||
'separator' => 'before',
|
||||
]
|
||||
);
|
||||
$this->add_group_control(
|
||||
Group_Control_Background::get_type(),
|
||||
[
|
||||
'name' => 'btn_title_bg_color',
|
||||
'label' => __( 'Button Background Color', 'thinkai' ),
|
||||
'types' => [ 'classic', 'gradient' ],
|
||||
'selector' =>
|
||||
'{{WRAPPER}} .thinkai-btn:before,
|
||||
{{WRAPPER}} .thinkai-btn',
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'btn_title_color',
|
||||
[
|
||||
'label' => __('Button Text Color', 'thinkai'),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'default' => '',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .thinkai-btn' => 'color: {{VALUE}}!important',
|
||||
'{{WRAPPER}} .thinkai-btn span' => 'color: {{VALUE}}!important',
|
||||
],
|
||||
'separator' => 'before',
|
||||
]
|
||||
);
|
||||
$this->end_controls_tab();
|
||||
|
||||
$this->start_controls_tab(
|
||||
'thinkai_tab_btn_hover',
|
||||
[
|
||||
'label' => __( 'Hover', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
$this->add_group_control(
|
||||
Group_Control_Background::get_type(),
|
||||
[
|
||||
'name' => 'btn_hover_bg_bgtype',
|
||||
'label' => __( 'Button Hover Background', 'thinkai' ),
|
||||
'types' => [ 'classic', 'gradient' ],
|
||||
'selector' =>
|
||||
'{{WRAPPER}} .thinkai-btn:hover:before,
|
||||
{{WRAPPER}} .thinkai-btn:hover',
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'btn_border_color',
|
||||
[
|
||||
'label' => __('Button Border Color', 'thinkai'),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'default' => '',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .thinkai-btn:hover' => 'border-color: {{VALUE}}!important',
|
||||
],
|
||||
'separator' => 'before',
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'btn_title_hover_color',
|
||||
[
|
||||
'label' => __('Button Text Hover Color', 'thinkai'),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'default' => '',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .thinkai-btn:hover' => 'color: {{VALUE}} !important',
|
||||
'{{WRAPPER}} .thinkai-btn:hover span' => 'color: {{VALUE}} !important',
|
||||
],
|
||||
'separator' => 'before',
|
||||
]
|
||||
);
|
||||
$this->end_controls_tab();
|
||||
$this->end_controls_tabs();
|
||||
$this->end_controls_section();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Render button widget output on the frontend.
|
||||
* Written in PHP and used to generate the final HTML.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*/
|
||||
protected function render() {
|
||||
$settings = $this->get_settings_for_display();
|
||||
$allowed_tags = wp_kses_allowed_html('post');
|
||||
$btn_style = $settings[ 'btn_style' ];
|
||||
|
||||
$page = $settings['link_option'];
|
||||
$page_select = $settings[ 'page_select' ];
|
||||
$ext_url = $settings[ 'link' ];
|
||||
|
||||
if( $page == 'page' ){
|
||||
$mount_link = get_page_link( $page_select );
|
||||
}else{
|
||||
$mount_link = $ext_url['url'];
|
||||
$target = $ext_url['is_external'] ? ' target="_blank"' : '';
|
||||
$nofollow = $ext_url['nofollow'] ? ' rel="nofollow"' : '';
|
||||
}
|
||||
?>
|
||||
|
||||
<?php if($btn_style == '4'): ?>
|
||||
|
||||
<div class="ai-voices-style1__top p-0 m-0">
|
||||
<div class="btn-box yt-btn">
|
||||
<a class="btn-one thinkai-btn" href="<?php echo esc_url( $mount_link );?>" <?php if( $page == 'extranal' ) echo esc_attr( $target );?> <?php if( $page == 'extranal' ) echo esc_attr( $nofollow );?>>
|
||||
<span class="txt"><?php echo wp_kses($settings['btn_title'], true);?></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php elseif($btn_style == '3'): ?>
|
||||
|
||||
<div class="about-style3__right-content thinkai-br p-0 m-0">
|
||||
<div class="btn-box yt-btn p-0 m-0">
|
||||
<a href="<?php echo esc_url( $mount_link );?>" <?php if( $page == 'extranal' ) echo esc_attr( $target );?> <?php if( $page == 'extranal' ) echo esc_attr( $nofollow );?> class="thinkai-btn"><span class="icon-right-arrow1"></span> <?php echo wp_kses($settings['btn_title'], true);?></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php elseif($btn_style == '2'): ?>
|
||||
|
||||
<div class="project-style1__btn-box yt-btn">
|
||||
<a class="btn-one thinkai-btn" href="<?php echo esc_url( $mount_link );?>" <?php if( $page == 'extranal' ) echo esc_attr( $target );?> <?php if( $page == 'extranal' ) echo esc_attr( $nofollow );?>>
|
||||
<span class="txt"><?php echo wp_kses($settings['btn_title'], true);?></span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<?php else: ?>
|
||||
|
||||
<div class="yt-btn about-style1__content-box-inner">
|
||||
<div class="btn-box p-0 m-0">
|
||||
<a class="thinkai-btn" href="<?php echo esc_url( $mount_link );?>" <?php if( $page == 'extranal' ) echo esc_attr( $target );?> <?php if( $page == 'extranal' ) echo esc_attr( $nofollow );?>><span class="icon-right-arrow1"></span> <?php echo wp_kses($settings['btn_title'], true);?></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php endif;
|
||||
}
|
||||
}
|
||||
404
wp-content/plugins/thinkai-plugin/elementor/clients_carousel.php
Normal file
404
wp-content/plugins/thinkai-plugin/elementor/clients_carousel.php
Normal file
@@ -0,0 +1,404 @@
|
||||
<?php
|
||||
|
||||
namespace THINKAIPLUGIN\Element;
|
||||
|
||||
use Elementor\Controls_Manager;
|
||||
use Elementor\Controls_Stack;
|
||||
use Elementor\Group_Control_Typography;
|
||||
use Elementor\Group_Control_Border;
|
||||
use Elementor\Repeater;
|
||||
use Elementor\Widget_Base;
|
||||
use Elementor\Utils;
|
||||
use Elementor\Group_Control_Text_Shadow;
|
||||
use \Elementor\Group_Control_Box_Shadow;
|
||||
use \Elementor\Group_Control_Background;
|
||||
use \Elementor\Group_Control_Image_Size;
|
||||
use Elementor\Plugin;
|
||||
|
||||
/**
|
||||
* Elementor button widget.
|
||||
* Elementor widget that displays a button with the ability to control every
|
||||
* aspect of the button design.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class Clients_Carousel extends Widget_Base
|
||||
{
|
||||
|
||||
/**
|
||||
* Get widget name.
|
||||
* Retrieve button widget name.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget name.
|
||||
*/
|
||||
public function get_name()
|
||||
{
|
||||
return 'thinkai_clients_Carousel';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget title.
|
||||
* Retrieve button widget title.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget title.
|
||||
*/
|
||||
public function get_title()
|
||||
{
|
||||
return esc_html__('Thinkai Clients Carousel', 'thinkai');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget icon.
|
||||
* Retrieve button widget icon.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget icon.
|
||||
*/
|
||||
public function get_icon()
|
||||
{
|
||||
return 'eicon-banner';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget categories.
|
||||
* Retrieve the list of categories the button widget belongs to.
|
||||
* Used to determine where to display the widget in the editor.
|
||||
*
|
||||
* @since 2.0.0
|
||||
* @access public
|
||||
* @return array Widget categories.
|
||||
*/
|
||||
public function get_categories()
|
||||
{
|
||||
return [ 'thinkai' ];
|
||||
}
|
||||
|
||||
public function get_script_depends() {
|
||||
wp_register_script( 'clients-script', YT_URL . 'assets/js/feature-carousel.js', [ 'elementor-frontend' ], '1.0.0', true );
|
||||
return [ 'clients-script' ];
|
||||
}
|
||||
|
||||
/**
|
||||
* Register button widget controls.
|
||||
* Adds different input fields to allow the user to change and customize the widget settings.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*/
|
||||
protected function register_controls()
|
||||
{
|
||||
$this->start_controls_section(
|
||||
'clients_carousel',
|
||||
[
|
||||
'label' => esc_html__('Thinkai Clients Carousel', 'thinkai'),
|
||||
]
|
||||
);
|
||||
//Layout
|
||||
$this->add_control(
|
||||
'layout_control',
|
||||
[
|
||||
'label' => esc_html__( 'Layout Style', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => '1',
|
||||
'options' => array(
|
||||
'1' => esc_html__( 'Style One ', 'thinkai'),
|
||||
'2' => esc_html__( 'Style Two ', 'thinkai'),
|
||||
'3' => esc_html__( 'Style Three ', 'thinkai'),
|
||||
),
|
||||
]
|
||||
);
|
||||
|
||||
//Title
|
||||
$this->add_control(
|
||||
'title',
|
||||
[
|
||||
'label' => __( 'Title', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::TEXTAREA,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'placeholder' => __( 'Enter your Title', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
|
||||
//Our Feature Table
|
||||
$repeater = new Repeater();
|
||||
$repeater->add_control(
|
||||
'client_img',
|
||||
[
|
||||
'label' => __('Client Image', 'thinkai'),
|
||||
'type' => Controls_Manager::MEDIA,
|
||||
'default' => ['url' => Utils::get_placeholder_image_src(),],
|
||||
]
|
||||
);
|
||||
$repeater->add_control(
|
||||
'client_link',
|
||||
[
|
||||
'label' => __('External Url', 'thinkai'),
|
||||
'type' => Controls_Manager::URL,
|
||||
'placeholder' => __('https://your-link.com', 'plugin-domain'),
|
||||
'show_external' => true,
|
||||
'default' => [
|
||||
'url' => '',
|
||||
'is_external' => true,
|
||||
'nofollow' => true,
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'clients',
|
||||
[
|
||||
'label' => __('Add Clients Item', 'thinkai'),
|
||||
'type' => Controls_Manager::REPEATER,
|
||||
'fields' => $repeater->get_controls(),
|
||||
'condition' => [
|
||||
'layout_control' => ['1','2']
|
||||
]
|
||||
]
|
||||
);
|
||||
$this->end_controls_section();
|
||||
|
||||
//Title Style
|
||||
$this->start_controls_section(
|
||||
'title_style',
|
||||
[
|
||||
'label' => esc_html__( 'Title Style Settings', 'thinkai' ),
|
||||
'tab' => Controls_Manager::TAB_STYLE,
|
||||
]
|
||||
);
|
||||
$this->add_responsive_control(
|
||||
'title__margin',
|
||||
[
|
||||
'label' => esc_html__( 'Margin', 'thinkai' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => ['px', '%', 'em'],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .te-title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
|
||||
],
|
||||
'separator' => 'before',
|
||||
]
|
||||
);
|
||||
$this->add_responsive_control(
|
||||
'title_padding',
|
||||
[
|
||||
'label' => esc_html__( 'Padding', 'thinkai' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => ['px', '%', 'em'],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .te-title' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
|
||||
],
|
||||
'separator' => 'before',
|
||||
]
|
||||
);
|
||||
$this->add_group_control(
|
||||
Group_Control_Background::get_type(),
|
||||
[
|
||||
'name' => 'title_bgtype',
|
||||
'label' => __( 'Background', 'thinkai' ),
|
||||
'types' => [ 'classic', 'gradient' ],
|
||||
'selector' => '{{WRAPPER}} .partner-style2 .title-box .inner',
|
||||
]
|
||||
);
|
||||
$this->add_group_control(
|
||||
Group_Control_Border::get_type(),
|
||||
[
|
||||
'name' => 'title_border_type',
|
||||
'selector' =>
|
||||
'{{WRAPPER}} .te-title',
|
||||
'separator' => 'before',
|
||||
]
|
||||
);
|
||||
$this->add_group_control(
|
||||
Group_Control_Box_Shadow::get_type(),
|
||||
[
|
||||
'name' => 'title_border_box_shadow',
|
||||
'selector' =>
|
||||
'{{WRAPPER}} .te-title',
|
||||
'separator' => 'before',
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'title_border_radius',
|
||||
[
|
||||
'label' => esc_html__('Border Radius', 'thinkai'),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'separator' => 'before',
|
||||
'size_units' => ['px'],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .te-title' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'title_color',
|
||||
[
|
||||
'label' => esc_html__( 'Text Color', 'thinkai' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .te-title' => 'color: {{VALUE}} !important;',
|
||||
'{{WRAPPER}} .te-title a' => 'color: {{VALUE}} !important;',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'title_typography',
|
||||
'label' => __('Typography', 'thinkai'),
|
||||
'selector' => '{{WRAPPER}} .te-title',
|
||||
]
|
||||
);
|
||||
$this->add_group_control(
|
||||
Group_Control_Text_Shadow::get_type(),
|
||||
[
|
||||
'name' => 'title_text_shadow',
|
||||
'selector' => '{{WRAPPER}} .te-title',
|
||||
]
|
||||
);
|
||||
$this->end_controls_section();
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Render button widget output on the frontend.
|
||||
* Written in PHP and used to generate the final HTML.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*/
|
||||
protected function render()
|
||||
{
|
||||
$settings = $this->get_settings_for_display();
|
||||
$allowed_tags = wp_kses_allowed_html('post');
|
||||
?>
|
||||
|
||||
<?php
|
||||
if($settings['layout_control'] == '2') :
|
||||
?>
|
||||
|
||||
<!--Start Partner style3-->
|
||||
<section class="partner-style2 partner-style2--style3 p-0 m-0">
|
||||
<div class="auto-container">
|
||||
<?php if($settings['title']){ ?>
|
||||
<div class="title-box text-center">
|
||||
<div class="inner">
|
||||
<h3 class="te-title"><?php echo wp_kses($settings['title'], true); ?></h3>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="partner-style2__inner">
|
||||
<div class="owl-carousel owl-theme thm-owl__carousel partner-carousel" data-owl-options='{
|
||||
"loop": true,
|
||||
"autoplay": true,
|
||||
"margin": 0,
|
||||
"nav": false,
|
||||
"dots": false,
|
||||
"smartSpeed": 500,
|
||||
"autoplayTimeout": 10000,
|
||||
"navText": ["<span class=\"fa fa-angle-left\"></span>","<span class=\"fa fa-angle-right\"></span>"],
|
||||
"responsive": {
|
||||
|
||||
"0": {
|
||||
"items": 1
|
||||
},
|
||||
|
||||
"550": {
|
||||
"items": 2
|
||||
},
|
||||
"768": {
|
||||
"items": 3
|
||||
},
|
||||
"992": {
|
||||
"items": 4
|
||||
},
|
||||
"1300": {
|
||||
"items": 5
|
||||
},
|
||||
"1700": {
|
||||
"items": 6
|
||||
}
|
||||
}
|
||||
}'>
|
||||
|
||||
<?php foreach ($settings['clients'] as $item):?>
|
||||
<!--Start Single Partner Logo Box-->
|
||||
<div class="single-partner-logo-box-style2">
|
||||
<a href="<?php echo esc_url($item['client_link']['url']); ?>"><img src="<?php echo esc_url(wp_get_attachment_url($item['client_img']['id'])); ?>" alt="<?php bloginfo( 'name' ); ?>"></a>
|
||||
</div>
|
||||
<!--End Single Partner Logo Box-->
|
||||
<?php endforeach; ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!--End Partner style3-->
|
||||
|
||||
<?php else: ?>
|
||||
|
||||
<!--Start Partner style2-->
|
||||
<section class="partner-style2 p-0 m-0">
|
||||
<div class="auto-container">
|
||||
<?php if($settings['title']){ ?>
|
||||
<div class="title-box text-center">
|
||||
<div class="inner">
|
||||
<h3><?php echo wp_kses($settings['title'], true); ?></h3>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="partner-style2__inner">
|
||||
<div class="owl-carousel owl-theme thm-owl__carousel partner-carousel" data-owl-options='{
|
||||
"loop": true,
|
||||
"autoplay": true,
|
||||
"margin": 0,
|
||||
"nav": false,
|
||||
"dots": false,
|
||||
"smartSpeed": 500,
|
||||
"autoplayTimeout": 10000,
|
||||
"navText": ["<span class=\"fa fa-angle-left\"></span>","<span class=\"fa fa-angle-right\"></span>"],
|
||||
"responsive": {
|
||||
"0": {
|
||||
"items": 1
|
||||
},
|
||||
"550": {
|
||||
"items": 2
|
||||
},
|
||||
"768": {
|
||||
"items": 3
|
||||
},
|
||||
"992": {
|
||||
"items": 4
|
||||
},
|
||||
"1300": {
|
||||
"items": 5
|
||||
},
|
||||
"1700": {
|
||||
"items": 6
|
||||
}
|
||||
}
|
||||
}'>
|
||||
<?php foreach ($settings['clients'] as $item):?>
|
||||
<!--Start Single Partner Logo Box-->
|
||||
<div class="single-partner-logo-box-style2">
|
||||
<a href="<?php echo esc_url($item['client_link']['url']); ?>"><img src="<?php echo esc_url(wp_get_attachment_url($item['client_img']['id'])); ?>" alt="<?php bloginfo( 'name' ); ?>"></a>
|
||||
</div>
|
||||
<!--End Single Partner Logo Box-->
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!--End Partner style2-->
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
215
wp-content/plugins/thinkai-plugin/elementor/coming_soon.php
Normal file
215
wp-content/plugins/thinkai-plugin/elementor/coming_soon.php
Normal file
@@ -0,0 +1,215 @@
|
||||
<?php namespace THINKAIPLUGIN\Element;
|
||||
|
||||
use Elementor\Controls_Manager;
|
||||
use Elementor\Controls_Stack;
|
||||
use Elementor\Group_Control_Typography;
|
||||
use Elementor\Group_Control_Border;
|
||||
use Elementor\Repeater;
|
||||
use Elementor\Widget_Base;
|
||||
use Elementor\Utils;
|
||||
use Elementor\Group_Control_Text_Shadow;
|
||||
use \Elementor\Group_Control_Box_Shadow;
|
||||
use \Elementor\Group_Control_Background;
|
||||
use \Elementor\Group_Control_Image_Size;
|
||||
use \Elementor\Group_Control_Text_Stroke;
|
||||
use Elementor\Plugin;
|
||||
|
||||
/**
|
||||
* Elementor button widget.
|
||||
* Elementor widget that displays a button with the ability to control every
|
||||
* aspect of the button design.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class Coming_Soon extends Widget_Base {
|
||||
|
||||
/**
|
||||
* Get widget name.
|
||||
* Retrieve button widget name.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget name.
|
||||
*/
|
||||
public function get_name() {
|
||||
return 'thinkai_coming_soon';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget title.
|
||||
* Retrieve button widget title.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget title.
|
||||
*/
|
||||
public function get_title() {
|
||||
return esc_html__( 'Thinkai Coming Soon', 'thinkai' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget icon.
|
||||
* Retrieve button widget icon.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget icon.
|
||||
*/
|
||||
public function get_icon() {
|
||||
return 'eicon-gallery-grid';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget categories.
|
||||
* Retrieve the list of categories the button widget belongs to.
|
||||
* Used to determine where to display the widget in the editor.
|
||||
*
|
||||
* @since 2.0.0
|
||||
* @access public
|
||||
* @return array Widget categories.
|
||||
*/
|
||||
public function get_categories() {
|
||||
return [ 'thinkai' ];
|
||||
}
|
||||
|
||||
public function get_script_depends() {
|
||||
wp_register_script( 'counter-script', YT_URL . 'assets/js/cm-counter.js', [ 'elementor-frontend' ], '1.0.0', true );
|
||||
return [ 'counter-script' ];
|
||||
}
|
||||
|
||||
/**
|
||||
* Register button widget controls.
|
||||
* Adds different input fields to allow the user to change and customize the widget settings.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*/
|
||||
protected function register_controls() {
|
||||
$this->start_controls_section(
|
||||
'coming_soon',
|
||||
[
|
||||
'label' => esc_html__( 'Thinkai Coming Soon', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
|
||||
//BG img
|
||||
$this->add_control(
|
||||
'bg_image',
|
||||
[
|
||||
'label' => __( 'BG Image', 'thinkai' ),
|
||||
'type' => Controls_Manager::MEDIA,
|
||||
'default' => ['url' => Utils::get_placeholder_image_src(),],
|
||||
]
|
||||
);
|
||||
|
||||
//Title
|
||||
$this->add_control(
|
||||
'title',
|
||||
[
|
||||
'label' => __( 'Title', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'default' => esc_html__( 'We are Coming Soon...', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
|
||||
//Counter Value
|
||||
$this->add_control(
|
||||
'counter_value',
|
||||
[
|
||||
'label' => __( 'Coming Soon Counter Value', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'default' => esc_html__( '2025/12/31', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
//text
|
||||
$this->add_control(
|
||||
'text',
|
||||
[
|
||||
'label' => __( 'Description', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::TEXTAREA,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'default' => esc_html__( 'Enter You Description', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
//MailChimp Form Url
|
||||
$this->add_control(
|
||||
'mailchimp_form_url_v2',
|
||||
[
|
||||
'label' => __( 'Maichimp Form Url', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'default' => esc_html__( '[mc4wp_form id=44]', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
$this->end_controls_section();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Render button widget output on the frontend.
|
||||
* Written in PHP and used to generate the final HTML.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*/
|
||||
protected function render() {
|
||||
$settings = $this->get_settings_for_display();
|
||||
$allowed_tags = wp_kses_allowed_html('post');
|
||||
?>
|
||||
|
||||
<!--Start Coming Soon page Style1-->
|
||||
<section class="coming-soon-page-style1 full-height">
|
||||
<?php if($settings['bg_image']){ ?><div class="coming-soon-page-style1__bg" style="background-image: url('<?php echo esc_url(wp_get_attachment_url($settings['bg_image']['id'])); ?>');"></div><?php } ?>
|
||||
<div class="coming-soon-page-style1__content">
|
||||
<div class="inner">
|
||||
<?php if($settings['title']){ ?><div class="big-title"><?php echo wp_kses($settings['title'], true); ?></div><?php } ?>
|
||||
|
||||
<?php if($settings['counter_value']){ ?>
|
||||
<div class="timer-box clearfix">
|
||||
<div class="countdown-timer">
|
||||
<div class="default-coundown">
|
||||
<div class="box">
|
||||
<div class="countdown time-countdown-two" data-countdown-time="<?php echo wp_kses($settings['counter_value'], true); ?>"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if($settings['text']){ ?>
|
||||
<div class="text">
|
||||
<p>
|
||||
<?php echo wp_kses($settings['text'], true); ?>
|
||||
</p>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if($settings['mailchimp_form_url_v2']){ ?>
|
||||
<div class="subscribe-box-style1">
|
||||
<div class="subscribe-form" >
|
||||
<?php echo do_shortcode($settings['mailchimp_form_url_v2']); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!--End Coming Soon page Style1-->
|
||||
|
||||
<?php
|
||||
}
|
||||
}
|
||||
262
wp-content/plugins/thinkai-plugin/elementor/contact_us.php
Normal file
262
wp-content/plugins/thinkai-plugin/elementor/contact_us.php
Normal file
@@ -0,0 +1,262 @@
|
||||
<?php namespace THINKAIPLUGIN\Element;
|
||||
|
||||
use Elementor\Controls_Manager;
|
||||
use Elementor\Controls_Stack;
|
||||
use Elementor\Group_Control_Typography;
|
||||
use Elementor\Group_Control_Border;
|
||||
use Elementor\Repeater;
|
||||
use Elementor\Widget_Base;
|
||||
use Elementor\Utils;
|
||||
use Elementor\Group_Control_Text_Shadow;
|
||||
use \Elementor\Group_Control_Box_Shadow;
|
||||
use \Elementor\Group_Control_Background;
|
||||
use \Elementor\Group_Control_Image_Size;
|
||||
use \Elementor\Group_Control_Text_Stroke;
|
||||
use Elementor\Plugin;
|
||||
|
||||
/**
|
||||
* Elementor button widget.
|
||||
* Elementor widget that displays a button with the ability to control every
|
||||
* aspect of the button design.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class Contact_Us extends Widget_Base {
|
||||
|
||||
/**
|
||||
* Get widget name.
|
||||
* Retrieve button widget name.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget name.
|
||||
*/
|
||||
public function get_name() {
|
||||
return 'thinkai_contact_us';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget title.
|
||||
* Retrieve button widget title.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget title.
|
||||
*/
|
||||
public function get_title() {
|
||||
return esc_html__( 'Thinkai Contact Us', 'thinkai' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget icon.
|
||||
* Retrieve button widget icon.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget icon.
|
||||
*/
|
||||
public function get_icon() {
|
||||
return 'eicon-form-horizontal';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget categories.
|
||||
* Retrieve the list of categories the button widget belongs to.
|
||||
* Used to determine where to display the widget in the editor.
|
||||
*
|
||||
* @since 2.0.0
|
||||
* @access public
|
||||
* @return array Widget categories.
|
||||
*/
|
||||
public function get_categories() {
|
||||
return [ 'thinkai' ];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Register button widget controls.
|
||||
* Adds different input fields to allow the user to change and customize the widget settings.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*/
|
||||
protected function register_controls() {
|
||||
$this->start_controls_section(
|
||||
'contact_us',
|
||||
[
|
||||
'label' => esc_html__( 'Thinkai Contact Us', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
//Shape img
|
||||
$this->add_control(
|
||||
'shape_img',
|
||||
[
|
||||
'label' => __( 'Shape Image', 'thinkai' ),
|
||||
'type' => Controls_Manager::MEDIA,
|
||||
'default' => ['url' => Utils::get_placeholder_image_src(),],
|
||||
]
|
||||
);
|
||||
//show_particles
|
||||
$this->add_control(
|
||||
'show_particles',
|
||||
[
|
||||
'label' => esc_html__( 'Enable Particles', 'thinkai' ),
|
||||
'type' => Controls_Manager::SWITCHER,
|
||||
'label_on' => esc_html__( 'On', 'thinkai' ),
|
||||
'label_off' => esc_html__( 'Off', 'thinkai' ),
|
||||
'return_value' => 'yes',
|
||||
'default' => 'no',
|
||||
]
|
||||
);
|
||||
//features_list
|
||||
$this->add_control(
|
||||
'features_list',
|
||||
[
|
||||
'label' => __( 'Feature List', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::TEXTAREA,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'placeholder' => __( 'Enter your List', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
//Feature img
|
||||
$this->add_control(
|
||||
'feature_img',
|
||||
[
|
||||
'label' => __( 'Feature Image', 'thinkai' ),
|
||||
'type' => Controls_Manager::MEDIA,
|
||||
'default' => ['url' => Utils::get_placeholder_image_src(),],
|
||||
]
|
||||
);
|
||||
|
||||
//Sub Title
|
||||
$this->add_control(
|
||||
'subtitle',
|
||||
[
|
||||
'label' => __( 'Sub Title', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'default' => esc_html__( '[ SEND A MESSAGE ]', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
|
||||
//Title
|
||||
$this->add_control(
|
||||
'title',
|
||||
[
|
||||
'label' => __( 'Title', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::TEXTAREA,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'placeholder' => __( 'Enter your title', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
//Form Array
|
||||
$this->add_control(
|
||||
'cf7_shortocde',
|
||||
[
|
||||
'label' => esc_html__('Select Contact Form 7', 'thinkai'),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'label_block' => true,
|
||||
'options' => get_contact_form_7_list(),
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Render button widget output on the frontend.
|
||||
* Written in PHP and used to generate the final HTML.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*/
|
||||
protected function render() {
|
||||
$settings = $this->get_settings_for_display();
|
||||
$allowed_tags = wp_kses_allowed_html('post');
|
||||
?>
|
||||
|
||||
<!--Start Main Contact Form -->
|
||||
<section class="main-contact-form">
|
||||
<?php if($settings['shape_img']){ ?>
|
||||
<div class="main-contact-form__shape1">
|
||||
<img class="float-bob-y" src="<?php echo esc_url(wp_get_attachment_url($settings['shape_img']['id'])); ?>" alt="<?php bloginfo( 'name' ); ?>">
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if($settings['show_particles']){ ?>
|
||||
<div id="particles-js"></div>
|
||||
<?php } ?>
|
||||
<?php
|
||||
$features_list = $settings['features_list'];
|
||||
if(!empty($features_list)){
|
||||
$features_list = explode("\n", ($features_list));
|
||||
?>
|
||||
<div class="scrolling-text-style6">
|
||||
<div class="inner">
|
||||
<ul class="clearfix marquee_mode">
|
||||
<?php foreach($features_list as $features): ?>
|
||||
<li data-hover="<?php echo wp_kses($features, true); ?>">
|
||||
<?php echo wp_kses($features, true); ?>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<?php if($settings['feature_img']){ ?>
|
||||
<div class="col-xl-6 col-lg-5">
|
||||
<div class="main-contact-form__img-box">
|
||||
<div class="inner">
|
||||
<img src="<?php echo esc_url(wp_get_attachment_url($settings['feature_img']['id'])); ?>" alt="<?php bloginfo( 'name' ); ?>">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="col-xl-6 col-lg-7">
|
||||
<div class="main-contact-form__inner">
|
||||
<?php if($settings['subtitle'] || $settings['title']){ ?>
|
||||
<div class="sec-title sec-title-animation animation-style2">
|
||||
<?php if($settings['subtitle']){ ?>
|
||||
<div class="sub-title">
|
||||
<h4><?php echo wp_kses($settings['subtitle'], true); ?></h4>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if($settings['title']){ ?>
|
||||
<h2 class="title-animation">
|
||||
<?php echo wp_kses($settings['title'], true); ?>
|
||||
</h2>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if($settings['cf7_shortocde']){ ?>
|
||||
<div class="contact-form">
|
||||
<div id="contact-form" class="default-form2">
|
||||
<?php echo do_shortcode('[contact-form-7 id="'.esc_attr($settings['cf7_shortocde']).'"]'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!--End Main Contact Form-->
|
||||
|
||||
<?php
|
||||
}
|
||||
}
|
||||
186
wp-content/plugins/thinkai-plugin/elementor/dashboard_image.php
Normal file
186
wp-content/plugins/thinkai-plugin/elementor/dashboard_image.php
Normal file
@@ -0,0 +1,186 @@
|
||||
<?php namespace THINKAIPLUGIN\Element;
|
||||
|
||||
use Elementor\Controls_Manager;
|
||||
use Elementor\Controls_Stack;
|
||||
use Elementor\Group_Control_Typography;
|
||||
use Elementor\Group_Control_Border;
|
||||
use Elementor\Repeater;
|
||||
use Elementor\Widget_Base;
|
||||
use Elementor\Utils;
|
||||
use Elementor\Group_Control_Text_Shadow;
|
||||
use \Elementor\Group_Control_Box_Shadow;
|
||||
use \Elementor\Group_Control_Background;
|
||||
use \Elementor\Group_Control_Text_Stroke;
|
||||
use Elementor\Plugin;
|
||||
|
||||
/**
|
||||
* Elementor button widget.
|
||||
* Elementor widget that displays a button with the ability to control every
|
||||
* aspect of the button design.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class Dashboard_Image extends Widget_Base {
|
||||
/**
|
||||
* Get widget name.
|
||||
* Retrieve button widget name.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget name.
|
||||
*/
|
||||
public function get_name() {
|
||||
return 'thinkai_dashboard_image';
|
||||
}
|
||||
/**
|
||||
* Get widget title.
|
||||
* Retrieve button widget title.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget title.
|
||||
*/
|
||||
public function get_title() {
|
||||
return esc_html__( 'Thinkai Dashboard Image', 'thinkai' );
|
||||
}
|
||||
/**
|
||||
* Get widget icon.
|
||||
* Retrieve button widget icon.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget icon.
|
||||
*/
|
||||
public function get_icon() {
|
||||
return 'eicon-image-hotspot';
|
||||
}
|
||||
/**
|
||||
* Get widget categories.
|
||||
* Retrieve the list of categories the button widget belongs to.
|
||||
* Used to determine where to display the widget in the editor.
|
||||
*
|
||||
* @since 2.0.0
|
||||
* @access public
|
||||
* @return array Widget categories.
|
||||
*/
|
||||
public function get_categories() {
|
||||
return [ 'thinkai' ];
|
||||
}
|
||||
|
||||
/**
|
||||
* Register button widget controls.
|
||||
* Adds different input fields to allow the user to change and customize the widget settings.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*/
|
||||
protected function register_controls() {
|
||||
$this->start_controls_section(
|
||||
'dashboard_image',
|
||||
[
|
||||
'label' => esc_html__( 'Thinkai Dashboard Image', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'layout_control',
|
||||
[
|
||||
'label' => esc_html__( 'Layout Style', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => '1',
|
||||
'options' => array(
|
||||
'1' => esc_html__( 'Style One ', 'thinkai'),
|
||||
'2' => esc_html__( 'Style Two ', 'thinkai'),
|
||||
'3' => esc_html__( 'Style Three ', 'thinkai'),
|
||||
),
|
||||
]
|
||||
);
|
||||
//Shape Image
|
||||
$this->add_control(
|
||||
'shape_image_v1',
|
||||
[
|
||||
'label' => esc_html__( 'Left Side Shape Image', 'thinkai' ),
|
||||
'type' => Controls_Manager::MEDIA,
|
||||
'default' => [
|
||||
'url' => Utils::get_placeholder_image_src(),
|
||||
],
|
||||
]
|
||||
);
|
||||
//Shape Image
|
||||
$this->add_control(
|
||||
'shape_image_v2',
|
||||
[
|
||||
'label' => esc_html__( 'Right Side Shape Image', 'thinkai' ),
|
||||
'type' => Controls_Manager::MEDIA,
|
||||
'default' => [
|
||||
'url' => Utils::get_placeholder_image_src(),
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'dashboard_img',
|
||||
[
|
||||
'label' => esc_html__( 'Dashboard Image', 'thinkai' ),
|
||||
'type' => Controls_Manager::MEDIA,
|
||||
'default' => [
|
||||
'url' => Utils::get_placeholder_image_src(),
|
||||
],
|
||||
'condition' => [
|
||||
'layout_control' => ['1']
|
||||
]
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Render button widget output on the frontend.
|
||||
* Written in PHP and used to generate the final HTML.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*/
|
||||
protected function render() {
|
||||
$settings = $this->get_settings_for_display();
|
||||
$allowed_tags = wp_kses_allowed_html('post');
|
||||
?>
|
||||
|
||||
<?php if($settings['layout_control'] == '3') :?>
|
||||
|
||||
|
||||
<?php elseif($settings['layout_control'] == '2') :?>
|
||||
|
||||
|
||||
<?php else: ?>
|
||||
|
||||
<!--Start Dashboard Style1-->
|
||||
<section class="dashboard-style1">
|
||||
<?php if($settings['shape_image_v1']){ ?>
|
||||
<div class="dashboard-style1__shape1">
|
||||
<img src="<?php echo esc_url(wp_get_attachment_url($settings['shape_image_v1']['id'])); ?>" alt="<?php bloginfo( 'name' ); ?>">
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if($settings['shape_image_v2']){ ?>
|
||||
<div class="dashboard-style1__shape2">
|
||||
<img src="<?php echo esc_url(wp_get_attachment_url($settings['shape_image_v2']['id'])); ?>" alt="<?php bloginfo( 'name' ); ?>">
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if($settings['dashboard_img']){ ?>
|
||||
<div class="container">
|
||||
<div class="dashboard-style1__content">
|
||||
<div class="dashboard-style1__bg" style="background-image: url(<?php echo esc_url(wp_get_attachment_url($settings['dashboard_img']['id'])); ?>);"></div>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</section>
|
||||
<!--End Dashboard Style1-->
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
}
|
||||
}
|
||||
95
wp-content/plugins/thinkai-plugin/elementor/elementor.php
Normal file
95
wp-content/plugins/thinkai-plugin/elementor/elementor.php
Normal file
@@ -0,0 +1,95 @@
|
||||
<?php
|
||||
|
||||
namespace THINKAIPLUGIN\Element;
|
||||
|
||||
|
||||
class Elementor {
|
||||
static $widgets = array(
|
||||
//Home Page One
|
||||
'banner',
|
||||
'hero_title',
|
||||
'service_card',
|
||||
'feature_carousel',
|
||||
'marquee_text',
|
||||
'float_image',
|
||||
'button',
|
||||
'funfacts',
|
||||
'project_masonry',
|
||||
'testimonial_carousel',
|
||||
'faqs',
|
||||
'blog_grid',
|
||||
//Home Page Two
|
||||
'clients_carousel',
|
||||
'newsletter',
|
||||
'icon_box',
|
||||
'dashboard_image',
|
||||
'wave_image',
|
||||
'trending_voices',
|
||||
'our_cases',
|
||||
'about_us',
|
||||
'google_review',
|
||||
'testimonial_review',
|
||||
'feature_services',
|
||||
'pricing_plan',
|
||||
'insta_gallery',
|
||||
//Home Page Five
|
||||
'video_banner',
|
||||
'project_card',
|
||||
'video_tabs',
|
||||
'blog_carousel',
|
||||
'team_grid',
|
||||
'coming_soon',
|
||||
'blog_list_view',
|
||||
'contact_us',
|
||||
|
||||
);
|
||||
|
||||
static function init() {
|
||||
add_action( 'elementor/init', array( __CLASS__, 'loader' ) );
|
||||
add_action( 'elementor/elements/categories_registered', array( __CLASS__, 'register_cats' ) );
|
||||
}
|
||||
|
||||
static function loader() {
|
||||
|
||||
foreach ( self::$widgets as $widget ) {
|
||||
|
||||
$file = THINKAIPLUGIN_PLUGIN_PATH . '/elementor/' . $widget . '.php';
|
||||
if ( file_exists( $file ) ) {
|
||||
require_once $file;
|
||||
}
|
||||
|
||||
add_action( 'elementor/widgets/widgets_registered', array( __CLASS__, 'register' ) );
|
||||
}
|
||||
}
|
||||
|
||||
static function register( $elemntor ) {
|
||||
foreach ( self::$widgets as $widget ) {
|
||||
$class = '\\THINKAIPLUGIN\\Element\\' . ucwords( $widget );
|
||||
|
||||
if ( class_exists( $class ) ) {
|
||||
$elemntor->register_widget_type( new $class );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static function register_cats( $elements_manager ) {
|
||||
|
||||
$elements_manager->add_category(
|
||||
'thinkai',
|
||||
[
|
||||
'title' => esc_html__( 'Thinkai', 'thinkai' ),
|
||||
'icon' => 'fa fa-plug',
|
||||
]
|
||||
);
|
||||
$elements_manager->add_category(
|
||||
'templatepath',
|
||||
[
|
||||
'title' => esc_html__( 'Template Path', 'thinkai' ),
|
||||
'icon' => 'fa fa-plug',
|
||||
]
|
||||
);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Elementor::init();
|
||||
433
wp-content/plugins/thinkai-plugin/elementor/faqs.php
Normal file
433
wp-content/plugins/thinkai-plugin/elementor/faqs.php
Normal file
@@ -0,0 +1,433 @@
|
||||
<?php namespace THINKAIPLUGIN\Element;
|
||||
|
||||
use Elementor\Controls_Manager;
|
||||
use Elementor\Controls_Stack;
|
||||
use Elementor\Group_Control_Typography;
|
||||
use Elementor\Group_Control_Border;
|
||||
use Elementor\Repeater;
|
||||
use Elementor\Widget_Base;
|
||||
use Elementor\Utils;
|
||||
use Elementor\Group_Control_Text_Shadow;
|
||||
use \Elementor\Group_Control_Box_Shadow;
|
||||
use \Elementor\Group_Control_Background;
|
||||
use \Elementor\Group_Control_Image_Size;
|
||||
use \Elementor\Group_Control_Text_Stroke;
|
||||
use Elementor\Plugin;
|
||||
|
||||
/**
|
||||
* Elementor button widget.
|
||||
* Elementor widget that displays a button with the ability to control every
|
||||
* aspect of the button design.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class Faqs extends Widget_Base {
|
||||
|
||||
/**
|
||||
* Get widget name.
|
||||
* Retrieve button widget name.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget name.
|
||||
*/
|
||||
public function get_name() {
|
||||
return 'thinkai_faqs';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget title.
|
||||
* Retrieve button widget title.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget title.
|
||||
*/
|
||||
public function get_title() {
|
||||
return esc_html__( 'Thinkai Faqs', 'thinkai' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget icon.
|
||||
* Retrieve button widget icon.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget icon.
|
||||
*/
|
||||
public function get_icon() {
|
||||
return 'eicon-accordion';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget categories.
|
||||
* Retrieve the list of categories the button widget belongs to.
|
||||
* Used to determine where to display the widget in the editor.
|
||||
*
|
||||
* @since 2.0.0
|
||||
* @access public
|
||||
* @return array Widget categories.
|
||||
*/
|
||||
public function get_categories() {
|
||||
return [ 'thinkai' ];
|
||||
}
|
||||
|
||||
/**
|
||||
* Register button widget controls.
|
||||
* Adds different input fields to allow the user to change and customize the widget settings.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*/
|
||||
protected function register_controls() {
|
||||
$this->start_controls_section(
|
||||
'faqs',
|
||||
[
|
||||
'label' => esc_html__( 'Thinkai Faqs', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'layout_control',
|
||||
[
|
||||
'label' => esc_html__( 'Layout Style', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => '1',
|
||||
'options' => array(
|
||||
'1' => esc_html__( 'Style One ', 'thinkai'),
|
||||
'2' => esc_html__( 'Style Two ', 'thinkai'),
|
||||
'3' => esc_html__( 'Style Three ', 'thinkai'),
|
||||
'4' => esc_html__( 'Style Four ', 'thinkai'),
|
||||
'5' => esc_html__( 'Style Five ', 'thinkai'),
|
||||
),
|
||||
]
|
||||
);
|
||||
|
||||
//BG Image
|
||||
$this->add_control(
|
||||
'bg_img',
|
||||
[
|
||||
'label' => __( 'BG Image', 'thinkai' ),
|
||||
'type' => Controls_Manager::MEDIA,
|
||||
'default' => ['url' => Utils::get_placeholder_image_src(),],
|
||||
'condition' => [
|
||||
'layout_control' => ['1','2']
|
||||
]
|
||||
]
|
||||
);
|
||||
//BG Shadow Image
|
||||
$this->add_control(
|
||||
'bg_shadow_img',
|
||||
[
|
||||
'label' => __( 'BG Shadow Image', 'thinkai' ),
|
||||
'type' => Controls_Manager::MEDIA,
|
||||
'default' => ['url' => Utils::get_placeholder_image_src(),],
|
||||
'condition' => [
|
||||
'layout_control' => '2'
|
||||
]
|
||||
]
|
||||
);
|
||||
|
||||
//Switcher
|
||||
$this->add_control(
|
||||
'show_title_area',
|
||||
[
|
||||
'label' => esc_html__( 'Enable Title Section', 'thinkai' ),
|
||||
'type' => Controls_Manager::SWITCHER,
|
||||
'label_on' => esc_html__( 'On', 'thinkai' ),
|
||||
'label_off' => esc_html__( 'Off', 'thinkai' ),
|
||||
'return_value' => 'yes',
|
||||
'default' => 'no',
|
||||
'condition' => [
|
||||
'layout_control' => ['1','2']
|
||||
]
|
||||
]
|
||||
);
|
||||
//Sub Title
|
||||
$this->add_control(
|
||||
'subtitle',
|
||||
[
|
||||
'label' => __( 'Sub Title', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'default' => esc_html__( '[ FAQ’S ],', 'thinkai' ),
|
||||
'condition' => [
|
||||
'layout_control' => ['1','2'],
|
||||
'show_title_area' => 'yes'
|
||||
]
|
||||
]
|
||||
);
|
||||
//Title
|
||||
$this->add_control(
|
||||
'title',
|
||||
[
|
||||
'label' => __( 'Title', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::TEXTAREA,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'placeholder' => __( 'Enter your Title', 'thinkai' ),
|
||||
'condition' => [
|
||||
'layout_control' => ['1','2'],
|
||||
'show_title_area' => 'yes'
|
||||
]
|
||||
]
|
||||
);
|
||||
|
||||
//Faqs Repeater
|
||||
$repeater = new Repeater();
|
||||
$repeater->add_control(
|
||||
'faqs_title',
|
||||
[
|
||||
'label' => __( 'Title', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::TEXTAREA,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'placeholder' => __( 'Enter your Title', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
$repeater->add_control(
|
||||
'faqs_text',
|
||||
[
|
||||
'label' => __( 'Description', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::TEXTAREA,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'placeholder' => __( 'Enter your Description', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'faq',
|
||||
[
|
||||
'label' => __('Add faq Item', 'thinkai'),
|
||||
'type' => Controls_Manager::REPEATER,
|
||||
'fields' => $repeater->get_controls(),
|
||||
'title_field' => '{{{ faqs_title }}}',
|
||||
'condition' => [
|
||||
'layout_control' => ['1','2','3','4','5']
|
||||
]
|
||||
]
|
||||
);
|
||||
$this->end_controls_section();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Render button widget output on the frontend.
|
||||
* Written in PHP and used to generate the final HTML.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*/
|
||||
protected function render() {
|
||||
$settings = $this->get_settings_for_display();
|
||||
$allowed_tags = wp_kses_allowed_html('post');
|
||||
?>
|
||||
|
||||
<?php if($settings['layout_control'] == '5') :?>
|
||||
|
||||
<div class="universal-image-generator p-0 m-0">
|
||||
<ul class="accordion-box-style2 p-0 m-0">
|
||||
<?php
|
||||
foreach($settings['faq'] as $key => $item):
|
||||
?>
|
||||
<!--Start single accordion box-->
|
||||
<li class="accordion accordion-block acc-accordion">
|
||||
<div class="accord-btn acc-accord-btn <?php if($key == 0) echo 'active'; ?>">
|
||||
<h4><?php echo wp_kses($item['faqs_title'], true);?></h4>
|
||||
<div class="icon-box">
|
||||
<span class="icon-right-arrow"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="accord-content acc-accord-content <?php if($key == 0) echo 'collapsed'; ?>">
|
||||
<p>
|
||||
<?php echo wp_kses($item['faqs_text'], true);?>
|
||||
</p>
|
||||
</div>
|
||||
</li>
|
||||
<!--End single accordion box-->
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<?php elseif($settings['layout_control'] == '4') :?>
|
||||
|
||||
<!--Start Faq Page One-->
|
||||
<section class="faq-page-one p-0 m-0">
|
||||
<div class="faq-style1__content">
|
||||
<div class="faq-content-box">
|
||||
<ul class="accordion-box-style1 style2">
|
||||
<?php
|
||||
foreach($settings['faq'] as $key => $item):
|
||||
?>
|
||||
<!--Start single accordion box-->
|
||||
<li class="accordion accordion-block acc-accordion">
|
||||
<div class="accord-btn acc-accord-btn">
|
||||
<h4>
|
||||
<?php echo wp_kses($item['faqs_title'], true);?>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="accord-content acc-accord-content">
|
||||
<p>
|
||||
<?php echo wp_kses($item['faqs_text'], true);?>
|
||||
</p>
|
||||
</div>
|
||||
</li>
|
||||
<!--End single accordion box-->
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!--End Faq Page One-->
|
||||
|
||||
<?php elseif($settings['layout_control'] == '3') :?>
|
||||
|
||||
<!--Start Faq Page One-->
|
||||
<section class="faq-page-one p-0 m-0">
|
||||
<div class="faq-style1__content">
|
||||
<div class="faq-content-box">
|
||||
<ul class="accordion-box-style1">
|
||||
<?php
|
||||
foreach($settings['faq'] as $key => $item):
|
||||
?>
|
||||
<!--Start single accordion box-->
|
||||
<li class="accordion accordion-block acc-accordion">
|
||||
<div class="accord-btn acc-accord-btn">
|
||||
<h4>
|
||||
<?php echo wp_kses($item['faqs_title'], true);?>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="accord-content acc-accord-content">
|
||||
<p>
|
||||
<?php echo wp_kses($item['faqs_text'], true);?>
|
||||
</p>
|
||||
</div>
|
||||
</li>
|
||||
<!--End single accordion box-->
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!--End Faq Page One-->
|
||||
|
||||
<?php elseif($settings['layout_control'] == '2') :?>
|
||||
|
||||
<!--Start Faq Style1-->
|
||||
<section class="faq-style1 faq-style1--style2">
|
||||
<?php if($settings['bg_img']){ ?>
|
||||
<div class="faq-style1__bg float-bob-x"
|
||||
style="background-image: url(<?php echo esc_url(wp_get_attachment_url($settings['bg_img']['id'])); ?>);">
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if($settings['bg_shadow_img']){ ?>
|
||||
<div class="faq-style1--style2__shadow wow slideInRight animated" data-wow-delay="300ms" data-wow-duration="1500ms">
|
||||
<img class="zoominout" src="<?php echo esc_url(wp_get_attachment_url($settings['bg_shadow_img']['id'])); ?>" alt="<?php bloginfo( 'name' ); ?>">
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="container">
|
||||
<div class="faq-style1__content">
|
||||
|
||||
<div class="faq-content-box">
|
||||
<?php if($settings['show_title_area'] == 'yes'){ ?>
|
||||
<div class="sec-title sec-title-animation animation-style2">
|
||||
<?php if($settings['subtitle']){ ?>
|
||||
<div class="sub-title">
|
||||
<h4><?php echo wp_kses($settings['subtitle'], true);?></h4>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if($settings['title']){ ?><h2 class="title-animation"><?php echo wp_kses($settings['title'], true);?></h2><?php } ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<ul class="accordion-box-style1 accordion-box-style1--instyle2">
|
||||
<?php
|
||||
foreach($settings['faq'] as $key => $item):
|
||||
?>
|
||||
<!--Start single accordion box-->
|
||||
<li class="accordion accordion-block acc-accordion wow fadeInRight animated" data-wow-delay="300ms" data-wow-duration="1500ms">
|
||||
<div class="accord-btn acc-accord-btn <?php if($key == 0 ) echo 'active'; ?>">
|
||||
<h4>
|
||||
<?php echo wp_kses($item['faqs_title'], true);?>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="accord-content acc-accord-content <?php if($key == 0 ) echo 'collapsed'; ?>">
|
||||
<p>
|
||||
<?php echo wp_kses($item['faqs_text'], true);?>
|
||||
</p>
|
||||
</div>
|
||||
</li>
|
||||
<!--End single accordion box-->
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!--End Faq Style1-->
|
||||
|
||||
<?php else: ?>
|
||||
|
||||
<!--Start Faq Style1-->
|
||||
<section class="faq-style1">
|
||||
<?php if($settings['bg_img']){ ?>
|
||||
<div class="faq-style1__bg float-bob-x"
|
||||
style="background-image: url(<?php echo esc_url(wp_get_attachment_url($settings['bg_img']['id'])); ?>);">
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="container">
|
||||
<div class="faq-style1__content">
|
||||
|
||||
<div class="faq-content-box">
|
||||
<?php if($settings['show_title_area'] == 'yes'){ ?>
|
||||
<div class="sec-title sec-title-animation animation-style2">
|
||||
<?php if($settings['subtitle']){ ?>
|
||||
<div class="sub-title">
|
||||
<h4><?php echo wp_kses($settings['subtitle'], true);?></h4>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if($settings['title']){ ?><h2 class="title-animation"><?php echo wp_kses($settings['title'], true);?></h2><?php } ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<ul class="accordion-box-style1">
|
||||
<?php
|
||||
foreach($settings['faq'] as $key => $item):
|
||||
?>
|
||||
<!--Start single accordion box-->
|
||||
<li class="accordion accordion-block acc-accordion">
|
||||
<div class="accord-btn acc-accord-btn <?php if($key == 0 ) echo 'active'; ?>">
|
||||
<h4>
|
||||
<?php echo wp_kses($item['faqs_title'], true);?>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="accord-content acc-accord-content <?php if($key == 0 ) echo 'collapsed'; ?>">
|
||||
<p>
|
||||
<?php echo wp_kses($item['faqs_text'], true);?>
|
||||
</p>
|
||||
</div>
|
||||
</li>
|
||||
<!--End single accordion box-->
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!--End Faq Style1-->
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
}
|
||||
}
|
||||
1636
wp-content/plugins/thinkai-plugin/elementor/feature_carousel.php
Normal file
1636
wp-content/plugins/thinkai-plugin/elementor/feature_carousel.php
Normal file
File diff suppressed because it is too large
Load Diff
616
wp-content/plugins/thinkai-plugin/elementor/feature_services.php
Normal file
616
wp-content/plugins/thinkai-plugin/elementor/feature_services.php
Normal file
@@ -0,0 +1,616 @@
|
||||
<?php namespace THINKAIPLUGIN\Element;
|
||||
|
||||
use Elementor\Controls_Manager;
|
||||
use Elementor\Controls_Stack;
|
||||
use Elementor\Group_Control_Typography;
|
||||
use Elementor\Group_Control_Border;
|
||||
use Elementor\Repeater;
|
||||
use Elementor\Widget_Base;
|
||||
use Elementor\Utils;
|
||||
use Elementor\Group_Control_Text_Shadow;
|
||||
use \Elementor\Group_Control_Box_Shadow;
|
||||
use \Elementor\Group_Control_Background;
|
||||
use \Elementor\Group_Control_Image_Size;
|
||||
use \Elementor\Group_Control_Text_Stroke;
|
||||
use Elementor\Plugin;
|
||||
|
||||
/**
|
||||
* Elementor button widget.
|
||||
* Elementor widget that displays a button with the ability to control every
|
||||
* aspect of the button design.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class Feature_Services extends Widget_Base {
|
||||
|
||||
/**
|
||||
* Get widget name.
|
||||
* Retrieve button widget name.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget name.
|
||||
*/
|
||||
public function get_name() {
|
||||
return 'thinkai_feature_services';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget title.
|
||||
* Retrieve button widget title.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget title.
|
||||
*/
|
||||
public function get_title() {
|
||||
return esc_html__( 'Thinkai Feature Services', 'thinkai' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget icon.
|
||||
* Retrieve button widget icon.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget icon.
|
||||
*/
|
||||
public function get_icon() {
|
||||
return 'eicon-banner';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget categories.
|
||||
* Retrieve the list of categories the button widget belongs to.
|
||||
* Used to determine where to display the widget in the editor.
|
||||
*
|
||||
* @since 2.0.0
|
||||
* @access public
|
||||
* @return array Widget categories.
|
||||
*/
|
||||
public function get_categories() {
|
||||
return [ 'thinkai' ];
|
||||
}
|
||||
|
||||
/**
|
||||
* Register button widget controls.
|
||||
* Adds different input fields to allow the user to change and customize the widget settings.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*/
|
||||
protected function register_controls() {
|
||||
$this->start_controls_section(
|
||||
'feature_services',
|
||||
[
|
||||
'label' => esc_html__( 'Thinkai Feature Services', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'layout_control',
|
||||
[
|
||||
'label' => esc_html__( 'Layout Style', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => '1',
|
||||
'options' => array(
|
||||
'1' => esc_html__( 'Style One ', 'thinkai'),
|
||||
'2' => esc_html__( 'Style Two ', 'thinkai'),
|
||||
),
|
||||
]
|
||||
);
|
||||
|
||||
//Vertical Client Carousel Repeater
|
||||
$repeater = new Repeater();
|
||||
$repeater->add_control(
|
||||
'shape_image',
|
||||
[
|
||||
'label' => esc_html__( 'BG Shape Image', 'thinkai' ),
|
||||
'type' => Controls_Manager::MEDIA,
|
||||
'default' => [
|
||||
'url' => Utils::get_placeholder_image_src(),
|
||||
],
|
||||
]
|
||||
);
|
||||
$repeater->add_control(
|
||||
'title',
|
||||
[
|
||||
'label' => __( 'Title', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'placeholder' => __( 'Enter your Title', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
//Link
|
||||
$repeater->add_control(
|
||||
'link_option',
|
||||
[
|
||||
'label' => esc_html__( 'Select link Option', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'extranal',
|
||||
'options' => array(
|
||||
'extranal' => esc_html__( 'Extranal ', 'thinkai'),
|
||||
'page' => esc_html__( 'Page ', 'thinkai'),
|
||||
),
|
||||
]
|
||||
);
|
||||
$repeater->add_control(
|
||||
'link',
|
||||
[
|
||||
'label' => __( 'External Link', 'thinkai' ),
|
||||
'type' => Controls_Manager::URL,
|
||||
'label_block' => true,
|
||||
'placeholder' => __( 'https://your-link.com', 'thinkai' ),
|
||||
'show_external' => true,
|
||||
'default' => [
|
||||
'url' => '',
|
||||
'is_external' => true,
|
||||
'nofollow' => true,
|
||||
],
|
||||
'condition' => [
|
||||
'link_option' => 'extranal'
|
||||
]
|
||||
]
|
||||
);
|
||||
$repeater->add_control(
|
||||
'page_select',
|
||||
[
|
||||
'label' => esc_html__( 'Select Page', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::SELECT2,
|
||||
'default' => 'extranal',
|
||||
'options' => thinkai_page_list(),
|
||||
'condition' => [
|
||||
'link_option' => 'page'
|
||||
]
|
||||
]
|
||||
);
|
||||
//Icons
|
||||
$repeater->add_control(
|
||||
'icon',
|
||||
[
|
||||
'label' => esc_html__('Enter The icons', 'thinkai'),
|
||||
'type' => \Elementor\Controls_Manager::ICONS,
|
||||
'default' => [
|
||||
'value' => 'icon-medal',
|
||||
'library' => 'solid',
|
||||
],
|
||||
]
|
||||
);
|
||||
//text
|
||||
$repeater->add_control(
|
||||
'text',
|
||||
[
|
||||
'label' => __( 'Text', 'thinkai' ),
|
||||
'type' => Controls_Manager::TEXTAREA,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'placeholder' => __( 'Enter your Text', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'feature',
|
||||
[
|
||||
'label' => __('Add Slide Item', 'thinkai'),
|
||||
'type' => Controls_Manager::REPEATER,
|
||||
'fields' => $repeater->get_controls(),
|
||||
'title_field' => '{{{ title }}}',
|
||||
'condition' => [
|
||||
'layout_control' => '1',
|
||||
]
|
||||
]
|
||||
);
|
||||
|
||||
//Vertical Client Carousel Repeater
|
||||
$repeater = new Repeater();
|
||||
$repeater->add_control(
|
||||
'bg_shape_image',
|
||||
[
|
||||
'label' => esc_html__( 'BG Shape Image', 'thinkai' ),
|
||||
'type' => Controls_Manager::MEDIA,
|
||||
'default' => [
|
||||
'url' => Utils::get_placeholder_image_src(),
|
||||
],
|
||||
]
|
||||
);
|
||||
$repeater->add_control(
|
||||
'feature_image',
|
||||
[
|
||||
'label' => esc_html__( 'Feature Image', 'thinkai' ),
|
||||
'type' => Controls_Manager::MEDIA,
|
||||
'default' => [
|
||||
'url' => Utils::get_placeholder_image_src(),
|
||||
],
|
||||
]
|
||||
);
|
||||
$repeater->add_control(
|
||||
'title',
|
||||
[
|
||||
'label' => __( 'Title', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'placeholder' => __( 'Enter your Title', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
//text
|
||||
$repeater->add_control(
|
||||
'text',
|
||||
[
|
||||
'label' => __( 'Text', 'thinkai' ),
|
||||
'type' => Controls_Manager::TEXTAREA,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'placeholder' => __( 'Enter your Text', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
//Button Title
|
||||
$repeater->add_control(
|
||||
'btn_title',
|
||||
[
|
||||
'label' => __( 'Button Title', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'placeholder' => __( 'Enter your Button Title', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
//Link
|
||||
$repeater->add_control(
|
||||
'link_option',
|
||||
[
|
||||
'label' => esc_html__( 'Select link Option', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'extranal',
|
||||
'options' => array(
|
||||
'extranal' => esc_html__( 'Extranal ', 'thinkai'),
|
||||
'page' => esc_html__( 'Page ', 'thinkai'),
|
||||
),
|
||||
]
|
||||
);
|
||||
$repeater->add_control(
|
||||
'link',
|
||||
[
|
||||
'label' => __( 'External Link', 'thinkai' ),
|
||||
'type' => Controls_Manager::URL,
|
||||
'label_block' => true,
|
||||
'placeholder' => __( 'https://your-link.com', 'thinkai' ),
|
||||
'show_external' => true,
|
||||
'default' => [
|
||||
'url' => '',
|
||||
'is_external' => true,
|
||||
'nofollow' => true,
|
||||
],
|
||||
'condition' => [
|
||||
'link_option' => 'extranal'
|
||||
]
|
||||
]
|
||||
);
|
||||
$repeater->add_control(
|
||||
'page_select',
|
||||
[
|
||||
'label' => esc_html__( 'Select Page', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::SELECT2,
|
||||
'default' => 'extranal',
|
||||
'options' => thinkai_page_list(),
|
||||
'condition' => [
|
||||
'link_option' => 'page'
|
||||
]
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'feature_v2',
|
||||
[
|
||||
'label' => __('Add Magic Item', 'thinkai'),
|
||||
'type' => Controls_Manager::REPEATER,
|
||||
'fields' => $repeater->get_controls(),
|
||||
'title_field' => '{{{ title }}}',
|
||||
'condition' => [
|
||||
'layout_control' => '2',
|
||||
],
|
||||
'default' => [
|
||||
[
|
||||
'title' => esc_html__( 'Live Action', 'thinkai' ),
|
||||
'text' => esc_html__( 'Holds in these matters this principle...', 'thinkai' ),
|
||||
'btn_title' => esc_html__( 'Read More', 'thinkai' ),
|
||||
'link' => esc_html__( '#', 'thinkai' ),
|
||||
],
|
||||
[
|
||||
'title' => esc_html__( 'Motion Graphics', 'thinkai' ),
|
||||
'text' => esc_html__( 'Obligations of business it frequently...', 'thinkai' ),
|
||||
'btn_title' => esc_html__( 'Read More', 'thinkai' ),
|
||||
'link' => esc_html__( '#', 'thinkai' ),
|
||||
],
|
||||
[
|
||||
'title' => esc_html__( 'Cartoon', 'thinkai' ),
|
||||
'text' => esc_html__( 'Holds in these matters this principle...', 'thinkai' ),
|
||||
'btn_title' => esc_html__( 'Read More', 'thinkai' ),
|
||||
'link' => esc_html__( '#', 'thinkai' ),
|
||||
],
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->end_controls_section();
|
||||
|
||||
/************************************************************************
|
||||
Tab Style Start
|
||||
*************************************************************************/
|
||||
|
||||
//Title Style
|
||||
$this->start_controls_section(
|
||||
'title_style',
|
||||
[
|
||||
'label' => esc_html__( 'Title Style Settings', 'thinkai' ),
|
||||
'tab' => Controls_Manager::TAB_STYLE,
|
||||
]
|
||||
);
|
||||
$this->add_responsive_control(
|
||||
'title__margin',
|
||||
[
|
||||
'label' => esc_html__( 'Margin', 'thinkai' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => ['px', '%', 'em'],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .te-title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
|
||||
],
|
||||
'separator' => 'before',
|
||||
]
|
||||
);
|
||||
$this->add_responsive_control(
|
||||
'title_padding',
|
||||
[
|
||||
'label' => esc_html__( 'Padding', 'thinkai' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => ['px', '%', 'em'],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .te-title' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
|
||||
],
|
||||
'separator' => 'before',
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'title_color',
|
||||
[
|
||||
'label' => esc_html__( 'Text Color', 'thinkai' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .te-title' => 'color: {{VALUE}} !important;',
|
||||
'{{WRAPPER}} .te-title a' => 'color: {{VALUE}} !important;',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'title_typography',
|
||||
'label' => __('Typography', 'thinkai'),
|
||||
'selector' => '{{WRAPPER}} .te-title,
|
||||
{{WRAPPER}} .te-title a',
|
||||
]
|
||||
);
|
||||
$this->add_group_control(
|
||||
Group_Control_Text_Stroke::get_type(),
|
||||
[
|
||||
'name' => 'title_text_stroke',
|
||||
'selector' => '{{WRAPPER}} .te-title',
|
||||
]
|
||||
);
|
||||
$this->add_group_control(
|
||||
Group_Control_Text_Shadow::get_type(),
|
||||
[
|
||||
'name' => 'title_text_shadow',
|
||||
'selector' => '{{WRAPPER}} .te-title',
|
||||
]
|
||||
);
|
||||
$this->end_controls_section();
|
||||
|
||||
//Text Style
|
||||
$this->start_controls_section(
|
||||
'text_style',
|
||||
[
|
||||
'label' => esc_html__( 'Text Style Settings', 'thinkai' ),
|
||||
'tab' => Controls_Manager::TAB_STYLE,
|
||||
]
|
||||
);
|
||||
$this->add_responsive_control(
|
||||
'text__margin',
|
||||
[
|
||||
'label' => esc_html__( 'Margin', 'thinkai' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => ['px', '%', 'em'],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .te-text' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
|
||||
],
|
||||
'separator' => 'before',
|
||||
]
|
||||
);
|
||||
$this->add_responsive_control(
|
||||
'text_padding',
|
||||
[
|
||||
'label' => esc_html__( 'Padding', 'thinkai' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => ['px', '%', 'em'],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .te-text' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
|
||||
],
|
||||
'separator' => 'before',
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'text_color',
|
||||
[
|
||||
'label' => esc_html__( 'Text Color', 'thinkai' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .te-text' => 'color: {{VALUE}} !important;',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'text_typography',
|
||||
'label' => __('Typography', 'thinkai'),
|
||||
'selector' => '{{WRAPPER}} .te-text',
|
||||
]
|
||||
);
|
||||
$this->add_group_control(
|
||||
Group_Control_Text_Stroke::get_type(),
|
||||
[
|
||||
'name' => 'text_text_stroke',
|
||||
'selector' => '{{WRAPPER}} .te-text',
|
||||
]
|
||||
);
|
||||
$this->add_group_control(
|
||||
Group_Control_Text_Shadow::get_type(),
|
||||
[
|
||||
'name' => 'text_text_shadow',
|
||||
'selector' => '{{WRAPPER}} .te-text',
|
||||
]
|
||||
);
|
||||
$this->end_controls_section();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Render button widget output on the frontend.
|
||||
* Written in PHP and used to generate the final HTML.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*/
|
||||
protected function render() {
|
||||
$settings = $this->get_settings_for_display();
|
||||
$allowed_tags = wp_kses_allowed_html('post');
|
||||
$layout = $settings[ 'layout_control' ];
|
||||
?>
|
||||
|
||||
|
||||
<?php if($layout == '2') : ?>
|
||||
|
||||
<!--Start Video Types Style1-->
|
||||
<section class="video-types-style1 p-0 m-0">
|
||||
<div class="container">
|
||||
<ul class="row">
|
||||
<?php
|
||||
foreach ( $settings['feature_v2'] as $key => $item ) {
|
||||
|
||||
$page = $item['link_option'];
|
||||
$page_select = $item[ 'page_select' ];
|
||||
$ext_url = $item[ 'link' ];
|
||||
|
||||
if( $page == 'page' ){
|
||||
$mount_link = get_page_link( $page_select );
|
||||
}else{
|
||||
$mount_link = $ext_url['url'];
|
||||
$target = $ext_url['is_external'] ? ' target="_blank"' : '';
|
||||
$nofollow = $ext_url['nofollow'] ? ' rel="nofollow"' : '';
|
||||
}
|
||||
?>
|
||||
<!--Start Video Types Style1 Single-->
|
||||
<li class="col-xl-4 col-lg-4">
|
||||
<div class="video-types-style1__single">
|
||||
<div class="video-types-style1__single-img-box">
|
||||
<div class="video-types-style1__single-img-box__bg float-bob-y"
|
||||
style="background-image: url(<?php echo esc_url(wp_get_attachment_url($item['bg_shape_image']['id'])); ?>);">
|
||||
</div>
|
||||
<div class="inner">
|
||||
<img src="<?php echo esc_url(wp_get_attachment_url($item['feature_image']['id'])); ?>" alt="<?php bloginfo( 'name' ); ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="video-types-style1__single-content-box">
|
||||
<div class="title-box">
|
||||
<h3 class="te-title"><a href="<?php echo esc_url( $mount_link );?>" <?php if( $page == 'extranal' ) echo esc_attr( $target );?> <?php if( $page == 'extranal' ) echo esc_attr( $nofollow );?>><?php echo wp_kses($item['title'], true); ?></a></h3>
|
||||
<p class="te-text"><?php echo wp_kses($item['text'], true); ?></p>
|
||||
</div>
|
||||
<div class="btn-box">
|
||||
<a href="<?php echo esc_url( $mount_link );?>" <?php if( $page == 'extranal' ) echo esc_attr( $target );?> <?php if( $page == 'extranal' ) echo esc_attr( $nofollow );?>>
|
||||
<span class="icon-right-arrow1"></span>
|
||||
<?php echo wp_kses($item['btn_title'], true); ?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<!--End Video Types Style1 Single-->
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
<!--End Video Types Style1-->
|
||||
|
||||
<?php else: ?>
|
||||
|
||||
<!--Start Features Style3-->
|
||||
<section class="features-style3 p-0 m-0">
|
||||
<div class="container">
|
||||
<ul class="features-style3__inner">
|
||||
<?php
|
||||
foreach ( $settings['feature'] as $key => $item ) {
|
||||
|
||||
$icon = $item['icon'];
|
||||
|
||||
$page = $item['link_option'];
|
||||
$page_select = $item[ 'page_select' ];
|
||||
$ext_url = $item[ 'link' ];
|
||||
|
||||
if( $page == 'page' ){
|
||||
$mount_link = get_page_link( $page_select );
|
||||
}else{
|
||||
$mount_link = $ext_url['url'];
|
||||
$target = $ext_url['is_external'] ? ' target="_blank"' : '';
|
||||
$nofollow = $ext_url['nofollow'] ? ' rel="nofollow"' : '';
|
||||
}
|
||||
?>
|
||||
<!--Single Features Style3-->
|
||||
<li>
|
||||
<div class="features-style3__single">
|
||||
<div class="title-box">
|
||||
<h3 class="te-title"><a href="<?php echo esc_url( $mount_link );?>" <?php if( $page == 'extranal' ) echo esc_attr( $target );?> <?php if( $page == 'extranal' ) echo esc_attr( $nofollow );?>><?php echo wp_kses($item['title'], true); ?></a></h3>
|
||||
</div>
|
||||
<?php if($icon || $item['shape_image']){ ?>
|
||||
<div class="icon-box text-center">
|
||||
<?php
|
||||
$icon = str_replace( "icon ", "", $item['icon']);
|
||||
if( !empty( $icon ) ):?>
|
||||
<?php \Elementor\Icons_Manager::render_icon( $icon ); ?>
|
||||
<?php else:?>
|
||||
<span class="icon-standard"></span>
|
||||
<?php endif;?>
|
||||
|
||||
<?php if($item['shape_image']){ ?>
|
||||
<div class="icon-box__shape1">
|
||||
<img src="<?php echo esc_url(wp_get_attachment_url($item['shape_image']['id'])); ?>" alt="<?php bloginfo( 'name' ); ?>">
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="text">
|
||||
<p class="te-text"><?php echo wp_kses($item['text'], true); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<!--End Features Style3-->
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
<!--End Features Style3-->
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
}
|
||||
}
|
||||
247
wp-content/plugins/thinkai-plugin/elementor/float_image.php
Normal file
247
wp-content/plugins/thinkai-plugin/elementor/float_image.php
Normal file
@@ -0,0 +1,247 @@
|
||||
<?php namespace THINKAIPLUGIN\Element;
|
||||
|
||||
use Elementor\Controls_Manager;
|
||||
use Elementor\Controls_Stack;
|
||||
use Elementor\Group_Control_Typography;
|
||||
use Elementor\Group_Control_Border;
|
||||
use Elementor\Repeater;
|
||||
use Elementor\Widget_Base;
|
||||
use Elementor\Utils;
|
||||
use Elementor\Group_Control_Text_Shadow;
|
||||
use \Elementor\Group_Control_Box_Shadow;
|
||||
use \Elementor\Group_Control_Background;
|
||||
use \Elementor\Group_Control_Text_Stroke;
|
||||
use Elementor\Plugin;
|
||||
|
||||
/**
|
||||
* Elementor button widget.
|
||||
* Elementor widget that displays a button with the ability to control every
|
||||
* aspect of the button design.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class Float_Image extends Widget_Base {
|
||||
/**
|
||||
* Get widget name.
|
||||
* Retrieve button widget name.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget name.
|
||||
*/
|
||||
public function get_name() {
|
||||
return 'thinkai_float_image';
|
||||
}
|
||||
/**
|
||||
* Get widget title.
|
||||
* Retrieve button widget title.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget title.
|
||||
*/
|
||||
public function get_title() {
|
||||
return esc_html__( 'Thinkai Float Image', 'thinkai' );
|
||||
}
|
||||
/**
|
||||
* Get widget icon.
|
||||
* Retrieve button widget icon.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget icon.
|
||||
*/
|
||||
public function get_icon() {
|
||||
return 'eicon-image-hotspot';
|
||||
}
|
||||
/**
|
||||
* Get widget categories.
|
||||
* Retrieve the list of categories the button widget belongs to.
|
||||
* Used to determine where to display the widget in the editor.
|
||||
*
|
||||
* @since 2.0.0
|
||||
* @access public
|
||||
* @return array Widget categories.
|
||||
*/
|
||||
public function get_categories() {
|
||||
return [ 'thinkai' ];
|
||||
}
|
||||
|
||||
/**
|
||||
* Register button widget controls.
|
||||
* Adds different input fields to allow the user to change and customize the widget settings.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*/
|
||||
protected function register_controls() {
|
||||
$this->start_controls_section(
|
||||
'float_image',
|
||||
[
|
||||
'label' => esc_html__( 'Float Image', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'layout_control',
|
||||
[
|
||||
'label' => esc_html__( 'Layout Style', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => '1',
|
||||
'options' => array(
|
||||
'1' => esc_html__( 'Style One ', 'thinkai'),
|
||||
'2' => esc_html__( 'Style Two ', 'thinkai'),
|
||||
'3' => esc_html__( 'Style Three ', 'thinkai'),
|
||||
'4' => esc_html__( 'Style Four ', 'thinkai'),
|
||||
'5' => esc_html__( 'Style Five ', 'thinkai'),
|
||||
'6' => esc_html__( 'Style Six ', 'thinkai'),
|
||||
),
|
||||
]
|
||||
);
|
||||
|
||||
//Curved Title
|
||||
$this->add_control(
|
||||
'curved_title',
|
||||
[
|
||||
'label' => __( 'Curved Text', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'default' => esc_html__( 'Making ai image is safe & easy with thinkai', 'thinkai' ),
|
||||
'condition' => [
|
||||
'layout_control' => '1'
|
||||
]
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'bg_shape_image',
|
||||
[
|
||||
'label' => esc_html__( 'BG Shape Image', 'thinkai' ),
|
||||
'type' => Controls_Manager::MEDIA,
|
||||
'default' => [
|
||||
'url' => Utils::get_placeholder_image_src(),
|
||||
],
|
||||
'condition' => [
|
||||
'layout_control' => '3',
|
||||
]
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'feature_image',
|
||||
[
|
||||
'label' => esc_html__( 'Feature Image', 'thinkai' ),
|
||||
'type' => Controls_Manager::MEDIA,
|
||||
'default' => [
|
||||
'url' => Utils::get_placeholder_image_src(),
|
||||
],
|
||||
'condition' => [
|
||||
'layout_control' => ['1','2','3','4','5','6']
|
||||
]
|
||||
]
|
||||
);
|
||||
//Description
|
||||
$this->add_control(
|
||||
'founded_text',
|
||||
[
|
||||
'label' => __( 'Founded Text', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'default' => esc_html__( '2010 founded', 'thinkai' ),
|
||||
'condition' => [
|
||||
'layout_control' => '1'
|
||||
]
|
||||
]
|
||||
);
|
||||
$this->end_controls_section();
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Render button widget output on the frontend.
|
||||
* Written in PHP and used to generate the final HTML.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*/
|
||||
protected function render() {
|
||||
$settings = $this->get_settings_for_display();
|
||||
$allowed_tags = wp_kses_allowed_html('post');
|
||||
?>
|
||||
|
||||
<?php if($settings['layout_control'] == '6') :?>
|
||||
|
||||
<div class="service-details__img-box p-0 m-0">
|
||||
<div class="single-img-box p-0 m-0">
|
||||
<img src="<?php echo esc_url(wp_get_attachment_url($settings['feature_image']['id'])); ?>" alt="<?php bloginfo( 'name' ); ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php elseif($settings['layout_control'] == '5') :?>
|
||||
|
||||
<div class="Intro-style2__img js-tilt">
|
||||
<div class="inner">
|
||||
<img src="<?php echo esc_url(wp_get_attachment_url($settings['feature_image']['id'])); ?>" alt="<?php bloginfo( 'name' ); ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php elseif($settings['layout_control'] == '4') :?>
|
||||
|
||||
<div class="about-style5__img-box">
|
||||
<img src="<?php echo esc_url(wp_get_attachment_url($settings['feature_image']['id'])); ?>" alt="<?php bloginfo( 'name' ); ?>">
|
||||
</div>
|
||||
|
||||
<?php elseif($settings['layout_control'] == '3') :?>
|
||||
<div class="about-style2__dashboard">
|
||||
<div class="shape1">
|
||||
<img class="float-bob-x" src="<?php echo esc_url(wp_get_attachment_url($settings['bg_shape_image']['id'])); ?>" alt="<?php bloginfo( 'name' ); ?>">
|
||||
</div>
|
||||
<div class="inner">
|
||||
<img src="<?php echo esc_url(wp_get_attachment_url($settings['feature_image']['id'])); ?>" alt="<?php bloginfo( 'name' ); ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php elseif($settings['layout_control'] == '2') :?>
|
||||
|
||||
<div class="about-style1__content-box-inner">
|
||||
<div class="img-box">
|
||||
<img src="<?php echo esc_url(wp_get_attachment_url($settings['feature_image']['id'])); ?>" alt="<?php bloginfo( 'name' ); ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php else: ?>
|
||||
|
||||
<div class="about-style1__img-box">
|
||||
<?php if($settings['curved_title']){ ?>
|
||||
<div class="round-text">
|
||||
<div class="curved-circle">
|
||||
<?php echo wp_kses($settings['curved_title'], true); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if($settings['feature_image']){ ?>
|
||||
<div class="inner">
|
||||
<img src="<?php echo esc_url(wp_get_attachment_url($settings['feature_image']['id'])); ?>" alt="<?php bloginfo( 'name' ); ?>">
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if($settings['founded_text']){ ?>
|
||||
<div class="text-box">
|
||||
<p><?php echo wp_kses($settings['founded_text'], true); ?></p>
|
||||
<div class="round"></div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
}
|
||||
}
|
||||
392
wp-content/plugins/thinkai-plugin/elementor/funfacts.php
Normal file
392
wp-content/plugins/thinkai-plugin/elementor/funfacts.php
Normal file
@@ -0,0 +1,392 @@
|
||||
<?php namespace THINKAIPLUGIN\Element;
|
||||
|
||||
use Elementor\Controls_Manager;
|
||||
use Elementor\Controls_Stack;
|
||||
use Elementor\Group_Control_Typography;
|
||||
use Elementor\Group_Control_Border;
|
||||
use Elementor\Repeater;
|
||||
use Elementor\Widget_Base;
|
||||
use Elementor\Utils;
|
||||
use Elementor\Group_Control_Text_Shadow;
|
||||
use \Elementor\Group_Control_Box_Shadow;
|
||||
use \Elementor\Group_Control_Background;
|
||||
use \Elementor\Group_Control_Image_Size;
|
||||
use \Elementor\Group_Control_Text_Stroke;
|
||||
use Elementor\Plugin;
|
||||
|
||||
/**
|
||||
* Elementor button widget.
|
||||
* Elementor widget that displays a button with the ability to control every
|
||||
* aspect of the button design.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class Funfacts extends Widget_Base {
|
||||
|
||||
/**
|
||||
* Get widget name.
|
||||
* Retrieve button widget name.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget name.
|
||||
*/
|
||||
public function get_name() {
|
||||
return 'thinkai_funfacts';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget title.
|
||||
* Retrieve button widget title.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget title.
|
||||
*/
|
||||
public function get_title() {
|
||||
return esc_html__( 'Thinkai Funfacts', 'thinkai' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget icon.
|
||||
* Retrieve button widget icon.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget icon.
|
||||
*/
|
||||
public function get_icon() {
|
||||
return 'eicon-gallery-grid';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget categories.
|
||||
* Retrieve the list of categories the button widget belongs to.
|
||||
* Used to determine where to display the widget in the editor.
|
||||
*
|
||||
* @since 2.0.0
|
||||
* @access public
|
||||
* @return array Widget categories.
|
||||
*/
|
||||
public function get_categories() {
|
||||
return [ 'thinkai' ];
|
||||
}
|
||||
|
||||
/**
|
||||
* Register button widget controls.
|
||||
* Adds different input fields to allow the user to change and customize the widget settings.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*/
|
||||
protected function register_controls() {
|
||||
$this->start_controls_section(
|
||||
'funfacts',
|
||||
[
|
||||
'label' => esc_html__( 'Thinkai Funfacts', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
|
||||
//Layout
|
||||
$this->add_control(
|
||||
'layout_control',
|
||||
[
|
||||
'label' => esc_html__( 'Layout Style', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => '1',
|
||||
'options' => array(
|
||||
'1' => esc_html__( 'Style One ', 'thinkai'),
|
||||
'2' => esc_html__( 'Style Two ', 'thinkai'),
|
||||
),
|
||||
]
|
||||
);
|
||||
|
||||
//Banner Carousel Repeater
|
||||
$repeater = new Repeater();
|
||||
$repeater->add_control(
|
||||
'counter_value',
|
||||
[
|
||||
'label' => __( 'Counter Value', 'thinkai' ),
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'label_block' => true,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'placeholder' => __( 'Enter your Counter Value', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
$repeater->add_control(
|
||||
'currency_unit',
|
||||
[
|
||||
'label' => __( 'Currency Unit', 'thinkai' ),
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'label_block' => true,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'placeholder' => __( 'Enter your Counter Value', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
//Text
|
||||
$repeater->add_control(
|
||||
'text',
|
||||
[
|
||||
'label' => __( 'Description', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::TEXTAREA,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'placeholder' => __( 'Enter your Description', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
//Title
|
||||
$repeater->add_control(
|
||||
'title',
|
||||
[
|
||||
'label' => __( 'Title', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'placeholder' => __( 'Enter your Title', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'funfact',
|
||||
[
|
||||
'label' => __('Add Funfact Item', 'thinkai'),
|
||||
'type' => Controls_Manager::REPEATER,
|
||||
'fields' => $repeater->get_controls(),
|
||||
'condition' => [
|
||||
'layout_control' => '1'
|
||||
],
|
||||
'title_field' => '{{{ title }}}',
|
||||
'default' => [
|
||||
[
|
||||
'counter_value' => esc_html__( '4.8', 'thinkai' ),
|
||||
'currency_unit' => esc_html__( 'Million', 'thinkai' ),
|
||||
'text' => esc_html__( 'Worldwide Users of<br> ThinkAi', 'thinkai' ),
|
||||
'title' => esc_html__( 'Fun Numbers', 'thinkai' ),
|
||||
],
|
||||
[
|
||||
'counter_value' => esc_html__( '174', 'thinkai' ),
|
||||
'currency_unit' => esc_html__( 'User Territory', 'thinkai' ),
|
||||
'text' => esc_html__( 'Worldwide Users of<br> ThinkAi', 'thinkai' ),
|
||||
'title' => esc_html__( 'Fun Numbers', 'thinkai' ),
|
||||
],
|
||||
[
|
||||
'counter_value' => esc_html__( '236', 'thinkai' ),
|
||||
'currency_unit' => esc_html__( 'Million', 'thinkai' ),
|
||||
'text' => esc_html__( 'Images Generated in<br> Last Year', 'thinkai' ),
|
||||
'title' => esc_html__( 'Fun Numbers', 'thinkai' ),
|
||||
],
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
|
||||
//Banner Carousel Repeater
|
||||
$repeater = new Repeater();
|
||||
//Title
|
||||
$repeater->add_control(
|
||||
'title',
|
||||
[
|
||||
'label' => __( 'Title', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'placeholder' => __( 'Enter your Title', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
//Text
|
||||
$repeater->add_control(
|
||||
'text',
|
||||
[
|
||||
'label' => __( 'Description', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::TEXTAREA,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'placeholder' => __( 'Enter your Description', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
$repeater->add_control(
|
||||
'counter_value',
|
||||
[
|
||||
'label' => __( 'Counter Value', 'thinkai' ),
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'label_block' => true,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'placeholder' => __( 'Enter your Counter Value', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
$repeater->add_control(
|
||||
'currency_unit',
|
||||
[
|
||||
'label' => __( 'Currency Unit', 'thinkai' ),
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'label_block' => true,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'placeholder' => __( 'Enter your Counter Value', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
//Select Box
|
||||
$repeater->add_control(
|
||||
'style_two',
|
||||
[
|
||||
'label' => esc_html__( 'Choose Style', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'two',
|
||||
'options' => array(
|
||||
'one' => esc_html__( 'Sec Style ', 'thinkai'),
|
||||
'two' => esc_html__( 'Percent Style ', 'thinkai'),
|
||||
),
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'funfact_v2',
|
||||
[
|
||||
'label' => __('Add Funfact Item', 'thinkai'),
|
||||
'type' => Controls_Manager::REPEATER,
|
||||
'fields' => $repeater->get_controls(),
|
||||
'condition' => [
|
||||
'layout_control' => '2'
|
||||
],
|
||||
'title_field' => '{{{ title }}}',
|
||||
'default' => [
|
||||
[
|
||||
'title' => esc_html__( 'Savings Potential', 'thinkai' ),
|
||||
'text' => esc_html__( 'We can help businesses reduce customer <br> service costs.', 'thinkai' ),
|
||||
'counter_value' => esc_html__( '25', 'thinkai' ),
|
||||
'currency_unit' => esc_html__( '%', 'thinkai' ),
|
||||
],
|
||||
[
|
||||
'title' => esc_html__( 'Quick Responses', 'thinkai' ),
|
||||
'text' => esc_html__( 'ThinkAi Provide immediate responses to <br> customer queries.', 'thinkai' ),
|
||||
'counter_value' => esc_html__( '0.4', 'thinkai' ),
|
||||
'currency_unit' => esc_html__( 'Sec', 'thinkai' ),
|
||||
],
|
||||
[
|
||||
'title' => esc_html__( 'Business Adoption', 'thinkai' ),
|
||||
'text' => esc_html__( 'Businesses are projected to use ThinkAi <br> in some capacity.', 'thinkai' ),
|
||||
'counter_value' => esc_html__( '80', 'thinkai' ),
|
||||
'currency_unit' => esc_html__( '%', 'thinkai' ),
|
||||
],
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->end_controls_section();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Render button widget output on the frontend.
|
||||
* Written in PHP and used to generate the final HTML.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*/
|
||||
protected function render() {
|
||||
$settings = $this->get_settings_for_display();
|
||||
$allowed_tags = wp_kses_allowed_html('post');
|
||||
?>
|
||||
|
||||
<?php if($settings['layout_control'] == '2') :?>
|
||||
|
||||
<!--Start Fact Counter Style2-->
|
||||
<section class="fact-counter-style2 p-0 m-0">
|
||||
<div class="container">
|
||||
<ul class="row">
|
||||
<?php
|
||||
foreach($settings['funfact_v2'] as $key => $items):
|
||||
?>
|
||||
<!--Start Fact Counter Style2 Single-->
|
||||
<li class="col-xl-4 col-lg-4 wow fadeInUp" data-wow-delay=".2s">
|
||||
<div class="fact-counter-style2__single text-center">
|
||||
<div class="round-box"></div>
|
||||
<h3><?php echo wp_kses($items['title'], true);?></h3>
|
||||
<p><?php echo wp_kses($items['text'], true);?></p>
|
||||
<div class="counter-box">
|
||||
<h2><span class="odometer" data-count="<?php echo esc_attr($items['counter_value']);?>"></span>
|
||||
<span class="<?php if($items['style_two'] == 'two') echo 'percent'; else echo 'sec'; ?>"><?php echo wp_kses($items['currency_unit'], true);?></span></h2>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<!--End Fact Counter Style2 Single-->
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
<!--End Fact Counter Style2-->
|
||||
|
||||
<?php else: ?>
|
||||
|
||||
<!--Start Fact Counter Style1-->
|
||||
<section class="fact-counter-style1">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-xl-12">
|
||||
<div class="fact-counter-style1__content">
|
||||
<ul class="clearfix">
|
||||
<?php
|
||||
$count = 1;
|
||||
foreach($settings['funfact'] as $key => $items):
|
||||
if($count % 2) {
|
||||
?>
|
||||
<!--Start Single Fact Counter-->
|
||||
<li class="single-fact-counter wow fadeInRight" data-wow-delay="100ms"
|
||||
data-wow-duration="2500ms">
|
||||
<div class="counting">
|
||||
<h2 class="odometer te-count" data-count="<?php echo esc_attr($items['counter_value']);?>"><?php echo esc_attr($items['counter_value']);?></h2>
|
||||
<p class="te-currency"><?php echo wp_kses($items['currency_unit'], true);?></p>
|
||||
</div>
|
||||
<div class="text">
|
||||
<p class="te-text"><?php echo wp_kses($items['text'], true);?></p>
|
||||
<div class="dot"></div>
|
||||
</div>
|
||||
<div class="big-title te-title" data-hover="Fun Numbers">
|
||||
<?php echo wp_kses($items['title'], true);?>
|
||||
</div>
|
||||
</li>
|
||||
<!--End Single Fact Counter-->
|
||||
<?php } else { ?>
|
||||
<!--Start Single Fact Counter-->
|
||||
<li class="single-fact-counter wow fadeInLeft" data-wow-delay="200ms"
|
||||
data-wow-duration="2500ms">
|
||||
<div class="text">
|
||||
<p class="te-text"><?php echo wp_kses($items['text'], true);?></p>
|
||||
<div class="dot"></div>
|
||||
</div>
|
||||
<div class="counting">
|
||||
<h2 class="odometer te-count" data-count="<?php echo esc_attr($items['counter_value']);?>"><?php echo esc_attr($items['counter_value']);?></h2>
|
||||
<p class="te-currency"><?php echo wp_kses($items['currency_unit'], true);?></p>
|
||||
</div>
|
||||
<div class="big-title te-title"><?php echo wp_kses($items['title'], true);?></div>
|
||||
</li>
|
||||
<!--End Single Fact Counter-->
|
||||
<?php } $count++; endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!--End Fact Counter Style1-->
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
}
|
||||
}
|
||||
222
wp-content/plugins/thinkai-plugin/elementor/google_review.php
Normal file
222
wp-content/plugins/thinkai-plugin/elementor/google_review.php
Normal file
@@ -0,0 +1,222 @@
|
||||
<?php namespace THINKAIPLUGIN\Element;
|
||||
|
||||
use Elementor\Controls_Manager;
|
||||
use Elementor\Controls_Stack;
|
||||
use Elementor\Group_Control_Typography;
|
||||
use Elementor\Group_Control_Border;
|
||||
use Elementor\Repeater;
|
||||
use Elementor\Widget_Base;
|
||||
use Elementor\Utils;
|
||||
use Elementor\Group_Control_Text_Shadow;
|
||||
use \Elementor\Group_Control_Box_Shadow;
|
||||
use \Elementor\Group_Control_Background;
|
||||
use \Elementor\Group_Control_Image_Size;
|
||||
use \Elementor\Group_Control_Text_Stroke;
|
||||
use Elementor\Plugin;
|
||||
|
||||
/**
|
||||
* Elementor button widget.
|
||||
* Elementor widget that displays a button with the ability to control every
|
||||
* aspect of the button design.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class Google_Review extends Widget_Base {
|
||||
|
||||
/**
|
||||
* Get widget name.
|
||||
* Retrieve button widget name.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget name.
|
||||
*/
|
||||
public function get_name() {
|
||||
return 'thinkai_google_review';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget title.
|
||||
* Retrieve button widget title.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget title.
|
||||
*/
|
||||
public function get_title() {
|
||||
return esc_html__( 'Thinkai Google Review', 'thinkai' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget icon.
|
||||
* Retrieve button widget icon.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget icon.
|
||||
*/
|
||||
public function get_icon() {
|
||||
return 'eicon-gallery-grid';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget categories.
|
||||
* Retrieve the list of categories the button widget belongs to.
|
||||
* Used to determine where to display the widget in the editor.
|
||||
*
|
||||
* @since 2.0.0
|
||||
* @access public
|
||||
* @return array Widget categories.
|
||||
*/
|
||||
public function get_categories() {
|
||||
return [ 'thinkai' ];
|
||||
}
|
||||
|
||||
/**
|
||||
* Register button widget controls.
|
||||
* Adds different input fields to allow the user to change and customize the widget settings.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*/
|
||||
protected function register_controls() {
|
||||
$this->start_controls_section(
|
||||
'google_review',
|
||||
[
|
||||
'label' => esc_html__( 'Thinkai Google Review', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'layout_control',
|
||||
[
|
||||
'label' => esc_html__( 'Layout Style', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => '1',
|
||||
'options' => array(
|
||||
'1' => esc_html__( 'Style One ', 'thinkai'),
|
||||
'2' => esc_html__( 'Style Two ', 'thinkai'),
|
||||
),
|
||||
]
|
||||
);
|
||||
|
||||
//Review Title
|
||||
$this->add_control(
|
||||
'review_title',
|
||||
[
|
||||
'label' => __( 'Review Title', 'thinkai' ),
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'label_block' => true,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'default' => esc_html__( 'Google Reviews', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
//Rating
|
||||
$this->add_control(
|
||||
'rating',
|
||||
[
|
||||
'label' => esc_html__( 'Total Rating', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => '1',
|
||||
'options' => array(
|
||||
'1' => esc_html__( 'One Star ', 'thinkai'),
|
||||
'2' => esc_html__( 'Two Star ', 'thinkai'),
|
||||
'3' => esc_html__( 'Three Star ', 'thinkai'),
|
||||
'4' => esc_html__( 'Four Star ', 'thinkai'),
|
||||
'5' => esc_html__( 'Five Star ', 'thinkai'),
|
||||
),
|
||||
]
|
||||
);
|
||||
//Total Title
|
||||
$this->add_control(
|
||||
'total_rating',
|
||||
[
|
||||
'label' => __( 'Total Rating Average', 'thinkai' ),
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'label_block' => true,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'default' => esc_html__( '4.9/5.0', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
//rating_description
|
||||
$this->add_control(
|
||||
'rating_description',
|
||||
[
|
||||
'label' => __( 'Description', 'thinkai' ),
|
||||
'type' => Controls_Manager::TEXTAREA,
|
||||
'label_block' => true,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'default' => esc_html__( '(from 20k reviews)', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
$this->end_controls_section();
|
||||
}
|
||||
|
||||
/**
|
||||
* Render button widget output on the frontend.
|
||||
* Written in PHP and used to generate the final HTML.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*/
|
||||
protected function render() {
|
||||
$settings = $this->get_settings_for_display();
|
||||
$allowed_tags = wp_kses_allowed_html('post');
|
||||
$layout = $settings[ 'layout_control' ];
|
||||
?>
|
||||
|
||||
<?php if($layout == '2') : ?>
|
||||
|
||||
|
||||
<?php else: ?>
|
||||
|
||||
<!--Start Google Reviews Style1-->
|
||||
<section class="google-reviews-style1">
|
||||
<div class="container">
|
||||
<div class="google-reviews-style1__inner">
|
||||
<?php if($settings['review_title']){ ?>
|
||||
<div class="google-reviews">
|
||||
<div class="icon-box">
|
||||
<span class="icon-google"><span class="path1"></span><span class="path2"></span><span
|
||||
class="path3"></span><span class="path4"></span><span class="path5"></span><span
|
||||
class="path6"></span></span>
|
||||
</div>
|
||||
<div class="text">
|
||||
<p><?php echo wp_kses($settings['review_title'], true); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="review-box">
|
||||
<ul>
|
||||
<?php
|
||||
$ratting = $settings['rating'];
|
||||
for ($x = 1; $x <= 5; $x++) {
|
||||
if($x <= $ratting) echo '<li><i class="fa fa-star"></i></li>'; else echo '<li><i class="fa fa-star-half-alt"></i></li>';
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="text-box">
|
||||
<h2><?php echo wp_kses($settings['total_rating'], true); ?> <span> <?php echo wp_kses($settings['rating_description'], true); ?></span></h2>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!--End Google Reviews Style1-->
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
}
|
||||
}
|
||||
601
wp-content/plugins/thinkai-plugin/elementor/hero_title.php
Normal file
601
wp-content/plugins/thinkai-plugin/elementor/hero_title.php
Normal file
@@ -0,0 +1,601 @@
|
||||
<?php namespace THINKAIPLUGIN\Element;
|
||||
|
||||
use Elementor\Controls_Manager;
|
||||
use Elementor\Controls_Stack;
|
||||
use Elementor\Group_Control_Typography;
|
||||
use Elementor\Group_Control_Border;
|
||||
use Elementor\Repeater;
|
||||
use Elementor\Widget_Base;
|
||||
use Elementor\Utils;
|
||||
use Elementor\Group_Control_Text_Shadow;
|
||||
use \Elementor\Group_Control_Box_Shadow;
|
||||
use \Elementor\Group_Control_Background;
|
||||
use \Elementor\Group_Control_Text_Stroke;
|
||||
use Elementor\Plugin;
|
||||
/**
|
||||
* Elementor button widget.
|
||||
* Elementor widget that displays a button with the ability to control every
|
||||
* aspect of the button design.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class Hero_Title extends Widget_Base {
|
||||
/**
|
||||
* Get widget name.
|
||||
* Retrieve button widget name.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget name.
|
||||
*/
|
||||
public function get_name() {
|
||||
return 'thinkai_hero_title';
|
||||
}
|
||||
/**
|
||||
* Get widget title.
|
||||
* Retrieve button widget title.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget title.
|
||||
*/
|
||||
public function get_title() {
|
||||
return esc_html__( 'Thinkai Hero Title', 'thinkai' );
|
||||
}
|
||||
/**
|
||||
* Get widget icon.
|
||||
* Retrieve button widget icon.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget icon.
|
||||
*/
|
||||
public function get_icon() {
|
||||
return 'eicon-site-identity';
|
||||
}
|
||||
/**
|
||||
* Get widget categories.
|
||||
* Retrieve the list of categories the button widget belongs to.
|
||||
* Used to determine where to display the widget in the editor.
|
||||
*
|
||||
* @since 2.0.0
|
||||
* @access public
|
||||
* @return array Widget categories.
|
||||
*/
|
||||
public function get_categories() {
|
||||
return [ 'thinkai' ];
|
||||
}
|
||||
/**
|
||||
* Register button widget controls.
|
||||
* Adds different input fields to allow the user to change and customize the widget settings.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*/
|
||||
protected function register_controls() {
|
||||
$this->start_controls_section(
|
||||
'hero_title',
|
||||
[
|
||||
'label' => esc_html__( 'Thinkai Hero Title', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
//General Align
|
||||
$this->add_responsive_control(
|
||||
'general_align',
|
||||
[
|
||||
'label' => esc_html__( 'Alignment', 'thinkai' ),
|
||||
'type' => Controls_Manager::CHOOSE,
|
||||
'options' => [
|
||||
'left' => [
|
||||
'title' => esc_html__( 'Left', 'thinkai' ),
|
||||
'icon' => 'eicon-text-align-left',
|
||||
],
|
||||
'center' => [
|
||||
'title' => esc_html__( 'Center', 'thinkai' ),
|
||||
'icon' => 'eicon-text-align-center',
|
||||
],
|
||||
'right' => [
|
||||
'title' => esc_html__( 'Right', 'thinkai' ),
|
||||
'icon' => 'eicon-text-align-right',
|
||||
],
|
||||
],
|
||||
'default' => '',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .thinkai-title-section' => 'text-align: {{VALUE}};'
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'subtitle_show',
|
||||
[
|
||||
'label' => esc_html__( 'Enable Small Title', 'thinkai' ),
|
||||
'type' => Controls_Manager::SWITCHER,
|
||||
'label_on' => esc_html__( 'On', 'thinkai' ),
|
||||
'label_off' => esc_html__( 'Off', 'thinkai' ),
|
||||
'return_value' => 'yes',
|
||||
'default' => 'no',
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'subtitle',
|
||||
[
|
||||
'label' => esc_html__( 'Small Title', 'thinkai' ),
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'label_block' => true,
|
||||
'placeholder' => esc_html__( 'Enter your small title', 'thinkai' ),
|
||||
'default' => esc_html__( 'Add Your Sub Heading Text Here', 'thinkai' ),
|
||||
'condition' => [ 'subtitle_show' => 'yes' ]
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'small_title_tag',
|
||||
[
|
||||
'label' => esc_html__( 'Small Title HTML Tag', 'thinkai' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'options' => [
|
||||
'h1' => 'H1',
|
||||
'h2' => 'H2',
|
||||
'h3' => 'H3',
|
||||
'h4' => 'H4',
|
||||
'h5' => 'H5',
|
||||
'h6' => 'H6',
|
||||
'div' => 'div',
|
||||
'span' => 'span',
|
||||
'p' => 'p',
|
||||
],
|
||||
'default' => 'h4',
|
||||
'condition' => [ 'subtitle_show' => 'yes' ]
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'title_show',
|
||||
[
|
||||
'label' => esc_html__( 'Enable Title', 'thinkai' ),
|
||||
'type' => Controls_Manager::SWITCHER,
|
||||
'label_on' => esc_html__( 'On', 'thinkai' ),
|
||||
'label_off' => esc_html__( 'Off', 'thinkai' ),
|
||||
'return_value' => 'yes',
|
||||
'default' => 'no',
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'title',
|
||||
[
|
||||
'label' => esc_html__( 'Title', 'thinkai' ),
|
||||
'type' => Controls_Manager::TEXTAREA,
|
||||
'label_block' => true,
|
||||
'placeholder' => esc_html__( 'Enter your title', 'thinkai' ),
|
||||
'default' => esc_html__( 'Add Your Heading Text Here', 'thinkai' ),
|
||||
'condition' => [ 'title_show' => 'yes' ]
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'title_size',
|
||||
[
|
||||
'label' => esc_html__( 'Size', 'thinkai' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'default',
|
||||
'options' => [
|
||||
'default' => esc_html__( 'Default', 'thinkai' ),
|
||||
'small' => esc_html__( 'Small', 'thinkai' ),
|
||||
'medium' => esc_html__( 'Medium', 'thinkai' ),
|
||||
'large' => esc_html__( 'Large', 'thinkai' ),
|
||||
'xl' => esc_html__( 'XL', 'thinkai' ),
|
||||
'xxl' => esc_html__( 'XXL', 'thinkai' ),
|
||||
],
|
||||
'condition' => [ 'title_show' => 'yes' ]
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'title_tag',
|
||||
[
|
||||
'label' => esc_html__( 'Title HTML Tag', 'thinkai' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'options' => [
|
||||
'h1' => 'H1',
|
||||
'h2' => 'H2',
|
||||
'h3' => 'H3',
|
||||
'h4' => 'H4',
|
||||
'h5' => 'H5',
|
||||
'h6' => 'H6',
|
||||
'div' => 'div',
|
||||
'span' => 'span',
|
||||
'p' => 'p',
|
||||
],
|
||||
'default' => 'h2',
|
||||
'condition' => [ 'title_show' => 'yes' ]
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'text_show',
|
||||
[
|
||||
'label' => esc_html__( 'Enable Text', 'thinkai' ),
|
||||
'type' => Controls_Manager::SWITCHER,
|
||||
'label_on' => esc_html__( 'On', 'thinkai' ),
|
||||
'label_off' => esc_html__( 'Off', 'thinkai' ),
|
||||
'return_value' => 'yes',
|
||||
'default' => 'no',
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'text',
|
||||
[
|
||||
'label' => esc_html__( 'Text', 'thinkai' ),
|
||||
'type' => Controls_Manager::TEXTAREA,
|
||||
'label_block' => true,
|
||||
'placeholder' => esc_html__( 'Enter your Text', 'thinkai' ),
|
||||
'default' => esc_html__( 'There are many variations of passages of lorem ipsum available the majority have suffered alteration in some form by injected humour. Duis aute irure dolor lipsum is simply free text available in the local markets in reprehenderit.', 'thinkai' ),
|
||||
'condition' => [ 'text_show' => 'yes' ]
|
||||
]
|
||||
);
|
||||
$this->end_controls_section();
|
||||
|
||||
//General Style
|
||||
$this->start_controls_section(
|
||||
'general_style',
|
||||
[
|
||||
'label' => esc_html__( 'General Setting', 'thinkai' ),
|
||||
'tab' => Controls_Manager::TAB_STYLE,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'general_margin',
|
||||
[
|
||||
'label' => esc_html__( 'Margin', 'thinkai' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => ['px', '%', 'em'],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .thinkai-title-section' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
|
||||
],
|
||||
'separator' => 'before',
|
||||
]
|
||||
);
|
||||
$this->add_responsive_control(
|
||||
'general_padding',
|
||||
[
|
||||
'label' => esc_html__( 'Padding', 'thinkai' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => ['px', '%', 'em'],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .thinkai-title-section' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
|
||||
],
|
||||
'separator' => 'before',
|
||||
]
|
||||
);
|
||||
$this->add_group_control(
|
||||
Group_Control_Background::get_type(),
|
||||
[
|
||||
'name' => 'general_bgtype',
|
||||
'label' => __( 'Background', 'thinkai' ),
|
||||
'types' => [ 'classic', 'gradient' ],
|
||||
'selector' => '{{WRAPPER}} .thinkai-title-section',
|
||||
]
|
||||
);
|
||||
$this->end_controls_section();
|
||||
|
||||
//Small Title Style
|
||||
$this->start_controls_section(
|
||||
'small_title_style',
|
||||
[
|
||||
'label' => esc_html__( 'Small Title Style Settings', 'thinkai' ),
|
||||
'tab' => Controls_Manager::TAB_STYLE,
|
||||
]
|
||||
);
|
||||
$this->add_responsive_control(
|
||||
'small_title__margin',
|
||||
[
|
||||
'label' => esc_html__( 'Margin', 'thinkai' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => ['px', '%', 'em'],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .te-subtitle' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
|
||||
],
|
||||
'separator' => 'before',
|
||||
]
|
||||
);
|
||||
$this->add_responsive_control(
|
||||
'small_title_padding',
|
||||
[
|
||||
'label' => esc_html__( 'Padding', 'thinkai' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => ['px', '%', 'em'],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .te-subtitle' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
|
||||
],
|
||||
'separator' => 'before',
|
||||
]
|
||||
);
|
||||
$this->add_group_control(
|
||||
Group_Control_Background::get_type(),
|
||||
[
|
||||
'name' => 'small_title_bgtype',
|
||||
'label' => __( 'Background', 'thinkai' ),
|
||||
'types' => [ 'classic', 'gradient' ],
|
||||
'selector' => '{{WRAPPER}} .te-subtitle',
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'small_title_color',
|
||||
[
|
||||
'label' => esc_html__( 'Text Color', 'thinkai' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .te-subtitle' => 'color: {{VALUE}} !important;',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'small_title_typography',
|
||||
'label' => __('Typography', 'thinkai'),
|
||||
'selector' => '{{WRAPPER}} .te-subtitle',
|
||||
]
|
||||
);
|
||||
$this->add_group_control(
|
||||
Group_Control_Text_Stroke::get_type(),
|
||||
[
|
||||
'name' => 'small_title_text_stroke',
|
||||
'selector' => '{{WRAPPER}} .te-subtitle',
|
||||
]
|
||||
);
|
||||
$this->add_group_control(
|
||||
Group_Control_Text_Shadow::get_type(),
|
||||
[
|
||||
'name' => 'small_title_text_shadow',
|
||||
'selector' => '{{WRAPPER}} .te-subtitle',
|
||||
]
|
||||
);
|
||||
$this->end_controls_section();
|
||||
|
||||
//Title Style
|
||||
$this->start_controls_section(
|
||||
'title_style',
|
||||
[
|
||||
'label' => esc_html__( 'Title Style Settings', 'thinkai' ),
|
||||
'tab' => Controls_Manager::TAB_STYLE,
|
||||
]
|
||||
);
|
||||
$this->add_responsive_control(
|
||||
'title__margin',
|
||||
[
|
||||
'label' => esc_html__( 'Margin', 'thinkai' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => ['px', '%', 'em'],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .te-title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
|
||||
],
|
||||
'separator' => 'before',
|
||||
]
|
||||
);
|
||||
$this->add_responsive_control(
|
||||
'title_padding',
|
||||
[
|
||||
'label' => esc_html__( 'Padding', 'thinkai' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => ['px', '%', 'em'],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .te-title' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
|
||||
],
|
||||
'separator' => 'before',
|
||||
]
|
||||
);
|
||||
$this->add_group_control(
|
||||
Group_Control_Background::get_type(),
|
||||
[
|
||||
'name' => 'title_bgtype',
|
||||
'label' => __( 'Background', 'thinkai' ),
|
||||
'types' => [ 'classic', 'gradient' ],
|
||||
'selector' => '{{WRAPPER}} .te-title',
|
||||
]
|
||||
);
|
||||
$this->add_group_control(
|
||||
Group_Control_Border::get_type(),
|
||||
[
|
||||
'name' => 'title_border_type',
|
||||
'selector' =>
|
||||
'{{WRAPPER}} .te-title',
|
||||
'separator' => 'before',
|
||||
]
|
||||
);
|
||||
$this->add_group_control(
|
||||
Group_Control_Box_Shadow::get_type(),
|
||||
[
|
||||
'name' => 'title_border_box_shadow',
|
||||
'selector' =>
|
||||
'{{WRAPPER}} .te-title',
|
||||
'separator' => 'before',
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'title_border_radius',
|
||||
[
|
||||
'label' => esc_html__('Border Radius', 'thinkai'),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'separator' => 'before',
|
||||
'size_units' => ['px'],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .te-title' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'title_color',
|
||||
[
|
||||
'label' => esc_html__( 'Text Color', 'thinkai' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .te-title' => 'color: {{VALUE}} !important;',
|
||||
'{{WRAPPER}} .te-title a' => 'color: {{VALUE}} !important;',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'title_typography',
|
||||
'label' => __('Typography', 'thinkai'),
|
||||
'selector' => '{{WRAPPER}} .te-title',
|
||||
]
|
||||
);
|
||||
$this->add_group_control(
|
||||
Group_Control_Text_Stroke::get_type(),
|
||||
[
|
||||
'name' => 'title_text_stroke',
|
||||
'selector' => '{{WRAPPER}} .te-title',
|
||||
]
|
||||
);
|
||||
$this->add_group_control(
|
||||
Group_Control_Text_Shadow::get_type(),
|
||||
[
|
||||
'name' => 'title_text_shadow',
|
||||
'selector' => '{{WRAPPER}} .te-title',
|
||||
]
|
||||
);
|
||||
$this->end_controls_section();
|
||||
|
||||
//Text Style
|
||||
$this->start_controls_section(
|
||||
'text_style',
|
||||
[
|
||||
'label' => esc_html__( 'Text Style Settings', 'thinkai' ),
|
||||
'tab' => Controls_Manager::TAB_STYLE,
|
||||
]
|
||||
);
|
||||
$this->add_responsive_control(
|
||||
'text__margin',
|
||||
[
|
||||
'label' => esc_html__( 'Margin', 'thinkai' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => ['px', '%', 'em'],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .te-text' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
|
||||
],
|
||||
'separator' => 'before',
|
||||
]
|
||||
);
|
||||
$this->add_responsive_control(
|
||||
'text_padding',
|
||||
[
|
||||
'label' => esc_html__( 'Padding', 'thinkai' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => ['px', '%', 'em'],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .te-text' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
|
||||
],
|
||||
'separator' => 'before',
|
||||
]
|
||||
);
|
||||
$this->add_group_control(
|
||||
Group_Control_Border::get_type(),
|
||||
[
|
||||
'name' => 'text_border_type',
|
||||
'selector' =>
|
||||
'{{WRAPPER}} .te-text',
|
||||
'separator' => 'before',
|
||||
]
|
||||
);
|
||||
$this->add_group_control(
|
||||
Group_Control_Box_Shadow::get_type(),
|
||||
[
|
||||
'name' => 'text_border_box_shadow',
|
||||
'selector' =>
|
||||
'{{WRAPPER}} .te-text',
|
||||
'separator' => 'before',
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'text_border_radius',
|
||||
[
|
||||
'label' => esc_html__('Border Radius', 'thinkai'),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'separator' => 'before',
|
||||
'size_units' => ['px'],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .te-text' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'text_color',
|
||||
[
|
||||
'label' => esc_html__( 'Text Color', 'thinkai' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .te-text' => 'color: {{VALUE}} !important;',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'text_typography',
|
||||
'label' => __('Typography', 'thinkai'),
|
||||
'selector' => '{{WRAPPER}} .te-text',
|
||||
]
|
||||
);
|
||||
$this->add_group_control(
|
||||
Group_Control_Text_Shadow::get_type(),
|
||||
[
|
||||
'name' => 'text_text_shadow',
|
||||
'selector' => '{{WRAPPER}} .te-text',
|
||||
]
|
||||
);
|
||||
$this->end_controls_section();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Render button widget output on the frontend.
|
||||
* Written in PHP and used to generate the final HTML.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*/
|
||||
protected function render() {
|
||||
$settings = $this->get_settings_for_display();
|
||||
$allowed_tags = wp_kses_allowed_html('post');
|
||||
|
||||
$this->add_render_attribute( 'subtitle', 'class', 'te-subtitle' );
|
||||
$subtitle = $settings['subtitle'];
|
||||
|
||||
if( $settings[ 'subtitle_show' ] == 'yes' ){
|
||||
$subtitle_html = sprintf( '<%1$s %2$s>%3$s</%1$s>', Utils::validate_html_tag( $settings['small_title_tag'] ), $this->get_render_attribute_string( 'subtitle' ), $subtitle );
|
||||
}
|
||||
|
||||
$this->add_render_attribute( 'title', 'class', 'te-title title-animation' );
|
||||
if ( ! empty( $settings['title_size'] ) ) {
|
||||
$this->add_render_attribute( 'title', 'class', 'thinkai-size-' . $settings['title_size'] );
|
||||
}
|
||||
$title = $settings['title'];
|
||||
|
||||
if( $settings[ 'title_show' ] == 'yes' ){
|
||||
$title_html = sprintf( '<%1$s %2$s>%3$s</%1$s>', Utils::validate_html_tag( $settings['title_tag'] ), $this->get_render_attribute_string( 'title' ), $title );
|
||||
}
|
||||
|
||||
$text = $settings[ 'text' ];
|
||||
?>
|
||||
|
||||
<div class="sec-title thinkai-title-section sec-title-animation animation-style3 p-0 m-0">
|
||||
<?php if( $settings[ 'subtitle_show' ] === 'yes' ){?>
|
||||
<div class="sub-title">
|
||||
<?php echo wp_kses( $subtitle_html, true );?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if( $settings[ 'title_show' ] === 'yes' ){?>
|
||||
<?php echo wp_kses( $title_html, true );?>
|
||||
<?php } ?>
|
||||
|
||||
<?php if($text){ ?>
|
||||
<div class="text-box">
|
||||
<p class="te-text"><?php echo wp_kses( $text, true );?></p>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
}
|
||||
}
|
||||
482
wp-content/plugins/thinkai-plugin/elementor/icon_box.php
Normal file
482
wp-content/plugins/thinkai-plugin/elementor/icon_box.php
Normal file
@@ -0,0 +1,482 @@
|
||||
<?php namespace THINKAIPLUGIN\Element;
|
||||
|
||||
use Elementor\Controls_Manager;
|
||||
use Elementor\Controls_Stack;
|
||||
use Elementor\Group_Control_Typography;
|
||||
use Elementor\Group_Control_Border;
|
||||
use Elementor\Repeater;
|
||||
use Elementor\Widget_Base;
|
||||
use Elementor\Utils;
|
||||
use Elementor\Group_Control_Text_Shadow;
|
||||
use \Elementor\Group_Control_Box_Shadow;
|
||||
use \Elementor\Group_Control_Background;
|
||||
use \Elementor\Group_Control_Image_Size;
|
||||
use \Elementor\Group_Control_Text_Stroke;
|
||||
use Elementor\Plugin;
|
||||
|
||||
/**
|
||||
* Elementor button widget.
|
||||
* Elementor widget that displays a button with the ability to control every
|
||||
* aspect of the button design.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class Icon_Box extends Widget_Base {
|
||||
|
||||
/**
|
||||
* Get widget name.
|
||||
* Retrieve button widget name.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget name.
|
||||
*/
|
||||
public function get_name() {
|
||||
return 'thinkai_icon_box';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget title.
|
||||
* Retrieve button widget title.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget title.
|
||||
*/
|
||||
public function get_title() {
|
||||
return esc_html__( 'Thinkai Icon Box', 'thinkai' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget icon.
|
||||
* Retrieve button widget icon.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget icon.
|
||||
*/
|
||||
public function get_icon() {
|
||||
return 'eicon-icon-box';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget categories.
|
||||
* Retrieve the list of categories the button widget belongs to.
|
||||
* Used to determine where to display the widget in the editor.
|
||||
*
|
||||
* @since 2.0.0
|
||||
* @access public
|
||||
* @return array Widget categories.
|
||||
*/
|
||||
public function get_categories() {
|
||||
return [ 'thinkai' ];
|
||||
}
|
||||
|
||||
/**
|
||||
* Register button widget controls.
|
||||
* Adds different input fields to allow the user to change and customize the widget settings.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*/
|
||||
protected function register_controls() {
|
||||
$this->start_controls_section(
|
||||
'icon_box',
|
||||
[
|
||||
'label' => esc_html__( 'Thinkai Icon Box', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'layout_control',
|
||||
[
|
||||
'label' => esc_html__( 'Layout Style', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => '1',
|
||||
'options' => array(
|
||||
'1' => esc_html__( 'Style One ', 'thinkai'),
|
||||
'2' => esc_html__( 'Style Two ', 'thinkai'),
|
||||
'3' => esc_html__( 'Style Three ', 'thinkai'),
|
||||
'4' => esc_html__( 'Style Four ', 'thinkai'),
|
||||
),
|
||||
]
|
||||
);
|
||||
//Shape Image
|
||||
$this->add_control(
|
||||
'bg_shape_image',
|
||||
[
|
||||
'label' => esc_html__( 'BG Shape Image', 'thinkai' ),
|
||||
'type' => Controls_Manager::MEDIA,
|
||||
'default' => [
|
||||
'url' => Utils::get_placeholder_image_src(),
|
||||
],
|
||||
'condition' => [
|
||||
'layout_control' => ['2','3']
|
||||
]
|
||||
]
|
||||
);
|
||||
//Shape Image V2
|
||||
$this->add_control(
|
||||
'bg_shape_image_v2',
|
||||
[
|
||||
'label' => esc_html__( 'BG Shape Image V2', 'thinkai' ),
|
||||
'type' => Controls_Manager::MEDIA,
|
||||
'default' => [
|
||||
'url' => Utils::get_placeholder_image_src(),
|
||||
],
|
||||
'condition' => [
|
||||
'layout_control' => '3',
|
||||
]
|
||||
]
|
||||
);
|
||||
|
||||
//Icon
|
||||
$this->add_control(
|
||||
'icon',
|
||||
[
|
||||
'label' => esc_html__('Enter The icons', 'thinkai'),
|
||||
'type' => \Elementor\Controls_Manager::ICONS,
|
||||
'default' => [
|
||||
'value' => 'icon-input',
|
||||
'library' => 'solid',
|
||||
],
|
||||
'condition' => [
|
||||
'layout_control' => ['1','2','3']
|
||||
]
|
||||
]
|
||||
);
|
||||
//Icon V2
|
||||
$this->add_control(
|
||||
'icon_v2',
|
||||
[
|
||||
'label' => esc_html__('Enter The icons', 'thinkai'),
|
||||
'type' => \Elementor\Controls_Manager::ICONS,
|
||||
'default' => [
|
||||
'value' => 'icon-radio-waves',
|
||||
'library' => 'solid',
|
||||
],
|
||||
'condition' => [
|
||||
'layout_control' => ['1']
|
||||
]
|
||||
]
|
||||
);
|
||||
//Counter Value
|
||||
$this->add_control(
|
||||
'counter_value',
|
||||
[
|
||||
'label' => __( 'Counter Value', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'default' => esc_html__( '01', 'thinkai' ),
|
||||
'condition' => [
|
||||
'layout_control' => '4',
|
||||
]
|
||||
]
|
||||
);
|
||||
//Title
|
||||
$this->add_control(
|
||||
'title',
|
||||
[
|
||||
'label' => __( 'Title', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'placeholder' => __( 'Enter your Title', 'thinkai' ),
|
||||
'condition' => [
|
||||
'layout_control' => ['2','4']
|
||||
]
|
||||
]
|
||||
);
|
||||
//Text
|
||||
$this->add_control(
|
||||
'text',
|
||||
[
|
||||
'label' => __( 'Description', 'thinkai' ),
|
||||
'type' => Controls_Manager::TEXTAREA,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'placeholder' => __( 'Enter your Desription', 'thinkai' ),
|
||||
'condition' => [
|
||||
'layout_control' => ['1','2','3','4']
|
||||
]
|
||||
]
|
||||
);
|
||||
|
||||
//Contact Info Text
|
||||
$this->add_control(
|
||||
'contact_info_text',
|
||||
[
|
||||
'label' => __( 'Contact Info', 'thinkai' ),
|
||||
'type' => Controls_Manager::TEXTAREA,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'placeholder' => __( 'Enter your Contact Info', 'thinkai' ),
|
||||
'condition' => [
|
||||
'layout_control' => '3',
|
||||
]
|
||||
]
|
||||
);
|
||||
|
||||
//Button Title
|
||||
$this->add_control(
|
||||
'btn_title',
|
||||
[
|
||||
'label' => __( 'Button Title', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'default' => esc_html__( 'Read More', 'thinkai' ),
|
||||
'condition' => [
|
||||
'layout_control' => ['1']
|
||||
]
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'link_option',
|
||||
[
|
||||
'label' => esc_html__( 'Select link Option', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'extranal',
|
||||
'options' => array(
|
||||
'extranal' => esc_html__( 'Extranal ', 'thinkai'),
|
||||
'page' => esc_html__( 'Page ', 'thinkai'),
|
||||
),
|
||||
'condition' => [
|
||||
'layout_control' => ['1','2','4']
|
||||
]
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'link',
|
||||
[
|
||||
'label' => __( 'External Link', 'thinkai' ),
|
||||
'type' => Controls_Manager::URL,
|
||||
'label_block' => true,
|
||||
'placeholder' => __( 'https://your-link.com', 'thinkai' ),
|
||||
'show_external' => true,
|
||||
'default' => [
|
||||
'url' => '',
|
||||
'is_external' => true,
|
||||
'nofollow' => true,
|
||||
],
|
||||
'condition' => [
|
||||
'layout_control' => ['1','2','4'],
|
||||
'link_option' => 'extranal',
|
||||
]
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'page_select',
|
||||
[
|
||||
'label' => esc_html__( 'Select Page', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::SELECT2,
|
||||
'default' => 'extranal',
|
||||
'options' => thinkai_page_list(),
|
||||
'condition' => [
|
||||
'layout_control' => ['1','2','4'],
|
||||
'link_option' => 'page',
|
||||
]
|
||||
]
|
||||
);
|
||||
$this->end_controls_section();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Render button widget output on the frontend.
|
||||
* Written in PHP and used to generate the final HTML.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*/
|
||||
protected function render() {
|
||||
$settings = $this->get_settings_for_display();
|
||||
$allowed_tags = wp_kses_allowed_html('post');
|
||||
?>
|
||||
<?php
|
||||
if($settings['layout_control'] == '4') :
|
||||
$icon = $settings['icon'];
|
||||
$page = $settings['link_option'];
|
||||
$page_select = $settings[ 'page_select' ];
|
||||
$ext_url = $settings[ 'link' ];
|
||||
|
||||
if( $page == 'page' ){
|
||||
$mount_link = get_page_link( $page_select );
|
||||
}else{
|
||||
$mount_link = $ext_url['url'];
|
||||
$target = $ext_url['is_external'] ? ' target="_blank"' : '';
|
||||
$nofollow = $ext_url['nofollow'] ? ' rel="nofollow"' : '';
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="services-and-applications__single-box text-center">
|
||||
<div class="static-content">
|
||||
<div class="number-box">
|
||||
<span><?php echo wp_kses($settings['counter_value'], true);?></span>
|
||||
</div>
|
||||
<div class="title-box">
|
||||
<h4><?php echo wp_kses($settings['title'], true);?></h4>
|
||||
</div>
|
||||
<div class="btn-box">
|
||||
<a href="<?php echo esc_url( $mount_link );?>" <?php if( $page == 'extranal' ) echo esc_attr( $target );?> <?php if( $page == 'extranal' ) echo esc_attr( $nofollow );?>><span class="icon-right-arrow1"></span></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="overlay-content">
|
||||
<h4><?php echo wp_kses($settings['title'], true);?></h4>
|
||||
<p><?php echo wp_kses($settings['text'], true);?></p>
|
||||
<div class="btn-box">
|
||||
<a href="<?php echo esc_url( $mount_link );?>" <?php if( $page == 'extranal' ) echo esc_attr( $target );?> <?php if( $page == 'extranal' ) echo esc_attr( $nofollow );?>><span class="icon-right-arrow1"></span></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
elseif($settings['layout_control'] == '3') :
|
||||
$icon = $settings['icon'];
|
||||
?>
|
||||
<!--Start Contact Info Style2 -->
|
||||
<section class="contact-info-style2 p-0 m-0">
|
||||
<div class="contact-info-style2__single text-center">
|
||||
<div class="shape-1">
|
||||
<img src="<?php echo esc_url(wp_get_attachment_url($settings['bg_shape_image']['id'])); ?>" alt="<?php bloginfo( 'name' ); ?>">
|
||||
</div>
|
||||
<div class="shape-2">
|
||||
<img src="<?php echo esc_url(wp_get_attachment_url($settings['bg_shape_image_v2']['id'])); ?>" alt="<?php bloginfo( 'name' ); ?>">
|
||||
</div>
|
||||
<?php if($icon){ ?>
|
||||
<div class="icon-box">
|
||||
<?php
|
||||
$icon = str_replace( "icon ", "", $settings['icon']);
|
||||
if( !empty( $icon ) ):?>
|
||||
<?php \Elementor\Icons_Manager::render_icon( $icon ); ?>
|
||||
<?php else:?>
|
||||
<span class="icon-headset"></span>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="text-box">
|
||||
<p><?php echo wp_kses($settings['text'], true);?></p>
|
||||
</div>
|
||||
<div class="phone-number-box">
|
||||
<h3><?php echo wp_kses($settings['contact_info_text'], true);?></h3>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
<?php
|
||||
elseif($settings['layout_control'] == '2') :
|
||||
$icon = $settings['icon'];
|
||||
$page = $settings['link_option'];
|
||||
$page_select = $settings[ 'page_select' ];
|
||||
$ext_url = $settings[ 'link' ];
|
||||
|
||||
if( $page == 'page' ){
|
||||
$mount_link = get_page_link( $page_select );
|
||||
}else{
|
||||
$mount_link = $ext_url['url'];
|
||||
$target = $ext_url['is_external'] ? ' target="_blank"' : '';
|
||||
$nofollow = $ext_url['nofollow'] ? ' rel="nofollow"' : '';
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="features-style2__single text-center">
|
||||
<div class="icon-box">
|
||||
<?php if($settings['bg_shape_image']){ ?>
|
||||
<div class="shape1 float-bob-y">
|
||||
<img src="<?php echo esc_url(wp_get_attachment_url($settings['bg_shape_image']['id'])); ?>" alt="<?php bloginfo( 'name' ); ?>">
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if($icon){ ?>
|
||||
<div class="inner">
|
||||
<?php
|
||||
$icon = str_replace( "icon ", "", $settings['icon']);
|
||||
if( !empty( $icon ) ):?>
|
||||
<?php \Elementor\Icons_Manager::render_icon( $icon ); ?>
|
||||
<?php else:?>
|
||||
<span class="icon-voice-detection"></span>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="content-box">
|
||||
<h3><a href="<?php echo esc_url( $mount_link );?>" <?php if( $page == 'extranal' ) echo esc_attr( $target );?> <?php if( $page == 'extranal' ) echo esc_attr( $nofollow );?>><?php echo wp_kses($settings['title'], true);?></a></h3>
|
||||
<p><?php echo wp_kses($settings['text'], true);?></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
else:
|
||||
$icon = $settings['icon'];
|
||||
$icon_v2 = $settings['icon_v2'];
|
||||
$page = $settings['link_option'];
|
||||
$page_select = $settings[ 'page_select' ];
|
||||
$ext_url = $settings[ 'link' ];
|
||||
|
||||
if( $page == 'page' ){
|
||||
$mount_link = get_page_link( $page_select );
|
||||
}else{
|
||||
$mount_link = $ext_url['url'];
|
||||
$target = $ext_url['is_external'] ? ' target="_blank"' : '';
|
||||
$nofollow = $ext_url['nofollow'] ? ' rel="nofollow"' : '';
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="about-style3__left-content">
|
||||
<ul class="clearfix">
|
||||
<li class="p-0 m-0">
|
||||
<div class="bottom-content">
|
||||
<div class="icon-box">
|
||||
<?php if($icon){ ?>
|
||||
<?php
|
||||
$icon = str_replace( "icon ", "", $settings['icon']);
|
||||
if( !empty( $icon ) ):?>
|
||||
<?php \Elementor\Icons_Manager::render_icon( $icon ); ?>
|
||||
<?php else:?>
|
||||
<span class="icon-input"></span>
|
||||
<?php endif;?>
|
||||
<?php } ?>
|
||||
<a href="<?php echo esc_url( $mount_link );?>" <?php if( $page == 'extranal' ) echo esc_attr( $target );?> <?php if( $page == 'extranal' ) echo esc_attr( $nofollow );?>>
|
||||
<span class="icon-right-arrow1 icon2"></span>
|
||||
</a>
|
||||
<?php if($icon_v2){ ?>
|
||||
<?php
|
||||
$icon_v2 = str_replace( "icon ", "", $settings['icon_v2']);
|
||||
if( !empty( $icon_v2 ) ):?>
|
||||
<?php \Elementor\Icons_Manager::render_icon( $icon_v2 ); ?>
|
||||
<?php else:?>
|
||||
<span class="icon-radio-waves"></span>
|
||||
<?php endif;?>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<div class="text-box">
|
||||
<p><?php echo wp_kses($settings['text'], true);?></p>
|
||||
<?php if($settings['btn_title']){ ?>
|
||||
<div class="btn-box">
|
||||
<a href="<?php echo esc_url( $mount_link );?>" <?php if( $page == 'extranal' ) echo esc_attr( $target );?> <?php if( $page == 'extranal' ) echo esc_attr( $nofollow );?>><?php echo wp_kses($settings['btn_title'], true);?></a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
}
|
||||
}
|
||||
147
wp-content/plugins/thinkai-plugin/elementor/insta_gallery.php
Normal file
147
wp-content/plugins/thinkai-plugin/elementor/insta_gallery.php
Normal file
@@ -0,0 +1,147 @@
|
||||
<?php namespace THINKAIPLUGIN\Element;
|
||||
|
||||
use Elementor\Controls_Manager;
|
||||
use Elementor\Controls_Stack;
|
||||
use Elementor\Group_Control_Typography;
|
||||
use Elementor\Group_Control_Border;
|
||||
use Elementor\Repeater;
|
||||
use Elementor\Widget_Base;
|
||||
use Elementor\Utils;
|
||||
use Elementor\Group_Control_Text_Shadow;
|
||||
use \Elementor\Group_Control_Box_Shadow;
|
||||
use \Elementor\Group_Control_Background;
|
||||
use \Elementor\Group_Control_Text_Stroke;
|
||||
use Elementor\Plugin;
|
||||
|
||||
/**
|
||||
* Elementor button widget.
|
||||
* Elementor widget that displays a button with the ability to control every
|
||||
* aspect of the button design.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class Insta_Gallery extends Widget_Base {
|
||||
/**
|
||||
* Get widget name.
|
||||
* Retrieve button widget name.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget name.
|
||||
*/
|
||||
public function get_name() {
|
||||
return 'thinkai_insta_gallery';
|
||||
}
|
||||
/**
|
||||
* Get widget title.
|
||||
* Retrieve button widget title.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget title.
|
||||
*/
|
||||
public function get_title() {
|
||||
return esc_html__( 'Thinkai Insta Gallery', 'thinkai' );
|
||||
}
|
||||
/**
|
||||
* Get widget icon.
|
||||
* Retrieve button widget icon.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget icon.
|
||||
*/
|
||||
public function get_icon() {
|
||||
return 'eicon-image-hotspot';
|
||||
}
|
||||
/**
|
||||
* Get widget categories.
|
||||
* Retrieve the list of categories the button widget belongs to.
|
||||
* Used to determine where to display the widget in the editor.
|
||||
*
|
||||
* @since 2.0.0
|
||||
* @access public
|
||||
* @return array Widget categories.
|
||||
*/
|
||||
public function get_categories() {
|
||||
return [ 'thinkai' ];
|
||||
}
|
||||
|
||||
/**
|
||||
* Register button widget controls.
|
||||
* Adds different input fields to allow the user to change and customize the widget settings.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*/
|
||||
protected function register_controls() {
|
||||
$this->start_controls_section(
|
||||
'insta_gallery',
|
||||
[
|
||||
'label' => esc_html__( 'Insta Gallery', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
|
||||
//Gallery Image
|
||||
$repeater = new Repeater();
|
||||
$repeater->add_control(
|
||||
'gallery_image',
|
||||
[
|
||||
'label' => esc_html__( 'Choose Gallery Image', 'thinkai' ),
|
||||
'type' => Controls_Manager::MEDIA,
|
||||
'default' => [
|
||||
'url' => Utils::get_placeholder_image_src(),
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'gallery',
|
||||
[
|
||||
'label' => __('Add Gallery Images', 'thinkai'),
|
||||
'type' => Controls_Manager::REPEATER,
|
||||
'fields' => $repeater->get_controls(),
|
||||
]
|
||||
);
|
||||
$this->end_controls_section();
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Render button widget output on the frontend.
|
||||
* Written in PHP and used to generate the final HTML.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*/
|
||||
protected function render() {
|
||||
$settings = $this->get_settings_for_display();
|
||||
$allowed_tags = wp_kses_allowed_html('post');
|
||||
?>
|
||||
|
||||
<!--Start Insta Post style1-->
|
||||
<section class="insta-post-style1">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<?php foreach ($settings['gallery'] as $keys => $items){ ?>
|
||||
<!--Start Single Insta Post style1-->
|
||||
<div class="col-xl-2 col-lg-4 col-md-4">
|
||||
<div class="insta-post-style1__single">
|
||||
<div class="insta-post-style1__single-img">
|
||||
<img src="<?php echo esc_url(wp_get_attachment_url($items['gallery_image']['id'])); ?>" alt="<?php bloginfo( 'name' ); ?>">
|
||||
<div class="overlay-box">
|
||||
<a href="<?php echo esc_url(wp_get_attachment_url($items['gallery_image']['id'])); ?>" class="lightbox-image" ><span class="icon-arrow-upper-right"></span></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--End Single Insta Post style1-->
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!--End Insta Post style1-->
|
||||
|
||||
<?php
|
||||
}
|
||||
}
|
||||
528
wp-content/plugins/thinkai-plugin/elementor/marquee_text.php
Normal file
528
wp-content/plugins/thinkai-plugin/elementor/marquee_text.php
Normal file
@@ -0,0 +1,528 @@
|
||||
<?php namespace THINKAIPLUGIN\Element;
|
||||
|
||||
use Elementor\Controls_Manager;
|
||||
use Elementor\Controls_Stack;
|
||||
use Elementor\Group_Control_Typography;
|
||||
use Elementor\Group_Control_Border;
|
||||
use Elementor\Repeater;
|
||||
use Elementor\Widget_Base;
|
||||
use Elementor\Utils;
|
||||
use Elementor\Group_Control_Text_Shadow;
|
||||
use \Elementor\Group_Control_Box_Shadow;
|
||||
use \Elementor\Group_Control_Background;
|
||||
use \Elementor\Group_Control_Image_Size;
|
||||
use \Elementor\Group_Control_Text_Stroke;
|
||||
use Elementor\Plugin;
|
||||
|
||||
/**
|
||||
* Elementor button widget.
|
||||
* Elementor widget that displays a button with the ability to control every
|
||||
* aspect of the button design.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class Marquee_Text extends Widget_Base {
|
||||
|
||||
/**
|
||||
* Get widget name.
|
||||
* Retrieve button widget name.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget name.
|
||||
*/
|
||||
public function get_name() {
|
||||
return 'thinkai_marquee_text';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget title.
|
||||
* Retrieve button widget title.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget title.
|
||||
*/
|
||||
public function get_title() {
|
||||
return esc_html__( 'Thinkai Marquee Text', 'thinkai' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget icon.
|
||||
* Retrieve button widget icon.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget icon.
|
||||
*/
|
||||
public function get_icon() {
|
||||
return 'eicon-gallery-grid';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget categories.
|
||||
* Retrieve the list of categories the button widget belongs to.
|
||||
* Used to determine where to display the widget in the editor.
|
||||
*
|
||||
* @since 2.0.0
|
||||
* @access public
|
||||
* @return array Widget categories.
|
||||
*/
|
||||
public function get_categories() {
|
||||
return [ 'thinkai' ];
|
||||
}
|
||||
|
||||
/**
|
||||
* Register button widget controls.
|
||||
* Adds different input fields to allow the user to change and customize the widget settings.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*/
|
||||
protected function register_controls() {
|
||||
$this->start_controls_section(
|
||||
'marquee_text',
|
||||
[
|
||||
'label' => esc_html__( 'Thinkai Marquee Text', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'layout_control',
|
||||
[
|
||||
'label' => esc_html__( 'Layout Style', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => '1',
|
||||
'options' => array(
|
||||
'1' => esc_html__( 'Style One ', 'thinkai'),
|
||||
'2' => esc_html__( 'Style Two ', 'thinkai'),
|
||||
'3' => esc_html__( 'Style Three ', 'thinkai'),
|
||||
'4' => esc_html__( 'Style Four ', 'thinkai'),
|
||||
'5' => esc_html__( 'Style Five ', 'thinkai'),
|
||||
),
|
||||
]
|
||||
);
|
||||
|
||||
//Title
|
||||
$this->add_control(
|
||||
'title',
|
||||
[
|
||||
'label' => __( 'Title', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'default' => esc_html__( 'First Step', 'thinkai' ),
|
||||
'condition' => [
|
||||
'layout_control' => '4',
|
||||
]
|
||||
]
|
||||
);
|
||||
|
||||
//Monthly Plan Table
|
||||
$repeater = new Repeater();
|
||||
$repeater->add_control(
|
||||
'features_list',
|
||||
[
|
||||
'label' => __( 'Feature List', 'thinkai' ),
|
||||
'type' => Controls_Manager::TEXTAREA,
|
||||
'label_block' => true,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'placeholder' => __( 'Enter your Feature List', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'list',
|
||||
[
|
||||
'label' => __('Add Marquee List', 'thinkai'),
|
||||
'type' => Controls_Manager::REPEATER,
|
||||
'fields' => $repeater->get_controls(),
|
||||
'condition' => [
|
||||
'layout_control' => ['1','2','3','5']
|
||||
]
|
||||
]
|
||||
);
|
||||
//Mailchimp Form Url
|
||||
$this->add_control(
|
||||
'mailchimp_form_url',
|
||||
[
|
||||
'label' => __( 'MailChimp Form Url', 'thinkai' ),
|
||||
'type' => Controls_Manager::TEXTAREA,
|
||||
'label_block' => true,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'placeholder' => __( 'Enter MailChimp Form Url', 'thinkai' ),
|
||||
'condition' => [
|
||||
'layout_control' => '5',
|
||||
]
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
//Feature List V1
|
||||
$this->add_control(
|
||||
'features_list',
|
||||
[
|
||||
'label' => __( 'Feature List', 'thinkai' ),
|
||||
'type' => Controls_Manager::TEXTAREA,
|
||||
'label_block' => true,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'placeholder' => __( 'Enter your Feature List', 'thinkai' ),
|
||||
'condition' => [
|
||||
'layout_control' => '4'
|
||||
]
|
||||
]
|
||||
);
|
||||
|
||||
//Marquee Text V2
|
||||
$this->add_control(
|
||||
'show_marquee_text_v2',
|
||||
[
|
||||
'label' => esc_html__( 'Enable Marque Text V2', 'thinkai' ),
|
||||
'type' => Controls_Manager::SWITCHER,
|
||||
'label_on' => esc_html__( 'On', 'thinkai' ),
|
||||
'label_off' => esc_html__( 'Off', 'thinkai' ),
|
||||
'return_value' => 'yes',
|
||||
'default' => 'no',
|
||||
'condition' => [
|
||||
'layout_control' => '4',
|
||||
]
|
||||
]
|
||||
);
|
||||
//Pattern Image
|
||||
$this->add_control(
|
||||
'pattern_img_v1',
|
||||
[
|
||||
'label' => __( 'Pattern Image', 'thinkai' ),
|
||||
'type' => Controls_Manager::MEDIA,
|
||||
'default' => ['url' => Utils::get_placeholder_image_src(),],
|
||||
'condition' => [
|
||||
'show_marquee_text_v2' => 'yes',
|
||||
'layout_control' => '4',
|
||||
]
|
||||
]
|
||||
);
|
||||
//Title
|
||||
$this->add_control(
|
||||
'title_v2',
|
||||
[
|
||||
'label' => __( 'Title', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'default' => esc_html__( 'Second Step', 'thinkai' ),
|
||||
'condition' => [
|
||||
'show_marquee_text_v2' => 'yes',
|
||||
'layout_control' => '4',
|
||||
]
|
||||
]
|
||||
);
|
||||
|
||||
//Feature List V2
|
||||
$this->add_control(
|
||||
'features_list_v2',
|
||||
[
|
||||
'label' => __( 'Feature List', 'thinkai' ),
|
||||
'type' => Controls_Manager::TEXTAREA,
|
||||
'label_block' => true,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'placeholder' => __( 'Enter your Feature List', 'thinkai' ),
|
||||
'condition' => [
|
||||
'show_marquee_text_v2' => 'yes',
|
||||
'layout_control' => '4'
|
||||
]
|
||||
]
|
||||
);
|
||||
|
||||
//Marquee Text V3
|
||||
$this->add_control(
|
||||
'show_marquee_text_v3',
|
||||
[
|
||||
'label' => esc_html__( 'Enable Marque Text V3', 'thinkai' ),
|
||||
'type' => Controls_Manager::SWITCHER,
|
||||
'label_on' => esc_html__( 'On', 'thinkai' ),
|
||||
'label_off' => esc_html__( 'Off', 'thinkai' ),
|
||||
'return_value' => 'yes',
|
||||
'default' => 'no',
|
||||
'condition' => [
|
||||
'layout_control' => '4',
|
||||
]
|
||||
]
|
||||
);
|
||||
//Pattern Image
|
||||
$this->add_control(
|
||||
'pattern_img_v2',
|
||||
[
|
||||
'label' => __( 'Pattern Image', 'thinkai' ),
|
||||
'type' => Controls_Manager::MEDIA,
|
||||
'default' => ['url' => Utils::get_placeholder_image_src(),],
|
||||
'condition' => [
|
||||
'show_marquee_text_v3' => 'yes',
|
||||
'layout_control' => '4',
|
||||
]
|
||||
]
|
||||
);
|
||||
//Title
|
||||
$this->add_control(
|
||||
'title_v3',
|
||||
[
|
||||
'label' => __( 'Title', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'default' => esc_html__( 'Third Step', 'thinkai' ),
|
||||
'condition' => [
|
||||
'show_marquee_text_v3' => 'yes',
|
||||
'layout_control' => '4',
|
||||
]
|
||||
]
|
||||
);
|
||||
|
||||
//Feature List V3
|
||||
$this->add_control(
|
||||
'features_list_v3',
|
||||
[
|
||||
'label' => __( 'Feature List', 'thinkai' ),
|
||||
'type' => Controls_Manager::TEXTAREA,
|
||||
'label_block' => true,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'placeholder' => __( 'Enter your Feature List', 'thinkai' ),
|
||||
'condition' => [
|
||||
'show_marquee_text_v2' => 'yes',
|
||||
'layout_control' => '4'
|
||||
]
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_section();
|
||||
}
|
||||
|
||||
/**
|
||||
* Render button widget output on the frontend.
|
||||
* Written in PHP and used to generate the final HTML.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*/
|
||||
protected function render() {
|
||||
$settings = $this->get_settings_for_display();
|
||||
$allowed_tags = wp_kses_allowed_html('post');
|
||||
$layout = $settings[ 'layout_control' ];
|
||||
?>
|
||||
|
||||
<?php if($layout == '5') : ?>
|
||||
|
||||
<!--Start Subscribe Style2-->
|
||||
<section class="subscribe-style2">
|
||||
<div class="scrolling-text-style1">
|
||||
<div class="inner">
|
||||
<ul class="clearfix marquee_mode">
|
||||
|
||||
<?php
|
||||
foreach ($settings['list'] as $keys => $items){
|
||||
|
||||
$features_list = $items['features_list'];
|
||||
if(!empty($features_list)){
|
||||
$features_list = explode("\n", ($features_list));
|
||||
?>
|
||||
<li class="is-animetion">
|
||||
<?php foreach($features_list as $features): ?>
|
||||
<span><?php echo wp_kses($features, true); ?></span>
|
||||
<?php endforeach; ?>
|
||||
</li>
|
||||
<?php } } ?>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<?php if($settings['mailchimp_form_url']){ ?>
|
||||
<div class="container">
|
||||
<div class="subscribe-style2__form">
|
||||
<div class="newsletter-style1__content">
|
||||
<?php echo do_shortcode($settings['mailchimp_form_url']); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</section>
|
||||
<!--End Subscribe Style2-->
|
||||
|
||||
<?php elseif($layout == '4') : ?>
|
||||
|
||||
<!--Start Scrolling Text Style5 -->
|
||||
<section class="scrolling-text-style5">
|
||||
<?php if($settings['title']){ ?>
|
||||
<div class="scrolling-text-style5__title">
|
||||
<h6><?php echo wp_kses($settings['title'], true); ?></h6>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
$features_list = $settings['features_list'];
|
||||
if(!empty($features_list)){
|
||||
$features_list = explode("\n", ($features_list));
|
||||
?>
|
||||
<div class="inner">
|
||||
<ul class="clearfix marquee_mode">
|
||||
<?php foreach($features_list as $features){ ?>
|
||||
<li data-hover="<?php echo esc_attr($features); ?>">
|
||||
<?php echo wp_kses($features, true); ?>
|
||||
</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if($settings['show_marquee_text_v2'] == 'yes'){ ?>
|
||||
<?php if($settings['pattern_img_v1']){ ?>
|
||||
<div class="pattern-box">
|
||||
<div class="pattern-box__bg" style="background-image: url(<?php echo esc_url(wp_get_attachment_url($settings['pattern_img_v1']['id'])); ?>);"></div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if($settings['title_v2']){ ?>
|
||||
<div class="scrolling-text-style5__title scrolling-text-style5__title--style2">
|
||||
<h6><?php echo wp_kses($settings['title_v2'], true); ?></h6>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
$features_list = $settings['features_list_v2'];
|
||||
if(!empty($features_list)){
|
||||
$features_list = explode("\n", ($features_list));
|
||||
?>
|
||||
<div class="inner">
|
||||
<ul class="clearfix marquee_mode-language">
|
||||
<?php foreach($features_list as $features){ ?>
|
||||
<li data-hover="<?php echo esc_attr($features); ?>">
|
||||
<?php echo wp_kses($features, true); ?>
|
||||
</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
|
||||
<?php if($settings['show_marquee_text_v3'] == 'yes'){ ?>
|
||||
<?php if($settings['pattern_img_v2']){ ?>
|
||||
<div class="pattern-box">
|
||||
<div class="pattern-box__bg pattern-box__bg--style2"
|
||||
style="background-image: url(<?php echo esc_url(wp_get_attachment_url($settings['pattern_img_v2']['id'])); ?>);">
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if($settings['title_v3']){ ?>
|
||||
<div class="scrolling-text-style5__title scrolling-text-style5__title--style2">
|
||||
<h6><?php echo wp_kses($settings['title_v3'], true); ?></h6>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
$features_list = $settings['features_list_v3'];
|
||||
if(!empty($features_list)){
|
||||
$features_list = explode("\n", ($features_list));
|
||||
?>
|
||||
<div class="inner">
|
||||
<ul class="clearfix marquee_mode">
|
||||
<?php foreach($features_list as $features){ ?>
|
||||
<li data-hover="<?php echo esc_attr($features); ?>">
|
||||
<?php echo wp_kses($features, true); ?>
|
||||
</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
</section>
|
||||
<!--End Scrolling Text Style5 -->
|
||||
|
||||
<?php elseif($layout == '3') : ?>
|
||||
|
||||
<!--Start Scrolling Text Style1-->
|
||||
<section class="scrolling-text-style1 scrolling-text-style1--style3">
|
||||
<div class="inner">
|
||||
<ul class="clearfix marquee_mode">
|
||||
<?php
|
||||
foreach ($settings['list'] as $keys => $items){
|
||||
|
||||
$features_list = $items['features_list'];
|
||||
if(!empty($features_list)){
|
||||
$features_list = explode("\n", ($features_list));
|
||||
?>
|
||||
<li class="is-animetion is-animetion-style3">
|
||||
<?php foreach($features_list as $features): ?>
|
||||
<span><?php echo wp_kses($features, true); ?></span>
|
||||
<?php endforeach; ?>
|
||||
</li>
|
||||
<?php } } ?>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
<!--End Scrolling Text Style1-->
|
||||
|
||||
<?php elseif($layout == '2') : ?>
|
||||
|
||||
<!--Start Scrolling Text Style1-->
|
||||
<section class="scrolling-text-style1 scrolling-text-style1--style2">
|
||||
<div class="inner">
|
||||
<ul class="clearfix marquee_mode">
|
||||
<?php
|
||||
foreach ($settings['list'] as $keys => $items){
|
||||
|
||||
$features_list = $items['features_list'];
|
||||
if(!empty($features_list)){
|
||||
$features_list = explode("\n", ($features_list));
|
||||
?>
|
||||
<li class="is-animetion is-animetion-style2">
|
||||
<?php foreach($features_list as $features): ?>
|
||||
<span><?php echo wp_kses($features, true); ?></span>
|
||||
<?php endforeach; ?>
|
||||
</li>
|
||||
<?php } } ?>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
<!--End Scrolling Text Style1-->
|
||||
|
||||
<?php else: ?>
|
||||
|
||||
<!--Start Scrolling Text Style1-->
|
||||
<section class="scrolling-text-style1">
|
||||
<div class="inner">
|
||||
<ul class="clearfix marquee_mode">
|
||||
<?php
|
||||
foreach ($settings['list'] as $keys => $items){
|
||||
|
||||
$features_list = $items['features_list'];
|
||||
if(!empty($features_list)){
|
||||
$features_list = explode("\n", ($features_list));
|
||||
?>
|
||||
<li class="is-animetion">
|
||||
<?php foreach($features_list as $features): ?>
|
||||
<span><?php echo wp_kses($features, true); ?></span>
|
||||
<?php endforeach; ?>
|
||||
</li>
|
||||
<?php } } ?>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
<!--End Scrolling Text Style1-->
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
}
|
||||
}
|
||||
265
wp-content/plugins/thinkai-plugin/elementor/newsletter.php
Normal file
265
wp-content/plugins/thinkai-plugin/elementor/newsletter.php
Normal file
@@ -0,0 +1,265 @@
|
||||
<?php namespace THINKAIPLUGIN\Element;
|
||||
|
||||
use Elementor\Controls_Manager;
|
||||
use Elementor\Controls_Stack;
|
||||
use Elementor\Group_Control_Typography;
|
||||
use Elementor\Group_Control_Border;
|
||||
use Elementor\Repeater;
|
||||
use Elementor\Widget_Base;
|
||||
use Elementor\Utils;
|
||||
use Elementor\Group_Control_Text_Shadow;
|
||||
use \Elementor\Group_Control_Box_Shadow;
|
||||
use \Elementor\Group_Control_Background;
|
||||
use \Elementor\Group_Control_Image_Size;
|
||||
use \Elementor\Group_Control_Text_Stroke;
|
||||
use Elementor\Plugin;
|
||||
|
||||
/**
|
||||
* Elementor button widget.
|
||||
* Elementor widget that displays a button with the ability to control every
|
||||
* aspect of the button design.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class Newsletter extends Widget_Base {
|
||||
|
||||
/**
|
||||
* Get widget name.
|
||||
* Retrieve button widget name.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget name.
|
||||
*/
|
||||
public function get_name() {
|
||||
return 'thinkai_newsletter';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget title.
|
||||
* Retrieve button widget title.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget title.
|
||||
*/
|
||||
public function get_title() {
|
||||
return esc_html__( 'Thinkai Newsletter', 'thinkai' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget icon.
|
||||
* Retrieve button widget icon.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget icon.
|
||||
*/
|
||||
public function get_icon() {
|
||||
return 'eicon-gallery-grid';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget categories.
|
||||
* Retrieve the list of categories the button widget belongs to.
|
||||
* Used to determine where to display the widget in the editor.
|
||||
*
|
||||
* @since 2.0.0
|
||||
* @access public
|
||||
* @return array Widget categories.
|
||||
*/
|
||||
public function get_categories() {
|
||||
return [ 'thinkai' ];
|
||||
}
|
||||
|
||||
/**
|
||||
* Register button widget controls.
|
||||
* Adds different input fields to allow the user to change and customize the widget settings.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*/
|
||||
protected function register_controls() {
|
||||
$this->start_controls_section(
|
||||
'newsletter',
|
||||
[
|
||||
'label' => esc_html__( 'Thinkai Newsletter', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'layout_control',
|
||||
[
|
||||
'label' => esc_html__( 'Layout Style', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => '1',
|
||||
'options' => array(
|
||||
'1' => esc_html__( 'Style One ', 'thinkai'),
|
||||
'2' => esc_html__( 'Style Two ', 'thinkai'),
|
||||
),
|
||||
]
|
||||
);
|
||||
|
||||
//features_list
|
||||
$this->add_control(
|
||||
'features_list',
|
||||
[
|
||||
'label' => __( 'Feature List', 'thinkai' ),
|
||||
'type' => Controls_Manager::TEXTAREA,
|
||||
'label_block' => true,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'default' => esc_html__( 'Enter Feature List', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
//BG Image
|
||||
$this->add_control(
|
||||
'feature_image',
|
||||
[
|
||||
'label' => __( 'Feature Image Url', 'thinkai' ),
|
||||
'type' => Controls_Manager::MEDIA,
|
||||
'default' => ['url' => Utils::get_placeholder_image_src(),],
|
||||
]
|
||||
);
|
||||
|
||||
//Image Caption
|
||||
$this->add_control(
|
||||
'image_caption',
|
||||
[
|
||||
'label' => __( 'Image Caption', 'thinkai' ),
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'label_block' => true,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'default' => esc_html__( '1.5 Million Subscribers', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
//SubTitle
|
||||
$this->add_control(
|
||||
'subtitle',
|
||||
[
|
||||
'label' => __( 'Sub Title', 'thinkai' ),
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'label_block' => true,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'default' => esc_html__( '[ NEWSLETTER ]', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
//Title
|
||||
$this->add_control(
|
||||
'title',
|
||||
[
|
||||
'label' => __( 'Title', 'thinkai' ),
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'label_block' => true,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'default' => esc_html__( 'Don’t miss updates', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
//Text
|
||||
$this->add_control(
|
||||
'text',
|
||||
[
|
||||
'label' => __( 'Description', 'thinkai' ),
|
||||
'type' => Controls_Manager::TEXTAREA,
|
||||
'label_block' => true,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'default' => esc_html__( 'Latest news, AI models & fun memes from the community.', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
|
||||
//Mailchimp Form Url
|
||||
$this->add_control(
|
||||
'mailchimp_form_url',
|
||||
[
|
||||
'label' => __( 'MailChimp Form Url', 'thinkai' ),
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'label_block' => true,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'default' => esc_html__( 'MailChimp Form Url', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
$this->end_controls_section();
|
||||
}
|
||||
|
||||
/**
|
||||
* Render button widget output on the frontend.
|
||||
* Written in PHP and used to generate the final HTML.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*/
|
||||
protected function render() {
|
||||
$settings = $this->get_settings_for_display();
|
||||
$allowed_tags = wp_kses_allowed_html('post');
|
||||
$layout = $settings[ 'layout_control' ];
|
||||
?>
|
||||
|
||||
<?php if($layout == '2') : ?>
|
||||
|
||||
|
||||
<?php else: ?>
|
||||
|
||||
<!--Start Newsletter style1-->
|
||||
<section class="newsletter-style1">
|
||||
|
||||
<?php $features_list = $settings['features_list'];
|
||||
if(!empty($features_list)){
|
||||
$features_list = explode("\n", ($features_list));
|
||||
?>
|
||||
<!--Start Scrolling Text Style4-->
|
||||
<div class="scrolling-text-style4">
|
||||
<div class="inner">
|
||||
<ul class="clearfix marquee_mode">
|
||||
<?php foreach($features_list as $features): ?>
|
||||
<li data-hover="<?php echo wp_kses($features, true); ?>">
|
||||
<?php echo wp_kses($features, true); ?>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!--End Scrolling Text Style4-->
|
||||
<?php } ?>
|
||||
|
||||
<div class="newsletter-style1__bg"
|
||||
style="background-image: url(<?php echo esc_url(wp_get_attachment_url($settings['feature_image']['id'])); ?>);">
|
||||
<div class="text-box"><?php echo wp_kses($settings['image_caption'], true); ?></div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<div class="newsletter-style1__inner clearfix">
|
||||
<div class="newsletter-style1__content">
|
||||
<div class="title-box">
|
||||
<div class="sec-title sec-title-animation animation-style2">
|
||||
<div class="sub-title">
|
||||
<h4><?php echo wp_kses($settings['subtitle'], true); ?></h4>
|
||||
</div>
|
||||
<h2 class="title-animation"><?php echo wp_kses($settings['title'], true); ?></h2>
|
||||
</div>
|
||||
<p><?php echo wp_kses($settings['text'], true); ?></p>
|
||||
</div>
|
||||
|
||||
<?php echo do_shortcode($settings['mailchimp_form_url']); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!--End Newsletter style1-->
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
}
|
||||
}
|
||||
401
wp-content/plugins/thinkai-plugin/elementor/our_cases.php
Normal file
401
wp-content/plugins/thinkai-plugin/elementor/our_cases.php
Normal file
@@ -0,0 +1,401 @@
|
||||
<?php namespace THINKAIPLUGIN\Element;
|
||||
|
||||
use Elementor\Controls_Manager;
|
||||
use Elementor\Controls_Stack;
|
||||
use Elementor\Group_Control_Typography;
|
||||
use Elementor\Group_Control_Border;
|
||||
use Elementor\Repeater;
|
||||
use Elementor\Widget_Base;
|
||||
use Elementor\Utils;
|
||||
use Elementor\Group_Control_Text_Shadow;
|
||||
use \Elementor\Group_Control_Box_Shadow;
|
||||
use \Elementor\Group_Control_Background;
|
||||
use \Elementor\Group_Control_Image_Size;
|
||||
use \Elementor\Group_Control_Text_Stroke;
|
||||
use Elementor\Plugin;
|
||||
|
||||
/**
|
||||
* Elementor button widget.
|
||||
* Elementor widget that displays a button with the ability to control every
|
||||
* aspect of the button design.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class Our_Cases extends Widget_Base {
|
||||
|
||||
/**
|
||||
* Get widget name.
|
||||
* Retrieve button widget name.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget name.
|
||||
*/
|
||||
public function get_name() {
|
||||
return 'thinkai_our_cases';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget title.
|
||||
* Retrieve button widget title.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget title.
|
||||
*/
|
||||
public function get_title() {
|
||||
return esc_html__( 'Thinkai Our Cases', 'thinkai' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget icon.
|
||||
* Retrieve button widget icon.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget icon.
|
||||
*/
|
||||
public function get_icon() {
|
||||
return 'eicon-gallery-grid';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget categories.
|
||||
* Retrieve the list of categories the button widget belongs to.
|
||||
* Used to determine where to display the widget in the editor.
|
||||
*
|
||||
* @since 2.0.0
|
||||
* @access public
|
||||
* @return array Widget categories.
|
||||
*/
|
||||
public function get_categories() {
|
||||
return [ 'thinkai' ];
|
||||
}
|
||||
|
||||
/**
|
||||
* Register button widget controls.
|
||||
* Adds different input fields to allow the user to change and customize the widget settings.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*/
|
||||
protected function register_controls() {
|
||||
$this->start_controls_section(
|
||||
'our_cases',
|
||||
[
|
||||
'label' => esc_html__( 'Thinkai Our Cases', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
|
||||
//Layout
|
||||
$this->add_control(
|
||||
'layout_control',
|
||||
[
|
||||
'label' => esc_html__( 'Layout Style', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => '1',
|
||||
'options' => array(
|
||||
'1' => esc_html__( 'Style One ', 'thinkai'),
|
||||
'2' => esc_html__( 'Style Two ', 'thinkai'),
|
||||
),
|
||||
]
|
||||
);
|
||||
|
||||
//Banner Carousel Repeater
|
||||
$repeater = new Repeater();
|
||||
$repeater->add_control(
|
||||
'author_img',
|
||||
[
|
||||
'label' => __( 'Author Image', 'thinkai' ),
|
||||
'type' => Controls_Manager::MEDIA,
|
||||
'default' => ['url' => Utils::get_placeholder_image_src(),],
|
||||
]
|
||||
);
|
||||
$repeater->add_control(
|
||||
'author_subtitle',
|
||||
[
|
||||
'label' => __( 'Author Sub Title', 'thinkai' ),
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'label_block' => true,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'placeholder' => __( 'Enter your subtitle', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
$repeater->add_control(
|
||||
'author_title',
|
||||
[
|
||||
'label' => __( 'Author Title', 'thinkai' ),
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'label_block' => true,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'placeholder' => __( 'Enter your author title', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
//Icon
|
||||
$repeater->add_control(
|
||||
'icon',
|
||||
[
|
||||
'label' => esc_html__('Enter The icons', 'thinkai'),
|
||||
'type' => \Elementor\Controls_Manager::ICONS,
|
||||
'default' => [
|
||||
'value' => 'icon-graduation',
|
||||
'library' => 'solid',
|
||||
],
|
||||
]
|
||||
);
|
||||
$repeater->add_control(
|
||||
'category_title',
|
||||
[
|
||||
'label' => __( 'Category Title', 'thinkai' ),
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'label_block' => true,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'placeholder' => __( 'Enter your category title', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
$repeater->add_control(
|
||||
'category_link',
|
||||
[
|
||||
'label' => __( 'Category Link', 'thinkai' ),
|
||||
'type' => Controls_Manager::URL,
|
||||
'label_block' => true,
|
||||
'placeholder' => __( 'https://your-link.com', 'thinkai' ),
|
||||
'show_external' => true,
|
||||
'default' => [
|
||||
'url' => '',
|
||||
'is_external' => true,
|
||||
'nofollow' => true,
|
||||
],
|
||||
]
|
||||
);
|
||||
//Button Title
|
||||
$repeater->add_control(
|
||||
'btn_title',
|
||||
[
|
||||
'label' => __( 'Button Title', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'default' => esc_html__( 'Read More', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
$repeater->add_control(
|
||||
'link_option',
|
||||
[
|
||||
'label' => esc_html__( 'Select link Option', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'extranal',
|
||||
'options' => array(
|
||||
'extranal' => esc_html__( 'Extranal ', 'thinkai'),
|
||||
'page' => esc_html__( 'Page ', 'thinkai'),
|
||||
),
|
||||
]
|
||||
);
|
||||
$repeater->add_control(
|
||||
'link',
|
||||
[
|
||||
'label' => __( 'External Link', 'thinkai' ),
|
||||
'type' => Controls_Manager::URL,
|
||||
'label_block' => true,
|
||||
'placeholder' => __( 'https://your-link.com', 'thinkai' ),
|
||||
'show_external' => true,
|
||||
'default' => [
|
||||
'url' => '',
|
||||
'is_external' => true,
|
||||
'nofollow' => true,
|
||||
],
|
||||
'condition' => [
|
||||
'link_option' => 'extranal',
|
||||
]
|
||||
]
|
||||
);
|
||||
$repeater->add_control(
|
||||
'page_select',
|
||||
[
|
||||
'label' => esc_html__( 'Select Page', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::SELECT2,
|
||||
'default' => 'extranal',
|
||||
'options' => thinkai_page_list(),
|
||||
'condition' => [
|
||||
'link_option' => 'page',
|
||||
]
|
||||
]
|
||||
);
|
||||
$repeater->add_control(
|
||||
'feature_img',
|
||||
[
|
||||
'label' => __( 'Feature Image', 'thinkai' ),
|
||||
'type' => Controls_Manager::MEDIA,
|
||||
'default' => ['url' => Utils::get_placeholder_image_src(),],
|
||||
]
|
||||
);
|
||||
//Title
|
||||
$repeater->add_control(
|
||||
'title',
|
||||
[
|
||||
'label' => __( 'Title', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::TEXTAREA,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'placeholder' => __( 'Enter your Title', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'cases',
|
||||
[
|
||||
'label' => __('Add Case Item', 'thinkai'),
|
||||
'type' => Controls_Manager::REPEATER,
|
||||
'fields' => $repeater->get_controls(),
|
||||
'title_field' => '{{{ author_title }}}',
|
||||
'default' => [
|
||||
[
|
||||
'author_subtitle' => esc_html__( 'Voice by', 'thinkai' ),
|
||||
'author_title' => esc_html__( 'Evelyn Scarlett', 'thinkai' ),
|
||||
'category_title' => esc_html__( 'Education', 'thinkai' ),
|
||||
'category_link' => esc_html__( '#', 'thinkai' ),
|
||||
'btn_title' => esc_html__( 'Read More', 'thinkai' ),
|
||||
'btn_link' => esc_html__( '#', 'thinkai' ),
|
||||
'title' => esc_html__( 'Create Education Content now Using ThinkAi', 'thinkai' ),
|
||||
],
|
||||
[
|
||||
'author_subtitle' => esc_html__( 'Voice by', 'thinkai' ),
|
||||
'author_title' => esc_html__( 'Richard Frederick', 'thinkai' ),
|
||||
'category_title' => esc_html__( 'Youtube Videos', 'thinkai' ),
|
||||
'category_link' => esc_html__( '#', 'thinkai' ),
|
||||
'btn_title' => esc_html__( 'Read More', 'thinkai' ),
|
||||
'btn_link' => esc_html__( '#', 'thinkai' ),
|
||||
'title' => esc_html__( 'Simplify the Narration Process of your YouTube Videos', 'thinkai' ),
|
||||
],
|
||||
[
|
||||
'author_subtitle' => esc_html__( 'Voice by', 'thinkai' ),
|
||||
'author_title' => esc_html__( 'Rowan Grayson', 'thinkai' ),
|
||||
'category_title' => esc_html__( 'Advertisement', 'thinkai' ),
|
||||
'category_link' => esc_html__( '#', 'thinkai' ),
|
||||
'btn_title' => esc_html__( 'Read More', 'thinkai' ),
|
||||
'btn_link' => esc_html__( '#', 'thinkai' ),
|
||||
'title' => esc_html__( 'Create Engaging & Persuasive Advertisements', 'thinkai' ),
|
||||
],
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->end_controls_section();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Render button widget output on the frontend.
|
||||
* Written in PHP and used to generate the final HTML.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*/
|
||||
protected function render() {
|
||||
$settings = $this->get_settings_for_display();
|
||||
$allowed_tags = wp_kses_allowed_html('post');
|
||||
?>
|
||||
|
||||
<?php if($settings['layout_control'] == '3') :?>
|
||||
|
||||
|
||||
<?php elseif($settings['layout_control'] == '2') :?>
|
||||
|
||||
|
||||
<?php else: ?>
|
||||
|
||||
<!--Start Cases Style1 -->
|
||||
<section class="cases-style1 p-0 m-0">
|
||||
<div class="container">
|
||||
<ul class="row">
|
||||
<?php
|
||||
foreach($settings['cases'] as $key => $items):
|
||||
$icon = $items['icon'];
|
||||
$page = $items['link_option'];
|
||||
$page_select = $items[ 'page_select' ];
|
||||
$ext_url = $items[ 'link' ];
|
||||
|
||||
if( $page == 'page' ){
|
||||
$mount_link = get_page_link( $page_select );
|
||||
}else{
|
||||
$mount_link = $ext_url['url'];
|
||||
$target = $ext_url['is_external'] ? ' target="_blank"' : '';
|
||||
$nofollow = $ext_url['nofollow'] ? ' rel="nofollow"' : '';
|
||||
}
|
||||
?>
|
||||
<!--Start Cases Style1 Single-->
|
||||
<li class="col-xl-4 col-lg-4">
|
||||
<div class="cases-style1__single">
|
||||
<div class="cases-style1__single-inner">
|
||||
<div class="cases-style1__single-top">
|
||||
<div class="author-box">
|
||||
<?php if($items['author_img']){ ?>
|
||||
<div class="img-box">
|
||||
<img src="<?php echo esc_url(wp_get_attachment_url($items['author_img']['id'])); ?>" alt="<?php bloginfo( 'name' ); ?>">
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="text-box">
|
||||
<p><?php echo wp_kses($items['author_subtitle'], true);?></p>
|
||||
<h4><?php echo wp_kses($items['author_title'], true);?></h4>
|
||||
</div>
|
||||
</div>
|
||||
<div class="category-box">
|
||||
<div class="text">
|
||||
<p>
|
||||
<?php if($icon){ ?>
|
||||
<?php
|
||||
$icon = str_replace( "icon ", "", $items['icon']);
|
||||
if( !empty( $icon ) ):?>
|
||||
<?php \Elementor\Icons_Manager::render_icon( $icon ); ?>
|
||||
<?php else:?>
|
||||
<span class="icon-graduation"></span>
|
||||
<?php endif; }?>
|
||||
<a href="<?php echo esc_url($items['category_link']['url']);?>"><?php echo wp_kses($items['category_title'], true);?></a>
|
||||
</p>
|
||||
</div>
|
||||
<?php ?>
|
||||
|
||||
<?php if($items['btn_title']){ ?>
|
||||
<div class="btn-box">
|
||||
<a href="<?php echo esc_url( $mount_link );?>" <?php if( $page == 'extranal' ) echo esc_attr( $target );?> <?php if( $page == 'extranal' ) echo esc_attr( $nofollow );?>>
|
||||
<i class="icon-arrow-upper-right"></i>
|
||||
<span class="txt"><?php echo wp_kses($items['btn_title'], true);?></span>
|
||||
</a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cases-style1__single-img">
|
||||
<img src="<?php echo esc_url(wp_get_attachment_url($items['feature_img']['id'])); ?>" alt="<?php bloginfo( 'name' ); ?>">
|
||||
</div>
|
||||
<div class="cases-style1__single-title">
|
||||
<h2>
|
||||
<a href="<?php echo esc_url( $mount_link );?>" <?php if( $page == 'extranal' ) echo esc_attr( $target );?> <?php if( $page == 'extranal' ) echo esc_attr( $nofollow );?>><?php echo wp_kses($items['title'], true);?></a>
|
||||
</h2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<!--End Cases Style1 Single-->
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
<!--End Cases Style1 -->
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
}
|
||||
}
|
||||
1103
wp-content/plugins/thinkai-plugin/elementor/pricing_plan.php
Normal file
1103
wp-content/plugins/thinkai-plugin/elementor/pricing_plan.php
Normal file
File diff suppressed because it is too large
Load Diff
223
wp-content/plugins/thinkai-plugin/elementor/project_card.php
Normal file
223
wp-content/plugins/thinkai-plugin/elementor/project_card.php
Normal file
@@ -0,0 +1,223 @@
|
||||
<?php namespace THINKAIPLUGIN\Element;
|
||||
|
||||
use Elementor\Controls_Manager;
|
||||
use Elementor\Controls_Stack;
|
||||
use Elementor\Group_Control_Typography;
|
||||
use Elementor\Group_Control_Border;
|
||||
use Elementor\Repeater;
|
||||
use Elementor\Widget_Base;
|
||||
use Elementor\Utils;
|
||||
use Elementor\Group_Control_Text_Shadow;
|
||||
use \Elementor\Group_Control_Box_Shadow;
|
||||
use \Elementor\Group_Control_Background;
|
||||
use \Elementor\Group_Control_Image_Size;
|
||||
use \Elementor\Group_Control_Text_Stroke;
|
||||
use Elementor\Plugin;
|
||||
|
||||
/**
|
||||
* Elementor button widget.
|
||||
* Elementor widget that displays a button with the ability to control every
|
||||
* aspect of the button design.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class Project_Card extends Widget_Base {
|
||||
|
||||
/**
|
||||
* Get widget name.
|
||||
* Retrieve button widget name.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget name.
|
||||
*/
|
||||
public function get_name() {
|
||||
return 'thinkai_project_card';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget title.
|
||||
* Retrieve button widget title.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget title.
|
||||
*/
|
||||
public function get_title() {
|
||||
return esc_html__( 'Thinkai Project Card', 'thinkai' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget icon.
|
||||
* Retrieve button widget icon.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget icon.
|
||||
*/
|
||||
public function get_icon() {
|
||||
return 'eicon-gallery-grid';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget categories.
|
||||
* Retrieve the list of categories the button widget belongs to.
|
||||
* Used to determine where to display the widget in the editor.
|
||||
*
|
||||
* @since 2.0.0
|
||||
* @access public
|
||||
* @return array Widget categories.
|
||||
*/
|
||||
public function get_categories() {
|
||||
return [ 'thinkai' ];
|
||||
}
|
||||
|
||||
/**
|
||||
* Register button widget controls.
|
||||
* Adds different input fields to allow the user to change and customize the widget settings.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*/
|
||||
protected function register_controls() {
|
||||
$this->start_controls_section(
|
||||
'project_card',
|
||||
[
|
||||
'label' => esc_html__( 'Thinkai Project Card', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
|
||||
//BG Image
|
||||
$this->add_control(
|
||||
'feature_image',
|
||||
[
|
||||
'label' => __( 'Feature Image Url', 'thinkai' ),
|
||||
'type' => Controls_Manager::MEDIA,
|
||||
'default' => ['url' => Utils::get_placeholder_image_src(),],
|
||||
]
|
||||
);
|
||||
//Title
|
||||
$this->add_control(
|
||||
'title',
|
||||
[
|
||||
'label' => __( 'Title', 'thinkai' ),
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'label_block' => true,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'default' => esc_html__( 'Image Generator', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
//Text
|
||||
$this->add_control(
|
||||
'text',
|
||||
[
|
||||
'label' => __( 'Description', 'thinkai' ),
|
||||
'type' => Controls_Manager::TEXTAREA,
|
||||
'label_block' => true,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'default' => esc_html__( 'Convert text to image.', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
//External Link
|
||||
$this->add_control(
|
||||
'link_option',
|
||||
[
|
||||
'label' => esc_html__( 'Select link Option', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'extranal',
|
||||
'options' => array(
|
||||
'extranal' => esc_html__( 'Extranal ', 'thinkai'),
|
||||
'page' => esc_html__( 'Page ', 'thinkai'),
|
||||
),
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'link',
|
||||
[
|
||||
'label' => __( 'External Link', 'thinkai' ),
|
||||
'type' => Controls_Manager::URL,
|
||||
'label_block' => true,
|
||||
'placeholder' => __( 'https://your-link.com', 'thinkai' ),
|
||||
'show_external' => true,
|
||||
'default' => [
|
||||
'url' => '',
|
||||
'is_external' => true,
|
||||
'nofollow' => true,
|
||||
],
|
||||
'condition' => [
|
||||
'link_option' => 'extranal'
|
||||
]
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'page_select',
|
||||
[
|
||||
'label' => esc_html__( 'Select Page', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::SELECT2,
|
||||
'default' => 'extranal',
|
||||
'options' => thinkai_page_list(),
|
||||
'condition' => [
|
||||
'link_option' => 'page'
|
||||
]
|
||||
]
|
||||
);
|
||||
$this->end_controls_section();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Render button widget output on the frontend.
|
||||
* Written in PHP and used to generate the final HTML.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*/
|
||||
protected function render() {
|
||||
$settings = $this->get_settings_for_display();
|
||||
$allowed_tags = wp_kses_allowed_html('post');
|
||||
|
||||
$page = $settings['link_option'];
|
||||
$page_select = $settings[ 'page_select' ];
|
||||
$ext_url = $settings[ 'link' ];
|
||||
|
||||
if( $page == 'page' ){
|
||||
$mount_link = get_page_link( $page_select );
|
||||
}else{
|
||||
$mount_link = $ext_url['url'];
|
||||
$target = $ext_url['is_external'] ? ' target="_blank"' : '';
|
||||
$nofollow = $ext_url['nofollow'] ? ' rel="nofollow"' : '';
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="cases-style3__single">
|
||||
<div class="cases-style3__single-img">
|
||||
<div class="inner">
|
||||
<img src="<?php echo esc_url(wp_get_attachment_url($settings['feature_image']['id'])); ?>" alt="<?php bloginfo( 'name' ); ?>">
|
||||
<div class="overlay-text-box">
|
||||
<p>
|
||||
<?php echo wp_kses($settings['text'], true); ?>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="overlay-box">
|
||||
<div class="title-box">
|
||||
<h3><?php echo wp_kses($settings['title'], true); ?></h3>
|
||||
</div>
|
||||
<div class="btn-box">
|
||||
<a class="lightbox-image" data-fancybox="gallery" href="<?php echo esc_url(wp_get_attachment_url($settings['feature_image']['id'])); ?>">
|
||||
<span class="icon-right-arrow1"></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
}
|
||||
}
|
||||
369
wp-content/plugins/thinkai-plugin/elementor/project_masonry.php
Normal file
369
wp-content/plugins/thinkai-plugin/elementor/project_masonry.php
Normal file
@@ -0,0 +1,369 @@
|
||||
<?php namespace THINKAIPLUGIN\Element;
|
||||
|
||||
use Elementor\Controls_Manager;
|
||||
use Elementor\Controls_Stack;
|
||||
use Elementor\Group_Control_Typography;
|
||||
use Elementor\Group_Control_Border;
|
||||
use Elementor\Repeater;
|
||||
use Elementor\Widget_Base;
|
||||
use Elementor\Utils;
|
||||
use Elementor\Group_Control_Text_Shadow;
|
||||
use \Elementor\Group_Control_Box_Shadow;
|
||||
use \Elementor\Group_Control_Background;
|
||||
use \Elementor\Group_Control_Image_Size;
|
||||
use \Elementor\Group_Control_Text_Stroke;
|
||||
use Elementor\Plugin;
|
||||
|
||||
/**
|
||||
* Elementor button widget.
|
||||
* Elementor widget that displays a button with the ability to control every
|
||||
* aspect of the button design.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class Project_Masonry extends Widget_Base {
|
||||
|
||||
/**
|
||||
* Get widget name.
|
||||
* Retrieve button widget name.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget name.
|
||||
*/
|
||||
public function get_name() {
|
||||
return 'thinkai_project_masonry';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget title.
|
||||
* Retrieve button widget title.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget title.
|
||||
*/
|
||||
public function get_title() {
|
||||
return esc_html__( 'Thinkai Project Masonry', 'thinkai' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget icon.
|
||||
* Retrieve button widget icon.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget icon.
|
||||
*/
|
||||
public function get_icon() {
|
||||
return 'eicon-banner';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget categories.
|
||||
* Retrieve the list of categories the button widget belongs to.
|
||||
* Used to determine where to display the widget in the editor.
|
||||
*
|
||||
* @since 2.0.0
|
||||
* @access public
|
||||
* @return array Widget categories.
|
||||
*/
|
||||
public function get_categories() {
|
||||
return [ 'thinkai' ];
|
||||
}
|
||||
|
||||
/**
|
||||
* Register button widget controls.
|
||||
* Adds different input fields to allow the user to change and customize the widget settings.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*/
|
||||
protected function register_controls() {
|
||||
$this->start_controls_section(
|
||||
'project_masonry',
|
||||
[
|
||||
'label' => esc_html__( 'Thinkai Project Masonry', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'layout_control',
|
||||
[
|
||||
'label' => esc_html__( 'Layout Style', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => '1',
|
||||
'options' => array(
|
||||
'1' => esc_html__( 'Style One ', 'thinkai'),
|
||||
'2' => esc_html__( 'Style Two ', 'thinkai'),
|
||||
),
|
||||
]
|
||||
);
|
||||
|
||||
//Shape Image
|
||||
$this->add_control(
|
||||
'shape_image',
|
||||
[
|
||||
'label' => esc_html__( 'BG Shape Image', 'thinkai' ),
|
||||
'type' => Controls_Manager::MEDIA,
|
||||
'default' => [
|
||||
'url' => Utils::get_placeholder_image_src(),
|
||||
],
|
||||
'condition' => [
|
||||
'layout_control' => '2',
|
||||
]
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'subtitle',
|
||||
[
|
||||
'label' => __( 'Sub Title', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'default' => esc_html__( '[ CASE STUDIES ]', 'thinkai' ),
|
||||
'condition' => [
|
||||
'layout_control' => '2',
|
||||
]
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'title',
|
||||
[
|
||||
'label' => __( 'Title', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'default' => esc_html__( 'Explore latest cases', 'thinkai' ),
|
||||
'condition' => [
|
||||
'layout_control' => '2',
|
||||
]
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'query_number',
|
||||
[
|
||||
'label' => esc_html__( 'Number of post', 'thinkai' ),
|
||||
'type' => Controls_Manager::NUMBER,
|
||||
'default' => 3,
|
||||
'min' => 1,
|
||||
'max' => 100,
|
||||
'step' => 1,
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'query_orderby',
|
||||
[
|
||||
'label' => esc_html__( 'Order By', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'date',
|
||||
'options' => array(
|
||||
'date' => esc_html__( 'Date', 'thinkai' ),
|
||||
'title' => esc_html__( 'Title', 'thinkai' ),
|
||||
'menu_order' => esc_html__( 'Menu Order', 'thinkai' ),
|
||||
'rand' => esc_html__( 'Random', 'thinkai' ),
|
||||
),
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'query_order',
|
||||
[
|
||||
'label' => esc_html__( 'Order', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'DESC',
|
||||
'options' => array(
|
||||
'DESC' => esc_html__( 'DESC', 'thinkai' ),
|
||||
'ASC' => esc_html__( 'ASC', 'thinkai' ),
|
||||
),
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'query_category',
|
||||
[
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'label' => esc_html__('Category', 'thinkai'),
|
||||
'label_block' => true,
|
||||
'options' => get_project_categories()
|
||||
]
|
||||
);
|
||||
$this->end_controls_section();
|
||||
}
|
||||
|
||||
/**
|
||||
* Render button widget output on the frontend.
|
||||
* Written in PHP and used to generate the final HTML.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*/
|
||||
protected function render() {
|
||||
$settings = $this->get_settings_for_display();
|
||||
$allowed_tags = wp_kses_allowed_html('post');
|
||||
$layout = $settings[ 'layout_control' ];
|
||||
|
||||
$paged = get_query_var('paged');
|
||||
$paged = thinkai_set($_REQUEST, 'paged') ? esc_attr($_REQUEST['paged']) : $paged;
|
||||
|
||||
$this->add_render_attribute( 'wrapper', 'class', 'templatepath-thinkai' );
|
||||
$args = array(
|
||||
'post_type' => 'project',
|
||||
'posts_per_page' => thinkai_set( $settings, 'query_number' ),
|
||||
'orderby' => thinkai_set( $settings, 'query_orderby' ),
|
||||
'order' => thinkai_set( $settings, 'query_order' ),
|
||||
'paged' => $paged
|
||||
);
|
||||
|
||||
if( thinkai_set( $settings, 'query_category' ) ) $args['project_cat'] = thinkai_set( $settings, 'query_category' );
|
||||
$query = new \WP_Query( $args );
|
||||
|
||||
if ( $query->have_posts() ) {
|
||||
$dimention = get_post_meta( get_the_id(), 'dimension', true );
|
||||
?>
|
||||
|
||||
<?php if( $layout === '2' ): ?>
|
||||
|
||||
<!--Start Case style2-->
|
||||
<section class="case-style2">
|
||||
<?php if($settings['shape_image']){ ?>
|
||||
<div class="case-style2__shape1">
|
||||
<img src="<?php echo esc_url(wp_get_attachment_url($settings['shape_image']['id'])); ?>" alt="<?php bloginfo( 'name' ); ?>">
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="container">
|
||||
<?php if($settings['subtitle'] || $settings['title']){ ?>
|
||||
<div class="sec-title text-center sec-title-animation animation-style2">
|
||||
<?php if($settings['subtitle']){ ?>
|
||||
<div class="sub-title">
|
||||
<h4><?php echo wp_kses($settings['subtitle'], true); ?></h4>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if($settings['title']){ ?>
|
||||
<h2 class="title-animation"><?php echo wp_kses($settings['title'], true); ?></h2>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="row masonary-layout">
|
||||
<?php
|
||||
global $post;
|
||||
while ( $query->have_posts() ) : $query->the_post();
|
||||
$term_list = wp_get_post_terms(get_the_id(), 'project_cat', array("fields" => "names"));
|
||||
$post_thumbnail_id = get_post_thumbnail_id($post->ID);
|
||||
$post_thumbnail_url = wp_get_attachment_url($post_thumbnail_id);
|
||||
?>
|
||||
<!--Start Single Case style2-->
|
||||
<div class="col-xl-4 col-lg-6 col-md-6">
|
||||
<div class="case-style2__single <?php if(get_post_meta( get_the_id(), 'dimension', true) == 'extra_height') echo 'height'; else echo ' '?>">
|
||||
<div class="case-style2__single-img">
|
||||
<div class="inner">
|
||||
<?php
|
||||
$dimention = get_post_meta( get_the_id(), 'dimension', true );
|
||||
if($dimention == 'extra_height'){
|
||||
$image_size = 'thinkai_370x370';
|
||||
} else{
|
||||
$image_size = 'thinkai_370x270';
|
||||
} the_post_thumbnail($image_size);
|
||||
?>
|
||||
</div>
|
||||
<div class="case-style2__single-overlay-icon">
|
||||
<a class="lightbox-image" data-fancybox="gallery" href="<?php echo esc_url($post_thumbnail_url); ?>"><span class="icon-right-arrow1"></span></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="case-style2__single-content text-center">
|
||||
<h3><?php the_title(); ?></h3>
|
||||
<p><?php echo implode( ', ', (array)$term_list );?></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--End Single Case style2-->
|
||||
<?php endwhile; ?>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!--End Case style2-->
|
||||
|
||||
<?php else: ?>
|
||||
|
||||
<!--Start Project Style1-->
|
||||
<section class="project-style1 p-0 m-0">
|
||||
<div class="auto-container">
|
||||
<div class="project-style1__inner ">
|
||||
<ul class="clearfix masonry-items-container">
|
||||
<?php
|
||||
global $post;
|
||||
while ( $query->have_posts() ) : $query->the_post();
|
||||
$term_list = wp_get_post_terms(get_the_id(), 'project_cat', array("fields" => "names"));
|
||||
$post_thumbnail_id = get_post_thumbnail_id($post->ID);
|
||||
$post_thumbnail_url = wp_get_attachment_url($post_thumbnail_id);
|
||||
$ext_link = get_post_meta( get_the_id(), 'project_ext_link', true);
|
||||
?>
|
||||
<li class="masonry-item <?php if(get_post_meta( get_the_id(), 'dimension', true) == 'extra_width') echo 'gallery-item width40'; elseif(get_post_meta( get_the_id(), 'dimension', true) == 'extra_height') echo 'gallery-item extra-height'; else echo 'gallery-item'?>">
|
||||
<div class="project-style1__single">
|
||||
<div class="project-style1__single-img">
|
||||
<div class="inner">
|
||||
<?php
|
||||
$dimention = get_post_meta( get_the_id(), 'dimension', true );
|
||||
if($dimention == 'extra_width'){
|
||||
$image_size = 'thinkai_730x295';
|
||||
} elseif($dimention == 'extra_height'){
|
||||
$image_size = 'thinkai_350x620';
|
||||
} elseif($dimention == 'normal_height'){
|
||||
$image_size = 'thinkai_350x295';
|
||||
} else{
|
||||
$image_size = 'full';
|
||||
} the_post_thumbnail( $image_size );
|
||||
?>
|
||||
<div class="overlay-img">
|
||||
<?php
|
||||
$dimention = get_post_meta( get_the_id(), 'dimension', true );
|
||||
if($dimention == 'extra_width'){
|
||||
$image_size = 'thinkai_730x295';
|
||||
} elseif($dimention == 'extra_height'){
|
||||
$image_size = 'thinkai_350x620';
|
||||
} elseif($dimention == 'normal_height'){
|
||||
$image_size = 'thinkai_350x295';
|
||||
} else{
|
||||
$image_size = 'full';
|
||||
} the_post_thumbnail( $image_size );
|
||||
?>
|
||||
</div>
|
||||
<div class="overlay-box">
|
||||
<a class="lightbox-image" data-fancybox="gallery" href="<?php echo esc_url($post_thumbnail_url); ?>">
|
||||
<span class="icon-right-arrow1"></span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-box">
|
||||
<div class="icon-box">
|
||||
<span class="icon-abstract-shape-1"></span>
|
||||
</div>
|
||||
<p><?php echo wp_kses( get_post_meta( get_the_id(), 'project_designation', true), true); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="project-style1__single-content">
|
||||
<h3><a href="<?php echo esc_url( $ext_link ); ?>"><?php the_title(); ?></a></h3>
|
||||
<p><?php echo implode( ', ', (array)$term_list );?></p>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<?php endwhile; ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!--Start Project Style1-->
|
||||
<?php endif; ?>
|
||||
|
||||
<?php }
|
||||
wp_reset_postdata();
|
||||
}
|
||||
|
||||
}
|
||||
1007
wp-content/plugins/thinkai-plugin/elementor/service_card.php
Normal file
1007
wp-content/plugins/thinkai-plugin/elementor/service_card.php
Normal file
File diff suppressed because it is too large
Load Diff
265
wp-content/plugins/thinkai-plugin/elementor/team_grid.php
Normal file
265
wp-content/plugins/thinkai-plugin/elementor/team_grid.php
Normal file
@@ -0,0 +1,265 @@
|
||||
<?php namespace THINKAIPLUGIN\Element;
|
||||
|
||||
use Elementor\Controls_Manager;
|
||||
use Elementor\Controls_Stack;
|
||||
use Elementor\Group_Control_Typography;
|
||||
use Elementor\Group_Control_Border;
|
||||
use Elementor\Repeater;
|
||||
use Elementor\Widget_Base;
|
||||
use Elementor\Utils;
|
||||
use Elementor\Group_Control_Text_Shadow;
|
||||
use \Elementor\Group_Control_Box_Shadow;
|
||||
use \Elementor\Group_Control_Background;
|
||||
use \Elementor\Group_Control_Text_Stroke;
|
||||
use Elementor\Plugin;
|
||||
/**
|
||||
* Elementor button widget.
|
||||
* Elementor widget that displays a button with the ability to control every
|
||||
* aspect of the button design.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class Team_Grid extends Widget_Base {
|
||||
/**
|
||||
* Get widget name.
|
||||
* Retrieve button widget name.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget name.
|
||||
*/
|
||||
public function get_name() {
|
||||
return 'thinkai_team_grid';
|
||||
}
|
||||
/**
|
||||
* Get widget title.
|
||||
* Retrieve button widget title.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget title.
|
||||
*/
|
||||
public function get_title() {
|
||||
return esc_html__( 'Thinkai Team Grid', 'thinkai' );
|
||||
}
|
||||
/**
|
||||
* Get widget icon.
|
||||
* Retrieve button widget icon.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget icon.
|
||||
*/
|
||||
public function get_icon() {
|
||||
return 'eicon-gallery-grid';
|
||||
}
|
||||
/**
|
||||
* Get widget categories.
|
||||
* Retrieve the list of categories the button widget belongs to.
|
||||
* Used to determine where to display the widget in the editor.
|
||||
*
|
||||
* @since 2.0.0
|
||||
* @access public
|
||||
* @return array Widget categories.
|
||||
*/
|
||||
public function get_categories() {
|
||||
return [ 'thinkai' ];
|
||||
}
|
||||
/**
|
||||
* Register button widget controls.
|
||||
* Adds different input fields to allow the user to change and customize the widget settings.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*/
|
||||
protected function register_controls() {
|
||||
$this->start_controls_section(
|
||||
'team_grid',
|
||||
[
|
||||
'label' => esc_html__( 'Thinkai Team Grid', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'col_grid',
|
||||
[
|
||||
'label' => esc_html__( 'Choose Column', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'default',
|
||||
'options' => array(
|
||||
'default' => esc_html__( 'Default', 'thinkai' ),
|
||||
'one' => esc_html__( 'One Column Grid ', 'thinkai'),
|
||||
'two' => esc_html__( 'Two Column Grid', 'thinkai' ),
|
||||
'three' => esc_html__( 'Three Column Grid', 'thinkai' ),
|
||||
'four' => esc_html__( 'Four Column Grid', 'thinkai' ),
|
||||
'five' => esc_html__( 'Six Column Grid', 'thinkai' ),
|
||||
),
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'query_number',
|
||||
[
|
||||
'label' => esc_html__( 'Number of post', 'thinkai' ),
|
||||
'type' => Controls_Manager::NUMBER,
|
||||
'default' => 5,
|
||||
'min' => 1,
|
||||
'max' => 100,
|
||||
'step' => 1,
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'query_orderby',
|
||||
[
|
||||
'label' => esc_html__( 'Order By', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'date',
|
||||
'options' => array(
|
||||
'date' => esc_html__( 'Date', 'thinkai' ),
|
||||
'title' => esc_html__( 'Title', 'thinkai' ),
|
||||
'menu_order' => esc_html__( 'Menu Order', 'thinkai' ),
|
||||
'rand' => esc_html__( 'Random', 'thinkai' ),
|
||||
),
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'query_order',
|
||||
[
|
||||
'label' => esc_html__( 'Order', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'ASC',
|
||||
'options' => array(
|
||||
'DESC' => esc_html__( 'DESC', 'thinkai' ),
|
||||
'ASC' => esc_html__( 'ASC', 'thinkai' ),
|
||||
),
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'query_category',
|
||||
[
|
||||
'type' => Controls_Manager::SELECT2,
|
||||
'label' => esc_html__('Category', 'thinkai'),
|
||||
'multiple' => true,
|
||||
'label_block' => true,
|
||||
'options' => get_team_categories()
|
||||
]
|
||||
);
|
||||
//Button Title
|
||||
$this->add_control(
|
||||
'btn_title',
|
||||
[
|
||||
'label' => esc_html__( 'Button Title', 'thinkai' ),
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'label_block' => true,
|
||||
'placeholder' => esc_html__( 'Enter button title', 'thinkai' ),
|
||||
'default' => esc_html__( 'Read More', 'financer' ),
|
||||
]
|
||||
);
|
||||
$this->end_controls_section();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Render button widget output on the frontend.
|
||||
* Written in PHP and used to generate the final HTML.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*/
|
||||
protected function render() {
|
||||
$settings = $this->get_settings_for_display();
|
||||
$allowed_tags = wp_kses_allowed_html('post');
|
||||
$btn_title = $settings[ 'btn_title' ];
|
||||
|
||||
$grid_col = $settings[ 'col_grid' ];
|
||||
if( $grid_col == 'one' ){
|
||||
$classes = 'col-xl-12 col-lg-12 col-md-12 col-sm-12';
|
||||
}elseif( $grid_col == 'two' ){
|
||||
$classes = 'col-xl-6 col-lg-6 col-md-6 col-sm-12';
|
||||
}elseif( $grid_col == 'three' ){
|
||||
$classes = 'col-xl-4 col-lg-4 col-md-6 col-sm-12';
|
||||
}elseif( $grid_col == 'four' ){
|
||||
$classes = 'col-xl-3 col-lg-3 col-md-6 col-sm-12';
|
||||
}elseif( $grid_col == 'five' ){
|
||||
$classes = 'col-xl-2 col-lg-2 col-md-6 col-sm-12';
|
||||
}else{
|
||||
$classes = 'col-xl-4 col-lg-4 col-md-6 col-sm-12';
|
||||
}
|
||||
|
||||
$paged = get_query_var('paged');
|
||||
$paged = thinkai_set($_REQUEST, 'paged') ? esc_attr($_REQUEST['paged']) : $paged;
|
||||
|
||||
$this->add_render_attribute( 'wrapper', 'class', 'templatepath-greenture' );
|
||||
|
||||
$args = array(
|
||||
'post_type' => 'team',
|
||||
'posts_per_page' => thinkai_set( $settings, 'query_number' ),
|
||||
'orderby' => thinkai_set( $settings, 'query_orderby' ),
|
||||
'order' => thinkai_set( $settings, 'query_order' ),
|
||||
'paged' => $paged
|
||||
);
|
||||
if( thinkai_set( $settings, 'query_category' ) ) $args['team_cat'] = thinkai_set( $settings, 'query_category' );
|
||||
$query = new \WP_Query( $args );
|
||||
|
||||
if ( $query->have_posts() )
|
||||
{ ?>
|
||||
|
||||
<!--Start Team Style1 -->
|
||||
<div class="team-style1 p-0 m-0">
|
||||
<div class="row">
|
||||
<?php
|
||||
while ( $query->have_posts() ) : $query->the_post();
|
||||
$team_overlay_image = get_post_meta(get_the_id(), 'team_overlay_image', true);
|
||||
?>
|
||||
<!--Start Team Style1 Single-->
|
||||
<div class="<?php echo esc_attr( $classes );?>">
|
||||
<div class="team-style1__single">
|
||||
<div class="team-style1__single-img">
|
||||
<div class="inner">
|
||||
<?php if( !empty( $team_overlay_image['id']) ){ ?>
|
||||
<img src="<?php echo (wp_get_attachment_url($team_overlay_image['id']));?>" alt="<?php bloginfo( 'name' ); ?>">
|
||||
<?php } ?>
|
||||
<?php the_post_thumbnail('thinkai_370x420'); ?>
|
||||
<div class="overlay-content">
|
||||
<h2><a href="<?php echo esc_url( get_the_permalink( get_the_id() ) );?>"><?php the_title(); ?></a></h2>
|
||||
</div>
|
||||
<div class="text-box">
|
||||
<p><?php echo (get_post_meta( get_the_id(), 'designation', true ));?></p>
|
||||
<div class="btn-box">
|
||||
<a href="<?php echo esc_url( get_the_permalink( get_the_id() ) );?>"><span class="icon-right-arrow1"></span>
|
||||
<?php if( !empty( $btn_title ) ):?>
|
||||
<?php echo wp_kses( $btn_title, true );?>
|
||||
<?php else:?>
|
||||
<?php esc_html_e('Read more', 'banqix');?>
|
||||
<?php endif;?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
$icons = get_post_meta(get_the_id(), 'social_media_tabs', true); if ($icons) :
|
||||
?>
|
||||
<div class="social-links">
|
||||
<?php
|
||||
for ( $i=0; $i < count( $icons['select_social_media'] ); $i++ ) {
|
||||
$social_icon = ( isset( $icons['select_social_media'][$i] ) && !empty( $icons['select_social_media'][$i] ) ) ? $icons['select_social_media'][$i] : '';
|
||||
$social_link = ( isset( $icons['link_social_media'][$i] ) && !empty( $icons['link_social_media'][$i] ) ) ? $icons['link_social_media'][$i] : '';
|
||||
?>
|
||||
<a class="fb" href="<?php echo esc_url($social_link); ?>"><span class="fa-brands fab <?php echo esc_attr(str_replace("fa ", " ", $social_icon)); ?>"></span></a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--End Team Style1 Single-->
|
||||
<?php endwhile; ?>
|
||||
</div>
|
||||
</div>
|
||||
<!--End Team Style1 -->
|
||||
|
||||
<?php }
|
||||
wp_reset_postdata();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,624 @@
|
||||
<?php
|
||||
|
||||
namespace THINKAIPLUGIN\Element;
|
||||
|
||||
use Elementor\Controls_Manager;
|
||||
use Elementor\Controls_Stack;
|
||||
use Elementor\Group_Control_Typography;
|
||||
use Elementor\Group_Control_Border;
|
||||
use Elementor\Repeater;
|
||||
use Elementor\Widget_Base;
|
||||
use Elementor\Utils;
|
||||
use Elementor\Group_Control_Text_Shadow;
|
||||
use \Elementor\Group_Control_Box_Shadow;
|
||||
use \Elementor\Group_Control_Background;
|
||||
use \Elementor\Group_Control_Image_Size;
|
||||
use \Elementor\Group_Control_Text_Stroke;
|
||||
use Elementor\Plugin;
|
||||
|
||||
/**
|
||||
* Elementor button widget.
|
||||
* Elementor widget that displays a button with the ability to control every
|
||||
* aspect of the button design.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class Testimonial_Carousel extends Widget_Base
|
||||
{
|
||||
|
||||
/**
|
||||
* Get widget name.
|
||||
* Retrieve button widget name.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget name.
|
||||
*/
|
||||
public function get_name()
|
||||
{
|
||||
return 'thinkai_testimonial_carousel';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget title.
|
||||
* Retrieve button widget title.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget title.
|
||||
*/
|
||||
public function get_title()
|
||||
{
|
||||
return esc_html__('Thinkai Testimonial Carousel', 'thinkai');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget icon.
|
||||
* Retrieve button widget icon.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget icon.
|
||||
*/
|
||||
public function get_icon()
|
||||
{
|
||||
return 'eicon-testimonial-carousel';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget categories.
|
||||
* Retrieve the list of categories the button widget belongs to.
|
||||
* Used to determine where to display the widget in the editor.
|
||||
*
|
||||
* @since 2.0.0
|
||||
* @access public
|
||||
* @return array Widget categories.
|
||||
*/
|
||||
public function get_categories()
|
||||
{
|
||||
return [ 'thinkai' ];
|
||||
}
|
||||
|
||||
public function get_script_depends() {
|
||||
wp_register_script( 'testimonial-script', YT_URL . 'assets/js/feature-carousel.js', [ 'elementor-frontend' ], '1.0.0', true );
|
||||
return [ 'testimonial-script' ];
|
||||
}
|
||||
|
||||
/**
|
||||
* Register button widget controls.
|
||||
* Adds different input fields to allow the user to change and customize the widget settings.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*/
|
||||
protected function register_controls()
|
||||
{
|
||||
$this->start_controls_section(
|
||||
'testimonials_carousel',
|
||||
[
|
||||
'label' => esc_html__('Thinkai Testimonials Carousel', 'thinkai'),
|
||||
]
|
||||
);
|
||||
|
||||
//Layout
|
||||
$this->add_control(
|
||||
'layout_control',
|
||||
[
|
||||
'label' => esc_html__( 'Layout Style', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => '1',
|
||||
'options' => array(
|
||||
'1' => esc_html__( 'Style One ', 'thinkai'),
|
||||
'2' => esc_html__( 'Style Two ', 'thinkai'),
|
||||
'3' => esc_html__( 'Style Three ', 'thinkai'),
|
||||
'4' => esc_html__( 'Style Four ', 'thinkai'),
|
||||
),
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'total_ratting',
|
||||
[
|
||||
'label' => __( 'Total Ratting', 'thinkai' ),
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'label_block' => true,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'default' => esc_html__( '4.9/5.0', 'thinkai' ),
|
||||
'condition' => [
|
||||
'layout_control' => '1'
|
||||
]
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'ratting_description',
|
||||
[
|
||||
'label' => __( 'Ratting Description', 'thinkai' ),
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'label_block' => true,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'default' => esc_html__( '(from 20k reviews)', 'thinkai' ),
|
||||
'condition' => [
|
||||
'layout_control' => '1'
|
||||
]
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'text_limit',
|
||||
[
|
||||
'label' => esc_html__('Text Limit', 'thinkai'),
|
||||
'type' => Controls_Manager::NUMBER,
|
||||
'default' => 3,
|
||||
'min' => 1,
|
||||
'max' => 100,
|
||||
'step' => 1,
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'query_number',
|
||||
[
|
||||
'label' => esc_html__('Number of post', 'thinkai'),
|
||||
'type' => Controls_Manager::NUMBER,
|
||||
'default' => 3,
|
||||
'min' => 1,
|
||||
'max' => 100,
|
||||
'step' => 1,
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'query_orderby',
|
||||
[
|
||||
'label' => esc_html__('Order By', 'thinkai'),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'date',
|
||||
'options' => array(
|
||||
'date' => esc_html__('Date', 'thinkai'),
|
||||
|
||||
'title' => esc_html__('Title', 'thinkai'),
|
||||
'menu_order' => esc_html__('Menu Order', 'thinkai'),
|
||||
'rand' => esc_html__('Random', 'thinkai'),
|
||||
),
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'query_order',
|
||||
[
|
||||
'label' => esc_html__('Order', 'thinkai'),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'DESC',
|
||||
'options' => array(
|
||||
'DESC' => esc_html__('DESC', 'thinkai'),
|
||||
'ASC' => esc_html__('ASC', 'thinkai'),
|
||||
),
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'query_category',
|
||||
[
|
||||
'type' => Controls_Manager::SELECT2,
|
||||
'label' => esc_html__('Category', 'thinkai'),
|
||||
'label_block' => true,
|
||||
'multiple' => true,
|
||||
'options' => get_testimonials_categories()
|
||||
]
|
||||
);
|
||||
$this->end_controls_section();
|
||||
|
||||
|
||||
//Next Prev Color Style
|
||||
$this->start_controls_section(
|
||||
'next_prev_color_style',
|
||||
[
|
||||
'label' => esc_html__( 'Next Prev Settings', 'thinkai' ),
|
||||
'tab' => Controls_Manager::TAB_STYLE,
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'next_prev_color',
|
||||
[
|
||||
'label' => esc_html__( 'Text Color', 'thinkai' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .testimonial-style3__items-nav .swiper-button-next' => 'color: {{VALUE}} !important;',
|
||||
'{{WRAPPER}} .testimonial-style3__items-nav .swiper-button-prev' => 'color: {{VALUE}} !important;',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->end_controls_section();
|
||||
}
|
||||
|
||||
/**
|
||||
* Render button widget output on the frontend.
|
||||
* Written in PHP and used to generate the final HTML.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*/
|
||||
protected function render()
|
||||
{
|
||||
$settings = $this->get_settings_for_display();
|
||||
$allowed_tags = wp_kses_allowed_html('post');
|
||||
$layout = $settings['layout_control'];
|
||||
|
||||
$paged = thinkai_set($_POST, 'paged') ? esc_attr($_POST['paged']) : 1;
|
||||
|
||||
$this->add_render_attribute('wrapper', 'class', 'templatepath-thinkai');
|
||||
$args = array(
|
||||
'post_type' => 'testimonials',
|
||||
'posts_per_page' => thinkai_set($settings, 'query_number'),
|
||||
'orderby' => thinkai_set($settings, 'query_orderby'),
|
||||
'order' => thinkai_set($settings, 'query_order'),
|
||||
'paged' => $paged
|
||||
);
|
||||
|
||||
if (thinkai_set($settings, 'query_category')) {$args['testimonials_cat'] = thinkai_set($settings, 'query_category');
|
||||
}$query = new \WP_Query($args);
|
||||
|
||||
if ($query->have_posts()) {
|
||||
?>
|
||||
|
||||
<?php if($layout == '4') :?>
|
||||
|
||||
<!--Start Testimonial Style5-->
|
||||
<section class="testimonial-style5 p-0 m-0">
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xl-12">
|
||||
<div class="testimonial-style5__inner">
|
||||
<div class="owl-carousel owl-theme thm-owl__carousel testimonial-style5-carousel owl-nav-style-one"
|
||||
data-owl-options='{
|
||||
"loop": true,
|
||||
"autoplay": false,
|
||||
"margin": 30,
|
||||
"nav": true,
|
||||
"dots": false,
|
||||
"smartSpeed": 500,
|
||||
"autoplayTimeout": 10000,
|
||||
"navText": ["<span class=\"left icon-left-arrow\"></span>","<span class=\"right icon-right-arrow\"></span>"],
|
||||
"responsive": {
|
||||
"0": {
|
||||
"items": 1
|
||||
},
|
||||
"768": {
|
||||
"items": 1
|
||||
},
|
||||
"992": {
|
||||
"items": 2
|
||||
},
|
||||
"1200": {
|
||||
"items": 3
|
||||
}
|
||||
}
|
||||
}'>
|
||||
<?php while ($query->have_posts()) : $query->the_post(); ?>
|
||||
<!--Start Single Testimonial Style5-->
|
||||
<div class="testimonial-style5__single">
|
||||
<div class="overlay-icon">
|
||||
<span class="icon-straight-quotes"></span>
|
||||
</div>
|
||||
<div class="review-box">
|
||||
<ul>
|
||||
<?php
|
||||
$ratting = get_post_meta( get_the_id(), 'testimonial_rating', true );
|
||||
for ($x = 1; $x <= 5; $x++) {
|
||||
if($x <= $ratting) echo '<li><span class="fa fa-star"></span></li>'; else echo '<li><span class="fa fa-star-half-alt"></span></li>';
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="testimonial-style5__single-title">
|
||||
<h3><a href="<?php echo (get_post_meta(get_the_id(), 'te_ext_link', true)); ?>"><?php the_title(); ?></a></h3>
|
||||
</div>
|
||||
<div class="testimonial-style5__single-video">
|
||||
<a class="video-popup" title="Video Gallery"
|
||||
href="<?php echo (get_post_meta(get_the_id(), 'te_video_url', true)); ?>">
|
||||
<span class="icon-play-button-arrowhead"></span>
|
||||
<?php echo (get_post_meta(get_the_id(), 'te_video_title', true)); ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="testimonial-style5__single-author-info">
|
||||
<?php if(has_post_thumbnail()){ ?>
|
||||
<div class="img-box">
|
||||
<?php the_post_thumbnail('thinkai_70x70'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="title-box">
|
||||
<h3><?php echo(get_post_meta(get_the_id(), 'author_name', true)); ?></h3>
|
||||
<p><?php echo(get_post_meta(get_the_id(), 'author_designation', true)); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--End Single Testimonial Style5-->
|
||||
<?php endwhile; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
<!--End Testimonial Style5-->
|
||||
|
||||
<?php elseif($layout == '3') :?>
|
||||
|
||||
<!--Start Testimonial Style3-->
|
||||
<section class="testimonial-style3 p-0 m-0">
|
||||
<div class="container">
|
||||
|
||||
<div class="testimonial-style3__inner">
|
||||
<div class="thm-swiper__slider swiper-container" data-swiper-options='{
|
||||
"spaceBetween": 0,
|
||||
"speed": 1500,
|
||||
"slidesPerView": 1,
|
||||
"loop": true,
|
||||
"pagination": {
|
||||
"el": "#testimonial-style3__items-nav",
|
||||
"type": "bullets",
|
||||
"clickable": true
|
||||
},
|
||||
"navigation": {
|
||||
"nextEl": "#testimonial-style3__items-nav__prev",
|
||||
"prevEl": "#testimonial-style3__items-nav__next"
|
||||
},
|
||||
"autoplay": { "delay": 5000 },
|
||||
"breakpoints": {
|
||||
"0": {
|
||||
"spaceBetween": 0,
|
||||
"slidesPerView": 1
|
||||
},
|
||||
"375": {
|
||||
"spaceBetween": 0,
|
||||
"slidesPerView": 1
|
||||
},
|
||||
"575": {
|
||||
"spaceBetween": 0,
|
||||
"slidesPerView": 1
|
||||
},
|
||||
"768": {
|
||||
"spaceBetween": 0,
|
||||
"slidesPerView": 1
|
||||
},
|
||||
"992": {
|
||||
"spaceBetween": 0,
|
||||
"slidesPerView": 1
|
||||
},
|
||||
"1200": {
|
||||
"spaceBetween": 0,
|
||||
"slidesPerView": 1
|
||||
}
|
||||
}
|
||||
}'>
|
||||
|
||||
<div class="swiper-wrapper">
|
||||
<?php while ($query->have_posts()) : $query->the_post(); ?>
|
||||
<!--Start Testimonial Style3 Single-->
|
||||
<div class="swiper-slide">
|
||||
<div class="testimonial-style3__single">
|
||||
<div class="testimonial-style3__single-content-box text-center">
|
||||
<div class="title">
|
||||
<div class="icon-box">
|
||||
<img src="<?php echo esc_url(get_template_directory_uri()); ?>/assets/images/icon/tastimonial-style-3__icon-happy.png" alt="<?php bloginfo( 'name' ); ?>">
|
||||
</div>
|
||||
<h3><?php the_title(); ?></h3>
|
||||
</div>
|
||||
<div class="rating-box">
|
||||
<ul>
|
||||
<?php
|
||||
$ratting = get_post_meta( get_the_id(), 'testimonial_rating', true );
|
||||
for ($x = 1; $x <= 5; $x++) {
|
||||
if($x <= $ratting) echo '<li><span class="fa fa-star"></span></li>'; else echo '<li><span class="fa fa-star-half-alt"></span></li>';
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="text">
|
||||
<p><?php echo wp_kses(wp_trim_words(get_the_content(), $settings['text_limit']), true); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="customer-info">
|
||||
<div class="img-box">
|
||||
<?php the_post_thumbnail('thinkai_70x70'); ?>
|
||||
</div>
|
||||
<div class="title-box">
|
||||
<h3><?php echo(get_post_meta(get_the_id(), 'author_name', true)); ?></h3>
|
||||
<span><?php echo(get_post_meta(get_the_id(), 'author_designation', true)); ?></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--End Testimonial Style3 Single-->
|
||||
<?php endwhile; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--End Testimonial Style3 Items -->
|
||||
|
||||
<div class="testimonial-style3__items-nav">
|
||||
<div class="swiper-button-prev" id="testimonial-style3__items-nav__prev">
|
||||
<i class="icon-left-arrow1 left"></i> <?php esc_html_e('Prev','thinkai'); ?>
|
||||
</div>
|
||||
<div class="swiper-button-next" id="testimonial-style3__items-nav__next">
|
||||
<?php esc_html_e('Next','thinkai'); ?> <i class="icon-right-arrow1 right"></i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!--End Testimonial Style3-->
|
||||
|
||||
<?php elseif($layout == '2') :?>
|
||||
|
||||
<!--Start Testimonials Style2 -->
|
||||
<section class="testimonials-style2 p-0 m-0">
|
||||
|
||||
<div class="testimonials-style2__inner">
|
||||
<div class="owl-carousel owl-theme thm-owl__carousel testimonials-style2__carousel"
|
||||
data-owl-options='{
|
||||
"loop": true,
|
||||
"autoplay": false,
|
||||
"margin": 30,
|
||||
"nav": false,
|
||||
"dots": false,
|
||||
"smartSpeed": 500,
|
||||
"autoplayTimeout": 10000,
|
||||
"navText": ["<span class=\"left icon-right-arrow-4\"></span>","<span class=\"right icon-right-arrow-4\"></span>"],
|
||||
"responsive": {
|
||||
"0": {
|
||||
"items": 1
|
||||
},
|
||||
"768": {
|
||||
"items": 1
|
||||
},
|
||||
"992": {
|
||||
"items": 2
|
||||
},
|
||||
"1200": {
|
||||
"items": 3
|
||||
}
|
||||
}
|
||||
}'>
|
||||
<?php while ($query->have_posts()) : $query->the_post(); ?>
|
||||
<!--Start Testimonials Style2 Single-->
|
||||
<div class="testimonials-style2__single">
|
||||
<div class="icon-box">
|
||||
<span class="icon-quote"></span>
|
||||
</div>
|
||||
<div class="title-box">
|
||||
<h3><?php the_title(); ?></h3>
|
||||
<p><?php echo(get_post_meta(get_the_id(), 'author_designation', true)); ?></p>
|
||||
</div>
|
||||
<div class="text-box">
|
||||
<p><?php echo wp_kses(wp_trim_words(get_the_content(), $settings['text_limit']), true); ?></p>
|
||||
</div>
|
||||
<div class="review-box">
|
||||
<ul>
|
||||
<?php
|
||||
$ratting = get_post_meta( get_the_id(), 'testimonial_rating', true );
|
||||
for ($x = 1; $x <= 5; $x++) {
|
||||
if($x <= $ratting) echo '<li><i class="fa fa-star"></i></li>'; else echo '<li><i class="fa fa-star-half-alt"></i></li>';
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="author-info-box">
|
||||
<div class="img-box">
|
||||
<?php the_post_thumbnail('thinkai_70x70'); ?>
|
||||
</div>
|
||||
<div class="date-box">
|
||||
<h4><?php echo(get_post_meta(get_the_id(), 'review_title', true)); ?></h4>
|
||||
<p><?php echo(get_post_meta(get_the_id(), 'review_time', true)); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--End Testimonials Style2 Single-->
|
||||
<?php endwhile; ?>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!--End Testimonials Style2 -->
|
||||
|
||||
<?php else: ?>
|
||||
|
||||
<!--Start Testimonial Style1-->
|
||||
<section class="testimonial-style1 p-0 m-0">
|
||||
<div class="container">
|
||||
|
||||
<div class="testimonial-style1__inner">
|
||||
<div class="testimonial-style1__middle-content">
|
||||
<div class="icon">
|
||||
<div class="clearfix bshadow0 pbs">
|
||||
<span class="icon-google"><span class="path1"></span><span class="path2"></span><span class="path3"></span><span class="path4"></span><span class="path5"></span><span class="path6"></span></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="review-box">
|
||||
<ul>
|
||||
<li>
|
||||
<i class="icon-rate-star-button"></i>
|
||||
</li>
|
||||
<li>
|
||||
<i class="icon-rate-star-button"></i>
|
||||
</li>
|
||||
<li>
|
||||
<i class="icon-rate-star-button"></i>
|
||||
</li>
|
||||
<li>
|
||||
<i class="icon-rate-star-button"></i>
|
||||
</li>
|
||||
<li>
|
||||
<i class="icon-rate-star-button"></i>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="text-box">
|
||||
<h3><?php echo wp_kses($settings['total_ratting'], true); ?></h3>
|
||||
<p><?php echo wp_kses($settings['ratting_description'], true); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="owl-carousel owl-theme thm-owl__carousel testimonial-style1__carousel" data-owl-options='{
|
||||
"loop": true,
|
||||
"autoplay": false,
|
||||
"margin": 430,
|
||||
"nav": false,
|
||||
"dots": false,
|
||||
"smartSpeed": 500,
|
||||
"autoplayTimeout": 10000,
|
||||
"navText": ["<span class=\"left icon-right-arrow-4\"></span>","<span class=\"right icon-right-arrow-4\"></span>"],
|
||||
"responsive": {
|
||||
"0": {
|
||||
"items": 1
|
||||
},
|
||||
"768": {
|
||||
"items": 1
|
||||
},
|
||||
"992": {
|
||||
"items": 2
|
||||
},
|
||||
"1200": {
|
||||
"items": 2
|
||||
}
|
||||
}
|
||||
}'>
|
||||
<?php while ($query->have_posts()) : $query->the_post(); ?>
|
||||
<!--Start Testimonial Style1 Single-->
|
||||
<div class="testimonial-style1__single">
|
||||
<div class="icon-box">
|
||||
<span class="icon-quote-1"></span>
|
||||
</div>
|
||||
<div class="text">
|
||||
<p><?php echo wp_kses(wp_trim_words(get_the_content(), $settings['text_limit']), true); ?></p>
|
||||
</div>
|
||||
<div class="author-info">
|
||||
<h2><?php the_title(); ?></h2>
|
||||
<p><?php echo(get_post_meta(get_the_id(), 'author_designation', true)); ?></p>
|
||||
</div>
|
||||
<div class="testimonial-style1__single-bottom">
|
||||
<div class="img-box">
|
||||
<?php the_post_thumbnail('thinkai_70x70'); ?>
|
||||
</div>
|
||||
<div class="date-box">
|
||||
<h4><?php echo(get_post_meta(get_the_id(), 'review_title', true)); ?></h4>
|
||||
<p><?php echo(get_post_meta(get_the_id(), 'review_time', true)); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--End Testimonial Style1 Single-->
|
||||
<?php endwhile; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!--End Testimonial Style1-->
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php }
|
||||
wp_reset_postdata();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,294 @@
|
||||
<?php namespace THINKAIPLUGIN\Element;
|
||||
|
||||
use Elementor\Controls_Manager;
|
||||
use Elementor\Controls_Stack;
|
||||
use Elementor\Group_Control_Typography;
|
||||
use Elementor\Group_Control_Border;
|
||||
use Elementor\Repeater;
|
||||
use Elementor\Widget_Base;
|
||||
use Elementor\Utils;
|
||||
use Elementor\Group_Control_Text_Shadow;
|
||||
use \Elementor\Group_Control_Box_Shadow;
|
||||
use \Elementor\Group_Control_Background;
|
||||
use \Elementor\Group_Control_Image_Size;
|
||||
use \Elementor\Group_Control_Text_Stroke;
|
||||
use Elementor\Plugin;
|
||||
|
||||
/**
|
||||
* Elementor button widget.
|
||||
* Elementor widget that displays a button with the ability to control every
|
||||
* aspect of the button design.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class Testimonial_Review extends Widget_Base {
|
||||
|
||||
/**
|
||||
* Get widget name.
|
||||
* Retrieve button widget name.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget name.
|
||||
*/
|
||||
public function get_name() {
|
||||
return 'thinkai_testimonial_review';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget title.
|
||||
* Retrieve button widget title.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget title.
|
||||
*/
|
||||
public function get_title() {
|
||||
return esc_html__( 'Thinkai Testimonial Review', 'thinkai' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget icon.
|
||||
* Retrieve button widget icon.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget icon.
|
||||
*/
|
||||
public function get_icon() {
|
||||
return 'eicon-gallery-grid';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget categories.
|
||||
* Retrieve the list of categories the button widget belongs to.
|
||||
* Used to determine where to display the widget in the editor.
|
||||
*
|
||||
* @since 2.0.0
|
||||
* @access public
|
||||
* @return array Widget categories.
|
||||
*/
|
||||
public function get_categories() {
|
||||
return [ 'thinkai' ];
|
||||
}
|
||||
|
||||
/**
|
||||
* Register button widget controls.
|
||||
* Adds different input fields to allow the user to change and customize the widget settings.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*/
|
||||
protected function register_controls() {
|
||||
$this->start_controls_section(
|
||||
'testimonial_review',
|
||||
[
|
||||
'label' => esc_html__( 'Thinkai Testimonial Review', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
//Layout Control
|
||||
$this->add_control(
|
||||
'layout_control',
|
||||
[
|
||||
'label' => esc_html__( 'Layout Style', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => '1',
|
||||
'options' => array(
|
||||
'1' => esc_html__( 'Review Slide Left ', 'thinkai'),
|
||||
'2' => esc_html__( 'Review Slide Right ', 'thinkai'),
|
||||
),
|
||||
]
|
||||
);
|
||||
|
||||
//Repeater
|
||||
$repeater = new Repeater();
|
||||
$repeater->add_control(
|
||||
'transparent_title',
|
||||
[
|
||||
'label' => __( 'BG Transparent Title', 'thinkai' ),
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'label_block' => true,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'placeholder' => __( 'Enter your BG Title', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
//Author Image
|
||||
$repeater->add_control(
|
||||
'author_image',
|
||||
[
|
||||
'label' => __( 'Author Image Url', 'thinkai' ),
|
||||
'type' => Controls_Manager::MEDIA,
|
||||
'default' => ['url' => Utils::get_placeholder_image_src(),],
|
||||
]
|
||||
);
|
||||
//Title
|
||||
$repeater->add_control(
|
||||
'title',
|
||||
[
|
||||
'label' => __( 'Title', 'thinkai' ),
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'label_block' => true,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'placeholder' => __( 'Enter your Title', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
//Designation
|
||||
$repeater->add_control(
|
||||
'designation',
|
||||
[
|
||||
'label' => __( 'Designation', 'thinkai' ),
|
||||
'type' => Controls_Manager::TEXTAREA,
|
||||
'label_block' => true,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'placeholder' => __( 'Enter your Designation', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
//Video Link Option
|
||||
$repeater->add_control(
|
||||
'video_option',
|
||||
[
|
||||
'label' => __( 'Select Video Type', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'src_url',
|
||||
'options' => array(
|
||||
'src_url' => esc_html__( 'Source URL', 'thinkai' ),
|
||||
'src_media' => esc_html__( 'Source Media', 'thinkai' ),
|
||||
),
|
||||
]
|
||||
);
|
||||
$repeater->add_control(
|
||||
'video_link',
|
||||
[
|
||||
'label' => __( 'Video Source Url', 'thinkai' ),
|
||||
'type' => Controls_Manager::URL,
|
||||
'label_block' => true,
|
||||
'placeholder' => __( 'https://your-link.com', 'thinkai' ),
|
||||
'show_external' => true,
|
||||
'default' => [
|
||||
'url' => '',
|
||||
],
|
||||
'condition' => [
|
||||
'video_option' => 'src_url'
|
||||
],
|
||||
]
|
||||
);
|
||||
$repeater->add_control(
|
||||
'video_source_image',
|
||||
[
|
||||
'label' => __( 'Video Source Media', 'thinkai' ),
|
||||
'type' => Controls_Manager::MEDIA,
|
||||
'media_types' => ['video'],
|
||||
'condition' => [
|
||||
'video_option' => 'src_media'
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'review',
|
||||
[
|
||||
'label' => __('Add Review Item', 'thinkai'),
|
||||
'type' => Controls_Manager::REPEATER,
|
||||
'fields' => $repeater->get_controls(),
|
||||
'title_field' => '{{{ title }}}',
|
||||
'default' => [
|
||||
[
|
||||
'transparent_title' => esc_html__( 'Review', 'thinkai' ),
|
||||
'title' => esc_html__( 'Boris Elbert', 'thinkai' ),
|
||||
'designation' => esc_html__( 'Manager, Ovalism Studio', 'thinkai' ),
|
||||
'video_link' => esc_html__( 'https://www.youtube.com/watch?v=oV74Najm6Nc', 'thinkai' ),
|
||||
],
|
||||
[
|
||||
'transparent_title' => esc_html__( 'Review', 'thinkai' ),
|
||||
'title' => esc_html__( 'Boris Elbert', 'thinkai' ),
|
||||
'designation' => esc_html__( 'Manager, Ovalism Studio', 'thinkai' ),
|
||||
'video_link' => esc_html__( 'https://www.youtube.com/watch?v=oV74Najm6Nc', 'thinkai' ),
|
||||
],
|
||||
[
|
||||
'transparent_title' => esc_html__( 'Review', 'thinkai' ),
|
||||
'title' => esc_html__( 'Boris Elbert', 'thinkai' ),
|
||||
'designation' => esc_html__( 'Manager, Ovalism Studio', 'thinkai' ),
|
||||
'video_link' => esc_html__( 'https://www.youtube.com/watch?v=oV74Najm6Nc', 'thinkai' ),
|
||||
],
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Render button widget output on the frontend.
|
||||
* Written in PHP and used to generate the final HTML.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*/
|
||||
protected function render() {
|
||||
$settings = $this->get_settings_for_display();
|
||||
$allowed_tags = wp_kses_allowed_html('post');
|
||||
$layout = $settings[ 'layout_control' ];
|
||||
?>
|
||||
|
||||
<!--Start Testimonials Style4-->
|
||||
<section class="testimonials-style4 p-0 m-0">
|
||||
<div class="testimonials-style4__inner <?php if($settings[ 'layout_control' ] == '2') echo 'style2'; ?>">
|
||||
<ul class="clearfix <?php if($settings[ 'layout_control' ] == '2') echo 'marquee_mode-language'; else echo 'marquee_mode'; ?>">
|
||||
<?php
|
||||
foreach ($settings['review'] as $keys => $items){
|
||||
|
||||
$video_option = $items[ 'video_option' ];
|
||||
if( $video_option == 'src_url' ){
|
||||
$video = $items[ 'video_link' ][ 'url' ];
|
||||
}elseif( $video_option == 'src_media' ){
|
||||
$video = $items[ 'video_source_image' ]['url'];
|
||||
}else{
|
||||
$video = esc_html__( 'There is no Video', 'thinkai' );
|
||||
}
|
||||
?>
|
||||
<li>
|
||||
<div class="testimonials-style4__single">
|
||||
<?php if($items['transparent_title']){ ?>
|
||||
<div class="big-title">
|
||||
<h2 data-hover="<?php echo esc_attr($items['transparent_title']); ?>"><?php echo wp_kses($items['transparent_title'], true); ?></h2>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="testimonials-style4__single-img">
|
||||
<?php if($items['author_image']){ ?>
|
||||
<div class="inner">
|
||||
<img src="<?php echo esc_url(wp_get_attachment_url($items['author_image']['id'])); ?>" alt="<?php esc_attr_e('Awesome Image','thinkai'); ?>">
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if($video){ ?>
|
||||
<div class="testimonials-style4__video">
|
||||
<a class="video-popup" title="Video Gallery" href="<?php echo esc_url( $video );?>">
|
||||
<span class="icon-play-button-arrowhead"></span>
|
||||
</a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
</div>
|
||||
<div class="testimonials-style4__single-text">
|
||||
<h2><?php echo esc_attr($items['title']); ?></h2>
|
||||
<p><?php echo esc_attr($items['designation']); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<?php
|
||||
}
|
||||
}
|
||||
312
wp-content/plugins/thinkai-plugin/elementor/trending_voices.php
Normal file
312
wp-content/plugins/thinkai-plugin/elementor/trending_voices.php
Normal file
@@ -0,0 +1,312 @@
|
||||
<?php namespace THINKAIPLUGIN\Element;
|
||||
|
||||
use Elementor\Controls_Manager;
|
||||
use Elementor\Controls_Stack;
|
||||
use Elementor\Group_Control_Typography;
|
||||
use Elementor\Group_Control_Border;
|
||||
use Elementor\Repeater;
|
||||
use Elementor\Widget_Base;
|
||||
use Elementor\Utils;
|
||||
use Elementor\Group_Control_Text_Shadow;
|
||||
use \Elementor\Group_Control_Box_Shadow;
|
||||
use \Elementor\Group_Control_Background;
|
||||
use \Elementor\Group_Control_Image_Size;
|
||||
use \Elementor\Group_Control_Text_Stroke;
|
||||
use Elementor\Plugin;
|
||||
|
||||
/**
|
||||
* Elementor button widget.
|
||||
* Elementor widget that displays a button with the ability to control every
|
||||
* aspect of the button design.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class Trending_Voices extends Widget_Base {
|
||||
|
||||
/**
|
||||
* Get widget name.
|
||||
* Retrieve button widget name.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget name.
|
||||
*/
|
||||
public function get_name() {
|
||||
return 'thinkai_trending_voices';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget title.
|
||||
* Retrieve button widget title.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget title.
|
||||
*/
|
||||
public function get_title() {
|
||||
return esc_html__( 'Thinkai Trending Voices', 'thinkai' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget icon.
|
||||
* Retrieve button widget icon.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget icon.
|
||||
*/
|
||||
public function get_icon() {
|
||||
return 'eicon-icon-box';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget categories.
|
||||
* Retrieve the list of categories the button widget belongs to.
|
||||
* Used to determine where to display the widget in the editor.
|
||||
*
|
||||
* @since 2.0.0
|
||||
* @access public
|
||||
* @return array Widget categories.
|
||||
*/
|
||||
public function get_categories() {
|
||||
return [ 'thinkai' ];
|
||||
}
|
||||
|
||||
/**
|
||||
* Register button widget controls.
|
||||
* Adds different input fields to allow the user to change and customize the widget settings.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*/
|
||||
protected function register_controls() {
|
||||
$this->start_controls_section(
|
||||
'trending_voices',
|
||||
[
|
||||
'label' => esc_html__( 'Thinkai Trending Voices', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'layout_control',
|
||||
[
|
||||
'label' => esc_html__( 'Layout Style', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => '1',
|
||||
'options' => array(
|
||||
'1' => esc_html__( 'Style One ', 'thinkai'),
|
||||
'2' => esc_html__( 'Style Two ', 'thinkai'),
|
||||
),
|
||||
]
|
||||
);
|
||||
|
||||
//Icon
|
||||
$this->add_control(
|
||||
'icon',
|
||||
[
|
||||
'label' => esc_html__('Enter The icons', 'thinkai'),
|
||||
'type' => \Elementor\Controls_Manager::ICONS,
|
||||
'default' => [
|
||||
'value' => 'icon-microphone',
|
||||
'library' => 'solid',
|
||||
],
|
||||
]
|
||||
);
|
||||
//Title
|
||||
$this->add_control(
|
||||
'title',
|
||||
[
|
||||
'label' => __( 'Title', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'placeholder' => __( 'Enter your Title', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
//External Link
|
||||
$this->add_control(
|
||||
'link_option',
|
||||
[
|
||||
'label' => esc_html__( 'Select link Option', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'extranal',
|
||||
'options' => array(
|
||||
'extranal' => esc_html__( 'Extranal ', 'thinkai'),
|
||||
'page' => esc_html__( 'Page ', 'thinkai'),
|
||||
),
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'link',
|
||||
[
|
||||
'label' => __( 'External Link', 'thinkai' ),
|
||||
'type' => Controls_Manager::URL,
|
||||
'label_block' => true,
|
||||
'placeholder' => __( 'https://your-link.com', 'thinkai' ),
|
||||
'show_external' => true,
|
||||
'default' => [
|
||||
'url' => '',
|
||||
'is_external' => true,
|
||||
'nofollow' => true,
|
||||
],
|
||||
'condition' => [
|
||||
'link_option' => 'extranal',
|
||||
]
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'page_select',
|
||||
[
|
||||
'label' => esc_html__( 'Select Page', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::SELECT2,
|
||||
'default' => 'extranal',
|
||||
'options' => thinkai_page_list(),
|
||||
'condition' => [
|
||||
'link_option' => 'page',
|
||||
]
|
||||
]
|
||||
);
|
||||
|
||||
//Text
|
||||
$this->add_control(
|
||||
'text',
|
||||
[
|
||||
'label' => __( 'Description', 'thinkai' ),
|
||||
'type' => Controls_Manager::TEXTAREA,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'placeholder' => __( 'Enter your Desription', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
|
||||
//Wave Image
|
||||
$this->add_control(
|
||||
'wave_img',
|
||||
[
|
||||
'label' => __( 'Wave Image', 'thinkai' ),
|
||||
'type' => Controls_Manager::MEDIA,
|
||||
'default' => ['url' => Utils::get_placeholder_image_src(),],
|
||||
]
|
||||
);
|
||||
|
||||
//Video Link Option
|
||||
$this->add_control(
|
||||
'video_option',
|
||||
[
|
||||
'label' => __( 'Select Video Type', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'src_url',
|
||||
'options' => array(
|
||||
'src_url' => esc_html__( 'Source URL', 'thinkai' ),
|
||||
'src_media' => esc_html__( 'Source Media', 'thinkai' ),
|
||||
),
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'video_link',
|
||||
[
|
||||
'label' => __( 'Video Source Url', 'thinkai' ),
|
||||
'type' => Controls_Manager::URL,
|
||||
'label_block' => true,
|
||||
'placeholder' => __( 'https://your-link.com', 'thinkai' ),
|
||||
'show_external' => true,
|
||||
'default' => [
|
||||
'url' => '',
|
||||
],
|
||||
'condition' => [
|
||||
'video_option' => 'src_url'
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'video_source_image',
|
||||
[
|
||||
'label' => __( 'Video Source Media', 'thinkai' ),
|
||||
'type' => Controls_Manager::MEDIA,
|
||||
'media_types' => ['video'],
|
||||
'condition' => [
|
||||
'video_option' => 'src_media'
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->end_controls_section();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Render button widget output on the frontend.
|
||||
* Written in PHP and used to generate the final HTML.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*/
|
||||
protected function render() {
|
||||
$settings = $this->get_settings_for_display();
|
||||
$allowed_tags = wp_kses_allowed_html('post');
|
||||
$icon = $settings['icon'];
|
||||
|
||||
//Link Code
|
||||
$page = $settings['link_option'];
|
||||
$page_select = $settings[ 'page_select' ];
|
||||
$ext_url = $settings[ 'link' ];
|
||||
|
||||
if( $page == 'page' ){
|
||||
$mount_link = get_page_link( $page_select );
|
||||
}else{
|
||||
$mount_link = $ext_url['url'];
|
||||
$target = $ext_url['is_external'] ? ' target="_blank"' : '';
|
||||
$nofollow = $ext_url['nofollow'] ? ' rel="nofollow"' : '';
|
||||
}
|
||||
|
||||
//Video Code
|
||||
$video_option = $settings[ 'video_option' ];
|
||||
if( $video_option == 'src_url' ){
|
||||
$video = $settings[ 'video_link' ][ 'url' ];
|
||||
}elseif( $video_option == 'src_media' ){
|
||||
$video = $settings[ 'video_source_image' ]['url'];
|
||||
}else{
|
||||
$video = esc_html__( 'There is no Video', 'thinkai' );
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="ai-voices-style1__single">
|
||||
<div class="ai-voices-style1__single-left">
|
||||
<?php if($icon){ ?>
|
||||
<div class="icon">
|
||||
<?php
|
||||
$icon = str_replace( "icon ", "", $settings['icon']);
|
||||
if( !empty( $icon ) ):?>
|
||||
<?php \Elementor\Icons_Manager::render_icon( $icon ); ?>
|
||||
<?php else:?>
|
||||
<span class="icon-microphone"></span>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="title">
|
||||
<h3><a href="<?php echo esc_url( $mount_link );?>" <?php if( $page == 'extranal' ) echo esc_attr( $target );?> <?php if( $page == 'extranal' ) echo esc_attr( $nofollow );?>><?php echo wp_kses($settings['title'], true);?></a></h3>
|
||||
<p><?php echo wp_kses($settings['text'], true);?></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ai-voices-style1__single-right">
|
||||
<?php if($settings['wave_img']){ ?>
|
||||
<div class="wave-box">
|
||||
<img src="<?php echo esc_url(wp_get_attachment_url($settings['wave_img']['id'])); ?>" alt="<?php bloginfo( 'name' ); ?>">
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if($video){ ?>
|
||||
<div class="icon-box">
|
||||
<a href="<?php echo esc_url( $video );?>" class="icon-play-button-arrowhead"></a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
}
|
||||
}
|
||||
424
wp-content/plugins/thinkai-plugin/elementor/video_banner.php
Normal file
424
wp-content/plugins/thinkai-plugin/elementor/video_banner.php
Normal file
@@ -0,0 +1,424 @@
|
||||
<?php namespace THINKAIPLUGIN\Element;
|
||||
|
||||
use Elementor\Controls_Manager;
|
||||
use Elementor\Controls_Stack;
|
||||
use Elementor\Group_Control_Typography;
|
||||
use Elementor\Group_Control_Border;
|
||||
use Elementor\Repeater;
|
||||
use Elementor\Widget_Base;
|
||||
use Elementor\Utils;
|
||||
use Elementor\Group_Control_Text_Shadow;
|
||||
use \Elementor\Group_Control_Box_Shadow;
|
||||
use \Elementor\Group_Control_Background;
|
||||
use \Elementor\Group_Control_Image_Size;
|
||||
use \Elementor\Group_Control_Text_Stroke;
|
||||
use Elementor\Plugin;
|
||||
|
||||
/**
|
||||
* Elementor button widget.
|
||||
* Elementor widget that displays a button with the ability to control every
|
||||
* aspect of the button design.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class Video_Banner extends Widget_Base {
|
||||
|
||||
/**
|
||||
* Get widget name.
|
||||
* Retrieve button widget name.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget name.
|
||||
*/
|
||||
public function get_name() {
|
||||
return 'thinkai_video_banner';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget title.
|
||||
* Retrieve button widget title.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget title.
|
||||
*/
|
||||
public function get_title() {
|
||||
return esc_html__( 'Thinkai Video Banner', 'thinkai' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget icon.
|
||||
* Retrieve button widget icon.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget icon.
|
||||
*/
|
||||
public function get_icon() {
|
||||
return 'eicon-gallery-grid';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget categories.
|
||||
* Retrieve the list of categories the button widget belongs to.
|
||||
* Used to determine where to display the widget in the editor.
|
||||
*
|
||||
* @since 2.0.0
|
||||
* @access public
|
||||
* @return array Widget categories.
|
||||
*/
|
||||
public function get_categories() {
|
||||
return [ 'thinkai' ];
|
||||
}
|
||||
|
||||
public function get_script_depends() {
|
||||
wp_register_script( 'video-banner-script', YT_URL . 'assets/js/video-banner.js', [ 'elementor-frontend' ], '1.0.0', true );
|
||||
return [ 'video-banner-script' ];
|
||||
}
|
||||
|
||||
/**
|
||||
* Register button widget controls.
|
||||
* Adds different input fields to allow the user to change and customize the widget settings.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*/
|
||||
protected function register_controls() {
|
||||
$this->start_controls_section(
|
||||
'video_banner',
|
||||
[
|
||||
'label' => esc_html__( 'Thinkai Video Banner', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'layout_control',
|
||||
[
|
||||
'label' => esc_html__( 'Layout Style', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => '1',
|
||||
'options' => array(
|
||||
'1' => esc_html__( 'Style One ', 'thinkai'),
|
||||
'2' => esc_html__( 'Style Two ', 'thinkai'),
|
||||
),
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'video_img',
|
||||
[
|
||||
'label' => __( 'Video Image', 'thinkai' ),
|
||||
'type' => Controls_Manager::MEDIA,
|
||||
'default' => ['url' => Utils::get_placeholder_image_src(),],
|
||||
'condition' => [
|
||||
'layout_control' => '2',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
//Video Link Option
|
||||
$this->add_control(
|
||||
'video_option',
|
||||
[
|
||||
'label' => __( 'Select Video Type', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'src_url',
|
||||
'options' => array(
|
||||
'src_url' => esc_html__( 'Source URL', 'thinkai' ),
|
||||
'src_media' => esc_html__( 'Source Media', 'thinkai' ),
|
||||
),
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'video_link',
|
||||
[
|
||||
'label' => __( 'Video Source Url', 'thinkai' ),
|
||||
'type' => Controls_Manager::URL,
|
||||
'label_block' => true,
|
||||
'placeholder' => __( 'https://your-link.com', 'thinkai' ),
|
||||
'show_external' => true,
|
||||
'default' => [
|
||||
'url' => '',
|
||||
],
|
||||
'condition' => [
|
||||
'video_option' => 'src_url'
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'video_source_image',
|
||||
[
|
||||
'label' => __( 'Video Source Media', 'thinkai' ),
|
||||
'type' => Controls_Manager::MEDIA,
|
||||
'media_types' => ['video'],
|
||||
'condition' => [
|
||||
'video_option' => 'src_media'
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
//Title
|
||||
$this->add_control(
|
||||
'title',
|
||||
[
|
||||
'label' => __( 'Title', 'thinkai' ),
|
||||
'type' => Controls_Manager::TEXTAREA,
|
||||
'label_block' => true,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'default' => esc_html__( 'Image Generator', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
//Text
|
||||
$this->add_control(
|
||||
'text',
|
||||
[
|
||||
'label' => __( 'Description', 'thinkai' ),
|
||||
'type' => Controls_Manager::TEXTAREA,
|
||||
'label_block' => true,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'default' => esc_html__( 'Convert text to image.', 'thinkai' ),
|
||||
'condition' => [
|
||||
'layout_control' => '1',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
//Button Title
|
||||
$this->add_control(
|
||||
'btn_title',
|
||||
[
|
||||
'label' => __( 'Button Title', 'thinkai' ),
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'label_block' => true,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'default' => esc_html__( 'Try a Template', 'thinkai' ),
|
||||
'condition' => [
|
||||
'layout_control' => '1',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'link_option',
|
||||
[
|
||||
'label' => esc_html__( 'Select link Option', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'extranal',
|
||||
'options' => array(
|
||||
'extranal' => esc_html__( 'Extranal ', 'thinkai'),
|
||||
'page' => esc_html__( 'Page ', 'thinkai'),
|
||||
),
|
||||
'condition' => [
|
||||
'layout_control' => '1',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'link',
|
||||
[
|
||||
'label' => __( 'External Link', 'thinkai' ),
|
||||
'type' => Controls_Manager::URL,
|
||||
'label_block' => true,
|
||||
'placeholder' => __( 'https://your-link.com', 'thinkai' ),
|
||||
'show_external' => true,
|
||||
'default' => [
|
||||
'url' => '',
|
||||
'is_external' => true,
|
||||
'nofollow' => true,
|
||||
],
|
||||
'condition' => [
|
||||
'layout_control' => '1',
|
||||
'link_option' => 'extranal'
|
||||
]
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'page_select',
|
||||
[
|
||||
'label' => esc_html__( 'Select Page', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::SELECT2,
|
||||
'default' => 'extranal',
|
||||
'options' => thinkai_page_list(),
|
||||
'condition' => [
|
||||
'layout_control' => '1',
|
||||
'link_option' => 'page'
|
||||
]
|
||||
]
|
||||
);
|
||||
|
||||
//Switcher
|
||||
$this->add_control(
|
||||
'show_email_info',
|
||||
[
|
||||
'label' => esc_html__( 'Enable Email Info', 'thinkai' ),
|
||||
'type' => Controls_Manager::SWITCHER,
|
||||
'label_on' => esc_html__( 'On', 'thinkai' ),
|
||||
'label_off' => esc_html__( 'Off', 'thinkai' ),
|
||||
'return_value' => 'yes',
|
||||
'default' => 'no',
|
||||
'condition' => [
|
||||
'layout_control' => '1',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'email_title',
|
||||
[
|
||||
'label' => esc_html__( 'Email Title', 'thinkai' ),
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'label_block' => true,
|
||||
'default' => esc_html__( 'Have Question?', 'thinkai' ),
|
||||
'condition' => [
|
||||
'layout_control' => '1',
|
||||
'show_email_info' => 'yes'
|
||||
]
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'email_address',
|
||||
[
|
||||
'label' => esc_html__( 'Email Address', 'thinkai' ),
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'label_block' => true,
|
||||
'default' => esc_html__( 'info@example.com', 'thinkai' ),
|
||||
'condition' => [
|
||||
'layout_control' => '1',
|
||||
'show_email_info' => 'yes'
|
||||
]
|
||||
]
|
||||
);
|
||||
$this->end_controls_section();
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Render button widget output on the frontend.
|
||||
* Written in PHP and used to generate the final HTML.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*/
|
||||
protected function render() {
|
||||
$settings = $this->get_settings_for_display();
|
||||
$allowed_tags = wp_kses_allowed_html('post');
|
||||
$layout = $settings[ 'layout_control' ];
|
||||
|
||||
$video_option = $settings[ 'video_option' ];
|
||||
if( $video_option == 'src_url' ){
|
||||
$video = $settings[ 'video_link' ][ 'url' ];
|
||||
}elseif( $video_option == 'src_media' ){
|
||||
$video = $settings[ 'video_source_image' ]['url'];
|
||||
}else{
|
||||
$video = esc_html__( 'There is no Video', 'thinkai' );
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<?php
|
||||
if($layout == '2') :
|
||||
?>
|
||||
|
||||
<div class="service-details-video-holder">
|
||||
<div class="service-details-video-holder__bg"
|
||||
style="background-image: url(<?php echo esc_url(wp_get_attachment_url($settings['video_img']['id'])); ?>);">
|
||||
</div>
|
||||
|
||||
<?php if($settings['title']){ ?>
|
||||
<div class="overlay-title">
|
||||
<h4><?php echo wp_kses($settings['title'], true); ?></h4>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if($video){ ?>
|
||||
<div class="icon wow zoomIn animated" data-wow-delay="300ms" data-wow-duration="1500ms">
|
||||
<a class="video-popup" title="Video Gallery"
|
||||
href="<?php echo esc_url( $video );?>">
|
||||
<span class="icon-play-button-arrowhead"></span>
|
||||
</a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<?php else:
|
||||
$page = $settings['link_option'];
|
||||
$page_select = $settings[ 'page_select' ];
|
||||
$ext_url = $settings[ 'link' ];
|
||||
|
||||
if( $page == 'page' ){
|
||||
$mount_link = get_page_link( $page_select );
|
||||
}else{
|
||||
$mount_link = $ext_url['url'];
|
||||
$target = $ext_url['is_external'] ? ' target="_blank"' : '';
|
||||
$nofollow = $ext_url['nofollow'] ? ' rel="nofollow"' : '';
|
||||
}
|
||||
?>
|
||||
|
||||
<!-- Start Video Banner Style1 -->
|
||||
<div class="video-banner-style1 full-height">
|
||||
<div class="video-banner-style1__inner">
|
||||
<?php if($video){ ?>
|
||||
<div class="media-container" data-top-bottom="transform: translateY(300px);"
|
||||
data-bottom-top="transform: translateY(-300px);">
|
||||
<div class="video-holder-wrap fs-wrapper">
|
||||
<div class="video-container">
|
||||
<video autoplay playsinline loop muted class="bgvid">
|
||||
<source src="<?php echo esc_url( $video );?>" type="video/mp4">
|
||||
</video>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="overlay"></div>
|
||||
<div class="video-banner-style1__content">
|
||||
<div class="video-banner-style1__content-inner">
|
||||
<div class="big-title">
|
||||
<?php if($settings['title']){ ?>
|
||||
<h2><?php echo wp_kses($settings['title'], true); ?></h2>
|
||||
<?php } ?>
|
||||
|
||||
<?php if($settings['btn_title']){ ?>
|
||||
<a class="btn1" href="<?php echo esc_url( $mount_link );?>" <?php if( $page == 'extranal' ) echo esc_attr( $target );?> <?php if( $page == 'extranal' ) echo esc_attr( $nofollow );?>>
|
||||
<span class="icon-right-arrow1"></span><?php echo wp_kses($settings['btn_title'], true);?>
|
||||
</a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php if($settings['text']){ ?>
|
||||
<div class="text">
|
||||
<div class="border-box"></div>
|
||||
<p><?php echo wp_kses($settings['text'], true); ?></p>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php if($settings['show_email_info'] == 'yes'){ ?>
|
||||
<div class="video-banner-style1__content-info">
|
||||
<div class="video-banner-style1__content-info-inner">
|
||||
<div class="icon-box">
|
||||
<span class="icon-email-1"></span>
|
||||
</div>
|
||||
<div class="text">
|
||||
<h5><?php echo wp_kses($settings['email_title'], true); ?></h5>
|
||||
<a href="mailto:<?php echo esc_attr($settings['email_address']); ?>"><?php echo wp_kses($settings['email_address'], true); ?></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End Video Banner Style1 -->
|
||||
|
||||
<?php endif;
|
||||
}
|
||||
}
|
||||
295
wp-content/plugins/thinkai-plugin/elementor/video_tabs.php
Normal file
295
wp-content/plugins/thinkai-plugin/elementor/video_tabs.php
Normal file
@@ -0,0 +1,295 @@
|
||||
<?php namespace THINKAIPLUGIN\Element;
|
||||
|
||||
use Elementor\Controls_Manager;
|
||||
use Elementor\Controls_Stack;
|
||||
use Elementor\Group_Control_Typography;
|
||||
use Elementor\Group_Control_Border;
|
||||
use Elementor\Repeater;
|
||||
use Elementor\Widget_Base;
|
||||
use Elementor\Utils;
|
||||
use Elementor\Group_Control_Text_Shadow;
|
||||
use \Elementor\Group_Control_Box_Shadow;
|
||||
use \Elementor\Group_Control_Background;
|
||||
use \Elementor\Group_Control_Image_Size;
|
||||
use \Elementor\Group_Control_Text_Stroke;
|
||||
use Elementor\Plugin;
|
||||
|
||||
/**
|
||||
* Elementor button widget.
|
||||
* Elementor widget that displays a button with the ability to control every
|
||||
* aspect of the button design.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class Video_Tabs extends Widget_Base {
|
||||
|
||||
/**
|
||||
* Get widget name.
|
||||
* Retrieve button widget name.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget name.
|
||||
*/
|
||||
public function get_name() {
|
||||
return 'thinkai_video_tabs';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget title.
|
||||
* Retrieve button widget title.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget title.
|
||||
*/
|
||||
public function get_title() {
|
||||
return esc_html__( 'Thinkai Video Tabs', 'thinkai' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget icon.
|
||||
* Retrieve button widget icon.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget icon.
|
||||
*/
|
||||
public function get_icon() {
|
||||
return 'eicon-gallery-grid';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get widget categories.
|
||||
* Retrieve the list of categories the button widget belongs to.
|
||||
* Used to determine where to display the widget in the editor.
|
||||
*
|
||||
* @since 2.0.0
|
||||
* @access public
|
||||
* @return array Widget categories.
|
||||
*/
|
||||
public function get_categories() {
|
||||
return [ 'thinkai' ];
|
||||
}
|
||||
|
||||
/**
|
||||
* Register button widget controls.
|
||||
* Adds different input fields to allow the user to change and customize the widget settings.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*/
|
||||
protected function register_controls() {
|
||||
$this->start_controls_section(
|
||||
'video_tabs',
|
||||
[
|
||||
'label' => esc_html__( 'Thinkai Video Tabs', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
|
||||
//BG Image
|
||||
$this->add_control(
|
||||
'bg_image',
|
||||
[
|
||||
'label' => __( 'BG Image Url', 'thinkai' ),
|
||||
'type' => Controls_Manager::MEDIA,
|
||||
'default' => ['url' => Utils::get_placeholder_image_src(),],
|
||||
]
|
||||
);
|
||||
|
||||
//Video Repeater
|
||||
$repeater = new Repeater();
|
||||
$repeater->add_control(
|
||||
'tab_btn_title',
|
||||
[
|
||||
'label' => __( 'Tab Button Title', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'placeholder' => __( 'Enter your Tab BTN Title', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
//title
|
||||
$repeater->add_control(
|
||||
'title',
|
||||
[
|
||||
'label' => __( 'Title', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::TEXTAREA,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'placeholder' => __( 'Enter your Title', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
//Video Link Option
|
||||
$repeater->add_control(
|
||||
'video_option',
|
||||
[
|
||||
'label' => __( 'Select Video Type', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'src_url',
|
||||
'options' => array(
|
||||
'src_url' => esc_html__( 'Source URL', 'thinkai' ),
|
||||
'src_media' => esc_html__( 'Source Media', 'thinkai' ),
|
||||
),
|
||||
]
|
||||
);
|
||||
$repeater->add_control(
|
||||
'video_link',
|
||||
[
|
||||
'label' => __( 'Video Source Url', 'thinkai' ),
|
||||
'type' => Controls_Manager::URL,
|
||||
'label_block' => true,
|
||||
'placeholder' => __( 'https://your-link.com', 'thinkai' ),
|
||||
'show_external' => true,
|
||||
'default' => [
|
||||
'url' => '',
|
||||
],
|
||||
'condition' => [
|
||||
'video_option' => 'src_url'
|
||||
],
|
||||
]
|
||||
);
|
||||
$repeater->add_control(
|
||||
'video_source_image',
|
||||
[
|
||||
'label' => __( 'Video Source Media', 'thinkai' ),
|
||||
'type' => Controls_Manager::MEDIA,
|
||||
'media_types' => ['video'],
|
||||
'condition' => [
|
||||
'video_option' => 'src_media'
|
||||
],
|
||||
]
|
||||
);
|
||||
//title
|
||||
$repeater->add_control(
|
||||
'video_caption',
|
||||
[
|
||||
'label' => __( 'Video Caption', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'placeholder' => __( 'Enter your Video Caption', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'tabs',
|
||||
[
|
||||
'label' => __('Add Video Tab Item', 'thinkai'),
|
||||
'type' => Controls_Manager::REPEATER,
|
||||
'fields' => $repeater->get_controls(),
|
||||
'title_field' => '{{{ tab_btn_title }}}',
|
||||
'default' => [
|
||||
[
|
||||
'tab_btn_title' => esc_html__( 'Frame-by-Frame', 'thinkai' ),
|
||||
'title' => esc_html__( 'We can help businesses reduce customer <br> service costs.', 'thinkai' ),
|
||||
'src_url' => esc_html__( 'https://www.youtube.com/watch?v=oV74Najm6Nc', 'thinkai' ),
|
||||
'video_caption' => esc_html__( 'Watch Demo', 'thinkai' ),
|
||||
],
|
||||
[
|
||||
'tab_btn_title' => esc_html__( 'Backward', 'thinkai' ),
|
||||
'title' => esc_html__( 'Replay, Redefine, Repeat<br> with ThinkAi video<br> Repeating.', 'thinkai' ),
|
||||
'src_url' => esc_html__( 'https://www.youtube.com/watch?v=oV74Najm6Nc', 'thinkai' ),
|
||||
'video_caption' => esc_html__( 'Watch Demo', 'thinkai' ),
|
||||
],
|
||||
[
|
||||
'tab_btn_title' => esc_html__( 'Voice Over', 'thinkai' ),
|
||||
'title' => esc_html__( 'Replay, Redefine, Repeat<br> with ThinkAi video<br> Repeating.', 'thinkai' ),
|
||||
'src_url' => esc_html__( 'https://www.youtube.com/watch?v=oV74Najm6Nc', 'thinkai' ),
|
||||
'video_caption' => esc_html__( 'Watch Demo', 'thinkai' ),
|
||||
],
|
||||
[
|
||||
'tab_btn_title' => esc_html__( 'Screen Record', 'thinkai' ),
|
||||
'title' => esc_html__( 'Replay, Redefine, Repeat<br> with ThinkAi video<br> Repeating.', 'thinkai' ),
|
||||
'src_url' => esc_html__( 'https://www.youtube.com/watch?v=oV74Najm6Nc', 'thinkai' ),
|
||||
'video_caption' => esc_html__( 'Watch Demo', 'thinkai' ),
|
||||
],
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->end_controls_section();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Render button widget output on the frontend.
|
||||
* Written in PHP and used to generate the final HTML.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*/
|
||||
protected function render() {
|
||||
$settings = $this->get_settings_for_display();
|
||||
$allowed_tags = wp_kses_allowed_html('post');
|
||||
?>
|
||||
|
||||
<!--Start Features Style5-->
|
||||
<section class="features-style5">
|
||||
<?php if($settings['bg_image']){ ?>
|
||||
<div class="features-style5__bg" data-jarallax data-speed="0.1" data-imgPosition="0% 0%"
|
||||
style="background-image: url(<?php echo esc_url(wp_get_attachment_url($settings['bg_image']['id'])); ?>);"></div>
|
||||
<?php } ?>
|
||||
<div class="container">
|
||||
<div class="features-style5__inner tab-box-style1">
|
||||
<div class="tabs-content-box">
|
||||
<?php
|
||||
foreach($settings['tabs'] as $key => $items){
|
||||
|
||||
$video_option = $items[ 'video_option' ];
|
||||
if( $video_option == 'src_url' ){
|
||||
$video = $items[ 'video_link' ][ 'url' ];
|
||||
}elseif( $video_option == 'src_media' ){
|
||||
$video = $items[ 'video_source_image' ]['url'];
|
||||
}else{
|
||||
$video = esc_html__( 'There is no Video', 'thinkai' );
|
||||
}
|
||||
?>
|
||||
<!--Tab-->
|
||||
<div class="tab-content-box-item <?php if($key == 0) echo 'tab-content-box-item-active'; ?>" id="frame-by-frame<?php echo esc_attr($key); ?>">
|
||||
<div class="features-style5__content-tab-item">
|
||||
<div class="video-holder-box-style5 text-center">
|
||||
<h2><?php echo wp_kses($items['title'], true); ?></h2>
|
||||
|
||||
<?php if($video){ ?>
|
||||
<div class="icon wow zoomIn animated" data-wow-delay="300ms"
|
||||
data-wow-duration="1500ms">
|
||||
<a class="video-popup" title="Video Gallery"
|
||||
href="<?php echo esc_url( $video );?>">
|
||||
<span class="icon-play-button-arrowhead"></span>
|
||||
</a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<h5><?php echo wp_kses($items['video_caption'], true); ?></h5>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<div class="features-style5-tab__button">
|
||||
<ul class="tabs-button-box clearfix">
|
||||
<?php
|
||||
foreach($settings['tabs'] as $key => $items){
|
||||
?>
|
||||
<li data-tab="#frame-by-frame<?php echo esc_attr($key); ?>" class="tab-btn-item <?php if($key == 0) echo 'active-btn-item'; ?>">
|
||||
<span><?php echo wp_kses($items['tab_btn_title'], true); ?></span>
|
||||
</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!--End Features Style5-->
|
||||
|
||||
<?php
|
||||
}
|
||||
}
|
||||
148
wp-content/plugins/thinkai-plugin/elementor/wave_image.php
Normal file
148
wp-content/plugins/thinkai-plugin/elementor/wave_image.php
Normal file
@@ -0,0 +1,148 @@
|
||||
<?php namespace THINKAIPLUGIN\Element;
|
||||
|
||||
use Elementor\Controls_Manager;
|
||||
use Elementor\Controls_Stack;
|
||||
use Elementor\Group_Control_Typography;
|
||||
use Elementor\Group_Control_Border;
|
||||
use Elementor\Repeater;
|
||||
use Elementor\Widget_Base;
|
||||
use Elementor\Utils;
|
||||
use Elementor\Group_Control_Text_Shadow;
|
||||
use \Elementor\Group_Control_Box_Shadow;
|
||||
use \Elementor\Group_Control_Background;
|
||||
use \Elementor\Group_Control_Text_Stroke;
|
||||
use Elementor\Plugin;
|
||||
|
||||
/**
|
||||
* Elementor button widget.
|
||||
* Elementor widget that displays a button with the ability to control every
|
||||
* aspect of the button design.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class Wave_Image extends Widget_Base {
|
||||
/**
|
||||
* Get widget name.
|
||||
* Retrieve button widget name.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget name.
|
||||
*/
|
||||
public function get_name() {
|
||||
return 'thinkai_wave_image';
|
||||
}
|
||||
/**
|
||||
* Get widget title.
|
||||
* Retrieve button widget title.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget title.
|
||||
*/
|
||||
public function get_title() {
|
||||
return esc_html__( 'Thinkai Wave Image', 'thinkai' );
|
||||
}
|
||||
/**
|
||||
* Get widget icon.
|
||||
* Retrieve button widget icon.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return string Widget icon.
|
||||
*/
|
||||
public function get_icon() {
|
||||
return 'eicon-image-hotspot';
|
||||
}
|
||||
/**
|
||||
* Get widget categories.
|
||||
* Retrieve the list of categories the button widget belongs to.
|
||||
* Used to determine where to display the widget in the editor.
|
||||
*
|
||||
* @since 2.0.0
|
||||
* @access public
|
||||
* @return array Widget categories.
|
||||
*/
|
||||
public function get_categories() {
|
||||
return [ 'thinkai' ];
|
||||
}
|
||||
|
||||
/**
|
||||
* Register button widget controls.
|
||||
* Adds different input fields to allow the user to change and customize the widget settings.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*/
|
||||
protected function register_controls() {
|
||||
$this->start_controls_section(
|
||||
'wave_image',
|
||||
[
|
||||
'label' => esc_html__( 'Thinkai Wave Image', 'thinkai' ),
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'layout_control',
|
||||
[
|
||||
'label' => esc_html__( 'Layout Style', 'thinkai' ),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => '1',
|
||||
'options' => array(
|
||||
'1' => esc_html__( 'Style One ', 'thinkai'),
|
||||
'2' => esc_html__( 'Style Two ', 'thinkai'),
|
||||
'3' => esc_html__( 'Style Three ', 'thinkai'),
|
||||
),
|
||||
]
|
||||
);
|
||||
//Wave Img
|
||||
$this->add_control(
|
||||
'wave_img',
|
||||
[
|
||||
'label' => esc_html__( 'Wave Image', 'thinkai' ),
|
||||
'type' => Controls_Manager::MEDIA,
|
||||
'default' => [
|
||||
'url' => Utils::get_placeholder_image_src(),
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Render button widget output on the frontend.
|
||||
* Written in PHP and used to generate the final HTML.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*/
|
||||
protected function render() {
|
||||
$settings = $this->get_settings_for_display();
|
||||
$allowed_tags = wp_kses_allowed_html('post');
|
||||
?>
|
||||
|
||||
<?php if($settings['layout_control'] == '3') :?>
|
||||
|
||||
|
||||
<?php elseif($settings['layout_control'] == '2') :?>
|
||||
|
||||
|
||||
<?php else: ?>
|
||||
|
||||
<!--Start Wave Style1-->
|
||||
<section class="wave-style1">
|
||||
<div class="wave-style1__inner float-bob-x">
|
||||
<img src="<?php echo esc_url(wp_get_attachment_url($settings['wave_img']['id'])); ?>" alt="<?php bloginfo( 'name' ); ?>">
|
||||
</div>
|
||||
</section>
|
||||
<!--End Wave Style1-->
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
}
|
||||
}
|
||||
166
wp-content/plugins/thinkai-plugin/file_crop.php
Normal file
166
wp-content/plugins/thinkai-plugin/file_crop.php
Normal file
@@ -0,0 +1,166 @@
|
||||
<?php
|
||||
|
||||
if ( ! class_exists( 'Thinkai_Resizer' ) ) {
|
||||
|
||||
class Thinkai_Resizer {
|
||||
public function resize( $url, $width = null, $height = null, $crop = true, $align = 'c', $image_url = false, $retina = false, $class_custom = '' ) {
|
||||
global $wpdb;
|
||||
$common = $this->info( $url, $width, $height, $crop, $align, $retina );
|
||||
|
||||
if ( is_array( $common ) ) {
|
||||
extract( $common );
|
||||
} else {
|
||||
return $common;
|
||||
}
|
||||
if ( !file_exists( $dest_file_name ) ) {
|
||||
$query = $wpdb->prepare( "SELECT * FROM $wpdb->posts WHERE guid='%s'", $url );
|
||||
$get_attachment = $wpdb->get_results( $query );
|
||||
$editor = wp_get_image_editor( $file_path );
|
||||
if ( is_wp_error( $editor ) ) {
|
||||
if ( is_user_logged_in( ) )
|
||||
print_r( $editor );
|
||||
return null;
|
||||
}
|
||||
if ( $crop ) {
|
||||
$src_x = $src_y = 0;
|
||||
$src_w = $orig_width;
|
||||
$src_h = $orig_height;
|
||||
|
||||
$cmp_x = $orig_width / $dest_width;
|
||||
$cmp_y = $orig_height / $dest_height;
|
||||
if ( $cmp_x > $cmp_y ) {
|
||||
$src_w = round( $orig_width / $cmp_x * $cmp_y );
|
||||
$src_x = round( ( $orig_width - ( $orig_width / $cmp_x * $cmp_y ) ) / 2 );
|
||||
} else if ( $cmp_y > $cmp_x ) {
|
||||
$src_h = round( $orig_height / $cmp_y * $cmp_x );
|
||||
$src_y = round( ( $orig_height - ( $orig_height / $cmp_y * $cmp_x ) ) / 2 );
|
||||
}
|
||||
if ( $align && $align != 'c' ) {
|
||||
if ( strpos( $align, 't' ) !== false ) {
|
||||
$src_y = 0;
|
||||
}
|
||||
if ( strpos( $align, 'b' ) !== false ) {
|
||||
$src_y = $orig_height - $src_h;
|
||||
}
|
||||
if ( strpos( $align, 'l' ) !== false ) {
|
||||
$src_x = 0;
|
||||
}
|
||||
if ( strpos( $align, 'r' ) !== false ) {
|
||||
$src_x = $orig_width - $src_w;
|
||||
}
|
||||
}
|
||||
$editor->crop( $src_x, $src_y, $src_w, $src_h, $dest_width, $dest_height );
|
||||
} else {
|
||||
$editor->resize( $dest_width, $dest_height );
|
||||
}
|
||||
$saved = $editor->save( $dest_file_name );
|
||||
if ( is_wp_error( $saved ) ) {
|
||||
if ( is_user_logged_in( ) ) {
|
||||
print_r( $saved );
|
||||
unlink( $dest_file_name );
|
||||
}
|
||||
return null;
|
||||
}
|
||||
if ( $get_attachment ) {
|
||||
$metadata = wp_get_attachment_metadata( $get_attachment[0]->ID );
|
||||
if ( isset( $metadata['image_meta'] ) ) {
|
||||
$md = $saved['width'] . 'x' . $saved['height'];
|
||||
if ( $crop ) {
|
||||
$md .= ( $align ) ? "_${align}" : "_c";
|
||||
}
|
||||
$metadata['image_meta']['resized_images'][] = $md;
|
||||
wp_update_attachment_metadata( $get_attachment[0]->ID, $metadata );
|
||||
}
|
||||
}
|
||||
$resized_url = str_replace( basename( $url ), basename( $saved['path'] ), $url );
|
||||
} else {
|
||||
$resized_url = str_replace( basename( $url ), basename( $dest_file_name ), $url );
|
||||
}
|
||||
|
||||
if( $image_url )
|
||||
return $resized_url;
|
||||
else
|
||||
return '<img width="' . $width . '" height="' . $height . '" src="' . $resized_url . '" class="' . $class_custom . '" alt=""/>';
|
||||
}
|
||||
|
||||
public function info( $url, $width, $height, $crop, $align, $retina ) {
|
||||
if ( empty( $url ) ) {
|
||||
return is_user_logged_in( ) ? "" : null;
|
||||
}
|
||||
if ( preg_match( '/( \?|& )nocrop/', $url ) ) {
|
||||
return $url;
|
||||
}
|
||||
|
||||
$urlinfo = parse_url( $url );
|
||||
$wp_upload_dir = wp_upload_dir( );
|
||||
if ( preg_match( '/\/[0-9]{4}\/[0-9]{2}\/.+$/', $urlinfo['path'], $matches ) ) {
|
||||
$file_path = $wp_upload_dir['basedir'] . $matches[0];
|
||||
} else {
|
||||
$pathinfo = parse_url( $url );
|
||||
$uploads_dir = is_multisite( ) ? '/files/' : '/wp-content/';
|
||||
$file_path = ABSPATH . str_replace( dirname( $_SERVER['SCRIPT_NAME'] ) . '/', '', strstr( $pathinfo['path'], $uploads_dir ) );
|
||||
$file_path = preg_replace( '/( \/\/ )/', '/', $file_path );
|
||||
}
|
||||
|
||||
if ( !file_exists( $file_path ) ) {
|
||||
return null;
|
||||
}
|
||||
$size = is_user_logged_in( ) ? getimagesize( $file_path ) : @getimagesize( $file_path );
|
||||
if ( !$size ) {
|
||||
return is_user_logged_in( ) ? "getimagesize_error_common" : null;
|
||||
}
|
||||
list( $orig_width, $orig_height, $orig_type ) = $size;
|
||||
if ( $width && !$height ) {
|
||||
$height = floor( $orig_height * ( $width / $orig_width ) );
|
||||
} else if ( $height && !$width ) {
|
||||
$width = floor( $orig_width * ( $height / $orig_height ) );
|
||||
} else if ( !$width && !$height ) {
|
||||
return $url; // Return original url if no width/height provided
|
||||
}
|
||||
$retina = $retina ? ( $retina === true ? 2 : $retina ) : 1;
|
||||
$dest_width = $width * $retina;
|
||||
$dest_height = $height * $retina;
|
||||
$info = pathinfo( $file_path );
|
||||
$dir = $info['dirname'];
|
||||
$ext = $info['extension'];
|
||||
$name = wp_basename( $file_path, ".$ext" );
|
||||
$suffix = "${dest_width}x${dest_height}";
|
||||
if ( $crop ) {
|
||||
$suffix .= ( $align ) ? "_${align}" : "_c";
|
||||
}
|
||||
$dest_file_name = "${dir}/${name}-${suffix}.${ext}";
|
||||
return array(
|
||||
'dir' => $dir,
|
||||
'name' => $name,
|
||||
'ext' => $ext,
|
||||
'suffix' => $suffix,
|
||||
'orig_width' => $orig_width,
|
||||
'orig_height' => $orig_height,
|
||||
'orig_type' => $orig_type,
|
||||
'dest_width' => $dest_width,
|
||||
'dest_height' => $dest_height,
|
||||
'file_path' => $file_path,
|
||||
'dest_file_name' => $dest_file_name,
|
||||
);
|
||||
}
|
||||
|
||||
public function THINKAIPLUGIN_delResizer( $post_id ) {
|
||||
$metadata = wp_get_attachment_metadata( $post_id );
|
||||
if ( !$metadata ) {
|
||||
return;
|
||||
}
|
||||
if ( !isset( $metadata['file'] ) || !isset( $metadata['image_meta']['resized_images'] ) ) {
|
||||
return;
|
||||
}
|
||||
$wp_upload_dir = wp_upload_dir( );
|
||||
$pathinfo = pathWPFIXKAR_info( $metadata['file'] );
|
||||
$resized_images = $metadata['image_meta']['resized_images'];
|
||||
foreach ( $resized_images as $dims ) {
|
||||
$file = $wp_upload_dir['basedir'] . '/' . $pathinfo['dirname'] . '/' . $pathinfo['filename'] . '-' . $dims . '.' . $pathinfo['extension'];
|
||||
@unlink( $file );
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
/**
|
||||
* Abstract class for register post type
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Student2 Plugin
|
||||
* @author Shahbaz Ahmed <shahbazahmed9@hotmail.com>
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
namespace THINKAIPLUGIN\Inc\Abstracts;
|
||||
|
||||
|
||||
if ( ! function_exists( 'add_action' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Abstract Post Type
|
||||
* Implemented by classes using the same CRUD(s) pattern.
|
||||
*
|
||||
* @version 2.6.0
|
||||
* @package THINKAIPLUGIN/Abstracts
|
||||
* @category Abstract Class
|
||||
* @author Wptech
|
||||
*/
|
||||
abstract class Metabox {
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,171 @@
|
||||
<?php
|
||||
/**
|
||||
* Abstract class for register post type
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Student2 Plugin
|
||||
* @author Shahbaz Ahmed <shahbazahmed9@hotmail.com>
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
namespace THINKAIPLUGIN\Inc\Abstracts;
|
||||
|
||||
|
||||
if ( ! function_exists( 'add_action' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Abstract Post Type
|
||||
* Implemented by classes using the same CRUD(s) pattern.
|
||||
*
|
||||
* @version 2.6.0
|
||||
* @package THINKAIPLUGIN/Abstracts
|
||||
* @category Abstract Class
|
||||
* @author Wptech
|
||||
*/
|
||||
abstract class Post_Type {
|
||||
|
||||
protected $post_type = '';
|
||||
|
||||
protected $singular = '';
|
||||
|
||||
protected $plural = '';
|
||||
|
||||
protected $menu_icon = '';
|
||||
|
||||
protected $menu_name = '';
|
||||
|
||||
protected $only_admin = false;
|
||||
|
||||
protected $taxonomies = array();
|
||||
|
||||
protected $supports = array( 'title', 'thumbnail', 'editor' );
|
||||
|
||||
function __construct() {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* The register function is used the register post type finally.
|
||||
*
|
||||
* @return [type] [description]
|
||||
*/
|
||||
public function register() {
|
||||
|
||||
if ( ! $this->post_type ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$labels = array( 'labels' => $this->labels() );
|
||||
|
||||
$args = $this->args();
|
||||
$args = array_merge( $labels, $args );
|
||||
|
||||
register_post_type( $this->post_type, $args );
|
||||
}
|
||||
|
||||
/**
|
||||
* The args to set the post type.
|
||||
*
|
||||
* @return array Returns the array of arguments.
|
||||
*/
|
||||
public function args() {
|
||||
|
||||
$args = array( 'supports' => $this->supports(), 'rewrite' => $this->rewrites() );
|
||||
|
||||
if ( ! $this->only_admin ) {
|
||||
$args['public'] = true;
|
||||
}
|
||||
|
||||
if ( $taxonomies = $this->taxonomies ) {
|
||||
$args['taxonomies'] = $taxonomies;
|
||||
}
|
||||
|
||||
if ( $menu_icon = $this->menu_icon ) {
|
||||
$args['menu_icon'] = $menu_icon;
|
||||
}
|
||||
|
||||
return $args;
|
||||
}
|
||||
|
||||
public function supports() {
|
||||
return $this->supports;
|
||||
}
|
||||
|
||||
public function labels() {
|
||||
|
||||
$menu_name = $this->menu_name;
|
||||
if ( ! $menu_name ) {
|
||||
$menu_name = $this->plural;
|
||||
}
|
||||
$singular = $this->singular;
|
||||
$plural = $this->plural;
|
||||
|
||||
$labels = array(
|
||||
'name' => sprintf( _x( '%s', 'Post type general name', 'student-2-plugin' ), $plural ),
|
||||
'singular_name' => sprintf( _x( '%s', 'Post type singular name', 'student-2-plugin' ), $singular ),
|
||||
'menu_name' => sprintf( _x( '%s', 'Admin Menu text', 'student-2-plugin' ), $plural ),
|
||||
'name_admin_bar' => sprintf( _x( '%s', 'Add New on Toolbar', 'student-2-plugin' ), $singular ),
|
||||
'add_new' => sprintf( __( 'Add New', 'student-2-plugin' ) ),
|
||||
'add_new_item' => sprintf( __( 'Add New %s', 'student-2-plugin' ), $singular ),
|
||||
'new_item' => sprintf( __( 'New %s', 'student-2-plugin' ), $singular ),
|
||||
'edit_item' => sprintf( __( 'Edit %s', 'student-2-plugin' ), $singular ),
|
||||
'view_item' => sprintf( __( 'View %s', 'student-2-plugin' ), $singular ),
|
||||
'all_items' => sprintf( __( 'All %s', 'student-2-plugin' ), $plural ),
|
||||
'search_items' => sprintf( __( 'Search %s', 'student-2-plugin' ), $plural ),
|
||||
'parent_item_colon' => sprintf( __( 'Parent %s:', 'student-2-plugin' ), $plural ),
|
||||
'not_found' => sprintf( __( 'No %s found.', 'student-2-plugin' ), $plural ),
|
||||
'not_found_in_trash' => sprintf( __( 'No %s found in Trash.', 'student-2-plugin' ), $plural ),
|
||||
'featured_image' => sprintf( _x( '%s Cover Image', 'Overrides the “Featured Image” phrase for this post type. Added in 4.3', 'student-2-plugin' ), $singular ),
|
||||
'set_featured_image' => sprintf( _x( 'Set featured image', 'Overrides the “Set featured image” phrase for this post type. Added in 4.3', 'student-2-plugin' ), $singular ),
|
||||
'remove_featured_image' => sprintf( _x( 'Remove featured image', 'Overrides the “Remove featured image” phrase for this post type. Added in 4.3', 'student-2-plugin' ) ),
|
||||
'use_featured_image' => sprintf( _x( 'Use as featured image', 'Overrides the “Use as featured image” phrase for this post type. Added in 4.3', 'student-2-plugin' ) ),
|
||||
'archives' => sprintf( _x( '%s archives', 'The post type archive label used in nav menus. Default “Post Archives”. Added in 4.4', 'student-2-plugin' ), $singular ),
|
||||
'insert_into_item' => sprintf( _x( 'Insert into %s', 'Overrides the “Insert into post”/”Insert into page” phrase (used when inserting media into a post). Added in 4.4', 'student-2-plugin' ), $singular ),
|
||||
'uploaded_to_this_item' => sprintf( _x( 'Uploaded to this %s', 'Overrides the “Uploaded to this post”/”Uploaded to this page” phrase (used when viewing media attached to a post). Added in 4.4', 'student-2-plugin' ), $singular ),
|
||||
'filter_items_list' => sprintf( _x( 'Filter %s list', 'Screen reader text for the filter links heading on the post type listing screen. Default “Filter posts list”/”Filter pages list”. Added in 4.4', 'student-2-plugin' ), $singular ),
|
||||
'items_list_navigation' => sprintf( _x( '%s list navigation', 'Screen reader text for the pagination heading on the post type listing screen. Default “Posts list navigation”/”Pages list navigation”. Added in 4.4', 'student-2-plugin' ), $plural ),
|
||||
'items_list' => sprintf( _x( '%s list', 'Screen reader text for the items list heading on the post type listing screen. Default “Posts list”/”Pages list”. Added in 4.4', 'student-2-plugin' ), $plural ),
|
||||
);
|
||||
|
||||
if ( $menu_name ) {
|
||||
$labels['menu_name'] = $menu_name;
|
||||
}
|
||||
|
||||
return $labels;
|
||||
}
|
||||
|
||||
public function rewrites() {
|
||||
|
||||
return array(
|
||||
'slug' => $this->get_prop( __CLASS__, 'post_type' ),
|
||||
);
|
||||
}
|
||||
|
||||
static function get_prop( $className, $property ) {
|
||||
if ( ! class_exists( $className ) ) {
|
||||
return null;
|
||||
}
|
||||
if ( ! property_exists( $className, $property ) ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$vars = get_class_vars( $className );
|
||||
|
||||
return $vars[ $property ];
|
||||
}
|
||||
|
||||
function set_prop( $className, $property ) {
|
||||
if ( ! class_exists( $className ) ) {
|
||||
return null;
|
||||
}
|
||||
if ( ! property_exists( $className, $property ) ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$vars = get_class_vars( $className );
|
||||
|
||||
return $vars[ $property ];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,203 @@
|
||||
<?php
|
||||
/**
|
||||
* Abstract class for register post type
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Student2 Plugin
|
||||
* @author Shahbaz Ahmed <shahbazahmed9@hotmail.com>
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
namespace THINKAIPLUGIN\Inc\Abstracts;
|
||||
|
||||
|
||||
if ( ! function_exists( 'add_action' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Abstract Post Type
|
||||
* Implemented by classes using the same CRUD(s) pattern.
|
||||
*
|
||||
* @version 2.6.0
|
||||
* @package THINKAIPLUGIN/Abstracts
|
||||
* @category Abstract Class
|
||||
* @author Wptech
|
||||
*/
|
||||
abstract class Taxonomy {
|
||||
|
||||
protected $taxonomy = '';
|
||||
|
||||
protected $singular = '';
|
||||
|
||||
protected $plural = '';
|
||||
|
||||
protected $menu_name = '';
|
||||
|
||||
protected $post_types = array();
|
||||
|
||||
protected $labels = array();
|
||||
|
||||
protected $admin_only = false;
|
||||
|
||||
protected $args = array();
|
||||
|
||||
protected $supports = array();
|
||||
|
||||
protected $rewrite = array();
|
||||
|
||||
protected $show_in_table = false;
|
||||
|
||||
protected $hierarchical = false;
|
||||
|
||||
function instance( $taxonomy, $singular, $plural ) {
|
||||
|
||||
$this->taxonomy = $taxonomy;
|
||||
|
||||
$this->singular = $singular;
|
||||
|
||||
$this->plural = $plural;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The register function is used the register post type finally.
|
||||
*
|
||||
* @return [type] [description]
|
||||
*/
|
||||
public function register() {
|
||||
|
||||
if ( ! $this->taxonomy ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$labels = array( 'labels' => ( $this->labels ) ? $this->labels : $this->labels() );
|
||||
|
||||
$args = ( $this->args ) ? $this->args : $this->args();
|
||||
|
||||
$args = array_merge( $labels, $args );
|
||||
|
||||
$post_types = $this->post_types ? $this->post_types : array( 'post' );
|
||||
|
||||
register_taxonomy( $this->taxonomy, $post_types, $args );
|
||||
}
|
||||
|
||||
/**
|
||||
* The args to set the post type.
|
||||
*
|
||||
* @return array Returns the array of arguments.
|
||||
*/
|
||||
public function args() {
|
||||
|
||||
$args = array(
|
||||
'supports' => ( $this->supports ) ? $this->supports : $this->supports(),
|
||||
'rewrite' => ( $this->rewrite ) ? $this->rewrite : $this->rewrites(),
|
||||
);
|
||||
|
||||
if ( $this->admin_only ) {
|
||||
$args['public'] = false;
|
||||
}
|
||||
|
||||
|
||||
return $args;
|
||||
}
|
||||
|
||||
public function supports() {
|
||||
|
||||
return array( 'title', 'thumbnail', 'editor' );
|
||||
}
|
||||
|
||||
public function labels() {
|
||||
|
||||
$menu_name = $this->menu_name;
|
||||
if ( ! $menu_name ) {
|
||||
$menu_name = $this->plural;
|
||||
}
|
||||
$singular = $this->singular;
|
||||
$plural = $this->plural;
|
||||
|
||||
$labels = array(
|
||||
'name' => sprintf( _x( '%s', 'taxonomy general name', 'student-2-plugin' ), $plural ),
|
||||
'singular_name' => sprintf( _x( '%s', 'taxonomy singular name', 'student-2-plugin' ), $singular ),
|
||||
'search_items' => sprintf( __( 'Search %s', 'student-2-plugin' ), $plural ),
|
||||
'all_items' => sprintf( __( 'All %s', 'student-2-plugin' ), $plural ),
|
||||
'parent_item' => sprintf( __( 'Parent %s', 'student-2-plugin' ), $singular ),
|
||||
'parent_item_colon' => sprintf( __( 'Parent %s:', 'student-2-plugin' ), $singular ),
|
||||
'edit_item' => sprintf( __( 'Edit %s', 'student-2-plugin' ), $singular ),
|
||||
'update_item' => sprintf( __( 'Update %s', 'student-2-plugin' ), $singular ),
|
||||
'add_new_item' => sprintf( __( 'Add New %s', 'student-2-plugin' ), $singular ),
|
||||
'new_item_name' => sprintf( __( 'New %s Name', 'student-2-plugin' ), $singular ),
|
||||
'menu_name' => sprintf( __( '%s', 'student-2-plugin' ), $singular ),
|
||||
);
|
||||
|
||||
if ( $menu_name ) {
|
||||
$labels['menu_name'] = $menu_name;
|
||||
}
|
||||
|
||||
return $labels;
|
||||
}
|
||||
|
||||
public function rewrites() {
|
||||
|
||||
return array(
|
||||
'slug' => $this->taxonomy,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
function set_labels( $labels = array() ) {
|
||||
|
||||
$this->labels = array_merge( $labels, $this->labels() );
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
function set_supports( $supports = array() ) {
|
||||
|
||||
$this->supports = $supports;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
function set_rewrite( $rewrites = array() ) {
|
||||
|
||||
$this->rewrite = $rewrites;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
function set_args( $args = array() ) {
|
||||
|
||||
$this->args = array_merge( $args, $this->args() );
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
function admin_only() {
|
||||
$this->admin_only = true;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
function set_post_type( $post_type ) {
|
||||
|
||||
$this->post_types = $post_type;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
function show_in_table() {
|
||||
|
||||
$this->show_in_table = true;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
function hierarchical() {
|
||||
|
||||
$this->hierarchical = true;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,409 @@
|
||||
<?php
|
||||
// don't load directly
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
/**
|
||||
* Price calculation for single tour
|
||||
* @since 1.0.0
|
||||
*/
|
||||
if(!class_exists('Tour_Price')){
|
||||
class Tour_Price {
|
||||
public $group;
|
||||
public $wc_group;
|
||||
public $sale_group;
|
||||
public $wc_sale_group;
|
||||
public $adult;
|
||||
public $wc_adult;
|
||||
public $sale_adult;
|
||||
public $wc_sale_adult;
|
||||
public $child;
|
||||
public $wc_child;
|
||||
public $sale_child;
|
||||
public $wc_sale_child;
|
||||
public $infant;
|
||||
public $wc_infant;
|
||||
public $sale_infant;
|
||||
public $wc_sale_infant;
|
||||
public $meta;
|
||||
|
||||
function __construct($meta) {
|
||||
|
||||
# Get tour type
|
||||
$tour_type = !empty($meta['type']) ? $meta['type'] : 'continuous';
|
||||
|
||||
# Custom availability status
|
||||
if($tour_type == 'continuous') {
|
||||
$custom_avail = !empty($meta['custom_avail']) ? $meta['custom_avail'] : false;
|
||||
}
|
||||
|
||||
# Get discounts
|
||||
$discount_type = !empty($meta['discount_type']) ? $meta['discount_type'] : 'none';
|
||||
$discounted_price = !empty($meta['discount_price']) ? $meta['discount_price'] : 0;
|
||||
|
||||
/**
|
||||
* Price calculation based on custom availability
|
||||
*
|
||||
* Custom availability has different pricing calculation
|
||||
*/
|
||||
if($tour_type == 'continuous' && $custom_avail == true) {
|
||||
|
||||
# Get pricing rule person/group
|
||||
$pricing_rule = !empty($meta['custom_pricing_by']) ? $meta['custom_pricing_by'] : 'person';
|
||||
|
||||
/**
|
||||
* Price calculation based on pricing rule
|
||||
*/
|
||||
if($pricing_rule == 'group') {
|
||||
if(!empty($meta['cont_custom_date']) && gettype($meta['cont_custom_date'])=="string"){
|
||||
$tf_tour_cont_custom_date = preg_replace_callback ( '!s:(\d+):"(.*?)";!', function($match) {
|
||||
return ($match[1] == strlen($match[2])) ? $match[0] : 's:' . strlen($match[2]) . ':"' . $match[2] . '";';
|
||||
}, $meta['cont_custom_date'] );
|
||||
$tf_tour_custom_date = unserialize( $tf_tour_cont_custom_date );
|
||||
|
||||
$group_prices_array = array_column($tf_tour_custom_date, 'group_price');
|
||||
}else{
|
||||
# Get group price from all the arrays
|
||||
$group_prices_array = is_array($meta['cont_custom_date']) ? array_column($meta['cont_custom_date'], 'group_price') : 0;
|
||||
}
|
||||
# Get minimum group price
|
||||
$min_group_price = is_array($group_prices_array) ? min($group_prices_array) : 0;
|
||||
# Get maximum group price
|
||||
$max_group_price = is_array($group_prices_array) ? max($group_prices_array) : 0;
|
||||
|
||||
# Discount price calculation
|
||||
if($discount_type == 'percent') {
|
||||
|
||||
$sale_min_group_price = number_format( $min_group_price - (( $min_group_price / 100 ) * $discounted_price) , 2, '.', '' );
|
||||
$sale_max_group_price = number_format( $max_group_price - (( $max_group_price / 100 ) * $discounted_price) , 2, '.', '' );
|
||||
|
||||
} else if($discount_type == 'fixed') {
|
||||
|
||||
$sale_min_group_price = number_format( ( $min_group_price - $discounted_price ), 2, '.', '' );
|
||||
$sale_max_group_price = number_format( ( $max_group_price - $discounted_price ), 2, '.', '' );
|
||||
|
||||
}
|
||||
|
||||
if($discount_type == 'percent' || $discount_type == 'fixed') {
|
||||
|
||||
|
||||
# WooCommerce Regular Price
|
||||
$wc_regular_min_group_price = wc_price($min_group_price );
|
||||
$wc_regular_max_group_price = wc_price($max_group_price );
|
||||
|
||||
# Final output Regular (price range)
|
||||
if(!empty($wc_regular_min_group_price) && !empty($wc_regular_max_group_price)) {
|
||||
$price = ($wc_regular_min_group_price != $wc_regular_max_group_price) ? $wc_regular_min_group_price. '-' .$wc_regular_max_group_price : $wc_regular_min_group_price; // Discounted price range
|
||||
}
|
||||
if(!empty($wc_regular_min_group_price) && !empty($wc_regular_max_group_price)) {
|
||||
$wc_price = ($wc_regular_min_group_price != $wc_regular_max_group_price) ? $wc_regular_min_group_price. '-' .$wc_regular_max_group_price : $wc_regular_min_group_price; // Discounted WooCommerce price range
|
||||
}
|
||||
|
||||
# WooCommerce Price
|
||||
$wc_min_group_price = wc_price( $sale_min_group_price );
|
||||
$wc_max_group_price = wc_price( $sale_max_group_price );
|
||||
|
||||
# Final output (price range)
|
||||
if(!empty($sale_min_group_price) && !empty($sale_max_group_price)) {
|
||||
$sale_price = ($sale_min_group_price != $sale_max_group_price) ? $sale_min_group_price. '-' .$sale_max_group_price : $sale_min_group_price; // Discounted price range
|
||||
}
|
||||
if(!empty($wc_min_group_price) && !empty($wc_max_group_price)) {
|
||||
$wc_sale_price = ($wc_min_group_price != $wc_max_group_price) ? $wc_min_group_price. '-' .$wc_max_group_price : $wc_min_group_price; // Discounted WooCommerce price range
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
# WooCommerce Price
|
||||
$wc_min_group_price = wc_price($min_group_price);
|
||||
$wc_max_group_price = wc_price($max_group_price);
|
||||
|
||||
# Final output (price range)
|
||||
if(!empty($min_group_price) && !empty($max_group_price)) {
|
||||
$price = ($min_group_price != $max_group_price) ? $min_group_price. '-' .$max_group_price : $min_group_price; // Price range
|
||||
}
|
||||
if(!empty($wc_min_group_price) && !empty($wc_max_group_price)) {
|
||||
$wc_price = ($wc_min_group_price != $wc_max_group_price) ? $wc_min_group_price. '-' .$wc_max_group_price : $wc_min_group_price; // WooCommerce price range
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} else if($pricing_rule == 'person') {
|
||||
|
||||
# Get adult, child, infant price from all the arrays
|
||||
if(!empty($meta['cont_custom_date']) && gettype($meta['cont_custom_date'])=="string"){
|
||||
$tf_tour_cont_custom_date = preg_replace_callback ( '!s:(\d+):"(.*?)";!', function($match) {
|
||||
return ($match[1] == strlen($match[2])) ? $match[0] : 's:' . strlen($match[2]) . ':"' . $match[2] . '";';
|
||||
}, $meta['cont_custom_date'] );
|
||||
$tf_tour_custom_date = unserialize( $tf_tour_cont_custom_date );
|
||||
$adult_price_array = is_array($tf_tour_custom_date) ? array_column($tf_tour_custom_date, 'adult_price') : 0;
|
||||
$child_price_array = is_array($tf_tour_custom_date) ? array_column($tf_tour_custom_date, 'child_price') : 0;
|
||||
$infant_price_array = is_array($tf_tour_custom_date) ? array_column($tf_tour_custom_date, 'infant_price') : 0;
|
||||
}else{
|
||||
$adult_price_array = is_array($meta['cont_custom_date']) ? array_column($meta['cont_custom_date'], 'adult_price') : 0;
|
||||
$child_price_array = is_array($meta['cont_custom_date']) ? array_column($meta['cont_custom_date'], 'child_price') : 0;
|
||||
$infant_price_array = is_array($meta['cont_custom_date']) ? array_column($meta['cont_custom_date'], 'infant_price') : 0;
|
||||
}
|
||||
|
||||
# Get minimum price of adult, child, infant
|
||||
$min_adult_price = !empty($adult_price_array) ? min($adult_price_array) : 0;
|
||||
$min_child_price = !empty($child_price_array) ? min($child_price_array) : 0;
|
||||
$min_infant_price = !empty($infant_price_array) ? min($infant_price_array) : 0;
|
||||
|
||||
# Get maximum price of adult, child, infant
|
||||
$max_adult_price = !empty($adult_price_array) ? max($adult_price_array) : 0;
|
||||
$max_child_price = !empty($child_price_array) ? max($child_price_array) : 0;
|
||||
$max_infant_price = !empty($infant_price_array) ? max($infant_price_array): 0;
|
||||
|
||||
# Discount price calculation
|
||||
if($discount_type == 'percent') {
|
||||
|
||||
# Minimum discounted price
|
||||
$sale_min_adult_price = !empty($min_adult_price) ? number_format( $min_adult_price - (( $min_adult_price / 100 ) * $discounted_price) , 2, '.', '' ) : '';
|
||||
$sale_min_child_price = !empty($min_child_price) ? number_format( $min_child_price - (( $min_child_price / 100 ) * $discounted_price) , 2, '.', '' ) : '';
|
||||
$sale_min_infant_price = !empty($min_infant_price) ? number_format( $min_infant_price - (( $min_infant_price / 100 ) * $discounted_price) , 2, '.', '' ) : '';
|
||||
# Maximum discounted price
|
||||
$sale_max_adult_price = !empty($max_adult_price) ? number_format( $max_adult_price - (( $max_adult_price / 100 ) * $discounted_price) , 2, '.', '' ) : '';
|
||||
$sale_max_child_price = !empty($max_child_price) ? number_format( $max_child_price - (( $max_child_price / 100 ) * $discounted_price) , 2, '.', '' ) : '';
|
||||
$sale_max_infant_price = !empty($max_infant_price) ? number_format( $max_infant_price - (( $max_infant_price / 100 ) * $discounted_price) , 2, '.', '' ) : '';
|
||||
|
||||
} else if($discount_type == 'fixed') {
|
||||
|
||||
# Minimum discounted price
|
||||
$sale_min_adult_price = !empty($min_adult_price) ? number_format( ( $min_adult_price - $discounted_price ), 2, '.', '' ) : '';
|
||||
$sale_min_child_price = !empty($min_child_price) ? number_format( ( $min_child_price - $discounted_price ), 2, '.', '' ) : '';
|
||||
$sale_min_infant_price = !empty($min_infant_price) ? number_format( ( $min_infant_price - $discounted_price ), 2, '.', '' ) : '';
|
||||
# Maximum discounted price
|
||||
$sale_max_adult_price = !empty($max_adult_price) ? number_format( ( $max_adult_price - $discounted_price ), 2, '.', '' ) : '';
|
||||
$sale_max_child_price = !empty($max_child_price) ? number_format( ( $max_child_price - $discounted_price ), 2, '.', '' ) : '';
|
||||
$sale_max_infant_price = !empty($max_infant_price) ? number_format( ( $max_infant_price - $discounted_price ), 2, '.', '' ) : '';
|
||||
|
||||
}
|
||||
|
||||
if($discount_type == 'percent' || $discount_type == 'fixed') {
|
||||
|
||||
# WooCommerce Price
|
||||
$wc_min_adult_price = wc_price($sale_min_adult_price);
|
||||
$wc_min_child_price = wc_price($sale_min_child_price);
|
||||
$wc_min_infant_price = wc_price($sale_min_infant_price);
|
||||
|
||||
$wc_max_adult_price = wc_price($sale_max_adult_price);
|
||||
$wc_max_child_price = wc_price($sale_max_child_price);
|
||||
$wc_max_infant_price = wc_price($sale_max_infant_price);
|
||||
|
||||
# Final output (price range)
|
||||
if(!empty($sale_min_adult_price) && !empty($sale_max_adult_price)) {
|
||||
$sale_adult_price = ($sale_min_adult_price != $sale_min_adult_price) ? $sale_min_adult_price. '-' .$sale_max_adult_price : $sale_min_adult_price; // Discounted price range
|
||||
}
|
||||
if(!empty($sale_min_child_price) && !empty($sale_max_child_price)) {
|
||||
$sale_child_price = ($sale_min_child_price != $sale_max_child_price) ? $sale_min_child_price. '-' .$sale_max_child_price : $sale_min_child_price; // Discounted price range
|
||||
}
|
||||
if(!empty($sale_min_infant_price) && !empty($sale_max_infant_price)) {
|
||||
$sale_infant_price = ($sale_min_infant_price != $sale_max_infant_price) ? $sale_min_infant_price. '-' .$sale_max_infant_price : $sale_min_infant_price; // Discounted price range
|
||||
}
|
||||
|
||||
if(!empty($wc_min_adult_price) && !empty($wc_max_adult_price)) {
|
||||
$wc_sale_adult_price = ($wc_min_adult_price != $wc_max_adult_price) ? $wc_min_adult_price. '-' .$wc_max_adult_price : $wc_min_adult_price; // Discounted WooCommerce price range
|
||||
}
|
||||
if(!empty($wc_min_child_price) && !empty($wc_max_child_price)) {
|
||||
$wc_sale_child_price = ($wc_min_child_price != $wc_max_child_price) ? $wc_min_child_price. '-' .$wc_max_child_price : $wc_min_child_price; // Discounted WooCommerce price range
|
||||
}
|
||||
if(!empty($wc_min_infant_price) && !empty($wc_max_infant_price)) {
|
||||
$wc_sale_infant_price = ($wc_min_infant_price != $wc_max_infant_price) ? $wc_min_infant_price. '-' .$wc_max_infant_price : $wc_min_infant_price; // Discounted WooCommerce price range
|
||||
}
|
||||
}
|
||||
|
||||
# WooCommerce Price
|
||||
$wc_min_adult_price = wc_price($min_adult_price);
|
||||
$wc_min_child_price = wc_price($min_child_price);
|
||||
$wc_min_infant_price = wc_price($min_infant_price);
|
||||
|
||||
$wc_max_adult_price = wc_price($max_adult_price);
|
||||
$wc_max_child_price = wc_price($max_child_price);
|
||||
$wc_max_infant_price = wc_price($max_infant_price);
|
||||
|
||||
# Final output (price range)
|
||||
if(!empty($min_adult_price) && !empty($max_adult_price)) {
|
||||
$adult_price = ($min_adult_price != $max_adult_price) ? $min_adult_price. '-' .$max_adult_price : $min_adult_price; // Price range
|
||||
}
|
||||
if(!empty($min_child_price) && !empty($max_child_price)) {
|
||||
$child_price = ($min_child_price != $max_child_price) ? $min_child_price. '-' .$max_child_price : $min_child_price; // Price range
|
||||
}
|
||||
if(!empty($min_infant_price) && !empty($max_infant_price)) {
|
||||
$infant_price = ($min_infant_price != $min_infant_price) ? $min_infant_price. '-' .$max_infant_price : $min_infant_price; // Price range
|
||||
}
|
||||
|
||||
if(!empty($wc_min_adult_price) && !empty($wc_max_adult_price)) {
|
||||
$wc_adult_price = ($wc_min_adult_price != $wc_max_adult_price) ? $wc_min_adult_price. '-' .$wc_max_adult_price : $wc_min_adult_price; // WooCommerce price range
|
||||
}
|
||||
if(!empty($wc_min_child_price) && !empty($wc_max_child_price)) {
|
||||
$wc_child_price = ($wc_min_child_price != $wc_max_child_price) ? $wc_min_child_price. '-' .$wc_max_child_price : $wc_min_child_price; // WooCommerce price range
|
||||
}
|
||||
if(!empty($wc_min_infant_price) && !empty($wc_max_infant_price)) {
|
||||
$wc_infant_price = ($wc_min_infant_price != $wc_max_infant_price) ? $wc_min_infant_price. '-' .$wc_max_infant_price : $wc_min_infant_price; // WooCommerce price range
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
/**
|
||||
* Pricing for fixed/continuous
|
||||
*/
|
||||
|
||||
# Get pricing rule person/group
|
||||
$pricing_rule = !empty($meta['pricing']) ? $meta['pricing'] : 'person';
|
||||
|
||||
/**
|
||||
* Price calculation based on pricing rule
|
||||
*/
|
||||
if($pricing_rule == 'group') {
|
||||
|
||||
# Get group price. Default 0
|
||||
$price = !empty($meta['group_price']) ? $meta['group_price'] : 0;
|
||||
|
||||
if($discount_type == 'percent') {
|
||||
$sale_price = number_format( $price - (( $price / 100 ) * $discounted_price) , 2, '.', '' );
|
||||
} else if($discount_type == 'fixed') {
|
||||
$sale_price = number_format( ( $price - $discounted_price ), 2, '.', '' );
|
||||
}
|
||||
|
||||
# WooCommerce Price
|
||||
$wc_price = wc_price($price);
|
||||
|
||||
if($discount_type == 'percent' || $discount_type == 'fixed') {
|
||||
$wc_sale_price = wc_price($sale_price);
|
||||
}
|
||||
|
||||
} else if($pricing_rule == 'person') {
|
||||
|
||||
$adult_price = !empty($meta['adult_price']) ? $meta['adult_price'] : 0;
|
||||
$child_price = !empty($meta['child_price']) ? $meta['child_price'] : 0;
|
||||
$infant_price = !empty($meta['infant_price']) ? $meta['infant_price'] : 0;
|
||||
|
||||
if($discount_type == 'percent') {
|
||||
|
||||
$adult_price ? $sale_adult_price = number_format( $adult_price - (( $adult_price / 100 ) * $discounted_price) , 2, '.', '' ) : 0;
|
||||
$child_price ? $sale_child_price = number_format( $child_price - (( $child_price / 100 ) * $discounted_price) , 2, '.', '' ) : 0;
|
||||
$infant_price ? $sale_infant_price = number_format( $infant_price - (( $infant_price / 100 ) * $discounted_price) , 2, '.', '' ) : 0;
|
||||
|
||||
} else if($discount_type == 'fixed') {
|
||||
|
||||
$adult_price ? $sale_adult_price = number_format( ( $adult_price - $discounted_price ), 2, '.', '' ) : 0;
|
||||
$child_price ? $sale_child_price = number_format( ( $child_price - $discounted_price ), 2, '.', '' ) : 0;
|
||||
$infant_price ? $sale_infant_price = number_format( ( $infant_price - $discounted_price ), 2, '.', '' ) : 0;
|
||||
|
||||
}
|
||||
|
||||
# WooCommerce Price
|
||||
$wc_adult_price = wc_price($adult_price);
|
||||
$wc_child_price = wc_price($child_price);
|
||||
$wc_infant_price = wc_price($infant_price);
|
||||
|
||||
if($discount_type == 'percent' || $discount_type == 'fixed') {
|
||||
$wc_sale_adult_price = !empty($sale_adult_price) ? wc_price($sale_adult_price) : 0;
|
||||
$wc_sale_child_price = !empty($sale_child_price) ? wc_price($sale_child_price) : 0;
|
||||
$wc_sale_infant_price = !empty($sale_infant_price) ? wc_price($sale_infant_price) : 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$this->group = $price ?? null;
|
||||
$this->wc_group = $wc_price ?? null;
|
||||
$this->sale_group = $sale_price ?? null;
|
||||
$this->wc_sale_group = $wc_sale_price ?? null;
|
||||
$this->adult = $adult_price ?? null;
|
||||
$this->wc_adult = $wc_adult_price ?? null;
|
||||
$this->sale_adult = $sale_adult_price ?? null;
|
||||
$this->wc_sale_adult = $wc_sale_adult_price ?? null;
|
||||
$this->child = $child_price ?? null;
|
||||
$this->wc_child = $wc_child_price ?? null;
|
||||
$this->sale_child = $sale_child_price ?? null;
|
||||
$this->wc_sale_child = $wc_sale_child_price ?? null;
|
||||
$this->infant = $infant_price ?? null;
|
||||
$this->wc_infant = $wc_infant_price ?? null;
|
||||
$this->sale_infant = $sale_infant_price ?? null;
|
||||
$this->wc_sale_infant = $wc_sale_infant_price ?? null;
|
||||
|
||||
}
|
||||
|
||||
# Group regular price
|
||||
function group() {
|
||||
return $this->group;
|
||||
}
|
||||
|
||||
# Group WC regular price
|
||||
function wc_group() {
|
||||
return $this->wc_group;
|
||||
}
|
||||
|
||||
# Group sale price
|
||||
function sale_group() {
|
||||
return $this->sale_group;
|
||||
}
|
||||
|
||||
# Group WC sale price
|
||||
function wc_sale_group() {
|
||||
return $this->wc_sale_group;
|
||||
}
|
||||
|
||||
# Adult regular price
|
||||
function adult() {
|
||||
return $this->adult;
|
||||
}
|
||||
|
||||
# Adult WC regular price
|
||||
function wc_adult() {
|
||||
return $this->wc_adult;
|
||||
}
|
||||
|
||||
# Adult sale price
|
||||
function sale_adult() {
|
||||
return $this->sale_adult;
|
||||
}
|
||||
|
||||
# Adult WC sale price
|
||||
function wc_sale_adult() {
|
||||
return $this->wc_sale_adult;
|
||||
}
|
||||
|
||||
# Child regular price
|
||||
function child() {
|
||||
return $this->child;
|
||||
}
|
||||
|
||||
# Child WC regular price
|
||||
function wc_child() {
|
||||
return $this->wc_child;
|
||||
}
|
||||
|
||||
# Child sale price
|
||||
function sale_child() {
|
||||
return $this->sale_child;
|
||||
}
|
||||
|
||||
# Child WC sale price
|
||||
function wc_sale_child() {
|
||||
return $this->wc_sale_child;
|
||||
}
|
||||
|
||||
# Infant regular price
|
||||
function infant() {
|
||||
return $this->infant;
|
||||
}
|
||||
|
||||
# Infant WC regular price
|
||||
function wc_infant() {
|
||||
return $this->wc_infant;
|
||||
}
|
||||
|
||||
# Infant sale price
|
||||
function sale_infant() {
|
||||
return $this->sale_infant;
|
||||
}
|
||||
|
||||
# Infant WC sale price
|
||||
function wc_sale_infant() {
|
||||
return $this->wc_sale_infant;
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
class Elementor_Layout_Control extends \Elementor\Base_Data_Control {
|
||||
|
||||
public function get_type() {
|
||||
return 'elementor-layout-control';
|
||||
}
|
||||
|
||||
public function enqueue() {
|
||||
wp_enqueue_style( 'layout-control-css', YT_URL . 'assets/css/layout-control.css', [], '1.0.0' );
|
||||
wp_enqueue_script( 'layout-control-js', YT_URL . 'assets/js/layout-control.js', [ 'jquery' ], '1.0.0' );
|
||||
}
|
||||
|
||||
protected function get_default_settings() {
|
||||
return [
|
||||
'label_block' => true,
|
||||
'rows' => 3,
|
||||
'layoutcontrol_options' => [],
|
||||
];
|
||||
print_r( 'layoutcontrol_options' ); exit( 'asdf' );
|
||||
}
|
||||
|
||||
public function content_template() {
|
||||
$control_uid = $this->get_control_uid();
|
||||
?>
|
||||
<div class="elementor-control-field">
|
||||
<label for="<?php echo esc_attr( $control_uid ); ?>" class="elementor-control-title">{{{ data.label }}}</label>
|
||||
<div class="elementor-control-input-wrapper">
|
||||
<#
|
||||
if ( data.options ) {
|
||||
_.each( data.options, function( value, key ) {
|
||||
var selected = '';
|
||||
if(data.controlValue == key){
|
||||
selected = 'selected';
|
||||
}
|
||||
#>
|
||||
<div class="radio-image-item {{ selected }}">
|
||||
<input id="{{ data.name }}-{{ key }}" type="radio" class="field-radio-image" value="{{ key }}" name="{{ data.name }}" data-setting="{{ data.name }}" {{ selected }} />
|
||||
<label for="{{ data.name }}-{{ key }}">
|
||||
<img src="{{ value.image }}" alt="{{ value.label }}">
|
||||
</label>
|
||||
</div>
|
||||
<#
|
||||
});
|
||||
}
|
||||
#>
|
||||
</div>
|
||||
</div>
|
||||
<# if ( data.description ) { #>
|
||||
<div class="elementor-control-field-description">{{{ data.description }}}</div>
|
||||
<# } #>
|
||||
<?php
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<dwsync>
|
||||
<file name="widgets.php" server="ftp.wp1.themevibrant.com//newwp/chirokind/wp-content/" local="133349340897602746" remote="133349016600000000" Dst="0" />
|
||||
<file name="functions.php" server="ftp.wp1.themevibrant.com//newwp/chirokind/wp-content/" local="133353612480822595" remote="133353288000000000" Dst="0" />
|
||||
<file name="functions.php" server="ftp.yogsthemes.com//arid/wp-content/" local="133453859541162614" remote="133453537200000000" Dst="0" />
|
||||
<file name="widgets.php" server="ftp.yogsthemes.com//arid/wp-content/" local="133455696512428893" remote="133455372000000000" Dst="0" />
|
||||
<file name="functions.php" server="ftp.wp1.yogsthemes.com//arid/wp-content/" local="133483978663509793" remote="133483798200000000" Dst="0" />
|
||||
<file name="widgets.php" server="ftp.wp1.yogsthemes.com//arid/wp-content/" local="133486180815036803" remote="133486000800000000" Dst="0" />
|
||||
</dwsync>
|
||||
514
wp-content/plugins/thinkai-plugin/inc/helpers/functions.php
Normal file
514
wp-content/plugins/thinkai-plugin/inc/helpers/functions.php
Normal file
@@ -0,0 +1,514 @@
|
||||
<?php
|
||||
function get_fontawesome_icons()
|
||||
{
|
||||
// scrape list of icons from bootstrap css
|
||||
|
||||
$pattern = '/\.(fa-(?:\w+(?:-)?)+):before\s+{\s*content:\s*"(.+)";\s+}/';
|
||||
$subject = file_get_contents(get_template_directory() . '/assets/vendors/fontawesome/css/all.min.css');
|
||||
preg_match_all($pattern, $subject, $matches, PREG_SET_ORDER);
|
||||
$icons = array();
|
||||
//fontawesome
|
||||
foreach($matches as $match)
|
||||
{
|
||||
$icons[] = array('value' => 'bi '.$match[1], 'label' => $match[1]);
|
||||
}
|
||||
|
||||
//Flaticon
|
||||
$et_matches = get_et_icons();
|
||||
foreach($et_matches as $match)
|
||||
{
|
||||
$icons[] = array('value' => 'icon '.$match[1], 'label' => $match[1]);
|
||||
}
|
||||
|
||||
$icons = array_column($icons, 'label', 'value');
|
||||
//print_r($icons); exit('hellow');
|
||||
return $icons;
|
||||
}
|
||||
|
||||
//Icomoon Icons
|
||||
function get_et_icons()
|
||||
{
|
||||
$pattern = '/\.(icon-(?:\w+(?:-)?)+):before\s*{\s*content/';
|
||||
$subject = file_get_contents(get_template_directory() . '/assets/vendors/thm-icons/style.css');
|
||||
preg_match_all($pattern, $subject, $matches, PREG_SET_ORDER);
|
||||
return $matches;
|
||||
}
|
||||
|
||||
|
||||
//get blog categories
|
||||
function get_blog_categories() {
|
||||
$options = array();
|
||||
$taxonomy = 'category';
|
||||
if (!empty($taxonomy)) {
|
||||
$terms = get_terms(
|
||||
array(
|
||||
'parent' => 0,
|
||||
'taxonomy' => $taxonomy,
|
||||
'hide_empty' => false,
|
||||
)
|
||||
);
|
||||
if (!empty($terms)) {
|
||||
foreach ($terms as $term) {
|
||||
if (isset($term)) {
|
||||
$options[''] = 'Select';
|
||||
if (isset($term->slug) && isset($term->name)) {
|
||||
$options[$term->slug] = $term->name;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $options;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//get Project categories
|
||||
function get_project_categories() {
|
||||
$options = array();
|
||||
$taxonomy = 'project_cat';
|
||||
if (!empty($taxonomy)) {
|
||||
$terms = get_terms(
|
||||
array(
|
||||
'parent' => 0,
|
||||
'taxonomy' => $taxonomy,
|
||||
'hide_empty' => false,
|
||||
)
|
||||
);
|
||||
if (!empty($terms)) {
|
||||
foreach ($terms as $term) {
|
||||
if (isset($term)) {
|
||||
$options[''] = 'Select';
|
||||
if (isset($term->slug) && isset($term->name)) {
|
||||
$options[$term->slug] = $term->name;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $options;
|
||||
}
|
||||
|
||||
|
||||
//get Testimonials categories
|
||||
function get_testimonials_categories() {
|
||||
$options = array();
|
||||
$taxonomy = 'testimonials_cat';
|
||||
if (!empty($taxonomy)) {
|
||||
$terms = get_terms(
|
||||
array(
|
||||
'parent' => 0,
|
||||
'taxonomy' => $taxonomy,
|
||||
'hide_empty' => false,
|
||||
)
|
||||
);
|
||||
if (!empty($terms)) {
|
||||
foreach ($terms as $term) {
|
||||
if (isset($term)) {
|
||||
$options[''] = 'Select';
|
||||
if (isset($term->slug) && isset($term->name)) {
|
||||
$options[$term->slug] = $term->name;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $options;
|
||||
}
|
||||
|
||||
|
||||
//get Product categories
|
||||
function get_product_categories() {
|
||||
$options = array();
|
||||
$taxonomy = 'product_cat';
|
||||
if (!empty($taxonomy)) {
|
||||
$terms = get_terms(
|
||||
array(
|
||||
'parent' => 0,
|
||||
'taxonomy' => $taxonomy,
|
||||
'hide_empty' => false,
|
||||
)
|
||||
);
|
||||
if (!empty($terms)) {
|
||||
foreach ($terms as $term) {
|
||||
if (isset($term)) {
|
||||
$options[''] = 'Select';
|
||||
if (isset($term->slug) && isset($term->name)) {
|
||||
$options[$term->slug] = $term->name;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $options;
|
||||
}
|
||||
|
||||
//get Team categories
|
||||
function get_team_categories() {
|
||||
$options = array();
|
||||
$taxonomy = 'team_cat';
|
||||
if (!empty($taxonomy)) {
|
||||
$terms = get_terms(
|
||||
array(
|
||||
'parent' => 0,
|
||||
'taxonomy' => $taxonomy,
|
||||
'hide_empty' => false,
|
||||
)
|
||||
);
|
||||
if (!empty($terms)) {
|
||||
foreach ($terms as $term) {
|
||||
if (isset($term)) {
|
||||
$options[''] = 'Select';
|
||||
if (isset($term->slug) && isset($term->name)) {
|
||||
$options[$term->slug] = $term->name;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $options;
|
||||
}
|
||||
|
||||
function thinkai_the_pagination2($args = array(), $echo = 1)
|
||||
{
|
||||
|
||||
global $wp_query;
|
||||
|
||||
$default = array('base' => str_replace( 99999, '%#%', esc_url( get_pagenum_link( 99999 ) ) ), 'format' => '?paged=%#%', 'current' => max( 1, get_query_var('paged') ),
|
||||
'total' => $wp_query->max_num_pages, 'next_text' => '»', 'prev_text' => '«', 'type'=>'list','add_args' => false);
|
||||
|
||||
$args = wp_parse_args($args, $default);
|
||||
|
||||
|
||||
$pagination = str_replace("<ul class='page-numbers'", '<ul class="pagination"', paginate_links($args) );
|
||||
|
||||
if(paginate_links(array_merge(array('type'=>'array'),$args)))
|
||||
{
|
||||
if($echo) echo wp_kses_post($pagination);
|
||||
return $pagination;
|
||||
}
|
||||
}
|
||||
function student2_plugin_fonticons() {
|
||||
return json_decode( student2_filesystem()->get_contents( STUDENT2_PLUGIN_PATH . '/resource/fonticons.json' ), true );
|
||||
$file = wp_remote_get( get_template_directory_uri() . '/assets/css/bootstrap-icons.min.css' );
|
||||
$pattern = '/\.(fa-(?:\w+(?:-)?)+):before\s+{\s*content:\s*"(.+)";\s+}/';
|
||||
preg_match_all( $pattern, wp_remote_retrieve_body( $file ), $matches );
|
||||
$icons = array_combine( $matches[1], $matches[1] );
|
||||
file_put_contents( STUDENT2_PLUGIN_PATH . '/resource/fonticons.json', json_encode( $icons ) );
|
||||
return $icons;
|
||||
}
|
||||
function student2_filesystem() {
|
||||
require_once ABSPATH . '/wp-admin/includes/file.php';
|
||||
/* you can safely run request_filesystem_credentials() without any issues and don't need to worry about passing in a URL */
|
||||
$creds = request_filesystem_credentials( site_url() . '/wp-admin/', '', false, false, array() );
|
||||
/* initialize the API */
|
||||
if ( ! WP_Filesystem( $creds ) ) {
|
||||
/* any problems and we exit */
|
||||
return false;
|
||||
}
|
||||
global $wp_filesystem;
|
||||
/* do our file manipulations below */
|
||||
return $wp_filesystem;
|
||||
}
|
||||
add_filter('thinkai_redux_custom_fonts_load', 'thinkai_redux_custom_fonts_load');
|
||||
function thinkai_redux_custom_fonts_load( $custom_font ) {
|
||||
$custom_style = '';
|
||||
$pathinfo = pathinfo( $custom_font );
|
||||
if ( $filename = thinkai_set( $pathinfo, 'filename' ) ) {
|
||||
$custom_style .= '@font-face{
|
||||
font-family:"' . $filename . '";';
|
||||
$extensions = array( 'eot', 'woff', 'woff2', 'ttf', 'svg' );
|
||||
$count = 0;
|
||||
foreach ( $extensions as $extension ) {
|
||||
$file_path = esc_url(home_url('/')) . '/wp-content/themes/thinkai/assets/css/custom-fonts/' . $filename . '.' . $extension;
|
||||
$file_url = esc_url(get_template_directory_uri()) . '/assets/css/custom-fonts/' . $filename . '.' . $extension;
|
||||
if ( $file_path ) {
|
||||
$format = $extension;
|
||||
if ( $extension === 'eot' ) {
|
||||
$format = 'embedded-opentype';
|
||||
}
|
||||
if ( $extension === 'ttf' ) {
|
||||
$format = 'truetype';
|
||||
}
|
||||
$terminated = ( $count > 0 ) ? ';' : '';
|
||||
$custom_style .= $terminated . 'src:url("' . $file_url . '") format("' . $format . '")';
|
||||
$count ++;
|
||||
}
|
||||
}
|
||||
$custom_style .= ';}';
|
||||
}
|
||||
return $custom_style;
|
||||
}
|
||||
/**
|
||||
* [thinkai_social_share_output description]
|
||||
*
|
||||
* @param [type] $comment [description].
|
||||
* @param [type] $args [description].
|
||||
* @param [type] $depth [description].
|
||||
*
|
||||
* @return void [description]
|
||||
*/
|
||||
function thinkai_social_share_output( $icon, $color = false ) {
|
||||
$permalink = get_permalink( get_the_ID() );
|
||||
$titleget = get_the_title();
|
||||
$allowed_html = wp_kses_allowed_html( 'post' );
|
||||
if ( $icon == 'facebook' ) {
|
||||
$fb = ( $color == 1 ) ? 'style="color:#3b5998"' : '';
|
||||
?>
|
||||
<li>
|
||||
<a onClick="window.open('http://www.facebook.com/sharer.php?u=<?php echo esc_url( $permalink ); ?>', 'Facebook', 'width=600,height=300,left=' + (screen.availWidth / 2 - 300) + ',top=' + (screen.availHeight / 2 - 150) + '');
|
||||
return false;" href="http://www.facebook.com/sharer.php?u=<?php echo esc_url( $permalink ); ?>">
|
||||
<i class="fa fa-facebook" <?php echo wp_kses( $fb, $allowed_html ); ?>></i>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php
|
||||
if ( $icon == 'twitter' ) {
|
||||
$twitter = ( $color == 1 ) ? 'style="color:#00aced"' : '';
|
||||
?>
|
||||
<li>
|
||||
<a onClick="window.open('http://twitter.com/share?url=<?php echo esc_url( $permalink ); ?>&text=<?php echo str_replace( " ", "%20", $titleget ); ?>', 'Twitter share', 'width=600,height=300,left=' + (screen.availWidth / 2 - 300) + ',top=' + (screen.availHeight / 2 - 150) + '');
|
||||
return false;" href="http://twitter.com/share?url=<?php echo esc_url( $permalink ); ?>&text=<?php echo str_replace( " ", "%20", $titleget ); ?>">
|
||||
<i class="fa fa-twitter" <?php echo wp_kses( $twitter, $allowed_html ); ?>></i>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
if ( $icon == 'digg' ) {
|
||||
$digg = ( $color == 1 ) ? 'style="color:#000000"' : '';
|
||||
?>
|
||||
<li>
|
||||
<a onClick="window.open('http://www.digg.com/submit?url=<?php echo esc_url( $permalink ); ?>', 'Digg', 'width=715,height=330,left=' + (screen.availWidth / 2 - 357) + ',top=' + (screen.availHeight / 2 - 165) + '');
|
||||
return false;" href="http://www.digg.com/submit?url=<?php echo esc_url( $permalink ); ?>">
|
||||
<i class="fa fa-digg" <?php echo wp_kses( $digg, $allowed_html ); ?>></i>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php
|
||||
if ( $icon == 'reddit' ) {
|
||||
$reddit = ( $color == 1 ) ? 'style="color:#ff5700"' : '';
|
||||
?>
|
||||
<li>
|
||||
<a onClick="window.open('http://reddit.com/submit?url=<?php echo esc_url( $permalink ); ?>&title=<?php echo str_replace( " ", "%20", $titleget ); ?>', 'Reddit', 'width=617,height=514,left=' + (screen.availWidth / 2 - 308) + ',top=' + (screen.availHeight / 2 - 257) + '');
|
||||
return false;" href="http://reddit.com/submit?url=<?php echo esc_url( $permalink ); ?>&title=<?php echo str_replace( " ", "%20", $titleget ); ?>">
|
||||
<i class="fa fa-reddit" <?php echo wp_kses( $reddit, $allowed_html ); ?>></i>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php
|
||||
if ( $icon == 'linkedin' ) {
|
||||
$linkeding = ( $color == 1 ) ? 'style="color:#007bb6"' : '';
|
||||
?>
|
||||
<li>
|
||||
<a onClick="window.open('http://www.linkedin.com/shareArticle?mini=true&url=<?php echo esc_url( $permalink ); ?>', 'Linkedin', 'width=863,height=500,left=' + (screen.availWidth / 2 - 431) + ',top=' + (screen.availHeight / 2 - 250) + '');
|
||||
return false;" href="http://www.linkedin.com/shareArticle?mini=true&url=<?php echo esc_url( $permalink ); ?>">
|
||||
<i class="fa fa-linkedin" <?php echo wp_kses( $linkeding, $allowed_html ); ?>></i>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if ( $icon == 'pinterest' ) {
|
||||
$pinterest = ( $color == 1 ) ? 'style=color:#cb2027' : '';
|
||||
?>
|
||||
<li>
|
||||
<a href='javascript:void((function(){var e=document.createElement('script');e.setAttribute('type','text/javascript');e.setAttribute('charset','UTF-8');e.setAttribute('src','http://assets.pinterest.com/js/pinmarklet.js?r='+Math.random()*99999999);document.body.appendChild(e)})())'>
|
||||
<i class="fa fa-pinterest" <?php echo wp_kses( $pinterest, $allowed_html ); ?>></i></a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php
|
||||
if ( $icon == 'stumbleupon' ) {
|
||||
$stumbleupon = ( $color == 1 ) ? 'style="color:#EB4823"' : '';
|
||||
?>
|
||||
<li>
|
||||
<a onClick="window.open('http://www.stumbleupon.com/submit?url=<?php echo esc_url( $permalink ); ?>&title=<?php echo str_replace( " ", "%20", $titleget ); ?>', 'Stumbleupon', 'width=600,height=300,left=' + (screen.availWidth / 2 - 300) + ',top=' + (screen.availHeight / 2 - 150) + '');
|
||||
return false;" href="http://www.stumbleupon.com/submit?url=<?php echo esc_url( $permalink ); ?>&title=<?php echo str_replace( " ", "%20", $titleget ); ?>">
|
||||
<i class="fa fa-stumbleupon" <?php echo wp_kses( $stumbleupon, $allowed_html ); ?>></i>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php
|
||||
if ( $icon == 'tumblr' ) {
|
||||
$tumblr = ( $color == 1 ) ? 'style="color:#32506d"' : '';
|
||||
$str = $permalink;
|
||||
$str = preg_replace( '#^https?://#', '', $str );
|
||||
?>
|
||||
<li>
|
||||
<a onClick="window.open('http://www.tumblr.com/share/link?url=<?php echo esc_attr( $str ); ?>&name=<?php echo str_replace( " ", "%20", $titleget ); ?>', 'Tumblr', 'width=600,height=300,left=' + (screen.availWidth / 2 - 300) + ',top=' + (screen.availHeight / 2 - 150) + '');
|
||||
return false;" href="http://www.tumblr.com/share/link?url=<?php echo esc_attr( $str ); ?>&name=<?php echo str_replace( " ", "%20", $titleget ); ?>">
|
||||
<i class="fa fa-tumblr" <?php echo wp_kses( $tumblr, $allowed_html ); ?>></i>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php
|
||||
if ( $icon == 'email' ) {
|
||||
$mail = ( $color == 1 ) ? 'style="color:#000000"' : '';
|
||||
?>
|
||||
<li>
|
||||
<a href="mailto:?Subject=<?php echo str_replace( " ", "%20", $titleget ); ?>&Body=<?php echo esc_url( $permalink ); ?>"><i class="fa fa-envelope-o" <?php echo wp_kses( $mail, $allowed_html ); ?>></i></a>
|
||||
</li>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
function thinkai_get_social_icons()
|
||||
{
|
||||
$options = ('social_media');
|
||||
$output = '';
|
||||
|
||||
$count = 0;
|
||||
|
||||
if( thinkai_set( $options, 'social_media' ) && is_array( thinkai_set( $options, 'social_media' ) ) )
|
||||
{
|
||||
$total = count( thinkai_set( $options, 'social_media' ) ) - 2;
|
||||
foreach( thinkai_set( $options, 'social_media' ) as $social_icon ){
|
||||
if( isset( $social_icon['tocopy' ] ) ) continue;
|
||||
$title = thinkai_set( $social_icon, 'title');
|
||||
$class = thinkai_set( $social_icon, 'class');
|
||||
$link = thinkai_set( $social_icon, 'social_link');
|
||||
$icon = thinkai_set( $social_icon, 'social_icon');
|
||||
$last_class = ( $count == $total ) ? ' class="last"' : '';
|
||||
$output .= '
|
||||
<li><a class="'.esc_attr( $class ).'" title="'.esc_attr( $title ).'" href="'.esc_url( $link ).'"><i class="fab '.$icon.'"></i></a></li>'."\n";
|
||||
|
||||
$count++;
|
||||
}
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
add_action('thinkai_social_share_output_two', 'thinkai_social_share_output_two');
|
||||
|
||||
function bunch_share_us_two($PostID = '', $PostName = '')
|
||||
{
|
||||
$options = thinkai_WSH()->option();
|
||||
?>
|
||||
<ul class="clearfix">
|
||||
|
||||
<?php if($options->get( 'facebook_sharing' )):?>
|
||||
<li><a href="http://www.facebook.com/sharer.php?u=<?php echo esc_url(get_permalink($PostID)); ?>" target="_blank"><i class="fab fa-facebook-f"></i></a></li>
|
||||
<?php endif;?>
|
||||
|
||||
<?php if($options->get( 'twitter_sharing' )):?>
|
||||
<li><a href="https://twitter.com/share?url=<?php echo esc_url(get_permalink($PostID)); ?>&text=<?php echo esc_attr($post_slug=$PostName); ?>" target="_blank"><i class="fab fa-twitter-square"></i></a></li>
|
||||
<?php endif;?>
|
||||
|
||||
<?php if($options->get( 'linkedin_sharing' )):?>
|
||||
<li><a href="http://www.linkedin.com/shareArticle?url=<?php echo esc_url(get_permalink($PostID)); ?>&title=<?php echo esc_attr($post_slug=$PostName); ?>"><i class="fab fa-linkedin"></i></a></li>
|
||||
<?php endif;?>
|
||||
|
||||
<?php if($options->get( 'pinterest_sharing' )):?>
|
||||
<li><a href="https://pinterest.com/pin/create/bookmarklet/?url=<?php echo esc_url(get_permalink($PostID)); ?>&description=<?php echo esc_attr($post_slug=$PostName); ?>"><i class="fab fa-pinterest"></i></a></li>
|
||||
<?php endif;?>
|
||||
|
||||
<?php if($options->get( 'reddit_sharing' )):?>
|
||||
<li><a href="http://reddit.com/submit?url=<?php echo esc_url(get_permalink($PostID)); ?>&title=<?php echo esc_attr($post_slug=$PostName); ?>"><i class="fab fa-reddit"></i></a></li>
|
||||
<?php endif;?>
|
||||
|
||||
<?php if($options->get( 'tumblr_sharing' )):?>
|
||||
<li><a href="http://www.tumblr.com/share/link?url=<?php echo esc_url(get_permalink($PostID)); ?>&name=<?php echo esc_attr($post_slug=$PostName); ?>"><i class="fab fa-tumblr"></i></a></li>
|
||||
<?php endif;?>
|
||||
|
||||
<?php if($options->get( 'digg_sharing' )):?>
|
||||
<li><a href="http://digg.com/submit?url=<?php echo esc_url(get_permalink($PostID)); ?>&title=<?php echo esc_attr($post_slug=$PostName); ?>"><i class="fab fa-digg"></i></a></li>
|
||||
<?php endif;?>
|
||||
|
||||
</ul>
|
||||
|
||||
<?php }
|
||||
|
||||
function thinkai_get_social_icon_two()
|
||||
{
|
||||
$options = thinkai_WSH()->option();
|
||||
$icons = $options->get( 'social_media_tabs_v3' );
|
||||
if ( $icons ) : ?>
|
||||
|
||||
<?php
|
||||
for ( $i=0; $i < count( $icons['select_social_media'] ); $i++ ) {
|
||||
$social_icon = ( isset( $icons['select_social_media'][$i] ) && !empty( $icons['select_social_media'][$i] ) ) ? $icons['select_social_media'][$i] : '';
|
||||
$social_link = ( isset( $icons['link_social_media'][$i] ) && !empty( $icons['link_social_media'][$i] ) ) ? $icons['link_social_media'][$i] : '';
|
||||
$social_title = ( isset( $icons['title_social_media'][$i] ) && !empty( $icons['title_social_media'][$i] ) ) ? $icons['title_social_media'][$i] : '';
|
||||
?>
|
||||
<li><a target="_blank" href="<?php echo esc_url($social_link); ?>"><span class="fab <?php echo esc_attr(str_replace("fa ", " ", $social_icon)); ?>"></span></a></li>
|
||||
<?php } ?>
|
||||
|
||||
<?php endif; ?>
|
||||
<?php }
|
||||
|
||||
|
||||
function thinkai_get_social_icon_three()
|
||||
{
|
||||
$options = thinkai_WSH()->option();
|
||||
$icons = $options->get( 'social_media_tabs_v3' );
|
||||
if ( $icons ) : ?>
|
||||
|
||||
<?php
|
||||
for ( $i=0; $i < count( $icons['select_social_media'] ); $i++ ) {
|
||||
$social_icon = ( isset( $icons['select_social_media'][$i] ) && !empty( $icons['select_social_media'][$i] ) ) ? $icons['select_social_media'][$i] : '';
|
||||
$social_link = ( isset( $icons['link_social_media'][$i] ) && !empty( $icons['link_social_media'][$i] ) ) ? $icons['link_social_media'][$i] : '';
|
||||
$social_title = ( isset( $icons['title_social_media'][$i] ) && !empty( $icons['title_social_media'][$i] ) ) ? $icons['title_social_media'][$i] : '';
|
||||
?>
|
||||
<li>
|
||||
<a target="_blank" href="<?php echo esc_url($social_link); ?>">
|
||||
<div class="text">
|
||||
<span class="txt1"><?php echo wp_kses($social_title, true); ?></span>
|
||||
<span class="txt2"><?php echo wp_kses($social_title, true); ?></span>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<span class="fab <?php echo esc_attr(str_replace("fa ", " ", $social_icon)); ?> first"></span>
|
||||
<span class="fab <?php echo esc_attr(str_replace("fa ", " ", $social_icon)); ?> second"></span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
|
||||
<?php endif; ?>
|
||||
<?php }
|
||||
|
||||
|
||||
function thinkai_get_social_icon()
|
||||
{
|
||||
$options = thinkai_WSH()->option();
|
||||
$icons = $options->get( 'social_media_tabs_v3' );
|
||||
if ( $icons ) : ?>
|
||||
|
||||
<?php
|
||||
for ( $i=0; $i < count( $icons['select_social_media'] ); $i++ ) {
|
||||
$social_icon = ( isset( $icons['select_social_media'][$i] ) && !empty( $icons['select_social_media'][$i] ) ) ? $icons['select_social_media'][$i] : '';
|
||||
$social_link = ( isset( $icons['link_social_media'][$i] ) && !empty( $icons['link_social_media'][$i] ) ) ? $icons['link_social_media'][$i] : '';
|
||||
$social_title = ( isset( $icons['title_social_media'][$i] ) && !empty( $icons['title_social_media'][$i] ) ) ? $icons['title_social_media'][$i] : '';
|
||||
?>
|
||||
<li><a target="_blank" href="<?php echo esc_url($social_link); ?>"><span class="fab <?php echo esc_attr(str_replace("fa ", " ", $social_icon)); ?>"></span></a></li>
|
||||
<?php } ?>
|
||||
|
||||
<?php endif; ?>
|
||||
<?php }
|
||||
|
||||
|
||||
function thinkai_page_list() {
|
||||
|
||||
$args = wp_parse_args( array(
|
||||
|
||||
'post_type' => 'page',
|
||||
'numberposts' => -1,
|
||||
|
||||
) );
|
||||
|
||||
$posts = get_posts( $args );
|
||||
|
||||
$post_options = array( esc_html__( '-- Select Page --', 'thinkai' ) => '' );
|
||||
|
||||
if ( $posts ) {
|
||||
|
||||
foreach ( $posts as $post ) {
|
||||
|
||||
$post_options[$post->ID] = $post->post_title;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
return $post_options;
|
||||
|
||||
}
|
||||
|
||||
|
||||
1027
wp-content/plugins/thinkai-plugin/inc/helpers/widgets.php
Normal file
1027
wp-content/plugins/thinkai-plugin/inc/helpers/widgets.php
Normal file
File diff suppressed because it is too large
Load Diff
69
wp-content/plugins/thinkai-plugin/inc/post_types/project.php
Normal file
69
wp-content/plugins/thinkai-plugin/inc/post_types/project.php
Normal file
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
/**
|
||||
* Abstract class for register post type
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Student2 Plugin
|
||||
* @author Shahbaz Ahmed <shahbazahmed9@hotmail.com>
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
namespace THINKAIPLUGIN\Inc\Post_Types;
|
||||
|
||||
use THINKAIPLUGIN\Inc\Abstracts\Post_Type;
|
||||
|
||||
if ( ! function_exists( 'add_action' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Abstract Post Type
|
||||
* Implemented by classes using the same CRUD(s) pattern.
|
||||
*
|
||||
* @version 2.6.0
|
||||
* @package THINKAIPLUGIN/Abstracts
|
||||
* @category Abstract Class
|
||||
* @author Wptech
|
||||
*/
|
||||
class Project extends Post_Type {
|
||||
|
||||
protected $post_type = 'project';
|
||||
|
||||
protected $menu_icon = 'dashicons-portfolio';
|
||||
|
||||
protected $taxonomies = array();
|
||||
|
||||
public static $instance;
|
||||
|
||||
|
||||
/**
|
||||
* [instance description]
|
||||
*
|
||||
* @return [type] [description]
|
||||
*/
|
||||
public static function instance() {
|
||||
|
||||
if ( is_null( self::$instance ) ) {
|
||||
self::$instance = new self();
|
||||
}
|
||||
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* [init description]
|
||||
*
|
||||
* @return [type] [description]
|
||||
*/
|
||||
public static function init() {
|
||||
|
||||
self::instance()->menu_name = esc_html__( 'Projects', 'wpfixker' );
|
||||
self::instance()->singular = esc_html__( 'Project', 'wpthinkai' );
|
||||
self::instance()->plural = esc_html__( 'Projects', 'wpthinkai' );
|
||||
self::instance()->supports = array('title', 'editor', 'thumbnail', 'excerpt');
|
||||
|
||||
add_action( 'init', array( self::instance(), 'register' ) );
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
68
wp-content/plugins/thinkai-plugin/inc/post_types/team.php
Normal file
68
wp-content/plugins/thinkai-plugin/inc/post_types/team.php
Normal file
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
/**
|
||||
* Abstract class for register post type
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Student2 Plugin
|
||||
* @author Shahbaz Ahmed <shahbazahmed9@hotmail.com>
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
namespace THINKAIPLUGIN\Inc\Post_Types;
|
||||
|
||||
use THINKAIPLUGIN\Inc\Abstracts\Post_Type;
|
||||
|
||||
if ( ! function_exists( 'add_action' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Abstract Post Type
|
||||
* Implemented by classes using the same CRUD(s) pattern.
|
||||
*
|
||||
* @version 2.6.0
|
||||
* @package THINKAIPLUGIN/Abstracts
|
||||
* @category Abstract Class
|
||||
* @author Wptech
|
||||
*/
|
||||
class Team extends Post_Type {
|
||||
|
||||
protected $post_type = 'team';
|
||||
|
||||
protected $menu_icon = 'dashicons-portfolio';
|
||||
|
||||
protected $taxonomies = array();
|
||||
|
||||
public static $instance;
|
||||
|
||||
|
||||
/**
|
||||
* [instance description]
|
||||
*
|
||||
* @return [type] [description]
|
||||
*/
|
||||
public static function instance() {
|
||||
|
||||
if ( is_null( self::$instance ) ) {
|
||||
self::$instance = new self();
|
||||
}
|
||||
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* [init description]
|
||||
*
|
||||
* @return [type] [description]
|
||||
*/
|
||||
public static function init() {
|
||||
|
||||
self::instance()->menu_name = esc_html__( 'Teams', 'wpfixker' );
|
||||
self::instance()->singular = esc_html__( 'Team', 'wpthinkai' );
|
||||
self::instance()->plural = esc_html__( 'Teams', 'wpthinkai' );
|
||||
|
||||
add_action( 'init', array( self::instance(), 'register' ) );
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
/**
|
||||
* Abstract class for register post type
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Student2 Plugin
|
||||
* @author Shahbaz Ahmed <shahbazahmed9@hotmail.com>
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
namespace THINKAIPLUGIN\Inc\Post_Types;
|
||||
|
||||
use THINKAIPLUGIN\Inc\Abstracts\Post_Type;
|
||||
|
||||
if ( ! function_exists( 'add_action' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Abstract Post Type
|
||||
* Implemented by classes using the same CRUD(s) pattern.
|
||||
*
|
||||
* @version 2.6.0
|
||||
* @package THINKAIPLUGIN/Abstracts
|
||||
* @category Abstract Class
|
||||
* @author Wptech
|
||||
*/
|
||||
class Testimonials extends Post_Type {
|
||||
|
||||
protected $post_type = 'testimonials';
|
||||
|
||||
protected $menu_icon = 'dashicons-portfolio';
|
||||
|
||||
protected $taxonomies = array();
|
||||
|
||||
public static $instance;
|
||||
|
||||
|
||||
/**
|
||||
* [instance description]
|
||||
*
|
||||
* @return [type] [description]
|
||||
*/
|
||||
public static function instance() {
|
||||
|
||||
if ( is_null( self::$instance ) ) {
|
||||
self::$instance = new self();
|
||||
}
|
||||
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* [init description]
|
||||
*
|
||||
* @return [type] [description]
|
||||
*/
|
||||
public static function init() {
|
||||
|
||||
self::instance()->menu_name = esc_html__( 'Testimonials', 'wpfixker' );
|
||||
self::instance()->singular = esc_html__( 'Testimonial', 'wpthinkai' );
|
||||
self::instance()->plural = esc_html__( 'Testimonials', 'wpthinkai' );
|
||||
self::instance()->supports = array( 'title', 'editor', 'excerpt','thumbnail' );
|
||||
|
||||
add_action( 'init', array( self::instance(), 'register' ) );
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
98
wp-content/plugins/thinkai-plugin/inc/taxonomies.php
Normal file
98
wp-content/plugins/thinkai-plugin/inc/taxonomies.php
Normal file
@@ -0,0 +1,98 @@
|
||||
<?php
|
||||
|
||||
namespace THINKAIPLUGIN\Inc;
|
||||
use THINKAIPLUGIN\Inc\Abstracts\Taxonomy;
|
||||
|
||||
class Taxonomies extends Taxonomy {
|
||||
|
||||
public static function init() {
|
||||
|
||||
$labels = array(
|
||||
'name' => _x( 'Project Category', 'wpthinkai' ),
|
||||
'singular_name' => _x( 'Project Category', 'wpthinkai' ),
|
||||
'search_items' => __( 'Search Category', 'wpthinkai' ),
|
||||
'all_items' => __( 'All Categories', 'wpthinkai' ),
|
||||
'parent_item' => __( 'Parent Category', 'wpthinkai' ),
|
||||
'parent_item_colon' => __( 'Parent Category:', 'wpthinkai' ),
|
||||
'edit_item' => __( 'Edit Category', 'wpthinkai' ),
|
||||
'update_item' => __( 'Update Category', 'wpthinkai' ),
|
||||
'add_new_item' => __( 'Add New Category', 'wpthinkai' ),
|
||||
'new_item_name' => __( 'New Category Name', 'wpthinkai' ),
|
||||
'menu_name' => __( 'Project Category', 'wpthinkai' ),
|
||||
);
|
||||
$args = array(
|
||||
'hierarchical' => true,
|
||||
'labels' => $labels,
|
||||
'show_ui' => true,
|
||||
'show_admin_column' => true,
|
||||
'query_var' => true,
|
||||
'public' => true,
|
||||
'publicly_queryable' => true,
|
||||
'rewrite' => array( 'slug' => 'project_cat' ),
|
||||
);
|
||||
|
||||
register_taxonomy( 'project_cat', 'project', $args );
|
||||
|
||||
|
||||
//Testimonials Taxonomy Start
|
||||
$labels = array(
|
||||
'name' => _x( 'Testimonials Category', 'wpthinkai' ),
|
||||
'singular_name' => _x( 'Testimonials Category', 'wpthinkai' ),
|
||||
'search_items' => __( 'Search Category', 'wpthinkai' ),
|
||||
'all_items' => __( 'All Categories', 'wpthinkai' ),
|
||||
'parent_item' => __( 'Parent Category', 'wpthinkai' ),
|
||||
'parent_item_colon' => __( 'Parent Category:', 'wpthinkai' ),
|
||||
'edit_item' => __( 'Edit Category', 'wpthinkai' ),
|
||||
'update_item' => __( 'Update Category', 'wpthinkai' ),
|
||||
'add_new_item' => __( 'Add New Category', 'wpthinkai' ),
|
||||
'new_item_name' => __( 'New Category Name', 'wpthinkai' ),
|
||||
'menu_name' => __( 'Testimonials Category', 'wpthinkai' ),
|
||||
);
|
||||
$args = array(
|
||||
'hierarchical' => true,
|
||||
'labels' => $labels,
|
||||
'show_ui' => true,
|
||||
'show_admin_column' => true,
|
||||
'query_var' => true,
|
||||
'public' => true,
|
||||
'publicly_queryable' => true,
|
||||
'rewrite' => array( 'slug' => 'testimonials_cat' ),
|
||||
);
|
||||
|
||||
|
||||
register_taxonomy( 'testimonials_cat', 'testimonials', $args );
|
||||
|
||||
|
||||
//Team Taxonomy Start
|
||||
$labels = array(
|
||||
'name' => _x( 'Team Category', 'wpthinkai' ),
|
||||
'singular_name' => _x( 'Team Category', 'wpthinkai' ),
|
||||
'search_items' => __( 'Search Category', 'wpthinkai' ),
|
||||
'all_items' => __( 'All Categories', 'wpthinkai' ),
|
||||
'parent_item' => __( 'Parent Category', 'wpthinkai' ),
|
||||
'parent_item_colon' => __( 'Parent Category:', 'wpthinkai' ),
|
||||
'edit_item' => __( 'Edit Category', 'wpthinkai' ),
|
||||
'update_item' => __( 'Update Category', 'wpthinkai' ),
|
||||
'add_new_item' => __( 'Add New Category', 'wpthinkai' ),
|
||||
'new_item_name' => __( 'New Category Name', 'wpthinkai' ),
|
||||
'menu_name' => __( 'Team Category', 'wpthinkai' ),
|
||||
);
|
||||
$args = array(
|
||||
'hierarchical' => true,
|
||||
'labels' => $labels,
|
||||
'show_ui' => true,
|
||||
'show_admin_column' => true,
|
||||
'query_var' => true,
|
||||
'public' => true,
|
||||
'publicly_queryable' => true,
|
||||
'rewrite' => array( 'slug' => 'team_cat' ),
|
||||
);
|
||||
|
||||
|
||||
register_taxonomy( 'team_cat', 'team', $args );
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
5678
wp-content/plugins/thinkai-plugin/languages/student-2-plugin.pot
Normal file
5678
wp-content/plugins/thinkai-plugin/languages/student-2-plugin.pot
Normal file
File diff suppressed because it is too large
Load Diff
10
wp-content/plugins/thinkai-plugin/metabox/_notes/dwsync.xml
Normal file
10
wp-content/plugins/thinkai-plugin/metabox/_notes/dwsync.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<dwsync>
|
||||
<file name="banner.php" server="ftp.wp1.themevibrant.com//newwp/chirokind/wp-content/" local="133346567599364771" remote="133346243400000000" Dst="0" />
|
||||
<file name="team.php" server="ftp.wp1.themevibrant.com//newwp/chirokind/wp-content/" local="133346737971470371" remote="133346413800000000" Dst="0" />
|
||||
<file name="page.php" server="ftp.wp1.themevibrant.com//newwp/chirokind/wp-content/" local="133356285364090675" remote="133355961000000000" Dst="0" />
|
||||
<file name="projects.php" server="ftp.yogsthemes.com//arid/wp-content/" local="133450412993409404" remote="133450089000000000" Dst="0" />
|
||||
<file name="dimension.php" server="ftp.yogsthemes.com//arid/wp-content/" local="133447719539873550" remote="133455302400000000" Dst="0" />
|
||||
<file name="metaboxes.php" server="ftp.yogsthemes.com//arid/wp-content/" local="133455629185291680" remote="133455304800000000" Dst="0" />
|
||||
<file name="projects.php" server="ftp.wp1.themevibrant.com/newwp/thinkai/wp-content/" local="133596413685066742" remote="133596233400000000" Dst="0" />
|
||||
</dwsync>
|
||||
61
wp-content/plugins/thinkai-plugin/metabox/banner.php
Normal file
61
wp-content/plugins/thinkai-plugin/metabox/banner.php
Normal file
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'id' => 'thinkai_banner_settings',
|
||||
'title' => esc_html__( "Thinkai Banner Settings", "konia" ),
|
||||
'fields' => array(
|
||||
array(
|
||||
'id' => 'banner_source_type',
|
||||
'type' => 'button_set',
|
||||
'title' => esc_html__( 'Banner Source Type', 'thinkai' ),
|
||||
'options' => array(
|
||||
'd' => esc_html__( 'Default', 'thinkai' ),
|
||||
'e' => esc_html__( 'Elementor', 'thinkai' ),
|
||||
),
|
||||
'default' => '',
|
||||
),
|
||||
array(
|
||||
'id' => 'banner_elementor_template',
|
||||
'type' => 'select',
|
||||
'title' => __( 'Template', 'viral-buzz' ),
|
||||
'data' => 'posts',
|
||||
'args' => [
|
||||
'post_type' => [ 'elementor_library' ],
|
||||
'posts_per_page'=> -1,
|
||||
],
|
||||
'required' => [ 'banner_source_type', '=', 'e' ],
|
||||
),
|
||||
array(
|
||||
'id' => 'banner_page_banner',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__( 'Show Banner', 'thinkai' ),
|
||||
'default' => false,
|
||||
'required' => [ 'banner_source_type', '=', 'd' ],
|
||||
),
|
||||
array(
|
||||
'id' => 'banner_banner_list',
|
||||
'type' => 'textarea',
|
||||
'title' => esc_html__( 'Banner Feature List', 'thinkai' ),
|
||||
'desc' => esc_html__( 'Enter the Feature List to show in banner section', 'thinkai' ),
|
||||
'required' => array( 'banner_page_banner', '=', true ),
|
||||
),
|
||||
array(
|
||||
'id' => 'banner_banner_title',
|
||||
'type' => 'text',
|
||||
'title' => esc_html__( 'Banner Section Title', 'thinkai' ),
|
||||
'desc' => esc_html__( 'Enter the title to show in banner section', 'thinkai' ),
|
||||
'required' => array( 'banner_page_banner', '=', true ),
|
||||
),
|
||||
array(
|
||||
'id' => 'banner_page_background',
|
||||
'type' => 'media',
|
||||
'url' => true,
|
||||
'title' => esc_html__( 'Background Image', 'thinkai' ),
|
||||
'desc' => esc_html__( 'Insert background image for banner', 'thinkai' ),
|
||||
'default' => array(
|
||||
'url' => THINKAI_URI . '/assets/images/breadcrumb/breadcrumb-1.jpg',
|
||||
),
|
||||
'required' => array( 'banner_page_banner', '=', true ),
|
||||
),
|
||||
),
|
||||
);
|
||||
30
wp-content/plugins/thinkai-plugin/metabox/dimension.php
Normal file
30
wp-content/plugins/thinkai-plugin/metabox/dimension.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
return array(
|
||||
'title' => 'thinkai post Setting',
|
||||
'id' => 'thinkai_post',
|
||||
'icon' => 'el el-cogs',
|
||||
'position' => 'normal',
|
||||
'priority' => 'core',
|
||||
'post_types' => array( 'post' ),
|
||||
'sections' => array(
|
||||
array(
|
||||
'fields' => array(
|
||||
array(
|
||||
'id' => 'video_link',
|
||||
'type' => 'text',
|
||||
'title' => esc_html__('Video Link', 'thinkai'),
|
||||
),
|
||||
array(
|
||||
'id' => 'gallery_imgs',
|
||||
'type' => 'gallery',
|
||||
'url' => true,
|
||||
'title' => esc_html__('Slider Image', 'thinkai'),
|
||||
'desc' => esc_html__('Insert Blog Single Page Slide Image URl', 'thinkai'),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
|
||||
?>
|
||||
59
wp-content/plugins/thinkai-plugin/metabox/footer.php
Normal file
59
wp-content/plugins/thinkai-plugin/metabox/footer.php
Normal file
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'id' => 'thinkai_footer_settings',
|
||||
'title' => esc_html__( "Thinkai footer Settings", "konia" ),
|
||||
'fields' => array(
|
||||
array(
|
||||
'id' => 'footer_source_type',
|
||||
'type' => 'button_set',
|
||||
'title' => esc_html__( 'Footer Source Type', 'thinkai' ),
|
||||
'options' => array(
|
||||
'd' => esc_html__( 'Default', 'thinkai' ),
|
||||
'e' => esc_html__( 'Elementor', 'thinkai' ),
|
||||
),
|
||||
'default' => '',
|
||||
),
|
||||
array(
|
||||
'id' => 'footer_elementor_template',
|
||||
'type' => 'select',
|
||||
'title' => __( 'Template', 'viral-buzz' ),
|
||||
'data' => 'posts',
|
||||
'args' => [
|
||||
'post_type' => [ 'elementor_library' ],
|
||||
'posts_per_page'=> -1,
|
||||
'orderby' => 'title',
|
||||
'order' => 'DESC'
|
||||
],
|
||||
'required' => [ 'footer_source_type', '=', 'e' ],
|
||||
),
|
||||
array(
|
||||
'id' => 'footer_style_settings',
|
||||
'type' => 'image_select',
|
||||
'title' => esc_html__( 'Choose Footer Styles', 'thinkai' ),
|
||||
'options' => array(
|
||||
'footer_v1' => array(
|
||||
'alt' => 'Footer Style 1',
|
||||
'img' => get_template_directory_uri() . '/assets/images/redux/footer/footer_v1.png',
|
||||
),
|
||||
'footer_v2' => array(
|
||||
'alt' => 'Footer Style 2',
|
||||
'img' => get_template_directory_uri() . '/assets/images/redux/footer/footer_v2.png',
|
||||
),
|
||||
'footer_v3' => array(
|
||||
'alt' => 'Footer Style 3',
|
||||
'img' => get_template_directory_uri() . '/assets/images/redux/footer/footer_v3.png',
|
||||
),
|
||||
'footer_v4' => array(
|
||||
'alt' => 'Footer Style 4',
|
||||
'img' => get_template_directory_uri() . '/assets/images/redux/footer/footer_v4.png',
|
||||
),
|
||||
'footer_v5' => array(
|
||||
'alt' => 'Footer Style 5',
|
||||
'img' => get_template_directory_uri() . '/assets/images/redux/footer/footer_v5.png',
|
||||
),
|
||||
),
|
||||
'required' => array( array( 'footer_source_type', 'equals', 'd' ) ),
|
||||
),
|
||||
),
|
||||
);
|
||||
59
wp-content/plugins/thinkai-plugin/metabox/header.php
Normal file
59
wp-content/plugins/thinkai-plugin/metabox/header.php
Normal file
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'id' => 'thinkai_header_settings',
|
||||
'title' => esc_html__( "Thinkai Header Settings", "konia" ),
|
||||
'fields' => array(
|
||||
array(
|
||||
'id' => 'header_source_type',
|
||||
'type' => 'button_set',
|
||||
'title' => esc_html__( 'Header Source Type', 'thinkai' ),
|
||||
'options' => array(
|
||||
'd' => esc_html__( 'Default', 'thinkai' ),
|
||||
'e' => esc_html__( 'Elementor', 'thinkai' ),
|
||||
),
|
||||
'default'=> '',
|
||||
),
|
||||
array(
|
||||
'id' => 'header_new_elementor_template',
|
||||
'type' => 'select',
|
||||
'title' => __( 'Template', 'thinkai-plugin' ),
|
||||
'data' => 'posts',
|
||||
'args' => [
|
||||
'post_type' => [ 'elementor_library' ],
|
||||
'posts_per_page' => -1,
|
||||
'orderby' => 'title',
|
||||
'order' => 'DESC'
|
||||
],
|
||||
'required' => [ 'header_source_type', '=', 'e' ],
|
||||
),
|
||||
array(
|
||||
'id' => 'header_style_settings',
|
||||
'type' => 'image_select',
|
||||
'title' => esc_html__( 'Choose Header Styles', 'thinkai' ),
|
||||
'options' => array(
|
||||
'header_v1' => array(
|
||||
'alt' => 'Header Style 1',
|
||||
'img' => get_template_directory_uri() . '/assets/images/redux/header/header_v1.png',
|
||||
),
|
||||
'header_v2' => array(
|
||||
'alt' => 'Header Style 2',
|
||||
'img' => get_template_directory_uri() . '/assets/images/redux/header/header_v2.png',
|
||||
),
|
||||
'header_v3' => array(
|
||||
'alt' => 'Header Style 3',
|
||||
'img' => get_template_directory_uri() . '/assets/images/redux/header/header_v3.png',
|
||||
),
|
||||
'header_v4' => array(
|
||||
'alt' => 'Header Style 4',
|
||||
'img' => get_template_directory_uri() . '/assets/images/redux/header/header_v4.png',
|
||||
),
|
||||
'header_v5' => array(
|
||||
'alt' => 'Header Style 5',
|
||||
'img' => get_template_directory_uri() . '/assets/images/redux/header/header_v5.png',
|
||||
),
|
||||
),
|
||||
'required' => array( array( 'header_source_type', 'equals', 'd' ) ),
|
||||
),
|
||||
),
|
||||
);
|
||||
19
wp-content/plugins/thinkai-plugin/metabox/metaboxes.php
Normal file
19
wp-content/plugins/thinkai-plugin/metabox/metaboxes.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
if ( ! function_exists( "thinkai_add_metaboxes" ) ) {
|
||||
function thinkai_add_metaboxes( $metaboxes ) {
|
||||
$directories_array = array(
|
||||
'page.php',
|
||||
'projects.php',
|
||||
'team.php',
|
||||
'testimonials.php',
|
||||
);
|
||||
foreach ( $directories_array as $dir ) {
|
||||
$metaboxes[] = require_once( THINKAIPLUGIN_PLUGIN_PATH . '/metabox/' . $dir );
|
||||
}
|
||||
|
||||
return $metaboxes;
|
||||
}
|
||||
|
||||
add_action( "redux/metaboxes/thinkai_options/boxes", "thinkai_add_metaboxes" );
|
||||
}
|
||||
|
||||
15
wp-content/plugins/thinkai-plugin/metabox/page.php
Normal file
15
wp-content/plugins/thinkai-plugin/metabox/page.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
return array(
|
||||
'title' => 'Thinkai Setting',
|
||||
'id' => 'thinkai_meta',
|
||||
'icon' => 'el el-cogs',
|
||||
'position' => 'normal',
|
||||
'priority' => 'core',
|
||||
'post_types' => array( 'page', 'post', 'team', 'tribe_events', 'department', 'service', 'product', 'project', 'tf_tours' ),
|
||||
'sections' => array(
|
||||
require_once THINKAIPLUGIN_PLUGIN_PATH . '/metabox/header.php',
|
||||
require_once THINKAIPLUGIN_PLUGIN_PATH . '/metabox/banner.php',
|
||||
require_once THINKAIPLUGIN_PLUGIN_PATH . '/metabox/sidebar.php',
|
||||
require_once THINKAIPLUGIN_PLUGIN_PATH . '/metabox/footer.php',
|
||||
),
|
||||
);
|
||||
38
wp-content/plugins/thinkai-plugin/metabox/projects.php
Normal file
38
wp-content/plugins/thinkai-plugin/metabox/projects.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
return array(
|
||||
'title' => 'Thinkai Project Setting',
|
||||
'id' => 'thinkai_meta_projects',
|
||||
'icon' => 'el el-cogs',
|
||||
'position' => 'normal',
|
||||
'priority' => 'core',
|
||||
'post_types' => array( 'project' ),
|
||||
'sections' => array(
|
||||
array(
|
||||
'id' => 'thinkai_projects_meta_setting',
|
||||
'fields' => array(
|
||||
array(
|
||||
'id' => 'project_designation',
|
||||
'type' => 'text',
|
||||
'title' => esc_html__( 'Project Designation', 'thinkai' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'dimension',
|
||||
'type' => 'select',
|
||||
'title' => esc_html__( 'Choose the Extra height', 'thinkai' ),
|
||||
'options' => array(
|
||||
'default_height' => esc_html__( 'Default Height', 'thinkai' ),
|
||||
'normal_height' => esc_html__( 'Normal Height', 'thinkai' ),
|
||||
'extra_height' => esc_html__( 'Extra Height', 'thinkai' ),
|
||||
'extra_width' => esc_html__( 'Extra Width', 'thinkai' ),
|
||||
),
|
||||
'default' => 'default_height',
|
||||
),
|
||||
array(
|
||||
'id' => 'project_ext_link',
|
||||
'type' => 'text',
|
||||
'title' => esc_html__( 'External Link', 'thinkai' ),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
61
wp-content/plugins/thinkai-plugin/metabox/sidebar.php
Normal file
61
wp-content/plugins/thinkai-plugin/metabox/sidebar.php
Normal file
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'id' => 'thinkai_sidebar_settings',
|
||||
'title' => esc_html__( "Thinkai Sidebar Settings", "konia" ),
|
||||
'fields' => array(
|
||||
array(
|
||||
'id' => 'sidebar_source_type',
|
||||
'type' => 'button_set',
|
||||
'title' => esc_html__( 'Sidebar Source Type', 'thinkai' ),
|
||||
'options' => array(
|
||||
'd' => esc_html__( 'Default', 'thinkai' ),
|
||||
'e' => esc_html__( 'Elementor', 'thinkai' ),
|
||||
),
|
||||
'default'=> '',
|
||||
),
|
||||
array(
|
||||
'id' => 'sidebar_elementor_template',
|
||||
'type' => 'select',
|
||||
'title' => __( 'Template', 'viral-buzz' ),
|
||||
'data' => 'posts',
|
||||
'args' => [
|
||||
'post_type' => [ 'elementor_library' ],
|
||||
'posts_per_page'=> -1,
|
||||
],
|
||||
'required' => [ 'sidebar_source_type', '=', 'e' ],
|
||||
),
|
||||
array(
|
||||
'id' => 'sidebar_sidebar_layout',
|
||||
'type' => 'image_select',
|
||||
'title' => esc_html__( 'Layout', 'thinkai' ),
|
||||
'subtitle' => esc_html__( 'Select main content and sidebar alignment.', 'thinkai' ),
|
||||
'options' => array(
|
||||
'left' => array(
|
||||
'alt' => esc_html__( '2 Column Left', 'thinkai' ),
|
||||
'img' => get_template_directory_uri() . '/assets/images/redux/2cl.png',
|
||||
),
|
||||
'full' => array(
|
||||
'alt' => esc_html__( '1 Column', 'thinkai' ),
|
||||
'img' => get_template_directory_uri() . '/assets/images/redux/1col.png',
|
||||
),
|
||||
'right' => array(
|
||||
'alt' => esc_html__( '2 Column Right', 'thinkai' ),
|
||||
'img' => get_template_directory_uri() . '/assets/images/redux/2cr.png',
|
||||
),
|
||||
),
|
||||
'required' => [ 'sidebar_source_type', '=', 'd' ],
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'sidebar_page_sidebar',
|
||||
'type' => 'select',
|
||||
'title' => esc_html__( 'Sidebar', 'thinkai' ),
|
||||
'required' => array(
|
||||
array( 'sidebar_sidebar_layout', '=', array( 'left', 'right' ) ),
|
||||
),
|
||||
'options' => thinkais_get_sidebars(),
|
||||
'required' => [ 'sidebar_source_type', '=', 'd' ],
|
||||
),
|
||||
),
|
||||
);
|
||||
53
wp-content/plugins/thinkai-plugin/metabox/team.php
Normal file
53
wp-content/plugins/thinkai-plugin/metabox/team.php
Normal file
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
return array(
|
||||
'title' => 'Thinkai Team Setting',
|
||||
'id' => 'thinkai_meta_team',
|
||||
'icon' => 'el el-cogs',
|
||||
'position' => 'normal',
|
||||
'priority' => 'core',
|
||||
'post_types' => array( 'team' ),
|
||||
'sections' => array(
|
||||
array(
|
||||
'id' => 'thinkai_team_meta_setting',
|
||||
'fields' => array(
|
||||
array(
|
||||
'id' => 'team_overlay_image',
|
||||
'type' => 'media',
|
||||
'title' => esc_html__( 'Team Overlay Image', 'thinkai' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'designation',
|
||||
'type' => 'text',
|
||||
'title' => esc_html__( 'Designation', 'thinkai' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'team_email',
|
||||
'type' => 'text',
|
||||
'title' => esc_html__( 'Email Address', 'thinkai' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'social_media_tabs',
|
||||
'type' => 'repeater',
|
||||
'icon' => 'el-icon-thumbs-up',
|
||||
'title' => __('Add Social Media', 'thinkai'),
|
||||
'group_values' => true,
|
||||
'sortable' => true,
|
||||
'fields' => array(
|
||||
array(
|
||||
'id' => 'select_social_media',
|
||||
'type' => 'select',
|
||||
'data' => get_fontawesome_icons(),
|
||||
'title' => esc_html__('Choose Social Media', 'thinkai'),
|
||||
),
|
||||
array(
|
||||
'id' => 'link_social_media',
|
||||
'type' => 'text',
|
||||
'title' => __('Link', 'thinkai'),
|
||||
),
|
||||
)
|
||||
),
|
||||
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
63
wp-content/plugins/thinkai-plugin/metabox/testimonials.php
Normal file
63
wp-content/plugins/thinkai-plugin/metabox/testimonials.php
Normal file
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
return array(
|
||||
'title' => 'Thinkai Testimonials Setting',
|
||||
'id' => 'thinkai_meta_testimonials',
|
||||
'icon' => 'el el-cogs',
|
||||
'position' => 'normal',
|
||||
'priority' => 'core',
|
||||
'post_types' => array( 'testimonials' ),
|
||||
'sections' => array(
|
||||
array(
|
||||
'id' => 'thinkai_testimonials_meta_setting',
|
||||
'fields' => array(
|
||||
array(
|
||||
'id' => 'author_name',
|
||||
'type' => 'text',
|
||||
'title' => esc_html__( 'Author Name', 'thinkai' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'author_designation',
|
||||
'type' => 'text',
|
||||
'title' => esc_html__( 'Author Designation', 'thinkai' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'te_video_url',
|
||||
'type' => 'text',
|
||||
'title' => esc_html__( 'Enter Video Url', 'thinkai' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'te_video_title',
|
||||
'type' => 'text',
|
||||
'title' => esc_html__( 'Enter Video Title', 'thinkai' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'review_title',
|
||||
'type' => 'text',
|
||||
'title' => esc_html__( 'Review Title', 'thinkai' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'review_time',
|
||||
'type' => 'text',
|
||||
'title' => esc_html__( 'Review Time', 'thinkai' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'te_ext_link',
|
||||
'type' => 'text',
|
||||
'title' => esc_html__( 'External Link', 'thinkai' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'testimonial_rating',
|
||||
'type' => 'select',
|
||||
'title' => esc_html__( 'Choose the Client Rating', 'thinkai' ),
|
||||
'options' => array(
|
||||
'1' => '1',
|
||||
'2' => '2',
|
||||
'3' => '3',
|
||||
'4' => '4',
|
||||
'5' => '5',
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
/**
|
||||
* Silence is golden.
|
||||
*
|
||||
* @package Redux Framework
|
||||
*/
|
||||
|
||||
$theme = wp_get_theme();
|
||||
|
||||
// translators: %1$s: template path.
|
||||
echo '<div class="error"><p>' . sprintf( esc_html__( 'The Redux 3 file ReduxCore/core/dashboard.php is still in use by %1$s. Please contact the author of this theme (NOT Redux support, we have no control over this issue). They need to update their project to use Redux 4 and discontinue use of this file. It will soon be removed from Redux.', 'redux-framework' ), '<code>' . esc_html( $theme->get( 'Name' ) ) . '</code>' ) . '</p></div>';
|
||||
|
||||
_deprecated_file( 'ReduxCore/core/dashboard.php', '4.3', '', 'This file has been discontinued and is no longer used in Redux 4. Please remove any references to it as it will be removed in future versions of Redux.' );
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
/**
|
||||
* Silence is golden.
|
||||
*
|
||||
* @package Redux Framework
|
||||
*/
|
||||
|
||||
$theme = wp_get_theme();
|
||||
|
||||
// translators: %1$s: template path.
|
||||
echo '<div class="error"><p>' . sprintf( esc_html__( 'The Redux 3 file ReduxCore/core/enqueue.php is still in use by %1$s. Please contact the author of this theme (NOT Redux support, we have no control over this issue). They need to update their project to use Redux 4 and discontinue use of this file. It will soon be removed from Redux.', 'redux-framework' ), '<code>' . esc_html( $theme->get( 'Name' ) ) . '</code>' ) . '</p></div>';
|
||||
|
||||
_deprecated_file( 'ReduxCore/core/enqueue.php', '4.3', 'redux-core/inc/classes/class-redux-enqueue.php', 'This file has been discontinued and is no longer used in Redux 4. Please remove any references to it as it will be removed in future versions of Redux.' );
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
/**
|
||||
* Silence is golden.
|
||||
*
|
||||
* @package Redux Framework
|
||||
*/
|
||||
|
||||
echo null;
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* Silence is golden.
|
||||
*
|
||||
* @package Redux Framework
|
||||
*/
|
||||
|
||||
$theme = wp_get_theme();
|
||||
|
||||
// translators: %1$s: template path.
|
||||
echo '<div class="error"><p>' . sprintf( esc_html__( 'The Redux 3 file ReduxCore/core/newsflash.php is still in use by %1$s. Please contact the author of this theme (NOT Redux support, we have no control over this issue). They need to update their project to use Redux 4 and discontinue use of this file. It will soon be removed from Redux.', 'redux-framework' ), '<code>' . esc_html( $theme->get( 'Name' ) ) . '</code>' ) . '</p></div>';
|
||||
|
||||
_deprecated_file( 'ReduxCore/core/newsflash.php', '4.3', '', 'This file has been discontinued and is no longer used in Redux 4. Please remove any references to it as it will be removed in future versions of Redux.' );
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
/**
|
||||
* Silence is golden.
|
||||
*
|
||||
* @package Redux Framework
|
||||
*/
|
||||
|
||||
$theme = wp_get_theme();
|
||||
|
||||
// translators: %1$s: template path.
|
||||
echo '<div class="error"><p>' . sprintf( esc_html__( 'The Redux 3 file ReduxCore/core/panel.php is still in use by %1$s. Please contact the author of this theme (NOT Redux support, we have no control over this issue). They need to update their project to use Redux 4 and discontinue use of this file. It will soon be removed from Redux.', 'redux-framework' ), '<code>' . esc_html( $theme->get( 'Name' ) ) . '</code>' ) . '</p></div>';
|
||||
|
||||
_deprecated_file( 'ReduxCore/core/panel.php', '4.3', 'redux-core/inc/classes/class-redux-panel.php', 'This file has been discontinued and is no longer used in Redux 4. Please remove any references to it as it will be removed in future versions of Redux.' );
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* Silence is golden.
|
||||
*
|
||||
* @package Redux Framework
|
||||
*/
|
||||
|
||||
$theme = wp_get_theme();
|
||||
|
||||
// translators: %1$s: template path.
|
||||
echo '<div class="error"><p>' . sprintf( esc_html__( 'The Redux 3 file ReduxCore/core/required.php is still in use by %1$s. Please contact the author of this theme (NOT Redux support, we have no control over this issue). They need to update their project to use Redux 4 and discontinue use of this file. It will soon be removed from Redux.', 'redux-framework' ), '<code>' . esc_html( $theme->get( 'Name' ) ) . '</code>' ) . '</p></div>';
|
||||
|
||||
_deprecated_file( 'ReduxCore/core/required.php', '4.3', 'redux-core/inc/classes/class-redux-required.php', 'This file has been discontinued and is no longer used in Redux 4. Please remove any references to it as it will be removed in future versions of Redux.' );
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
/**
|
||||
* Silence is golden.
|
||||
*
|
||||
* @package Redux Framework
|
||||
*/
|
||||
|
||||
echo null;
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* Silence is golden.
|
||||
*
|
||||
* @package Redux Framework
|
||||
*/
|
||||
|
||||
$theme = wp_get_theme();
|
||||
|
||||
// translators: %1$s: template path.
|
||||
echo '<div class="error"><p>' . sprintf( esc_html__( 'The Redux 3 file ReduxCore/inc/fields/typography/typography.php is still in use by %1$s. Please contact the author of this theme (NOT Redux support, we have no control over this issue). They need to update their project to use Redux 4 and discontinue use of this file. It will soon be removed from Redux.', 'redux-framework' ), '<code>' . esc_html( $theme->get( 'Name' ) ) . '</code>' ) . '</p></div>';
|
||||
|
||||
_deprecated_file( 'ReduxCore/inc/fields/typography/typography.php', '4.3', 'redux-core/inc/fields/class-redux-typography.php', 'This file has been discontinued and is no longer used in Redux 4. Please remove any references to it as it will be removed in future versions of Redux.' );
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
/**
|
||||
* Silence is golden.
|
||||
*
|
||||
* @package Redux Framework
|
||||
*/
|
||||
|
||||
echo null;
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
/**
|
||||
* Silence is golden.
|
||||
*
|
||||
* @package Redux Framework
|
||||
*/
|
||||
|
||||
echo null;
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
/**
|
||||
* Silence is golden.
|
||||
*
|
||||
* @package Redux Framework
|
||||
*/
|
||||
|
||||
echo null;
|
||||
@@ -0,0 +1,541 @@
|
||||
<?php
|
||||
/**
|
||||
* Redux_Framework_Plugin main class
|
||||
*
|
||||
* @package Redux Framework
|
||||
* @since 3.0.0
|
||||
*/
|
||||
|
||||
// Exit if accessed directly.
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
if ( ! class_exists( 'Redux_Framework_Plugin', false ) ) {
|
||||
|
||||
/**
|
||||
* Main Redux_Framework_Plugin class
|
||||
*
|
||||
* @since 3.0.0
|
||||
*/
|
||||
class Redux_Framework_Plugin {
|
||||
|
||||
/**
|
||||
* Option array for demo mode.
|
||||
*
|
||||
* @access protected
|
||||
* @var array $options Array of config options, used to check for demo mode
|
||||
* @since 3.0.0
|
||||
*/
|
||||
protected $options = array();
|
||||
|
||||
/**
|
||||
* Use this value as the text domain when translating strings from this plugin. It should match
|
||||
* the Text Domain field set in the plugin header, as well as the directory name of the plugin.
|
||||
* Additionally, text domains should only contain letters, number and hyphens, not underscores
|
||||
* or spaces.
|
||||
*
|
||||
* @access protected
|
||||
* @var string $plugin_slug The unique ID (slug) of this plugin
|
||||
* @since 3.0.0
|
||||
*/
|
||||
protected $plugin_slug = 'redux-framework';
|
||||
|
||||
/**
|
||||
* Set on network activate.
|
||||
*
|
||||
* @access protected
|
||||
* @var string $plugin_network_activated Check for plugin network activation
|
||||
* @since 3.0.0
|
||||
*/
|
||||
protected $plugin_network_activated = null;
|
||||
|
||||
/**
|
||||
* Class instance.
|
||||
*
|
||||
* @access private
|
||||
* @var Redux_Framework_Plugin $instance The one true Redux_Framework_Plugin
|
||||
* @since 3.0.0
|
||||
*/
|
||||
private static $instance;
|
||||
|
||||
/**
|
||||
* Crash flag.
|
||||
*
|
||||
* @access private
|
||||
* @var Redux_Framework_Plugin $crash Crash flag if inside a crash.
|
||||
* @since 4.1.15
|
||||
*/
|
||||
public static $crash = false;
|
||||
|
||||
/**
|
||||
* Get active instance
|
||||
*
|
||||
* @access public
|
||||
* @since 3.1.3
|
||||
* @return self::$instance The one true Redux_Framework_Plugin
|
||||
*/
|
||||
public static function instance(): ?Redux_Framework_Plugin {
|
||||
$path = REDUX_PLUGIN_FILE;
|
||||
$res = false;
|
||||
|
||||
if ( function_exists( 'get_plugin_data' ) && file_exists( $path ) ) {
|
||||
$data = get_plugin_data( $path );
|
||||
|
||||
if ( isset( $data ) && isset( $data['Version'] ) && '' !== $data['Version'] ) {
|
||||
$res = version_compare( $data['Version'], '4', '<' );
|
||||
}
|
||||
|
||||
if ( is_plugin_active( 'redux-framework/redux-framework.php' ) && true === $res ) {
|
||||
echo '<div class="error"><p>' . esc_html__( 'Redux Framework version 4 is activated but not loaded. Redux Framework version 3 is still installed and activated. Please deactivate Redux Framework version 3.', 'redux-framework' ) . '</p></div>'; // phpcs:ignore WordPress.Security.EscapeOutput
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! self::$instance ) {
|
||||
self::$instance = new self();
|
||||
if ( class_exists( 'ReduxFramework' ) ) {
|
||||
self::$instance->load_first();
|
||||
} else {
|
||||
self::$instance->get_redux_options();
|
||||
self::$instance->includes();
|
||||
self::$instance->hooks();
|
||||
}
|
||||
}
|
||||
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Shim for getting instance
|
||||
*
|
||||
* @access public
|
||||
* @since 4.0.1
|
||||
* @return self::$instance The one true Redux_Framework_Plugin
|
||||
*/
|
||||
public static function get_instance(): ?Redux_Framework_Plugin {
|
||||
return self::instance();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Redux options
|
||||
*
|
||||
* @access public
|
||||
* @since 3.1.3
|
||||
* @return void
|
||||
*/
|
||||
public function get_redux_options() {
|
||||
|
||||
// Setup defaults.
|
||||
$defaults = array(
|
||||
'demo' => false,
|
||||
);
|
||||
|
||||
// If multisite is enabled.
|
||||
if ( is_multisite() ) {
|
||||
|
||||
// Get network activated plugins.
|
||||
$plugins = get_site_option( 'active_sitewide_plugins' );
|
||||
|
||||
foreach ( $plugins as $file => $plugin ) {
|
||||
if ( strpos( $file, 'redux-framework.php' ) !== false ) {
|
||||
$this->plugin_network_activated = true;
|
||||
$this->options = get_site_option( 'ReduxFrameworkPlugin', $defaults );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If options aren't set, grab them now!
|
||||
if ( empty( $this->options ) ) {
|
||||
$this->options = get_option( 'ReduxFrameworkPlugin', $defaults );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Include necessary files
|
||||
*
|
||||
* @access public
|
||||
* @since 3.1.3
|
||||
* @return void
|
||||
*/
|
||||
public function includes() {
|
||||
|
||||
// Include Redux_Core.
|
||||
if ( file_exists( dirname( __FILE__ ) . '/redux-core/framework.php' ) ) {
|
||||
require_once dirname( __FILE__ ) . '/redux-core/framework.php';
|
||||
}
|
||||
|
||||
// TODO: Delete when stable.
|
||||
//Redux_Core::$extendify_templates_enabled = (bool) get_option( 'use_extendify_templates', true );
|
||||
|
||||
// Including extendify sdk.
|
||||
//if ( true === (bool) get_option( 'use_extendify_templates', true ) ) {
|
||||
// if ( file_exists( dirname( __FILE__ ) . '/extendify-sdk/loader.php' ) ) {
|
||||
// $GLOBALS['extendify_sdk_partner'] = 'Redux';
|
||||
// require_once dirname( __FILE__ ) . '/extendify-sdk/loader.php';
|
||||
// }
|
||||
//}
|
||||
|
||||
if ( file_exists( dirname( __FILE__ ) . '/redux-templates/redux-templates.php' ) ) {
|
||||
require_once dirname( __FILE__ ) . '/redux-templates/redux-templates.php';
|
||||
}
|
||||
|
||||
if ( isset( Redux_Core::$as_plugin ) ) {
|
||||
Redux_Core::$as_plugin = true;
|
||||
}
|
||||
|
||||
add_action( 'setup_theme', array( $this, 'load_sample_config' ) );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads the sample config after everything is loaded.
|
||||
*
|
||||
* @access public
|
||||
* @since 4.0.2
|
||||
* @return void
|
||||
*/
|
||||
public function load_sample_config() {
|
||||
// Include demo config, if demo mode is active.
|
||||
if ( $this->options['demo'] && file_exists( dirname( __FILE__ ) . '/sample/sample-config.php' ) ) {
|
||||
require_once dirname( __FILE__ ) . '/sample/sample-config.php';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Run action and filter hooks
|
||||
*
|
||||
* @access private
|
||||
* @since 3.1.3
|
||||
* @return void
|
||||
*/
|
||||
private function hooks() {
|
||||
add_action( 'activated_plugin', array( $this, 'load_first' ) );
|
||||
add_action( 'wp_loaded', array( $this, 'options_toggle_check' ) );
|
||||
|
||||
// Activate plugin when new blog is added.
|
||||
add_action( 'wpmu_new_blog', array( $this, 'activate_new_site' ) );
|
||||
|
||||
// Display admin notices.
|
||||
add_action( 'admin_notices', array( $this, 'admin_notices' ) );
|
||||
|
||||
// Edit plugin metalinks.
|
||||
add_filter( 'plugin_row_meta', array( $this, 'plugin_metalinks' ), null, 2 );
|
||||
add_filter( 'network_admin_plugin_action_links', array( $this, 'add_settings_link' ), 1, 2 );
|
||||
add_filter( 'plugin_action_links', array( $this, 'add_settings_link' ), 1, 2 );
|
||||
|
||||
// phpcs:ignore WordPress.NamingConventions.ValidHookName
|
||||
do_action( 'redux/plugin/hooks', $this );
|
||||
}
|
||||
|
||||
/**
|
||||
* Pushes Redux to top of plugin load list, so it initializes before any plugin that may use it.
|
||||
*/
|
||||
public function load_first() {
|
||||
if ( ! class_exists( 'Redux_Functions_Ex' ) ) {
|
||||
require_once dirname( __FILE__ ) . '/redux-core/inc/classes/class-redux-functions-ex.php';
|
||||
}
|
||||
|
||||
$plugin_dir = Redux_Functions_Ex::wp_normalize_path( WP_PLUGIN_DIR ) . '/';
|
||||
$self_file = Redux_Functions_Ex::wp_normalize_path( __FILE__ );
|
||||
|
||||
$path = str_replace( $plugin_dir, '', $self_file );
|
||||
$path = str_replace( 'class-redux-framework-plugin.php', 'redux-framework.php', $path );
|
||||
|
||||
$plugins = get_option( 'active_plugins' );
|
||||
|
||||
if ( $plugins ) {
|
||||
$key = array_search( $path, $plugins, true );
|
||||
|
||||
if ( false !== $key ) {
|
||||
array_splice( $plugins, $key, 1 );
|
||||
array_unshift( $plugins, $path );
|
||||
update_option( 'active_plugins', $plugins );
|
||||
}
|
||||
|
||||
if ( class_exists( 'Redux_Pro' ) ) {
|
||||
$self_file = Redux_Functions_Ex::wp_normalize_path( Redux_Pro::$dir );
|
||||
$path = str_replace( $plugin_dir, '', $self_file );
|
||||
|
||||
// phpcs:ignore WordPress.NamingConventions.ValidHookName
|
||||
$basename = apply_filters( 'redux/pro/basename', 'redux-pro.php' );
|
||||
|
||||
$key = array_search( $path . '/' . $basename, $plugins, true );
|
||||
if ( false !== $key ) {
|
||||
array_splice( $plugins, $key, 1 );
|
||||
array_unshift( $plugins, $path . '/' . $basename );
|
||||
update_option( 'active_plugins', $plugins );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Fired on plugin activation
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @since 3.0.0
|
||||
*/
|
||||
public static function activate() {
|
||||
delete_site_transient( 'update_plugins' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Fired when plugin is deactivated
|
||||
*
|
||||
* @access public
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param boolean $network_wide True if plugin is network activated, false otherwise.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function deactivate( ?bool $network_wide ) {
|
||||
if ( function_exists( 'is_multisite' ) && is_multisite() ) {
|
||||
if ( $network_wide ) {
|
||||
// Get all blog IDs.
|
||||
$blog_ids = self::get_blog_ids();
|
||||
|
||||
foreach ( $blog_ids as $blog_id ) {
|
||||
switch_to_blog( $blog_id );
|
||||
self::single_deactivate();
|
||||
}
|
||||
restore_current_blog();
|
||||
} else {
|
||||
self::single_deactivate();
|
||||
}
|
||||
} else {
|
||||
self::single_deactivate();
|
||||
}
|
||||
|
||||
delete_option( 'ReduxFrameworkPlugin' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Fired when a new WPMU site is activated
|
||||
*
|
||||
* @access public
|
||||
*
|
||||
* @param int $blog_id The ID of the new blog.
|
||||
*
|
||||
* @return void
|
||||
* @since 3.0.0
|
||||
*/
|
||||
public function activate_new_site( int $blog_id ) {
|
||||
if ( 1 !== did_action( 'wpmu_new_blog' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
switch_to_blog( $blog_id );
|
||||
self::single_activate();
|
||||
restore_current_blog();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all IDs of blogs that are not activated, not spam, and not deleted
|
||||
*
|
||||
* @access private
|
||||
* @since 3.0.0
|
||||
* @global object $wpdb
|
||||
* @return array|false Array of IDs or false if none are found
|
||||
*/
|
||||
private static function get_blog_ids() {
|
||||
global $wpdb;
|
||||
|
||||
$var = '0';
|
||||
|
||||
// Get an array of IDs (We have to do it this way because WordPress says so, however redundant).
|
||||
$result = wp_cache_get( 'redux-blog-ids' );
|
||||
if ( false === $result ) {
|
||||
|
||||
// WordPress says get_col is discouraged? I found no alternative. So...ignore! - kp.
|
||||
// phpcs:ignore WordPress.DB.DirectDatabaseQuery
|
||||
$result = $wpdb->get_col( $wpdb->prepare( "SELECT blog_id FROM $wpdb->blogs WHERE archived = %s AND spam = %s AND deleted = %s", $var, $var, $var ) );
|
||||
|
||||
wp_cache_set( 'redux-blog-ids', $result );
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fired for each WPMS blog on plugin activation
|
||||
*
|
||||
* @access private
|
||||
* @since 3.0.0
|
||||
* @return void
|
||||
*/
|
||||
private static function single_activate() {
|
||||
$nonce = wp_create_nonce( 'redux_framework_demo' );
|
||||
|
||||
$notices = get_option( 'ReduxFrameworkPlugin_ACTIVATED_NOTICES', array() );
|
||||
$notices[] = esc_html__( 'Redux Framework has an embedded demo.', 'redux-framework' ) . ' <a href="./plugins.php?redux-framework-plugin=demo&nonce=' . $nonce . '">' . esc_html__( 'Click here to activate the sample config file.', 'redux-framework' ) . '</a>';
|
||||
|
||||
update_option( 'ReduxFrameworkPlugin_ACTIVATED_NOTICES', $notices );
|
||||
}
|
||||
|
||||
/**
|
||||
* Display admin notices
|
||||
*
|
||||
* @access public
|
||||
* @since 3.0.0
|
||||
* @return void
|
||||
*/
|
||||
public function admin_notices() {
|
||||
do_action( 'redux_framework_plugin_admin_notice' );
|
||||
$notices = get_option( 'ReduxFrameworkPlugin_ACTIVATED_NOTICES', '' );
|
||||
if ( ! empty( $notices ) ) {
|
||||
foreach ( $notices as $notice ) {
|
||||
echo '<div class="updated notice is-dismissible"><p>' . $notice . '</p></div>'; // phpcs:ignore WordPress.Security.EscapeOutput
|
||||
}
|
||||
|
||||
delete_option( 'ReduxFrameworkPlugin_ACTIVATED_NOTICES' );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Fired for each blog when the plugin is deactivated
|
||||
*
|
||||
* @access private
|
||||
* @since 3.0.0
|
||||
* @return void
|
||||
*/
|
||||
private static function single_deactivate() {
|
||||
delete_option( 'ReduxFrameworkPlugin_ACTIVATED_NOTICES' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Turn on or off
|
||||
*
|
||||
* @access public
|
||||
* @since 3.0.0
|
||||
* @return void
|
||||
*/
|
||||
public function options_toggle_check() {
|
||||
if ( isset( $_GET['nonce'] ) && wp_verify_nonce( sanitize_key( $_GET['nonce'] ), 'redux_framework_demo' ) ) {
|
||||
if ( isset( $_GET['redux-framework-plugin'] ) && 'demo' === $_GET['redux-framework-plugin'] ) {
|
||||
$url = admin_url( add_query_arg( array( 'page' => 'redux-framework' ), 'options-general.php' ) );
|
||||
|
||||
if ( false === $this->options['demo'] ) {
|
||||
$this->options['demo'] = true;
|
||||
$url = admin_url( add_query_arg( array( 'page' => 'redux_demo' ), 'admin.php' ) );
|
||||
} else {
|
||||
$this->options['demo'] = false;
|
||||
}
|
||||
|
||||
if ( is_multisite() && $this->plugin_network_activated ) {
|
||||
update_site_option( 'ReduxFrameworkPlugin', $this->options );
|
||||
} else {
|
||||
update_option( 'ReduxFrameworkPlugin', $this->options );
|
||||
}
|
||||
|
||||
wp_safe_redirect( esc_url( $url ) );
|
||||
|
||||
exit();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Add a settings link to the Redux entry in the plugin overview screen
|
||||
*
|
||||
* @param array $links Links array.
|
||||
* @param string $file Plugin filename/slug.
|
||||
*
|
||||
* @return array
|
||||
* @see filter:plugin_action_links
|
||||
* @since 1.0
|
||||
*/
|
||||
public function add_settings_link( array $links, string $file ): array {
|
||||
if ( basename( plugin_dir_path( __FILE__ ) ) . '/redux-framework.php' !== $file ) {
|
||||
return $links;
|
||||
}
|
||||
|
||||
//$links[] = sprintf(
|
||||
// '<a href="%1$s" target="_blank">%2$s</a>',
|
||||
// esc_url( $this->get_site_utm_url( '', 'plugins-page', '', 'go-pro' ) ),
|
||||
// sprintf(
|
||||
// '<span style="font-weight: bold;">%s</span>',
|
||||
// __( 'Go Pro', 'redux-framework' )
|
||||
// )
|
||||
//);
|
||||
|
||||
return $links;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the url where the Admin Columns website is hosted
|
||||
*
|
||||
* @param string $path Path to add to url.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function get_site_url( string $path = '' ): string {
|
||||
$url = 'https://extendify.com/pricing/';
|
||||
|
||||
if ( ! empty( $path ) ) {
|
||||
$url .= '/' . trim( $path, '/' ) . '/';
|
||||
}
|
||||
|
||||
return $url;
|
||||
}
|
||||
|
||||
/**
|
||||
* Url with utm tags
|
||||
*
|
||||
* @param string $path Path on site.
|
||||
* @param string $utm_medium Medium var.
|
||||
* @param string|null $utm_content Content var.
|
||||
* @param string|bool $utm_campaign Campaign var.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function get_site_utm_url( string $path, string $utm_medium, string $utm_content = null, $utm_campaign = false ): string {
|
||||
$url = self::get_site_url( $path );
|
||||
|
||||
if ( ! $utm_campaign ) {
|
||||
$utm_campaign = 'plugin-installation';
|
||||
}
|
||||
|
||||
$args = array(
|
||||
// Referrer: plugin.
|
||||
'utm_source' => 'redux',
|
||||
|
||||
// Specific promotions or sales.
|
||||
'utm_campaign' => $utm_campaign,
|
||||
|
||||
// Marketing medium: banner, documentation or email.
|
||||
'utm_medium' => $utm_medium,
|
||||
|
||||
// Used for differentiation of medium.
|
||||
'utm_content' => $utm_content,
|
||||
);
|
||||
|
||||
$args = array_map( 'sanitize_key', array_filter( $args ) );
|
||||
|
||||
return add_query_arg( $args, $url );
|
||||
}
|
||||
|
||||
/**
|
||||
* Edit plugin metalinks
|
||||
*
|
||||
* @access public
|
||||
*
|
||||
* @param array $links The current array of links.
|
||||
* @param string $file A specific plugin row.
|
||||
*
|
||||
* @return array The modified array of links
|
||||
* @since 3.0.0
|
||||
*/
|
||||
public function plugin_metalinks( array $links, string $file ): array {
|
||||
if ( strpos( $file, 'redux-framework.php' ) !== false && is_plugin_active( $file ) ) {
|
||||
$links[] = '<a href="' . esc_url( admin_url( add_query_arg( array( 'page' => 'redux-framework' ), 'options-general.php' ) ) ) . '">' . esc_html__( 'What is this?', 'redux-framework' ) . '</a>';
|
||||
}
|
||||
|
||||
return $links;
|
||||
}
|
||||
}
|
||||
if ( ! class_exists( 'ReduxFrameworkPlugin' ) ) {
|
||||
class_alias( 'Redux_Framework_Plugin', 'ReduxFrameworkPlugin' );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
/**
|
||||
* Silence is golden.
|
||||
*
|
||||
* @package Redux Framework
|
||||
*/
|
||||
|
||||
echo null;
|
||||
@@ -0,0 +1,37 @@
|
||||
.redux-container .redux-main input.redux-color { float: left; width: 70px; margin-left: 5px; }
|
||||
|
||||
.redux-container .redux-main input.color-transparency { margin-left: 10px; margin-right: 3px; }
|
||||
|
||||
.redux-container .redux-main input.wp-color-picker { width: 80px !important; }
|
||||
|
||||
.redux-container .redux-main .section-color .controls { width: 345px; }
|
||||
|
||||
.redux-container .redux-main .section-color .explain { width: 225px; }
|
||||
|
||||
.redux-container .redux-main .alpha-enabled .iris-picker .iris-strip .ui-slider-handle { right: -4px !important; left: -3px !important; }
|
||||
|
||||
.redux-container .redux-main .iris-picker .iris-strip .ui-slider-handle { position: absolute; background: none !important; right: -4px !important; left: -3px !important; border: 4px solid #aaa !important; border-width: 4px 3px; width: auto; border-radius: 4px; -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); opacity: 0.9; z-index: 5; cursor: ns-resize; }
|
||||
|
||||
.redux-container .redux-main .iris-picker .iris-slider-offset { position: absolute; top: 2px; left: 0; right: 0; bottom: 4px; width: 28px; background: none !important; border: 0 !important; height: auto; }
|
||||
|
||||
.redux-container .redux-main .wp-picker-container { display: inline-block; outline: 0; }
|
||||
|
||||
.redux-container .redux-main .wp-picker-container input { margin-bottom: inherit; margin-top: inherit; padding: 3px 5px; }
|
||||
|
||||
.redux-container .redux-main .wp-picker-container .wp-color-result { outline: 0; height: 24px !important; margin: 0 6px 6px 0 !important; }
|
||||
|
||||
.redux-container .redux-main .wp-picker-container .wp-picker-default { padding: 0 10px 1px; }
|
||||
|
||||
.redux-container .redux-main .redux-color-gradient { line-height: 24px; }
|
||||
|
||||
.redux-container .redux-main .color-transparency-check { line-height: 1; margin: 0 !important; padding-top: 10px; }
|
||||
|
||||
.redux-container .redux-main .wp-picker-clear { min-height: 30px !important; margin-left: 5px; }
|
||||
|
||||
.wp-customizer .redux-main input.wp-picker-default, .wp-customizer .redux-main .redux-typography-container input.wp-picker-default, .wp-customizer .redux-main .redux-typography-container .redux-typography-color { padding: 0 4px !important; }
|
||||
|
||||
.wp-customizer .redux-main input.wp-color-picker { width: 65px !important; margin-left: 5px !important; }
|
||||
|
||||
/*# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29sb3ItcGlja2VyLmNzcyIsInNvdXJjZXMiOlsiY29sb3ItcGlja2VyLnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsQUFHWSxnQkFISSxDQUNaLFdBQVcsQ0FDUCxLQUFLLEFBQ0EsWUFBWSxDQUFDLEVBQ1YsS0FBSyxFQUFFLElBQUksRUFDWCxLQUFLLEVBQUUsSUFBSSxFQUNYLFdBQVcsRUFBRSxHQUFHLEdBQ25COztBQVBiLEFBU1ksZ0JBVEksQ0FDWixXQUFXLENBQ1AsS0FBSyxBQU9BLG1CQUFtQixDQUFDLEVBQ2pCLFdBQVcsRUFBRSxJQUFJLEVBQ2pCLFlBQVksRUFBRSxHQUFHLEdBQ3BCOztBQVpiLEFBY1ksZ0JBZEksQ0FDWixXQUFXLENBQ1AsS0FBSyxBQVlBLGdCQUFnQixDQUFDLEVBQ2QsS0FBSyxFQUFFLGVBQWUsR0FDekI7O0FBaEJiLEFBb0JZLGdCQXBCSSxDQUNaLFdBQVcsQ0FrQlAsY0FBYyxDQUNWLFNBQVMsQ0FBQyxFQUNOLEtBQUssRUFBRSxLQUFLLEdBQ2Y7O0FBdEJiLEFBd0JZLGdCQXhCSSxDQUNaLFdBQVcsQ0FrQlAsY0FBYyxDQUtWLFFBQVEsQ0FBQyxFQUNMLEtBQUssRUFBRSxLQUFLLEdBQ2Y7O0FBMUJiLEFBK0JnQixnQkEvQkEsQ0FDWixXQUFXLENBNEJQLGNBQWMsQ0FDVixZQUFZLENBQ1IsV0FBVyxDQUFDLGlCQUFpQixDQUFDLEVBQzFCLEtBQUssRUFBRyxJQUFHLENBQUEsVUFBVSxFQUNyQixJQUFJLEVBQUcsSUFBRyxDQUFBLFVBQVUsR0FDdkI7O0FBbENqQixBQXVDWSxnQkF2Q0ksQ0FDWixXQUFXLENBcUNQLFlBQVksQ0FDUixXQUFXLENBQUMsaUJBQWlCLENBQUMsRUFDMUIsUUFBUSxFQUFFLFFBQVEsRUFDbEIsVUFBVSxFQUFFLGVBQWUsRUFDM0IsS0FBSyxFQUFHLElBQUcsQ0FBQSxVQUFVLEVBQ3JCLElBQUksRUFBRyxJQUFHLENBQUEsVUFBVSxFQUNwQixNQUFNLEVBQUUseUJBQXlCLEVBQ2pDLFlBQVksRUFBRSxPQUFPLEVBQ3JCLEtBQUssRUFBRSxJQUFJLEVBQ1gsYUFBYSxFQUFFLEdBQUcsRUFDbEIsVUFBVSxFQUFFLENBQUMsQ0FBQyxHQUFHLENBQUMsR0FBRyxDQUFDLGtCQUFrQixFQUN4QyxPQUFPLEVBQUUsR0FBRyxFQUNaLE9BQU8sRUFBRSxDQUFDLEVBQ1YsTUFBTSxFQUFFLFNBQVMsR0FDcEI7O0FBcERiLEFBc0RZLGdCQXRESSxDQUNaLFdBQVcsQ0FxQ1AsWUFBWSxDQWdCUixtQkFBbUIsQ0FBQyxFQUNoQixRQUFRLEVBQUUsUUFBUSxFQUNsQixHQUFHLEVBQUUsR0FBRyxFQUNSLElBQUksRUFBRSxDQUFDLEVBQ1AsS0FBSyxFQUFFLENBQUMsRUFDUixNQUFNLEVBQUUsR0FBRyxFQUNYLEtBQUssRUFBRSxJQUFJLEVBQ1gsVUFBVSxFQUFFLGVBQWUsRUFDM0IsTUFBTSxFQUFFLFlBQVksRUFDcEIsTUFBTSxFQUFFLElBQUksR0FDZjs7QUFoRWIsQUFtRVEsZ0JBbkVRLENBQ1osV0FBVyxDQWtFUCxvQkFBb0IsQ0FBQyxFQUNqQixPQUFPLEVBQUUsWUFBWSxFQUNyQixPQUFPLEVBQUUsQ0FBQyxHQWtCYjs7QUF2RlQsQUF1RVksZ0JBdkVJLENBQ1osV0FBVyxDQWtFUCxvQkFBb0IsQ0FJaEIsS0FBSyxDQUFDLEVBQ0YsYUFBYSxFQUFFLE9BQU8sRUFDdEIsVUFBVSxFQUFFLE9BQU8sRUFDbkIsT0FBTyxFQUFFLE9BQU8sR0FDbkI7O0FBM0ViLEFBNkVZLGdCQTdFSSxDQUNaLFdBQVcsQ0FrRVAsb0JBQW9CLENBVWhCLGdCQUFnQixDQUFDLEVBQ2IsT0FBTyxFQUFFLENBQUMsRUFDVixNQUFNLEVBQUUsZUFBZSxFQUN2QixNQUFNLEVBQUUsc0JBQXNCLEdBQ2pDOztBQWpGYixBQW1GWSxnQkFuRkksQ0FDWixXQUFXLENBa0VQLG9CQUFvQixDQWdCaEIsa0JBQWtCLENBQUMsRUFDZixPQUFPLEVBQUUsVUFBVSxHQUN0Qjs7QUFyRmIsQUF5RlEsZ0JBekZRLENBQ1osV0FBVyxDQXdGUCxxQkFBcUIsQ0FBQyxFQUNsQixXQUFXLEVBQUUsSUFBSSxHQUNwQjs7QUEzRlQsQUE2RlEsZ0JBN0ZRLENBQ1osV0FBVyxDQTRGUCx5QkFBeUIsQ0FBQyxFQUN0QixXQUFXLEVBQUUsQ0FBQyxFQUNkLE1BQU0sRUFBRSxZQUFZLEVBQ3BCLFdBQVcsRUFBRSxJQUFJLEdBQ3BCOztBQWpHVCxBQW1HUSxnQkFuR1EsQ0FDWixXQUFXLENBa0dQLGdCQUFnQixDQUFDLEVBQ2IsVUFBVSxFQUFFLGVBQWUsRUFDM0IsV0FBVyxFQUFFLEdBQUcsR0FDbkI7O0FBSVQsQUFDSSxjQURVLENBQ1YsV0FBVyxDQUFDLEtBQUssQUFBQSxrQkFBa0IsRUFEdkMsY0FBYyxDQUVWLFdBQVcsQ0FBQywyQkFBMkIsQ0FBQyxLQUFLLEFBQUEsa0JBQWtCLEVBRm5FLGNBQWMsQ0FHVixXQUFXLENBQUMsMkJBQTJCLENBQUMsdUJBQXVCLENBQUMsRUFDNUQsT0FBTyxFQUFFLGdCQUFnQixHQUM1Qjs7QUFMTCxBQU1JLGNBTlUsQ0FNVixXQUFXLENBQUMsS0FBSyxBQUFBLGdCQUFnQixDQUFDLEVBQzlCLEtBQUssRUFBRSxlQUFlLEVBQ3RCLFdBQVcsRUFBRSxjQUFjLEdBQzlCIn0= */
|
||||
|
||||
/*# sourceMappingURL=color-picker.css.map */
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["color-picker.scss","color-picker.css"],"names":[],"mappings":"AAAA,iDAAgB,WACZ,ECIY,WAAW,EDLX,gBAmBR,EAAA;;AAnBR,wDAAgB,iBA6BR,EClBQ,iBAAiB,EAAA;;ADXjC,qDCegB,sBAAsB,EAAA;;ADftC,wDCqBgB,YAAY,EAAA;;ADrB5B,uDCyBgB,YAAY,EAAA;;ADzB5B,yFAgHI,sBAAiB,EC/ED,qBAAoB,EAAA;;ADjCxC,0ECwCgB,kBAAkB,EAClB,2BAA2B,EAC3B,sBAAqB,EACrB,qBAAoB,EACpB,iCAAiC,EACjC,qBAAqB,EACrB,WAAW,EACX,kBAAkB,EAClB,gDAAwC,EAAxC,wCAAwC,EACxC,YAAY,EACZ,UAAU,EACV,iBAAiB,EAAA;;ADnDjC,gECuDgB,kBAAkB,EAClB,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,WAAW,EACX,WAAW,EACX,2BAA2B,EAC3B,oBAAoB,EACpB,YAAY,EAAA;;AD/D5B,oDCoEY,qBAAqB,EACrB,UAAU,EAAA;;ADrEtB,0DCwEgB,sBAAsB,EACtB,mBAAmB,EACnB,gBAAgB,EAAA;;AD1EhC,qEC8EgB,UAAU,EACV,uBAAuB,EACvB,8BAA8B,EAAA;;ADhF9C,uECoFgB,mBAAmB,EAAA;;ADpFnC,qDC0FY,iBAAiB,EAAA;;AD1F7B,yDC8FY,cAAc,EACd,oBAAoB,EACpB,iBAAiB,EAAA;;ADhG7B,gDCoGY,2BAA2B,EAC3B,gBAAgB,EAAA;;AAK5B,qNAIQ,yBAAyB,EAAA;;AAJjC,mDAOQ,sBAAsB,EACtB,2BAA2B,EAAA;;AAhFnC,inGAAinG","file":"color-picker.css","sourcesContent":[".redux-container {\n .redux-main {\n input {\n &.redux-color {\n float: left;\n width: 70px;\n margin-left: 5px;\n }\n\n &.color-transparency {\n margin-left: 10px;\n margin-right: 3px;\n }\n\n &.wp-color-picker {\n width: 80px !important;\n }\n }\n\n .section-color {\n .controls {\n width: 345px;\n }\n\n .explain {\n width: 225px;\n }\n }\n\n .alpha-enabled {\n .iris-picker {\n .iris-strip .ui-slider-handle {\n right: -4px!important;\n left: -3px!important;\n }\n }\n }\n\n .iris-picker {\n .iris-strip .ui-slider-handle {\n position: absolute;\n background: none !important;\n right: -4px!important;\n left: -3px!important;\n border: 4px solid #aaa !important;\n border-width: 4px 3px;\n width: auto;\n border-radius: 4px;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);\n opacity: 0.9;\n z-index: 5;\n cursor: ns-resize;\n }\n\n .iris-slider-offset {\n position: absolute;\n top: 2px;\n left: 0;\n right: 0;\n bottom: 4px;\n width: 28px; //17\n background: none !important;\n border: 0 !important;\n height: auto;\n }\n }\n\n .wp-picker-container {\n display: inline-block;\n outline: 0;\n\n input {\n margin-bottom: inherit;\n margin-top: inherit;\n padding: 3px 5px;\n }\n\n .wp-color-result {\n outline: 0;\n height: 24px !important;\n margin: 0 6px 6px 0 !important;\n }\n\n .wp-picker-default {\n padding: 0 10px 1px;\n }\n\n }\n\n .redux-color-gradient {\n line-height: 24px;\n }\n\n .color-transparency-check {\n line-height: 1;\n margin: 0 !important;\n padding-top: 10px;\n }\n\n .wp-picker-clear {\n min-height: 30px !important;\n margin-left: 5px;\n }\n }\n}\n\n.wp-customizer {\n .redux-main input.wp-picker-default,\n .redux-main .redux-typography-container input.wp-picker-default,\n .redux-main .redux-typography-container .redux-typography-color {\n padding: 0 4px !important;\n }\n .redux-main input.wp-color-picker {\n width: 65px !important;\n margin-left: 5px !important;\n }\n}\n"]}
|
||||
1
wp-content/plugins/thinkai-plugin/redux-framework/redux-core/assets/css/color-picker.min.css
vendored
Normal file
1
wp-content/plugins/thinkai-plugin/redux-framework/redux-core/assets/css/color-picker.min.css
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.redux-container .redux-main input.redux-color{float:left;width:70px;margin-left:5px}.redux-container .redux-main input.color-transparency{margin-left:10px;margin-right:3px}.redux-container .redux-main input.wp-color-picker{width:80px !important}.redux-container .redux-main .section-color .controls{width:345px}.redux-container .redux-main .section-color .explain{width:225px}.redux-container .redux-main .alpha-enabled .iris-picker .iris-strip .ui-slider-handle{right:-4px !important;left:-3px !important}.redux-container .redux-main .iris-picker .iris-strip .ui-slider-handle{position:absolute;background:none !important;right:-4px !important;left:-3px !important;border:4px solid #aaa !important;border-width:4px 3px;width:auto;border-radius:4px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.2);box-shadow:0 1px 2px rgba(0,0,0,0.2);opacity:.9;z-index:5;cursor:ns-resize}.redux-container .redux-main .iris-picker .iris-slider-offset{position:absolute;top:2px;left:0;right:0;bottom:4px;width:28px;background:none !important;border:0 !important;height:auto}.redux-container .redux-main .wp-picker-container{display:inline-block;outline:0}.redux-container .redux-main .wp-picker-container input{margin-bottom:inherit;margin-top:inherit;padding:3px 5px}.redux-container .redux-main .wp-picker-container .wp-color-result{outline:0;height:24px !important;margin:0 6px 6px 0 !important}.redux-container .redux-main .wp-picker-container .wp-picker-default{padding:0 10px 1px}.redux-container .redux-main .redux-color-gradient{line-height:24px}.redux-container .redux-main .color-transparency-check{line-height:1;margin:0 !important;padding-top:10px}.redux-container .redux-main .wp-picker-clear{min-height:30px !important;margin-left:5px}.wp-customizer .redux-main input.wp-picker-default,.wp-customizer .redux-main .redux-typography-container input.wp-picker-default,.wp-customizer .redux-main .redux-typography-container .redux-typography-color{padding:0 4px !important}.wp-customizer .redux-main input.wp-color-picker{width:65px !important;margin-left:5px !important}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
/**
|
||||
* Silence is golden.
|
||||
*
|
||||
* @package Redux Framework
|
||||
*/
|
||||
|
||||
echo null;
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
/**
|
||||
* Silence is golden.
|
||||
*
|
||||
* @package Redux Framework
|
||||
*/
|
||||
|
||||
echo null;
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
/**
|
||||
* Silence is golden.
|
||||
*
|
||||
* @package Redux Framework
|
||||
*/
|
||||
|
||||
echo null;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user