├── inc
├── demo-data
│ ├── screen-image.jpg
│ ├── barber-customizer.dat
│ ├── css
│ │ └── demo-import.css
│ ├── barber-widgets-demo.wie
│ └── demo-import.php
├── elementor-widgets
│ ├── assets
│ │ ├── css
│ │ │ ├── elementor-edit.css
│ │ │ ├── utility.css
│ │ │ ├── owl.carousel.min.css
│ │ │ └── magnific-popup.css
│ │ ├── fonts
│ │ │ └── themify-icon
│ │ │ │ └── fonts
│ │ │ │ ├── themify.eot
│ │ │ │ ├── themify.ttf
│ │ │ │ └── themify.woff
│ │ └── js
│ │ │ ├── map-active.js
│ │ │ ├── progress-loader-canvas.js
│ │ │ ├── jquery.counterup.js
│ │ │ ├── imagesLoaded.js
│ │ │ ├── barber-companion-main.js
│ │ │ ├── barfiller.js
│ │ │ ├── waypoints.js
│ │ │ └── jquery.youtubebackground.js
│ └── widgets
│ │ ├── hero-section.php
│ │ ├── contact.php
│ │ ├── video-section.php
│ │ ├── services.php
│ │ ├── gallery.php
│ │ ├── home-contact.php
│ │ ├── review-section.php
│ │ ├── about-us.php
│ │ └── team-members.php
├── barber-metabox.php
├── sidebar-widgets
│ ├── instagram.php
│ ├── blog-widget.php
│ ├── newsletter-widget.php
│ ├── social-links.php
│ └── about-widget.php
├── instagram-api.php
└── functions.php
├── js
├── common.js
└── loadmore-ajax.js
├── barber-init.php
├── barber-companion.php
└── readme.txt
/inc/demo-data/screen-image.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ColorlibHQ/barber-companion/master/inc/demo-data/screen-image.jpg
--------------------------------------------------------------------------------
/inc/elementor-widgets/assets/css/elementor-edit.css:
--------------------------------------------------------------------------------
1 | .elementor-choices-label i {
2 | font-size: 18px !important;
3 | padding: 5px 0;
4 | }
--------------------------------------------------------------------------------
/inc/elementor-widgets/assets/fonts/themify-icon/fonts/themify.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ColorlibHQ/barber-companion/master/inc/elementor-widgets/assets/fonts/themify-icon/fonts/themify.eot
--------------------------------------------------------------------------------
/inc/elementor-widgets/assets/fonts/themify-icon/fonts/themify.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ColorlibHQ/barber-companion/master/inc/elementor-widgets/assets/fonts/themify-icon/fonts/themify.ttf
--------------------------------------------------------------------------------
/inc/elementor-widgets/assets/fonts/themify-icon/fonts/themify.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ColorlibHQ/barber-companion/master/inc/elementor-widgets/assets/fonts/themify-icon/fonts/themify.woff
--------------------------------------------------------------------------------
/inc/demo-data/barber-customizer.dat:
--------------------------------------------------------------------------------
1 | a:4:{s:8:"template";s:6:"barber";s:4:"mods";a:7:{i:0;b:0;s:18:"nav_menu_locations";a:2:{s:12:"primary-menu";i:28;s:15:"navigation-menu";i:29;}s:18:"custom_css_post_id";i:-1;s:27:"barber_footer_widget_toggle";b:1;s:16:"barber_blog_meta";b:1;s:15:"barber_like_btn";b:1;s:17:"barber_blog_share";b:1;}s:7:"options";a:2:{s:9:"site_icon";s:1:"0";s:23:"nav_menus_created_posts";a:0:{}}s:6:"wp_css";s:0:"";}
--------------------------------------------------------------------------------
/inc/demo-data/css/demo-import.css:
--------------------------------------------------------------------------------
1 | .ocdi__demo-import-notice:not(:empty) {
2 | background-color: transparent !important;
3 | border-left: 0px !important;
4 | box-shadow: none !important;
5 | padding: 0px !important;
6 | }
7 | .ocdi__demo-import-notice img {
8 | border: 4px solid #dbe3ea;
9 | width: auto;
10 | }
11 | .about-wrap .ocdi__demo-import-notice img {
12 | width: auto;
13 | }
14 | .about-wrap img {
15 | width: auto;
16 | }
--------------------------------------------------------------------------------
/inc/barber-metabox.php:
--------------------------------------------------------------------------------
1 | 'page_single_metaboxs',
7 | 'title' => esc_html__( 'Page Footer Options', 'barber-companion' ),
8 | 'post_types'=> array( 'page' ),
9 | 'priority' => 'high',
10 | 'autosave' => 'false',
11 | 'fields' => array(
12 | array(
13 | 'id' => $barber_prefix . 'footer-background',
14 | 'type' => 'background',
15 | 'name' => esc_html__( 'Set The Footer Background', 'barber-companion' ),
16 | ),
17 | ),
18 | );
19 |
20 |
21 | return $meta_boxes;
22 | }
23 | add_filter( 'rwmb_meta_boxes', 'barber_page_metabox' );
--------------------------------------------------------------------------------
/js/common.js:
--------------------------------------------------------------------------------
1 | (function ($) {
2 | "use strict";
3 | /*-------------------------------------
4 | Instagram Photos
5 | -------------------------------------*/
6 | function cp_instagram_photos() {
7 | $('.cp-instagram-photos').each(function(){
8 | $.instagramFeed({
9 | 'username': $(this).data('username'),
10 | 'container': $(this),
11 | 'display_profile': false,
12 | 'display_biography': false,
13 | 'items': $(this).data('items'),
14 | 'margin': 0
15 | });
16 | console.log( $(this) );
17 | });
18 |
19 | }
20 | cp_instagram_photos();
21 | })(jQuery);
--------------------------------------------------------------------------------
/inc/elementor-widgets/assets/css/utility.css:
--------------------------------------------------------------------------------
1 | /* -------------------------
2 | :: utility Class
3 | ---------------------------- */
4 | .barber-pt-100 {
5 | padding-top: 100px;
6 | }
7 | .barber-pt-80 {
8 | padding-top: 80px;
9 | }
10 | .barber-pt-70 {
11 | padding-top: 70px;
12 | }
13 | .barber-pt-60 {
14 | padding-top: 60px;
15 | }
16 | .barber-pt-50 {
17 | padding-top: 50px;
18 | }
19 | .barber-pt-30 {
20 | padding-top: 30px;
21 | }
22 | .barber-pb-100 {
23 | padding-bottom: 100px;
24 | }
25 | .barber-pb-80 {
26 | padding-bottom: 80px;
27 | }
28 | .barber-pb-70 {
29 | padding-bottom: 70px;
30 | }
31 | .barber-pb-60 {
32 | padding-bottom: 60px;
33 | }
34 | .barber-pb-50 {
35 | padding-bottom: 50px;
36 | }
37 | .barber-pb-30 {
38 | padding-bottom: 30px;
39 | }
40 |
--------------------------------------------------------------------------------
/barber-init.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/inc/demo-data/barber-widgets-demo.wie:
--------------------------------------------------------------------------------
1 | {"sidebar_widgets":{"search-2":{"title":""},"categories-3":{"title":"Categories","count":1,"hierarchical":0,"dropdown":0},"barber_blog_widget-1":{"sectiontitle":"Recent Post","postnumber":"4","style":"1"},"tag_cloud-1":{"title":"Tag Clouds","count":0,"taxonomy":"post_tag"},"barber_instagram_photo-1":{"title":"Instagram Feeds","insta_user":"hasanfardousrubel","insta_items":"6"},"barber_newsletter-1":{"title":"Newsletter","actionurl":"https:\/\/spondonit.us12.list-manage.com\/subscribe\/post?u=1462626880ade1ac87bd9c93a&id=92a4423d01","desc":""}},"footer-1":{"text-1":{"title":"Join With Us","text":"
108 |
109 |
110 |
111 |
112 |
113 | ', '']
14 | });
15 | }
16 |
17 | if ($.fn.owlCarousel) {
18 | $(".barber-service-slides").owlCarousel({
19 | items: 3,
20 | loop: true,
21 | autoplay: true,
22 | smartSpeed: 800,
23 | margin: 30,
24 | center: true,
25 | dots: false,
26 | nav: true,
27 | startPosition: 1,
28 | navText: ['', ''],
29 | responsive: {
30 | 0: {
31 | items: 1
32 | },
33 | 576: {
34 | items: 2
35 | },
36 | 768: {
37 | items: 3
38 | }
39 | }
40 | });
41 | }
42 |
43 | if ($.fn.owlCarousel) {
44 | $(".barber-workflow-slides").owlCarousel({
45 | items: 3,
46 | loop: true,
47 | autoplay: true,
48 | smartSpeed: 800,
49 | margin: 30,
50 | center: true,
51 | dots: true,
52 | startPosition: 1,
53 | responsive: {
54 | 0: {
55 | items: 1
56 | },
57 | 576: {
58 | items: 2
59 | },
60 | 768: {
61 | items: 3
62 | }
63 | }
64 | });
65 | }
66 |
67 | if ($.fn.owlCarousel) {
68 | $(".barber-team-slides").owlCarousel({
69 | items: 3,
70 | loop: true,
71 | autoplay: true,
72 | smartSpeed: 800,
73 | margin: 50,
74 | center: true,
75 | nav: true,
76 | navText: ['', ''],
77 | responsive: {
78 | 0: {
79 | items: 1
80 | },
81 | 576: {
82 | items: 2
83 | },
84 | 768: {
85 | items: 3
86 | }
87 | }
88 | });
89 | }
90 |
91 | if ($.fn.owlCarousel) {
92 | $(".testimonials-slides").owlCarousel({
93 | items: 3,
94 | loop: true,
95 | autoplay: true,
96 | smartSpeed: 1500,
97 | margin: 0,
98 | center: true,
99 | nav: true,
100 | navText: ['', ''],
101 | responsive: {
102 | 0: {
103 | items: 1
104 | },
105 | 576: {
106 | items: 2
107 | },
108 | 768: {
109 | items: 3
110 | }
111 | }
112 | });
113 | }
114 |
115 | if ($.fn.barfiller) {
116 |
117 | $('.bar').each( function(){
118 | var $this = $(this),
119 | $color = $this.data('color');
120 |
121 | $this.barfiller({
122 | tooltip: true,
123 | duration: 1000,
124 | barColor: $color,
125 | animateOnResize: true
126 | });
127 |
128 |
129 | })
130 |
131 | }
132 | if ($.fn.imagesLoaded) {
133 | $('.barber-portfolio').imagesLoaded(function () {
134 | // filter items on button click
135 | $('.portfolio-menu').on('click', 'p', function () {
136 | var filterValue = $(this).attr('data-filter');
137 | $grid.isotope({
138 | filter: filterValue
139 | });
140 | });
141 | // init Isotope
142 | var $grid = $('.barber-portfolio').isotope({
143 | itemSelector: '.single_gallery_item',
144 | percentPosition: true,
145 | masonry: {
146 | columnWidth: '.single_gallery_item'
147 | }
148 | });
149 | });
150 | }
151 |
152 | $('.portfolio-menu button.btn').on('click', function () {
153 | $('.portfolio-menu button.btn').removeClass('active');
154 | $(this).addClass('active');
155 | })
156 | if ($.fn.scrollUp) {
157 | $.scrollUp({
158 | scrollSpeed: 1500,
159 | scrollText: ''
160 | });
161 | }
162 |
163 | if ($.fn.counterUp) {
164 | $('.counter').counterUp({
165 | delay: 10,
166 | time: 2000
167 | });
168 | }
169 |
170 | // Background video
171 | var $selector = $('[data-videoid]');
172 |
173 | if( $selector.length ){
174 | $selector.each( function(){
175 | var $this = $(this);
176 | $this.YTPlayer({
177 | fitToBackground: true,
178 | videoId: $this.data('videoid')
179 | });
180 | });
181 | }
182 |
183 | // MC Scripts
184 | var $subscribe = $( '.barber-subscribe-newsletter-area' );
185 | if( $subscribe.length ){
186 | window.fnames = new Array();
187 | window.ftypes = new Array();
188 | fnames[0]='EMAIL';
189 | ftypes[0]='email';
190 | fnames[1]='FNAME';
191 | ftypes[1]='text';
192 | fnames[2]='LNAME';
193 | ftypes[2]='text';
194 | fnames[3]='ADDRESS';
195 | ftypes[3]='address';
196 | fnames[4]='PHONE';
197 | ftypes[4]='phone';
198 | fnames[5]='BIRTHDAY';
199 | ftypes[5]='birthday';
200 | }
201 |
202 |
203 |
204 | })(jQuery);
--------------------------------------------------------------------------------
/inc/elementor-widgets/widgets/hero-section.php:
--------------------------------------------------------------------------------
1 | start_controls_section(
48 | 'hero_content',
49 | [
50 | 'label' => __( 'Hero content', 'barber-companion' ),
51 | ]
52 | );
53 |
54 | $this->add_control(
55 | 'banner_img', [
56 | 'label' => __( 'BG Image', 'barber-companion' ),
57 | 'type' => Controls_Manager::MEDIA,
58 |
59 | ]
60 | );
61 | $this->add_control(
62 | 'barber_img', [
63 | 'label' => __( 'Barber Image', 'barber-companion' ),
64 | 'type' => Controls_Manager::MEDIA,
65 |
66 | ]
67 | );
68 | $this->add_control(
69 | 'big_title', [
70 | 'label' => __( 'Big Title', 'barber-companion' ),
71 | 'type' => Controls_Manager::TEXTAREA,
72 | 'label_block' => true,
73 | 'default' => 'Best Barber in
your Town'
74 | ]
75 | );
76 | $this->add_control(
77 | 'sub_title', [
78 | 'label' => __( 'Sub Title', 'barber-companion' ),
79 | 'type' => Controls_Manager::TEXT,
80 | 'label_block' => true,
81 | 'default' => 'Professional Care'
82 | ]
83 | );
84 |
85 | $this->end_controls_section(); // End Hero content
86 |
87 |
88 | /**
89 | * Style Tab
90 | * ------------------------------ Style Title ------------------------------
91 | *
92 | */
93 | $this->start_controls_section(
94 | 'style_title', [
95 | 'label' => __( 'Style Hero Section', 'barber-companion' ),
96 | 'tab' => Controls_Manager::TAB_STYLE,
97 | ]
98 | );
99 | $this->add_control(
100 | 'big_title_col', [
101 | 'label' => __( 'Big Title Color', 'barber-companion' ),
102 | 'type' => Controls_Manager::COLOR,
103 | 'selectors' => [
104 | '{{WRAPPER}} .slider_area .single_slider .slider_text h3' => 'color: {{VALUE}};',
105 | ],
106 | ]
107 | );
108 | $this->add_control(
109 | 'sub_title_col', [
110 | 'label' => __( 'Sub Title Color', 'barber-companion' ),
111 | 'type' => Controls_Manager::COLOR,
112 | 'selectors' => [
113 | '{{WRAPPER}} .slider_area .single_slider .slider_text p' => 'color: {{VALUE}};',
114 | ],
115 | ]
116 | );
117 | $this->add_control(
118 | 'btn_border-text_col', [
119 | 'label' => __( 'Button Border & Text Color', 'barber-companion' ),
120 | 'type' => Controls_Manager::COLOR,
121 | 'selectors' => [
122 | '{{WRAPPER}} .slider_area .single_slider .slider_text .boxed-btn2' => 'color: {{VALUE}};border-color: {{VALUE}};',
123 | ],
124 | ]
125 | );
126 | $this->add_control(
127 | 'btn_bg_hov_col', [
128 | 'label' => __( 'Button Hover Bg & Border Color', 'barber-companion' ),
129 | 'type' => Controls_Manager::COLOR,
130 | 'selectors' => [
131 | '{{WRAPPER}} .slider_area .single_slider .slider_text .boxed-btn2:hover' => 'background: {{VALUE}};border-color: {{VALUE}};',
132 | ],
133 | ]
134 | );
135 | $this->add_control(
136 | 'btn_bg_hov_txt_col', [
137 | 'label' => __( 'Button Hover Text Color', 'barber-companion' ),
138 | 'type' => Controls_Manager::COLOR,
139 | 'selectors' => [
140 | '{{WRAPPER}} .slider_area .single_slider .slider_text .boxed-btn2:hover' => 'color: {{VALUE}} !important;',
141 | ],
142 | ]
143 | );
144 |
145 | $this->end_controls_section();
146 | }
147 |
148 | protected function render() {
149 | $settings = $this->get_settings();
150 | $banner_img = !empty( $settings['banner_img']['url'] ) ? $settings['banner_img']['url'] : '';
151 | $big_title = !empty( $settings['big_title'] ) ? wp_kses_post(nl2br($settings['big_title'])) : '';
152 | $barber_img = !empty( $settings['barber_img']['id'] ) ? wp_get_attachment_image( $settings['barber_img']['id'], 'barber_text_img_258x85', '', array( 'alt' => 'barber text image' ) ) : '';
153 | $sub_title = !empty( $settings['sub_title'] ) ? esc_html($settings['sub_title']) : '';
154 | ?>
155 |
156 |
157 |
158 |
>
159 |
160 |
161 |
162 |
163 | {$big_title}";
169 | }
170 | if ( $sub_title ) {
171 | echo "
{$sub_title}
";
172 | }
173 | ?>
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 | esc_html__( 'Add footer social links.', 'barber-companion' ), )
28 | );
29 |
30 | }
31 |
32 | // This is where the action happens
33 | public function widget( $args, $instance ) {
34 |
35 | $title = apply_filters( 'widget_title', $instance['title'] );
36 | $desc = apply_filters( 'widget_text', $instance['desc'] );
37 | $facebook = apply_filters( 'widget_text', $instance['facebook'] );
38 | $twitter = apply_filters( 'widget_text', $instance['twitter'] );
39 | $linkedin = apply_filters( 'widget_text', $instance['linkedin'] );
40 | $instagram = apply_filters( 'widget_text', $instance['instagram'] );
41 | $dribbble = apply_filters( 'widget_text', $instance['dribbble'] );
42 |
43 | // before and after widget arguments are defined by themes
44 | echo wp_kses_post( $args['before_widget'] );
45 | if ( ! empty( $title ) )
46 | echo wp_kses_post( $args['before_title'] . $title . $args['after_title'] );
47 |
48 |
49 | if( $desc ){
50 | echo ''.esc_html( $desc ).'
';
51 | } ?>
52 |
53 |
54 |
';
57 | }
58 | if( $twitter ){
59 | echo '
';
60 | }
61 | if( $dribbble ){
62 | echo '
';
63 | }
64 | if( $linkedin ){
65 | echo '
';
66 | }
67 | if( $instagram ){
68 | echo '
';
69 | }
70 | ?>
71 |
72 |
73 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 | =0;s={horizontal:{},vertical:{}};f=1;a={};u="waypoints-context-id";p="resize.waypoints";y="scroll.waypoints";v=1;w="waypoints-waypoint-ids";g="waypoint";m="waypoints";o=function(){function t(t){var e=this;this.$element=t;this.element=t[0];this.didResize=false;this.didScroll=false;this.id="context"+f++;this.oldScroll={x:t.scrollLeft(),y:t.scrollTop()};this.waypoints={horizontal:{},vertical:{}};t.data(u,this.id);a[this.id]=this;t.bind(y,function(){var t;if(!(e.didScroll||c)){e.didScroll=true;t=function(){e.doScroll();return e.didScroll=false};return r.setTimeout(t,n[m].settings.scrollThrottle)}});t.bind(p,function(){var t;if(!e.didResize){e.didResize=true;t=function(){n[m]("refresh");return e.didResize=false};return r.setTimeout(t,n[m].settings.resizeThrottle)}})}t.prototype.doScroll=function(){var t,e=this;t={horizontal:{newScroll:this.$element.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.$element.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}};if(c&&(!t.vertical.oldScroll||!t.vertical.newScroll)){n[m]("refresh")}n.each(t,function(t,r){var i,o,l;l=[];o=r.newScroll>r.oldScroll;i=o?r.forward:r.backward;n.each(e.waypoints[t],function(t,e){var n,i;if(r.oldScroll<(n=e.offset)&&n<=r.newScroll){return l.push(e)}else if(r.newScroll<(i=e.offset)&&i<=r.oldScroll){return l.push(e)}});l.sort(function(t,e){return t.offset-e.offset});if(!o){l.reverse()}return n.each(l,function(t,e){if(e.options.continuous||t===l.length-1){return e.trigger([i])}})});return this.oldScroll={x:t.horizontal.newScroll,y:t.vertical.newScroll}};t.prototype.refresh=function(){var t,e,r,i=this;r=n.isWindow(this.element);e=this.$element.offset();this.doScroll();t={horizontal:{contextOffset:r?0:e.left,contextScroll:r?0:this.oldScroll.x,contextDimension:this.$element.width(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:r?0:e.top,contextScroll:r?0:this.oldScroll.y,contextDimension:r?n[m]("viewportHeight"):this.$element.height(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}};return n.each(t,function(t,e){return n.each(i.waypoints[t],function(t,r){var i,o,l,s,f;i=r.options.offset;l=r.offset;o=n.isWindow(r.element)?0:r.$element.offset()[e.offsetProp];if(n.isFunction(i)){i=i.apply(r.element)}else if(typeof i==="string"){i=parseFloat(i);if(r.options.offset.indexOf("%")>-1){i=Math.ceil(e.contextDimension*i/100)}}r.offset=o-e.contextOffset+e.contextScroll-i;if(r.options.onlyOnScroll&&l!=null||!r.enabled){return}if(l!==null&&l<(s=e.oldScroll)&&s<=r.offset){return r.trigger([e.backward])}else if(l!==null&&l>(f=e.oldScroll)&&f>=r.offset){return r.trigger([e.forward])}else if(l===null&&e.oldScroll>=r.offset){return r.trigger([e.forward])}})})};t.prototype.checkEmpty=function(){if(n.isEmptyObject(this.waypoints.horizontal)&&n.isEmptyObject(this.waypoints.vertical)){this.$element.unbind([p,y].join(" "));return delete a[this.id]}};return t}();l=function(){function t(t,e,r){var i,o;r=n.extend({},n.fn[g].defaults,r);if(r.offset==="bottom-in-view"){r.offset=function(){var t;t=n[m]("viewportHeight");if(!n.isWindow(e.element)){t=e.$element.height()}return t-n(this).outerHeight()}}this.$element=t;this.element=t[0];this.axis=r.horizontal?"horizontal":"vertical";this.callback=r.handler;this.context=e;this.enabled=r.enabled;this.id="waypoints"+v++;this.offset=null;this.options=r;e.waypoints[this.axis][this.id]=this;s[this.axis][this.id]=this;i=(o=t.data(w))!=null?o:[];i.push(this.id);t.data(w,i)}t.prototype.trigger=function(t){if(!this.enabled){return}if(this.callback!=null){this.callback.apply(this.element,t)}if(this.options.triggerOnce){return this.destroy()}};t.prototype.disable=function(){return this.enabled=false};t.prototype.enable=function(){this.context.refresh();return this.enabled=true};t.prototype.destroy=function(){delete s[this.axis][this.id];delete this.context.waypoints[this.axis][this.id];return this.context.checkEmpty()};t.getWaypointsByElement=function(t){var e,r;r=n(t).data(w);if(!r){return[]}e=n.extend({},s.horizontal,s.vertical);return n.map(r,function(t){return e[t]})};return t}();d={init:function(t,e){var r;if(e==null){e={}}if((r=e.handler)==null){e.handler=t}this.each(function(){var t,r,i,s;t=n(this);i=(s=e.context)!=null?s:n.fn[g].defaults.context;if(!n.isWindow(i)){i=t.closest(i)}i=n(i);r=a[i.data(u)];if(!r){r=new o(i)}return new l(t,r,e)});n[m]("refresh");return this},disable:function(){return d._invoke(this,"disable")},enable:function(){return d._invoke(this,"enable")},destroy:function(){return d._invoke(this,"destroy")},prev:function(t,e){return d._traverse.call(this,t,e,function(t,e,n){if(e>0){return t.push(n[e-1])}})},next:function(t,e){return d._traverse.call(this,t,e,function(t,e,n){if(et.oldScroll.y})},left:function(t){if(t==null){t=r}return h._filter(t,"horizontal",function(t,e){return e.offset<=t.oldScroll.x})},right:function(t){if(t==null){t=r}return h._filter(t,"horizontal",function(t,e){return e.offset>t.oldScroll.x})},enable:function(){return h._invoke("enable")},disable:function(){return h._invoke("disable")},destroy:function(){return h._invoke("destroy")},extendFn:function(t,e){return d[t]=e},_invoke:function(t){var e;e=n.extend({},s.vertical,s.horizontal);return n.each(e,function(e,n){n[t]();return true})},_filter:function(t,e,r){var i,o;i=a[n(t).data(u)];if(!i){return[]}o=[];n.each(i.waypoints[e],function(t,e){if(r(i,e)){return o.push(e)}});o.sort(function(t,e){return t.offset-e.offset});return n.map(o,function(t){return t.element})}};n[m]=function(){var t,n;n=arguments[0],t=2<=arguments.length?e.call(arguments,1):[];if(h[n]){return h[n].apply(null,t)}else{return h.aggregate.call(null,n)}};n[m].settings={resizeThrottle:100,scrollThrottle:30};return i.load(function(){return n[m]("refresh")})})}).call(this);
10 |
--------------------------------------------------------------------------------
/inc/sidebar-widgets/about-widget.php:
--------------------------------------------------------------------------------
1 | esc_html__( 'Add footer about content', 'barber-companion' ), )
34 | );
35 |
36 | }
37 |
38 | // This is where the action happens
39 | public function widget( $args, $instance ) {
40 |
41 | $title = apply_filters( 'widget_title', $instance['title'] );
42 | $image = apply_filters( 'widget_image', $instance['image'] );
43 | $textarea = apply_filters( 'widget_textarea', $instance['textarea'] );
44 |
45 | // before and after widget arguments are defined by themes
46 | echo wp_kses_post( $args['before_widget'] );
47 | if ( ! empty( $title ) )
48 | echo wp_kses_post( $args['before_title'] . $title . $args['after_title'] );
49 |
50 |
51 | ?>
52 |
70 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
128 |
129 |
162 |
230 | start_controls_section(
49 | 'contact_info',
50 | [
51 | 'label' => __( 'Contact Info', 'barber-companion' ),
52 | ]
53 | );
54 |
55 | $this->add_control(
56 | 'info', [
57 | 'label' => __( 'Create Contact Info', 'barber-companion' ),
58 | 'type' => Controls_Manager::REPEATER,
59 | 'title_field' => '{{{ label }}}',
60 | 'fields' => [
61 | [
62 | 'name' => 'label',
63 | 'label' => __( 'Contact Info', 'barber-companion' ),
64 | 'label_block' => true,
65 | 'type' => Controls_Manager::TEXT,
66 | 'default' => esc_html__( 'Dhaka, Bangladesh', 'barber-companion' )
67 | ],
68 | [
69 | 'name' => 'desc',
70 | 'label' => __( 'Contact Descriptions', 'barber-companion' ),
71 | 'type' => Controls_Manager::TEXTAREA,
72 | 'default' => esc_html__( 'Write something...', 'barber-companion' )
73 | ],
74 | [
75 | 'name' => 'icon',
76 | 'label' => __( 'Icon', 'barber-companion' ),
77 | 'type' => Controls_Manager::ICON,
78 | ]
79 |
80 | ],
81 | 'default' => [
82 | [
83 | 'label' => esc_html__( 'Buttonwood, California.', 'barber-companion' ),
84 | 'desc' => esc_html__( 'Rosemead, CA 91770', 'barber-companion' ),
85 | 'icon' => 'fa fa-home',
86 | ],
87 | [
88 | 'label' => esc_html__( '00 (440) 9865 562', 'barber-companion' ),
89 | 'desc' => esc_html__( 'Mon to Fri 9am to 6pm', 'barber-companion' ),
90 | 'icon' => 'fa fa-tablet',
91 | ],
92 | [
93 | 'label' => esc_html__( 'support@colorlib.com', 'barber-companion' ),
94 | 'desc' => esc_html__( 'Send us your query anytime!', 'barber-companion' ),
95 | 'icon' => 'fa fa-envelope-o',
96 | ],
97 | ]
98 | ]
99 | );
100 |
101 | $this->end_controls_section(); // End Contact Info
102 |
103 | // ---------------------------------------- Contact Form ------------------------------
104 | $this->start_controls_section(
105 | 'contact_form',
106 | [
107 | 'label' => __( 'Contact Form', 'barber-companion' ),
108 | ]
109 | );
110 | $this->add_control(
111 | 'contact_form_title',
112 | [
113 | 'label' => esc_html__( 'Contact Form Title', 'barber-companion' ),
114 | 'type' => Controls_Manager::TEXT,
115 | 'label_block' => true,
116 | 'default' => esc_html__('Get in Touch', 'barber-companion')
117 | ]
118 | );
119 | $this->add_control(
120 | 'contact_formshortcode',
121 | [
122 | 'label' => esc_html__( 'Form Shortcode', 'barber-companion' ),
123 | 'type' => Controls_Manager::TEXT,
124 | 'label_block' => true
125 | ]
126 | );
127 | $this->end_controls_section(); // End Contact Form
128 |
129 |
130 | /**
131 | * Style Tab
132 | * ------------------------------ Style ------------------------------
133 | *
134 | */
135 | $this->start_controls_section(
136 | 'style_content_color', [
137 | 'label' => __( 'Style Content Color', 'barber-companion' ),
138 | 'tab' => Controls_Manager::TAB_STYLE,
139 | ]
140 | );
141 |
142 | $this->add_control(
143 | 'color_title', [
144 | 'label' => __( 'Right Text Title Color', 'barber-companion' ),
145 | 'type' => Controls_Manager::COLOR,
146 | 'default' => '#2a2a2a',
147 | 'selectors' => [
148 | '{{WRAPPER}} .contact-info .media-body h3' => 'color: {{VALUE}};',
149 | ],
150 | ]
151 | );
152 | $this->add_control(
153 | 'color_desc', [
154 | 'label' => __( 'Right Text Sub Title Color', 'barber-companion' ),
155 | 'type' => Controls_Manager::COLOR,
156 | 'default' => '#8a8a8a',
157 | 'selectors' => [
158 | '{{WRAPPER}} .contact-info .media-body p' => 'color: {{VALUE}};',
159 | ],
160 | ]
161 | );
162 | $this->add_control(
163 | 'color_icon', [
164 | 'label' => __( 'Icon Color', 'barber-companion' ),
165 | 'type' => Controls_Manager::COLOR,
166 | 'default' => '#8f9195',
167 | 'selectors' => [
168 | '{{WRAPPER}} .contact-info__icon i, .contact-info__icon span' => 'color: {{VALUE}};',
169 | ],
170 | ]
171 | );
172 |
173 | $this->end_controls_section();
174 |
175 |
176 | }
177 |
178 | protected function render() {
179 |
180 | $settings = $this->get_settings();
181 |
182 |
183 | ?>
184 |
223 |
224 |
17 |
18 |
19 |
20 |
21 | ' . esc_html( $subtitle ) . '';
25 | }
26 | // Title
27 | if ( $title ) {
28 | echo '
' . esc_html( $title ) . '
';
29 | }
30 | ?>
31 |
32 |
33 |
34 |
35 |
66 |
67 | ';
70 | }
71 | ?>
72 |
73 |
74 | 'h4',
79 | 'text' => esc_html( $val['title'] )
80 | )
81 | );
82 | }
83 |
84 | if( !empty( $val['sub-title-url'] ) && !empty( $val['sub-title'] ) ){
85 | echo '
'.esc_html( $val['sub-title'] ).'';
86 | }else{
87 | echo '
'.esc_html( $val['sub-title'] ).'
';
88 | }
89 | ?>
90 |
91 |
92 |
93 |
94 |
95 | $target_post_id->ID,
118 | 'post_status' => $type,
119 | );
120 |
121 | if ( $message == true ) {
122 | // Update the post/page
123 | $update_status = wp_update_post( $target_post, true );
124 | } else {
125 | // Update the post/page
126 | $update_status = wp_update_post( $target_post, false );
127 | }
128 |
129 | return $update_status;
130 | }
131 |
132 |
133 |
134 | // Course - Custom Post Type
135 | function barber_custom_posts() {
136 | $labels = array(
137 | 'name' => _x( 'Courses', 'post type general name', 'barber-companion' ),
138 | 'singular_name' => _x( 'Course', 'post type singular name', 'barber-companion' ),
139 | 'menu_name' => _x( 'Courses', 'admin menu', 'barber-companion' ),
140 | 'name_admin_bar' => _x( 'Course', 'add new on admin bar', 'barber-companion' ),
141 | 'add_new' => _x( 'Add New', 'course', 'barber-companion' ),
142 | 'add_new_item' => __( 'Add New Course', 'barber-companion' ),
143 | 'new_item' => __( 'New Course', 'barber-companion' ),
144 | 'edit_item' => __( 'Edit Course', 'barber-companion' ),
145 | 'view_item' => __( 'View Course', 'barber-companion' ),
146 | 'all_items' => __( 'All Courses', 'barber-companion' ),
147 | 'search_items' => __( 'Search Courses', 'barber-companion' ),
148 | 'parent_item_colon' => __( 'Parent Courses:', 'barber-companion' ),
149 | 'not_found' => __( 'No courses found.', 'barber-companion' ),
150 | 'not_found_in_trash' => __( 'No courses found in Trash.', 'barber-companion' )
151 | );
152 |
153 | $args = array(
154 | 'labels' => $labels,
155 | 'description' => __( 'Description.', 'barber-companion' ),
156 | 'public' => true,
157 | 'publicly_queryable' => true,
158 | 'show_ui' => true,
159 | 'show_in_menu' => true,
160 | 'query_var' => true,
161 | 'rewrite' => array( 'slug' => 'course' ),
162 | 'capability_type' => 'post',
163 | 'has_archive' => true,
164 | 'hierarchical' => false,
165 | 'menu_position' => null,
166 | 'supports' => array( 'title', 'editor', 'thumbnail' )
167 | );
168 |
169 | register_post_type( 'course', $args );
170 |
171 | }
172 | add_action( 'init', 'barber_custom_posts' );
173 |
174 |
175 |
176 | /*=========================================================
177 | Courses Section
178 | ========================================================*/
179 | function barber_course_section( $pNumber = 3 ){
180 | $courses = new WP_Query( array(
181 | 'post_type' => 'course',
182 | 'posts_per_page'=> $pNumber,
183 |
184 | ) );
185 |
186 | if( $courses->have_posts() ) {
187 | while ( $courses->have_posts() ) {
188 | $courses->the_post();
189 | $course_img = get_the_post_thumbnail( get_the_id(), 'barber_order_thumb_360x300', '', array( 'alt' => get_the_title() ) );
190 | $course_fee = ! empty( barber_meta( 'course_fee') ) ? barber_meta( 'course_fee') : 'N/A';
191 | ?>
192 |
193 |
194 |
199 |
200 |
201 |
202 |
203 |
204 | 'course',
218 | 'posts_per_page' => $pnumber,
219 |
220 | ) );
221 |
222 | ?>
223 |
224 |
257 | start_controls_section(
48 | 'video_left_content',
49 | [
50 | 'label' => __( 'Video Left Content', 'barber-companion' ),
51 | ]
52 | );
53 | $this->add_control(
54 | 'sub_title',
55 | [
56 | 'label' => esc_html__( 'Sub Title', 'barber-companion' ),
57 | 'type' => Controls_Manager::TEXT,
58 | 'label_block' => true,
59 | 'default' => esc_html__( 'How We Work', 'barber-companion' ),
60 | ]
61 | );
62 | $this->add_control(
63 | 'sec_title',
64 | [
65 | 'label' => esc_html__( 'Section Title', 'barber-companion' ),
66 | 'type' => Controls_Manager::TEXTAREA,
67 | 'label_block' => true,
68 | 'default' => 'Watch the Video
How we Work?',
69 | ]
70 | );
71 | $this->add_control(
72 | 'sec_text',
73 | [
74 | 'label' => esc_html__( 'Section Text', 'barber-companion' ),
75 | 'type' => Controls_Manager::TEXTAREA,
76 | 'label_block' => true,
77 | 'default' => 'Inspires employees and organizations to support causes they care
about. We do this to bring more resources to the nonprofits that are
changing our world.',
78 | ]
79 | );
80 | $this->add_control(
81 | 'btn_text',
82 | [
83 | 'label' => esc_html__( 'Button Text', 'barber-companion' ),
84 | 'type' => Controls_Manager::TEXT,
85 | 'label_block' => true,
86 | 'default' => esc_html__( 'Book Now', 'barber-companion' ),
87 | ]
88 | );
89 | $this->add_control(
90 | 'btn_url',
91 | [
92 | 'label' => esc_html__( 'Button URL', 'barber-companion' ),
93 | 'type' => Controls_Manager::URL,
94 | 'label_block' => true,
95 | 'default' => [
96 | 'url' => '#'
97 | ],
98 | ]
99 | );
100 |
101 | $this->end_controls_section(); // End about us content
102 |
103 | // Right section
104 | $this->start_controls_section(
105 | 'video_section_content',
106 | [
107 | 'label' => __( 'Video Section', 'barber-companion' ),
108 | ]
109 | );
110 | $this->add_control(
111 | 'video_thumb',
112 | [
113 | 'label' => esc_html__( 'Video Thumbnail', 'barber-companion' ),
114 | 'type' => Controls_Manager::MEDIA,
115 | 'label_block' => true,
116 | 'default' => [
117 | 'url' => Utils::get_placeholder_image_src(),
118 | ]
119 | ]
120 | );
121 | $this->add_control(
122 | 'video_url',
123 | [
124 | 'label' => esc_html__( 'Popup Video URL', 'barber-companion' ),
125 | 'type' => Controls_Manager::URL,
126 | 'label_block' => true,
127 | 'default' => [
128 | 'url' => 'https://www.youtube.com/watch?v=E_-lMZDi7Uw'
129 | ],
130 | ]
131 | );
132 |
133 |
134 | $this->end_controls_section(); // End video_section
135 |
136 | //------------------------------ Style title ------------------------------
137 |
138 | // Top Section Styles
139 | $this->start_controls_section(
140 | 'left_sec_style', [
141 | 'label' => __( 'Top Section Styles', 'barber-companion' ),
142 | 'tab' => Controls_Manager::TAB_STYLE,
143 | ]
144 | );
145 |
146 | $this->add_control(
147 | 'sec_title_col', [
148 | 'label' => __( 'Big Title Color', 'barber-companion' ),
149 | 'type' => Controls_Manager::COLOR,
150 | 'selectors' => [
151 | '{{WRAPPER}} .home_contact h2' => 'color: {{VALUE}};',
152 | ],
153 | ]
154 | );
155 |
156 | $this->add_control(
157 | 'sub_title_col', [
158 | 'label' => __( 'Sub title Color', 'barber-companion' ),
159 | 'type' => Controls_Manager::COLOR,
160 | 'selectors' => [
161 | '{{WRAPPER}} .home_contact p' => 'color: {{VALUE}};',
162 | ],
163 | ]
164 | );
165 |
166 | $this->add_control(
167 | 'btn_bg_col', [
168 | 'label' => __( 'Button BG Color', 'barber-companion' ),
169 | 'type' => Controls_Manager::COLOR,
170 | 'selectors' => [
171 | '{{WRAPPER}} .home_contact .btn_1' => 'background: {{VALUE}};',
172 | ],
173 | ]
174 | );
175 |
176 | $this->add_control(
177 | 'btn_hov_bg_col', [
178 | 'label' => __( 'Button Hover Bg Color', 'barber-companion' ),
179 | 'type' => Controls_Manager::COLOR,
180 | 'selectors' => [
181 | '{{WRAPPER}} .home_contact .btn_1:hover' => 'background-color: {{VALUE}};',
182 | ],
183 | ]
184 | );
185 | $this->add_control(
186 | 'bg_overlay_col', [
187 | 'label' => __( 'Bg Overlay Color', 'barber-companion' ),
188 | 'type' => Controls_Manager::COLOR,
189 | 'selectors' => [
190 | '{{WRAPPER}} .home_contact:after' => 'background: {{VALUE}};',
191 | ],
192 | ]
193 | );
194 | $this->end_controls_section();
195 |
196 | }
197 |
198 | protected function render() {
199 | $settings = $this->get_settings();
200 | $sub_title = !empty( $settings['sub_title'] ) ? esc_html($settings['sub_title']) : '';
201 | $sec_title = !empty( $settings['sec_title'] ) ? wp_kses_post(nl2br($settings['sec_title'])) : '';
202 | $sec_text = !empty( $settings['sec_text'] ) ? wp_kses_post(nl2br($settings['sec_text'])) : '';
203 | $btn_text = !empty( $settings['btn_text'] ) ? esc_html($settings['btn_text']) : '';
204 | $btn_url = !empty( $settings['btn_url']['url'] ) ? esc_url($settings['btn_url']['url']) : '';
205 | $video_thumb = !empty( $settings['video_thumb']['id'] ) ? wp_get_attachment_image( $settings['video_thumb']['id'], 'barber_video_thumb_877x750', '', array( 'alt' => $sec_title.' image' ) ) : '';
206 | $video_url = !empty( $settings['video_url']['url'] ) ? esc_url($settings['video_url']['url']) : '';
207 | ?>
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
217 | {$sub_title}";
220 | }
221 | if ( $sec_title ) {
222 | echo "
{$sub_title}
";
223 | }
224 | ?>
225 |
226 | {$sec_text}";
229 | }
230 | if ( $btn_text ) {
231 | echo "
{$btn_text}";
232 | }
233 | ?>
234 |
235 |
236 |
237 |
238 |
239 |
240 |
246 |
247 | ";
248 | }
249 | ?>
250 |
251 |
252 |
253 |
254 |
255 |
256 |
257 | \
189 | \
190 | \
191 | ');
192 |
193 | self.$node.append($YTPlayerString);
194 | self.$YTPlayerString = $YTPlayerString;
195 | $YTPlayerString = null;
196 | },
197 |
198 | /**
199 | * @function createBackgroundVideo
200 | * Adds HTML for video background
201 | */
202 | createBackgroundVideo: function createBackgroundVideo() {
203 | /*jshint multistr: true */
204 | var self = this,
205 | $YTPlayerString = $('\
208 | ');
209 |
210 | self.$node.append($YTPlayerString);
211 | self.$YTPlayerString = $YTPlayerString;
212 | $YTPlayerString = null;
213 | },
214 |
215 | /**
216 | * @function resize
217 | * Resize event to change video size
218 | */
219 | resize: function resize(self) {
220 | //var self = this;
221 | var container = $(window);
222 |
223 | if (!self.options.fitToBackground) {
224 | container = self.$node;
225 | }
226 |
227 | var width = container.width(),
228 | pWidth, // player width, to be defined
229 | height = container.height(),
230 | pHeight, // player height, tbd
231 | $YTPlayerPlayer = $('#' + self.holderID);
232 |
233 | // when screen aspect ratio differs from video, video must center and underlay one dimension
234 | if (width / self.options.ratio < height) {
235 | pWidth = Math.ceil(height * self.options.ratio); // get new player width
236 | $YTPlayerPlayer.width(pWidth).height(height).css({
237 | left: (width - pWidth) / 2,
238 | top: 0
239 | }); // player width is greater, offset left; reset top
240 | } else { // new video width < window width (gap to right)
241 | pHeight = Math.ceil(width / self.options.ratio); // get new player height
242 | $YTPlayerPlayer.width(width).height(pHeight).css({
243 | left: 0,
244 | top: (height - pHeight) / 2
245 | }); // player height is greater, offset top; reset left
246 | }
247 |
248 | $YTPlayerPlayer = null;
249 | container = null;
250 | },
251 |
252 | /**
253 | * @function onYouTubeIframeAPIReady
254 | * @ params {object} YTPlayer object for access to options
255 | * Youtube API calls this function when the player is ready.
256 | */
257 | onYouTubeIframeAPIReady: function onYouTubeIframeAPIReady() {
258 | var self = this;
259 | self.player = new window.YT.Player(self.holderID, self.options);
260 | },
261 |
262 | /**
263 | * @function onPlayerReady
264 | * @ params {event} window event from youtube player
265 | */
266 | onPlayerReady: function onPlayerReady(e) {
267 | if (this.options.mute) {
268 | e.target.mute();
269 | }
270 | e.target.playVideo();
271 | },
272 |
273 | /**
274 | * @function getPlayer
275 | * returns youtube player
276 | */
277 | getPlayer: function getPlayer() {
278 | return this.player;
279 | },
280 |
281 | /**
282 | * @function destroy
283 | * destroys all!
284 | */
285 | destroy: function destroy() {
286 | var self = this;
287 |
288 | self.$node
289 | .removeData('yt-init')
290 | .removeData('ytPlayer')
291 | .removeClass('loaded');
292 |
293 | self.$YTPlayerString.remove();
294 |
295 | $(window).off('resize.YTplayer' + self.ID);
296 | $(window).off('scroll.YTplayer' + self.ID);
297 | self.$body = null;
298 | self.$node = null;
299 | self.$YTPlayerString = null;
300 | self.player.destroy();
301 | self.player = null;
302 | }
303 | };
304 |
305 | // Scroll Stopped event.
306 | $.fn.scrollStopped = function(callback) {
307 | var $this = $(this), self = this;
308 | $this.scroll(function(){
309 | if ($this.data('scrollTimeout')) {
310 | clearTimeout($this.data('scrollTimeout'));
311 | }
312 | $this.data('scrollTimeout', setTimeout(callback,250,self));
313 | });
314 | };
315 |
316 | // Create plugin
317 | $.fn.YTPlayer = function(options) {
318 |
319 | return this.each(function() {
320 | var el = this;
321 |
322 | $(el).data("yt-init", true);
323 | var player = Object.create(YTPlayer);
324 | player.init(el, options);
325 | $.data(el, "ytPlayer", player);
326 | });
327 | };
328 |
329 | })(jQuery, window, document);
--------------------------------------------------------------------------------
/inc/elementor-widgets/widgets/services.php:
--------------------------------------------------------------------------------
1 | start_controls_section(
48 | 'service_content',
49 | [
50 | 'label' => __( 'Services content', 'barber-companion' ),
51 | ]
52 | );
53 | $this->add_control(
54 | 'sec_icon',
55 | [
56 | 'label' => esc_html__( 'Section Icon', 'barber-companion' ),
57 | 'type' => Controls_Manager::ICON,
58 | 'label_block' => true,
59 | 'options' => barber_themify_icon(),
60 | 'default' => 'flaticon-scissors'
61 | ]
62 | );
63 | $this->add_control(
64 | 'sec_title',
65 | [
66 | 'label' => esc_html__( 'Section Title', 'barber-companion' ),
67 | 'type' => Controls_Manager::TEXT,
68 | 'label_block' => true,
69 | 'default' => esc_html__( 'Make your Dream with US', 'barber-companion' )
70 | ]
71 | );
72 |
73 | $this->add_control(
74 | 'service_inner_settings_seperator',
75 | [
76 | 'label' => esc_html__( 'Service Items', 'barber-companion' ),
77 | 'type' => Controls_Manager::HEADING,
78 | 'separator' => 'after'
79 | ]
80 | );
81 |
82 | $this->add_control(
83 | 'barberservices', [
84 | 'label' => __( 'Create New', 'barber-companion' ),
85 | 'type' => Controls_Manager::REPEATER,
86 | 'title_field' => '{{{ service_title }}}',
87 | 'fields' => [
88 | [
89 | 'name' => 'service_img',
90 | 'label' => __( 'Service Image', 'barber-companion' ),
91 | 'label_block' => true,
92 | 'type' => Controls_Manager::MEDIA,
93 | 'default' => [
94 | 'url' => Utils::get_placeholder_image_src(),
95 | ]
96 | ],
97 | [
98 | 'name' => 'service_title',
99 | 'label' => __( 'Service Title', 'barber-companion' ),
100 | 'label_block' => true,
101 | 'type' => Controls_Manager::TEXT,
102 | 'default' => __( 'Men’s Facial', 'barber-companion' ),
103 | ],
104 | [
105 | 'name' => 'service_price',
106 | 'label' => __( 'Service Price', 'barber-companion' ),
107 | 'label_block' => true,
108 | 'type' => Controls_Manager::TEXT,
109 | 'default' => __( '$15', 'barber-companion' ),
110 | ],
111 | ],
112 | 'default' => [
113 | [
114 | 'service_img' => [
115 | 'url' => Utils::get_placeholder_image_src(),
116 | ],
117 | 'service_title' => __( 'Men’s Facial', 'barber-companion' ),
118 | 'service_price' => __( '$15', 'barber-companion' ),
119 | ],
120 | [
121 | 'service_img' => [
122 | 'url' => Utils::get_placeholder_image_src(),
123 | ],
124 | 'service_title' => __( 'Classic haircut', 'barber-companion' ),
125 | 'service_price' => __( '$17', 'barber-companion' ),
126 | ],
127 | ]
128 | ]
129 | );
130 | $this->end_controls_section(); // End service content
131 |
132 | /**
133 | * Style Tab
134 | * ------------------------------ Style Section Heading ------------------------------
135 | *
136 | */
137 |
138 | $this->start_controls_section(
139 | 'style_room_section', [
140 | 'label' => __( 'Style Service Section', 'barber-companion' ),
141 | 'tab' => Controls_Manager::TAB_STYLE,
142 | ]
143 | );
144 | $this->add_control(
145 | 'sub_title_col', [
146 | 'label' => __( 'Sub Title Color', 'barber-companion' ),
147 | 'type' => Controls_Manager::COLOR,
148 | 'selectors' => [
149 | '{{WRAPPER}} .dream_service .section_title .sub_heading' => 'color: {{VALUE}};',
150 | ],
151 | ]
152 | );
153 | $this->add_control(
154 | 'big_title_col', [
155 | 'label' => __( 'Big Title Color', 'barber-companion' ),
156 | 'type' => Controls_Manager::COLOR,
157 | 'selectors' => [
158 | '{{WRAPPER}} .dream_service .section_title h3' => 'color: {{VALUE}};',
159 | ],
160 | ]
161 | );
162 |
163 | $this->add_control(
164 | 'singl_item_styles_seperator',
165 | [
166 | 'label' => esc_html__( 'Single Item Styles', 'barber-companion' ),
167 | 'type' => Controls_Manager::HEADING,
168 | 'separator' => 'after'
169 | ]
170 | );
171 | $this->add_control(
172 | 'sing_ser_title_col', [
173 | 'label' => __( 'Title Color', 'barber-companion' ),
174 | 'type' => Controls_Manager::COLOR,
175 | 'selectors' => [
176 | '{{WRAPPER}} .dream_service .single_dream h3' => 'color: {{VALUE}};',
177 | ],
178 | ]
179 | );
180 | $this->add_control(
181 | 'sing_ser_txt_col', [
182 | 'label' => __( 'Text Color', 'barber-companion' ),
183 | 'type' => Controls_Manager::COLOR,
184 | 'selectors' => [
185 | '{{WRAPPER}} .dream_service .single_dream p' => 'color: {{VALUE}};',
186 | ],
187 | ]
188 | );
189 |
190 | $this->end_controls_section();
191 |
192 | }
193 |
194 | protected function render() {
195 | $settings = $this->get_settings();
196 | $sec_icon = !empty( $settings['sec_icon'] ) ? esc_attr($settings['sec_icon']) : '';
197 | $sec_title = !empty( $settings['sec_title'] ) ? esc_html($settings['sec_title']) : '';
198 | $barberservices = !empty( $settings['barberservices'] ) ? $settings['barberservices'] : '';
199 | ?>
200 |
201 |
202 |
203 |
204 |
205 |
206 | ";
209 | }
210 | if ( $sec_title ) {
211 | echo "
{$sec_title}
";
212 | }
213 | ?>
214 |
215 |
216 |
217 |
218 |
219 | 0 ) {
221 | foreach( $barberservices as $service ) {
222 | $service_img = !empty( $service['service_img']['id'] ) ? wp_get_attachment_image( $service['service_img']['id'], 'barber_np_thumb', '', array( 'alt' => 'service image' ) ) : '';
223 | $service_title = ( !empty( $service['service_title'] ) ) ? esc_html($service['service_title']) : '';
224 | $service_price = ( !empty( $service['service_price'] ) ) ? esc_html($service['service_price']) : '';
225 | ?>
226 |
227 |
228 |
229 |
230 |
235 |
236 | {$service_title}";
239 | }
240 | ?>
241 |
242 | ………………………..{$service_price}";
245 | }
246 | ?>
247 |
248 |
249 |
253 |
254 |
259 |
260 |
261 |
262 |
263 | start_controls_section(
48 | 'gallery_content',
49 | [
50 | 'label' => __( 'Galleries content', 'barber-companion' ),
51 | ]
52 | );
53 | $this->add_control(
54 | 'sec_icon',
55 | [
56 | 'label' => esc_html__( 'Section Icon', 'barber-companion' ),
57 | 'type' => Controls_Manager::ICON,
58 | 'label_block' => true,
59 | 'options' => barber_themify_icon(),
60 | 'default' => 'flaticon-scissors'
61 | ]
62 | );
63 | $this->add_control(
64 | 'sec_title',
65 | [
66 | 'label' => esc_html__( 'Section Title', 'barber-companion' ),
67 | 'type' => Controls_Manager::TEXT,
68 | 'label_block' => true,
69 | 'default' => esc_html__( 'Our Gallery', 'barber-companion' )
70 | ]
71 | );
72 |
73 | $this->add_control(
74 | 'gallery_inner_settings_seperator',
75 | [
76 | 'label' => esc_html__( 'Gallery Items', 'barber-companion' ),
77 | 'type' => Controls_Manager::HEADING,
78 | 'separator' => 'after'
79 | ]
80 | );
81 |
82 | $this->add_control(
83 | 'barbergalleries', [
84 | 'label' => __( 'Create New', 'barber-companion' ),
85 | 'type' => Controls_Manager::REPEATER,
86 | 'title_field' => '{{{ gallery_title }}}',
87 | 'fields' => [
88 | [
89 | 'name' => 'gallery_img',
90 | 'label' => __( 'Gallery Image', 'barber-companion' ),
91 | 'label_block' => true,
92 | 'type' => Controls_Manager::MEDIA,
93 | 'default' => [
94 | 'url' => Utils::get_placeholder_image_src(),
95 | ]
96 | ],
97 | [
98 | 'name' => 'gallery_title',
99 | 'label' => __( 'Gallery Title', 'barber-companion' ),
100 | 'label_block' => true,
101 | 'type' => Controls_Manager::TEXT,
102 | 'default' => __( 'Item 1', 'barber-companion' ),
103 | ],
104 | ],
105 | 'default' => [
106 | [
107 | 'gallery_img' => [
108 | 'url' => Utils::get_placeholder_image_src(),
109 | ],
110 | 'gallery_title' => __( 'Item 1', 'barber-companion' ),
111 | ],
112 | [
113 | 'gallery_img' => [
114 | 'url' => Utils::get_placeholder_image_src(),
115 | ],
116 | 'gallery_title' => __( 'Item 2', 'barber-companion' ),
117 | ],
118 | [
119 | 'gallery_img' => [
120 | 'url' => Utils::get_placeholder_image_src(),
121 | ],
122 | 'gallery_title' => __( 'Item 3', 'barber-companion' ),
123 | ],
124 | [
125 | 'gallery_img' => [
126 | 'url' => Utils::get_placeholder_image_src(),
127 | ],
128 | 'gallery_title' => __( 'Item 4', 'barber-companion' ),
129 | ],
130 | [
131 | 'gallery_img' => [
132 | 'url' => Utils::get_placeholder_image_src(),
133 | ],
134 | 'gallery_title' => __( 'Item 5', 'barber-companion' ),
135 | ],
136 | [
137 | 'gallery_img' => [
138 | 'url' => Utils::get_placeholder_image_src(),
139 | ],
140 | 'gallery_title' => __( 'Item 6', 'barber-companion' ),
141 | ],
142 | ]
143 | ]
144 | );
145 | $this->end_controls_section(); // End gallery content
146 |
147 | /**
148 | * Style Tab
149 | * ------------------------------ Style Section Heading ------------------------------
150 | *
151 | */
152 |
153 | $this->start_controls_section(
154 | 'style_room_section', [
155 | 'label' => __( 'Style Service Section', 'barber-companion' ),
156 | 'tab' => Controls_Manager::TAB_STYLE,
157 | ]
158 | );
159 | $this->add_control(
160 | 'sub_title_col', [
161 | 'label' => __( 'Sub Title Color', 'barber-companion' ),
162 | 'type' => Controls_Manager::COLOR,
163 | 'selectors' => [
164 | '{{WRAPPER}} .dream_service .section_title .sub_heading' => 'color: {{VALUE}};',
165 | ],
166 | ]
167 | );
168 | $this->add_control(
169 | 'big_title_col', [
170 | 'label' => __( 'Big Title Color', 'barber-companion' ),
171 | 'type' => Controls_Manager::COLOR,
172 | 'selectors' => [
173 | '{{WRAPPER}} .dream_service .section_title h3' => 'color: {{VALUE}};',
174 | ],
175 | ]
176 | );
177 |
178 | $this->add_control(
179 | 'singl_item_styles_seperator',
180 | [
181 | 'label' => esc_html__( 'Single Item Styles', 'barber-companion' ),
182 | 'type' => Controls_Manager::HEADING,
183 | 'separator' => 'after'
184 | ]
185 | );
186 | $this->add_control(
187 | 'sing_ser_title_col', [
188 | 'label' => __( 'Title Color', 'barber-companion' ),
189 | 'type' => Controls_Manager::COLOR,
190 | 'selectors' => [
191 | '{{WRAPPER}} .dream_service .single_dream h3' => 'color: {{VALUE}};',
192 | ],
193 | ]
194 | );
195 | $this->add_control(
196 | 'sing_ser_txt_col', [
197 | 'label' => __( 'Text Color', 'barber-companion' ),
198 | 'type' => Controls_Manager::COLOR,
199 | 'selectors' => [
200 | '{{WRAPPER}} .dream_service .single_dream p' => 'color: {{VALUE}};',
201 | ],
202 | ]
203 | );
204 |
205 | $this->end_controls_section();
206 |
207 | }
208 |
209 | protected function render() {
210 | $settings = $this->get_settings();
211 | $sec_icon = !empty( $settings['sec_icon'] ) ? esc_attr($settings['sec_icon']) : '';
212 | $sec_title = !empty( $settings['sec_title'] ) ? esc_html($settings['sec_title']) : '';
213 | $barbergalleries = !empty( $settings['barbergalleries'] ) ? $settings['barbergalleries'] : '';
214 | ?>
215 |
216 |
217 |
218 |
219 |
220 |
221 | ";
224 | }
225 | if ( $sec_title ) {
226 | echo "
{$sec_title}
";
227 | }
228 | ?>
229 |
230 |
231 |
232 |
233 |
234 |
235 | 0 ) {
237 | foreach( $barbergalleries as $gallery ) {
238 | $gallery_title = ( !empty( $gallery['gallery_title'] ) ) ? esc_html($gallery['gallery_title']) : '';
239 | $gallery_img = !empty( $gallery['gallery_img']['id'] ) ? wp_get_attachment_image( $gallery['gallery_img']['id'], 'barber_gallery_img_362x440', '', array( 'alt' => $gallery_title.' image' ) ) : '';
240 | $gallery_img_url = !empty( $gallery['gallery_img']['url'] ) ? esc_url($gallery['gallery_img']['url']) : '';
241 | ?>
242 |
243 |
244 |
249 |
250 |
253 |
254 |
255 |
256 |
260 |
261 |
262 |
263 |
264 |
265 | start_controls_section(
48 | 'home_contact_content',
49 | [
50 | 'label' => __( 'Home Contact Section', 'barber-companion' ),
51 | ]
52 | );
53 | $this->add_control(
54 | 'bg_img',
55 | [
56 | 'label' => esc_html__( 'BG Image', 'barber-companion' ),
57 | 'type' => Controls_Manager::MEDIA,
58 | 'label_block' => true,
59 | 'default' => [
60 | 'url' => Utils::get_placeholder_image_src(),
61 | ]
62 | ]
63 | );
64 |
65 | $this->add_control(
66 | 'right_section_separator',
67 | [
68 | 'label' => esc_html__( 'Right Section Content', 'barber-companion' ),
69 | 'type' => Controls_Manager::HEADING,
70 | 'separator' => 'after'
71 | ]
72 | );
73 | $this->add_control(
74 | 'sec_title',
75 | [
76 | 'label' => esc_html__( 'Section Title', 'barber-companion' ),
77 | 'type' => Controls_Manager::TEXT,
78 | 'label_block' => true,
79 | 'default' => esc_html__( 'How to Find Us', 'barber-companion' ),
80 | ]
81 | );
82 |
83 | $this->add_control(
84 | 'contact_contents', [
85 | 'label' => __( 'Create New', 'barber-companion' ),
86 | 'type' => Controls_Manager::REPEATER,
87 | 'title_field' => '{{{ item_title }}}',
88 | 'fields' => [
89 | [
90 | 'name' => 'item_icon',
91 | 'label' => __( 'Item Icon', 'barber-companion' ),
92 | 'label_block' => true,
93 | 'type' => Controls_Manager::ICON,
94 | 'options' => barber_themify_icon(),
95 | 'default' => 'flaticon-placeholder'
96 | ],
97 | [
98 | 'name' => 'item_title',
99 | 'label' => __( 'Item Title', 'barber-companion' ),
100 | 'label_block' => true,
101 | 'type' => Controls_Manager::TEXT,
102 | 'default' => __( 'Location', 'barber-companion' ),
103 | ],
104 | [
105 | 'name' => 'item_text',
106 | 'label' => __( 'Item Text', 'barber-companion' ),
107 | 'label_block' => true,
108 | 'type' => Controls_Manager::TEXTAREA,
109 | 'default' => __( '200, A-block, Green road, USA', 'barber-companion' ),
110 | ],
111 | ],
112 | 'default' => [
113 | [
114 | 'item_icon' => __( 'flaticon-placeholder', 'barber-companion' ),
115 | 'item_title' => __( 'Location', 'barber-companion' ),
116 | 'item_text' => __( '200, A-block, Green road, USA', 'barber-companion' ),
117 | ],
118 | [
119 | 'item_icon' => __( 'flaticon-phone-call', 'barber-companion' ),
120 | 'item_title' => __( 'Call Us', 'barber-companion' ),
121 | 'item_text' => __( '+10 378 478 2789', 'barber-companion' ),
122 | ],
123 | [
124 | 'item_icon' => __( 'flaticon-paper-plane', 'barber-companion' ),
125 | 'item_title' => __( 'Mail Us', 'barber-companion' ),
126 | 'item_text' => __( 'contact@barbershop.com', 'barber-companion' ),
127 | ],
128 | ]
129 | ]
130 | );
131 |
132 | $this->end_controls_section(); // End about us content
133 |
134 | //------------------------------ Style title ------------------------------
135 |
136 | // Home Contact Section Styles
137 | $this->start_controls_section(
138 | 'home_contact_sec_style', [
139 | 'label' => __( 'Home Contact Section Styles', 'barber-companion' ),
140 | 'tab' => Controls_Manager::TAB_STYLE,
141 | ]
142 | );
143 | $this->add_control(
144 | 'sub_title_col', [
145 | 'label' => __( 'Sub title Color', 'barber-companion' ),
146 | 'type' => Controls_Manager::COLOR,
147 | 'selectors' => [
148 | '{{WRAPPER}} .messege_area .section_title .sub_heading' => 'color: {{VALUE}};',
149 | ],
150 | ]
151 | );
152 | $this->add_control(
153 | 'sec_title_col', [
154 | 'label' => __( 'Big Title Color', 'barber-companion' ),
155 | 'type' => Controls_Manager::COLOR,
156 | 'selectors' => [
157 | '{{WRAPPER}} .messege_area .section_title h3' => 'color: {{VALUE}};',
158 | '{{WRAPPER}} .messege_area .section_title .seperator' => 'background: {{VALUE}};',
159 | ],
160 | ]
161 | );
162 |
163 | $this->add_control(
164 | 'btn_styles_seperator',
165 | [
166 | 'label' => esc_html__( 'Button Styles', 'barber-companion' ),
167 | 'type' => Controls_Manager::HEADING,
168 | 'separator' => 'after'
169 | ]
170 | );
171 | $this->add_control(
172 | 'btn_border_txt_col', [
173 | 'label' => __( 'Button Border & Text Color', 'barber-companion' ),
174 | 'type' => Controls_Manager::COLOR,
175 | 'selectors' => [
176 | '{{WRAPPER}} .messege_area .messege .boxed-btn' => 'color: {{VALUE}} !important; border-color: {{VALUE}};',
177 | ],
178 | ]
179 | );
180 | $this->add_control(
181 | 'btn_hvr_border_bg_col', [
182 | 'label' => __( 'Button Hover Border & Bg Color', 'barber-companion' ),
183 | 'type' => Controls_Manager::COLOR,
184 | 'selectors' => [
185 | '{{WRAPPER}} .messege_area .messege .boxed-btn:hover' => 'background: {{VALUE}}; border-color: {{VALUE}};',
186 | ],
187 | ]
188 | );
189 | $this->add_control(
190 | 'btn_hvr_txt_col', [
191 | 'label' => __( 'Button Hover Text Color', 'barber-companion' ),
192 | 'type' => Controls_Manager::COLOR,
193 | 'selectors' => [
194 | '{{WRAPPER}} .messege_area .messege .boxed-btn:hover' => 'color: {{VALUE}} !important;;',
195 | ],
196 | ]
197 | );
198 | $this->end_controls_section();
199 |
200 | }
201 |
202 | protected function render() {
203 | $settings = $this->get_settings();
204 | $bg_img = !empty( $settings['bg_img']['url'] ) ? $settings['bg_img']['url'] : '';
205 | $sec_title = !empty( $settings['sec_title'] ) ? $settings['sec_title'] : '';
206 | $contact_contents = !empty( $settings['contact_contents'] ) ? $settings['contact_contents'] : '';
207 | ?>
208 |
209 |
210 | >
211 |
212 |
213 |
214 |
215 | {$sec_title}";
218 | }
219 | ?>
220 |
221 | 0 ) {
223 | foreach( $contact_contents as $item ) {
224 | $item_icon = ( !empty( $item['item_icon'] ) ) ? esc_attr($item['item_icon']) : '';
225 | $item_title = ( !empty( $item['item_title'] ) ) ? esc_html($item['item_title']) : '';
226 | $item_text = ( !empty( $item['item_text'] ) ) ? esc_html($item['item_text']) : '';
227 | ?>
228 |
229 |
230 | ";
233 | }
234 | ?>
235 |
236 |
237 | {$item_title}";
240 | }
241 | if ( $item_text ) {
242 | echo "
{$item_text}
";
243 | }
244 | ?>
245 |
246 |
247 |
251 |
252 |
257 |
258 |
259 |
260 |
261 |
262 |
263 |
264 | start_controls_section(
48 | 'reviews_content',
49 | [
50 | 'label' => __( 'Review Contents', 'barber-companion' ),
51 | ]
52 | );
53 |
54 | $this->add_control(
55 | 'bg_img',
56 | [
57 | 'label' => esc_html__( 'Section Bg Image', 'barber-companion' ),
58 | 'type' => Controls_Manager::MEDIA,
59 | 'label_block' => true,
60 | 'default' => [
61 | 'url' => Utils::get_placeholder_image_src(),
62 | ],
63 | ]
64 | );
65 | $this->add_control(
66 | 'reviews_contents', [
67 | 'label' => __( 'Create New', 'barber-companion' ),
68 | 'type' => Controls_Manager::REPEATER,
69 | 'title_field' => '{{{ reviewer_name }}}',
70 | 'fields' => [
71 | [
72 | 'name' => 'reviewr_img',
73 | 'label' => __( 'Reviewer Image', 'barber-companion' ),
74 | 'label_block' => true,
75 | 'type' => Controls_Manager::MEDIA,
76 | 'default' => [
77 | 'url' => Utils::get_placeholder_image_src()
78 | ]
79 | ],
80 | [
81 | 'name' => 'review_txt',
82 | 'label' => __( 'Review Text', 'barber-companion' ),
83 | 'label_block' => true,
84 | 'type' => Controls_Manager::TEXTAREA,
85 | 'default' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut
labore et dolore magna aliqua. Quis ipsum suspendisse ultrices gravida. Risus commodo viverra
maecenas accumsan lacus vel facilisis.'
86 | ],
87 | [
88 | 'name' => 'reviewer_name',
89 | 'label' => __( 'Reviewer Name', 'barber-companion' ),
90 | 'label_block' => true,
91 | 'type' => Controls_Manager::TEXT,
92 | 'default' => __( '- MITHILA', 'barber-companion' ),
93 | ],
94 | [
95 | 'name' => 'reviewer_designation',
96 | 'label' => __( 'Reviewer Designation', 'barber-companion' ),
97 | 'label_block' => true,
98 | 'type' => Controls_Manager::TEXT,
99 | 'default' => __( 'Designer at Colorlib', 'barber-companion' ),
100 | ],
101 | ],
102 | 'default' => [
103 | [
104 | 'reviewr_img' => [
105 | 'url' => Utils::get_placeholder_image_src(),
106 | ],
107 | 'review_txt' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut
labore et dolore magna aliqua. Quis ipsum suspendisse ultrices gravida. Risus commodo viverra
maecenas accumsan lacus vel facilisis.',
108 | 'reviewer_name' => __( '- MITHILA', 'barber-companion' ),
109 | 'reviewer_designation' => __( 'Designer at Colorlib', 'barber-companion' ),
110 | ],
111 | [
112 | 'reviewr_img' => [
113 | 'url' => Utils::get_placeholder_image_src(),
114 | ],
115 | 'review_txt' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut
labore et dolore magna aliqua. Quis ipsum suspendisse ultrices gravida. Risus commodo viverra
maecenas accumsan lacus vel facilisis.',
116 | 'reviewer_name' => __( '- MITHILA', 'barber-companion' ),
117 | 'reviewer_designation' => __( 'Designer at Colorlib', 'barber-companion' ),
118 | ],
119 | [
120 | 'reviewr_img' => [
121 | 'url' => Utils::get_placeholder_image_src(),
122 | ],
123 | 'review_txt' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut
labore et dolore magna aliqua. Quis ipsum suspendisse ultrices gravida. Risus commodo viverra
maecenas accumsan lacus vel facilisis.',
124 | 'reviewer_name' => __( '- MITHILA', 'barber-companion' ),
125 | 'reviewer_designation' => __( 'Designer at Colorlib', 'barber-companion' ),
126 | ],
127 | ]
128 | ]
129 | );
130 | $this->end_controls_section(); // End Hero content
131 |
132 | /**
133 | * Style Tab
134 | * ------------------------------ Style Title ------------------------------
135 | *
136 | */
137 | $this->start_controls_section(
138 | 'style_title', [
139 | 'label' => __( 'Style Review Section', 'barber-companion' ),
140 | 'tab' => Controls_Manager::TAB_STYLE,
141 | ]
142 | );
143 |
144 | $this->add_control(
145 | 'rev_txt_col', [
146 | 'label' => __( 'Review Text Color', 'barber-companion' ),
147 | 'type' => Controls_Manager::COLOR,
148 | 'selectors' => [
149 | '{{WRAPPER}} .testmonial_area .testmonial_info p' => 'color: {{VALUE}};',
150 | ],
151 | ]
152 | );
153 | $this->add_control(
154 | 'rev_name_col', [
155 | 'label' => __( 'Reviewer Name Color', 'barber-companion' ),
156 | 'type' => Controls_Manager::COLOR,
157 | 'selectors' => [
158 | '{{WRAPPER}} .testmonial_area .testmonial_info .author_name h4' => 'color: {{VALUE}};',
159 | ],
160 | ]
161 | );
162 | $this->add_control(
163 | 'rev_desig_col', [
164 | 'label' => __( 'Reviewer Designation Color', 'barber-companion' ),
165 | 'type' => Controls_Manager::COLOR,
166 | 'selectors' => [
167 | '{{WRAPPER}} .testmonial_area .testmonial_info .author_name span' => 'color: {{VALUE}};',
168 | ],
169 | ]
170 | );
171 | $this->end_controls_section();
172 |
173 | }
174 |
175 | protected function render() {
176 |
177 | // call load widget script
178 | $this->load_widget_script();
179 | $settings = $this->get_settings();
180 | $bg_img = !empty( $settings['bg_img']['url'] ) ? $settings['bg_img']['url'] : '';
181 | $reviews = !empty( $settings['reviews_contents'] ) ? $settings['reviews_contents'] : '';
182 | ?>
183 |
184 |
185 | >
186 |
187 |
188 |
189 |
190 | 0 ){
192 | foreach ( $reviews as $review ) {
193 | $reviewer_name = !empty( $review['reviewer_name'] ) ? $review['reviewer_name'] : '';
194 | $reviewr_img = !empty( $review['reviewr_img']['id'] ) ? wp_get_attachment_image( $review['reviewr_img']['id'], 'barber_client_img_116x116', '', array('alt' => $reviewer_name . ' image' ) ) : '';
195 | $review_txt = !empty( $review['review_txt'] ) ? $review['review_txt'] : '';
196 | $reviewer_designation = !empty( $review['reviewer_designation'] ) ? $review['reviewer_designation'] : '';
197 | ?>
198 |
199 |
200 | ';
203 | echo $reviewr_img;
204 | echo '
';
205 | }
206 | if ( $review_txt ) {
207 | echo '
'.wp_kses_post( nl2br( $review_txt ) ).'
';
208 | }
209 | if ( $reviewer_name ) {
210 | echo '
';
211 | echo '
'.$reviewer_name.'
';
212 | echo ''.$reviewer_designation.'';
213 | echo '';
214 | }
215 | ?>
216 |
217 |
218 |
222 |
223 |
224 |
225 |
226 |
227 |
228 | editor->is_edit_mode() === true ) {
234 | ?>
235 |
274 | start_controls_section(
48 | 'about_left_content',
49 | [
50 | 'label' => __( 'About Left Content', 'barber-companion' ),
51 | ]
52 | );
53 | $this->add_control(
54 | 'left_img',
55 | [
56 | 'label' => esc_html__( 'Left Image', 'barber-companion' ),
57 | 'type' => Controls_Manager::MEDIA,
58 | 'label_block' => true,
59 | 'default' => [
60 | 'url' => Utils::get_placeholder_image_src(),
61 | ]
62 | ]
63 | );
64 | $this->add_control(
65 | 'left_icon',
66 | [
67 | 'label' => esc_html__( 'Select an Icon', 'barber-companion' ),
68 | 'type' => Controls_Manager::ICON,
69 | 'label_block' => true,
70 | 'default' => 'flaticon-clock',
71 | 'options' => barber_themify_icon()
72 | ]
73 | );
74 | $this->add_control(
75 | 'big_txt',
76 | [
77 | 'label' => esc_html__( 'Big Text', 'barber-companion' ),
78 | 'type' => Controls_Manager::TEXT,
79 | 'label_block' => true,
80 | 'default' => esc_html__( 'Opening Hour', 'barber-companion' ),
81 | ]
82 | );
83 | $this->add_control(
84 | 'day_hour',
85 | [
86 | 'label' => esc_html__( 'Day and Hour', 'barber-companion' ),
87 | 'type' => Controls_Manager::TEXTAREA,
88 | 'label_block' => true,
89 | 'default' => 'Mon-Fri (9.00-11.00)
Sat (10.00-4.00)',
90 | ]
91 | );
92 |
93 | $this->end_controls_section(); // End about us content
94 |
95 | // About right content
96 | $this->start_controls_section(
97 | 'about_right_content',
98 | [
99 | 'label' => __( 'About Right Content', 'barber-companion' ),
100 | ]
101 | );
102 | $this->add_control(
103 | 'sub_title',
104 | [
105 | 'label' => esc_html__( 'Sub Title', 'barber-companion' ),
106 | 'type' => Controls_Manager::TEXT,
107 | 'label_block' => true,
108 | 'default' => esc_html__( 'About Us', 'barber-companion' ),
109 | ]
110 | );
111 | $this->add_control(
112 | 'sec_title',
113 | [
114 | 'label' => esc_html__( 'Section Title', 'barber-companion' ),
115 | 'type' => Controls_Manager::TEXTAREA,
116 | 'label_block' => true,
117 | 'default' => 'Experienced and
Traditional Stylish
Barber Shop',
118 | ]
119 | );
120 | $this->add_control(
121 | 'sec_text',
122 | [
123 | 'label' => esc_html__( 'Section Text', 'barber-companion' ),
124 | 'type' => Controls_Manager::TEXTAREA,
125 | 'label_block' => true,
126 | 'default' => 'Inspires employees and organizations to support causes they care
is to bring more resources to the nonprofits that are
changing our world.',
127 | ]
128 | );
129 | $this->add_control(
130 | 'btn_text',
131 | [
132 | 'label' => esc_html__( 'Button Text', 'barber-companion' ),
133 | 'type' => Controls_Manager::TEXT,
134 | 'label_block' => true,
135 | 'default' => esc_html__( 'Learn More', 'barber-companion' ),
136 | ]
137 | );
138 | $this->add_control(
139 | 'btn_url',
140 | [
141 | 'label' => esc_html__( 'Button URL', 'barber-companion' ),
142 | 'type' => Controls_Manager::URL,
143 | 'label_block' => true,
144 | 'default' => [
145 | 'url' => '#'
146 | ],
147 | ]
148 | );
149 |
150 | $this->end_controls_section(); // End about us content
151 |
152 | //------------------------------ Style title ------------------------------
153 |
154 | // Top Section Styles
155 | $this->start_controls_section(
156 | 'about_sec_style', [
157 | 'label' => __( 'About Section Styles', 'barber-companion' ),
158 | 'tab' => Controls_Manager::TAB_STYLE,
159 | ]
160 | );
161 |
162 | $this->add_control(
163 | 'left_sec_styles_seperator',
164 | [
165 | 'label' => esc_html__( 'Left Section Styles', 'barber-companion' ),
166 | 'type' => Controls_Manager::HEADING,
167 | 'separator' => 'after'
168 | ]
169 | );
170 | $this->add_control(
171 | 'exp_val_col', [
172 | 'label' => __( 'Experience Value Color', 'barber-companion' ),
173 | 'type' => Controls_Manager::COLOR,
174 | 'selectors' => [
175 | '{{WRAPPER}} .about_area .about_thumb .exprience h1' => 'color: {{VALUE}};',
176 | ],
177 | ]
178 | );
179 |
180 | $this->add_control(
181 | 'exp_txt_col', [
182 | 'label' => __( 'Experience Text Color', 'barber-companion' ),
183 | 'type' => Controls_Manager::COLOR,
184 | 'selectors' => [
185 | '{{WRAPPER}} .about_area .about_thumb .exprience span' => 'color: {{VALUE}};',
186 | ],
187 | ]
188 | );
189 |
190 | $this->add_control(
191 | 'right_sec_styles_seperator',
192 | [
193 | 'label' => esc_html__( 'Right Section Styles', 'barber-companion' ),
194 | 'type' => Controls_Manager::HEADING,
195 | 'separator' => 'after'
196 | ]
197 | );
198 | $this->add_control(
199 | 'sub_title_col', [
200 | 'label' => __( 'Sub Title Color', 'barber-companion' ),
201 | 'type' => Controls_Manager::COLOR,
202 | 'selectors' => [
203 | '{{WRAPPER}} .about_info .section_title .sub_heading' => 'color: {{VALUE}};',
204 | ],
205 | ]
206 | );
207 | $this->add_control(
208 | 'sec_title_col', [
209 | 'label' => __( 'Sec Title Color', 'barber-companion' ),
210 | 'type' => Controls_Manager::COLOR,
211 | 'selectors' => [
212 | '{{WRAPPER}} .about_info .section_title h3' => 'color: {{VALUE}};',
213 | '{{WRAPPER}} .about_info .section_title .seperator' => 'background: {{VALUE}};',
214 | ],
215 | ]
216 | );
217 | $this->add_control(
218 | 'sec_text_col', [
219 | 'label' => __( 'Sec Text Color', 'barber-companion' ),
220 | 'type' => Controls_Manager::COLOR,
221 | 'selectors' => [
222 | '{{WRAPPER}} .about_area .about_info p' => 'color: {{VALUE}};',
223 | '{{WRAPPER}} .about_area .about_info ul li' => 'color: {{VALUE}};',
224 | ],
225 | ]
226 | );
227 | $this->add_control(
228 | 'list_circle_col', [
229 | 'label' => __( 'List Item Circle Color', 'barber-companion' ),
230 | 'type' => Controls_Manager::COLOR,
231 | 'selectors' => [
232 | '{{WRAPPER}} .about_area .about_info ul li::before' => 'background: {{VALUE}};',
233 | ],
234 | ]
235 | );
236 |
237 | $this->add_control(
238 | 'btn_styles_seperator',
239 | [
240 | 'label' => esc_html__( 'Button Styles', 'barber-companion' ),
241 | 'type' => Controls_Manager::HEADING,
242 | 'separator' => 'after'
243 | ]
244 | );
245 | $this->add_control(
246 | 'btn_txt_col', [
247 | 'label' => __( 'Button Text & Border Color', 'barber-companion' ),
248 | 'type' => Controls_Manager::COLOR,
249 | 'selectors' => [
250 | '{{WRAPPER}} .about_area .about_info a' => 'color: {{VALUE}} !important; border-color: {{VALUE}}',
251 | ],
252 | ]
253 | );
254 | $this->add_control(
255 | 'btn_hvr_bg_col', [
256 | 'label' => __( 'Button Hover Bg & Border Color', 'barber-companion' ),
257 | 'type' => Controls_Manager::COLOR,
258 | 'selectors' => [
259 | '{{WRAPPER}} .about_area .about_info a:hover' => 'background: {{VALUE}}; border-color: {{VALUE}}',
260 | ],
261 | ]
262 | );
263 | $this->add_control(
264 | 'btn_hvr_txt_col', [
265 | 'label' => __( 'Button Hover Text Color', 'barber-companion' ),
266 | 'type' => Controls_Manager::COLOR,
267 | 'selectors' => [
268 | '{{WRAPPER}} .about_area .about_info a:hover' => 'color: {{VALUE}} !important;',
269 | ],
270 | ]
271 | );
272 |
273 | $this->end_controls_section();
274 |
275 | }
276 |
277 |
278 | protected function render() {
279 | $settings = $this->get_settings();
280 | $left_img = !empty( $settings['left_img']['id'] ) ? wp_get_attachment_image( $settings['left_img']['id'], 'barber_about_img_588x600', '', array( 'alt' => 'about image' ) ) : '';
281 | $left_icon = !empty( $settings['left_icon'] ) ? esc_attr($settings['left_icon']) : '';
282 | $big_txt = !empty( $settings['big_txt'] ) ? esc_html($settings['big_txt']) : '';
283 | $day_hour = !empty( $settings['day_hour'] ) ? wp_kses_post(nl2br($settings['day_hour'])) : '';
284 | $sub_title = !empty( $settings['sub_title'] ) ? esc_html($settings['sub_title']) : '';
285 | $sec_title = !empty( $settings['sec_title'] ) ? wp_kses_post(nl2br($settings['sec_title'])) : '';
286 | $sec_text = !empty( $settings['sec_text'] ) ? wp_kses_post(nl2br($settings['sec_text'])) : '';
287 | $btn_text = !empty( $settings['btn_text'] ) ? esc_html($settings['btn_text']) : '';
288 | $btn_url = !empty( $settings['btn_url']['url'] ) ? esc_url($settings['btn_url']['url']) : '';
289 | $dynamic_class = is_front_page() ? 'about_area' : 'about_area';
290 | ?>
291 |
292 |
293 |
294 |
295 |
296 |
297 |
298 |
303 |
304 | ";
307 | }
308 | if ( $big_txt ) {
309 | echo "
{$big_txt}
";
310 | }
311 | if ( $day_hour ) {
312 | echo "
{$day_hour}
";
313 | }
314 | ?>
315 |
316 |
317 |
318 |
319 |
320 |
321 | {$sub_title}";
324 | }
325 | if ( $sec_title ) {
326 | echo "
{$sec_title}
";
327 | }
328 | ?>
329 |
330 | {$sec_text}";
333 | }
334 | if ( $btn_text ) {
335 | echo "
{$btn_text}";
336 | }
337 | ?>
338 |
339 |
340 |
341 |
342 |
343 |
344 | start_controls_section(
48 | 'team_member_content',
49 | [
50 | 'label' => __( 'Team Member content', 'barber-companion' ),
51 | ]
52 | );
53 | $this->add_control(
54 | 'sec_icon',
55 | [
56 | 'label' => esc_html__( 'Section Icon', 'barber-companion' ),
57 | 'type' => Controls_Manager::ICON,
58 | 'label_block' => true,
59 | 'options' => barber_themify_icon(),
60 | 'default' => 'flaticon-scissors'
61 | ]
62 | );
63 | $this->add_control(
64 | 'sec_title',
65 | [
66 | 'label' => esc_html__( 'Section Title', 'barber-companion' ),
67 | 'type' => Controls_Manager::TEXT,
68 | 'label_block' => true,
69 | 'default' => esc_html__( 'Our Cutter Masters', 'barber-companion' )
70 | ]
71 | );
72 |
73 | $this->add_control(
74 | 'team_member_inner_settings_seperator',
75 | [
76 | 'label' => esc_html__( 'Team Member Items', 'barber-companion' ),
77 | 'type' => Controls_Manager::HEADING,
78 | 'separator' => 'after'
79 | ]
80 | );
81 |
82 | $this->add_control(
83 | 'team_members', [
84 | 'label' => __( 'Create New', 'barber-companion' ),
85 | 'type' => Controls_Manager::REPEATER,
86 | 'title_field' => '{{{ member_name }}}',
87 | 'fields' => [
88 | [
89 | 'name' => 'member_img',
90 | 'label' => __( 'Member Image', 'barber-companion' ),
91 | 'label_block' => true,
92 | 'type' => Controls_Manager::MEDIA,
93 | 'default' => [
94 | 'url' => Utils::get_placeholder_image_src(),
95 | ]
96 | ],
97 | [
98 | 'name' => 'member_name',
99 | 'label' => __( 'Member Name', 'barber-companion' ),
100 | 'label_block' => true,
101 | 'type' => Controls_Manager::TEXT,
102 | 'default' => __( 'Lallu Mia', 'barber-companion' ),
103 | ],
104 | [
105 | 'name' => 'member_designation',
106 | 'label' => __( 'Member Designation', 'barber-companion' ),
107 | 'label_block' => true,
108 | 'type' => Controls_Manager::TEXT,
109 | 'default' => __( 'Design Expert', 'barber-companion' ),
110 | ],
111 | [
112 | 'name' => 'social_info_separator',
113 | 'label' => __( 'Social Links', 'barber-companion' ),
114 | 'type' => Controls_Manager::HEADING,
115 | 'separator' => 'after'
116 | ],
117 | [
118 | 'name' => 'fb_url',
119 | 'label' => __( 'Facebook Profile URL', 'barber-companion' ),
120 | 'label_block' => true,
121 | 'type' => Controls_Manager::URL,
122 | 'default' => [
123 | 'url' => '#'
124 | ],
125 | ],
126 | [
127 | 'name' => 'tw_url',
128 | 'label' => __( 'Twitter Profile URL', 'barber-companion' ),
129 | 'label_block' => true,
130 | 'type' => Controls_Manager::URL,
131 | 'default' => [
132 | 'url' => '#'
133 | ],
134 | ],
135 | [
136 | 'name' => 'ins_url',
137 | 'label' => __( 'Instagram Profile URL', 'barber-companion' ),
138 | 'label_block' => true,
139 | 'type' => Controls_Manager::URL,
140 | 'default' => [
141 | 'url' => '#'
142 | ],
143 | ],
144 | ],
145 | 'default' => [
146 | [
147 | 'member_img' => [
148 | 'url' => Utils::get_placeholder_image_src(),
149 | ],
150 | 'member_name' => __( 'Macau Wilium', 'barber-companion' ),
151 | 'member_designation' => __( 'Massage Master', 'barber-companion' ),
152 | 'fb_url' => '#',
153 | 'tw_url' => '#',
154 | 'ins_url' => '#',
155 | ],
156 | [
157 | 'member_img' => [
158 | 'url' => Utils::get_placeholder_image_src(),
159 | ],
160 | 'member_name' => __( 'Dan Jacky', 'barber-companion' ),
161 | 'member_designation' => __( 'Mens Cut', 'barber-companion' ),
162 | 'fb_url' => '#',
163 | 'tw_url' => '#',
164 | 'ins_url' => '#',
165 | ],
166 | [
167 | 'member_img' => [
168 | 'url' => Utils::get_placeholder_image_src(),
169 | ],
170 | 'member_name' => __( 'Luka Luka', 'barber-companion' ),
171 | 'member_designation' => __( 'Mens Cut', 'barber-companion' ),
172 | 'fb_url' => '#',
173 | 'tw_url' => '#',
174 | 'ins_url' => '#',
175 | ],
176 | [
177 | 'member_img' => [
178 | 'url' => Utils::get_placeholder_image_src(),
179 | ],
180 | 'member_name' => __( 'Rona Dana', 'barber-companion' ),
181 | 'member_designation' => __( 'Ladies Cut', 'barber-companion' ),
182 | 'fb_url' => '#',
183 | 'tw_url' => '#',
184 | 'ins_url' => '#',
185 | ],
186 | ]
187 | ]
188 | );
189 | $this->end_controls_section(); // End service content
190 |
191 | /**
192 | * Style Tab
193 | * ------------------------------ Style Section Heading ------------------------------
194 | *
195 | */
196 |
197 | $this->start_controls_section(
198 | 'style_room_section', [
199 | 'label' => __( 'Style Service Section', 'barber-companion' ),
200 | 'tab' => Controls_Manager::TAB_STYLE,
201 | ]
202 | );
203 | $this->add_control(
204 | 'sub_title_col', [
205 | 'label' => __( 'Sub Title Color', 'barber-companion' ),
206 | 'type' => Controls_Manager::COLOR,
207 | 'selectors' => [
208 | '{{WRAPPER}} .team_area .section_title .sub_heading' => 'color: {{VALUE}};',
209 | ],
210 | ]
211 | );
212 | $this->add_control(
213 | 'big_title_col', [
214 | 'label' => __( 'Big Title Color', 'barber-companion' ),
215 | 'type' => Controls_Manager::COLOR,
216 | 'selectors' => [
217 | '{{WRAPPER}} .team_area .section_title h3' => 'color: {{VALUE}};',
218 | ],
219 | ]
220 | );
221 |
222 | $this->add_control(
223 | 'member_styles_seperator',
224 | [
225 | 'label' => esc_html__( 'Member Styles', 'barber-companion' ),
226 | 'type' => Controls_Manager::HEADING,
227 | 'separator' => 'after'
228 | ]
229 | );
230 | $this->add_control(
231 | 'member_name_col', [
232 | 'label' => __( 'Member Name Color', 'barber-companion' ),
233 | 'type' => Controls_Manager::COLOR,
234 | 'selectors' => [
235 | '{{WRAPPER}} .team_area .single_team h3' => 'color: {{VALUE}};',
236 | ],
237 | ]
238 | );
239 | $this->add_control(
240 | 'member_desig_color', [
241 | 'label' => __( 'Member Designation Color', 'barber-companion' ),
242 | 'type' => Controls_Manager::COLOR,
243 | 'selectors' => [
244 | '{{WRAPPER}} .team_area .single_team p' => 'color: {{VALUE}};',
245 | ],
246 | ]
247 | );
248 | $this->end_controls_section();
249 |
250 | }
251 |
252 | protected function render() {
253 | $settings = $this->get_settings();
254 | $sec_icon = !empty( $settings['sec_icon'] ) ? $settings['sec_icon'] : '';
255 | $sec_title = !empty( $settings['sec_title'] ) ? $settings['sec_title'] : '';
256 | $team_members = !empty( $settings['team_members'] ) ? $settings['team_members'] : '';
257 | ?>
258 |
259 |
260 |
261 |
262 |
263 |
264 |
265 | ";
268 | }
269 | if ( $sec_title ) {
270 | echo "
{$sec_title}
";
271 | }
272 | ?>
273 |
274 |
275 |
276 |
277 | 0 ) {
279 | foreach( $team_members as $member ) {
280 | $member_name = ( !empty( $member['member_name'] ) ) ? esc_html($member['member_name']) : '';
281 | $member_img = !empty( $member['member_img']['id'] ) ? wp_get_attachment_image( $member['member_img']['id'], 'barber_team_thumb_264x320', '', array( 'alt' => $member_name.' image' ) ) : '';
282 | $member_designation = ( !empty( $member['member_designation'] ) ) ? esc_html($member['member_designation']) : '';
283 | $fb_url = ( !empty( $member['fb_url']['url'] ) ) ? esc_url($member['fb_url']['url']) : '';
284 | $tw_url = ( !empty( $member['tw_url']['url'] ) ) ? esc_url($member['tw_url']['url']) : '';
285 | $ins_url = ( !empty( $member['ins_url']['url'] ) ) ? esc_url($member['ins_url']['url']) : '';
286 | ?>
287 |
288 |
289 |
290 |
295 |
296 |
";
299 | }
300 | if ( $tw_url ) {
301 | echo "
";
302 | }
303 | if ( $ins_url ) {
304 | echo "
";
305 | }
306 | ?>
307 |
308 |
309 |
310 | {$member_name}";
313 | }
314 | if ( $member_designation ) {
315 | echo "
{$member_designation}
";
316 | }
317 | ?>
318 |
319 |
320 |
321 |
325 |
326 |
327 |
328 |
329 |