Version Description
Download this release
Release Info
Developer | Nikschavan |
Plugin | Astra Widgets |
Version | 1.0.0 |
Comparing to | |
See all releases |
Version 1.0.0
- assets/css/minified/astra-widget-list-icons-rtl.min.css +1 -0
- assets/css/minified/astra-widget-list-icons.min.css +1 -0
- assets/css/minified/astra-widget-social-profiles-admin-rtl.min.css +0 -0
- assets/css/minified/astra-widget-social-profiles-admin.min.css +0 -0
- assets/css/minified/astra-widget-social-profiles-rtl.min.css +1 -0
- assets/css/minified/astra-widget-social-profiles.min.css +1 -0
- assets/css/minified/astra-widgets-admin-rtl.min.css +1 -0
- assets/css/minified/astra-widgets-admin.min.css +1 -0
- assets/css/minified/font-style.min.css +1 -0
- assets/css/minified/style-rtl.min.css +1 -0
- assets/css/minified/style.min-rtl.css +1 -0
- assets/css/minified/style.min.css +1 -0
- assets/css/unminified/astra-widget-list-icons-rtl.css +37 -0
- assets/css/unminified/astra-widget-list-icons.css +37 -0
- assets/css/unminified/astra-widget-social-profiles-admin-rtl.css +4 -0
- assets/css/unminified/astra-widget-social-profiles-admin.css +4 -0
- assets/css/unminified/astra-widget-social-profiles-rtl.css +71 -0
- assets/css/unminified/astra-widget-social-profiles.css +71 -0
- assets/css/unminified/astra-widgets-admin-rtl.css +242 -0
- assets/css/unminified/astra-widgets-admin.css +242 -0
- assets/css/unminified/font-style-rtl.css +90 -0
- assets/css/unminified/font-style.css +90 -0
- assets/css/unminified/style-rtl.css +15 -0
- assets/css/unminified/style.css +15 -0
- assets/js/minified/astra-widget-list-icons.min.js +1 -0
- assets/js/minified/astra-widget-social-profiles.min.js +1 -0
- assets/js/minified/astra-widgets-backend.min.js +1 -0
- assets/js/minified/social-icons-widget.min.js +1 -0
- assets/js/unminified/astra-widget-list-icons.js +60 -0
- assets/js/unminified/astra-widget-social-profiles.js +90 -0
- assets/js/unminified/astra-widgets-backend.js +397 -0
- astra-widgets.php +31 -0
- classes/class-astra-widgets-helper.php +512 -0
- classes/class-astra-widgets-loader.php +105 -0
- classes/class-astra-widgets.php +48 -0
- classes/index.php +9 -0
- classes/widgets/class-astra-widget-address.php +232 -0
- classes/widgets/class-astra-widget-list-icons.php +364 -0
- classes/widgets/class-astra-widget-social-profiles.php +505 -0
- languages/astra-widgets.pot +246 -0
- readme.txt +25 -0
assets/css/minified/astra-widget-list-icons-rtl.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
#secondary .astra-widget-list-icons ul li{-js-display:flex;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;margin-bottom:1em;line-height:normal}.astra-widget-list-icons ul li .image{max-width:50px;margin-left:10px}.astra-widget-list-icons li{-js-display:flex;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;margin-bottom:1.3em}
|
assets/css/minified/astra-widget-list-icons.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
#secondary .astra-widget-list-icons ul li{-js-display:flex;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;margin-bottom:1em;line-height:normal}.astra-widget-list-icons ul li img{min-width:25px}.astra-widget-list-icons ul li .image{max-width:25px;margin-right:5px}.astra-widget-list-icons ul li span{margin-right:5px;vertical-align:middle}.astra-widget-list-icons li{-js-display:flex;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;margin-bottom:1.3em}.astra-widget-list-icons .icon{display:inline-block}
|
assets/css/minified/astra-widget-social-profiles-admin-rtl.min.css
ADDED
File without changes
|
assets/css/minified/astra-widget-social-profiles-admin.min.css
ADDED
File without changes
|
assets/css/minified/astra-widget-social-profiles-rtl.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.astra-widget-social-profiles-inner li>a{-js-display:flex;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;margin-bottom:.3em;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center}.astra-widget-social-profiles-inner .icon{width:1em;margin-left:1em;-webkit-transition:all .2s linear;transition:all .2s linear}.astra-widget-social-profiles-inner.inline li .icon{margin-left:.2em}.astra-widget-social-profiles-inner.circle .icon{margin-left:.5em}.astra-widget-social-profiles-inner i{vertical-align:middle}.astra-widget-social-profiles-inner.inline li{-js-display:inline-flex;display:-webkit-inline-box;display:-webkit-inline-flex;display:-moz-inline-box;display:-ms-inline-flexbox;display:inline-flex;text-align:center}.astra-widget-social-profiles-inner.circle .icon,.astra-widget-social-profiles-inner.circle-outline .icon{-webkit-border-radius:50%;border-radius:50%}.astra-widget-social-profiles-inner.circle-outline li .icon,.astra-widget-social-profiles-inner.square-outline li .icon{margin-left:.2em}.astra-widget-social-profiles-inner.circle .icon,.astra-widget-social-profiles-inner.circle-outline .icon,.astra-widget-social-profiles-inner.square .icon,.astra-widget-social-profiles-inner.square-outline .icon{height:2em;width:2em;font-size:1em;text-align:center;vertical-align:middle}
|
assets/css/minified/astra-widget-social-profiles.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.astra-widget-social-profiles-inner li>a{-js-display:flex;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;margin-bottom:.3em;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center}.astra-widget-social-profiles-inner .icon{width:1em;margin-right:1em;-webkit-transition:all .2s linear;transition:all .2s linear}.astra-widget-social-profiles-inner.inline li .icon{margin-right:.2em}.astra-widget-social-profiles-inner.circle .icon{margin-right:.5em}.astra-widget-social-profiles-inner .icon{vertical-align:middle}.astra-widget-social-profiles-inner .link{margin-right:.5em}.astra-widget-social-profiles-inner.inline li{-js-display:inline-flex;display:-webkit-inline-box;display:-webkit-inline-flex;display:-moz-inline-box;display:-ms-inline-flexbox;display:inline-flex;text-align:center}.astra-widget-social-profiles-inner.circle .icon,.astra-widget-social-profiles-inner.circle-outline .icon{-webkit-border-radius:50%;border-radius:50%}.astra-widget-social-profiles-inner.circle-outline li .icon,.astra-widget-social-profiles-inner.square-outline li .icon{margin-right:.2em}.astra-widget-social-profiles-inner.circle .icon,.astra-widget-social-profiles-inner.circle-outline .icon,.astra-widget-social-profiles-inner.square .icon,.astra-widget-social-profiles-inner.square-outline .icon{height:2em;width:2em;font-size:1em;text-align:center;vertical-align:middle}.astra-widget-social-profiles-inner ul li span{font-size:15px;line-height:2em}.astra-widget-social-profiles-inner.circle .icon span,.astra-widget-social-profiles-inner.circle-outline .icon span{line-height:2em}
|
assets/css/minified/astra-widgets-admin-rtl.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.wp-core-ui .next-field-image .next-select-image{padding:4px 0;width:100%;text-align:center;height:auto}.astra-repeater-field{cursor:move;border-bottom:1px solid #eee}.astra-repeater-field:last-child{border-bottom:none}.astra-repeater-field .dashicons{font-size:1rem;height:1rem;width:1rem;color:#c1c1c1}.astra-repeater-field .dashicons-admin-page.clone{margin-left:.3em}.astra-repeater-container{margin-bottom:1em}.astra-repeater-field label{margin-bottom:.5em;display:inline-block}.astra-repeater .markukp p{margin:1em 0}.astra-repeater .add-new{margin-bottom:1em}.astra-repeater-field .clone,.astra-repeater-field .remove{cursor:pointer}.astra-repeater-field .actions{padding:10px;background:#f6f6f6;text-align:left}.astra-repeater-field .markukp{display:none}.astra-repeater-field .actions .dashicons-move,.astra-repeater-field .actions .title{float:right}.astra-repeater-field .actions .title{margin-right:.5em}.astra-repeater-field .index{display:none}.astra-field-image .astra-remove-image{position:absolute;background:0 0;border:none;-webkit-box-shadow:none;box-shadow:none;color:#ca4a20;top:.6em;right:11em;color:#aaa;font-size:11px;-webkit-transition:all .25s ease;transition:all .25s ease}.astra-field-image .astra-remove-image:hover{outline:0;background:0 0;-webkit-box-shadow:none;box-shadow:none;color:#ca4a20}.astra-field-image-preview{position:relative}.astra-field-image{-js-display:flex;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}.astra-field-image .astra-select-image{display:block;color:#666;text-shadow:0 1px 0 #fff;font-weight:600;font-size:11px;cursor:pointer;border:1px solid #bbb;height:8px;padding:14px 5px;line-height:8px;background:#f9f9f9;background:-webkit-gradient(linear,right bottom,right top,color-stop(0,#f2f2f2),color-stop(1,#f9f9f9));background:-o-linear-gradient(#f9f9f9,#f2f2f2);-webkit-box-shadow:0 1px 2px rgba(0,0,0,.1);box-shadow:0 1px 2px rgba(0,0,0,.1);-webkit-border-top-left-radius:3px;-moz-border-top-left-radius:3px;border-top-left-radius:3px;-webkit-border-bottom-left-radius:3px;-moz-border-bottom-left-radius:3px;border-bottom-left-radius:3px;border:1px solid #bbb}.astra-field-image .astra-select-image:hover{background:rgba(255,255,255,.75)}.astra-field-image-preview img{border-width:1px 1px 1px 0;border-color:#bbb;border-style:solid;line-height:0;-webkit-box-shadow:0 1px 1px #fff;box-shadow:0 1px 1px #fff;width:25px;height:25px;padding:5.5px;-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,.2);box-shadow:inset 0 1px 3px rgba(0,0,0,.2)}.astra-field-image-preview{background:#f9f9f9;background:-webkit-gradient(linear,right bottom,right top,color-stop(0,#f2f2f2),color-stop(1,#f9f9f9));background:-o-linear-gradient(#f9f9f9,#f2f2f2);-webkit-box-shadow:0 1px 2px rgba(0,0,0,.1);box-shadow:0 1px 2px rgba(0,0,0,.1);-webkit-border-top-right-radius:3px;-moz-border-top-right-radius:3px;border-top-right-radius:3px;-webkit-border-bottom-right-radius:3px;-moz-border-bottom-right-radius:3px;border-bottom-right-radius:3px;line-height:10px}.astra-field-image img{max-width:100%}.astra-field-image-title{margin-bottom:1em}.astra-icons-list-wrap{display:none}.astra-selected-icon{display:inline-block;margin-left:.5em}.astra-icons-list-wrap .search-icon{width:100%;margin-bottom:1em}.astra-widget-icons-list .astra-widget-icon{display:inline-block;float:right;cursor:pointer;height:1em;padding:1em;width:27px;line-height:1em;font-size:1em;border:1px solid #f1f1f1;margin:0;text-align:center}.astra-widget-icons-list{display:inline-block;margin:1em 0 0 0;padding:0}.astra-widget-icon-selector{margin:1em 0}.astra-widget-field{margin:1em 0}.astra-widget-field label{margin-bottom:.5em;display:block}.astra-widget-field-checkbox label{display:inline-block}.astra-widget-field-heading label{font-weight:700}.astra-widget-field-color .wp-color-result{margin-bottom:0!important}
|
assets/css/minified/astra-widgets-admin.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.wp-core-ui .next-field-image .next-select-image{padding:4px 0;width:100%;text-align:center;height:auto}.astra-repeater-field{cursor:move;border-bottom:1px solid #eee}.astra-repeater-field:last-child{border-bottom:none}.astra-repeater-field .dashicons{font-size:1rem;height:1rem;width:1rem;color:#c1c1c1}.astra-repeater-field .dashicons-admin-page.clone{margin-right:.3em}.astra-repeater-container{margin-bottom:1em}.astra-repeater-field label{margin-bottom:.5em;display:inline-block}.astra-repeater .markukp p{margin:1em 0}.astra-repeater .add-new{margin-bottom:1em}.astra-repeater-field .clone,.astra-repeater-field .remove{cursor:pointer}.astra-repeater-field .actions{padding:10px;background:#f6f6f6;text-align:right}.astra-repeater-field .markukp{display:none}.astra-repeater-field .actions .dashicons-move,.astra-repeater-field .actions .title{float:left}.astra-repeater-field .actions .title{margin-left:.5em}.astra-repeater-field .index{display:none}.astra-repeater-field span.title:before{font-size:.9em;margin-right:.5em}.astra-field-image .astra-remove-image{position:absolute;background:0 0;border:none;-webkit-box-shadow:none;box-shadow:none;color:#ca4a20;top:.6em;left:11em;color:#aaa;font-size:11px;-webkit-transition:all .25s ease;transition:all .25s ease}.astra-field-image .astra-remove-image:hover{outline:0;background:0 0;-webkit-box-shadow:none;box-shadow:none;color:#ca4a20}.astra-field-image-preview{position:relative}.astra-field-image{-js-display:flex;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}.astra-field-image .astra-select-image{display:block;color:#666;text-shadow:0 1px 0 #fff;font-weight:600;font-size:11px;cursor:pointer;border:1px solid #bbb;height:8px;padding:14px 5px;line-height:8px;background:#f9f9f9;background:-webkit-gradient(linear,left bottom,left top,color-stop(0,#f2f2f2),color-stop(1,#f9f9f9));background:-o-linear-gradient(#f9f9f9,#f2f2f2);-webkit-box-shadow:0 1px 2px rgba(0,0,0,.1);box-shadow:0 1px 2px rgba(0,0,0,.1);-webkit-border-top-right-radius:3px;-moz-border-top-right-radius:3px;border-top-right-radius:3px;-webkit-border-bottom-right-radius:3px;-moz-border-bottom-right-radius:3px;border-bottom-right-radius:3px;border:1px solid #bbb}.astra-field-image .astra-select-image:hover{background:rgba(255,255,255,.75)}.astra-field-image-preview img{border-width:1px 0 1px 1px;border-color:#bbb;border-style:solid;line-height:0;-webkit-box-shadow:0 1px 1px #fff;box-shadow:0 1px 1px #fff;width:25px;height:25px;padding:5.5px;-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,.2);box-shadow:inset 0 1px 3px rgba(0,0,0,.2)}.astra-field-image-preview{background:#f9f9f9;background:-webkit-gradient(linear,left bottom,left top,color-stop(0,#f2f2f2),color-stop(1,#f9f9f9));background:-o-linear-gradient(#f9f9f9,#f2f2f2);-webkit-box-shadow:0 1px 2px rgba(0,0,0,.1);box-shadow:0 1px 2px rgba(0,0,0,.1);-webkit-border-top-left-radius:3px;-moz-border-top-left-radius:3px;border-top-left-radius:3px;-webkit-border-bottom-left-radius:3px;-moz-border-bottom-left-radius:3px;border-bottom-left-radius:3px;line-height:10px}.astra-field-image img{max-width:100%}.astra-field-image-title{margin-bottom:1em}.astra-icons-list-wrap{display:none}.astra-selected-icon{display:inline-block;margin-right:.5em}.astra-icons-list-wrap .search-icon{width:100%;margin-bottom:1em}.astra-widget-icons-list .astra-widget-icon{display:inline-block;float:left;cursor:pointer;height:1em;padding:1em;width:27px;line-height:1em;font-size:1em;border:1px solid #f1f1f1;margin:0;text-align:center}.astra-widget-icons-list{display:inline-block;margin:1em 0 0 0;padding:0}.astra-widget-icon-selector{margin:1em 0}.astra-widget-field{margin:1em 0}.astra-widget-field label{margin-bottom:.5em;display:block}.astra-widget-field-checkbox label{display:inline-block}.astra-widget-field-heading label{font-weight:700}.astra-widget-field-color .wp-color-result{margin-bottom:0!important}
|
assets/css/minified/font-style.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
[class*=" astra-icon-"],[class^=astra-icon-]{font-family:Astra!important;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.astra-icon-google-plus:before{content:"\e908"}.astra-icon-google:before{content:"\e909"}.astra-icon-twitter-square:before{content:"\e90a"}.astra-icon-twitter:before{content:"\e90b"}.astra-icon-facebook-square:before{content:"\e90c"}.astra-icon-facebook:before{content:"\e90d"}.astra-icon-facebook-f:before{content:"\e90d"}.astra-icon-check-circle:before{content:"\e901"}.astra-icon-shopping-cart:before{content:"\f07a"}.astra-icon-shopping-bag:before{content:"\f290"}.astra-icon-shopping-basket:before{content:"\f291"}.astra-icon-circle-o:before{content:"\e903"}.astra-icon-certificate:before{content:"\e902"}.astra-icon-envelope:before{content:"\e907"}.astra-icon-file:before{content:"\e906"}.astra-icon-phone:before{content:"\e905"}.astra-icon-globe:before{content:"\e904"}.astra-icon-down_arrow:before{content:"\e900"}.astra-icon-close:before{content:"\e5cd"}.astra-icon-drag_handle:before{content:"\e25d"}.astra-icon-format_align_justify:before{content:"\e235"}.astra-icon-menu:before{content:"\e5d2"}.astra-icon-reorder:before{content:"\e8fe"}.astra-icon-search:before{content:"\e8b6"}.astra-icon-zoom_in:before{content:"\e56b"}
|
assets/css/minified/style-rtl.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.widget-address-field span{vertical-align:middle;margin-left:5px}.widget-address-inline .widget-address-field{display:inline-block}.astra-widget-address address{margin:0}
|
assets/css/minified/style.min-rtl.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.widget-address-field span{vertical-align:middle;margin-left:5px}.widget-address-inline .widget-address-field{display:inline-block}.astra-widget-address address{margin:0}.astra-repeater-field title{line-height:1.4em}
|
assets/css/minified/style.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.widget-address-field span{vertical-align:middle;margin-right:5px}.widget-address-inline .widget-address-field{display:inline-block}.astra-widget-address address{margin:0}.astra-repeater-field title{line-height:1.4em}
|
assets/css/unminified/astra-widget-list-icons-rtl.css
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#secondary .astra-widget-list-icons ul li {
|
2 |
+
-js-display: flex;
|
3 |
+
display: -webkit-box;
|
4 |
+
display: -webkit-flex;
|
5 |
+
display: -moz-box;
|
6 |
+
display: -ms-flexbox;
|
7 |
+
display: flex;
|
8 |
+
margin-bottom: 1em;
|
9 |
+
line-height: normal;
|
10 |
+
}
|
11 |
+
|
12 |
+
.astra-widget-list-icons ul li img {
|
13 |
+
min-width: 25px;
|
14 |
+
}
|
15 |
+
|
16 |
+
.astra-widget-list-icons ul li .image {
|
17 |
+
max-width: 25px;
|
18 |
+
margin-left: 5px;
|
19 |
+
}
|
20 |
+
|
21 |
+
.astra-widget-list-icons ul li span {
|
22 |
+
margin-left: 5px;
|
23 |
+
vertical-align: middle;
|
24 |
+
}
|
25 |
+
|
26 |
+
.astra-widget-list-icons li {
|
27 |
+
-js-display: flex;
|
28 |
+
display: -webkit-box;
|
29 |
+
display: -webkit-flex;
|
30 |
+
display: -moz-box;
|
31 |
+
display: -ms-flexbox;
|
32 |
+
display: flex;
|
33 |
+
margin-bottom: 1.3em;
|
34 |
+
}
|
35 |
+
.astra-widget-list-icons .icon {
|
36 |
+
display: inline-block;
|
37 |
+
}
|
assets/css/unminified/astra-widget-list-icons.css
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#secondary .astra-widget-list-icons ul li {
|
2 |
+
-js-display: flex;
|
3 |
+
display: -webkit-box;
|
4 |
+
display: -webkit-flex;
|
5 |
+
display: -moz-box;
|
6 |
+
display: -ms-flexbox;
|
7 |
+
display: flex;
|
8 |
+
margin-bottom: 1em;
|
9 |
+
line-height: normal;
|
10 |
+
}
|
11 |
+
|
12 |
+
.astra-widget-list-icons ul li img {
|
13 |
+
min-width: 25px;
|
14 |
+
}
|
15 |
+
|
16 |
+
.astra-widget-list-icons ul li .image {
|
17 |
+
max-width: 25px;
|
18 |
+
margin-right: 5px;
|
19 |
+
}
|
20 |
+
|
21 |
+
.astra-widget-list-icons ul li span {
|
22 |
+
margin-right: 5px;
|
23 |
+
vertical-align: middle;
|
24 |
+
}
|
25 |
+
|
26 |
+
.astra-widget-list-icons li {
|
27 |
+
-js-display: flex;
|
28 |
+
display: -webkit-box;
|
29 |
+
display: -webkit-flex;
|
30 |
+
display: -moz-box;
|
31 |
+
display: -ms-flexbox;
|
32 |
+
display: flex;
|
33 |
+
margin-bottom: 1.3em;
|
34 |
+
}
|
35 |
+
.astra-widget-list-icons .icon {
|
36 |
+
display: inline-block;
|
37 |
+
}
|
assets/css/unminified/astra-widget-social-profiles-admin-rtl.css
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
/*.astra-widget-field-bg-hover-color,
|
2 |
+
.astra-widget-field-bg-color {
|
3 |
+
display: none;
|
4 |
+
}*/
|
assets/css/unminified/astra-widget-social-profiles-admin.css
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
/*.astra-widget-field-bg-hover-color,
|
2 |
+
.astra-widget-field-bg-color {
|
3 |
+
display: none;
|
4 |
+
}*/
|
assets/css/unminified/astra-widget-social-profiles-rtl.css
ADDED
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.astra-widget-social-profiles-inner li > a {
|
2 |
+
-js-display: flex;
|
3 |
+
display: -webkit-box;
|
4 |
+
display: -webkit-flex;
|
5 |
+
display: -moz-box;
|
6 |
+
display: -ms-flexbox;
|
7 |
+
display: flex;
|
8 |
+
margin-bottom: .3em;
|
9 |
+
-webkit-box-align: center;
|
10 |
+
-webkit-align-items: center;
|
11 |
+
-moz-box-align: center;
|
12 |
+
-ms-flex-align: center;
|
13 |
+
align-items: center;
|
14 |
+
}
|
15 |
+
.astra-widget-social-profiles-inner .icon {
|
16 |
+
width: 1em;
|
17 |
+
margin-left: 1em;
|
18 |
+
-webkit-transition: all 0.2s linear;
|
19 |
+
transition: all 0.2s linear;
|
20 |
+
}
|
21 |
+
.astra-widget-social-profiles-inner.inline li .icon {
|
22 |
+
margin-left: .2em;
|
23 |
+
}
|
24 |
+
.astra-widget-social-profiles-inner.circle .icon {
|
25 |
+
margin-left: .5em;
|
26 |
+
}
|
27 |
+
.astra-widget-social-profiles-inner .icon {
|
28 |
+
vertical-align: middle;
|
29 |
+
}
|
30 |
+
.astra-widget-social-profiles-inner .link {
|
31 |
+
margin-left: 0.5em;
|
32 |
+
}
|
33 |
+
/**
|
34 |
+
* Inline
|
35 |
+
*/
|
36 |
+
.astra-widget-social-profiles-inner.inline li {
|
37 |
+
-js-display: inline-flex;
|
38 |
+
display: -webkit-inline-box;
|
39 |
+
display: -webkit-inline-flex;
|
40 |
+
display: -moz-inline-box;
|
41 |
+
display: -ms-inline-flexbox;
|
42 |
+
display: inline-flex;
|
43 |
+
text-align: center;
|
44 |
+
}
|
45 |
+
.astra-widget-social-profiles-inner.circle-outline .icon,
|
46 |
+
.astra-widget-social-profiles-inner.circle .icon {
|
47 |
+
-webkit-border-radius: 50%;
|
48 |
+
border-radius: 50%;
|
49 |
+
}
|
50 |
+
.astra-widget-social-profiles-inner.square-outline li .icon,
|
51 |
+
.astra-widget-social-profiles-inner.circle-outline li .icon {
|
52 |
+
margin-left: .2em;
|
53 |
+
}
|
54 |
+
.astra-widget-social-profiles-inner.square-outline .icon,
|
55 |
+
.astra-widget-social-profiles-inner.circle-outline .icon,
|
56 |
+
.astra-widget-social-profiles-inner.square .icon,
|
57 |
+
.astra-widget-social-profiles-inner.circle .icon {
|
58 |
+
height: 2em;
|
59 |
+
width: 2em;
|
60 |
+
font-size: 1em;
|
61 |
+
text-align: center;
|
62 |
+
vertical-align: middle;
|
63 |
+
}
|
64 |
+
.astra-widget-social-profiles-inner ul li span {
|
65 |
+
font-size: 15px;
|
66 |
+
line-height: 2em;
|
67 |
+
}
|
68 |
+
.astra-widget-social-profiles-inner.circle .icon span,
|
69 |
+
.astra-widget-social-profiles-inner.circle-outline .icon span {
|
70 |
+
line-height: 2em;
|
71 |
+
}
|
assets/css/unminified/astra-widget-social-profiles.css
ADDED
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.astra-widget-social-profiles-inner li > a {
|
2 |
+
-js-display: flex;
|
3 |
+
display: -webkit-box;
|
4 |
+
display: -webkit-flex;
|
5 |
+
display: -moz-box;
|
6 |
+
display: -ms-flexbox;
|
7 |
+
display: flex;
|
8 |
+
margin-bottom: .3em;
|
9 |
+
-webkit-box-align: center;
|
10 |
+
-webkit-align-items: center;
|
11 |
+
-moz-box-align: center;
|
12 |
+
-ms-flex-align: center;
|
13 |
+
align-items: center;
|
14 |
+
}
|
15 |
+
.astra-widget-social-profiles-inner .icon {
|
16 |
+
width: 1em;
|
17 |
+
margin-right: 1em;
|
18 |
+
-webkit-transition: all 0.2s linear;
|
19 |
+
transition: all 0.2s linear;
|
20 |
+
}
|
21 |
+
.astra-widget-social-profiles-inner.inline li .icon {
|
22 |
+
margin-right: .2em;
|
23 |
+
}
|
24 |
+
.astra-widget-social-profiles-inner.circle .icon {
|
25 |
+
margin-right: .5em;
|
26 |
+
}
|
27 |
+
.astra-widget-social-profiles-inner .icon {
|
28 |
+
vertical-align: middle;
|
29 |
+
}
|
30 |
+
.astra-widget-social-profiles-inner .link {
|
31 |
+
margin-right: 0.5em;
|
32 |
+
}
|
33 |
+
/**
|
34 |
+
* Inline
|
35 |
+
*/
|
36 |
+
.astra-widget-social-profiles-inner.inline li {
|
37 |
+
-js-display: inline-flex;
|
38 |
+
display: -webkit-inline-box;
|
39 |
+
display: -webkit-inline-flex;
|
40 |
+
display: -moz-inline-box;
|
41 |
+
display: -ms-inline-flexbox;
|
42 |
+
display: inline-flex;
|
43 |
+
text-align: center;
|
44 |
+
}
|
45 |
+
.astra-widget-social-profiles-inner.circle-outline .icon,
|
46 |
+
.astra-widget-social-profiles-inner.circle .icon {
|
47 |
+
-webkit-border-radius: 50%;
|
48 |
+
border-radius: 50%;
|
49 |
+
}
|
50 |
+
.astra-widget-social-profiles-inner.square-outline li .icon,
|
51 |
+
.astra-widget-social-profiles-inner.circle-outline li .icon {
|
52 |
+
margin-right: .2em;
|
53 |
+
}
|
54 |
+
.astra-widget-social-profiles-inner.square-outline .icon,
|
55 |
+
.astra-widget-social-profiles-inner.circle-outline .icon,
|
56 |
+
.astra-widget-social-profiles-inner.square .icon,
|
57 |
+
.astra-widget-social-profiles-inner.circle .icon {
|
58 |
+
height: 2em;
|
59 |
+
width: 2em;
|
60 |
+
font-size: 1em;
|
61 |
+
text-align: center;
|
62 |
+
vertical-align: middle;
|
63 |
+
}
|
64 |
+
.astra-widget-social-profiles-inner ul li span {
|
65 |
+
font-size: 15px;
|
66 |
+
line-height: 2em;
|
67 |
+
}
|
68 |
+
.astra-widget-social-profiles-inner.circle .icon span,
|
69 |
+
.astra-widget-social-profiles-inner.circle-outline .icon span {
|
70 |
+
line-height: 2em;
|
71 |
+
}
|
assets/css/unminified/astra-widgets-admin-rtl.css
ADDED
@@ -0,0 +1,242 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Field - Image Selector
|
3 |
+
*/
|
4 |
+
.wp-core-ui .next-field-image .next-select-image {
|
5 |
+
padding: 4px 0;
|
6 |
+
width: 100%;
|
7 |
+
text-align: center;
|
8 |
+
height: auto;
|
9 |
+
}
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Repeater
|
13 |
+
*/
|
14 |
+
.astra-repeater-field {
|
15 |
+
cursor: move;
|
16 |
+
border-bottom: 1px solid #EEEEEE;
|
17 |
+
}
|
18 |
+
.astra-repeater-field:last-child {
|
19 |
+
border-bottom: none;
|
20 |
+
}
|
21 |
+
.astra-repeater-field .dashicons {
|
22 |
+
font-size: 1rem;
|
23 |
+
height: 1rem;
|
24 |
+
width: 1rem;
|
25 |
+
color: #c1c1c1;
|
26 |
+
}
|
27 |
+
.astra-repeater-field .dashicons-admin-page.clone {
|
28 |
+
margin-left: .3em;
|
29 |
+
}
|
30 |
+
.astra-repeater-container {
|
31 |
+
margin-bottom: 1em;
|
32 |
+
}
|
33 |
+
.astra-repeater-field label {
|
34 |
+
margin-bottom: .5em;
|
35 |
+
display: inline-block;
|
36 |
+
}
|
37 |
+
.astra-repeater .markukp p {
|
38 |
+
margin: 1em 0;
|
39 |
+
}
|
40 |
+
.astra-repeater .add-new {
|
41 |
+
margin-bottom: 1em;
|
42 |
+
}
|
43 |
+
/*.astra-repeater-field {
|
44 |
+
background: #f6f6f6;
|
45 |
+
}
|
46 |
+
.astra-repeater-field .markukp {
|
47 |
+
padding: 0 1em .5em 1em;
|
48 |
+
}
|
49 |
+
*/
|
50 |
+
|
51 |
+
.astra-repeater-field .remove,
|
52 |
+
.astra-repeater-field .clone {
|
53 |
+
cursor: pointer;
|
54 |
+
}
|
55 |
+
.astra-repeater-field .actions {
|
56 |
+
padding: 10px;
|
57 |
+
background: #F6F6F6;
|
58 |
+
text-align: left;
|
59 |
+
}
|
60 |
+
.astra-repeater-field .markukp {
|
61 |
+
display: none;
|
62 |
+
}
|
63 |
+
.astra-repeater-field .actions .dashicons-move,
|
64 |
+
.astra-repeater-field .actions .title {
|
65 |
+
float: right;
|
66 |
+
}
|
67 |
+
.astra-repeater-field .actions .title {
|
68 |
+
margin-right: .5em;
|
69 |
+
}
|
70 |
+
.astra-repeater-field .index {
|
71 |
+
display: none;
|
72 |
+
}
|
73 |
+
.astra-repeater-field span.title:before {
|
74 |
+
font-size: 0.9em;
|
75 |
+
margin-left: 0.5em
|
76 |
+
}
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Image Field.
|
80 |
+
*/
|
81 |
+
.astra-field-image .astra-remove-image {
|
82 |
+
position: absolute;
|
83 |
+
background: transparent;
|
84 |
+
border: none;
|
85 |
+
-webkit-box-shadow: none;
|
86 |
+
box-shadow: none;
|
87 |
+
color: #ca4a20;
|
88 |
+
top: 0.6em;
|
89 |
+
right: 11em;
|
90 |
+
color: #AAA;
|
91 |
+
font-size: 11px;
|
92 |
+
-webkit-transition: all 0.25s ease;
|
93 |
+
transition: all 0.25s ease;
|
94 |
+
}
|
95 |
+
.astra-field-image .astra-remove-image:hover {
|
96 |
+
outline: none;
|
97 |
+
background: transparent;
|
98 |
+
-webkit-box-shadow: none;
|
99 |
+
box-shadow: none;
|
100 |
+
color: #ca4a20;
|
101 |
+
}
|
102 |
+
.astra-field-image-preview {
|
103 |
+
position: relative;
|
104 |
+
}
|
105 |
+
|
106 |
+
.astra-field-image {
|
107 |
+
-js-display: flex;
|
108 |
+
display: -webkit-box;
|
109 |
+
display: -webkit-flex;
|
110 |
+
display: -moz-box;
|
111 |
+
display: -ms-flexbox;
|
112 |
+
display: flex;
|
113 |
+
}
|
114 |
+
|
115 |
+
.astra-field-image .astra-select-image {
|
116 |
+
display: block;
|
117 |
+
color: #666;
|
118 |
+
text-shadow: 0 1px 0 #FFF;
|
119 |
+
font-weight: 600;
|
120 |
+
font-size: 11px;
|
121 |
+
cursor: pointer;
|
122 |
+
border: 1px solid #bbbbbb;
|
123 |
+
height: 8px;
|
124 |
+
padding: 14px 5px;
|
125 |
+
line-height: 8px;
|
126 |
+
background: #f9f9f9;
|
127 |
+
background: -webkit-gradient(linear, right bottom, right top, color-stop(0, #f2f2f2), color-stop(1, #f9f9f9));
|
128 |
+
background: -o-linear-gradient(#f9f9f9, #f2f2f2);
|
129 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f9f9f9', endColorstr='#f2f2f2', GradientType=0);
|
130 |
+
-webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.1);
|
131 |
+
box-shadow: 0 1px 2px rgba(0,0,0,0.1);
|
132 |
+
-webkit-border-top-left-radius: 3px;
|
133 |
+
-moz-border-top-left-radius: 3px;
|
134 |
+
border-top-left-radius: 3px;
|
135 |
+
-webkit-border-bottom-left-radius: 3px;
|
136 |
+
-moz-border-bottom-left-radius: 3px;
|
137 |
+
border-bottom-left-radius: 3px;
|
138 |
+
border: 1px solid #bbbbbb;
|
139 |
+
}
|
140 |
+
.astra-field-image .astra-select-image:hover {
|
141 |
+
background: rgba(255, 255, 255, 0.75);
|
142 |
+
}
|
143 |
+
.astra-field-image-preview img {
|
144 |
+
border-width: 1px 1px 1px 0px;
|
145 |
+
border-color: #bbbbbb;
|
146 |
+
border-style: solid;
|
147 |
+
line-height: 0;
|
148 |
+
-webkit-box-shadow: 0px 1px 1px #FFF;
|
149 |
+
box-shadow: 0px 1px 1px #FFF;
|
150 |
+
width: 25px;
|
151 |
+
height: 25px;
|
152 |
+
padding: 5.5px;
|
153 |
+
-webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
|
154 |
+
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
|
155 |
+
}
|
156 |
+
|
157 |
+
.astra-field-image-preview {
|
158 |
+
background: #f9f9f9;
|
159 |
+
background: -webkit-gradient(linear, right bottom, right top, color-stop(0, #f2f2f2), color-stop(1, #f9f9f9));
|
160 |
+
background: -o-linear-gradient(#f9f9f9, #f2f2f2);
|
161 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f9f9f9', endColorstr='#f2f2f2', GradientType=0);
|
162 |
+
-webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.1);
|
163 |
+
box-shadow: 0 1px 2px rgba(0,0,0,0.1);
|
164 |
+
-webkit-border-top-right-radius: 3px;
|
165 |
+
-moz-border-top-right-radius: 3px;
|
166 |
+
border-top-right-radius: 3px;
|
167 |
+
-webkit-border-bottom-right-radius: 3px;
|
168 |
+
-moz-border-bottom-right-radius: 3px;
|
169 |
+
border-bottom-right-radius: 3px;
|
170 |
+
line-height: 10px;
|
171 |
+
}
|
172 |
+
|
173 |
+
.astra-field-image img {
|
174 |
+
max-width: 100%;
|
175 |
+
}
|
176 |
+
|
177 |
+
.astra-field-image-title{
|
178 |
+
margin-bottom:1em;
|
179 |
+
}
|
180 |
+
|
181 |
+
/**
|
182 |
+
* Icon Selector
|
183 |
+
*/
|
184 |
+
.astra-icons-list-wrap {
|
185 |
+
display: none;
|
186 |
+
}
|
187 |
+
.astra-selected-icon {
|
188 |
+
display: inline-block;
|
189 |
+
margin-left: .5em;
|
190 |
+
}
|
191 |
+
.astra-icons-list-wrap .search-icon {
|
192 |
+
width: 100%;
|
193 |
+
margin-bottom: 1em;
|
194 |
+
}
|
195 |
+
.astra-widget-icons-list .astra-widget-icon {
|
196 |
+
display: inline-block;
|
197 |
+
float: right;
|
198 |
+
cursor: pointer;
|
199 |
+
height: 1em;
|
200 |
+
padding: 1em;
|
201 |
+
width: 27px;
|
202 |
+
line-height: 1em;
|
203 |
+
font-size: 1em;
|
204 |
+
border: 1px solid #f1f1f1;
|
205 |
+
margin: 0;
|
206 |
+
text-align: center;
|
207 |
+
}
|
208 |
+
.astra-widget-icons-list {
|
209 |
+
display: inline-block;
|
210 |
+
margin: 1em 0 0 0;
|
211 |
+
padding: 0;
|
212 |
+
}
|
213 |
+
.astra-widget-icon-selector {
|
214 |
+
margin: 1em 0;
|
215 |
+
}
|
216 |
+
/*.astra-widget-icon-selector-actions {
|
217 |
+
margin: 1em 0;
|
218 |
+
}*/
|
219 |
+
|
220 |
+
/**
|
221 |
+
* Widget Fields
|
222 |
+
*/
|
223 |
+
.astra-widget-field {
|
224 |
+
margin: 1em 0;
|
225 |
+
}
|
226 |
+
.astra-widget-field label {
|
227 |
+
margin-bottom: .5em;
|
228 |
+
display: block;
|
229 |
+
}
|
230 |
+
.astra-widget-field-checkbox label {
|
231 |
+
display: inline-block;
|
232 |
+
}
|
233 |
+
.astra-widget-field-heading label {
|
234 |
+
font-weight: bold;
|
235 |
+
}
|
236 |
+
|
237 |
+
/**
|
238 |
+
* Field - Color Picker
|
239 |
+
*/
|
240 |
+
.astra-widget-field-color .wp-color-result {
|
241 |
+
margin-bottom: 0 !important;
|
242 |
+
}
|
assets/css/unminified/astra-widgets-admin.css
ADDED
@@ -0,0 +1,242 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Field - Image Selector
|
3 |
+
*/
|
4 |
+
.wp-core-ui .next-field-image .next-select-image {
|
5 |
+
padding: 4px 0;
|
6 |
+
width: 100%;
|
7 |
+
text-align: center;
|
8 |
+
height: auto;
|
9 |
+
}
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Repeater
|
13 |
+
*/
|
14 |
+
.astra-repeater-field {
|
15 |
+
cursor: move;
|
16 |
+
border-bottom: 1px solid #EEEEEE;
|
17 |
+
}
|
18 |
+
.astra-repeater-field:last-child {
|
19 |
+
border-bottom: none;
|
20 |
+
}
|
21 |
+
.astra-repeater-field .dashicons {
|
22 |
+
font-size: 1rem;
|
23 |
+
height: 1rem;
|
24 |
+
width: 1rem;
|
25 |
+
color: #c1c1c1;
|
26 |
+
}
|
27 |
+
.astra-repeater-field .dashicons-admin-page.clone {
|
28 |
+
margin-right: .3em;
|
29 |
+
}
|
30 |
+
.astra-repeater-container {
|
31 |
+
margin-bottom: 1em;
|
32 |
+
}
|
33 |
+
.astra-repeater-field label {
|
34 |
+
margin-bottom: .5em;
|
35 |
+
display: inline-block;
|
36 |
+
}
|
37 |
+
.astra-repeater .markukp p {
|
38 |
+
margin: 1em 0;
|
39 |
+
}
|
40 |
+
.astra-repeater .add-new {
|
41 |
+
margin-bottom: 1em;
|
42 |
+
}
|
43 |
+
/*.astra-repeater-field {
|
44 |
+
background: #f6f6f6;
|
45 |
+
}
|
46 |
+
.astra-repeater-field .markukp {
|
47 |
+
padding: 0 1em .5em 1em;
|
48 |
+
}
|
49 |
+
*/
|
50 |
+
|
51 |
+
.astra-repeater-field .remove,
|
52 |
+
.astra-repeater-field .clone {
|
53 |
+
cursor: pointer;
|
54 |
+
}
|
55 |
+
.astra-repeater-field .actions {
|
56 |
+
padding: 10px;
|
57 |
+
background: #F6F6F6;
|
58 |
+
text-align: right;
|
59 |
+
}
|
60 |
+
.astra-repeater-field .markukp {
|
61 |
+
display: none;
|
62 |
+
}
|
63 |
+
.astra-repeater-field .actions .dashicons-move,
|
64 |
+
.astra-repeater-field .actions .title {
|
65 |
+
float: left;
|
66 |
+
}
|
67 |
+
.astra-repeater-field .actions .title {
|
68 |
+
margin-left: .5em;
|
69 |
+
}
|
70 |
+
.astra-repeater-field .index {
|
71 |
+
display: none;
|
72 |
+
}
|
73 |
+
.astra-repeater-field span.title:before {
|
74 |
+
font-size: 0.9em;
|
75 |
+
margin-right: 0.5em
|
76 |
+
}
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Image Field.
|
80 |
+
*/
|
81 |
+
.astra-field-image .astra-remove-image {
|
82 |
+
position: absolute;
|
83 |
+
background: transparent;
|
84 |
+
border: none;
|
85 |
+
-webkit-box-shadow: none;
|
86 |
+
box-shadow: none;
|
87 |
+
color: #ca4a20;
|
88 |
+
top: 0.6em;
|
89 |
+
left: 11em;
|
90 |
+
color: #AAA;
|
91 |
+
font-size: 11px;
|
92 |
+
-webkit-transition: all 0.25s ease;
|
93 |
+
transition: all 0.25s ease;
|
94 |
+
}
|
95 |
+
.astra-field-image .astra-remove-image:hover {
|
96 |
+
outline: none;
|
97 |
+
background: transparent;
|
98 |
+
-webkit-box-shadow: none;
|
99 |
+
box-shadow: none;
|
100 |
+
color: #ca4a20;
|
101 |
+
}
|
102 |
+
.astra-field-image-preview {
|
103 |
+
position: relative;
|
104 |
+
}
|
105 |
+
|
106 |
+
.astra-field-image {
|
107 |
+
-js-display: flex;
|
108 |
+
display: -webkit-box;
|
109 |
+
display: -webkit-flex;
|
110 |
+
display: -moz-box;
|
111 |
+
display: -ms-flexbox;
|
112 |
+
display: flex;
|
113 |
+
}
|
114 |
+
|
115 |
+
.astra-field-image .astra-select-image {
|
116 |
+
display: block;
|
117 |
+
color: #666;
|
118 |
+
text-shadow: 0 1px 0 #FFF;
|
119 |
+
font-weight: 600;
|
120 |
+
font-size: 11px;
|
121 |
+
cursor: pointer;
|
122 |
+
border: 1px solid #bbbbbb;
|
123 |
+
height: 8px;
|
124 |
+
padding: 14px 5px;
|
125 |
+
line-height: 8px;
|
126 |
+
background: #f9f9f9;
|
127 |
+
background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #f2f2f2), color-stop(1, #f9f9f9));
|
128 |
+
background: -o-linear-gradient(#f9f9f9, #f2f2f2);
|
129 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f9f9f9', endColorstr='#f2f2f2', GradientType=0);
|
130 |
+
-webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.1);
|
131 |
+
box-shadow: 0 1px 2px rgba(0,0,0,0.1);
|
132 |
+
-webkit-border-top-right-radius: 3px;
|
133 |
+
-moz-border-top-right-radius: 3px;
|
134 |
+
border-top-right-radius: 3px;
|
135 |
+
-webkit-border-bottom-right-radius: 3px;
|
136 |
+
-moz-border-bottom-right-radius: 3px;
|
137 |
+
border-bottom-right-radius: 3px;
|
138 |
+
border: 1px solid #bbbbbb;
|
139 |
+
}
|
140 |
+
.astra-field-image .astra-select-image:hover {
|
141 |
+
background: rgba(255, 255, 255, 0.75);
|
142 |
+
}
|
143 |
+
.astra-field-image-preview img {
|
144 |
+
border-width: 1px 0px 1px 1px;
|
145 |
+
border-color: #bbbbbb;
|
146 |
+
border-style: solid;
|
147 |
+
line-height: 0;
|
148 |
+
-webkit-box-shadow: 0px 1px 1px #FFF;
|
149 |
+
box-shadow: 0px 1px 1px #FFF;
|
150 |
+
width: 25px;
|
151 |
+
height: 25px;
|
152 |
+
padding: 5.5px;
|
153 |
+
-webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
|
154 |
+
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
|
155 |
+
}
|
156 |
+
|
157 |
+
.astra-field-image-preview {
|
158 |
+
background: #f9f9f9;
|
159 |
+
background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #f2f2f2), color-stop(1, #f9f9f9));
|
160 |
+
background: -o-linear-gradient(#f9f9f9, #f2f2f2);
|
161 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f9f9f9', endColorstr='#f2f2f2', GradientType=0);
|
162 |
+
-webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.1);
|
163 |
+
box-shadow: 0 1px 2px rgba(0,0,0,0.1);
|
164 |
+
-webkit-border-top-left-radius: 3px;
|
165 |
+
-moz-border-top-left-radius: 3px;
|
166 |
+
border-top-left-radius: 3px;
|
167 |
+
-webkit-border-bottom-left-radius: 3px;
|
168 |
+
-moz-border-bottom-left-radius: 3px;
|
169 |
+
border-bottom-left-radius: 3px;
|
170 |
+
line-height: 10px;
|
171 |
+
}
|
172 |
+
|
173 |
+
.astra-field-image img {
|
174 |
+
max-width: 100%;
|
175 |
+
}
|
176 |
+
|
177 |
+
.astra-field-image-title{
|
178 |
+
margin-bottom:1em;
|
179 |
+
}
|
180 |
+
|
181 |
+
/**
|
182 |
+
* Icon Selector
|
183 |
+
*/
|
184 |
+
.astra-icons-list-wrap {
|
185 |
+
display: none;
|
186 |
+
}
|
187 |
+
.astra-selected-icon {
|
188 |
+
display: inline-block;
|
189 |
+
margin-right: .5em;
|
190 |
+
}
|
191 |
+
.astra-icons-list-wrap .search-icon {
|
192 |
+
width: 100%;
|
193 |
+
margin-bottom: 1em;
|
194 |
+
}
|
195 |
+
.astra-widget-icons-list .astra-widget-icon {
|
196 |
+
display: inline-block;
|
197 |
+
float: left;
|
198 |
+
cursor: pointer;
|
199 |
+
height: 1em;
|
200 |
+
padding: 1em;
|
201 |
+
width: 27px;
|
202 |
+
line-height: 1em;
|
203 |
+
font-size: 1em;
|
204 |
+
border: 1px solid #f1f1f1;
|
205 |
+
margin: 0;
|
206 |
+
text-align: center;
|
207 |
+
}
|
208 |
+
.astra-widget-icons-list {
|
209 |
+
display: inline-block;
|
210 |
+
margin: 1em 0 0 0;
|
211 |
+
padding: 0;
|
212 |
+
}
|
213 |
+
.astra-widget-icon-selector {
|
214 |
+
margin: 1em 0;
|
215 |
+
}
|
216 |
+
/*.astra-widget-icon-selector-actions {
|
217 |
+
margin: 1em 0;
|
218 |
+
}*/
|
219 |
+
|
220 |
+
/**
|
221 |
+
* Widget Fields
|
222 |
+
*/
|
223 |
+
.astra-widget-field {
|
224 |
+
margin: 1em 0;
|
225 |
+
}
|
226 |
+
.astra-widget-field label {
|
227 |
+
margin-bottom: .5em;
|
228 |
+
display: block;
|
229 |
+
}
|
230 |
+
.astra-widget-field-checkbox label {
|
231 |
+
display: inline-block;
|
232 |
+
}
|
233 |
+
.astra-widget-field-heading label {
|
234 |
+
font-weight: bold;
|
235 |
+
}
|
236 |
+
|
237 |
+
/**
|
238 |
+
* Field - Color Picker
|
239 |
+
*/
|
240 |
+
.astra-widget-field-color .wp-color-result {
|
241 |
+
margin-bottom: 0 !important;
|
242 |
+
}
|
assets/css/unminified/font-style-rtl.css
ADDED
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
[class^="astra-icon-"], [class*=" astra-icon-"] {
|
2 |
+
/* use !important to prevent issues with browser extensions that change fonts */
|
3 |
+
font-family: 'Astra' !important;
|
4 |
+
speak: none;
|
5 |
+
font-style: normal;
|
6 |
+
font-weight: normal;
|
7 |
+
font-variant: normal;
|
8 |
+
text-transform: none;
|
9 |
+
line-height: 1;
|
10 |
+
|
11 |
+
/* Better Font Rendering =========== */
|
12 |
+
-webkit-font-smoothing: antialiased;
|
13 |
+
-moz-osx-font-smoothing: grayscale;
|
14 |
+
}
|
15 |
+
|
16 |
+
.astra-icon-google-plus:before {
|
17 |
+
content: "\e908";
|
18 |
+
}
|
19 |
+
.astra-icon-google:before {
|
20 |
+
content: "\e909";
|
21 |
+
}
|
22 |
+
.astra-icon-twitter-square:before {
|
23 |
+
content: "\e90a";
|
24 |
+
}
|
25 |
+
.astra-icon-twitter:before {
|
26 |
+
content: "\e90b";
|
27 |
+
}
|
28 |
+
.astra-icon-facebook-square:before {
|
29 |
+
content: "\e90c";
|
30 |
+
}
|
31 |
+
.astra-icon-facebook:before {
|
32 |
+
content: "\e90d";
|
33 |
+
}
|
34 |
+
.astra-icon-facebook-f:before {
|
35 |
+
content: "\e90d";
|
36 |
+
}
|
37 |
+
.astra-icon-check-circle:before {
|
38 |
+
content: "\e901";
|
39 |
+
}
|
40 |
+
.astra-icon-shopping-cart:before {
|
41 |
+
content: "\f07a";
|
42 |
+
}
|
43 |
+
.astra-icon-shopping-bag:before {
|
44 |
+
content: "\f290";
|
45 |
+
}
|
46 |
+
.astra-icon-shopping-basket:before {
|
47 |
+
content: "\f291";
|
48 |
+
}
|
49 |
+
.astra-icon-circle-o:before {
|
50 |
+
content: "\e903";
|
51 |
+
}
|
52 |
+
.astra-icon-certificate:before {
|
53 |
+
content: "\e902";
|
54 |
+
}
|
55 |
+
.astra-icon-envelope:before {
|
56 |
+
content: "\e907";
|
57 |
+
}
|
58 |
+
.astra-icon-file:before {
|
59 |
+
content: "\e906";
|
60 |
+
}
|
61 |
+
.astra-icon-phone:before {
|
62 |
+
content: "\e905";
|
63 |
+
}
|
64 |
+
.astra-icon-globe:before {
|
65 |
+
content: "\e904";
|
66 |
+
}
|
67 |
+
.astra-icon-down_arrow:before {
|
68 |
+
content: "\e900";
|
69 |
+
}
|
70 |
+
.astra-icon-close:before {
|
71 |
+
content: "\e5cd";
|
72 |
+
}
|
73 |
+
.astra-icon-drag_handle:before {
|
74 |
+
content: "\e25d";
|
75 |
+
}
|
76 |
+
.astra-icon-format_align_justify:before {
|
77 |
+
content: "\e235";
|
78 |
+
}
|
79 |
+
.astra-icon-menu:before {
|
80 |
+
content: "\e5d2";
|
81 |
+
}
|
82 |
+
.astra-icon-reorder:before {
|
83 |
+
content: "\e8fe";
|
84 |
+
}
|
85 |
+
.astra-icon-search:before {
|
86 |
+
content: "\e8b6";
|
87 |
+
}
|
88 |
+
.astra-icon-zoom_in:before {
|
89 |
+
content: "\e56b";
|
90 |
+
}
|
assets/css/unminified/font-style.css
ADDED
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
[class^="astra-icon-"], [class*=" astra-icon-"] {
|
2 |
+
/* use !important to prevent issues with browser extensions that change fonts */
|
3 |
+
font-family: 'Astra' !important;
|
4 |
+
speak: none;
|
5 |
+
font-style: normal;
|
6 |
+
font-weight: normal;
|
7 |
+
font-variant: normal;
|
8 |
+
text-transform: none;
|
9 |
+
line-height: 1;
|
10 |
+
|
11 |
+
/* Better Font Rendering =========== */
|
12 |
+
-webkit-font-smoothing: antialiased;
|
13 |
+
-moz-osx-font-smoothing: grayscale;
|
14 |
+
}
|
15 |
+
|
16 |
+
.astra-icon-google-plus:before {
|
17 |
+
content: "\e908";
|
18 |
+
}
|
19 |
+
.astra-icon-google:before {
|
20 |
+
content: "\e909";
|
21 |
+
}
|
22 |
+
.astra-icon-twitter-square:before {
|
23 |
+
content: "\e90a";
|
24 |
+
}
|
25 |
+
.astra-icon-twitter:before {
|
26 |
+
content: "\e90b";
|
27 |
+
}
|
28 |
+
.astra-icon-facebook-square:before {
|
29 |
+
content: "\e90c";
|
30 |
+
}
|
31 |
+
.astra-icon-facebook:before {
|
32 |
+
content: "\e90d";
|
33 |
+
}
|
34 |
+
.astra-icon-facebook-f:before {
|
35 |
+
content: "\e90d";
|
36 |
+
}
|
37 |
+
.astra-icon-check-circle:before {
|
38 |
+
content: "\e901";
|
39 |
+
}
|
40 |
+
.astra-icon-shopping-cart:before {
|
41 |
+
content: "\f07a";
|
42 |
+
}
|
43 |
+
.astra-icon-shopping-bag:before {
|
44 |
+
content: "\f290";
|
45 |
+
}
|
46 |
+
.astra-icon-shopping-basket:before {
|
47 |
+
content: "\f291";
|
48 |
+
}
|
49 |
+
.astra-icon-circle-o:before {
|
50 |
+
content: "\e903";
|
51 |
+
}
|
52 |
+
.astra-icon-certificate:before {
|
53 |
+
content: "\e902";
|
54 |
+
}
|
55 |
+
.astra-icon-envelope:before {
|
56 |
+
content: "\e907";
|
57 |
+
}
|
58 |
+
.astra-icon-file:before {
|
59 |
+
content: "\e906";
|
60 |
+
}
|
61 |
+
.astra-icon-phone:before {
|
62 |
+
content: "\e905";
|
63 |
+
}
|
64 |
+
.astra-icon-globe:before {
|
65 |
+
content: "\e904";
|
66 |
+
}
|
67 |
+
.astra-icon-down_arrow:before {
|
68 |
+
content: "\e900";
|
69 |
+
}
|
70 |
+
.astra-icon-close:before {
|
71 |
+
content: "\e5cd";
|
72 |
+
}
|
73 |
+
.astra-icon-drag_handle:before {
|
74 |
+
content: "\e25d";
|
75 |
+
}
|
76 |
+
.astra-icon-format_align_justify:before {
|
77 |
+
content: "\e235";
|
78 |
+
}
|
79 |
+
.astra-icon-menu:before {
|
80 |
+
content: "\e5d2";
|
81 |
+
}
|
82 |
+
.astra-icon-reorder:before {
|
83 |
+
content: "\e8fe";
|
84 |
+
}
|
85 |
+
.astra-icon-search:before {
|
86 |
+
content: "\e8b6";
|
87 |
+
}
|
88 |
+
.astra-icon-zoom_in:before {
|
89 |
+
content: "\e56b";
|
90 |
+
}
|
assets/css/unminified/style-rtl.css
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.widget-address-field span {
|
2 |
+
vertical-align: middle;
|
3 |
+
margin-left: 5px;
|
4 |
+
}
|
5 |
+
|
6 |
+
.widget-address-inline .widget-address-field {
|
7 |
+
display: inline-block;
|
8 |
+
}
|
9 |
+
|
10 |
+
.astra-widget-address address {
|
11 |
+
margin: 0;
|
12 |
+
}
|
13 |
+
.astra-repeater-field title {
|
14 |
+
line-height: 1.4em;
|
15 |
+
}
|
assets/css/unminified/style.css
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.widget-address-field span {
|
2 |
+
vertical-align: middle;
|
3 |
+
margin-right: 5px;
|
4 |
+
}
|
5 |
+
|
6 |
+
.widget-address-inline .widget-address-field {
|
7 |
+
display: inline-block;
|
8 |
+
}
|
9 |
+
|
10 |
+
.astra-widget-address address {
|
11 |
+
margin: 0;
|
12 |
+
}
|
13 |
+
.astra-repeater-field title {
|
14 |
+
line-height: 1.4em;
|
15 |
+
}
|
assets/js/minified/astra-widget-list-icons.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(s){AstraWidgetListIcons={init:function(){this._init_toggle_settings(),this._bind()},_bind:function(){s(document).on("widget-updated widget-added",AstraWidgets._init_toggle_settings),s(document).on("change",".astra-widget-list-icons-fields .astra-widget-field-imageoricon",AstraWidgetListIcons._toggle_settings)},_init_toggle_settings:function(){s(".astra-widget-list-icons-fields").each(function(i,t){var e=s(t);"image"===(e.find(".astra-widget-field-imageoricon").find("option:selected").val()||"")?(e.find(".astra-field-image-wrapper").show(),e.find(".astra-widget-icon-selector").hide()):(e.find(".astra-widget-icon-selector").show(),e.find(".astra-field-image-wrapper").hide())})},_toggle_settings:function(){var i=s(this).find("option:selected").val()||"",t=s(this).closest(".astra-widget-list-icons-fields");"image"===i?(t.find(".astra-field-image-wrapper").show(),t.find(".astra-widget-icon-selector").hide()):(t.find(".astra-widget-icon-selector").show(),t.find(".astra-field-image-wrapper").hide())}},s(function(){AstraWidgetListIcons.init()})}(jQuery);
|
assets/js/minified/astra-widget-social-profiles.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(t){AstraWidgetSocialProfiles={init:function(){this._init_toggle_settings(),this._bind()},_bind:function(){t(document).on("widget-updated widget-added",AstraWidgets._init_toggle_settings),t(document).on("change",".astra-widget-social-profiles-fields .astra-widget-field-icon-style",AstraWidgetSocialProfiles._toggle_settings),t(document).on("change",".astra-widget-social-profiles-fields .astra-widget-field-color-type",AstraWidgetSocialProfiles._toggle_settings)},_init_toggle_settings:function(){t(".astra-widget-social-profiles-fields").each(function(i,e){var o=t(e),d=o.find(".astra-widget-field-icon-style").find("option:selected").val()||"";"official-color"===(o.find(".astra-widget-field-color-type").find("option:selected").val()||"")?(o.find(".astra-widget-field-icon-color").hide(),o.find(".astra-widget-field-icon-hover-color").hide(),o.find(".astra-widget-field-bg-hover-color").hide(),o.find(".astra-widget-field-bg-color").hide()):(o.find(".astra-widget-field-icon-color").show(),o.find(".astra-widget-field-icon-hover-color").show(),o.find(".astra-widget-field-bg-hover-color").show(),o.find(".astra-widget-field-bg-color").show(),"simple"===d?(o.find(".astra-widget-field-bg-hover-color").hide(),o.find(".astra-widget-field-bg-color").hide()):(o.find(".astra-widget-field-bg-hover-color").show(),o.find(".astra-widget-field-bg-color").show()))})},_toggle_settings:function(){var i=t(this).find("option:selected").val()||"",e=t(this).closest(".astra-widget-social-profiles-fields");"official-color"===(e.find(".astra-widget-field-color-type").find("option:selected").val()||"")?(e.find(".astra-widget-field-icon-color").hide(),e.find(".astra-widget-field-icon-hover-color").hide(),e.find(".astra-widget-field-bg-hover-color").hide(),e.find(".astra-widget-field-bg-color").hide()):(e.find(".astra-widget-field-icon-color").show(),e.find(".astra-widget-field-icon-hover-color").show(),e.find(".astra-widget-field-bg-hover-color").show(),e.find(".astra-widget-field-bg-color").show(),"simple"===i?(e.find(".astra-widget-field-bg-hover-color").hide(),e.find(".astra-widget-field-bg-color").hide()):(e.find(".astra-widget-field-bg-hover-color").show(),e.find(".astra-widget-field-bg-color").show()))}},t(function(){AstraWidgetSocialProfiles.init()})}(jQuery);
|
assets/js/minified/astra-widgets-backend.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(d){AstraWidgets={init:function(){this._init_colorpicker(),this._init_repeater(),this._bind()},_init_colorpicker:function(){d(".astra-widget-field-color input").wpColorPicker({change:function(e,t){}})},_bind:function(){d(document).on("widget-updated widget-added",AstraWidgets._reinit_controls),d(document).on("click",".astra-select-icon",AstraWidgets._icon_selector),d(document).on("click",".astra-widget-icon",AstraWidgets._set_icon),d(document).on("click",".astra-repeater-sortable .clone",AstraWidgets._repeater_clone),d(document).on("click",".astra-repeater-sortable .remove",AstraWidgets._repeater_remove),d(document).on("click",".astra-repeater-field .actions",AstraWidgets._repeater_toggle_open),d(document).on("click",".astra-repeater .add-new-btn",AstraWidgets._add_new),d(document).on("click",".widget-control-save",AstraWidgets._repeater_reinit),d(document).on("click",".astra-repeater-field .astra-select-image",AstraWidgets._repeater_add_image_field),d(document).on("click",".astra-repeater-field .astra-remove-image",AstraWidgets._repeater_remove_image_field),d(document).on("input",'.astra-repeater-field [data-field-id="title"]',AstraWidgets._repeater_set_title)},_reinit_controls:function(){AstraWidgets._init_colorpicker(),AstraWidgets._init_repeater()},_icon_selector:function(e){d(this).parents(".astra-widget-icon-selector").find(".astra-icons-list-wrap").slideToggle()},_set_icon:function(e){var t=d(this).parents(".astra-widget-icon-selector"),a=d(this).attr("data-font")||"",i=t.find(".astra-selected-icon i"),r=t.find(".selected-icon");i.removeClass(),i.addClass(a),"yes"===d(this).closest(".astra-repeater-field").find(".selected-icon").data("icon-visible")&&(d(this).closest(".astra-repeater-field").find(".title").attr("class","title"),d(this).closest(".astra-repeater-field").find(".title").addClass(a)),r.val(a),t.find(".selected-icon").trigger("change")},_repeater_remove_image_field:function(e){if(confirm("Do you want to remove this image?")){var t=d(this).parents(".astra-repeater-field");t.find(".astra-field-image-preview").html(""),t.find(".astra-field-image-preview img").attr("src",""),t.find(".astra-field-image-preview-id").val(""),t.find(".astra-image-url").val(""),t.find(".astra-image-alt").val(""),t.find(".astra-image-title").val(""),t.find(".astra-image-size-select, .astra-image-width").hide()}},_repeater_add_image_field:function(e){var a=d(this).parents(".astra-repeater-field"),i=wp.media({title:"Select or Upload Image",button:{text:"Choose Image"},library:{type:"image"},multiple:!1});return i.on("close",function(){var e=i.state().get("selection").toJSON();if(!d.isEmptyObject(e)){if(e[0].sizes.hasOwnProperty("medium"))var t=e[0].sizes.medium.url;else if(e[0].sizes.hasOwnProperty("thumbnail"))t=e[0].sizes.thumbnail.url;else t=e[0].sizes.full.url;0<a.find(".astra-remove-image").length?a.find(".astra-field-image-preview img").attr("src",t):a.find(".astra-field-image-preview").append('<span class="astra-remove-image button">Remove</span><img src="'+t+'" />'),a.find(".astra-image-url").val(e[0].url),a.find(".astra-image-alt").val(e[0].alt),a.find(".astra-image-title").val(e[0].title),a.find(".astra-field-image-preview-id").val(e[0].id),a.find(".astra-image-size-select, .astra-image-width").show(),a.find("input").trigger("change")}}),i.open(),!1},_get_sub_string:function(e){var t="";if(24<e.length)t="..";return e=e.substring(0,24)+t},_repeater_set_title:function(e){var t=d(this).val()||"";t=AstraWidgets._get_sub_string(t),d(this).closest(".astra-repeater-field").find(".title").text(t)},_repeater_reinit:function(e){d(".astra-repeater-sortable").sortable()},_add_new:function(e){e.preventDefault();var t=d(this).closest(".astra-repeater"),a=d(".astra-repeater-field").length||0,i=t.find(".astra-repeater-fields").html(),r=t.find(".astra-repeater-fields").attr("title")||"",s=(t.find(".astra-repeater-fields").attr("data-id"),'<div class="astra-repeater-field">');s+='\t<div class="actions">',s+='\t<span class="index">'+a+"</span>",s+='\t\t<span class="dashicons dashicons-move"></span>',s+='\t<span class="title">'+r+"</span>",s+='\t\t<span class="dashicons dashicons-admin-page clone"></span>',s+='\t\t<span class="dashicons dashicons-trash remove"></span>',s+="\t</div>",s+='\t<div class="markukp">',s+=i=i.replace("][][","]["+a+"]["),s+="\t</div>",s+="</div>",t.find(".astra-repeater-sortable").append(s),AstraWidgets._set_repeater_names()},_set_repeater_names:function(){d(".astra-repeater").each(function(e,t){var n=d(t).find(".astra-repeater-fields").attr("data-id")||"";d(t).find(".astra-repeater-sortable").find(".astra-repeater-field").each(function(r,s){d(s).find(":input").each(function(e,t){var a=d(t).attr("data-field-id")||"",i=n+"["+r+"]["+a+"]";d(s).find(".index").text(r),d(t).attr("name",i)})})})},_repeater_toggle_open:function(e){e.preventDefault(),(e.target===this||d(e.target).hasClass("title")||d(e.target).hasClass("dashicons-move"))&&d(this).parents(".astra-repeater-field").find(".markukp").slideToggle()},_repeater_clone:function(e){e.preventDefault();var t=d(this),a=t.closest(".astra-repeater");a.find(".astra-repeater-fields").html();d(t).closest(".astra-repeater-field").clone().insertAfter(t.closest(".astra-repeater-field")),d(".astra-repeater-sortable").sortable(),a.find("input").trigger("change"),AstraWidgets._set_repeater_names()},_repeater_remove:function(e){e.preventDefault();var t=d(this),a=t.closest(".astra-repeater"),i=t.parent().find(".title").html(),r="";r=0<i.length?i:"this field",confirm("Are you sure you want to delete "+r+"?")&&t.closest(".astra-repeater-field").remove(),AstraWidgets._set_repeater_names(),a.find("input").trigger("change")},_init_repeater:function(){d(".astra-repeater-sortable").sortable({cursor:"move",stop:function(e,t){AstraWidgets._set_repeater_names(),t.item.find("input").trigger("change")}}),AstraWidgets._set_repeater_names(),d(".astra-repeater-field").length&&d(".astra-repeater-field").each(function(e,t){var a=d(t).find('[data-field-id="title"]').val()||"",i=d(t).find('[data-field-id="icon"]').val()||"";a=AstraWidgets._get_sub_string(a),d(t).find(".title").text(a),"yes"===d(t).find(".selected-icon").data("icon-visible")&&d(t).find(".title").addClass(i)})}},d(function(){AstraWidgets.init()})}(jQuery);
|
assets/js/minified/social-icons-widget.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
$(function(){$(".social-icons-widget-container ul").sortable({cursor:"move"}),$(document).on("click","#social-icons-sortable .dashicons-admin-page",function(i){i.preventDefault();var s=$(this);$(s).closest(".items").clone().insertAfter(s.closest(".items"))}),$(document).on("click","#social-icons-sortable .dashicons-trash",function(i){i.preventDefault(),$(this).parent().parent().find(".social-icons-options.options-open").hide()}),$(document).on("click","#social-icons-sortable .social-icons-options-repeater",function(i){if(i.preventDefault(),i.target===this){var s=$(this).parent().find(".social-icons-options");s.toggleClass("options-open").slideToggle()}}),$(document).on("click",".social-icons-widget__add-button",function(i){i.preventDefault(),s($(this))});var s=function(i){var s=$(document).find("#social-icons-sortable .social-icons-main-container").length+1,o=$('<div class="social-icons-main-container" />').append($('<div id="item_'+s+'" class="social-icons-options-repeater items" />').append($('<span class="dashicons dashicons-move"></span>')).append($('<span class="dashicons dashicons-trash"></span>')).append($('<span class="dashicons dashicons-admin-page"></span>'))).append($('<div class="social-icons-options" />').append($('<div class="social-icon-widget-field"><span class="dashicons dashicons-facebook-alt"></span></div>')).append($('<div class="social-icon-widget-field"><input type=text value="Facebook" /> </div>')).append($('<div class="social-icon-widget-field social-icons-widget-field-url" />').append($('<label for="socal-icons-media-url1" class="social-icons-widget-field-label">URL</label>)')).append($('<input type="text" id="socal-icons-media-url1" class="social-icons-field-url" name="social-icons-url">'))).append($('<div class="social-icon-widget-field social-icons-widget-field-icon-title" />').append($('<label for="socal-icons-media-icon-title1" class="social-icons-widget-field-label">Icon title</label>)')).append($('<input type="text" id="socal-icons-media-icon-title1" class="social-icons-field-icon-title" name="social-icons-icon-title">'))));i.parent().find("#social-icons-sortable").append(o)}});
|
assets/js/unminified/astra-widget-list-icons.js
ADDED
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function($){
|
2 |
+
|
3 |
+
AstraWidgetListIcons = {
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Init
|
7 |
+
*/
|
8 |
+
init: function()
|
9 |
+
{
|
10 |
+
this._init_toggle_settings();
|
11 |
+
this._bind();
|
12 |
+
},
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Binds events
|
16 |
+
*/
|
17 |
+
_bind: function()
|
18 |
+
{
|
19 |
+
$( document ).on('widget-updated widget-added', AstraWidgets._init_toggle_settings );
|
20 |
+
$( document ).on('change', '.astra-widget-list-icons-fields .astra-widget-field-imageoricon', AstraWidgetListIcons._toggle_settings );
|
21 |
+
},
|
22 |
+
|
23 |
+
_init_toggle_settings: function() {
|
24 |
+
$( '.astra-widget-list-icons-fields' ).each(function(index, el) {
|
25 |
+
var parent = $( el );
|
26 |
+
var image = parent.find( '.astra-widget-field-imageoricon' ).find('option:selected').val() || '';
|
27 |
+
|
28 |
+
if( image === 'image' ) {
|
29 |
+
parent.find('.astra-field-image-wrapper').show();
|
30 |
+
parent.find('.astra-widget-icon-selector').hide();
|
31 |
+
} else {
|
32 |
+
parent.find('.astra-widget-icon-selector').show();
|
33 |
+
parent.find('.astra-field-image-wrapper').hide();
|
34 |
+
}
|
35 |
+
});
|
36 |
+
},
|
37 |
+
|
38 |
+
_toggle_settings: function() {
|
39 |
+
var image = $( this ).find('option:selected').val() || '';
|
40 |
+
var parent = $( this ).closest('.astra-widget-list-icons-fields');
|
41 |
+
|
42 |
+
if( image === 'image' ) {
|
43 |
+
parent.find('.astra-field-image-wrapper').show();
|
44 |
+
parent.find('.astra-widget-icon-selector').hide();
|
45 |
+
} else {
|
46 |
+
parent.find('.astra-widget-icon-selector').show();
|
47 |
+
parent.find('.astra-field-image-wrapper').hide();
|
48 |
+
}
|
49 |
+
}
|
50 |
+
|
51 |
+
};
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Initialization
|
55 |
+
*/
|
56 |
+
$(function(){
|
57 |
+
AstraWidgetListIcons.init();
|
58 |
+
});
|
59 |
+
|
60 |
+
})(jQuery);
|
assets/js/unminified/astra-widget-social-profiles.js
ADDED
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function($){
|
2 |
+
|
3 |
+
AstraWidgetSocialProfiles = {
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Init
|
7 |
+
*/
|
8 |
+
init: function()
|
9 |
+
{
|
10 |
+
this._init_toggle_settings();
|
11 |
+
this._bind();
|
12 |
+
},
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Binds events
|
16 |
+
*/
|
17 |
+
_bind: function()
|
18 |
+
{
|
19 |
+
$( document ).on('widget-updated widget-added', AstraWidgets._init_toggle_settings );
|
20 |
+
$( document ).on('change', '.astra-widget-social-profiles-fields .astra-widget-field-icon-style', AstraWidgetSocialProfiles._toggle_settings );
|
21 |
+
$( document ).on('change', '.astra-widget-social-profiles-fields .astra-widget-field-color-type', AstraWidgetSocialProfiles._toggle_settings );
|
22 |
+
},
|
23 |
+
|
24 |
+
_init_toggle_settings: function() {
|
25 |
+
$( '.astra-widget-social-profiles-fields' ).each(function(index, el) {
|
26 |
+
var parent = $( el );
|
27 |
+
var style = parent.find( '.astra-widget-field-icon-style' ).find('option:selected').val() || '';
|
28 |
+
var color_type = parent.find( '.astra-widget-field-color-type' ).find('option:selected').val() || '';
|
29 |
+
|
30 |
+
|
31 |
+
if( color_type === 'official-color' ) {
|
32 |
+
parent.find('.astra-widget-field-icon-color').hide();
|
33 |
+
parent.find('.astra-widget-field-icon-hover-color').hide();
|
34 |
+
parent.find('.astra-widget-field-bg-hover-color').hide();
|
35 |
+
parent.find('.astra-widget-field-bg-color').hide();
|
36 |
+
} else {
|
37 |
+
parent.find('.astra-widget-field-icon-color').show();
|
38 |
+
parent.find('.astra-widget-field-icon-hover-color').show();
|
39 |
+
parent.find('.astra-widget-field-bg-hover-color').show();
|
40 |
+
parent.find('.astra-widget-field-bg-color').show();
|
41 |
+
|
42 |
+
if( style === 'simple' ) {
|
43 |
+
parent.find('.astra-widget-field-bg-hover-color').hide();
|
44 |
+
parent.find('.astra-widget-field-bg-color').hide();
|
45 |
+
} else {
|
46 |
+
parent.find('.astra-widget-field-bg-hover-color').show();
|
47 |
+
parent.find('.astra-widget-field-bg-color').show();
|
48 |
+
}
|
49 |
+
}
|
50 |
+
|
51 |
+
});
|
52 |
+
},
|
53 |
+
|
54 |
+
_toggle_settings: function() {
|
55 |
+
var style = $( this ).find('option:selected').val() || '';
|
56 |
+
var parent = $( this ).closest('.astra-widget-social-profiles-fields');
|
57 |
+
var color_type = parent.find( '.astra-widget-field-color-type' ).find('option:selected').val() || '';
|
58 |
+
|
59 |
+
|
60 |
+
if( color_type === 'official-color' ) {
|
61 |
+
parent.find('.astra-widget-field-icon-color').hide();
|
62 |
+
parent.find('.astra-widget-field-icon-hover-color').hide();
|
63 |
+
parent.find('.astra-widget-field-bg-hover-color').hide();
|
64 |
+
parent.find('.astra-widget-field-bg-color').hide();
|
65 |
+
} else {
|
66 |
+
parent.find('.astra-widget-field-icon-color').show();
|
67 |
+
parent.find('.astra-widget-field-icon-hover-color').show();
|
68 |
+
parent.find('.astra-widget-field-bg-hover-color').show();
|
69 |
+
parent.find('.astra-widget-field-bg-color').show();
|
70 |
+
|
71 |
+
if( style === 'simple' ) {
|
72 |
+
parent.find('.astra-widget-field-bg-hover-color').hide();
|
73 |
+
parent.find('.astra-widget-field-bg-color').hide();
|
74 |
+
} else {
|
75 |
+
parent.find('.astra-widget-field-bg-hover-color').show();
|
76 |
+
parent.find('.astra-widget-field-bg-color').show();
|
77 |
+
}
|
78 |
+
}
|
79 |
+
}
|
80 |
+
|
81 |
+
};
|
82 |
+
|
83 |
+
/**
|
84 |
+
* Initialization
|
85 |
+
*/
|
86 |
+
$(function(){
|
87 |
+
AstraWidgetSocialProfiles.init();
|
88 |
+
});
|
89 |
+
|
90 |
+
})(jQuery);
|
assets/js/unminified/astra-widgets-backend.js
ADDED
@@ -0,0 +1,397 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function($){
|
2 |
+
|
3 |
+
AstraWidgets = {
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Init
|
7 |
+
*/
|
8 |
+
init: function()
|
9 |
+
{
|
10 |
+
this._init_colorpicker();
|
11 |
+
this._init_repeater();
|
12 |
+
this._bind();
|
13 |
+
},
|
14 |
+
_init_colorpicker: function() {
|
15 |
+
$('.astra-widget-field-color input').wpColorPicker({
|
16 |
+
change: function (event, ui) {
|
17 |
+
// $(event.target).closest('.widget-content').find('input').trigger('change');
|
18 |
+
}
|
19 |
+
});
|
20 |
+
// .wpColorPicker({
|
21 |
+
// /**
|
22 |
+
// * @param {Event} event - standard jQuery event, produced by whichever
|
23 |
+
// * control was changed.
|
24 |
+
// * @param {Object} ui - standard jQuery UI object, with a color member
|
25 |
+
// * containing a Color.js object.
|
26 |
+
// */
|
27 |
+
// change: function (event, ui) {
|
28 |
+
// var element = event.target;
|
29 |
+
// var color = ui.color.toString();
|
30 |
+
|
31 |
+
// if ( jQuery('html').hasClass('colorpicker-ready') ) {
|
32 |
+
// control.setting.set( color );
|
33 |
+
// }
|
34 |
+
// },
|
35 |
+
|
36 |
+
// /**
|
37 |
+
// * @param {Event} event - standard jQuery event, produced by "Clear"
|
38 |
+
// * button.
|
39 |
+
// */
|
40 |
+
// clear: function (event) {
|
41 |
+
// var element = jQuery(event.target).closest('.wp-picker-input-wrap').find('.wp-color-picker')[0];
|
42 |
+
// var color = '';
|
43 |
+
|
44 |
+
// if (element) {
|
45 |
+
// // Add your code here
|
46 |
+
// control.setting.set( color );
|
47 |
+
// }
|
48 |
+
// }
|
49 |
+
// });
|
50 |
+
},
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Binds events
|
54 |
+
*/
|
55 |
+
_bind: function()
|
56 |
+
{
|
57 |
+
$( document ).on('widget-updated widget-added', AstraWidgets._reinit_controls );
|
58 |
+
$( document ).on('click', '.astra-select-icon', AstraWidgets._icon_selector );
|
59 |
+
$( document ).on('click', '.astra-widget-icon', AstraWidgets._set_icon );
|
60 |
+
|
61 |
+
// Bind repeater events.
|
62 |
+
$( document ).on('click', '.astra-repeater-sortable .clone', AstraWidgets._repeater_clone);
|
63 |
+
$( document ).on('click', '.astra-repeater-sortable .remove', AstraWidgets._repeater_remove);
|
64 |
+
$( document ).on('click', '.astra-repeater-field .actions', AstraWidgets._repeater_toggle_open);
|
65 |
+
$( document ).on('click', '.astra-repeater .add-new-btn', AstraWidgets._add_new );
|
66 |
+
$( document ).on('click', '.widget-control-save', AstraWidgets._repeater_reinit );
|
67 |
+
$( document ).on('click', '.astra-repeater-field .astra-select-image', AstraWidgets._repeater_add_image_field );
|
68 |
+
$( document ).on('click', '.astra-repeater-field .astra-remove-image', AstraWidgets._repeater_remove_image_field );
|
69 |
+
$( document ).on('input', '.astra-repeater-field [data-field-id="title"]', AstraWidgets._repeater_set_title );
|
70 |
+
},
|
71 |
+
|
72 |
+
_reinit_controls: function() {
|
73 |
+
AstraWidgets._init_colorpicker();
|
74 |
+
AstraWidgets._init_repeater();
|
75 |
+
},
|
76 |
+
|
77 |
+
_icon_selector: function(event) {
|
78 |
+
var parent = $(this).parents('.astra-widget-icon-selector');
|
79 |
+
parent.find('.astra-icons-list-wrap').slideToggle();
|
80 |
+
},
|
81 |
+
|
82 |
+
_set_icon: function(event) {
|
83 |
+
var parent = $(this).parents('.astra-widget-icon-selector');
|
84 |
+
var selected_icon_font = $(this).attr('data-font') || '';
|
85 |
+
var current_icon_preview = parent.find('.astra-selected-icon i');
|
86 |
+
var current_icon_input = parent.find('.selected-icon');
|
87 |
+
|
88 |
+
current_icon_preview.removeClass();
|
89 |
+
current_icon_preview.addClass( selected_icon_font );
|
90 |
+
|
91 |
+
if( $(this).closest('.astra-repeater-field').find('.selected-icon').data('icon-visible') === 'yes' ) {
|
92 |
+
$(this).closest('.astra-repeater-field').find('.title').attr('class','title');
|
93 |
+
$(this).closest('.astra-repeater-field').find('.title').addClass( selected_icon_font );
|
94 |
+
}
|
95 |
+
|
96 |
+
current_icon_input.val( selected_icon_font );
|
97 |
+
|
98 |
+
// Trigger the change event.
|
99 |
+
parent.find('.selected-icon').trigger( 'change' );
|
100 |
+
},
|
101 |
+
|
102 |
+
/**
|
103 |
+
* Repeater remove image field.
|
104 |
+
*
|
105 |
+
* @param {[type]} event [description]
|
106 |
+
* @return {[type]} [description]
|
107 |
+
*/
|
108 |
+
_repeater_remove_image_field: function(event) {
|
109 |
+
if( confirm('Do you want to remove this image?') ) {
|
110 |
+
var self = $(this);
|
111 |
+
var parent = self.parents('.astra-repeater-field');
|
112 |
+
parent.find('.astra-field-image-preview').html('');
|
113 |
+
parent.find('.astra-field-image-preview img').attr('src', '' );
|
114 |
+
parent.find('.astra-field-image-preview-id').val( '' );
|
115 |
+
parent.find('.astra-image-url').val( '' );
|
116 |
+
parent.find('.astra-image-alt').val( '' );
|
117 |
+
parent.find('.astra-image-title').val( '' );
|
118 |
+
parent.find('.astra-image-size-select, .astra-image-width').hide();
|
119 |
+
}
|
120 |
+
},
|
121 |
+
|
122 |
+
/**
|
123 |
+
* Repeater add image field
|
124 |
+
*
|
125 |
+
* @param {[type]} event [description]
|
126 |
+
* @return {[type]} [description]
|
127 |
+
*/
|
128 |
+
_repeater_add_image_field: function(event) {
|
129 |
+
|
130 |
+
var self = $(this);
|
131 |
+
var parent = self.parents('.astra-repeater-field');
|
132 |
+
|
133 |
+
var frame = wp.media({
|
134 |
+
title: 'Select or Upload Image',
|
135 |
+
button: {
|
136 |
+
text: 'Choose Image'
|
137 |
+
},
|
138 |
+
library: {
|
139 |
+
type: 'image'
|
140 |
+
},
|
141 |
+
multiple: false,
|
142 |
+
});
|
143 |
+
|
144 |
+
// Handle results from media manager.
|
145 |
+
frame.on('close',function( ) {
|
146 |
+
var attachments = frame.state().get('selection').toJSON();
|
147 |
+
|
148 |
+
if( $.isEmptyObject( attachments ) ) {
|
149 |
+
return;
|
150 |
+
}
|
151 |
+
|
152 |
+
if( attachments[0].sizes.hasOwnProperty('medium') ) {
|
153 |
+
var url = attachments[0].sizes.medium.url;
|
154 |
+
} else if( attachments[0].sizes.hasOwnProperty('thumbnail') ) {
|
155 |
+
var url = attachments[0].sizes.thumbnail.url;
|
156 |
+
} else {
|
157 |
+
var url = attachments[0].sizes.full.url;
|
158 |
+
}
|
159 |
+
|
160 |
+
if( parent.find('.astra-remove-image').length > 0 ) {
|
161 |
+
parent.find('.astra-field-image-preview img').attr('src', url );
|
162 |
+
} else {
|
163 |
+
parent.find('.astra-field-image-preview').append('<span class="astra-remove-image button">Remove</span><img src="'+url+'" />');
|
164 |
+
}
|
165 |
+
parent.find('.astra-image-url').val( attachments[0].url );
|
166 |
+
parent.find('.astra-image-alt').val( attachments[0].alt );
|
167 |
+
parent.find('.astra-image-title').val( attachments[0].title );
|
168 |
+
|
169 |
+
parent.find('.astra-field-image-preview-id').val( attachments[0].id );
|
170 |
+
|
171 |
+
parent.find('.astra-image-size-select, .astra-image-width').show();
|
172 |
+
|
173 |
+
// Trigger the change event.
|
174 |
+
parent.find('input').trigger( 'change' );
|
175 |
+
});
|
176 |
+
|
177 |
+
frame.open();
|
178 |
+
return false;
|
179 |
+
},
|
180 |
+
|
181 |
+
/**
|
182 |
+
* Return substring.
|
183 |
+
*
|
184 |
+
* @param {[type]} e [description]
|
185 |
+
* @return {[type]} [description]
|
186 |
+
*/
|
187 |
+
_get_sub_string: function( val ) {
|
188 |
+
|
189 |
+
var str = '';
|
190 |
+
if( val.length > 24 ) {
|
191 |
+
var str = '..';
|
192 |
+
}
|
193 |
+
|
194 |
+
val = val.substring(0,24) + str;
|
195 |
+
|
196 |
+
return val;
|
197 |
+
},
|
198 |
+
|
199 |
+
/**
|
200 |
+
* Repeater set title.
|
201 |
+
*
|
202 |
+
* @param {[type]} e [description]
|
203 |
+
* @return {[type]} [description]
|
204 |
+
*/
|
205 |
+
_repeater_set_title: function( e ) {
|
206 |
+
var val = $( this ).val() || '';
|
207 |
+
val = AstraWidgets._get_sub_string( val );
|
208 |
+
|
209 |
+
$(this).closest('.astra-repeater-field').find('.title').text( val )
|
210 |
+
},
|
211 |
+
|
212 |
+
/**
|
213 |
+
* Repeater reinit
|
214 |
+
*
|
215 |
+
* @param {[type]} e [description]
|
216 |
+
* @return {[type]} [description]
|
217 |
+
*/
|
218 |
+
_repeater_reinit: function( e ) {
|
219 |
+
$('.astra-repeater-sortable').sortable();
|
220 |
+
},
|
221 |
+
|
222 |
+
/**
|
223 |
+
* Repeater add new
|
224 |
+
*
|
225 |
+
* @param {[type]} e [description]
|
226 |
+
*/
|
227 |
+
_add_new: function( e ) {
|
228 |
+
e.preventDefault();
|
229 |
+
|
230 |
+
var selector = $(this),
|
231 |
+
parent = selector.closest('.astra-repeater'),
|
232 |
+
length = $('.astra-repeater-field').length || 0,
|
233 |
+
fields = parent.find( '.astra-repeater-fields' ).html(),
|
234 |
+
title = parent.find( '.astra-repeater-fields' ).attr('title') || '',
|
235 |
+
repeater_id = parent.find( '.astra-repeater-fields' ).attr('data-id') || '';
|
236 |
+
|
237 |
+
fields = fields.replace('][][', ']['+length+'][');
|
238 |
+
|
239 |
+
var item = '<div class="astra-repeater-field">';
|
240 |
+
item += ' <div class="actions">';
|
241 |
+
item += ' <span class="index">'+length+'</span>';
|
242 |
+
item += ' <span class="dashicons dashicons-move"></span>';
|
243 |
+
item += ' <span class="title">'+title+'</span>';
|
244 |
+
item += ' <span class="dashicons dashicons-admin-page clone"></span>';
|
245 |
+
item += ' <span class="dashicons dashicons-trash remove"></span>';
|
246 |
+
item += ' </div>';
|
247 |
+
item += ' <div class="markukp">';
|
248 |
+
item += fields
|
249 |
+
item += ' </div>';
|
250 |
+
item += '</div>';
|
251 |
+
|
252 |
+
parent.find('.astra-repeater-sortable').append( item );
|
253 |
+
|
254 |
+
// Set repeater fields names.
|
255 |
+
AstraWidgets._set_repeater_names();
|
256 |
+
},
|
257 |
+
|
258 |
+
/**
|
259 |
+
* Repeater set names
|
260 |
+
*/
|
261 |
+
_set_repeater_names: function() {
|
262 |
+
$('.astra-repeater').each(function(repeaterIndex, repeaterEl) {
|
263 |
+
var repeater_id = $(repeaterEl).find( '.astra-repeater-fields' ).attr('data-id') || '';
|
264 |
+
$(repeaterEl).find('.astra-repeater-sortable').find('.astra-repeater-field').each(function(repeaterFieldIndex, repeaterFieldEl){
|
265 |
+
$(repeaterFieldEl).find(':input').each(function(currentElindex, currentEl){
|
266 |
+
|
267 |
+
var field_id = $(currentEl).attr('data-field-id') || '';
|
268 |
+
var field_name = repeater_id + '['+repeaterFieldIndex+'][' + field_id + ']';
|
269 |
+
|
270 |
+
// Show index.
|
271 |
+
$(repeaterFieldEl).find('.index').text( repeaterFieldIndex );
|
272 |
+
|
273 |
+
// Set new name.
|
274 |
+
$(currentEl).attr('name', field_name);
|
275 |
+
});
|
276 |
+
});
|
277 |
+
});
|
278 |
+
},
|
279 |
+
|
280 |
+
/**
|
281 |
+
* Repeater Toggle Open
|
282 |
+
*
|
283 |
+
* @param {[type]} e [description]
|
284 |
+
* @return {[type]} [description]
|
285 |
+
*/
|
286 |
+
_repeater_toggle_open: function(e) {
|
287 |
+
e.preventDefault();
|
288 |
+
|
289 |
+
// Toggle on click on move icon & title too.
|
290 |
+
if( ( e.target === this ) || $( e.target ).hasClass('title') || $( e.target ).hasClass('dashicons-move') ) {
|
291 |
+
$( this ).parents('.astra-repeater-field').find('.markukp').slideToggle();
|
292 |
+
}
|
293 |
+
},
|
294 |
+
|
295 |
+
/**
|
296 |
+
* Repeater clone
|
297 |
+
*
|
298 |
+
* @param {[type]} e [description]
|
299 |
+
* @return {[type]} [description]
|
300 |
+
*/
|
301 |
+
_repeater_clone: function(e) {
|
302 |
+
e.preventDefault();
|
303 |
+
|
304 |
+
var $item = $( this ),
|
305 |
+
parent = $item.closest('.astra-repeater'),
|
306 |
+
fields = parent.find( '.astra-repeater-fields' ).html(),
|
307 |
+
copyItem = $( $item ).closest('.astra-repeater-field').clone();
|
308 |
+
|
309 |
+
copyItem.insertAfter( $item.closest('.astra-repeater-field') );
|
310 |
+
|
311 |
+
$('.astra-repeater-sortable').sortable();
|
312 |
+
|
313 |
+
// Trigger the change event.
|
314 |
+
parent.find('input').trigger( 'change' );
|
315 |
+
|
316 |
+
// Set repeater fields names.
|
317 |
+
AstraWidgets._set_repeater_names();
|
318 |
+
},
|
319 |
+
|
320 |
+
/**
|
321 |
+
* Repeater remove
|
322 |
+
*
|
323 |
+
* @param {[type]} e [description]
|
324 |
+
* @return {[type]} [description]
|
325 |
+
*/
|
326 |
+
_repeater_remove: function( e ) {
|
327 |
+
e.preventDefault();
|
328 |
+
|
329 |
+
var $item = $( this );
|
330 |
+
var parent = $item.closest('.astra-repeater');
|
331 |
+
var title = $item.parent().find('.title').html();
|
332 |
+
var str = '';
|
333 |
+
|
334 |
+
if( title.length > 0 ) {
|
335 |
+
str = title;
|
336 |
+
} else {
|
337 |
+
str = 'this field';
|
338 |
+
}
|
339 |
+
|
340 |
+
if( confirm( 'Are you sure you want to delete ' + str + '?' ) ) {
|
341 |
+
$item.closest('.astra-repeater-field').remove();
|
342 |
+
}
|
343 |
+
|
344 |
+
// Set repeater fields names.
|
345 |
+
AstraWidgets._set_repeater_names();
|
346 |
+
|
347 |
+
// Trigger the change event.
|
348 |
+
parent.find('input').trigger( 'change' );
|
349 |
+
},
|
350 |
+
|
351 |
+
/**
|
352 |
+
* Repeater init
|
353 |
+
*
|
354 |
+
* @return {[type]} [description]
|
355 |
+
*/
|
356 |
+
_init_repeater: function()
|
357 |
+
{
|
358 |
+
$('.astra-repeater-sortable').sortable({
|
359 |
+
cursor: 'move',
|
360 |
+
stop: function( event, ui ) {
|
361 |
+
// Set repeater fields names.
|
362 |
+
AstraWidgets._set_repeater_names();
|
363 |
+
|
364 |
+
// Trigger the change event.
|
365 |
+
ui.item.find('input').trigger( 'change' );
|
366 |
+
},
|
367 |
+
});
|
368 |
+
|
369 |
+
// Set repeater fields names.
|
370 |
+
AstraWidgets._set_repeater_names();
|
371 |
+
|
372 |
+
if( $('.astra-repeater-field').length ) {
|
373 |
+
$('.astra-repeater-field').each(function(index, el) {
|
374 |
+
var title = $( el ).find('[data-field-id="title"]' ).val() || '';
|
375 |
+
var icon = $( el ).find('[data-field-id="icon"]' ).val() || '';
|
376 |
+
|
377 |
+
title = AstraWidgets._get_sub_string( title );
|
378 |
+
|
379 |
+
$(el).find('.title').text( title );
|
380 |
+
|
381 |
+
if( $(el).find('.selected-icon').data('icon-visible') === 'yes' ) {
|
382 |
+
$(el).find('.title').addClass( icon );
|
383 |
+
}
|
384 |
+
});
|
385 |
+
}
|
386 |
+
}
|
387 |
+
|
388 |
+
};
|
389 |
+
|
390 |
+
/**
|
391 |
+
* Initialization
|
392 |
+
*/
|
393 |
+
$(function(){
|
394 |
+
AstraWidgets.init();
|
395 |
+
});
|
396 |
+
|
397 |
+
})(jQuery);
|
astra-widgets.php
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Plugin Name: Astra Widgets
|
4 |
+
* Plugin URI: https://wpastra.com/
|
5 |
+
* Description: Astra Widgets
|
6 |
+
* Version: 1.0.0
|
7 |
+
* Author: Brainstorm Force
|
8 |
+
* Author URI: https://www.brainstormforce.com
|
9 |
+
* Text Domain: astra-widgets
|
10 |
+
*
|
11 |
+
* @package Astra Widgets
|
12 |
+
*/
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Exit if accessed directly.
|
16 |
+
*/
|
17 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
18 |
+
exit();
|
19 |
+
}
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Set constants.
|
23 |
+
*/
|
24 |
+
define( 'ASTRA_WIDGETS_FILE', __FILE__ );
|
25 |
+
define( 'ASTRA_WIDGETS_BASE', plugin_basename( ASTRA_WIDGETS_FILE ) );
|
26 |
+
define( 'ASTRA_WIDGETS_DIR', plugin_dir_path( ASTRA_WIDGETS_FILE ) );
|
27 |
+
define( 'ASTRA_WIDGETS_URI', plugins_url( '/', ASTRA_WIDGETS_FILE ) );
|
28 |
+
define( 'ASTRA_WIDGETS_VER', '1.0.0' );
|
29 |
+
define( 'ASTRA_WIDGETS_TEMPLATE_DEBUG_MODE', false );
|
30 |
+
|
31 |
+
require_once ASTRA_WIDGETS_DIR . 'classes/class-astra-widgets.php';
|
classes/class-astra-widgets-helper.php
ADDED
@@ -0,0 +1,512 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Astra Widgets
|
4 |
+
*
|
5 |
+
* @package Astra Widgets
|
6 |
+
* @since 1.0.0
|
7 |
+
*/
|
8 |
+
|
9 |
+
if ( ! class_exists( 'Astra_Widgets_Helper' ) ) :
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Astra_Widgets_Helper
|
13 |
+
*
|
14 |
+
* @since 1.0.0
|
15 |
+
*/
|
16 |
+
class Astra_Widgets_Helper {
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Instance
|
20 |
+
*
|
21 |
+
* @since 1.0.0
|
22 |
+
*
|
23 |
+
* @access private
|
24 |
+
* @var object Class object.
|
25 |
+
*/
|
26 |
+
private static $instance;
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Initiator
|
30 |
+
*
|
31 |
+
* @since 1.0.0
|
32 |
+
*
|
33 |
+
* @return object initialized object of class.
|
34 |
+
*/
|
35 |
+
public static function get_instance() {
|
36 |
+
if ( ! isset( self::$instance ) ) {
|
37 |
+
self::$instance = new self;
|
38 |
+
}
|
39 |
+
return self::$instance;
|
40 |
+
}
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Constructor
|
44 |
+
*
|
45 |
+
* @since 1.0.0
|
46 |
+
*/
|
47 |
+
public function __construct() {
|
48 |
+
}
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Check exiting fields have any repeater field?
|
52 |
+
*
|
53 |
+
* If found then return `true`. Default `false`.
|
54 |
+
*
|
55 |
+
* @param array $fields Fields array.
|
56 |
+
* @return boolean Repeater field exist.
|
57 |
+
*/
|
58 |
+
function have_repeator_field( $fields = array() ) {
|
59 |
+
foreach ( $fields as $key => $field ) {
|
60 |
+
if ( 'repeater' === $field['type'] ) {
|
61 |
+
return true;
|
62 |
+
}
|
63 |
+
}
|
64 |
+
return false;
|
65 |
+
}
|
66 |
+
|
67 |
+
/**
|
68 |
+
* Generate fields.
|
69 |
+
*
|
70 |
+
* @param object $self Widget object.
|
71 |
+
* @param array $fields Fields array.
|
72 |
+
* @param string $repeater_id Repeater ID.
|
73 |
+
* @return void
|
74 |
+
*/
|
75 |
+
function generate( $self, $fields = array(), $repeater_id = '' ) {
|
76 |
+
|
77 |
+
$defaults = array(
|
78 |
+
'type' => '',
|
79 |
+
'id' => '',
|
80 |
+
'name' => '',
|
81 |
+
'default' => '',
|
82 |
+
'desc' => '',
|
83 |
+
);
|
84 |
+
|
85 |
+
if ( ! empty( $fields ) && is_array( $fields ) ) {
|
86 |
+
foreach ( $fields as $key => $value ) {
|
87 |
+
|
88 |
+
$value = wp_parse_args( $value, $defaults );
|
89 |
+
|
90 |
+
$class = isset( $value['class'] ) ? $value['class'] : '';
|
91 |
+
|
92 |
+
switch ( $value['type'] ) {
|
93 |
+
case 'icon':
|
94 |
+
$field_id = '';
|
95 |
+
$field_name = '';
|
96 |
+
if ( empty( $repeater_id ) || $this->have_repeator_field( $fields ) ) {
|
97 |
+
$field_id = $self->get_field_id( $value['id'] );
|
98 |
+
$field_name = $self->get_field_name( $value['id'] );
|
99 |
+
}
|
100 |
+
?>
|
101 |
+
<div class="astra-widget-icon-selector">
|
102 |
+
<label for="<?php echo esc_attr( $field_id ); ?>">
|
103 |
+
<?php echo esc_html( $value['name'] ); ?>
|
104 |
+
</label>
|
105 |
+
|
106 |
+
<div class="astra-widget-icon-selector-actions">
|
107 |
+
<div class="astra-select-icon button">
|
108 |
+
<div class="astra-selected-icon"><i class="<?php echo esc_attr( $value['default'] ); ?>"></i></div>
|
109 |
+
<?php esc_html_e( 'Choose icon..', 'astra-widgets' ); ?>
|
110 |
+
</div>
|
111 |
+
</div>
|
112 |
+
|
113 |
+
|
114 |
+
<div class="astra-icons-list-wrap">
|
115 |
+
<!-- <input type="search" placeholder="Search icon.." class="search-icon"> -->
|
116 |
+
<ul class="astra-widget-icons-list">
|
117 |
+
<?php
|
118 |
+
// Get icons array.
|
119 |
+
$icons = self::get_icons();
|
120 |
+
foreach ( $icons as $index => $field ) {
|
121 |
+
?>
|
122 |
+
<li class="astra-widget-icon" data-font="<?php echo $index; ?>"><i class="<?php echo $index; ?>"></i></li>
|
123 |
+
<?php
|
124 |
+
}
|
125 |
+
?>
|
126 |
+
</ul>
|
127 |
+
</div>
|
128 |
+
|
129 |
+
<input class="widefat selected-icon" type="hidden"
|
130 |
+
id="<?php echo esc_attr( $field_id ); ?>"
|
131 |
+
name="<?php echo esc_attr( $field_name ); ?>"
|
132 |
+
value="<?php echo esc_attr( $value['default'] ); ?>"
|
133 |
+
data-field-id="<?php echo esc_attr( $value['id'] ); ?>"
|
134 |
+
data-icon-visible="<?php echo esc_attr( ( isset( $value['show_icon'] ) ) ? $value['show_icon'] : 'no' ); ?>"
|
135 |
+
/>
|
136 |
+
<span><?php echo $value['desc']; ?></span>
|
137 |
+
</div>
|
138 |
+
<?php
|
139 |
+
break;
|
140 |
+
|
141 |
+
/**
|
142 |
+
* Note: Add below code in `update()` function of individual widget.
|
143 |
+
*
|
144 |
+
* $instance['{FIELD_NAME}'] = isset( $new_instance['{FIELD_NAME}'] ) ? (bool) $new_instance['{FIELD_NAME}'] : false;
|
145 |
+
*
|
146 |
+
* @todo We'll do this in this function instead of the individual widget update function.
|
147 |
+
*/
|
148 |
+
case 'checkbox':
|
149 |
+
?>
|
150 |
+
<div class="astra-widget-field astra-widget-field-checkbox">
|
151 |
+
<input class="checkbox" type="checkbox"
|
152 |
+
<?php checked( $value['default'] ); ?>
|
153 |
+
id="<?php echo esc_attr( $self->get_field_id( $value['id'] ) ); ?>"
|
154 |
+
name="<?php echo esc_attr( $self->get_field_name( $value['id'] ) ); ?>" />
|
155 |
+
<label for="<?php echo esc_attr( $self->get_field_id( $value['id'] ) ); ?>"><?php echo $value['name']; ?></label>
|
156 |
+
</div>
|
157 |
+
<?php
|
158 |
+
break;
|
159 |
+
case 'repeater':
|
160 |
+
?>
|
161 |
+
|
162 |
+
<div class="astra-repeater">
|
163 |
+
<div class="astra-repeater-container">
|
164 |
+
<div class="astra-repeater-sortable">
|
165 |
+
<?php
|
166 |
+
$this->generate_repeater_fields( $self, $fields, $value );
|
167 |
+
?>
|
168 |
+
</div>
|
169 |
+
</div>
|
170 |
+
<div class="add-new">
|
171 |
+
<a class="add-new-btn button"><?php _e( 'Add more', 'astra-widgets' ); ?></a>
|
172 |
+
</div>
|
173 |
+
|
174 |
+
<?php
|
175 |
+
$repeater_id = 'widget-' . $self->id_base . '[' . $self->number . '][' . $value['id'] . ']';
|
176 |
+
?>
|
177 |
+
|
178 |
+
<div class="astra-repeater-fields" title="<?php echo $value['title']; ?>" data-id="<?php echo esc_attr( $repeater_id ); ?>" style="display: none;">
|
179 |
+
<?php $this->generate( $self, $value['options'], $value['id'] ); ?>
|
180 |
+
</div>
|
181 |
+
</div>
|
182 |
+
<?php
|
183 |
+
break;
|
184 |
+
|
185 |
+
case 'text':
|
186 |
+
$field_id = '';
|
187 |
+
$field_name = '';
|
188 |
+
if ( empty( $repeater_id ) || $this->have_repeator_field( $fields ) ) {
|
189 |
+
$field_id = $self->get_field_id( $value['id'] );
|
190 |
+
$field_name = $self->get_field_name( $value['id'] );
|
191 |
+
}
|
192 |
+
?>
|
193 |
+
<div class="astra-widget-field astra-widget-field-text">
|
194 |
+
<label for="<?php echo esc_attr( $field_id ); ?>">
|
195 |
+
<?php echo $value['name']; ?>
|
196 |
+
</label>
|
197 |
+
<input class="widefat" type="text"
|
198 |
+
id="<?php echo esc_attr( $field_id ); ?>"
|
199 |
+
name="<?php echo esc_attr( $field_name ); ?>"
|
200 |
+
value="<?php echo esc_attr( $value['default'] ); ?>"
|
201 |
+
data-field-id="<?php echo esc_attr( $value['id'] ); ?>"
|
202 |
+
/>
|
203 |
+
<span><?php echo $value['desc']; ?></span>
|
204 |
+
</div>
|
205 |
+
<?php
|
206 |
+
break;
|
207 |
+
case 'image':
|
208 |
+
$img_url = '';
|
209 |
+
if ( ! empty( $value['default'] ) ) {
|
210 |
+
if ( strstr( $value['default'], 'http://' ) ) {
|
211 |
+
$img_url = $value['default'];
|
212 |
+
} else {
|
213 |
+
$img_url = wp_get_attachment_image_src( $value['default'], 'medium' );
|
214 |
+
$img_url = $img_url[0];
|
215 |
+
}
|
216 |
+
}
|
217 |
+
|
218 |
+
$field_id = '';
|
219 |
+
$field_name = '';
|
220 |
+
if ( empty( $repeater_id ) || $this->have_repeator_field( $fields ) ) {
|
221 |
+
$field_id = $self->get_field_id( $value['id'] );
|
222 |
+
$field_name = $self->get_field_name( $value['id'] );
|
223 |
+
}
|
224 |
+
?>
|
225 |
+
<p>
|
226 |
+
<div class="astra-field-image-wrapper">
|
227 |
+
<div class="astra-field-image-title" for="<?php echo esc_attr( $field_id ); ?>">
|
228 |
+
<?php echo $value['name']; ?>
|
229 |
+
</div>
|
230 |
+
<div class="astra-field-image">
|
231 |
+
<div class="astra-field-image-preview">
|
232 |
+
<?php if ( ! empty( $img_url ) ) { ?>
|
233 |
+
<span class="astra-remove-image button">Remove</span><img src="<?php echo $img_url; ?>" />
|
234 |
+
<?php } ?>
|
235 |
+
</div>
|
236 |
+
<input
|
237 |
+
class="astra-field-image-preview-id"
|
238 |
+
id="<?php echo esc_attr( $field_id ); ?>"
|
239 |
+
name="<?php echo esc_attr( $field_name ); ?>"
|
240 |
+
type="hidden"
|
241 |
+
value="<?php echo $value['default']; ?>"
|
242 |
+
data-field-id="<?php echo esc_attr( $value['id'] ); ?>">
|
243 |
+
<div class="astra-select-image">Choose Media</div>
|
244 |
+
</div>
|
245 |
+
</div>
|
246 |
+
</p>
|
247 |
+
<?php
|
248 |
+
break;
|
249 |
+
case 'radio':
|
250 |
+
?>
|
251 |
+
<p>
|
252 |
+
<label for="<?php echo esc_attr( $self->get_field_id( $value['id'] ) ); ?>"><?php echo $value['name']; ?></label>
|
253 |
+
<?php foreach ( $value['options'] as $option ) { ?>
|
254 |
+
|
255 |
+
<?php
|
256 |
+
$c = '';
|
257 |
+
if ( $option == $value['default'] ) {
|
258 |
+
$c = ' checked="checked" ';
|
259 |
+
}
|
260 |
+
?>
|
261 |
+
<input <?php echo $value['default']; ?> class="widefat" type="radio" <?php echo $c; ?> name="<?php echo $self->get_field_name( $value['id'] ); ?>" value="<?php echo esc_attr( $option ); ?>" />
|
262 |
+
<?php } ?>
|
263 |
+
</p>
|
264 |
+
<?php
|
265 |
+
break;
|
266 |
+
case 'select':
|
267 |
+
$field_id = '';
|
268 |
+
$field_name = '';
|
269 |
+
if ( empty( $repeater_id ) || $this->have_repeator_field( $fields ) ) {
|
270 |
+
$field_id = $self->get_field_id( $value['id'] );
|
271 |
+
$field_name = $self->get_field_name( $value['id'] );
|
272 |
+
}
|
273 |
+
?>
|
274 |
+
<div class="astra-widget-field astra-widget-field-select">
|
275 |
+
<div class="astra-widget-field-<?php echo esc_attr( $value['id'] ); ?>">
|
276 |
+
<label for="<?php echo esc_attr( $field_id ); ?>"><?php echo $value['name']; ?></label>
|
277 |
+
<select class="widefat" id="<?php echo esc_attr( $field_id ); ?>" name="<?php echo esc_attr( $field_name ); ?>"
|
278 |
+
data-field-id="<?php echo esc_attr( $value['id'] ); ?>">
|
279 |
+
<?php
|
280 |
+
foreach ( $value['options'] as $op_val => $op_name ) {
|
281 |
+
?>
|
282 |
+
<option value="<?php echo $op_val; ?>" <?php selected( $value['default'], $op_val ); ?>><?php echo $op_name; ?></option>
|
283 |
+
<?php } ?>
|
284 |
+
</select>
|
285 |
+
</div>
|
286 |
+
</div>
|
287 |
+
<?php
|
288 |
+
break;
|
289 |
+
case 'hidden':
|
290 |
+
?>
|
291 |
+
<input class="<?php echo $class; ?> widefat" type="hidden" id="<?php echo esc_attr( $self->get_field_id( $value['id'] ) ); ?>" name="<?php echo esc_attr( $self->get_field_name( $value['id'] ) ); ?>" value="<?php echo esc_attr( $value['default'] ); ?>"/>
|
292 |
+
<?php
|
293 |
+
break;
|
294 |
+
case 'color':
|
295 |
+
?>
|
296 |
+
|
297 |
+
<div class="astra-widget-field astra-widget-field-color">
|
298 |
+
<div class="astra-widget-field-<?php echo esc_attr( $value['id'] ); ?>">
|
299 |
+
<label for="<?php echo esc_attr( $self->get_field_id( $value['id'] ) ); ?>"><?php echo $value['name']; ?></label>
|
300 |
+
<input class="<?php echo $class; ?> widefat" type="text" id="<?php echo esc_attr( $self->get_field_id( $value['id'] ) ); ?>" name="<?php echo esc_attr( $self->get_field_name( $value['id'] ) ); ?>" value="<?php echo esc_attr( $value['default'] ); ?>"/>
|
301 |
+
</div>
|
302 |
+
</div>
|
303 |
+
|
304 |
+
<?php
|
305 |
+
break;
|
306 |
+
case 'separator':
|
307 |
+
?>
|
308 |
+
<hr/>
|
309 |
+
<?php
|
310 |
+
break;
|
311 |
+
case 'heading':
|
312 |
+
?>
|
313 |
+
<div class="astra-widget-field astra-widget-field-heading">
|
314 |
+
<label><?php echo esc_html( $value['name'] ); ?></label>
|
315 |
+
</div>
|
316 |
+
<?php
|
317 |
+
break;
|
318 |
+
case 'email':
|
319 |
+
?>
|
320 |
+
<p>
|
321 |
+
<label for="<?php echo esc_attr( $self->get_field_id( $value['id'] ) ); ?>"><?php echo $value['name']; ?></label>
|
322 |
+
<input class="widefat" type="email" id="<?php echo esc_attr( $self->get_field_id( $value['id'] ) ); ?>" name="<?php echo esc_attr( $self->get_field_name( $value['id'] ) ); ?>" value="<?php echo esc_attr( $value['default'] ); ?>"/>
|
323 |
+
</p>
|
324 |
+
<?php
|
325 |
+
break;
|
326 |
+
|
327 |
+
case 'textarea':
|
328 |
+
?>
|
329 |
+
<p>
|
330 |
+
<label for="<?php echo esc_attr( $self->get_field_id( $value['id'] ) ); ?>"><?php echo $value['name']; ?></label>
|
331 |
+
<textarea class="widefat" id="<?php echo esc_attr( $self->get_field_id( $value['id'] ) ); ?>" name="<?php echo esc_attr( $self->get_field_name( $value['id'] ) ); ?>" rows="5"><?php echo esc_attr( $value['default'] ); ?></textarea>
|
332 |
+
</p>
|
333 |
+
<?php
|
334 |
+
break;
|
335 |
+
|
336 |
+
case 'number':
|
337 |
+
?>
|
338 |
+
<p class="<?php echo $class; ?>">
|
339 |
+
<label for="<?php echo esc_attr( $self->get_field_id( $value['id'] ) ); ?>"><?php echo $value['name']; ?></label>
|
340 |
+
<input class="widefat" type="number" id="<?php echo esc_attr( $self->get_field_id( $value['id'] ) ); ?>" name="<?php echo esc_attr( $self->get_field_name( $value['id'] ) ); ?>" value="<?php echo esc_attr( $value['default'] ); ?>"/>
|
341 |
+
</p>
|
342 |
+
<?php
|
343 |
+
break;
|
344 |
+
|
345 |
+
case 'separator':
|
346 |
+
?>
|
347 |
+
<hr />
|
348 |
+
<?php
|
349 |
+
break;
|
350 |
+
}
|
351 |
+
}
|
352 |
+
}
|
353 |
+
}
|
354 |
+
|
355 |
+
/**
|
356 |
+
* Generate repeatable fields.
|
357 |
+
*
|
358 |
+
* @return array $icons Get all icons details.
|
359 |
+
*/
|
360 |
+
public static function get_icons() {
|
361 |
+
$icons = array(
|
362 |
+
'astra-icon-google-plus' => array(
|
363 |
+
'color' => '#db4437',
|
364 |
+
),
|
365 |
+
'astra-icon-google' => array(
|
366 |
+
'color' => '#',
|
367 |
+
),
|
368 |
+
'astra-icon-twitter' => array(
|
369 |
+
'color' => '#1da1f2',
|
370 |
+
),
|
371 |
+
'astra-icon-facebook' => array(
|
372 |
+
'color' => '#3b5998',
|
373 |
+
),
|
374 |
+
'astra-icon-facebook-f' => array(
|
375 |
+
'color' => '#3b5998',
|
376 |
+
),
|
377 |
+
'astra-icon-check-circle' => array(
|
378 |
+
'color' => '#',
|
379 |
+
),
|
380 |
+
'astra-icon-shopping-cart' => array(
|
381 |
+
'color' => '#',
|
382 |
+
),
|
383 |
+
'astra-icon-shopping-bag' => array(
|
384 |
+
'color' => '#',
|
385 |
+
),
|
386 |
+
'astra-icon-shopping-basket' => array(
|
387 |
+
'color' => '#',
|
388 |
+
),
|
389 |
+
'astra-icon-circle-o' => array(
|
390 |
+
'color' => '#',
|
391 |
+
),
|
392 |
+
'astra-icon-certificate' => array(
|
393 |
+
'color' => '#',
|
394 |
+
),
|
395 |
+
'astra-icon-envelope' => array(
|
396 |
+
'color' => '#',
|
397 |
+
),
|
398 |
+
'astra-icon-file' => array(
|
399 |
+
'color' => '#',
|
400 |
+
),
|
401 |
+
'astra-icon-phone' => array(
|
402 |
+
'color' => '#',
|
403 |
+
),
|
404 |
+
'astra-icon-globe' => array(
|
405 |
+
'color' => '#',
|
406 |
+
),
|
407 |
+
'astra-icon-down_arrow' => array(
|
408 |
+
'color' => '#',
|
409 |
+
),
|
410 |
+
'astra-icon-close' => array(
|
411 |
+
'color' => '#',
|
412 |
+
),
|
413 |
+
'astra-icon-drag_handle' => array(
|
414 |
+
'color' => '#',
|
415 |
+
),
|
416 |
+
'astra-icon-format_align_justify' => array(
|
417 |
+
'color' => '#',
|
418 |
+
),
|
419 |
+
'astra-icon-menu' => array(
|
420 |
+
'color' => '#',
|
421 |
+
),
|
422 |
+
'astra-icon-reorder' => array(
|
423 |
+
'color' => '#',
|
424 |
+
),
|
425 |
+
'astra-icon-search' => array(
|
426 |
+
'color' => '#',
|
427 |
+
),
|
428 |
+
'astra-icon-zoom_in' => array(
|
429 |
+
'color' => '#',
|
430 |
+
),
|
431 |
+
);
|
432 |
+
return $icons;
|
433 |
+
}
|
434 |
+
|
435 |
+
/**
|
436 |
+
* Generate repeatable fields.
|
437 |
+
*
|
438 |
+
* @param object $self Widget object.
|
439 |
+
* @param array $fields Fields array.
|
440 |
+
* @param array $value Default value.
|
441 |
+
* @return void
|
442 |
+
*/
|
443 |
+
function generate_repeater_fields( $self, $fields, $value ) {
|
444 |
+
$instances = $self->get_settings();
|
445 |
+
|
446 |
+
if ( array_key_exists( $self->number, $instances ) ) {
|
447 |
+
$instance = $instances[ $self->number ];
|
448 |
+
|
449 |
+
if ( array_key_exists( $value['id'], $instance ) ) {
|
450 |
+
$stored = $instance[ $value['id'] ];
|
451 |
+
$repeater_options = $value['options'];
|
452 |
+
$repeater_fields = array();
|
453 |
+
foreach ( $repeater_options as $index => $field ) {
|
454 |
+
foreach ( $stored as $stored_index => $stored_field ) {
|
455 |
+
foreach ( $stored_field as $stored_field_id => $stored_field_value ) {
|
456 |
+
if ( $stored_field_id === $field['id'] ) {
|
457 |
+
$field['default'] = $stored_field_value;
|
458 |
+
$repeater_fields[ $stored_index ][] = $field;
|
459 |
+
}
|
460 |
+
}
|
461 |
+
}
|
462 |
+
}
|
463 |
+
|
464 |
+
// Generate field.
|
465 |
+
foreach ( $repeater_fields as $index => $fields ) {
|
466 |
+
?>
|
467 |
+
<div class="astra-repeater-field">
|
468 |
+
<div class="actions">
|
469 |
+
<span class="index"><?php echo $index; ?></span>
|
470 |
+
<span class="dashicons dashicons-move"></span>
|
471 |
+
<span class="title"></span>
|
472 |
+
<span class="dashicons dashicons-admin-page clone"></span>
|
473 |
+
<span class="dashicons dashicons-trash remove"></span>
|
474 |
+
</div>
|
475 |
+
<div class="markukp">
|
476 |
+
<?php $this->generate( $self, $fields, $value['id'] ); ?>
|
477 |
+
</div>
|
478 |
+
</div>
|
479 |
+
<?php
|
480 |
+
}
|
481 |
+
}
|
482 |
+
}
|
483 |
+
}
|
484 |
+
|
485 |
+
}
|
486 |
+
|
487 |
+
/**
|
488 |
+
* Initialize class object with 'get_instance()' method
|
489 |
+
*/
|
490 |
+
Astra_Widgets_Helper::get_instance();
|
491 |
+
|
492 |
+
endif;
|
493 |
+
|
494 |
+
/**
|
495 |
+
* Generate Widget Fields
|
496 |
+
*
|
497 |
+
* @since 1.0.0
|
498 |
+
*/
|
499 |
+
if ( ! function_exists( 'astra_generate_widget_fields' ) ) :
|
500 |
+
|
501 |
+
/**
|
502 |
+
* Wrapper function of `generate()`
|
503 |
+
*
|
504 |
+
* @param object $self Widget object.
|
505 |
+
* @param array $fields Fields array.
|
506 |
+
* @param string $repeater_id Repeater ID.
|
507 |
+
* @return void
|
508 |
+
*/
|
509 |
+
function astra_generate_widget_fields( $self, $fields = array(), $repeater_id = '' ) {
|
510 |
+
Astra_Widgets_Helper::get_instance()->generate( $self, $fields, $repeater_id );
|
511 |
+
}
|
512 |
+
endif;
|
classes/class-astra-widgets-loader.php
ADDED
@@ -0,0 +1,105 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Astra Widgets - Loader.
|
4 |
+
*
|
5 |
+
* @package Astra Addon
|
6 |
+
* @since 1.0.0
|
7 |
+
*/
|
8 |
+
|
9 |
+
if ( ! class_exists( 'Astra_Widgets_Loader' ) ) {
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Customizer Initialization
|
13 |
+
*
|
14 |
+
* @since 1.0.0
|
15 |
+
*/
|
16 |
+
class Astra_Widgets_Loader {
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Member Variable
|
20 |
+
*
|
21 |
+
* @var instance
|
22 |
+
*/
|
23 |
+
private static $instance;
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Initiator
|
27 |
+
*/
|
28 |
+
public static function get_instance() {
|
29 |
+
if ( ! isset( self::$instance ) ) {
|
30 |
+
self::$instance = new self;
|
31 |
+
}
|
32 |
+
return self::$instance;
|
33 |
+
}
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Constructor
|
37 |
+
*/
|
38 |
+
public function __construct() {
|
39 |
+
|
40 |
+
// Helper.
|
41 |
+
require_once ASTRA_WIDGETS_DIR . 'classes/class-astra-widgets-helper.php';
|
42 |
+
|
43 |
+
// Add Widget.
|
44 |
+
require_once ASTRA_WIDGETS_DIR . 'classes/widgets/class-astra-widget-address.php';
|
45 |
+
require_once ASTRA_WIDGETS_DIR . 'classes/widgets/class-astra-widget-list-icons.php';
|
46 |
+
require_once ASTRA_WIDGETS_DIR . 'classes/widgets/class-astra-widget-social-profiles.php';
|
47 |
+
|
48 |
+
add_action( 'widgets_init', array( $this, 'register_list_icons_widgets' ) );
|
49 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_scripts' ) );
|
50 |
+
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
|
51 |
+
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts_backend_and_frontend' ) );
|
52 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts_backend_and_frontend' ) );
|
53 |
+
|
54 |
+
}
|
55 |
+
|
56 |
+
/**
|
57 |
+
* Regiter List Icons widget
|
58 |
+
*
|
59 |
+
* @return void
|
60 |
+
*/
|
61 |
+
function register_list_icons_widgets() {
|
62 |
+
register_widget( 'Astra_Widget_Address' );
|
63 |
+
register_widget( 'Astra_Widget_List_Icons' );
|
64 |
+
register_widget( 'Astra_Widget_Social_Profiles' );
|
65 |
+
}
|
66 |
+
|
67 |
+
/**
|
68 |
+
* Regiter Social Icons widget script
|
69 |
+
*
|
70 |
+
* @param string $hook Page name.
|
71 |
+
* @return void
|
72 |
+
*/
|
73 |
+
function enqueue_admin_scripts( $hook ) {
|
74 |
+
|
75 |
+
if ( 'widgets.php' !== $hook ) {
|
76 |
+
return;
|
77 |
+
}
|
78 |
+
|
79 |
+
wp_enqueue_style( 'astra-widgets-backend', ASTRA_WIDGETS_URI . 'assets/css/unminified/astra-widgets-admin.css', null, ASTRA_WIDGETS_VER, 'all' );
|
80 |
+
wp_enqueue_script( 'astra-widgets-backend', ASTRA_WIDGETS_URI . 'assets/js/unminified/astra-widgets-backend.js', array( 'jquery', 'jquery-ui-sortable', 'wp-color-picker' ), ASTRA_WIDGETS_VER, true );
|
81 |
+
}
|
82 |
+
|
83 |
+
/**
|
84 |
+
* Regiter Social Icons widget script
|
85 |
+
*
|
86 |
+
* @return void
|
87 |
+
*/
|
88 |
+
function enqueue_scripts() {
|
89 |
+
wp_enqueue_style( 'astra-widgets-style', ASTRA_WIDGETS_URI . 'assets/css/unminified/style.css', null, ASTRA_WIDGETS_VER, 'all' );
|
90 |
+
}
|
91 |
+
|
92 |
+
/**
|
93 |
+
* Regiter Social Icons widget script
|
94 |
+
*
|
95 |
+
* @return void
|
96 |
+
*/
|
97 |
+
function enqueue_scripts_backend_and_frontend() {
|
98 |
+
}
|
99 |
+
}
|
100 |
+
}
|
101 |
+
|
102 |
+
/**
|
103 |
+
* Kicking this off by calling 'get_instance()' method
|
104 |
+
*/
|
105 |
+
Astra_Widgets_Loader::get_instance();
|
classes/class-astra-widgets.php
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Initialize Astra Widgets
|
4 |
+
*
|
5 |
+
* @package Astra Widgets
|
6 |
+
* @since 1.0.0
|
7 |
+
*/
|
8 |
+
|
9 |
+
if ( ! class_exists( 'Astra_Widgets' ) ) :
|
10 |
+
/**
|
11 |
+
* Astra Widgets
|
12 |
+
*
|
13 |
+
* @since 1.0.0
|
14 |
+
*/
|
15 |
+
class Astra_Widgets {
|
16 |
+
/**
|
17 |
+
* Instance
|
18 |
+
*
|
19 |
+
* @access private
|
20 |
+
* @var object Class Instance.
|
21 |
+
* @since 1.0.0
|
22 |
+
*/
|
23 |
+
private static $instance;
|
24 |
+
/**
|
25 |
+
* Initiator
|
26 |
+
*
|
27 |
+
* @since 1.0.0
|
28 |
+
* @return object initialized object of class.
|
29 |
+
*/
|
30 |
+
public static function get_instance() {
|
31 |
+
if ( ! isset( self::$instance ) ) {
|
32 |
+
self::$instance = new self;
|
33 |
+
}
|
34 |
+
return self::$instance;
|
35 |
+
}
|
36 |
+
/**
|
37 |
+
* Constructor
|
38 |
+
*/
|
39 |
+
public function __construct() {
|
40 |
+
// Init.
|
41 |
+
require_once ASTRA_WIDGETS_DIR . 'classes/class-astra-widgets-loader.php';
|
42 |
+
}
|
43 |
+
}
|
44 |
+
/**
|
45 |
+
* Kicking this off by calling 'get_instance()' method
|
46 |
+
*/
|
47 |
+
Astra_Widgets::get_instance();
|
48 |
+
endif;
|
classes/index.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Index file
|
4 |
+
*
|
5 |
+
* @package Astra Addon
|
6 |
+
* @since 1.6.0
|
7 |
+
*/
|
8 |
+
|
9 |
+
/* Silence is golden, and we agree. */
|
classes/widgets/class-astra-widget-address.php
ADDED
@@ -0,0 +1,232 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Address Widget
|
4 |
+
*
|
5 |
+
* @package Astra Addon
|
6 |
+
* @since 1.0.0
|
7 |
+
*/
|
8 |
+
|
9 |
+
if ( ! class_exists( 'Astra_Widget_Address' ) ) :
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Astra_Widget_Address
|
13 |
+
*
|
14 |
+
* @since 1.0.0
|
15 |
+
*/
|
16 |
+
class Astra_Widget_Address extends WP_Widget {
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Instance
|
20 |
+
*
|
21 |
+
* @since 1.0.0
|
22 |
+
*
|
23 |
+
* @access private
|
24 |
+
* @var object Class object.
|
25 |
+
*/
|
26 |
+
private static $instance;
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Widget Base
|
30 |
+
*
|
31 |
+
* @since 1.0.0
|
32 |
+
*
|
33 |
+
* @access public
|
34 |
+
* @var object Class object.
|
35 |
+
*/
|
36 |
+
public $id_base = 'astra-widget-address';
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Initiator
|
40 |
+
*
|
41 |
+
* @since 1.0.0
|
42 |
+
*
|
43 |
+
* @return object initialized object of class.
|
44 |
+
*/
|
45 |
+
public static function get_instance() {
|
46 |
+
if ( ! isset( self::$instance ) ) {
|
47 |
+
self::$instance = new self();
|
48 |
+
}
|
49 |
+
return self::$instance;
|
50 |
+
}
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Constructor
|
54 |
+
*
|
55 |
+
* @since 1.0.0
|
56 |
+
*/
|
57 |
+
function __construct() {
|
58 |
+
parent::__construct(
|
59 |
+
$this->id_base,
|
60 |
+
__( 'Astra: Address', 'astra-widgets' ),
|
61 |
+
array(
|
62 |
+
'classname' => $this->id_base,
|
63 |
+
'description' => __( 'Display Address.', 'astra-widgets' ),
|
64 |
+
),
|
65 |
+
array(
|
66 |
+
'id_base' => $this->id_base,
|
67 |
+
)
|
68 |
+
);
|
69 |
+
}
|
70 |
+
|
71 |
+
/**
|
72 |
+
* Widget
|
73 |
+
*
|
74 |
+
* @param array $args Widget arguments.
|
75 |
+
* @param array $instance Widget instance.
|
76 |
+
* @return void
|
77 |
+
*/
|
78 |
+
function widget( $args, $instance ) {
|
79 |
+
|
80 |
+
wp_enqueue_style( 'astra-widgets-font-style' );
|
81 |
+
|
82 |
+
$title = apply_filters( 'widget_title', $instance['title'] );
|
83 |
+
$style = isset( $instance['style'] ) ? $instance['style'] : 'stack';
|
84 |
+
$social_icons = isset( $instance['display-icons'] ) ? $instance['display-icons'] : false;
|
85 |
+
$address = isset( $instance['address'] ) ? $instance['address'] : '';
|
86 |
+
$phone = isset( $instance['phone'] ) ? $instance['phone'] : '';
|
87 |
+
$fax = isset( $instance['fax'] ) ? $instance['fax'] : '';
|
88 |
+
$email = isset( $instance['email'] ) ? $instance['email'] : '';
|
89 |
+
|
90 |
+
// Before Widget.
|
91 |
+
echo $args['before_widget'];
|
92 |
+
if ( $title ) {
|
93 |
+
echo $args['before_title'] . $title . $args['after_title'];
|
94 |
+
} ?>
|
95 |
+
|
96 |
+
<div class="address clearfix">
|
97 |
+
<address class="widget-address widget-address-<?php echo esc_attr( $style ); ?> widget-address-icons-<?php echo esc_attr( $social_icons ); ?>">
|
98 |
+
|
99 |
+
<?php if ( ! empty( $address ) ) { ?>
|
100 |
+
<div class="widget-address-field">
|
101 |
+
<?php if ( $social_icons ) { ?>
|
102 |
+
<span class="astra-icon-globe address-icons"></span>
|
103 |
+
<?php } ?>
|
104 |
+
<span class="address-meta"><?php echo nl2br( $address ); ?></span>
|
105 |
+
</div>
|
106 |
+
<?php } ?>
|
107 |
+
<?php if ( ! empty( $phone ) ) { ?>
|
108 |
+
<div class="widget-address-field">
|
109 |
+
<?php if ( $social_icons ) { ?>
|
110 |
+
<span class="astra-icon-phone address-icons"></span>
|
111 |
+
<?php } ?>
|
112 |
+
<span class="address-meta">
|
113 |
+
<a href="tel:+<?php echo preg_replace( '/\D/', '', esc_attr( $phone ) ); ?>" ><?php echo esc_attr( $phone ); ?></a>
|
114 |
+
</span>
|
115 |
+
</div>
|
116 |
+
<?php } ?>
|
117 |
+
<?php if ( ! empty( $fax ) ) { ?>
|
118 |
+
<div class="widget-address-field">
|
119 |
+
<?php if ( $social_icons ) { ?>
|
120 |
+
<span class="astra-icon-file address-icons"></span>
|
121 |
+
<?php } ?>
|
122 |
+
<span class="address-meta"><?php echo esc_attr( $fax ); ?></span>
|
123 |
+
</div>
|
124 |
+
<?php } ?>
|
125 |
+
<?php
|
126 |
+
if ( ! empty( $email ) ) {
|
127 |
+
$email = sanitize_email( $email );
|
128 |
+
?>
|
129 |
+
<div class="widget-address-field">
|
130 |
+
<?php if ( $social_icons ) { ?>
|
131 |
+
<span class="astra-icon-envelope address-icons"></span>
|
132 |
+
<?php } ?>
|
133 |
+
<span class="address-meta">
|
134 |
+
<a href="mailto:<?php echo antispambot( $email ); ?>" ><?php echo antispambot( $email ); ?></a>
|
135 |
+
</span>
|
136 |
+
</div>
|
137 |
+
<?php } ?>
|
138 |
+
</address>
|
139 |
+
</div>
|
140 |
+
|
141 |
+
<?php
|
142 |
+
|
143 |
+
// After Widget.
|
144 |
+
echo $args['after_widget'];
|
145 |
+
}
|
146 |
+
|
147 |
+
/**
|
148 |
+
* Update
|
149 |
+
*
|
150 |
+
* @param array $new_instance Widget new instance.
|
151 |
+
* @param array $old_instance Widget old instance.
|
152 |
+
* @return array Merged updated instance.
|
153 |
+
*/
|
154 |
+
function update( $new_instance, $old_instance ) {
|
155 |
+
|
156 |
+
$instance = wp_parse_args( $new_instance, $old_instance );
|
157 |
+
|
158 |
+
/**
|
159 |
+
* Checkbox field support!
|
160 |
+
*
|
161 |
+
* @todo The checkbox field we need to set the boolean value `true/false`
|
162 |
+
* For now we have not able to detect the `checkbox` field in `generate` of class `Astra_Widgets_Helper`.
|
163 |
+
*/
|
164 |
+
$instance['display-icons'] = isset( $new_instance['display-icons'] ) ? (bool) $new_instance['display-icons'] : false;
|
165 |
+
|
166 |
+
return $instance;
|
167 |
+
}
|
168 |
+
|
169 |
+
/**
|
170 |
+
* Widget Form
|
171 |
+
*
|
172 |
+
* @param array $instance Widget instance.
|
173 |
+
* @return void
|
174 |
+
*/
|
175 |
+
function form( $instance ) {
|
176 |
+
|
177 |
+
$fields = array(
|
178 |
+
array(
|
179 |
+
'type' => 'text',
|
180 |
+
'id' => 'title',
|
181 |
+
'name' => __( 'Title:', 'astra-widgets' ),
|
182 |
+
'default' => ( isset( $instance['title'] ) && ! empty( $instance['title'] ) ) ? $instance['title'] : '',
|
183 |
+
),
|
184 |
+
array(
|
185 |
+
'name' => 'Style',
|
186 |
+
'id' => 'style',
|
187 |
+
'type' => 'select',
|
188 |
+
'default' => ( isset( $instance['style'] ) && ! empty( $instance['style'] ) ) ? $instance['style'] : 'stack',
|
189 |
+
'options' => array(
|
190 |
+
'inline' => __( 'Inline', 'astra-widgets' ),
|
191 |
+
'stack' => __( 'Stack', 'astra-widgets' ),
|
192 |
+
),
|
193 |
+
),
|
194 |
+
array(
|
195 |
+
'type' => 'checkbox',
|
196 |
+
'id' => 'display-icons',
|
197 |
+
'name' => __( 'Display Icons?', 'astra-widgets' ),
|
198 |
+
'default' => ( isset( $instance['display-icons'] ) && ! empty( $instance['display-icons'] ) ) ? $instance['display-icons'] : false,
|
199 |
+
),
|
200 |
+
array(
|
201 |
+
'type' => 'textarea',
|
202 |
+
'id' => 'address',
|
203 |
+
'name' => __( 'Address:', 'astra-widgets' ),
|
204 |
+
'default' => ( isset( $instance['address'] ) && ! empty( $instance['address'] ) ) ? $instance['address'] : '',
|
205 |
+
),
|
206 |
+
array(
|
207 |
+
'type' => 'text',
|
208 |
+
'id' => 'phone',
|
209 |
+
'name' => __( 'Phone:', 'astra-widgets' ),
|
210 |
+
'default' => ( isset( $instance['phone'] ) && ! empty( $instance['phone'] ) ) ? $instance['phone'] : '',
|
211 |
+
),
|
212 |
+
array(
|
213 |
+
'type' => 'text',
|
214 |
+
'id' => 'fax',
|
215 |
+
'name' => __( 'FAX:', 'astra-widgets' ),
|
216 |
+
'default' => ( isset( $instance['fax'] ) && ! empty( $instance['fax'] ) ) ? $instance['fax'] : '',
|
217 |
+
),
|
218 |
+
array(
|
219 |
+
'type' => 'text',
|
220 |
+
'id' => 'email',
|
221 |
+
'name' => __( 'Email:', 'astra-widgets' ),
|
222 |
+
'default' => ( isset( $instance['email'] ) && ! empty( $instance['email'] ) ) ? $instance['email'] : '',
|
223 |
+
),
|
224 |
+
);
|
225 |
+
|
226 |
+
// Generate fields.
|
227 |
+
astra_generate_widget_fields( $this, $fields );
|
228 |
+
}
|
229 |
+
|
230 |
+
}
|
231 |
+
|
232 |
+
endif;
|
classes/widgets/class-astra-widget-list-icons.php
ADDED
@@ -0,0 +1,364 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Widget List Icons
|
4 |
+
*
|
5 |
+
* @package Astra Addon
|
6 |
+
* @since 1.0.0
|
7 |
+
*/
|
8 |
+
|
9 |
+
if ( ! class_exists( 'Astra_Widget_List_Icons' ) ) :
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Astra_Widget_List_Icons
|
13 |
+
*
|
14 |
+
* @since 1.0.0
|
15 |
+
*/
|
16 |
+
class Astra_Widget_List_Icons extends WP_Widget {
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Instance
|
20 |
+
*
|
21 |
+
* @since 1.0.0
|
22 |
+
*
|
23 |
+
* @access private
|
24 |
+
* @var object Class object.
|
25 |
+
*/
|
26 |
+
private static $instance;
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Widget Base
|
30 |
+
*
|
31 |
+
* @since 1.0.0
|
32 |
+
*
|
33 |
+
* @access public
|
34 |
+
* @var string Widget ID base.
|
35 |
+
*/
|
36 |
+
public $id_base = 'astra-widget-list-icons';
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Stored data
|
40 |
+
*
|
41 |
+
* @since 1.0.0
|
42 |
+
*
|
43 |
+
* @access private
|
44 |
+
* @var array Widget stored data.
|
45 |
+
*/
|
46 |
+
private $stored_data = array();
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Initiator
|
50 |
+
*
|
51 |
+
* @since 1.0.0
|
52 |
+
*
|
53 |
+
* @return object initialized object of class.
|
54 |
+
*/
|
55 |
+
public static function get_instance() {
|
56 |
+
if ( ! isset( self::$instance ) ) {
|
57 |
+
self::$instance = new self;
|
58 |
+
}
|
59 |
+
return self::$instance;
|
60 |
+
}
|
61 |
+
|
62 |
+
/**
|
63 |
+
* Constructor
|
64 |
+
*
|
65 |
+
* @since 1.0.0
|
66 |
+
*/
|
67 |
+
function __construct() {
|
68 |
+
parent::__construct(
|
69 |
+
$this->id_base,
|
70 |
+
__( 'Astra: List Icons', 'astra-widgets' ),
|
71 |
+
array(
|
72 |
+
'classname' => $this->id_base,
|
73 |
+
'description' => __( 'Display list icons.', 'astra-widgets' ),
|
74 |
+
),
|
75 |
+
array(
|
76 |
+
'id_base' => $this->id_base,
|
77 |
+
)
|
78 |
+
);
|
79 |
+
|
80 |
+
add_action( 'wp_enqueue_scripts', array( $this, 'register_scripts' ) );
|
81 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'register_admin_scripts' ) );
|
82 |
+
}
|
83 |
+
|
84 |
+
/**
|
85 |
+
* Register admin scripts
|
86 |
+
*
|
87 |
+
* @return void
|
88 |
+
*/
|
89 |
+
function register_admin_scripts() {
|
90 |
+
wp_register_script( 'astra-widgets-' . $this->id_base, ASTRA_WIDGETS_URI . 'assets/js/unminified/astra-widget-list-icons.js' );
|
91 |
+
}
|
92 |
+
|
93 |
+
/**
|
94 |
+
* Register scripts
|
95 |
+
*
|
96 |
+
* @return void
|
97 |
+
*/
|
98 |
+
function register_scripts() {
|
99 |
+
wp_register_style( 'astra-widgets-' . $this->id_base, ASTRA_WIDGETS_URI . 'assets/css/unminified/astra-widget-list-icons.css' );
|
100 |
+
}
|
101 |
+
|
102 |
+
/**
|
103 |
+
* Get fields
|
104 |
+
*
|
105 |
+
* @param string $field Widget field.
|
106 |
+
* @param mixed $default Widget field default value.
|
107 |
+
* @return mixed stored/default widget field value.
|
108 |
+
*/
|
109 |
+
function get_fields( $field = '', $default = '' ) {
|
110 |
+
|
111 |
+
// Emtpy stored values.
|
112 |
+
if ( empty( $this->stored_data ) ) {
|
113 |
+
return $default;
|
114 |
+
}
|
115 |
+
|
116 |
+
// Emtpy field.
|
117 |
+
if ( empty( $field ) ) {
|
118 |
+
return $default;
|
119 |
+
}
|
120 |
+
|
121 |
+
if ( ! array_key_exists( $field, $this->stored_data ) ) {
|
122 |
+
return $default;
|
123 |
+
}
|
124 |
+
|
125 |
+
return $this->stored_data[ $field ];
|
126 |
+
}
|
127 |
+
|
128 |
+
/**
|
129 |
+
* Frontend setup
|
130 |
+
*
|
131 |
+
* @param array $args Widget arguments.
|
132 |
+
* @param array $instance Widget instance.
|
133 |
+
* @return void
|
134 |
+
*/
|
135 |
+
function _front_setup( $args, $instance ) {
|
136 |
+
|
137 |
+
// Set stored data.
|
138 |
+
$this->stored_data = $instance;
|
139 |
+
|
140 |
+
// Enqueue Scripts.
|
141 |
+
wp_enqueue_style( 'astra-widgets-' . $this->id_base );
|
142 |
+
|
143 |
+
// Enqueue dynamic Scripts.
|
144 |
+
wp_add_inline_style( 'astra-widgets-' . $this->id_base, $this->get_dynamic_css() );
|
145 |
+
|
146 |
+
}
|
147 |
+
|
148 |
+
/**
|
149 |
+
* Widget
|
150 |
+
*
|
151 |
+
* @param array $args Widget arguments.
|
152 |
+
* @param array $instance Widget instance.
|
153 |
+
* @return void
|
154 |
+
*/
|
155 |
+
function widget( $args, $instance ) {
|
156 |
+
|
157 |
+
$this->_front_setup( $args, $instance );
|
158 |
+
|
159 |
+
$width = $instance['width'] ? $instance['width'] : '';
|
160 |
+
|
161 |
+
if ( ! empty( $width ) ) {
|
162 |
+
$width = 'style= max-width:' . esc_attr( $width ) . 'px';
|
163 |
+
}
|
164 |
+
|
165 |
+
$list = $this->get_fields( 'list', array() );
|
166 |
+
$title = apply_filters( 'widget_title', $this->get_fields( 'title' ) );
|
167 |
+
|
168 |
+
// Before Widget.
|
169 |
+
echo $args['before_widget'];
|
170 |
+
if ( $title ) {
|
171 |
+
echo $args['before_title'] . $title . $args['after_title'];
|
172 |
+
} ?>
|
173 |
+
|
174 |
+
<div class="astra-widget-list-icons clearfix">
|
175 |
+
<?php if ( ! empty( $list ) ) { ?>
|
176 |
+
<ul>
|
177 |
+
<?php
|
178 |
+
foreach ( $list as $index => $list ) {
|
179 |
+
$target = ( 'same-page' === $list['link-target'] ) ? '_self' : '_blank';
|
180 |
+
$rel = ( 'enable' === $list['nofollow'] ) ? 'noopener nofollow' : '';
|
181 |
+
?>
|
182 |
+
<li>
|
183 |
+
<div class="link">
|
184 |
+
<a href="<?php echo esc_url( $list['link'] ); ?>" target="<?php echo esc_attr( $target ); ?>" rel="<?php echo esc_attr( $rel ); ?>">
|
185 |
+
<?php if ( 'icon' === $list['imageoricon'] ) { ?>
|
186 |
+
<div class="icon">
|
187 |
+
<span class="<?php echo esc_html( $list['icon'] ); ?>"></span>
|
188 |
+
</div>
|
189 |
+
<?php } ?>
|
190 |
+
<?php if ( 'image' === $list['imageoricon'] ) { ?>
|
191 |
+
<div class="image" <?php echo esc_attr( $width ); ?>>
|
192 |
+
<?php echo wp_get_attachment_image( $list['image'] ); ?>
|
193 |
+
</div>
|
194 |
+
<?php } ?>
|
195 |
+
|
196 |
+
<span class="link-text"><?php echo esc_html( $list['title'] ); ?></span>
|
197 |
+
|
198 |
+
</a>
|
199 |
+
</div>
|
200 |
+
</li>
|
201 |
+
<?php } ?>
|
202 |
+
</ul>
|
203 |
+
<?php } ?>
|
204 |
+
</div>
|
205 |
+
<?php
|
206 |
+
|
207 |
+
// After Widget.
|
208 |
+
echo $args['after_widget'];
|
209 |
+
}
|
210 |
+
|
211 |
+
/**
|
212 |
+
* Update
|
213 |
+
*
|
214 |
+
* @param array $new_instance Widget new instance.
|
215 |
+
* @param array $old_instance Widget old instance.
|
216 |
+
* @return array Merged updated instance.
|
217 |
+
*/
|
218 |
+
function update( $new_instance, $old_instance ) {
|
219 |
+
return wp_parse_args( $new_instance, $old_instance );
|
220 |
+
}
|
221 |
+
|
222 |
+
/**
|
223 |
+
* Widget Form
|
224 |
+
*
|
225 |
+
* @param array $instance Widget instance.
|
226 |
+
* @return void
|
227 |
+
*/
|
228 |
+
function form( $instance ) {
|
229 |
+
|
230 |
+
$custom_css = " .body{ background: '#000'; }";
|
231 |
+
wp_enqueue_script( 'astra-widgets-' . $this->id_base );
|
232 |
+
wp_add_inline_style( 'astra-font-style-style', $custom_css );
|
233 |
+
|
234 |
+
$fields = array(
|
235 |
+
array(
|
236 |
+
'type' => 'text',
|
237 |
+
'id' => 'title',
|
238 |
+
'name' => __( 'Title:', 'astra-widgets' ),
|
239 |
+
'default' => ( isset( $instance['title'] ) && ! empty( $instance['title'] ) ) ? $instance['title'] : '',
|
240 |
+
),
|
241 |
+
array(
|
242 |
+
'id' => 'list',
|
243 |
+
'type' => 'repeater',
|
244 |
+
'title' => __( 'Add Item:', 'astra-widgets' ),
|
245 |
+
'options' => array(
|
246 |
+
array(
|
247 |
+
'type' => 'text',
|
248 |
+
'id' => 'title',
|
249 |
+
'name' => __( 'Title:', 'astra-widgets' ),
|
250 |
+
'default' => '',
|
251 |
+
),
|
252 |
+
array(
|
253 |
+
'type' => 'text',
|
254 |
+
'id' => 'link',
|
255 |
+
'name' => __( 'Link:', 'astra-widgets' ),
|
256 |
+
'default' => '',
|
257 |
+
),
|
258 |
+
array(
|
259 |
+
'type' => 'select',
|
260 |
+
'name' => 'Target',
|
261 |
+
'id' => 'link-target',
|
262 |
+
'default' => ( isset( $instance['link-target'] ) && ! empty( $instance['link-target'] ) ) ? $instance['link-target'] : 'same-page',
|
263 |
+
'options' => array(
|
264 |
+
'same-page' => __( 'Same Page', 'astra-widgets' ),
|
265 |
+
'new-page' => __( 'New Page', 'astra-widgets' ),
|
266 |
+
),
|
267 |
+
),
|
268 |
+
array(
|
269 |
+
'type' => 'select',
|
270 |
+
'id' => 'nofollow',
|
271 |
+
'name' => __( 'No Follow', 'astra-widgets' ),
|
272 |
+
'default' => ( isset( $instance['nofollow'] ) && ! empty( $instance['nofollow'] ) ) ? $instance['nofollow'] : 'enable',
|
273 |
+
'options' => array(
|
274 |
+
'enable' => __( 'Enable', 'astra-widgets' ),
|
275 |
+
'disable' => __( 'Disable', 'astra-widgets' ),
|
276 |
+
),
|
277 |
+
),
|
278 |
+
array(
|
279 |
+
'type' => 'select',
|
280 |
+
'id' => 'imageoricon',
|
281 |
+
'name' => __( 'Image / Icon', 'astra-widgets' ),
|
282 |
+
'default' => ( isset( $instance['imageoricon'] ) && ! empty( $instance['imageoricon'] ) ) ? $instance['imageoricon'] : 'icon',
|
283 |
+
'options' => array(
|
284 |
+
'image' => __( 'Image', 'astra-widgets' ),
|
285 |
+
'icon' => __( 'Icon', 'astra-widgets' ),
|
286 |
+
),
|
287 |
+
),
|
288 |
+
array(
|
289 |
+
'type' => 'image',
|
290 |
+
'id' => 'image',
|
291 |
+
'name' => __( 'Image:', 'astra-widgets' ),
|
292 |
+
'default' => '',
|
293 |
+
),
|
294 |
+
array(
|
295 |
+
'type' => 'icon',
|
296 |
+
'id' => 'icon',
|
297 |
+
'name' => __( 'Icon', 'astra-widgets' ),
|
298 |
+
'default' => '',
|
299 |
+
),
|
300 |
+
),
|
301 |
+
),
|
302 |
+
array(
|
303 |
+
'type' => 'separator',
|
304 |
+
),
|
305 |
+
array(
|
306 |
+
'type' => 'number',
|
307 |
+
'id' => 'width',
|
308 |
+
'name' => __( 'Image / Icon Width:', 'astra-widgets' ),
|
309 |
+
'default' => ( isset( $instance['width'] ) && ! empty( $instance['width'] ) ) ? $instance['width'] : '',
|
310 |
+
),
|
311 |
+
);
|
312 |
+
?>
|
313 |
+
|
314 |
+
<div class="<?php echo esc_attr( $this->id_base ); ?>-fields">
|
315 |
+
<?php
|
316 |
+
// Generate fields.
|
317 |
+
astra_generate_widget_fields( $this, $fields );
|
318 |
+
?>
|
319 |
+
</div>
|
320 |
+
<?php
|
321 |
+
}
|
322 |
+
|
323 |
+
|
324 |
+
/**
|
325 |
+
* Dynamic CSS
|
326 |
+
*
|
327 |
+
* @return string
|
328 |
+
*/
|
329 |
+
function get_dynamic_css() {
|
330 |
+
|
331 |
+
$dynamic_css = '';
|
332 |
+
|
333 |
+
$instances = get_option( 'widget_' . $this->id_base );
|
334 |
+
|
335 |
+
if ( array_key_exists( $this->number, $instances ) ) {
|
336 |
+
$instance = $instances[ $this->number ];
|
337 |
+
|
338 |
+
$width = isset( $instance['width'] ) ? $instance['width'] : '';
|
339 |
+
|
340 |
+
$css_output = '';
|
341 |
+
|
342 |
+
if ( isset( $width ) && ! empty( $width ) ) {
|
343 |
+
$css_output = array(
|
344 |
+
'.astra-widget-list-icons .image img' => array(
|
345 |
+
'min-width' => esc_attr( $width ) . 'px',
|
346 |
+
),
|
347 |
+
'.astra-widget-list-icons .icon span' => array(
|
348 |
+
'font-size' => esc_attr( $width ) . 'px',
|
349 |
+
),
|
350 |
+
);
|
351 |
+
|
352 |
+
$css_output = astra_parse_css( $css_output );
|
353 |
+
}
|
354 |
+
|
355 |
+
return $dynamic_css . $css_output;
|
356 |
+
}
|
357 |
+
|
358 |
+
return $dynamic_css;
|
359 |
+
|
360 |
+
}
|
361 |
+
|
362 |
+
}
|
363 |
+
|
364 |
+
endif;
|
classes/widgets/class-astra-widget-social-profiles.php
ADDED
@@ -0,0 +1,505 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Widget List Icons
|
4 |
+
*
|
5 |
+
* @package Astra Addon
|
6 |
+
* @since 1.6.0
|
7 |
+
*/
|
8 |
+
|
9 |
+
if ( ! class_exists( 'Astra_Widget_Social_Profiles' ) ) :
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Astra_Widget_Social_Profiles
|
13 |
+
*
|
14 |
+
* @since 1.6.0
|
15 |
+
*/
|
16 |
+
class Astra_Widget_Social_Profiles extends WP_Widget {
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Instance
|
20 |
+
*
|
21 |
+
* @since 1.6.0
|
22 |
+
*
|
23 |
+
* @access private
|
24 |
+
* @var object Class object.
|
25 |
+
*/
|
26 |
+
private static $instance;
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Widget Base
|
30 |
+
*
|
31 |
+
* @since 1.6.0
|
32 |
+
*
|
33 |
+
* @access public
|
34 |
+
* @var string Widget ID base.
|
35 |
+
*/
|
36 |
+
public $id_base = 'astra-widget-social-profiles';
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Stored data
|
40 |
+
*
|
41 |
+
* @since 1.6.0
|
42 |
+
*
|
43 |
+
* @access private
|
44 |
+
* @var array Widget stored data.
|
45 |
+
*/
|
46 |
+
private $stored_data = array();
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Initiator
|
50 |
+
*
|
51 |
+
* @since 1.6.0
|
52 |
+
*
|
53 |
+
* @return object initialized object of class.
|
54 |
+
*/
|
55 |
+
public static function get_instance() {
|
56 |
+
if ( ! isset( self::$instance ) ) {
|
57 |
+
self::$instance = new self;
|
58 |
+
}
|
59 |
+
return self::$instance;
|
60 |
+
}
|
61 |
+
|
62 |
+
/**
|
63 |
+
* Constructor
|
64 |
+
*
|
65 |
+
* @since 1.6.0
|
66 |
+
*/
|
67 |
+
function __construct() {
|
68 |
+
parent::__construct(
|
69 |
+
$this->id_base,
|
70 |
+
__( 'Astra: Social Profiles', 'astra-widgets' ),
|
71 |
+
array(
|
72 |
+
'classname' => $this->id_base,
|
73 |
+
'description' => __( 'Display social profiles.', 'astra-widgets' ),
|
74 |
+
),
|
75 |
+
array(
|
76 |
+
'id_base' => $this->id_base,
|
77 |
+
)
|
78 |
+
);
|
79 |
+
|
80 |
+
add_action( 'wp_enqueue_scripts', array( $this, 'register_scripts' ) );
|
81 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'register_admin_scripts' ) );
|
82 |
+
}
|
83 |
+
|
84 |
+
|
85 |
+
/**
|
86 |
+
* Register admin scripts
|
87 |
+
*
|
88 |
+
* @return void
|
89 |
+
*/
|
90 |
+
function register_admin_scripts() {
|
91 |
+
/* Directory and Extension */
|
92 |
+
$file_prefix = ( SCRIPT_DEBUG ) ? '' : '.min';
|
93 |
+
$dir_name = ( SCRIPT_DEBUG ) ? 'unminified' : 'minified';
|
94 |
+
|
95 |
+
$js_uri = ASTRA_WIDGETS_URI . 'assets/js/' . $dir_name . '/';
|
96 |
+
$css_uri = ASTRA_WIDGETS_URI . 'assets/css/' . $dir_name . '/';
|
97 |
+
|
98 |
+
wp_enqueue_script( 'astra-widgets-' . $this->id_base, $js_uri . 'astra-widget-social-profiles' . $file_prefix . '.js', array(), ASTRA_WIDGETS_VER );
|
99 |
+
wp_register_style( 'astra-widget-social-profiles-admin', $css_uri . 'astra-widget-social-profiles-admin' . $file_prefix . '.css' );
|
100 |
+
}
|
101 |
+
|
102 |
+
/**
|
103 |
+
* Register scripts
|
104 |
+
*
|
105 |
+
* @return void
|
106 |
+
*/
|
107 |
+
function register_scripts() {
|
108 |
+
/* Directory and Extension */
|
109 |
+
$file_prefix = ( SCRIPT_DEBUG ) ? '' : '.min';
|
110 |
+
$dir_name = ( SCRIPT_DEBUG ) ? 'unminified' : 'minified';
|
111 |
+
|
112 |
+
$js_uri = ASTRA_WIDGETS_URI . 'assets/js/' . $dir_name . '/';
|
113 |
+
$css_uri = ASTRA_WIDGETS_URI . 'assets/css/' . $dir_name . '/';
|
114 |
+
|
115 |
+
wp_register_style( 'astra-widgets-' . $this->id_base, $css_uri . 'astra-widget-social-profiles' . '.css' );
|
116 |
+
}
|
117 |
+
|
118 |
+
/**
|
119 |
+
* Get fields
|
120 |
+
*
|
121 |
+
* @param string $field Widget field.
|
122 |
+
* @param mixed $default Widget field default value.
|
123 |
+
* @return mixed stored/default widget field value.
|
124 |
+
*/
|
125 |
+
function get_fields( $field = '', $default = '' ) {
|
126 |
+
|
127 |
+
// Emtpy stored values.
|
128 |
+
if ( empty( $this->stored_data ) ) {
|
129 |
+
return $default;
|
130 |
+
}
|
131 |
+
|
132 |
+
// Emtpy field.
|
133 |
+
if ( empty( $field ) ) {
|
134 |
+
return $default;
|
135 |
+
}
|
136 |
+
|
137 |
+
if ( ! array_key_exists( $field, $this->stored_data ) ) {
|
138 |
+
return $default;
|
139 |
+
}
|
140 |
+
|
141 |
+
return $this->stored_data[ $field ];
|
142 |
+
}
|
143 |
+
|
144 |
+
/**
|
145 |
+
* Frontend setup
|
146 |
+
*
|
147 |
+
* @param array $args Widget arguments.
|
148 |
+
* @param array $instance Widget instance.
|
149 |
+
* @return void
|
150 |
+
*/
|
151 |
+
function _front_setup( $args, $instance ) {
|
152 |
+
|
153 |
+
// Set stored data.
|
154 |
+
$this->stored_data = $instance;
|
155 |
+
|
156 |
+
// Enqueue Scripts.
|
157 |
+
wp_enqueue_style( 'astra-widgets-' . $this->id_base );
|
158 |
+
|
159 |
+
// Enqueue dynamic Scripts.
|
160 |
+
wp_add_inline_style( 'astra-widgets-' . $this->id_base, $this->get_dynamic_css() );
|
161 |
+
}
|
162 |
+
|
163 |
+
/**
|
164 |
+
* Dynamic CSS
|
165 |
+
*
|
166 |
+
* @return string Dynamic CSS.
|
167 |
+
*/
|
168 |
+
function get_dynamic_css() {
|
169 |
+
|
170 |
+
$dynamic_css = '';
|
171 |
+
|
172 |
+
$instances = get_option( 'widget_' . $this->id_base );
|
173 |
+
|
174 |
+
if ( array_key_exists( $this->number, $instances ) ) {
|
175 |
+
$instance = $instances[ $this->number ];
|
176 |
+
|
177 |
+
$icon_color = isset( $instance['icon-color'] ) ? $instance['icon-color'] : '';
|
178 |
+
$bg_color = isset( $instance['bg-color'] ) ? $instance['bg-color'] : '';
|
179 |
+
$icon_hover_color = isset( $instance['icon-hover-color'] ) ? $instance['icon-hover-color'] : '';
|
180 |
+
$bg_hover_color = isset( $instance['bg-hover-color'] ) ? $instance['bg-hover-color'] : '';
|
181 |
+
$icon_width = isset( $instance['width'] ) ? $instance['width'] : '';
|
182 |
+
$color_type = isset( $instance['color-type'] ) ? $instance['color-type'] : '';
|
183 |
+
$list = isset( $instance['list'] ) ? $instance['list'] : '';
|
184 |
+
$icons_color = Astra_Widgets_Helper::get_icons();
|
185 |
+
|
186 |
+
if ( 'official-color' === $color_type ) {
|
187 |
+
|
188 |
+
$new_color_output = '';
|
189 |
+
if ( ! empty( $list ) ) {
|
190 |
+
foreach ( $list as $key => $value ) {
|
191 |
+
$str = $value['icon'];
|
192 |
+
$color_array = $icons_color[ $str ];
|
193 |
+
$icon_color_official = $color_array['color'];
|
194 |
+
|
195 |
+
$trimmed = str_replace( 'astra-icon-', '', $str );
|
196 |
+
|
197 |
+
$color_output = array(
|
198 |
+
'.astra-widget-social-profiles-inner.icon-official-color.simple li .' . $trimmed . '.icon' => array(
|
199 |
+
'color' => esc_attr( $icon_color_official ),
|
200 |
+
'background-color' => 'transparent',
|
201 |
+
),
|
202 |
+
'.astra-widget-social-profiles-inner.icon-official-color li .' . $trimmed . '.icon' => array(
|
203 |
+
'color' => '#fff',
|
204 |
+
'background-color' => esc_attr( $icon_color_official ),
|
205 |
+
),
|
206 |
+
);
|
207 |
+
$color_output = astra_parse_css( $color_output );
|
208 |
+
|
209 |
+
$new_color_output .= $color_output;
|
210 |
+
}
|
211 |
+
}
|
212 |
+
|
213 |
+
$dynamic_css .= $dynamic_css . $new_color_output;
|
214 |
+
}
|
215 |
+
|
216 |
+
$css_output = array(
|
217 |
+
'.astra-widget-social-profiles-inner li .icon' => array(
|
218 |
+
'color' => esc_attr( $icon_color ),
|
219 |
+
),
|
220 |
+
'.astra-widget-social-profiles-inner li .icon:hover' => array(
|
221 |
+
'color' => esc_attr( $icon_hover_color ),
|
222 |
+
),
|
223 |
+
'.astra-widget-social-profiles-inner.square-outline li .icon, .astra-widget-social-profiles-inner.circle-outline li .icon' => array(
|
224 |
+
'background' => 'transparent',
|
225 |
+
'color' => esc_attr( $icon_color ),
|
226 |
+
'border' => '1px solid ' . esc_attr( $bg_color ),
|
227 |
+
'color' => esc_attr( $icon_hover_color ),
|
228 |
+
),
|
229 |
+
'.astra-widget-social-profiles-inner.square .icon, .astra-widget-social-profiles-inner.circle .icon' => array(
|
230 |
+
'background' => esc_attr( $bg_color ),
|
231 |
+
'border' => '1px solid ' . esc_attr( $bg_color ),
|
232 |
+
'color' => esc_attr( $icon_color ),
|
233 |
+
),
|
234 |
+
'.astra-widget-social-profiles-inner.square-outline li .icon:hover, .astra-widget-social-profiles-inner.circle-outline li .icon:hover' => array(
|
235 |
+
'background' => 'transparent',
|
236 |
+
'color' => esc_attr( $icon_hover_color ),
|
237 |
+
'border' => '1px solid ' . esc_attr( $bg_hover_color ),
|
238 |
+
),
|
239 |
+
'.astra-widget-social-profiles-inner.square .icon:hover, .astra-widget-social-profiles-inner.circle .icon:hover' => array(
|
240 |
+
'background' => esc_attr( $bg_hover_color ),
|
241 |
+
'border' => '1px solid ' . esc_attr( $bg_hover_color ),
|
242 |
+
'color' => esc_attr( $icon_hover_color ),
|
243 |
+
),
|
244 |
+
'.astra-widget-social-profiles-inner .icon span' => array(
|
245 |
+
'font-size' => esc_attr( $icon_width ) . 'px',
|
246 |
+
),
|
247 |
+
'.astra-widget-social-profiles-inner.circle li .icon, .astra-widget-social-profiles-inner.circle-outline li .icon' => array(
|
248 |
+
'font-size' => esc_attr( $icon_width ) . 'px',
|
249 |
+
),
|
250 |
+
);
|
251 |
+
$css_output = astra_parse_css( $css_output );
|
252 |
+
$dynamic_css = $dynamic_css . $css_output;
|
253 |
+
}
|
254 |
+
|
255 |
+
return $dynamic_css;
|
256 |
+
}
|
257 |
+
|
258 |
+
/**
|
259 |
+
* Widget
|
260 |
+
*
|
261 |
+
* @param array $args Widget arguments.
|
262 |
+
* @param array $instance Widget instance.
|
263 |
+
* @return void
|
264 |
+
*/
|
265 |
+
function widget( $args, $instance ) {
|
266 |
+
|
267 |
+
$this->_front_setup( $args, $instance );
|
268 |
+
wp_enqueue_style( 'astra-widgets-font-style' );
|
269 |
+
|
270 |
+
$list = $this->get_fields( 'list', array() );
|
271 |
+
$align = $this->get_fields( 'align' );
|
272 |
+
$icon_color = $this->get_fields( 'icon-color' );
|
273 |
+
$bg_color = $this->get_fields( 'bg-color' );
|
274 |
+
$icon_hover_color = $this->get_fields( 'icon-hover-color' );
|
275 |
+
$bg_hover_color = $this->get_fields( 'bg-hover-color' );
|
276 |
+
$icon_style = $this->get_fields( 'icon-style' );
|
277 |
+
$display_title = $this->get_fields( 'display-title', false );
|
278 |
+
$color_type = $this->get_fields( 'color-type', false );
|
279 |
+
$icon = $this->get_fields( 'icon', false );
|
280 |
+
$title = apply_filters( 'widget_title', $this->get_fields( 'title' ) );
|
281 |
+
|
282 |
+
// Before Widget.
|
283 |
+
echo $args['before_widget'];
|
284 |
+
if ( $title ) {
|
285 |
+
echo $args['before_title'] . $title . $args['after_title'];
|
286 |
+
} ?>
|
287 |
+
|
288 |
+
<div class="astra-widget-social-profiles-inner clearfix <?php echo esc_attr( $align ); ?> <?php echo esc_attr( $icon_style ); ?> <?php echo 'icon-' . esc_attr( $color_type ); ?>">
|
289 |
+
<?php if ( ! empty( $list ) ) { ?>
|
290 |
+
<ul>
|
291 |
+
<?php
|
292 |
+
foreach ( $list as $index => $list ) {
|
293 |
+
$target = ( 'same-page' === $list['link-target'] ) ? '_self' : '_blank';
|
294 |
+
$rel = ( 'enable' === $list['nofollow'] ) ? 'noopener nofollow' : '';
|
295 |
+
|
296 |
+
$trimmed = str_replace( 'astra-icon-', '', $list['icon'] );
|
297 |
+
?>
|
298 |
+
<li>
|
299 |
+
<a target="_blank" href="<?php echo esc_url( $list['link'] ); ?>" target="<?php echo esc_attr( $target ); ?>" rel="<?php echo esc_attr( $rel ); ?>">
|
300 |
+
<div class="icon <?php echo esc_html( $trimmed ); ?>">
|
301 |
+
<span class="<?php echo esc_html( $list['icon'] ); ?>"></span>
|
302 |
+
</div>
|
303 |
+
<?php if ( $display_title ) { ?>
|
304 |
+
<div class="link"><?php echo esc_html( $list['title'] ); ?></div>
|
305 |
+
<?php } ?>
|
306 |
+
</a>
|
307 |
+
</li>
|
308 |
+
<?php } ?>
|
309 |
+
</ul>
|
310 |
+
<?php } ?>
|
311 |
+
</div>
|
312 |
+
|
313 |
+
<?php
|
314 |
+
|
315 |
+
// After Widget.
|
316 |
+
echo $args['after_widget'];
|
317 |
+
}
|
318 |
+
|
319 |
+
/**
|
320 |
+
* Update
|
321 |
+
*
|
322 |
+
* @param array $new_instance Widget new instance.
|
323 |
+
* @param array $old_instance Widget old instance.
|
324 |
+
* @return array Merged updated instance.
|
325 |
+
*/
|
326 |
+
function update( $new_instance, $old_instance ) {
|
327 |
+
|
328 |
+
$instance = wp_parse_args( $new_instance, $old_instance );
|
329 |
+
|
330 |
+
/**
|
331 |
+
* Checkbox field support!
|
332 |
+
*
|
333 |
+
* @todo The checkbox field we need to set the boolean value `true/false`
|
334 |
+
* For now we have not able to detect the `checkbox` field in `generate` of class `Astra_Widgets_Helper`.
|
335 |
+
*/
|
336 |
+
$instance['display-title'] = isset( $new_instance['display-title'] ) ? (bool) $new_instance['display-title'] : false;
|
337 |
+
|
338 |
+
return $instance;
|
339 |
+
}
|
340 |
+
|
341 |
+
/**
|
342 |
+
* Widget Form
|
343 |
+
*
|
344 |
+
* @param array $instance Widget instance.
|
345 |
+
* @return void
|
346 |
+
*/
|
347 |
+
function form( $instance ) {
|
348 |
+
|
349 |
+
wp_enqueue_script( 'astra-widgets-' . $this->id_base );
|
350 |
+
wp_enqueue_style( 'astra-widget-social-profiles-admin' );
|
351 |
+
wp_enqueue_style( 'astra-widgets-font-style' );
|
352 |
+
|
353 |
+
$fields = array(
|
354 |
+
array(
|
355 |
+
'type' => 'text',
|
356 |
+
'id' => 'title',
|
357 |
+
'name' => __( 'Title', 'astra-widgets' ),
|
358 |
+
'default' => ( isset( $instance['title'] ) && ! empty( $instance['title'] ) ) ? $instance['title'] : '',
|
359 |
+
),
|
360 |
+
array(
|
361 |
+
'type' => 'separator',
|
362 |
+
),
|
363 |
+
array(
|
364 |
+
'type' => 'heading',
|
365 |
+
'name' => __( 'Social Profiles', 'astra-widgets' ),
|
366 |
+
),
|
367 |
+
array(
|
368 |
+
'id' => 'list',
|
369 |
+
'type' => 'repeater',
|
370 |
+
'title' => __( 'Add Profile', 'astra-widgets' ),
|
371 |
+
'options' => array(
|
372 |
+
array(
|
373 |
+
'type' => 'text',
|
374 |
+
'id' => 'title',
|
375 |
+
'name' => __( 'Title', 'astra-widgets' ),
|
376 |
+
'default' => '',
|
377 |
+
),
|
378 |
+
array(
|
379 |
+
'type' => 'text',
|
380 |
+
'id' => 'link',
|
381 |
+
'name' => __( 'Link', 'astra-widgets' ),
|
382 |
+
'default' => '',
|
383 |
+
),
|
384 |
+
array(
|
385 |
+
'type' => 'select',
|
386 |
+
'name' => 'Target',
|
387 |
+
'id' => 'link-target',
|
388 |
+
'default' => ( isset( $instance['link-target'] ) && ! empty( $instance['link-target'] ) ) ? $instance['link-target'] : 'same-page',
|
389 |
+
'options' => array(
|
390 |
+
'same-page' => __( 'Same Page', 'astra-widgets' ),
|
391 |
+
'new-page' => __( 'New Page', 'astra-widgets' ),
|
392 |
+
),
|
393 |
+
),
|
394 |
+
array(
|
395 |
+
'type' => 'select',
|
396 |
+
'id' => 'nofollow',
|
397 |
+
'name' => __( 'No Follow', 'astra-widgets' ),
|
398 |
+
'default' => ( isset( $instance['nofollow'] ) && ! empty( $instance['nofollow'] ) ) ? $instance['nofollow'] : 'enable',
|
399 |
+
'options' => array(
|
400 |
+
'enable' => __( 'Enable', 'astra-widgets' ),
|
401 |
+
'disable' => __( 'Disable', 'astra-widgets' ),
|
402 |
+
),
|
403 |
+
),
|
404 |
+
array(
|
405 |
+
'type' => 'icon',
|
406 |
+
'id' => 'icon',
|
407 |
+
'name' => __( 'Icon', 'astra-widgets' ),
|
408 |
+
'default' => '',
|
409 |
+
'show_icon' => 'yes',
|
410 |
+
),
|
411 |
+
),
|
412 |
+
),
|
413 |
+
array(
|
414 |
+
'type' => 'separator',
|
415 |
+
),
|
416 |
+
array(
|
417 |
+
'type' => 'heading',
|
418 |
+
'name' => __( 'Styling', 'astra-widgets' ),
|
419 |
+
),
|
420 |
+
array(
|
421 |
+
'type' => 'checkbox',
|
422 |
+
'id' => 'display-title',
|
423 |
+
'name' => __( 'Display profile title?', 'astra-widgets' ),
|
424 |
+
'default' => ( isset( $instance['display-title'] ) && ! empty( $instance['display-title'] ) ) ? $instance['display-title'] : false,
|
425 |
+
),
|
426 |
+
array(
|
427 |
+
'type' => 'select',
|
428 |
+
'id' => 'align',
|
429 |
+
'name' => __( 'Alignment', 'astra-widgets' ),
|
430 |
+
'default' => isset( $instance['align'] ) ? $instance['align'] : '',
|
431 |
+
'options' => array(
|
432 |
+
'inline' => __( 'Inline', 'astra-widgets' ),
|
433 |
+
'stack' => __( 'Stack', 'astra-widgets' ),
|
434 |
+
),
|
435 |
+
),
|
436 |
+
array(
|
437 |
+
'type' => 'select',
|
438 |
+
'id' => 'icon-style',
|
439 |
+
'name' => __( 'Icon Style', 'astra-widgets' ),
|
440 |
+
'default' => isset( $instance['icon-style'] ) ? $instance['icon-style'] : '',
|
441 |
+
'options' => array(
|
442 |
+
'simple' => __( 'Simple', 'astra-widgets' ),
|
443 |
+
'circle' => __( 'Circle', 'astra-widgets' ),
|
444 |
+
'square' => __( 'Square', 'astra-widgets' ),
|
445 |
+
'circle-outline' => __( 'Circle Outline', 'astra-widgets' ),
|
446 |
+
'square-outline' => __( 'Square Outline', 'astra-widgets' ),
|
447 |
+
),
|
448 |
+
),
|
449 |
+
array(
|
450 |
+
'type' => 'select',
|
451 |
+
'id' => 'color-type',
|
452 |
+
'name' => __( 'Alignment', 'astra-widgets' ),
|
453 |
+
'default' => isset( $instance['color-type'] ) ? $instance['color-type'] : '',
|
454 |
+
'options' => array(
|
455 |
+
'official-color' => __( 'Official Color', 'astra-widgets' ),
|
456 |
+
'custom-color' => __( 'Custom', 'astra-widgets' ),
|
457 |
+
),
|
458 |
+
),
|
459 |
+
array(
|
460 |
+
'type' => 'color',
|
461 |
+
'id' => 'icon-color',
|
462 |
+
'name' => __( 'Icon Color', 'astra-widgets' ),
|
463 |
+
'default' => ( isset( $instance['icon-color'] ) && ! empty( $instance['icon-color'] ) ) ? $instance['icon-color'] : '',
|
464 |
+
),
|
465 |
+
array(
|
466 |
+
'type' => 'color',
|
467 |
+
'id' => 'bg-color',
|
468 |
+
'name' => __( 'Background Color', 'astra-widgets' ),
|
469 |
+
'default' => ( isset( $instance['bg-color'] ) && ! empty( $instance['bg-color'] ) ) ? $instance['bg-color'] : '',
|
470 |
+
),
|
471 |
+
array(
|
472 |
+
'type' => 'color',
|
473 |
+
'id' => 'icon-hover-color',
|
474 |
+
'name' => __( 'Hover Icon Color', 'astra-widgets' ),
|
475 |
+
'default' => ( isset( $instance['icon-hover-color'] ) && ! empty( $instance['icon-hover-color'] ) ) ? $instance['icon-hover-color'] : '',
|
476 |
+
),
|
477 |
+
array(
|
478 |
+
'type' => 'color',
|
479 |
+
'id' => 'bg-hover-color',
|
480 |
+
'name' => __( 'Hover Background Color', 'astra-widgets' ),
|
481 |
+
'default' => ( isset( $instance['bg-hover-color'] ) && ! empty( $instance['bg-hover-color'] ) ) ? $instance['bg-hover-color'] : '',
|
482 |
+
),
|
483 |
+
array(
|
484 |
+
'type' => 'number',
|
485 |
+
'id' => 'width',
|
486 |
+
'name' => __( 'Icon Width:', 'astra-widgets' ),
|
487 |
+
'default' => ( isset( $instance['width'] ) && ! empty( $instance['width'] ) ) ? $instance['width'] : '',
|
488 |
+
),
|
489 |
+
);
|
490 |
+
|
491 |
+
?>
|
492 |
+
|
493 |
+
<div class="<?php echo esc_attr( $this->id_base ); ?>-fields">
|
494 |
+
<?php
|
495 |
+
// Generate fields.
|
496 |
+
astra_generate_widget_fields( $this, $fields );
|
497 |
+
?>
|
498 |
+
</div>
|
499 |
+
<?php
|
500 |
+
|
501 |
+
}
|
502 |
+
|
503 |
+
}
|
504 |
+
|
505 |
+
endif;
|
languages/astra-widgets.pot
ADDED
@@ -0,0 +1,246 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (C) 2018 Brainstorm Force
|
2 |
+
# This file is distributed under the same license as the Astra Widgets package.
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: Astra Widgets 1.0.0\n"
|
6 |
+
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/astra-widgets\n"
|
7 |
+
"POT-Creation-Date: 2018-12-24 05:43:50+00:00\n"
|
8 |
+
"MIME-Version: 1.0\n"
|
9 |
+
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
+
"Content-Transfer-Encoding: 8bit\n"
|
11 |
+
"PO-Revision-Date: 2018-MO-DA HO:MI+ZONE\n"
|
12 |
+
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13 |
+
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
+
"Language: en\n"
|
15 |
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
16 |
+
"X-Poedit-Country: United States\n"
|
17 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
18 |
+
"X-Poedit-KeywordsList: "
|
19 |
+
"__;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;_nx_noop:1,2,3c;esc_"
|
20 |
+
"attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;esc_html_x:1,2c;\n"
|
21 |
+
"X-Poedit-Basepath: ../\n"
|
22 |
+
"X-Poedit-SearchPath-0: .\n"
|
23 |
+
"X-Poedit-Bookmarks: \n"
|
24 |
+
"X-Textdomain-Support: yes\n"
|
25 |
+
"X-Generator: grunt-wp-i18n1.0.2\n"
|
26 |
+
|
27 |
+
#: classes/class-astra-widgets-helper.php:109
|
28 |
+
msgid "Choose icon.."
|
29 |
+
msgstr ""
|
30 |
+
|
31 |
+
#: classes/class-astra-widgets-helper.php:171
|
32 |
+
msgid "Add more"
|
33 |
+
msgstr ""
|
34 |
+
|
35 |
+
#: classes/widgets/class-astra-widget-address.php:60
|
36 |
+
msgid "Astra: Address"
|
37 |
+
msgstr ""
|
38 |
+
|
39 |
+
#: classes/widgets/class-astra-widget-address.php:63
|
40 |
+
msgid "Display Address."
|
41 |
+
msgstr ""
|
42 |
+
|
43 |
+
#: classes/widgets/class-astra-widget-address.php:181
|
44 |
+
#: classes/widgets/class-astra-widget-list-icons.php:238
|
45 |
+
#: classes/widgets/class-astra-widget-list-icons.php:249
|
46 |
+
msgid "Title:"
|
47 |
+
msgstr ""
|
48 |
+
|
49 |
+
#: classes/widgets/class-astra-widget-address.php:190
|
50 |
+
#: classes/widgets/class-astra-widget-social-profiles.php:432
|
51 |
+
msgid "Inline"
|
52 |
+
msgstr ""
|
53 |
+
|
54 |
+
#: classes/widgets/class-astra-widget-address.php:191
|
55 |
+
#: classes/widgets/class-astra-widget-social-profiles.php:433
|
56 |
+
msgid "Stack"
|
57 |
+
msgstr ""
|
58 |
+
|
59 |
+
#: classes/widgets/class-astra-widget-address.php:197
|
60 |
+
msgid "Display Icons?"
|
61 |
+
msgstr ""
|
62 |
+
|
63 |
+
#: classes/widgets/class-astra-widget-address.php:203
|
64 |
+
msgid "Address:"
|
65 |
+
msgstr ""
|
66 |
+
|
67 |
+
#: classes/widgets/class-astra-widget-address.php:209
|
68 |
+
msgid "Phone:"
|
69 |
+
msgstr ""
|
70 |
+
|
71 |
+
#: classes/widgets/class-astra-widget-address.php:215
|
72 |
+
msgid "FAX:"
|
73 |
+
msgstr ""
|
74 |
+
|
75 |
+
#: classes/widgets/class-astra-widget-address.php:221
|
76 |
+
msgid "Email:"
|
77 |
+
msgstr ""
|
78 |
+
|
79 |
+
#: classes/widgets/class-astra-widget-list-icons.php:70
|
80 |
+
msgid "Astra: List Icons"
|
81 |
+
msgstr ""
|
82 |
+
|
83 |
+
#: classes/widgets/class-astra-widget-list-icons.php:73
|
84 |
+
msgid "Display list icons."
|
85 |
+
msgstr ""
|
86 |
+
|
87 |
+
#: classes/widgets/class-astra-widget-list-icons.php:244
|
88 |
+
msgid "Add Item:"
|
89 |
+
msgstr ""
|
90 |
+
|
91 |
+
#: classes/widgets/class-astra-widget-list-icons.php:255
|
92 |
+
msgid "Link:"
|
93 |
+
msgstr ""
|
94 |
+
|
95 |
+
#: classes/widgets/class-astra-widget-list-icons.php:264
|
96 |
+
#: classes/widgets/class-astra-widget-social-profiles.php:390
|
97 |
+
msgid "Same Page"
|
98 |
+
msgstr ""
|
99 |
+
|
100 |
+
#: classes/widgets/class-astra-widget-list-icons.php:265
|
101 |
+
#: classes/widgets/class-astra-widget-social-profiles.php:391
|
102 |
+
msgid "New Page"
|
103 |
+
msgstr ""
|
104 |
+
|
105 |
+
#: classes/widgets/class-astra-widget-list-icons.php:271
|
106 |
+
#: classes/widgets/class-astra-widget-social-profiles.php:397
|
107 |
+
msgid "No Follow"
|
108 |
+
msgstr ""
|
109 |
+
|
110 |
+
#: classes/widgets/class-astra-widget-list-icons.php:274
|
111 |
+
#: classes/widgets/class-astra-widget-social-profiles.php:400
|
112 |
+
msgid "Enable"
|
113 |
+
msgstr ""
|
114 |
+
|
115 |
+
#: classes/widgets/class-astra-widget-list-icons.php:275
|
116 |
+
#: classes/widgets/class-astra-widget-social-profiles.php:401
|
117 |
+
msgid "Disable"
|
118 |
+
msgstr ""
|
119 |
+
|
120 |
+
#: classes/widgets/class-astra-widget-list-icons.php:281
|
121 |
+
msgid "Image / Icon"
|
122 |
+
msgstr ""
|
123 |
+
|
124 |
+
#: classes/widgets/class-astra-widget-list-icons.php:284
|
125 |
+
msgid "Image"
|
126 |
+
msgstr ""
|
127 |
+
|
128 |
+
#: classes/widgets/class-astra-widget-list-icons.php:285
|
129 |
+
#: classes/widgets/class-astra-widget-list-icons.php:297
|
130 |
+
#: classes/widgets/class-astra-widget-social-profiles.php:407
|
131 |
+
msgid "Icon"
|
132 |
+
msgstr ""
|
133 |
+
|
134 |
+
#: classes/widgets/class-astra-widget-list-icons.php:291
|
135 |
+
msgid "Image:"
|
136 |
+
msgstr ""
|
137 |
+
|
138 |
+
#: classes/widgets/class-astra-widget-list-icons.php:308
|
139 |
+
msgid "Image / Icon Width:"
|
140 |
+
msgstr ""
|
141 |
+
|
142 |
+
#: classes/widgets/class-astra-widget-social-profiles.php:70
|
143 |
+
msgid "Astra: Social Profiles"
|
144 |
+
msgstr ""
|
145 |
+
|
146 |
+
#: classes/widgets/class-astra-widget-social-profiles.php:73
|
147 |
+
msgid "Display social profiles."
|
148 |
+
msgstr ""
|
149 |
+
|
150 |
+
#: classes/widgets/class-astra-widget-social-profiles.php:357
|
151 |
+
#: classes/widgets/class-astra-widget-social-profiles.php:375
|
152 |
+
msgid "Title"
|
153 |
+
msgstr ""
|
154 |
+
|
155 |
+
#: classes/widgets/class-astra-widget-social-profiles.php:365
|
156 |
+
msgid "Social Profiles"
|
157 |
+
msgstr ""
|
158 |
+
|
159 |
+
#: classes/widgets/class-astra-widget-social-profiles.php:370
|
160 |
+
msgid "Add Profile"
|
161 |
+
msgstr ""
|
162 |
+
|
163 |
+
#: classes/widgets/class-astra-widget-social-profiles.php:381
|
164 |
+
msgid "Link"
|
165 |
+
msgstr ""
|
166 |
+
|
167 |
+
#: classes/widgets/class-astra-widget-social-profiles.php:418
|
168 |
+
msgid "Styling"
|
169 |
+
msgstr ""
|
170 |
+
|
171 |
+
#: classes/widgets/class-astra-widget-social-profiles.php:423
|
172 |
+
msgid "Display profile title?"
|
173 |
+
msgstr ""
|
174 |
+
|
175 |
+
#: classes/widgets/class-astra-widget-social-profiles.php:429
|
176 |
+
#: classes/widgets/class-astra-widget-social-profiles.php:452
|
177 |
+
msgid "Alignment"
|
178 |
+
msgstr ""
|
179 |
+
|
180 |
+
#: classes/widgets/class-astra-widget-social-profiles.php:439
|
181 |
+
msgid "Icon Style"
|
182 |
+
msgstr ""
|
183 |
+
|
184 |
+
#: classes/widgets/class-astra-widget-social-profiles.php:442
|
185 |
+
msgid "Simple"
|
186 |
+
msgstr ""
|
187 |
+
|
188 |
+
#: classes/widgets/class-astra-widget-social-profiles.php:443
|
189 |
+
msgid "Circle"
|
190 |
+
msgstr ""
|
191 |
+
|
192 |
+
#: classes/widgets/class-astra-widget-social-profiles.php:444
|
193 |
+
msgid "Square"
|
194 |
+
msgstr ""
|
195 |
+
|
196 |
+
#: classes/widgets/class-astra-widget-social-profiles.php:445
|
197 |
+
msgid "Circle Outline"
|
198 |
+
msgstr ""
|
199 |
+
|
200 |
+
#: classes/widgets/class-astra-widget-social-profiles.php:446
|
201 |
+
msgid "Square Outline"
|
202 |
+
msgstr ""
|
203 |
+
|
204 |
+
#: classes/widgets/class-astra-widget-social-profiles.php:455
|
205 |
+
msgid "Official Color"
|
206 |
+
msgstr ""
|
207 |
+
|
208 |
+
#: classes/widgets/class-astra-widget-social-profiles.php:456
|
209 |
+
msgid "Custom"
|
210 |
+
msgstr ""
|
211 |
+
|
212 |
+
#: classes/widgets/class-astra-widget-social-profiles.php:462
|
213 |
+
msgid "Icon Color"
|
214 |
+
msgstr ""
|
215 |
+
|
216 |
+
#: classes/widgets/class-astra-widget-social-profiles.php:468
|
217 |
+
msgid "Background Color"
|
218 |
+
msgstr ""
|
219 |
+
|
220 |
+
#: classes/widgets/class-astra-widget-social-profiles.php:474
|
221 |
+
msgid "Hover Icon Color"
|
222 |
+
msgstr ""
|
223 |
+
|
224 |
+
#: classes/widgets/class-astra-widget-social-profiles.php:480
|
225 |
+
msgid "Hover Background Color"
|
226 |
+
msgstr ""
|
227 |
+
|
228 |
+
#: classes/widgets/class-astra-widget-social-profiles.php:486
|
229 |
+
msgid "Icon Width:"
|
230 |
+
msgstr ""
|
231 |
+
|
232 |
+
#. Description of the plugin/theme
|
233 |
+
msgid "Astra Widgets"
|
234 |
+
msgstr ""
|
235 |
+
|
236 |
+
#. Plugin URI of the plugin/theme
|
237 |
+
msgid "https://wpastra.com/"
|
238 |
+
msgstr ""
|
239 |
+
|
240 |
+
#. Author of the plugin/theme
|
241 |
+
msgid "Brainstorm Force"
|
242 |
+
msgstr ""
|
243 |
+
|
244 |
+
#. Author URI of the plugin/theme
|
245 |
+
msgid "https://www.brainstormforce.com"
|
246 |
+
msgstr ""
|
readme.txt
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
=== Astra Widgets ===
|
2 |
+
Contributors: brainstormforce
|
3 |
+
Donate link: https://www.paypal.me/BrainstormForce
|
4 |
+
Tags: address widget, social widget, list icon widget
|
5 |
+
Requires at least: 4.7
|
6 |
+
Tested up to: 5.0
|
7 |
+
Stable tag: 1.0.0
|
8 |
+
License: GPLv2 or later
|
9 |
+
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
+
|
11 |
+
Astra Widget allows you to add a different widgets to your site like Address, Social, List icons Widgets
|
12 |
+
|
13 |
+
== Description ==
|
14 |
+
|
15 |
+
Astra Widget allows you to add a different widgets to your site like Address, Social, List icons Widgets.
|
16 |
+
|
17 |
+
== Installation ==
|
18 |
+
1. Upload the plugin files to the `/wp-content/plugins/astra-widgets` directory, or install the plugin through the WordPress plugins screen directly.
|
19 |
+
2. Activate the plugin through the 'Plugins' screen in WordPress.
|
20 |
+
3. Navigate to Appearance -> Widgets to access the widgets available from the plugin.
|
21 |
+
|
22 |
+
== Changelog ==
|
23 |
+
|
24 |
+
= 1.0.0 =
|
25 |
+
- Initial release
|