Version Description
- 2020-05-28
Download this release
Release Info
Developer | codeinwp |
Plugin | FEEDZY RSS Feeds Lite |
Version | 3.4.0 |
Comparing to | |
See all releases |
Code changes from version 3.3.19 to 3.4.0
- CHANGELOG.md +16 -0
- css/feedzy-rss-feed-import.css +62 -0
- css/feedzy-rss-feeds.css +10 -1
- includes/layouts/css/upsell.css → css/settings.css +38 -102
- feedzy-rss-feed.php +1 -1
- includes/abstract/feedzy-rss-feeds-admin-abstract.php +13 -3
- includes/admin/feedzy-rss-feeds-admin.php +10 -7
- includes/admin/feedzy-rss-feeds-import.php +1396 -0
- includes/admin/feedzy-rss-feeds-ui.php +0 -2
- includes/admin/feedzy-wp-widget.php +2 -2
- includes/feedzy-rss-feeds-activator.php +1 -1
- includes/feedzy-rss-feeds-deactivator.php +1 -1
- includes/feedzy-rss-feeds-feed-tweaks.php +10 -0
- includes/feedzy-rss-feeds.php +36 -3
- includes/gutenberg/build/block.js +1 -1
- includes/gutenberg/feedzy-rss-feeds-gutenberg-block.php +12 -14
- includes/layouts/feedzy-improve.php +5 -1
- includes/layouts/feedzy-support.php +1 -3
- includes/layouts/feedzy-tutorial.php +98 -50
- includes/layouts/feedzy-upsell.php +147 -93
- includes/layouts/settings.php +9 -5
- includes/views/css/chosen-sprite.png +0 -0
- includes/views/css/chosen-sprite@2x.png +0 -0
- includes/views/css/chosen.css +484 -0
- includes/views/css/import-metabox-edit.css +2123 -0
- includes/views/import-metabox-edit.php +436 -0
- includes/views/js/chosen.js +1331 -0
- includes/views/js/import-metabox-edit.js +240 -0
- includes/views/misc-view.php +13 -0
- readme.md +24 -2
- readme.txt +20 -2
- themeisle-hash.json +1 -1
- vendor/autoload.php +1 -1
- vendor/autoload_52.php +1 -1
- vendor/codeinwp/themeisle-sdk/CHANGELOG.md +4 -0
- vendor/codeinwp/themeisle-sdk/load.php +1 -1
- vendor/codeinwp/themeisle-sdk/src/Modules/Licenser.php +1 -0
- vendor/codeinwp/themeisle-sdk/src/Modules/Logger.php +15 -13
- vendor/codeinwp/themeisle-sdk/src/Modules/Uninstall_feedback.php +3 -1
- vendor/composer/autoload_real.php +5 -5
- vendor/composer/autoload_real_52.php +3 -3
- vendor/composer/installed.json +4 -4
CHANGELOG.md
CHANGED
@@ -1,4 +1,20 @@
|
|
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
### v3.3.19 - 2020-04-08
|
3 |
**Changes:**
|
4 |
* Tested up to 5.4
|
1 |
|
2 |
+
### v3.4.0 - 2020-05-28
|
3 |
+
**Changes:**
|
4 |
+
|
5 |
+
### v3.4.0 - 2020-05-28
|
6 |
+
**Changes:**
|
7 |
+
* [Feat] Options to import feeds to posts
|
8 |
+
* [Feat] New [#item_source] tag for Feed to Post to display the feed source name
|
9 |
+
* [Feat] Improved Settings page style and layout
|
10 |
+
* [Feat] Use SimplePieItem's get_id to determine the uniqueness of feed items
|
11 |
+
* [Fix] WP 5.4 Feedzy block compatibility
|
12 |
+
* [Fix] Feed Caching time stuck to 12 hours
|
13 |
+
* [Fix] PHP Notice: Undefined index errors in the widget
|
14 |
+
* [Fix] Bulk activation of plugin aborts activation of subsequent plugins
|
15 |
+
* [Fix] Wrong shortcode mentioned in the Support tab
|
16 |
+
* [Fix] Notice: Undefined index: host when item has no link element
|
17 |
+
|
18 |
### v3.3.19 - 2020-04-08
|
19 |
**Changes:**
|
20 |
* Tested up to 5.4
|
css/feedzy-rss-feed-import.css
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* style.css
|
3 |
+
* FEEDZY RSS Feeds
|
4 |
+
* Copyright: (c) 2016 Themeisle, themeisle.com
|
5 |
+
* Version: 1.6.10
|
6 |
+
* Plugin Name: FEEDZY RSS Feeds
|
7 |
+
* Plugin URI: http://themeisle.com/plugins/feedzy-rss-feeds/
|
8 |
+
* Author: Themeisle
|
9 |
+
*/
|
10 |
+
|
11 |
+
#feedzy_import_feeds h4 {
|
12 |
+
margin: 20px 0 10px;
|
13 |
+
font-size: 16px;
|
14 |
+
}
|
15 |
+
|
16 |
+
#feedzy_import_feeds .form-group label {
|
17 |
+
display: block;
|
18 |
+
margin: 0 0 5px;
|
19 |
+
}
|
20 |
+
|
21 |
+
#feedzy_import_feeds .form-group .chosen-single {
|
22 |
+
height: 44px;
|
23 |
+
padding: 0 20px;
|
24 |
+
border: 1px solid #ddd;
|
25 |
+
border-radius: 4px;
|
26 |
+
color: #888;
|
27 |
+
background: #fff;
|
28 |
+
box-shadow: none;
|
29 |
+
font-family: "Roboto", sans-serif;
|
30 |
+
font-size: 16px;
|
31 |
+
font-weight: 300;
|
32 |
+
line-height: 44px;
|
33 |
+
}
|
34 |
+
|
35 |
+
#feedzy_import_feeds .chosen-container-single .chosen-single div {
|
36 |
+
top: 10px;
|
37 |
+
right: -2px;
|
38 |
+
}
|
39 |
+
|
40 |
+
#feedzy_import_feeds #feedzy_post_type_chosen,
|
41 |
+
#feedzy_import_feeds #feedzy_post_terms_chosen {
|
42 |
+
margin-bottom: 20px;
|
43 |
+
}
|
44 |
+
|
45 |
+
#feedzy_import_feeds .chosen-container-single .chosen-drop {
|
46 |
+
border-color: #ddd;
|
47 |
+
z-index: 99999999;
|
48 |
+
}
|
49 |
+
|
50 |
+
#feedzy_import_feeds .chosen-container-single .chosen-search input[type="text"] {
|
51 |
+
border-color: #ddd;
|
52 |
+
}
|
53 |
+
|
54 |
+
#feedzy_import_feeds .chosen-container .chosen-results li.highlighted {
|
55 |
+
background-color: #099bb2;
|
56 |
+
background-image: none;
|
57 |
+
}
|
58 |
+
|
59 |
+
.feedzy-api-error,
|
60 |
+
.feedzy-error-critical {
|
61 |
+
color: #ff0000;
|
62 |
+
}
|
css/feedzy-rss-feeds.css
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
* feedzy-rss-feeds.css
|
3 |
* Feedzy RSS Feed
|
4 |
* Copyright: (c) 2016 Themeisle, themeisle.com
|
5 |
-
* Version: 3.
|
6 |
* Plugin Name: FEEDZY RSS Feeds
|
7 |
* Plugin URI: http://themeisle.com/plugins/feedzy-rss-feeds/
|
8 |
* Author: Themeisle
|
@@ -437,4 +437,13 @@ input:checked + .feedzy-track:before {
|
|
437 |
z-index: 1001;
|
438 |
background: url(/wp-includes/images/wpspin-2x.gif) no-repeat center center;
|
439 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
440 |
}
|
2 |
* feedzy-rss-feeds.css
|
3 |
* Feedzy RSS Feed
|
4 |
* Copyright: (c) 2016 Themeisle, themeisle.com
|
5 |
+
* Version: 3.4.0
|
6 |
* Plugin Name: FEEDZY RSS Feeds
|
7 |
* Plugin URI: http://themeisle.com/plugins/feedzy-rss-feeds/
|
8 |
* Author: Themeisle
|
437 |
z-index: 1001;
|
438 |
background: url(/wp-includes/images/wpspin-2x.gif) no-repeat center center;
|
439 |
|
440 |
+
}
|
441 |
+
|
442 |
+
/* gutenberg */
|
443 |
+
.wp-block-feedzy-rss-feeds-feedzy-block .feedzy-source {
|
444 |
+
width: 400px;
|
445 |
+
}
|
446 |
+
|
447 |
+
.wp-block-feedzy-rss-feeds-feedzy-block .wp-block-embed.is-loading {
|
448 |
+
margin: auto !important;
|
449 |
}
|
includes/layouts/css/upsell.css → css/settings.css
RENAMED
@@ -1,14 +1,5 @@
|
|
1 |
-
/**
|
2 |
-
* upsell.css
|
3 |
-
* Feedzy RSS Feed Upsell Style
|
4 |
-
*
|
5 |
-
* @since 3.0.12
|
6 |
-
* @package feedzy-rss-feeds
|
7 |
-
*/
|
8 |
-
|
9 |
#fz-features .fz-features-header {
|
10 |
-
|
11 |
-
padding: 20px 30px 30px;
|
12 |
border-top: 5px solid #252b37;
|
13 |
background: #fff;
|
14 |
}
|
@@ -18,10 +9,10 @@
|
|
18 |
margin: 0 0 0 20px;
|
19 |
padding: 0 0 0 70px;
|
20 |
color: #3c3c3c;
|
21 |
-
background: url(
|
22 |
-
background-size:
|
23 |
font-family: "Open Sans", sans-serif;
|
24 |
-
font-size:
|
25 |
font-weight: 700;
|
26 |
line-height: 60px;
|
27 |
letter-spacing: -1px;
|
@@ -29,13 +20,12 @@
|
|
29 |
|
30 |
#fz-features .slogan {
|
31 |
display: inline-block;
|
32 |
-
margin: 0 0 0
|
33 |
padding: 0;
|
34 |
color: #858585;
|
35 |
font-family: "Open Sans", sans-serif;
|
36 |
font-size: 17px;
|
37 |
-
line-height:
|
38 |
-
vertical-align: 4px;
|
39 |
}
|
40 |
|
41 |
#fz-features .slogan a {
|
@@ -43,7 +33,6 @@
|
|
43 |
font-weight: 600;
|
44 |
font-style: italic;
|
45 |
text-decoration: none;
|
46 |
-
-webkit-transition: all 0.250s ease-in-out;
|
47 |
transition: all 0.250s ease-in-out;
|
48 |
}
|
49 |
|
@@ -56,10 +45,6 @@
|
|
56 |
box-shadow: none;
|
57 |
}
|
58 |
|
59 |
-
#fz-features .header-btns {
|
60 |
-
margin: 7px auto;
|
61 |
-
}
|
62 |
-
|
63 |
#fz-features .header-btns .buy-now {
|
64 |
display: inline-block;
|
65 |
margin-top: 2px;
|
@@ -74,7 +59,6 @@
|
|
74 |
font-weight: bold;
|
75 |
text-decoration: none;
|
76 |
text-transform: uppercase;
|
77 |
-
-webkit-transition: all 0.250s ease-in-out;
|
78 |
transition: all 0.250s ease-in-out;
|
79 |
}
|
80 |
|
@@ -86,59 +70,42 @@
|
|
86 |
padding-right: 3px;
|
87 |
}
|
88 |
|
89 |
-
#fz-features {
|
90 |
-
padding: 0;
|
91 |
-
}
|
92 |
-
|
93 |
-
#fz-features .fz-features-content {
|
94 |
-
width: 100%;
|
95 |
-
padding: 0;
|
96 |
-
}
|
97 |
-
|
98 |
#fz-features .fz-features-header,
|
99 |
#fz-features .fz-feature {
|
100 |
-
|
101 |
-
|
102 |
-
margin: 30px 0 0;
|
103 |
-
padding: 30px;
|
104 |
-
background-color: #fff;
|
105 |
box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1);
|
106 |
}
|
107 |
|
108 |
#fz-features .fz-feature .fz-feature-features,
|
109 |
#fz-features .fz-feature .fz-feature-image {
|
|
|
110 |
margin: 0;
|
111 |
vertical-align: middle;
|
112 |
}
|
113 |
|
114 |
#fz-features .fz-feature .fz-feature-features {
|
115 |
box-sizing: border-box;
|
116 |
-
padding:
|
117 |
-
}
|
118 |
-
|
119 |
-
#fz-features .fz-feature .fz-feature-image img {
|
120 |
-
max-width: 470px;
|
121 |
}
|
122 |
|
123 |
-
#fz-features .fz-feature .fz-feature-image
|
124 |
-
|
125 |
}
|
126 |
|
127 |
#fz-features .fz-feature .fz-feature-features h2 {
|
128 |
margin: 0 0 20px;
|
129 |
font-size: 28px;
|
130 |
-
font-weight: 700;
|
131 |
-
line-height: 1.2;
|
132 |
}
|
133 |
|
134 |
#fz-features .fz-feature .fz-feature-features h4 {
|
135 |
margin: 0 0 10px;
|
136 |
-
font-size:
|
137 |
}
|
138 |
|
139 |
#fz-features .fz-feature .fz-feature-features p {
|
140 |
margin: 0 0 15px;
|
141 |
-
font-size:
|
142 |
line-height: 1.5;
|
143 |
}
|
144 |
|
@@ -147,33 +114,20 @@
|
|
147 |
height: auto;
|
148 |
}
|
149 |
|
150 |
-
@media screen and (
|
151 |
-
#fz-features
|
152 |
-
|
153 |
-
|
154 |
-
}
|
155 |
-
|
156 |
-
@media screen and (min-width: 1200px) {
|
157 |
-
#fz-features .fz-feature {
|
158 |
-
padding: 30px 60px;
|
159 |
-
}
|
160 |
-
|
161 |
-
#fz-features .fz-feature .fz-feature-features {
|
162 |
-
padding: 0 30px 0 0;
|
163 |
-
}
|
164 |
-
|
165 |
-
#fz-features .fz-feature .fz-feature-features h2 {
|
166 |
-
font-size: 30px;
|
167 |
}
|
168 |
|
169 |
-
#fz-features .fz-feature .fz-feature-
|
170 |
-
|
|
|
|
|
171 |
}
|
172 |
-
}
|
173 |
|
174 |
-
|
175 |
-
|
176 |
-
padding: 0 120px 0 0;
|
177 |
}
|
178 |
}
|
179 |
|
@@ -189,51 +143,33 @@
|
|
189 |
#fz-features .header-btns {
|
190 |
display: block;
|
191 |
float: none;
|
192 |
-
margin:
|
193 |
text-align: center;
|
194 |
}
|
195 |
}
|
196 |
|
197 |
-
@media screen and (max-width:
|
198 |
-
#
|
199 |
-
|
200 |
-
|
201 |
}
|
202 |
|
203 |
-
#
|
204 |
-
|
205 |
-
|
206 |
-
margin: 0 auto 30px;
|
207 |
}
|
208 |
|
209 |
-
#fz-features .
|
210 |
-
|
211 |
}
|
212 |
}
|
213 |
|
214 |
-
#fz-features.fz-
|
215 |
-
|
216 |
-
|
217 |
-
}
|
218 |
-
|
219 |
-
#fz-features.fz-settings .nav-tab-wrapper {
|
220 |
-
border-bottom: none;
|
221 |
-
}
|
222 |
-
|
223 |
-
#fz-features.fz-settings .nav-tab-wrapper a.nav-tab-active,
|
224 |
-
#fz-features.fz-settings .nav-tab-wrapper a:hover {
|
225 |
background: #fff;
|
226 |
}
|
227 |
|
228 |
-
#fz-features.fz-settings .nav-tab-wrapper a {
|
229 |
-
margin-top: 10px;
|
230 |
-
padding: 10px 20px;
|
231 |
-
border: 0;
|
232 |
-
color: #000;
|
233 |
-
background: #e0e0e0;
|
234 |
-
box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1);
|
235 |
-
}
|
236 |
-
|
237 |
.fz-feature-centered {
|
238 |
text-align: center;
|
239 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
#fz-features .fz-features-header {
|
2 |
+
padding: 20px 10px;
|
|
|
3 |
border-top: 5px solid #252b37;
|
4 |
background: #fff;
|
5 |
}
|
9 |
margin: 0 0 0 20px;
|
10 |
padding: 0 0 0 70px;
|
11 |
color: #3c3c3c;
|
12 |
+
background: url(../img/feedzy.svg) no-repeat left center;
|
13 |
+
background-size: 50px;
|
14 |
font-family: "Open Sans", sans-serif;
|
15 |
+
font-size: 2em;
|
16 |
font-weight: 700;
|
17 |
line-height: 60px;
|
18 |
letter-spacing: -1px;
|
20 |
|
21 |
#fz-features .slogan {
|
22 |
display: inline-block;
|
23 |
+
margin: 0 0 0 5px;
|
24 |
padding: 0;
|
25 |
color: #858585;
|
26 |
font-family: "Open Sans", sans-serif;
|
27 |
font-size: 17px;
|
28 |
+
line-height: 3.5;
|
|
|
29 |
}
|
30 |
|
31 |
#fz-features .slogan a {
|
33 |
font-weight: 600;
|
34 |
font-style: italic;
|
35 |
text-decoration: none;
|
|
|
36 |
transition: all 0.250s ease-in-out;
|
37 |
}
|
38 |
|
45 |
box-shadow: none;
|
46 |
}
|
47 |
|
|
|
|
|
|
|
|
|
48 |
#fz-features .header-btns .buy-now {
|
49 |
display: inline-block;
|
50 |
margin-top: 2px;
|
59 |
font-weight: bold;
|
60 |
text-decoration: none;
|
61 |
text-transform: uppercase;
|
|
|
62 |
transition: all 0.250s ease-in-out;
|
63 |
}
|
64 |
|
70 |
padding-right: 3px;
|
71 |
}
|
72 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
#fz-features .fz-features-header,
|
74 |
#fz-features .fz-feature {
|
75 |
+
display: block;
|
76 |
+
margin: 10px;
|
|
|
|
|
|
|
77 |
box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1);
|
78 |
}
|
79 |
|
80 |
#fz-features .fz-feature .fz-feature-features,
|
81 |
#fz-features .fz-feature .fz-feature-image {
|
82 |
+
display: table-cell;
|
83 |
margin: 0;
|
84 |
vertical-align: middle;
|
85 |
}
|
86 |
|
87 |
#fz-features .fz-feature .fz-feature-features {
|
88 |
box-sizing: border-box;
|
89 |
+
padding: 30px;
|
|
|
|
|
|
|
|
|
90 |
}
|
91 |
|
92 |
+
#fz-features .fz-feature .fz-feature-image {
|
93 |
+
width: 470px;
|
94 |
}
|
95 |
|
96 |
#fz-features .fz-feature .fz-feature-features h2 {
|
97 |
margin: 0 0 20px;
|
98 |
font-size: 28px;
|
|
|
|
|
99 |
}
|
100 |
|
101 |
#fz-features .fz-feature .fz-feature-features h4 {
|
102 |
margin: 0 0 10px;
|
103 |
+
font-size: 20px;
|
104 |
}
|
105 |
|
106 |
#fz-features .fz-feature .fz-feature-features p {
|
107 |
margin: 0 0 15px;
|
108 |
+
font-size: 16px;
|
109 |
line-height: 1.5;
|
110 |
}
|
111 |
|
114 |
height: auto;
|
115 |
}
|
116 |
|
117 |
+
@media screen and (max-width: 1200px) {
|
118 |
+
#fz-features .fz-feature .fz-feature-features,
|
119 |
+
#fz-features .fz-feature .fz-feature-image {
|
120 |
+
display: block;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
}
|
122 |
|
123 |
+
#fz-features .fz-feature .fz-feature-image {
|
124 |
+
width: 470px;
|
125 |
+
margin: 0 auto 20px;
|
126 |
+
text-align: center;
|
127 |
}
|
|
|
128 |
|
129 |
+
#fz-features .slogan {
|
130 |
+
display: none;
|
|
|
131 |
}
|
132 |
}
|
133 |
|
143 |
#fz-features .header-btns {
|
144 |
display: block;
|
145 |
float: none;
|
146 |
+
margin: 0 0 10px 0;
|
147 |
text-align: center;
|
148 |
}
|
149 |
}
|
150 |
|
151 |
+
@media screen and (max-width: 782px) {
|
152 |
+
#cwp_form #header .button {
|
153 |
+
padding: 0 4px 1px !important;
|
154 |
+
font-size: 11px !important;
|
155 |
}
|
156 |
|
157 |
+
#cwp_form #header .logo h2 {
|
158 |
+
margin: 0 !important;
|
159 |
+
padding: 0 !important;
|
|
|
160 |
}
|
161 |
|
162 |
+
#fz-features .fz-feature .fz-feature-image {
|
163 |
+
width: 100%;
|
164 |
}
|
165 |
}
|
166 |
|
167 |
+
#fz-features .fz-feature .fz-feature-inner {
|
168 |
+
display: table;
|
169 |
+
width: 100%;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
170 |
background: #fff;
|
171 |
}
|
172 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
173 |
.fz-feature-centered {
|
174 |
text-align: center;
|
175 |
+
}
|
feedzy-rss-feed.php
CHANGED
@@ -15,7 +15,7 @@
|
|
15 |
* Plugin Name: Feedzy RSS Feeds Lite
|
16 |
* Plugin URI: https://themeisle.com/plugins/feedzy-rss-feeds-lite/
|
17 |
* Description: A small and lightweight RSS aggregator plugin. Fast and very easy to use, it allows you to aggregate multiple RSS feeds into your WordPress site through fully customizable shortcodes & widgets.
|
18 |
-
* Version: 3.
|
19 |
* Author: Themeisle
|
20 |
* Author URI: http://themeisle.com
|
21 |
* License: GPL-2.0+
|
15 |
* Plugin Name: Feedzy RSS Feeds Lite
|
16 |
* Plugin URI: https://themeisle.com/plugins/feedzy-rss-feeds-lite/
|
17 |
* Description: A small and lightweight RSS aggregator plugin. Fast and very easy to use, it allows you to aggregate multiple RSS feeds into your WordPress site through fully customizable shortcodes & widgets.
|
18 |
+
* Version: 3.4.0
|
19 |
* Author: Themeisle
|
20 |
* Author URI: http://themeisle.com
|
21 |
* License: GPL-2.0+
|
includes/abstract/feedzy-rss-feeds-admin-abstract.php
CHANGED
@@ -648,7 +648,11 @@ abstract class Feedzy_Rss_Feeds_Admin_Abstract {
|
|
648 |
$feed->set_useragent( apply_filters( 'http_headers_useragent', $default_agent ) );
|
649 |
if ( false === apply_filters( 'feedzy_disable_db_cache', false, $feed_url ) ) {
|
650 |
$feed->set_cache_class( 'WP_Feed_Cache' );
|
651 |
-
|
|
|
|
|
|
|
|
|
652 |
} else {
|
653 |
require_once( ABSPATH . 'wp-admin/includes/file.php' );
|
654 |
WP_Filesystem();
|
@@ -882,7 +886,7 @@ abstract class Feedzy_Rss_Feeds_Admin_Abstract {
|
|
882 |
|
883 |
// Display the error message and quit (before showing the template for pro).
|
884 |
if ( empty( $feed_items ) ) {
|
885 |
-
$content .= $sc['error_empty'];
|
886 |
$content .= '</ul> </div>';
|
887 |
return $content;
|
888 |
}
|
@@ -1023,7 +1027,12 @@ abstract class Feedzy_Rss_Feeds_Admin_Abstract {
|
|
1023 |
*/
|
1024 |
private function get_feed_item_filter( $sc, $sizes, $item, $feed_url, $index ) {
|
1025 |
$item_link = $item->get_permalink();
|
|
|
|
|
|
|
|
|
1026 |
$new_link = apply_filters( 'feedzy_item_url_filter', $item_link, $sc, $item );
|
|
|
1027 |
// Fetch image thumbnail
|
1028 |
if ( $sc['thumb'] === 'yes' || $sc['thumb'] === 'auto' ) {
|
1029 |
$the_thumbnail = $this->feedzy_retrieve_image( $item, $sc );
|
@@ -1103,6 +1112,7 @@ abstract class Feedzy_Rss_Feeds_Admin_Abstract {
|
|
1103 |
|
1104 |
// multiple sources?
|
1105 |
$is_multiple = is_array( $feed_url );
|
|
|
1106 |
|
1107 |
// author.
|
1108 |
if ( $item->get_author() && $meta_args['author'] ) {
|
@@ -1113,7 +1123,6 @@ abstract class Feedzy_Rss_Feeds_Admin_Abstract {
|
|
1113 |
|
1114 |
$author_name = apply_filters( 'feedzy_author_name', $author_name, $feed_url, $item );
|
1115 |
|
1116 |
-
$feed_source = $item->get_feed()->get_title();
|
1117 |
if ( $is_multiple && $meta_args['source'] && ! empty( $feed_source ) ) {
|
1118 |
$author_name .= sprintf( ' (%s)', $feed_source );
|
1119 |
}
|
@@ -1199,6 +1208,7 @@ abstract class Feedzy_Rss_Feeds_Admin_Abstract {
|
|
1199 |
'item_author' => $item->get_author(),
|
1200 |
'item_description' => $content_summary,
|
1201 |
'item_content' => apply_filters( 'feedzy_content', $item->get_content( false ), $item ),
|
|
|
1202 |
);
|
1203 |
$item_array = apply_filters( 'feedzy_item_filter', $item_array, $item, $sc, $index );
|
1204 |
|
648 |
$feed->set_useragent( apply_filters( 'http_headers_useragent', $default_agent ) );
|
649 |
if ( false === apply_filters( 'feedzy_disable_db_cache', false, $feed_url ) ) {
|
650 |
$feed->set_cache_class( 'WP_Feed_Cache' );
|
651 |
+
add_filter(
|
652 |
+
'wp_feed_cache_transient_lifetime', function( $time ) use ( $cache_time ) {
|
653 |
+
return $cache_time;
|
654 |
+
}, 10, 1
|
655 |
+
);
|
656 |
} else {
|
657 |
require_once( ABSPATH . 'wp-admin/includes/file.php' );
|
658 |
WP_Filesystem();
|
886 |
|
887 |
// Display the error message and quit (before showing the template for pro).
|
888 |
if ( empty( $feed_items ) ) {
|
889 |
+
$content .= esc_html( $sc['error_empty'] );
|
890 |
$content .= '</ul> </div>';
|
891 |
return $content;
|
892 |
}
|
1027 |
*/
|
1028 |
private function get_feed_item_filter( $sc, $sizes, $item, $feed_url, $index ) {
|
1029 |
$item_link = $item->get_permalink();
|
1030 |
+
// if the item has no link (possible in some cases), use the feed link
|
1031 |
+
if ( empty( $item_link ) ) {
|
1032 |
+
$item_link = $item->get_feed()->get_permalink();
|
1033 |
+
}
|
1034 |
$new_link = apply_filters( 'feedzy_item_url_filter', $item_link, $sc, $item );
|
1035 |
+
|
1036 |
// Fetch image thumbnail
|
1037 |
if ( $sc['thumb'] === 'yes' || $sc['thumb'] === 'auto' ) {
|
1038 |
$the_thumbnail = $this->feedzy_retrieve_image( $item, $sc );
|
1112 |
|
1113 |
// multiple sources?
|
1114 |
$is_multiple = is_array( $feed_url );
|
1115 |
+
$feed_source = $item->get_feed()->get_title();
|
1116 |
|
1117 |
// author.
|
1118 |
if ( $item->get_author() && $meta_args['author'] ) {
|
1123 |
|
1124 |
$author_name = apply_filters( 'feedzy_author_name', $author_name, $feed_url, $item );
|
1125 |
|
|
|
1126 |
if ( $is_multiple && $meta_args['source'] && ! empty( $feed_source ) ) {
|
1127 |
$author_name .= sprintf( ' (%s)', $feed_source );
|
1128 |
}
|
1208 |
'item_author' => $item->get_author(),
|
1209 |
'item_description' => $content_summary,
|
1210 |
'item_content' => apply_filters( 'feedzy_content', $item->get_content( false ), $item ),
|
1211 |
+
'item_source' => $feed_source,
|
1212 |
);
|
1213 |
$item_array = apply_filters( 'feedzy_item_filter', $item_array, $item, $sc, $index );
|
1214 |
|
includes/admin/feedzy-rss-feeds-admin.php
CHANGED
@@ -125,8 +125,8 @@ class Feedzy_Rss_Feeds_Admin extends Feedzy_Rss_Feeds_Admin_Abstract {
|
|
125 |
if ( ! in_array( $screen->base, $upsell_screens, true ) && strpos( $screen->id, 'feedzy' ) === false ) {
|
126 |
return;
|
127 |
}
|
128 |
-
wp_enqueue_style( $this->plugin_name . '-
|
129 |
-
wp_enqueue_style( $this->plugin_name . '-
|
130 |
}
|
131 |
|
132 |
/**
|
@@ -567,18 +567,21 @@ class Feedzy_Rss_Feeds_Admin extends Feedzy_Rss_Feeds_Admin_Abstract {
|
|
567 |
}
|
568 |
|
569 |
/**
|
570 |
-
*
|
571 |
*
|
572 |
* @access public
|
573 |
*/
|
574 |
-
public function
|
575 |
if ( defined( 'TI_UNIT_TESTING' ) ) {
|
576 |
return;
|
577 |
}
|
578 |
|
579 |
-
if (
|
580 |
-
|
581 |
-
|
|
|
|
|
|
|
582 |
}
|
583 |
}
|
584 |
|
125 |
if ( ! in_array( $screen->base, $upsell_screens, true ) && strpos( $screen->id, 'feedzy' ) === false ) {
|
126 |
return;
|
127 |
}
|
128 |
+
wp_enqueue_style( $this->plugin_name . '-settings', FEEDZY_ABSURL . 'css/settings.css' );
|
129 |
+
wp_enqueue_style( $this->plugin_name . '-metabox', FEEDZY_ABSURL . 'css/metabox-settings.css', array( $this->plugin_name . '-settings' ) );
|
130 |
}
|
131 |
|
132 |
/**
|
567 |
}
|
568 |
|
569 |
/**
|
570 |
+
* Check if plugin has been activated and then redirect to the correct page.
|
571 |
*
|
572 |
* @access public
|
573 |
*/
|
574 |
+
public function admin_init() {
|
575 |
if ( defined( 'TI_UNIT_TESTING' ) ) {
|
576 |
return;
|
577 |
}
|
578 |
|
579 |
+
if ( get_option( 'feedzy-activated' ) ) {
|
580 |
+
delete_option( 'feedzy-activated' );
|
581 |
+
if ( ! headers_sent() ) {
|
582 |
+
wp_redirect( add_query_arg( array( 'page' => 'feedzy-support', 'tab' => 'help#shortcode' ), admin_url( 'admin.php' ) ) );
|
583 |
+
exit();
|
584 |
+
}
|
585 |
}
|
586 |
}
|
587 |
|
includes/admin/feedzy-rss-feeds-import.php
ADDED
@@ -0,0 +1,1396 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The admin-specific functionality of the plugin.
|
4 |
+
*
|
5 |
+
* @link http://themeisle.com/plugins/feedzy-rss-feed/
|
6 |
+
* @since 1.0.0
|
7 |
+
*
|
8 |
+
* @package feedzy-rss-feeds
|
9 |
+
* @subpackage feedzy-rss-feeds/includes/admin
|
10 |
+
*/
|
11 |
+
/**
|
12 |
+
* The admin-specific functionality of the plugin.
|
13 |
+
*
|
14 |
+
* Defines the plugin name, version, and two examples hooks for how to
|
15 |
+
* enqueue the admin-specific stylesheet and JavaScript.
|
16 |
+
*
|
17 |
+
* @package feedzy-rss-feeds
|
18 |
+
* @subpackage feedzy-rss-feeds/includes/admin
|
19 |
+
* @author Bogdan Preda <bogdan.preda@themeisle.com>
|
20 |
+
*/
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Class Feedzy_Rss_Feeds_Import
|
24 |
+
*/
|
25 |
+
class Feedzy_Rss_Feeds_Import {
|
26 |
+
/**
|
27 |
+
* The ID of this plugin.
|
28 |
+
*
|
29 |
+
* @since 1.0.0
|
30 |
+
* @access private
|
31 |
+
* @var string $plugin_name The ID of this plugin.
|
32 |
+
*/
|
33 |
+
private $plugin_name;
|
34 |
+
|
35 |
+
/**
|
36 |
+
* The version of this plugin.
|
37 |
+
*
|
38 |
+
* @since 1.0.0
|
39 |
+
* @access private
|
40 |
+
* @var string $version The current version of this plugin.
|
41 |
+
*/
|
42 |
+
private $version;
|
43 |
+
|
44 |
+
/**
|
45 |
+
* The settings for Feedzy PRO services.
|
46 |
+
*
|
47 |
+
* @since 1.3.2
|
48 |
+
* @access public
|
49 |
+
* @var array $settings The settings for Feedzy PRO.
|
50 |
+
*/
|
51 |
+
private $settings;
|
52 |
+
|
53 |
+
/**
|
54 |
+
* The settings for Feedzy free.
|
55 |
+
*
|
56 |
+
* @access public
|
57 |
+
* @var array $settings The settings for Feedzy free.
|
58 |
+
*/
|
59 |
+
private $free_settings;
|
60 |
+
|
61 |
+
/**
|
62 |
+
* Initialize the class and set its properties.
|
63 |
+
*
|
64 |
+
* @since 1.0.0
|
65 |
+
* @access public
|
66 |
+
*
|
67 |
+
* @param string $plugin_name The name of this plugin.
|
68 |
+
* @param string $version The version of this plugin.
|
69 |
+
*/
|
70 |
+
public function __construct( $plugin_name, $version ) {
|
71 |
+
$this->plugin_name = $plugin_name;
|
72 |
+
$this->version = $version;
|
73 |
+
|
74 |
+
$this->settings = get_option( 'feedzy-rss-feeds-settings', array() );
|
75 |
+
$this->free_settings = get_option( 'feedzy-settings', array() );
|
76 |
+
}
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Adds the class to the div that shows the upsell.
|
80 |
+
*
|
81 |
+
* @since ?
|
82 |
+
* @access public
|
83 |
+
*/
|
84 |
+
public function upsell_class( $class ) {
|
85 |
+
if ( ! feedzy_is_pro() ) {
|
86 |
+
$class = 'only-pro';
|
87 |
+
}
|
88 |
+
return $class;
|
89 |
+
}
|
90 |
+
|
91 |
+
/**
|
92 |
+
* Adds the content to the div that shows the upsell.
|
93 |
+
*
|
94 |
+
* @since ?
|
95 |
+
* @access public
|
96 |
+
*/
|
97 |
+
public function upsell_content( $content ) {
|
98 |
+
if ( ! feedzy_is_pro() ) {
|
99 |
+
$content = '
|
100 |
+
<div>
|
101 |
+
<div class="only-pro-content">
|
102 |
+
<div class="only-pro-container">
|
103 |
+
<div class="only-pro-inner">
|
104 |
+
<p>' . __( 'This feature is only enabled in the Pro version! To learn more about the benefits of Pro and how you can upgrade', 'feedzy-rss-feeds' ) . '
|
105 |
+
<a target="_blank" href="' . FEEDZY_UPSELL_LINK . '" title="' . __( 'Buy Now', 'feedzy-rss-feeds' ) . '">' . __( 'Click here!', 'feedzy-rss-feeds' ) . '</a>
|
106 |
+
</p>
|
107 |
+
</div>
|
108 |
+
</div>
|
109 |
+
</div>
|
110 |
+
</div>';
|
111 |
+
}
|
112 |
+
return $content;
|
113 |
+
}
|
114 |
+
|
115 |
+
/**
|
116 |
+
* Register the stylesheets for the admin area.
|
117 |
+
*
|
118 |
+
* @since 1.0.0
|
119 |
+
* @access public
|
120 |
+
*/
|
121 |
+
public function enqueue_styles() {
|
122 |
+
wp_enqueue_style( $this->plugin_name, FEEDZY_ABSURL . 'css/feedzy-rss-feed-import.css', array(), $this->version, 'all' );
|
123 |
+
if ( get_current_screen()->post_type === 'feedzy_imports' ) {
|
124 |
+
wp_enqueue_style( $this->plugin_name . '_chosen', FEEDZY_ABSURL . 'includes/views/css/chosen.css', array(), $this->version, 'all' );
|
125 |
+
wp_enqueue_style( $this->plugin_name . '_metabox_edit', FEEDZY_ABSURL . 'includes/views/css/import-metabox-edit.css', array(), $this->version, 'all' );
|
126 |
+
wp_enqueue_script( $this->plugin_name . '_chosen_scipt', FEEDZY_ABSURL . 'includes/views/js/chosen.js', array( 'jquery' ), $this->version, true );
|
127 |
+
wp_enqueue_script(
|
128 |
+
$this->plugin_name . '_metabox_edit_script',
|
129 |
+
FEEDZY_ABSURL . 'includes/views/js/import-metabox-edit.js',
|
130 |
+
array(
|
131 |
+
'jquery',
|
132 |
+
$this->plugin_name . '_chosen_scipt',
|
133 |
+
),
|
134 |
+
$this->version,
|
135 |
+
true
|
136 |
+
);
|
137 |
+
wp_localize_script(
|
138 |
+
$this->plugin_name . '_metabox_edit_script',
|
139 |
+
'feedzy',
|
140 |
+
array(
|
141 |
+
'ajax' => array(
|
142 |
+
'security' => wp_create_nonce( FEEDZY_NAME ),
|
143 |
+
),
|
144 |
+
)
|
145 |
+
);
|
146 |
+
}
|
147 |
+
}
|
148 |
+
|
149 |
+
/**
|
150 |
+
* Add attributes to $itemArray.
|
151 |
+
*
|
152 |
+
* @since 1.0.0
|
153 |
+
* @access public
|
154 |
+
*
|
155 |
+
* @param array $itemArray The item attributes array.
|
156 |
+
* @param object $item The feed item.
|
157 |
+
* @param array $sc The shorcode attributes array.
|
158 |
+
* @param int $index The item number.
|
159 |
+
*
|
160 |
+
* @return mixed
|
161 |
+
*/
|
162 |
+
public function add_data_to_item( $itemArray, $item, $sc = null, $index = null ) {
|
163 |
+
$itemArray['item_categories'] = $this->retrieve_categories( null, $item );
|
164 |
+
|
165 |
+
// If set to true, SimplePie will return a unique MD5 hash for the item.
|
166 |
+
// If set to false, it will check <guid>, <link>, and <title> before defaulting to the hash.
|
167 |
+
$itemArray['item_id'] = $item->get_id( false );
|
168 |
+
|
169 |
+
$itemArray['item'] = $item;
|
170 |
+
return $itemArray;
|
171 |
+
}
|
172 |
+
|
173 |
+
/**
|
174 |
+
* Retrieve the categories.
|
175 |
+
*
|
176 |
+
* @since ?
|
177 |
+
* @access public
|
178 |
+
*
|
179 |
+
* @param string $dumb The initial categories (only a placeholder argument for the filter).
|
180 |
+
* @param object $item The feed item.
|
181 |
+
*
|
182 |
+
* @return string
|
183 |
+
*/
|
184 |
+
public function retrieve_categories( $dumb, $item ) {
|
185 |
+
$cats = array();
|
186 |
+
$categories = $item->get_categories();
|
187 |
+
if ( $categories ) {
|
188 |
+
foreach ( $categories as $category ) {
|
189 |
+
$cats[] = $category->get_label();
|
190 |
+
}
|
191 |
+
}
|
192 |
+
return apply_filters( 'feedzy_categories', implode( ', ', $cats ), $cats, $item );
|
193 |
+
}
|
194 |
+
|
195 |
+
/**
|
196 |
+
* Register a new post type for feed imports.
|
197 |
+
*
|
198 |
+
* @since 1.2.0
|
199 |
+
* @access public
|
200 |
+
*/
|
201 |
+
public function register_import_post_type() {
|
202 |
+
$labels = array(
|
203 |
+
'name' => __( 'Import Posts', 'feedzy-rss-feeds' ),
|
204 |
+
'singular_name' => __( 'Import Post', 'feedzy-rss-feeds' ),
|
205 |
+
'add_new' => __( 'New Import', 'feedzy-rss-feeds' ),
|
206 |
+
'add_new_item' => __( 'New Import', 'feedzy-rss-feeds' ),
|
207 |
+
'edit_item' => __( 'Edit Import', 'feedzy-rss-feeds' ),
|
208 |
+
'new_item' => __( 'New Import Post', 'feedzy-rss-feeds' ),
|
209 |
+
'view_item' => __( 'View Import', 'feedzy-rss-feeds' ),
|
210 |
+
'search_items' => __( 'Search Imports', 'feedzy-rss-feeds' ),
|
211 |
+
'not_found' => __( 'No imports found', 'feedzy-rss-feeds' ),
|
212 |
+
'not_found_in_trash' => __( 'No imports in the trash', 'feedzy-rss-feeds' ),
|
213 |
+
);
|
214 |
+
$supports = array(
|
215 |
+
'title',
|
216 |
+
);
|
217 |
+
$args = array(
|
218 |
+
'labels' => $labels,
|
219 |
+
'supports' => $supports,
|
220 |
+
'public' => true,
|
221 |
+
'exclude_from_search' => true,
|
222 |
+
'publicly_queryable' => false,
|
223 |
+
'capability_type' => 'post',
|
224 |
+
'show_in_nav_menus' => false,
|
225 |
+
'rewrite' => array(
|
226 |
+
'slug' => 'feedzy-import',
|
227 |
+
),
|
228 |
+
'show_in_menu' => 'feedzy-admin-menu',
|
229 |
+
'register_meta_box_cb' => array( $this, 'add_feedzy_import_metaboxes' ),
|
230 |
+
);
|
231 |
+
$args = apply_filters( 'feedzy_imports_args', $args );
|
232 |
+
register_post_type( 'feedzy_imports', $args );
|
233 |
+
}
|
234 |
+
|
235 |
+
/**
|
236 |
+
* Method to add a meta box to `feedzy_imports`
|
237 |
+
* custom post type.
|
238 |
+
*
|
239 |
+
* @since 1.2.0
|
240 |
+
* @access public
|
241 |
+
*/
|
242 |
+
public function add_feedzy_import_metaboxes() {
|
243 |
+
add_meta_box(
|
244 |
+
'feedzy_import_feeds',
|
245 |
+
__( 'Feed Import Options', 'feedzy-rss-feeds' ),
|
246 |
+
array(
|
247 |
+
$this,
|
248 |
+
'feedzy_import_feed_options',
|
249 |
+
),
|
250 |
+
'feedzy_imports',
|
251 |
+
'normal',
|
252 |
+
'high'
|
253 |
+
);
|
254 |
+
}
|
255 |
+
|
256 |
+
/**
|
257 |
+
* Method to display metabox for import post type.
|
258 |
+
*
|
259 |
+
* @since 1.2.0
|
260 |
+
* @access public
|
261 |
+
* @return mixed
|
262 |
+
*/
|
263 |
+
public function feedzy_import_feed_options() {
|
264 |
+
global $post;
|
265 |
+
$args = array(
|
266 |
+
'post_type' => 'feedzy_categories',
|
267 |
+
'posts_per_page' => 100,
|
268 |
+
);
|
269 |
+
$feed_categories = get_posts( $args );
|
270 |
+
$post_types = get_post_types( '', 'names' );
|
271 |
+
$post_types = array_diff( $post_types, array( 'feedzy_imports', 'feedzy_categories' ) );
|
272 |
+
$published_status = array( 'publish', 'draft' );
|
273 |
+
$import_post_type = get_post_meta( $post->ID, 'import_post_type', true );
|
274 |
+
$import_post_term = get_post_meta( $post->ID, 'import_post_term', true );
|
275 |
+
if ( metadata_exists( $import_post_type, $post->ID, 'import_post_status' ) ) {
|
276 |
+
$import_post_status = get_post_meta( $post->ID, 'import_post_status', true );
|
277 |
+
} else {
|
278 |
+
add_post_meta( $post->ID, 'import_post_status', 'publish' );
|
279 |
+
$import_post_status = get_post_meta( $post->ID, 'import_post_status', true );
|
280 |
+
}
|
281 |
+
$source = get_post_meta( $post->ID, 'source', true );
|
282 |
+
$inc_key = get_post_meta( $post->ID, 'inc_key', true );
|
283 |
+
$exc_key = get_post_meta( $post->ID, 'exc_key', true );
|
284 |
+
$import_title = get_post_meta( $post->ID, 'import_post_title', true );
|
285 |
+
$import_date = get_post_meta( $post->ID, 'import_post_date', true );
|
286 |
+
$import_content = get_post_meta( $post->ID, 'import_post_content', true );
|
287 |
+
$import_featured_img = get_post_meta( $post->ID, 'import_post_featured_img', true );
|
288 |
+
|
289 |
+
$import_link_author_admin = get_post_meta( $post->ID, 'import_link_author_admin', true );
|
290 |
+
$import_link_author_public = get_post_meta( $post->ID, 'import_link_author_public', true );
|
291 |
+
|
292 |
+
// admin, public
|
293 |
+
$import_link_author = array( '', '' );
|
294 |
+
if ( $import_link_author_admin === 'yes' ) {
|
295 |
+
$import_link_author[0] = 'checked';
|
296 |
+
}
|
297 |
+
if ( $import_link_author_public === 'yes' ) {
|
298 |
+
$import_link_author[1] = 'checked';
|
299 |
+
}
|
300 |
+
|
301 |
+
$import_custom_fields = get_post_meta( $post->ID, 'imports_custom_fields', true );
|
302 |
+
$import_feed_limit = get_post_meta( $post->ID, 'import_feed_limit', true );
|
303 |
+
$import_feed_delete_days = intval( get_post_meta( $post->ID, 'import_feed_delete_days', true ) );
|
304 |
+
$post_status = $post->post_status;
|
305 |
+
$nonce = wp_create_nonce( FEEDZY_BASEFILE );
|
306 |
+
$output = '
|
307 |
+
<input type="hidden" name="feedzy_import_noncename" id="feedzy_category_meta_noncename" value="' . $nonce . '" />
|
308 |
+
';
|
309 |
+
include FEEDZY_ABSPATH . '/includes/views/import-metabox-edit.php';
|
310 |
+
echo $output;
|
311 |
+
}
|
312 |
+
|
313 |
+
/**
|
314 |
+
* Change number of posts imported.
|
315 |
+
*/
|
316 |
+
public function items_limit( $range, $post ) {
|
317 |
+
if ( ! feedzy_is_pro() ) {
|
318 |
+
$range = range( 10, 10, 10 );
|
319 |
+
}
|
320 |
+
return $range;
|
321 |
+
}
|
322 |
+
|
323 |
+
/**
|
324 |
+
* Save method for custom post type
|
325 |
+
* import feeds.
|
326 |
+
*
|
327 |
+
* @since 1.2.0
|
328 |
+
* @access public
|
329 |
+
*
|
330 |
+
* @param integer $post_id The post ID.
|
331 |
+
* @param object $post The post object.
|
332 |
+
*
|
333 |
+
* @return bool
|
334 |
+
*/
|
335 |
+
public function save_feedzy_import_feed_meta( $post_id, $post ) {
|
336 |
+
if (
|
337 |
+
empty( $_POST ) ||
|
338 |
+
get_post_type( $post_id ) !== 'feedzy_imports' ||
|
339 |
+
( isset( $_POST['feedzy_import_noncename'] ) && ! wp_verify_nonce( $_POST['feedzy_import_noncename'], FEEDZY_BASEFILE ) ) ||
|
340 |
+
! current_user_can( 'edit_post', $post_id )
|
341 |
+
) {
|
342 |
+
return $post_id;
|
343 |
+
}
|
344 |
+
$data_meta = isset( $_POST['feedzy_meta_data'] ) ? ( is_array( $_POST['feedzy_meta_data'] ) ? $_POST['feedzy_meta_data'] : array() ) : array();
|
345 |
+
$custom_fields_keys = isset( $_POST['custom_vars_key'] ) ? ( is_array( $_POST['custom_vars_key'] ) ? $_POST['custom_vars_key'] : array() ) : array();
|
346 |
+
$custom_fields_values = isset( $_POST['custom_vars_value'] ) ? ( is_array( $_POST['custom_vars_value'] ) ? $_POST['custom_vars_value'] : array() ) : array();
|
347 |
+
$custom_fields = array();
|
348 |
+
foreach ( $custom_fields_keys as $index => $key_value ) {
|
349 |
+
$value = '';
|
350 |
+
if ( isset( $custom_fields_values[ $index ] ) ) {
|
351 |
+
$value = implode( ',', (array) $custom_fields_values[ $index ] );
|
352 |
+
}
|
353 |
+
$custom_fields[ $key_value ] = $value;
|
354 |
+
}
|
355 |
+
if ( $post->post_type !== 'revision' ) {
|
356 |
+
foreach ( $data_meta as $key => $value ) {
|
357 |
+
$value = is_array( $value ) ? implode( ',', $value ) : implode( ',', (array) $value );
|
358 |
+
if ( get_post_meta( $post_id, $key, false ) ) {
|
359 |
+
update_post_meta( $post_id, $key, $value );
|
360 |
+
} else {
|
361 |
+
add_post_meta( $post_id, $key, $value );
|
362 |
+
}
|
363 |
+
if ( ! $value ) {
|
364 |
+
delete_post_meta( $post_id, $key );
|
365 |
+
}
|
366 |
+
}
|
367 |
+
// Added this to activate post if publish is clicked and sometimes it does not change status.
|
368 |
+
if ( isset( $_POST['custom_post_status'] ) && $_POST['custom_post_status'] === 'Publish' ) {
|
369 |
+
$activate = array(
|
370 |
+
'ID' => $post_id,
|
371 |
+
'post_status' => 'publish',
|
372 |
+
);
|
373 |
+
remove_action( 'save_post_feedzy_imports', array( $this, 'save_feedzy_import_feed_meta' ), 1, 2 );
|
374 |
+
wp_update_post( $activate );
|
375 |
+
add_action( 'save_post_feedzy_imports', array( $this, 'save_feedzy_import_feed_meta' ), 1, 2 );
|
376 |
+
}
|
377 |
+
|
378 |
+
do_action( 'feedzy_save_fields', $post_id, $post );
|
379 |
+
}
|
380 |
+
return true;
|
381 |
+
}
|
382 |
+
|
383 |
+
/**
|
384 |
+
* Redirect save post to post listing.
|
385 |
+
*
|
386 |
+
* @access public
|
387 |
+
*
|
388 |
+
* @param string $location The url to redirect to.
|
389 |
+
* @param int $post_id The post ID.
|
390 |
+
*
|
391 |
+
* @return string
|
392 |
+
*/
|
393 |
+
public function redirect_post_location( $location, $post_id ) {
|
394 |
+
$post = get_post( $post_id );
|
395 |
+
if ( 'feedzy_imports' === $post->post_type ) {
|
396 |
+
return admin_url( 'edit.php?post_type=feedzy_imports' );
|
397 |
+
}
|
398 |
+
return $location;
|
399 |
+
}
|
400 |
+
|
401 |
+
/**
|
402 |
+
* Method to add header columns to import feeds table.
|
403 |
+
*
|
404 |
+
* @since 1.2.0
|
405 |
+
* @access public
|
406 |
+
*
|
407 |
+
* @param array $columns The columns array.
|
408 |
+
*
|
409 |
+
* @return array|bool
|
410 |
+
*/
|
411 |
+
public function feedzy_import_columns( $columns ) {
|
412 |
+
$columns['title'] = __( 'Import Job Title', 'feedzy-rss-feeds' );
|
413 |
+
if ( $new_columns = $this->array_insert_before( 'date', $columns, 'status', __( 'Status', 'feedzy-rss-feeds' ) ) ) {
|
414 |
+
$columns = $new_columns;
|
415 |
+
} else {
|
416 |
+
$columns['status'] = __( 'Status', 'feedzy-rss-feeds' );
|
417 |
+
}
|
418 |
+
|
419 |
+
if ( $new_columns = $this->array_insert_before( 'date', $columns, 'last_run', __( 'Last Run Status', 'feedzy-rss-feeds' ) ) ) {
|
420 |
+
$columns = $new_columns;
|
421 |
+
} else {
|
422 |
+
$columns['last_run'] = __( 'Last Run Status', 'feedzy-rss-feeds' );
|
423 |
+
}
|
424 |
+
|
425 |
+
if ( $new_columns = $this->array_insert_before( 'date', $columns, 'next_run', __( 'Next Run', 'feedzy-rss-feeds' ) ) ) {
|
426 |
+
$columns = $new_columns;
|
427 |
+
} else {
|
428 |
+
$columns['next_run'] = __( 'Next Run', 'feedzy-rss-feeds' );
|
429 |
+
}
|
430 |
+
|
431 |
+
return $columns;
|
432 |
+
}
|
433 |
+
|
434 |
+
/**
|
435 |
+
* Utility method to insert before specific key
|
436 |
+
* in an associative array.
|
437 |
+
*
|
438 |
+
* @since 1.2.0
|
439 |
+
* @access public
|
440 |
+
*
|
441 |
+
* @param string $key The key before to insert.
|
442 |
+
* @param array $array The array in which to insert the new key.
|
443 |
+
* @param string $new_key The new key name.
|
444 |
+
* @param mixed $new_value The new key value.
|
445 |
+
*
|
446 |
+
* @return array|bool
|
447 |
+
*/
|
448 |
+
protected function array_insert_before( $key, &$array, $new_key, $new_value ) {
|
449 |
+
if ( array_key_exists( $key, $array ) ) {
|
450 |
+
$new = array();
|
451 |
+
foreach ( $array as $k => $value ) {
|
452 |
+
if ( $k === $key ) {
|
453 |
+
$new[ $new_key ] = $new_value;
|
454 |
+
}
|
455 |
+
$new[ $k ] = $value;
|
456 |
+
}
|
457 |
+
|
458 |
+
return $new;
|
459 |
+
}
|
460 |
+
|
461 |
+
return false;
|
462 |
+
}
|
463 |
+
|
464 |
+
/**
|
465 |
+
* Method to add a toggle checkbox on the status column
|
466 |
+
* in the import feeds table.
|
467 |
+
*
|
468 |
+
* @since 1.2.0
|
469 |
+
* @access public
|
470 |
+
*
|
471 |
+
* @param string $column The current column to check.
|
472 |
+
* @param integer $post_id The post ID.
|
473 |
+
*/
|
474 |
+
public function manage_feedzy_import_columns( $column, $post_id ) {
|
475 |
+
global $post;
|
476 |
+
switch ( $column ) {
|
477 |
+
case 'status':
|
478 |
+
$status = $post->post_status;
|
479 |
+
if ( empty( $status ) ) {
|
480 |
+
echo __( 'Undefined', 'feedzy-rss-feeds' );
|
481 |
+
} else {
|
482 |
+
if ( $status === 'publish' ) {
|
483 |
+
$checked = 'checked';
|
484 |
+
} else {
|
485 |
+
$checked = '';
|
486 |
+
}
|
487 |
+
echo '
|
488 |
+
<div class="switch">
|
489 |
+
<input id="feedzy-toggle_' . $post->ID . '" class="feedzy-toggle feedzy-toggle-round" type="checkbox" value="' . $post->ID . '" ' . $checked . '>
|
490 |
+
<label for="feedzy-toggle_' . $post->ID . '"></label>
|
491 |
+
</div>
|
492 |
+
';
|
493 |
+
}
|
494 |
+
break;
|
495 |
+
case 'last_run':
|
496 |
+
$last = get_post_meta( $post_id, 'last_run', true );
|
497 |
+
$msg = __( 'Never Run', 'feedzy-rss-feeds' );
|
498 |
+
if ( $last ) {
|
499 |
+
$items_count = get_post_meta( $post_id, 'imported_items_count', true );
|
500 |
+
$items = get_post_meta( $post_id, 'imported_items_hash', true );
|
501 |
+
if ( empty( $items ) ) {
|
502 |
+
$items = get_post_meta( $post_id, 'imported_items', true );
|
503 |
+
}
|
504 |
+
$count = $items_count;
|
505 |
+
if ( '' === $count && $items ) {
|
506 |
+
// backward compatibility where imported_items_count post_meta has not been populated yet
|
507 |
+
$count = count( $items );
|
508 |
+
}
|
509 |
+
$now = new DateTime();
|
510 |
+
$then = new DateTime();
|
511 |
+
$then = $then->setTimestamp( $last );
|
512 |
+
$in = $now->diff( $then );
|
513 |
+
$msg = sprintf( __( 'Imported %1$d item(s)<br>%2$d hours %3$d minutes ago', 'feedzy-rss-feeds' ), $count, $in->format( '%h' ), $in->format( '%i' ) );
|
514 |
+
// show total imported only if imported_items_count exists
|
515 |
+
if ( ctype_digit( $items_count ) ) {
|
516 |
+
$msg .= '<br>' . sprintf( __( 'Total items imported: %1$d', 'feedzy-rss-feeds' ), count( $items ) );
|
517 |
+
}
|
518 |
+
|
519 |
+
$import_errors = get_post_meta( $post_id, 'import_errors', true );
|
520 |
+
if ( $import_errors ) {
|
521 |
+
$msg .= '<div class="feedzy-error feedzy-api-error">';
|
522 |
+
foreach ( $import_errors as $error ) {
|
523 |
+
$msg .= '<br>' . $error;
|
524 |
+
}
|
525 |
+
$msg .= '</div>';
|
526 |
+
}
|
527 |
+
|
528 |
+
$msg = apply_filters( 'feedzy_import_column', $msg, 'last_run', $post_id );
|
529 |
+
}
|
530 |
+
echo $msg;
|
531 |
+
break;
|
532 |
+
case 'next_run':
|
533 |
+
$next = wp_next_scheduled( 'feedzy_cron' );
|
534 |
+
if ( $next ) {
|
535 |
+
$now = new DateTime();
|
536 |
+
$then = new DateTime();
|
537 |
+
$then = $then->setTimestamp( $next );
|
538 |
+
$in = $now->diff( $then );
|
539 |
+
echo sprintf( __( 'In %1$d hours %2$d minutes', 'feedzy-rss-feeds' ), $in->format( '%h' ), $in->format( '%i' ) );
|
540 |
+
if ( 'publish' === $post->post_status ) {
|
541 |
+
echo sprintf( '<br/><input type="button" class="button button-primary feedzy-run-now" data-id="%d" value="%s"><span class="feedzy-spinner spinner"></span>', $post_id, __( 'Run Now', 'feedzy-rss-feeds' ) );
|
542 |
+
}
|
543 |
+
}
|
544 |
+
break;
|
545 |
+
default:
|
546 |
+
break;
|
547 |
+
}
|
548 |
+
}
|
549 |
+
|
550 |
+
/**
|
551 |
+
* AJAX called method to update post status.
|
552 |
+
*
|
553 |
+
* @since 1.2.0
|
554 |
+
* @access public
|
555 |
+
*/
|
556 |
+
public function import_status() {
|
557 |
+
global $wpdb;
|
558 |
+
$id = $_POST['id'];
|
559 |
+
$status = $_POST['status'];
|
560 |
+
$publish = 'draft';
|
561 |
+
if ( $status === 'true' ) {
|
562 |
+
$publish = 'publish';
|
563 |
+
}
|
564 |
+
$new_post_status = array(
|
565 |
+
'ID' => $id,
|
566 |
+
'post_status' => $publish,
|
567 |
+
);
|
568 |
+
|
569 |
+
remove_action( 'save_post_feedzy_imports', array( $this, 'save_feedzy_import_feed_meta' ), 1, 2 );
|
570 |
+
$post_id = wp_update_post( $new_post_status );
|
571 |
+
add_action( 'save_post_feedzy_imports', array( $this, 'save_feedzy_import_feed_meta' ), 1, 2 );
|
572 |
+
|
573 |
+
if ( is_wp_error( $post_id ) ) {
|
574 |
+
$errors = $post_id->get_error_messages();
|
575 |
+
foreach ( $errors as $error ) {
|
576 |
+
echo $error;
|
577 |
+
}
|
578 |
+
}
|
579 |
+
wp_die(); // this is required to terminate immediately and return a proper response
|
580 |
+
}
|
581 |
+
|
582 |
+
/**
|
583 |
+
* AJAX method to get taxonomies for a given post_type.
|
584 |
+
*
|
585 |
+
* @since 1.2.0
|
586 |
+
* @access public
|
587 |
+
*/
|
588 |
+
public function get_taxonomies() {
|
589 |
+
$post_type = $_POST['post_type'];
|
590 |
+
$taxonomies = get_object_taxonomies(
|
591 |
+
array(
|
592 |
+
'post_type' => $post_type,
|
593 |
+
)
|
594 |
+
);
|
595 |
+
$results = array();
|
596 |
+
if ( ! empty( $taxonomies ) ) {
|
597 |
+
foreach ( $taxonomies as $taxonomy ) {
|
598 |
+
$terms = get_terms(
|
599 |
+
array(
|
600 |
+
'taxonomy' => $taxonomy,
|
601 |
+
'hide_empty' => false,
|
602 |
+
)
|
603 |
+
);
|
604 |
+
$results[ $taxonomy ] = $terms;
|
605 |
+
}
|
606 |
+
}
|
607 |
+
echo json_encode( $results );
|
608 |
+
wp_die();
|
609 |
+
}
|
610 |
+
|
611 |
+
/**
|
612 |
+
* Run a specific job.
|
613 |
+
*
|
614 |
+
* @since 1.6.1
|
615 |
+
* @access public
|
616 |
+
*/
|
617 |
+
public function run_now() {
|
618 |
+
check_ajax_referer( FEEDZY_NAME, 'security' );
|
619 |
+
|
620 |
+
$job = get_post( $_POST['id'] );
|
621 |
+
$count = $this->run_job( $job, 100 );
|
622 |
+
|
623 |
+
$msg = $count > 0 ? sprintf( __( 'Successfully run! %d items imported.', 'feedzy-rss-feeds' ), $count ) : __( 'Nothing imported!', 'feedzy-rss-feeds' );
|
624 |
+
|
625 |
+
$msg = apply_filters( 'feedzy_run_status_errors', $msg, $job->ID );
|
626 |
+
|
627 |
+
$import_errors = get_post_meta( $job->ID, 'import_errors', true );
|
628 |
+
if ( $import_errors ) {
|
629 |
+
$msg .= '<div class="feedzy-error feedzy-api-error">';
|
630 |
+
foreach ( $import_errors as $error ) {
|
631 |
+
$msg .= '<br>' . $error;
|
632 |
+
}
|
633 |
+
$msg .= '</div>';
|
634 |
+
}
|
635 |
+
|
636 |
+
wp_send_json_success( array( 'msg' => $msg ) );
|
637 |
+
}
|
638 |
+
|
639 |
+
/**
|
640 |
+
* The Cron Job.
|
641 |
+
*
|
642 |
+
* @since 1.2.0
|
643 |
+
* @access public
|
644 |
+
*/
|
645 |
+
public function run_cron( $max = 100 ) {
|
646 |
+
if ( empty( $max ) ) {
|
647 |
+
$max = 10;
|
648 |
+
}
|
649 |
+
global $post;
|
650 |
+
$args = array(
|
651 |
+
'post_type' => 'feedzy_imports',
|
652 |
+
'post_status' => 'publish',
|
653 |
+
'numberposts' => 300,
|
654 |
+
);
|
655 |
+
$feedzy_imports = get_posts( $args );
|
656 |
+
foreach ( $feedzy_imports as $job ) {
|
657 |
+
$this->run_job( $job, $max );
|
658 |
+
do_action( 'feedzy_run_cron_extra', $job );
|
659 |
+
}
|
660 |
+
}
|
661 |
+
|
662 |
+
/**
|
663 |
+
* Runs a specific job.
|
664 |
+
*
|
665 |
+
* @since 1.6.1
|
666 |
+
* @access private
|
667 |
+
* @return int
|
668 |
+
*/
|
669 |
+
private function run_job( $job, $max ) {
|
670 |
+
$source = get_post_meta( $job->ID, 'source', true );
|
671 |
+
$inc_key = get_post_meta( $job->ID, 'inc_key', true );
|
672 |
+
$exc_key = get_post_meta( $job->ID, 'exc_key', true );
|
673 |
+
$import_title = get_post_meta( $job->ID, 'import_post_title', true );
|
674 |
+
$import_date = get_post_meta( $job->ID, 'import_post_date', true );
|
675 |
+
$import_content = get_post_meta( $job->ID, 'import_post_content', true );
|
676 |
+
$import_featured_img = get_post_meta( $job->ID, 'import_post_featured_img', true );
|
677 |
+
$import_post_type = get_post_meta( $job->ID, 'import_post_type', true );
|
678 |
+
$import_post_term = get_post_meta( $job->ID, 'import_post_term', true );
|
679 |
+
$import_feed_limit = get_post_meta( $job->ID, 'import_feed_limit', true );
|
680 |
+
$max = $import_feed_limit;
|
681 |
+
if ( metadata_exists( $import_post_type, $job->ID, 'import_post_status' ) ) {
|
682 |
+
$import_post_status = get_post_meta( $job->ID, 'import_post_status', true );
|
683 |
+
} else {
|
684 |
+
add_post_meta( $job->ID, 'import_post_status', 'publish' );
|
685 |
+
$import_post_status = get_post_meta( $job->ID, 'import_post_status', true );
|
686 |
+
}
|
687 |
+
|
688 |
+
// the array of imported items that uses the old scheme of custom hashing the url and date
|
689 |
+
$imported_items = array();
|
690 |
+
$imported_items_old = get_post_meta( $job->ID, 'imported_items', true );
|
691 |
+
if ( ! is_array( $imported_items_old ) ) {
|
692 |
+
$imported_items_old = array();
|
693 |
+
}
|
694 |
+
|
695 |
+
// the array of imported items that uses the new scheme of SimplePie's hash/id
|
696 |
+
$imported_items_new = get_post_meta( $job->ID, 'imported_items_hash', true );
|
697 |
+
if ( ! is_array( $imported_items_new ) ) {
|
698 |
+
$imported_items_new = array();
|
699 |
+
}
|
700 |
+
|
701 |
+
// Note: this implementation will only work if only one of the fields is allowed to provide
|
702 |
+
// the date, because if the title can have UTC date and content can have local date then it
|
703 |
+
// all goes sideways.
|
704 |
+
// also if the user provides multiple date types, local will win.
|
705 |
+
$meta = 'yes';
|
706 |
+
if ( strpos( $import_title, '[#item_date_local]' ) !== false ) {
|
707 |
+
$meta = 'author, date, time, tz=local';
|
708 |
+
} elseif ( strpos( $import_title, '[#item_date_feed]' ) !== false ) {
|
709 |
+
$meta = 'author, date, time, tz=no';
|
710 |
+
}
|
711 |
+
|
712 |
+
$options = apply_filters(
|
713 |
+
'feedzy_shortcode_options', array(
|
714 |
+
'feeds' => $source,
|
715 |
+
'max' => $max,
|
716 |
+
'feed_title' => 'no',
|
717 |
+
'target' => '_blank',
|
718 |
+
'title' => '',
|
719 |
+
'meta' => $meta,
|
720 |
+
'summary' => 'yes',
|
721 |
+
'summarylength' => '',
|
722 |
+
'thumb' => 'auto',
|
723 |
+
'default' => '',
|
724 |
+
'size' => '250',
|
725 |
+
'keywords_title' => $inc_key,
|
726 |
+
'keywords_ban' => $exc_key,
|
727 |
+
'columns' => 1,
|
728 |
+
'offset' => 0,
|
729 |
+
'multiple_meta' => 'no',
|
730 |
+
), $job
|
731 |
+
);
|
732 |
+
$results = $this->get_job_feed( $options, $import_content, true );
|
733 |
+
$result = $results['items'];
|
734 |
+
update_post_meta( $job->ID, 'last_run', time() );
|
735 |
+
|
736 |
+
delete_post_meta( $job->ID, 'import_errors' );
|
737 |
+
|
738 |
+
// let's increase this time in case spinnerchief/wordai is being used.
|
739 |
+
ini_set( 'max_execution_time', apply_filters( 'feedzy_max_execution_time', 500 ) );
|
740 |
+
|
741 |
+
$count = $index = $import_image_errors = 0;
|
742 |
+
$import_errors = array();
|
743 |
+
|
744 |
+
do_action( 'feedzy_run_job_pre', $job, $result );
|
745 |
+
|
746 |
+
// check if we should be using the old scheme of custom hashing the url and date
|
747 |
+
// or the new scheme of depending on SimplePie's hash/id
|
748 |
+
// basically if the old scheme hasn't be used before, use the new scheme
|
749 |
+
// BUT if the old scheme has been used, continue with it.
|
750 |
+
$use_new_hash = empty( $imported_items_old );
|
751 |
+
$imported_items = $use_new_hash ? $imported_items_new : $imported_items_old;
|
752 |
+
|
753 |
+
foreach ( $result as $item ) {
|
754 |
+
$item_hash = $use_new_hash ? $item['item_id'] : hash( 'sha256', $item['item_url'] . '_' . $item['item_date'] );
|
755 |
+
$is_duplicate = $use_new_hash ? in_array( $item_hash, $imported_items_new, true ) : in_array( $item_hash, $imported_items_old, true );
|
756 |
+
if ( $is_duplicate ) {
|
757 |
+
do_action( 'themeisle_log_event', FEEDZY_NAME, sprintf( 'Ignoring %s as it is a duplicate (%s hash).', $item_hash, $use_new_hash ? 'new' : 'old' ), 'warn', __FILE__, __LINE__ );
|
758 |
+
$index++;
|
759 |
+
continue;
|
760 |
+
}
|
761 |
+
|
762 |
+
$import_image = strpos( $import_content, '[#item_image]' ) !== false || strpos( $import_featured_img, '[#item_image]' ) !== false;
|
763 |
+
if ( $import_image && empty( $item['item_img_path'] ) ) {
|
764 |
+
do_action( 'themeisle_log_event', FEEDZY_NAME, sprintf( 'Unable to find an image for item title %s.', $item['item_title'] ), 'warn', __FILE__, __LINE__ );
|
765 |
+
$import_image_errors++;
|
766 |
+
}
|
767 |
+
|
768 |
+
$author = '';
|
769 |
+
if ( $item['item_author'] ) {
|
770 |
+
if ( is_string( $item['item_author'] ) ) {
|
771 |
+
$author = $item['item_author'];
|
772 |
+
} elseif ( is_object( $item['item_author'] ) ) {
|
773 |
+
$author = $item['item_author']->get_name();
|
774 |
+
if ( empty( $author ) ) {
|
775 |
+
$author = $item['item_author']->get_email();
|
776 |
+
}
|
777 |
+
}
|
778 |
+
} else {
|
779 |
+
do_action( 'themeisle_log_event', FEEDZY_NAME, sprintf( 'Author is empty for %s.', $item['item_title'] ), 'warn', __FILE__, __LINE__ );
|
780 |
+
}
|
781 |
+
|
782 |
+
// phpcs:ignore WordPress.DateTime.RestrictedFunctions.date_date
|
783 |
+
$item_date = date( get_option( 'date_format' ) . ' at ' . get_option( 'time_format' ), $item['item_date'] );
|
784 |
+
$item_date = $item['item_date_formatted'];
|
785 |
+
|
786 |
+
$post_title = str_replace(
|
787 |
+
array(
|
788 |
+
'[#item_title]',
|
789 |
+
'[#item_author]',
|
790 |
+
'[#item_date]',
|
791 |
+
'[#item_date_local]',
|
792 |
+
'[#item_date_feed]',
|
793 |
+
'[#item_source]',
|
794 |
+
),
|
795 |
+
array(
|
796 |
+
$item['item_title'],
|
797 |
+
$author,
|
798 |
+
$item_date,
|
799 |
+
$item_date,
|
800 |
+
$item_date,
|
801 |
+
$item['item_source'],
|
802 |
+
),
|
803 |
+
$import_title
|
804 |
+
);
|
805 |
+
|
806 |
+
if ( $this->feedzy_is_business() ) {
|
807 |
+
$post_title = apply_filters( 'feedzy_parse_custom_tags', $post_title, $results['feed'], $index );
|
808 |
+
}
|
809 |
+
|
810 |
+
$post_title = apply_filters( 'feedzy_invoke_services', $post_title, 'title', $item['item_title'], $job );
|
811 |
+
|
812 |
+
$item_link = '<a href="' . $item['item_url'] . '" target="_blank">' . __( 'Read More', 'feedzy-rss-feeds' ) . '</a>';
|
813 |
+
$image_html = '<img src="' . $item['item_img_path'] . '" title="' . $item['item_title'] . '" />';
|
814 |
+
$post_content = str_replace(
|
815 |
+
array(
|
816 |
+
'[#item_description]',
|
817 |
+
'[#item_content]',
|
818 |
+
'[#item_image]',
|
819 |
+
'[#item_url]',
|
820 |
+
'[#item_categories]',
|
821 |
+
'[#item_source]',
|
822 |
+
),
|
823 |
+
array(
|
824 |
+
$item['item_description'],
|
825 |
+
! empty( $item['item_content'] ) ? $item['item_content'] : $item['item_description'],
|
826 |
+
$image_html,
|
827 |
+
$item_link,
|
828 |
+
$item['item_categories'],
|
829 |
+
$item['item_source'],
|
830 |
+
),
|
831 |
+
$import_content
|
832 |
+
);
|
833 |
+
|
834 |
+
if ( $this->feedzy_is_business() ) {
|
835 |
+
$full_content = ! empty( $item['item_full_content'] ) ? $item['item_full_content'] : $item['item_content'];
|
836 |
+
if ( false !== strpos( $post_content, '[#item_full_content]' ) ) {
|
837 |
+
$post_content = str_replace(
|
838 |
+
array(
|
839 |
+
'[#item_full_content]',
|
840 |
+
),
|
841 |
+
array(
|
842 |
+
$full_content,
|
843 |
+
),
|
844 |
+
$post_content
|
845 |
+
);
|
846 |
+
}
|
847 |
+
$post_content = apply_filters( 'feedzy_invoke_services', $post_content, 'full_content', $full_content, $job );
|
848 |
+
}
|
849 |
+
|
850 |
+
if ( $this->feedzy_is_business() ) {
|
851 |
+
$post_content = apply_filters( 'feedzy_parse_custom_tags', $post_content, $results['feed'], $index );
|
852 |
+
}
|
853 |
+
|
854 |
+
$post_content = apply_filters( 'feedzy_invoke_services', $post_content, 'content', $item['item_description'], $job );
|
855 |
+
|
856 |
+
// phpcs:ignore WordPress.DateTime.RestrictedFunctions.date_date
|
857 |
+
$item_date = date( 'Y-m-d H:i:s', $item['item_date'] );
|
858 |
+
// phpcs:ignore WordPress.DateTime.RestrictedFunctions.date_date
|
859 |
+
$now = date( 'Y-m-d H:i:s' );
|
860 |
+
if ( trim( $import_date ) === '' ) {
|
861 |
+
$post_date = $now;
|
862 |
+
}
|
863 |
+
$post_date = str_replace( '[#item_date]', $item_date, $import_date );
|
864 |
+
$post_date = str_replace( '[#post_date]', $now, $post_date );
|
865 |
+
|
866 |
+
$new_post = apply_filters(
|
867 |
+
'feedzy_insert_post_args', array(
|
868 |
+
'post_type' => $import_post_type,
|
869 |
+
'post_title' => $post_title,
|
870 |
+
'post_content' => $post_content,
|
871 |
+
'post_date' => $post_date,
|
872 |
+
'post_status' => $import_post_status,
|
873 |
+
),
|
874 |
+
$item,
|
875 |
+
$post_title,
|
876 |
+
$post_content,
|
877 |
+
$index,
|
878 |
+
$job
|
879 |
+
);
|
880 |
+
|
881 |
+
// no point creating a post if either the title or the content is null.
|
882 |
+
if ( is_null( $post_title ) || is_null( $post_content ) ) {
|
883 |
+
do_action( 'themeisle_log_event', FEEDZY_NAME, sprintf( 'NOT creating a new post as title (%s) or content (%s) is null.', $post_title, $post_content ), 'info', __FILE__, __LINE__ );
|
884 |
+
$index++;
|
885 |
+
continue;
|
886 |
+
}
|
887 |
+
|
888 |
+
$new_post_id = wp_insert_post( $new_post );
|
889 |
+
if ( $new_post_id === 0 ) {
|
890 |
+
do_action( 'themeisle_log_event', FEEDZY_NAME, sprintf( 'Unable to create a new post with params %s.', print_r( $new_post, true ) ), 'error', __FILE__, __LINE__ );
|
891 |
+
$index++;
|
892 |
+
continue;
|
893 |
+
}
|
894 |
+
do_action( 'themeisle_log_event', FEEDZY_NAME, sprintf( 'created new post with ID %d with post_content %s', $new_post_id, $post_content ), 'debug', __FILE__, __LINE__ );
|
895 |
+
|
896 |
+
$imported_items[] = $item_hash;
|
897 |
+
$count++;
|
898 |
+
|
899 |
+
if ( $import_post_term !== 'none' && strpos( $import_post_term, '_' ) > 0 ) {
|
900 |
+
// let's get the slug of the uncategorized category, even if it renamed.
|
901 |
+
$uncategorized = get_category( 1 );
|
902 |
+
$terms = explode( ',', $import_post_term );
|
903 |
+
foreach ( $terms as $term ) {
|
904 |
+
// this handles both x_2, where 2 is the term id and x is the taxonomy AND x_2_3_4 where 4 is the term id and the taxonomy name is "x 2 3 4".
|
905 |
+
$array = explode( '_', $term );
|
906 |
+
$term_id = array_pop( $array );
|
907 |
+
$taxonomy = implode( '_', $array );
|
908 |
+
wp_remove_object_terms( $new_post_id, $uncategorized->slug, 'category' );
|
909 |
+
$result = wp_set_object_terms( $new_post_id, intval( $term_id ), $taxonomy, true );
|
910 |
+
do_action( 'themeisle_log_event', FEEDZY_NAME, sprintf( 'After creating post in %s/%d, result = %s', $taxonomy, $term_id, print_r( $result, true ) ), 'debug', __FILE__, __LINE__ );
|
911 |
+
}
|
912 |
+
}
|
913 |
+
|
914 |
+
do_action( 'feedzy_import_extra', $job, $results, $new_post_id, $index );
|
915 |
+
|
916 |
+
$index++;
|
917 |
+
|
918 |
+
if ( trim( $import_featured_img ) !== '' && ! empty( $item['item_img_path'] ) ) {
|
919 |
+
$image_url = str_replace( '[#item_image]', $item['item_img_path'], $import_featured_img );
|
920 |
+
if ( $image_url !== '' && isset( $item['item_img_path'] ) && $item['item_img_path'] !== '' ) {
|
921 |
+
$this->generate_featured_image( $image_url, $new_post_id, $item['item_title'] );
|
922 |
+
} else {
|
923 |
+
$this->generate_featured_image( $import_featured_img, $new_post_id, $item['item_title'] );
|
924 |
+
}
|
925 |
+
}
|
926 |
+
|
927 |
+
// indicate that this post was imported by feedzy.
|
928 |
+
update_post_meta( $new_post_id, 'feedzy', 1 );
|
929 |
+
update_post_meta( $new_post_id, 'feedzy_item_url', $item['item_url'] );
|
930 |
+
update_post_meta( $new_post_id, 'feedzy_job', $job->ID );
|
931 |
+
update_post_meta( $new_post_id, 'feedzy_item_author', $author );
|
932 |
+
|
933 |
+
do_action( 'feedzy_after_post_import', $new_post_id, $item, $this->settings );
|
934 |
+
}
|
935 |
+
|
936 |
+
if ( $use_new_hash ) {
|
937 |
+
update_post_meta( $job->ID, 'imported_items_hash', $imported_items );
|
938 |
+
} else {
|
939 |
+
update_post_meta( $job->ID, 'imported_items', $imported_items );
|
940 |
+
}
|
941 |
+
update_post_meta( $job->ID, 'imported_items_count', $count );
|
942 |
+
|
943 |
+
if ( $import_image_errors > 0 ) {
|
944 |
+
$import_errors[] = sprintf( __( 'Unable to find an image for %1$d out of %2$d items imported', 'feedzy-rss-feeds' ), $import_image_errors, $count );
|
945 |
+
}
|
946 |
+
update_post_meta( $job->ID, 'import_errors', $import_errors );
|
947 |
+
|
948 |
+
return $count;
|
949 |
+
}
|
950 |
+
|
951 |
+
/**
|
952 |
+
* Method to return feed items to use on cron job.
|
953 |
+
*
|
954 |
+
* @since 1.2.0
|
955 |
+
* @access public
|
956 |
+
*
|
957 |
+
* @param array $options The options for the job.
|
958 |
+
* @param string $import_content The import content (along with the magic tags).
|
959 |
+
* @param bool $raw_feed_also Whether to return the raw SimplePie object as well.
|
960 |
+
*
|
961 |
+
* @return mixed
|
962 |
+
*/
|
963 |
+
public function get_job_feed( $options, $import_content = null, $raw_feed_also = false ) {
|
964 |
+
$admin = Feedzy_Rss_Feeds::instance()->get_admin();
|
965 |
+
if ( ! method_exists( $admin, 'normalize_urls' ) ) {
|
966 |
+
return array();
|
967 |
+
}
|
968 |
+
$feedURL = $admin->normalize_urls( $options['feeds'] );
|
969 |
+
|
970 |
+
$feedURL = apply_filters( 'feedzy_import_feed_url', $feedURL, $import_content, $options );
|
971 |
+
|
972 |
+
$feed = $admin->fetch_feed( $feedURL, '12_hours', $options );
|
973 |
+
|
974 |
+
if ( is_string( $feed ) ) {
|
975 |
+
return array();
|
976 |
+
}
|
977 |
+
$sizes = array(
|
978 |
+
'width' => $options['size'],
|
979 |
+
'height' => $options['size'],
|
980 |
+
);
|
981 |
+
$sizes = apply_filters( 'feedzy_thumb_sizes', $sizes, $feedURL );
|
982 |
+
$feed_items = apply_filters( 'feedzy_get_feed_array', array(), $options, $feed, $feedURL, $sizes );
|
983 |
+
|
984 |
+
if ( $raw_feed_also ) {
|
985 |
+
return array(
|
986 |
+
'items' => $feed_items,
|
987 |
+
'feed' => $feed,
|
988 |
+
);
|
989 |
+
}
|
990 |
+
return $feed_items;
|
991 |
+
}
|
992 |
+
|
993 |
+
/**
|
994 |
+
* Modifies the feed object before it is processed.
|
995 |
+
*
|
996 |
+
* @access public
|
997 |
+
*
|
998 |
+
* @param SimplePie $feed SimplePie object.
|
999 |
+
*/
|
1000 |
+
public function feedzy_modify_feed_config( $feed ) {
|
1001 |
+
// @codingStandardsIgnoreStart
|
1002 |
+
// set_time_limit(0);
|
1003 |
+
// @codingStandardsIgnoreEnd
|
1004 |
+
$feed->set_timeout( 60 );
|
1005 |
+
}
|
1006 |
+
|
1007 |
+
/**
|
1008 |
+
* Downloads and sets a post featured image if possible.
|
1009 |
+
*
|
1010 |
+
* @since 1.2.0
|
1011 |
+
* @access private
|
1012 |
+
*
|
1013 |
+
* @param string $file The file URL.
|
1014 |
+
* @param integer $post_id The post ID.
|
1015 |
+
* @param string $desc Description.
|
1016 |
+
*/
|
1017 |
+
private function generate_featured_image( $file, $post_id, $desc ) {
|
1018 |
+
do_action( 'themeisle_log_event', FEEDZY_NAME, sprintf( 'Trying to generate featured image for %s and postID %d', $file, $post_id ), 'debug', __FILE__, __LINE__ );
|
1019 |
+
|
1020 |
+
require_once( ABSPATH . 'wp-admin' . '/includes/image.php' );
|
1021 |
+
require_once( ABSPATH . 'wp-admin' . '/includes/file.php' );
|
1022 |
+
require_once( ABSPATH . 'wp-admin' . '/includes/media.php' );
|
1023 |
+
|
1024 |
+
$file_array = array();
|
1025 |
+
$local_file = download_url( $file );
|
1026 |
+
if ( is_wp_error( $local_file ) ) {
|
1027 |
+
do_action( 'themeisle_log_event', FEEDZY_NAME, sprintf( 'Unable to download file = %s and postID %d', print_r( $local_file, true ), $post_id ), 'error', __FILE__, __LINE__ );
|
1028 |
+
return;
|
1029 |
+
}
|
1030 |
+
|
1031 |
+
$type = mime_content_type( $local_file );
|
1032 |
+
// the file is downloaded with a .tmp extension
|
1033 |
+
// if the URL mentions the extension of the file, the upload succeeds
|
1034 |
+
// but if the URL is like https://source.unsplash.com/random, then the upload fails
|
1035 |
+
// so let's determine the file's mime type and then rename the .tmp file with that extension
|
1036 |
+
if ( in_array( $type, array_values( get_allowed_mime_types() ), true ) ) {
|
1037 |
+
$new_local_file = str_replace( '.tmp', str_replace( 'image/', '.', $type ), $local_file );
|
1038 |
+
$renamed = rename( $local_file, $new_local_file );
|
1039 |
+
if ( $renamed ) {
|
1040 |
+
$local_file = $new_local_file;
|
1041 |
+
} else {
|
1042 |
+
do_action( 'themeisle_log_event', FEEDZY_NAME, sprintf( 'Unable to rename file for postID %d', $post_id ), 'error', __FILE__, __LINE__ );
|
1043 |
+
}
|
1044 |
+
}
|
1045 |
+
|
1046 |
+
$file_array['tmp_name'] = $local_file;
|
1047 |
+
$file_array['name'] = basename( $local_file );
|
1048 |
+
|
1049 |
+
$id = media_handle_sideload( $file_array, $post_id, $desc );
|
1050 |
+
if ( is_wp_error( $id ) ) {
|
1051 |
+
do_action( 'themeisle_log_event', FEEDZY_NAME, sprintf( 'Unable to attach file for postID %d = %s', $post_id, print_r( $id, true ) ), 'error', __FILE__, __LINE__ );
|
1052 |
+
unlink( $file_array['tmp_name'] );
|
1053 |
+
return;
|
1054 |
+
}
|
1055 |
+
|
1056 |
+
$success = set_post_thumbnail( $post_id, $id );
|
1057 |
+
if ( false === $success ) {
|
1058 |
+
do_action( 'themeisle_log_event', FEEDZY_NAME, sprintf( 'Unable to attach file for postID %d for no apparent reason', $post_id ), 'error', __FILE__, __LINE__ );
|
1059 |
+
} else {
|
1060 |
+
do_action( 'themeisle_log_event', FEEDZY_NAME, sprintf( 'Attached file as featured image for postID %d', $post_id ), 'info', __FILE__, __LINE__ );
|
1061 |
+
}
|
1062 |
+
}
|
1063 |
+
|
1064 |
+
/**
|
1065 |
+
* Registers a cron schedule.
|
1066 |
+
*
|
1067 |
+
* @since 1.2.0
|
1068 |
+
* @access public
|
1069 |
+
*/
|
1070 |
+
public function add_cron() {
|
1071 |
+
if ( false === wp_next_scheduled( 'feedzy_cron' ) ) {
|
1072 |
+
wp_schedule_event( time(), 'hourly', 'feedzy_cron' );
|
1073 |
+
}
|
1074 |
+
}
|
1075 |
+
|
1076 |
+
/**
|
1077 |
+
* Checks if WP Cron is enabled and if not, shows a notice.
|
1078 |
+
*
|
1079 |
+
* @access public
|
1080 |
+
*/
|
1081 |
+
public function admin_notices() {
|
1082 |
+
$screen = get_current_screen();
|
1083 |
+
$allowed = array( 'edit-feedzy_categories', 'edit-feedzy_imports', 'feedzy-rss_page_feedzy-settings' );
|
1084 |
+
// only show in the feedzy screens.
|
1085 |
+
if ( ! in_array( $screen->id, $allowed, true ) ) {
|
1086 |
+
return;
|
1087 |
+
}
|
1088 |
+
|
1089 |
+
if ( defined( 'DISABLE_WP_CRON' ) && DISABLE_WP_CRON ) {
|
1090 |
+
echo '<div class="notice notice-error feedzy-error-critical is-dismissible"><p>' . __( 'WP Cron is disabled. Your feeds would not get updated. Please contact your hosting provider or system administrator', 'feedzy-rss-feeds' ) . '</p></div>';
|
1091 |
+
}
|
1092 |
+
|
1093 |
+
if ( false === wp_next_scheduled( 'feedzy_cron' ) ) {
|
1094 |
+
echo '<div class="notice notice-error"><p>' . __( 'Unable to register cron job. Your feeds might not get updated', 'feedzy-rss-feeds' ) . '</p></div>';
|
1095 |
+
}
|
1096 |
+
|
1097 |
+
}
|
1098 |
+
|
1099 |
+
/**
|
1100 |
+
* Method to return license status.
|
1101 |
+
* Used to filter PRO version types.
|
1102 |
+
*
|
1103 |
+
* @since 1.2.0
|
1104 |
+
* @access public
|
1105 |
+
* @return bool
|
1106 |
+
*/
|
1107 |
+
public function feedzy_is_business() {
|
1108 |
+
return $this->feedzy_is_license_of_type( false, 'business' );
|
1109 |
+
}
|
1110 |
+
|
1111 |
+
/**
|
1112 |
+
* Method to return if licence is agency.
|
1113 |
+
*
|
1114 |
+
* @since 1.3.2
|
1115 |
+
* @access public
|
1116 |
+
* @return bool
|
1117 |
+
*/
|
1118 |
+
public function feedzy_is_agency() {
|
1119 |
+
return $this->feedzy_is_license_of_type( false, 'agency' );
|
1120 |
+
}
|
1121 |
+
|
1122 |
+
/**
|
1123 |
+
* Method to return the type of licence.
|
1124 |
+
*
|
1125 |
+
* @access public
|
1126 |
+
* @return bool
|
1127 |
+
*/
|
1128 |
+
public function feedzy_is_license_of_type( $default, $type ) {
|
1129 |
+
// proceed to check the plan only if the license is active.
|
1130 |
+
if ( ! ( defined( 'TI_UNIT_TESTING' ) || defined( 'TI_CYPRESS_TESTING' ) ) ) {
|
1131 |
+
$status = apply_filters( 'feedzy_rss_feeds_pro_license_status', false );
|
1132 |
+
if ( $status !== 'valid' ) {
|
1133 |
+
return $default;
|
1134 |
+
}
|
1135 |
+
}
|
1136 |
+
$plan = get_option( 'feedzy_rss_feeds_pro_license_plan', 1 );
|
1137 |
+
$plan = intval( $plan );
|
1138 |
+
|
1139 |
+
switch ( $type ) {
|
1140 |
+
case 'agency':
|
1141 |
+
return ( $plan > 2 );
|
1142 |
+
case 'business':
|
1143 |
+
return ( $plan > 1 );
|
1144 |
+
case 'pro':
|
1145 |
+
return ( $plan > 0 );
|
1146 |
+
}
|
1147 |
+
return $default;
|
1148 |
+
}
|
1149 |
+
|
1150 |
+
|
1151 |
+
/**
|
1152 |
+
* Method for updating settings page via AJAX.
|
1153 |
+
*
|
1154 |
+
* @since 1.3.2
|
1155 |
+
* @access public
|
1156 |
+
*/
|
1157 |
+
public function update_settings_page() {
|
1158 |
+
$post_data = $_POST['feedzy_settings'];
|
1159 |
+
$this->save_settings();
|
1160 |
+
wp_die();
|
1161 |
+
}
|
1162 |
+
|
1163 |
+
/**
|
1164 |
+
* Display settings fields for the tab.
|
1165 |
+
*
|
1166 |
+
* @since 1.3.2
|
1167 |
+
* @access public
|
1168 |
+
*/
|
1169 |
+
public function display_tab_settings( $fields, $tab ) {
|
1170 |
+
$this->free_settings = get_option( 'feedzy-settings', array() );
|
1171 |
+
|
1172 |
+
$fields[] = array(
|
1173 |
+
'content' => $this->render_view( $tab ),
|
1174 |
+
'ajax' => false,
|
1175 |
+
);
|
1176 |
+
return $fields;
|
1177 |
+
}
|
1178 |
+
|
1179 |
+
/**
|
1180 |
+
* Method to save settings.
|
1181 |
+
*
|
1182 |
+
* @since 1.3.2
|
1183 |
+
* @access private
|
1184 |
+
*/
|
1185 |
+
private function save_settings() {
|
1186 |
+
update_option( 'feedzy-rss-feeds-settings', $this->settings );
|
1187 |
+
}
|
1188 |
+
|
1189 |
+
/**
|
1190 |
+
* Add settings tab.
|
1191 |
+
*
|
1192 |
+
* @since 1.3.2
|
1193 |
+
* @access public
|
1194 |
+
*/
|
1195 |
+
public function settings_tabs( $tabs ) {
|
1196 |
+
$tabs['misc'] = __( 'Miscellaneous', 'feedzy-rss-feeds' );
|
1197 |
+
return $tabs;
|
1198 |
+
}
|
1199 |
+
|
1200 |
+
/**
|
1201 |
+
* Save settings for the tab.
|
1202 |
+
*
|
1203 |
+
* @access public
|
1204 |
+
*/
|
1205 |
+
public function save_tab_settings( $settings, $tab ) {
|
1206 |
+
if ( 'misc' === $tab ) {
|
1207 |
+
$settings['canonical'] = isset( $_POST['canonical'] ) ? $_POST['canonical'] : 0;
|
1208 |
+
}
|
1209 |
+
return $settings;
|
1210 |
+
}
|
1211 |
+
|
1212 |
+
/**
|
1213 |
+
* Render a view page.
|
1214 |
+
*
|
1215 |
+
* @since 1.3.2
|
1216 |
+
* @access public
|
1217 |
+
*
|
1218 |
+
* @param string $name The name of the view.
|
1219 |
+
*
|
1220 |
+
* @return string
|
1221 |
+
*/
|
1222 |
+
private function render_view( $name ) {
|
1223 |
+
$file = null;
|
1224 |
+
switch ( $name ) {
|
1225 |
+
case 'misc':
|
1226 |
+
$file = FEEDZY_ABSPATH . '/includes/views/' . $name . '-view.php';
|
1227 |
+
break;
|
1228 |
+
default:
|
1229 |
+
$file = apply_filters( 'feedzy_render_view', $file, $name );
|
1230 |
+
break;
|
1231 |
+
}
|
1232 |
+
|
1233 |
+
if ( ! $file ) {
|
1234 |
+
return;
|
1235 |
+
}
|
1236 |
+
|
1237 |
+
ob_start();
|
1238 |
+
include $file;
|
1239 |
+
return ob_get_clean();
|
1240 |
+
}
|
1241 |
+
|
1242 |
+
/**
|
1243 |
+
* Renders the HTML for the tags.
|
1244 |
+
*
|
1245 |
+
* @since 1.4.2
|
1246 |
+
* @access public
|
1247 |
+
*/
|
1248 |
+
public function render_magic_tags( $default, $tags, $type ) {
|
1249 |
+
if ( $tags ) {
|
1250 |
+
$disabled = array();
|
1251 |
+
foreach ( $tags as $tag => $label ) {
|
1252 |
+
if ( strpos( $tag, ':disabled' ) !== false ) {
|
1253 |
+
$disabled[ str_replace( ':disabled', '', $tag ) ] = $label;
|
1254 |
+
continue;
|
1255 |
+
}
|
1256 |
+
$default .= '<a class="dropdown-item" href="#" data-field-name="' . $type . '" data-field-tag="' . $tag . '">' . $label . ' -- <small>[#' . $tag . ']</small></a>';
|
1257 |
+
}
|
1258 |
+
|
1259 |
+
if ( $disabled ) {
|
1260 |
+
foreach ( $disabled as $tag => $label ) {
|
1261 |
+
$default .= '<span disabled title="' . __( 'Upgrade your license to use this tag', 'feedzy-rss-feeds' ) . '" class="dropdown-item">' . $label . ' -- <small>[#' . $tag . ']</small></span>';
|
1262 |
+
}
|
1263 |
+
}
|
1264 |
+
}
|
1265 |
+
return $default;
|
1266 |
+
}
|
1267 |
+
|
1268 |
+
/**
|
1269 |
+
* Renders the tags for the title.
|
1270 |
+
*
|
1271 |
+
* @since 1.4.2
|
1272 |
+
* @access public
|
1273 |
+
*
|
1274 |
+
* @param array $default The default tags, empty.
|
1275 |
+
*/
|
1276 |
+
public function magic_tags_title( $default ) {
|
1277 |
+
$default['item_title'] = __( 'Item Title', 'feedzy-rss-feeds' );
|
1278 |
+
$default['item_author'] = __( 'Item Author', 'feedzy-rss-feeds' );
|
1279 |
+
$default['item_date'] = __( 'Item Date (UTC/GMT)', 'feedzy-rss-feeds' );
|
1280 |
+
$default['item_date_local'] = __( 'Item Date (local timezone)', 'feedzy-rss-feeds' );
|
1281 |
+
$default['item_date_feed'] = __( 'Item Date (feed timezone)', 'feedzy-rss-feeds' );
|
1282 |
+
$default['item_source'] = __( 'Item Source', 'feedzy-rss-feeds' );
|
1283 |
+
|
1284 |
+
// disabled tags
|
1285 |
+
if ( ! feedzy_is_pro() ) {
|
1286 |
+
$default['title_spinnerchief:disabled'] = __( 'Title from SpinnerChief', 'feedzy-rss-feeds' );
|
1287 |
+
$default['title_wordai:disabled'] = __( 'Title from WordAI', 'feedzy-rss-feeds' );
|
1288 |
+
}
|
1289 |
+
return $default;
|
1290 |
+
}
|
1291 |
+
|
1292 |
+
/**
|
1293 |
+
* Renders the tags for the date.
|
1294 |
+
*
|
1295 |
+
* @since 1.4.2
|
1296 |
+
* @access public
|
1297 |
+
*
|
1298 |
+
* @param array $default The default tags, empty.
|
1299 |
+
*/
|
1300 |
+
public function magic_tags_date( $default ) {
|
1301 |
+
$default['item_date'] = __( 'Item Date', 'feedzy-rss-feeds' );
|
1302 |
+
$default['post_date'] = __( 'Post Date', 'feedzy-rss-feeds' );
|
1303 |
+
return $default;
|
1304 |
+
}
|
1305 |
+
|
1306 |
+
/**
|
1307 |
+
* Renders the tags for the content.
|
1308 |
+
*
|
1309 |
+
* @since 1.4.2
|
1310 |
+
* @access public
|
1311 |
+
*
|
1312 |
+
* @param array $default The default tags, empty.
|
1313 |
+
*/
|
1314 |
+
public function magic_tags_content( $default ) {
|
1315 |
+
$default['item_content'] = __( 'Item Content', 'feedzy-rss-feeds' );
|
1316 |
+
$default['item_description'] = __( 'Item Description', 'feedzy-rss-feeds' );
|
1317 |
+
$default['item_image'] = __( 'Item Image', 'feedzy-rss-feeds' );
|
1318 |
+
$default['item_url'] = __( 'Item URL', 'feedzy-rss-feeds' );
|
1319 |
+
$default['item_categories'] = __( 'Item Categories', 'feedzy-rss-feeds' );
|
1320 |
+
$default['item_source'] = __( 'Item Source', 'feedzy-rss-feeds' );
|
1321 |
+
|
1322 |
+
// disabled tags
|
1323 |
+
if ( ! feedzy_is_pro() ) {
|
1324 |
+
$default['item_full_content:disabled'] = __( 'Item Full Content', 'feedzy-rss-feeds' );
|
1325 |
+
$default['content_spinnerchief:disabled'] = __( 'Content from SpinnerChief', 'feedzy-rss-feeds' );
|
1326 |
+
$default['full_content_spinnerchief:disabled'] = __( 'Full content from SpinnerChief', 'feedzy-rss-feeds' );
|
1327 |
+
$default['content_wordai:disabled'] = __( 'Content from WordAI', 'feedzy-rss-feeds' );
|
1328 |
+
$default['full_content_wordai:disabled'] = __( 'Full content from WordAI', 'feedzy-rss-feeds' );
|
1329 |
+
}
|
1330 |
+
return $default;
|
1331 |
+
}
|
1332 |
+
|
1333 |
+
/**
|
1334 |
+
* Renders the tags for the featured image.
|
1335 |
+
*
|
1336 |
+
* @since 1.4.2
|
1337 |
+
* @access public
|
1338 |
+
*
|
1339 |
+
* @param array $default The default tags, empty.
|
1340 |
+
*/
|
1341 |
+
public function magic_tags_image( $default ) {
|
1342 |
+
$default['item_image'] = __( 'Item Image', 'feedzy-rss-feeds' );
|
1343 |
+
return $default;
|
1344 |
+
}
|
1345 |
+
|
1346 |
+
/**
|
1347 |
+
* Register the meta tags.
|
1348 |
+
*
|
1349 |
+
* @access public
|
1350 |
+
*/
|
1351 |
+
public function wp() {
|
1352 |
+
global $wp_version;
|
1353 |
+
|
1354 |
+
$free_settings = get_option( 'feedzy-settings', array() );
|
1355 |
+
if ( ! isset( $free_settings['canonical'] ) || 1 !== intval( $free_settings['canonical'] ) ) {
|
1356 |
+
return;
|
1357 |
+
}
|
1358 |
+
|
1359 |
+
// Yoast.
|
1360 |
+
add_filter( 'wpseo_canonical', array( $this, 'get_canonical_url' ) );
|
1361 |
+
|
1362 |
+
// All In One SEO.
|
1363 |
+
add_filter( 'aioseop_canonical_url', array( $this, 'get_canonical_url' ) );
|
1364 |
+
|
1365 |
+
if ( version_compare( $wp_version, '4.6.0', '>=' ) ) {
|
1366 |
+
// Fallback if none of the above plugins is present.
|
1367 |
+
add_filter( 'get_canonical_url', array( $this, 'get_canonical_url' ) );
|
1368 |
+
}
|
1369 |
+
}
|
1370 |
+
|
1371 |
+
/**
|
1372 |
+
* Return the canonical URL.
|
1373 |
+
*
|
1374 |
+
* @access public
|
1375 |
+
*/
|
1376 |
+
public function get_canonical_url( $canonical_url ) {
|
1377 |
+
if ( ! is_singular() ) {
|
1378 |
+
return $canonical_url;
|
1379 |
+
}
|
1380 |
+
|
1381 |
+
global $post;
|
1382 |
+
if ( ! $post ) {
|
1383 |
+
return $canonical_url;
|
1384 |
+
}
|
1385 |
+
|
1386 |
+
// let's check if the post has been imported by feedzy.
|
1387 |
+
if ( 1 === intval( get_post_meta( $post->ID, 'feedzy', true ) ) ) {
|
1388 |
+
$url = get_post_meta( $post->ID, 'feedzy_item_url', true );
|
1389 |
+
if ( ! empty( $url ) ) {
|
1390 |
+
$canonical_url = $url;
|
1391 |
+
}
|
1392 |
+
}
|
1393 |
+
return $canonical_url;
|
1394 |
+
}
|
1395 |
+
|
1396 |
+
}
|
includes/admin/feedzy-rss-feeds-ui.php
CHANGED
@@ -137,8 +137,6 @@ class Feedzy_Rss_Feeds_Ui {
|
|
137 |
* @return array
|
138 |
*/
|
139 |
public function feedzy_add_tinymce_lang( $arr ) {
|
140 |
-
error_log( 'called mce_external_languages' );
|
141 |
-
|
142 |
$feedzy_rss_feeds_ui_lang = FEEDZY_ABSPATH . '/includes/admin/feedzy-rss-feeds-ui-lang.php';
|
143 |
$feedzy_rss_feeds_ui_lang = apply_filters( 'feedzy_rss_feeds_ui_lang_filter', $feedzy_rss_feeds_ui_lang );
|
144 |
$arr[] = $feedzy_rss_feeds_ui_lang;
|
137 |
* @return array
|
138 |
*/
|
139 |
public function feedzy_add_tinymce_lang( $arr ) {
|
|
|
|
|
140 |
$feedzy_rss_feeds_ui_lang = FEEDZY_ABSPATH . '/includes/admin/feedzy-rss-feeds-ui-lang.php';
|
141 |
$feedzy_rss_feeds_ui_lang = apply_filters( 'feedzy_rss_feeds_ui_lang_filter', $feedzy_rss_feeds_ui_lang );
|
142 |
$arr[] = $feedzy_rss_feeds_ui_lang;
|
includes/admin/feedzy-wp-widget.php
CHANGED
@@ -247,8 +247,8 @@ class feedzy_wp_widget extends WP_Widget {
|
|
247 |
'follow' => $instance['follow'],
|
248 |
'http' => $instance['http'],
|
249 |
'lazy' => ! empty( $instance['lazy'] ) ? self::bool_to_enum( $instance['lazy'] ) : false,
|
250 |
-
'offset' => $instance['offset'],
|
251 |
-
'multiple_meta' => $instance['multiple_meta'],
|
252 |
);
|
253 |
$feedzy_widget_shortcode_attributes = apply_filters( 'feedzy_widget_shortcode_attributes_filter', $feedzy_widget_shortcode_attributes, $args, $instance );
|
254 |
|
247 |
'follow' => $instance['follow'],
|
248 |
'http' => $instance['http'],
|
249 |
'lazy' => ! empty( $instance['lazy'] ) ? self::bool_to_enum( $instance['lazy'] ) : false,
|
250 |
+
'offset' => ! empty( $instance['offset'] ) ? $instance['offset'] : '',
|
251 |
+
'multiple_meta' => ! empty( $instance['multiple_meta'] ) ? $instance['multiple_meta'] : '',
|
252 |
);
|
253 |
$feedzy_widget_shortcode_attributes = apply_filters( 'feedzy_widget_shortcode_attributes_filter', $feedzy_widget_shortcode_attributes, $args, $instance );
|
254 |
|
includes/feedzy-rss-feeds-activator.php
CHANGED
@@ -43,7 +43,7 @@ class Feedzy_Rss_Feeds_Activator {
|
|
43 |
)
|
44 |
);
|
45 |
}
|
46 |
-
|
47 |
}
|
48 |
|
49 |
}
|
43 |
)
|
44 |
);
|
45 |
}
|
46 |
+
add_option( 'feedzy-activated', true );
|
47 |
}
|
48 |
|
49 |
}
|
includes/feedzy-rss-feeds-deactivator.php
CHANGED
@@ -30,7 +30,7 @@ class Feedzy_Rss_Feeds_Deactivator {
|
|
30 |
* @access public
|
31 |
*/
|
32 |
public static function deactivate() {
|
33 |
-
|
34 |
}
|
35 |
|
36 |
}
|
30 |
* @access public
|
31 |
*/
|
32 |
public static function deactivate() {
|
33 |
+
delete_option( 'feedzy-activated' );
|
34 |
}
|
35 |
|
36 |
}
|
includes/feedzy-rss-feeds-feed-tweaks.php
CHANGED
@@ -70,3 +70,13 @@ function feedzy_is_new() {
|
|
70 |
function feedzy_is_pro() {
|
71 |
return defined( 'FEEDZY_PRO_ABSPATH' );
|
72 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
function feedzy_is_pro() {
|
71 |
return defined( 'FEEDZY_PRO_ABSPATH' );
|
72 |
}
|
73 |
+
|
74 |
+
|
75 |
+
/**
|
76 |
+
* Checks if the PRO version is older than a particular version.
|
77 |
+
*
|
78 |
+
* @since ?
|
79 |
+
*/
|
80 |
+
function feedzy_is_pro_older_than( $version ) {
|
81 |
+
return version_compare( FEEDZY_PRO_VERSION, $version, '<' );
|
82 |
+
}
|
includes/feedzy-rss-feeds.php
CHANGED
@@ -104,7 +104,7 @@ class Feedzy_Rss_Feeds {
|
|
104 |
*/
|
105 |
public function init() {
|
106 |
self::$plugin_name = 'feedzy-rss-feeds';
|
107 |
-
self::$version = '3.
|
108 |
self::$instance->load_dependencies();
|
109 |
self::$instance->set_locale();
|
110 |
self::$instance->define_admin_hooks();
|
@@ -192,7 +192,7 @@ class Feedzy_Rss_Feeds {
|
|
192 |
self::$instance->loader->add_action( 'save_post', self::$instance->admin, 'save_feedzy_post_type_meta', 1, 2 );
|
193 |
self::$instance->loader->add_action( 'feedzy_pre_http_setup', self::$instance->admin, 'pre_http_setup', 10, 1 );
|
194 |
self::$instance->loader->add_action( 'feedzy_post_http_teardown', self::$instance->admin, 'post_http_teardown', 10, 1 );
|
195 |
-
self::$instance->loader->add_action( '
|
196 |
|
197 |
self::$instance->loader->add_action( 'manage_feedzy_categories_posts_custom_column', self::$instance->admin, 'manage_feedzy_category_columns', 10, 2 );
|
198 |
self::$instance->loader->add_filter( 'manage_feedzy_categories_posts_columns', self::$instance->admin, 'feedzy_category_columns' );
|
@@ -214,11 +214,44 @@ class Feedzy_Rss_Feeds {
|
|
214 |
self::$instance->loader->add_action( 'wp_ajax_get_tinymce_form', self::$instance->admin, 'get_tinymce_form' );
|
215 |
self::$instance->loader->add_action( 'wp_enqueue_scripts', self::$instance->admin, 'enqueue_styles' );
|
216 |
self::$instance->loader->add_action( 'admin_enqueue_scripts', self::$instance->admin, 'enqueue_styles_admin' );
|
|
|
|
|
217 |
$plugin_widget = new feedzy_wp_widget();
|
218 |
self::$instance->loader->add_action( 'widgets_init', $plugin_widget, 'registerWidget', 10 );
|
219 |
self::$instance->loader->add_action( 'rest_api_init', self::$instance->admin, 'rest_route', 10 );
|
220 |
|
221 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
222 |
|
223 |
if ( ! defined( 'TI_UNIT_TESTING' ) ) {
|
224 |
add_action(
|
104 |
*/
|
105 |
public function init() {
|
106 |
self::$plugin_name = 'feedzy-rss-feeds';
|
107 |
+
self::$version = '3.4.0';
|
108 |
self::$instance->load_dependencies();
|
109 |
self::$instance->set_locale();
|
110 |
self::$instance->define_admin_hooks();
|
192 |
self::$instance->loader->add_action( 'save_post', self::$instance->admin, 'save_feedzy_post_type_meta', 1, 2 );
|
193 |
self::$instance->loader->add_action( 'feedzy_pre_http_setup', self::$instance->admin, 'pre_http_setup', 10, 1 );
|
194 |
self::$instance->loader->add_action( 'feedzy_post_http_teardown', self::$instance->admin, 'post_http_teardown', 10, 1 );
|
195 |
+
self::$instance->loader->add_action( 'admin_init', self::$instance->admin, 'admin_init', 10, 1 );
|
196 |
|
197 |
self::$instance->loader->add_action( 'manage_feedzy_categories_posts_custom_column', self::$instance->admin, 'manage_feedzy_category_columns', 10, 2 );
|
198 |
self::$instance->loader->add_filter( 'manage_feedzy_categories_posts_columns', self::$instance->admin, 'feedzy_category_columns' );
|
214 |
self::$instance->loader->add_action( 'wp_ajax_get_tinymce_form', self::$instance->admin, 'get_tinymce_form' );
|
215 |
self::$instance->loader->add_action( 'wp_enqueue_scripts', self::$instance->admin, 'enqueue_styles' );
|
216 |
self::$instance->loader->add_action( 'admin_enqueue_scripts', self::$instance->admin, 'enqueue_styles_admin' );
|
217 |
+
self::$instance->loader->add_filter( 'feedzy_rss_feeds_logger_data', self::$instance->admin, 'get_usage_data', 10 );
|
218 |
+
|
219 |
$plugin_widget = new feedzy_wp_widget();
|
220 |
self::$instance->loader->add_action( 'widgets_init', $plugin_widget, 'registerWidget', 10 );
|
221 |
self::$instance->loader->add_action( 'rest_api_init', self::$instance->admin, 'rest_route', 10 );
|
222 |
|
223 |
+
// do not include import feature if this is a pro version that does not know of this new support.
|
224 |
+
if ( ! feedzy_is_pro() || has_filter( 'feedzy_free_has_import' ) ) {
|
225 |
+
$plugin_import = new Feedzy_Rss_Feeds_Import( self::$instance->get_plugin_name(), self::$instance->get_version() );
|
226 |
+
self::$instance->loader->add_action( 'feedzy_upsell_class', $plugin_import, 'upsell_class', 10, 1 );
|
227 |
+
self::$instance->loader->add_action( 'feedzy_upsell_content', $plugin_import, 'upsell_content', 10, 1 );
|
228 |
+
self::$instance->loader->add_action( 'admin_enqueue_scripts', $plugin_import, 'enqueue_styles' );
|
229 |
+
self::$instance->loader->add_action( 'init', $plugin_import, 'register_import_post_type', 9, 1 );
|
230 |
+
self::$instance->loader->add_action( 'feedzy_cron', $plugin_import, 'run_cron' );
|
231 |
+
self::$instance->loader->add_action( 'save_post_feedzy_imports', $plugin_import, 'save_feedzy_import_feed_meta', 1, 2 );
|
232 |
+
self::$instance->loader->add_action( 'wp_ajax_import_status', $plugin_import, 'import_status' );
|
233 |
+
self::$instance->loader->add_action( 'wp_ajax_get_taxonomies', $plugin_import, 'get_taxonomies' );
|
234 |
+
self::$instance->loader->add_action( 'wp_ajax_run_now', $plugin_import, 'run_now' );
|
235 |
+
self::$instance->loader->add_action( 'manage_feedzy_imports_posts_custom_column', $plugin_import, 'manage_feedzy_import_columns', 10, 2 );
|
236 |
+
self::$instance->loader->add_action( 'wp', $plugin_import, 'wp' );
|
237 |
+
|
238 |
+
self::$instance->loader->add_filter( 'feedzy_items_limit', $plugin_import, 'items_limit', 10, 2 );
|
239 |
+
self::$instance->loader->add_filter( 'feedzy_settings_tabs', $plugin_import, 'settings_tabs', 10, 1 );
|
240 |
+
self::$instance->loader->add_filter( 'redirect_post_location', $plugin_import, 'redirect_post_location', 10, 2 );
|
241 |
+
self::$instance->loader->add_filter( 'manage_feedzy_imports_posts_columns', $plugin_import, 'feedzy_import_columns' );
|
242 |
+
self::$instance->loader->add_action( 'admin_notices', $plugin_import, 'admin_notices' );
|
243 |
+
self::$instance->loader->add_action( 'plugins_loaded', $plugin_import, 'add_cron' );
|
244 |
+
self::$instance->loader->add_filter( 'feedzy_item_filter', $plugin_import, 'add_data_to_item', 10, 4 );
|
245 |
+
self::$instance->loader->add_filter( 'feedzy_display_tab_settings', $plugin_import, 'display_tab_settings', 10, 2 );
|
246 |
+
self::$instance->loader->add_filter( 'feedzy_save_tab_settings', $plugin_import, 'save_tab_settings', 10, 2 );
|
247 |
+
self::$instance->loader->add_filter( 'feedzy_render_magic_tags', $plugin_import, 'render_magic_tags', 10, 3 );
|
248 |
+
self::$instance->loader->add_filter( 'feedzy_magic_tags_title', $plugin_import, 'magic_tags_title' );
|
249 |
+
self::$instance->loader->add_filter( 'feedzy_magic_tags_date', $plugin_import, 'magic_tags_date' );
|
250 |
+
self::$instance->loader->add_filter( 'feedzy_magic_tags_content', $plugin_import, 'magic_tags_content' );
|
251 |
+
self::$instance->loader->add_filter( 'feedzy_magic_tags_image', $plugin_import, 'magic_tags_image' );
|
252 |
+
self::$instance->loader->add_filter( 'feedzy_retrieve_categories', $plugin_import, 'retrieve_categories', 10, 2 );
|
253 |
+
self::$instance->loader->add_filter( 'feedzy_is_license_of_type', $plugin_import, 'feedzy_is_license_of_type', 10, 2 );
|
254 |
+
}
|
255 |
|
256 |
if ( ! defined( 'TI_UNIT_TESTING' ) ) {
|
257 |
add_action(
|
includes/gutenberg/build/block.js
CHANGED
@@ -242,7 +242,7 @@ eval("var def = __webpack_require__(5).f;\nvar has = __webpack_require__(7);\nva
|
|
242 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
243 |
|
244 |
"use strict";
|
245 |
-
eval("Object.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(30);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__style_scss__ = __webpack_require__(43);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__style_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__style_scss__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_query_string__ = __webpack_require__(44);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_query_string___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_query_string__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__attributes__ = __webpack_require__(48);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__inspector__ = __webpack_require__(49);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils__ = __webpack_require__(52);\n\n\nvar _this = this;\n\n// jshint ignore: start\n\n/**\r\n * Block dependencies\r\n */\n\n\n\n\n\n\n/**\r\n * Internal block libraries\r\n */\nvar __ = wp.i18n.__;\nvar registerBlockType = wp.blocks.registerBlockType;\nvar _wp$components = wp.components,\n ExternalLink = _wp$components.ExternalLink,\n Placeholder = _wp$components.Placeholder,\n TextControl = _wp$components.TextControl,\n Button = _wp$components.Button,\n Spinner = _wp$components.Spinner;\nvar date = wp.date.date;\n\n/**\r\n * Register block\r\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (registerBlockType('feedzy-rss-feeds/feedzy-block', {\n\ttitle: __('Feedzy RSS Feeds'),\n\tcategory: 'common',\n\ticon: 'rss',\n\tkeywords: [__('Feedzy RSS Feeds'), __('RSS'), __('Feeds')],\n\tsupports: {\n\t\thtml: false\n\t},\n\tattributes: __WEBPACK_IMPORTED_MODULE_3__attributes__[\"a\" /* default */],\n\tedit: function edit(props) {\n\t\tvar onChangeFeeds = function onChangeFeeds(value) {\n\t\t\tprops.setAttributes({ feeds: value });\n\t\t};\n\t\tvar onChangeMax = function onChangeMax(value) {\n\t\t\tprops.setAttributes({ max: !value ? 5 : Number(value) });\n\t\t};\n\t\tvar onChangeOffset = function onChangeOffset(value) {\n\t\t\tprops.setAttributes({ offset: Number(value) });\n\t\t};\n\t\tvar toggleFeedTitle = function toggleFeedTitle(value) {\n\t\t\tprops.setAttributes({ feed_title: !props.attributes.feed_title });\n\t\t};\n\t\tvar onRefresh = function onRefresh(value) {\n\t\t\tprops.setAttributes({ refresh: value });\n\t\t};\n\t\tvar onSort = function onSort(value) {\n\t\t\tprops.setAttributes({ sort: value });\n\t\t};\n\t\tvar onTarget = function onTarget(value) {\n\t\t\tprops.setAttributes({ target: value });\n\t\t};\n\t\tvar onTitle = function onTitle(value) {\n\t\t\tprops.setAttributes({ title: Number(value) });\n\t\t};\n\t\tvar changeMeta = function changeMeta(value) {\n\t\t\tprops.setAttributes({ metafields: value });\n\t\t};\n\t\tvar changeMultipleMeta = function changeMultipleMeta(value) {\n\t\t\tprops.setAttributes({ multiple_meta: value });\n\t\t};\n\t\tvar toggleSummary = function toggleSummary(value) {\n\t\t\tprops.setAttributes({ summary: !props.attributes.summary });\n\t\t};\n\t\tvar toggleLazy = function toggleLazy(value) {\n\t\t\tprops.setAttributes({ lazy: !props.attributes.lazy });\n\t\t};\n\t\tvar onSummaryLength = function onSummaryLength(value) {\n\t\t\tprops.setAttributes({ summarylength: Number(value) });\n\t\t};\n\t\tvar onKeywordsTitle = function onKeywordsTitle(value) {\n\t\t\tprops.setAttributes({ keywords_title: value });\n\t\t};\n\t\tvar onKeywordsBan = function onKeywordsBan(value) {\n\t\t\tprops.setAttributes({ keywords_ban: value });\n\t\t};\n\t\tvar onThumb = function onThumb(value) {\n\t\t\tprops.setAttributes({ thumb: value });\n\t\t};\n\t\tvar onDefault = function onDefault(value) {\n\t\t\tprops.setAttributes({ default: value });\n\t\t};\n\t\tvar onSize = function onSize(value) {\n\t\t\tprops.setAttributes({ size: !value ? 150 : Number(value) });\n\t\t};\n\t\tvar onReferralURL = function onReferralURL(value) {\n\t\t\tprops.setAttributes({ referral_url: value });\n\t\t};\n\t\tvar onColumns = function onColumns(value) {\n\t\t\tprops.setAttributes({ columns: value });\n\t\t};\n\t\tvar onTemplate = function onTemplate(value) {\n\t\t\tprops.setAttributes({ template: value });\n\t\t};\n\t\tvar togglePrice = function togglePrice(value) {\n\t\t\tprops.setAttributes({ price: !props.attributes.price });\n\t\t};\n\t\tvar loadFeed = function loadFeed() {\n\t\t\tprops.setAttributes({ status: 1 });\n\n\t\t\tvar url = props.attributes.feeds;\n\n\t\t\tif (url === undefined) {\n\t\t\t\treturn props.setAttributes({ status: 3 });\n\t\t\t}\n\n\t\t\tif (Object(__WEBPACK_IMPORTED_MODULE_5__utils__[\"c\" /* inArray */])(url, props.attributes.categories)) {\n\t\t\t\tvar category = url;\n\t\t\t\turl = __WEBPACK_IMPORTED_MODULE_2_query_string___default.a.stringify({ category: category }, { arrayFormat: 'bracket' });\n\t\t\t} else {\n\t\t\t\turl = url.replace(/\\s/g, '').split(',').filter(function (item) {\n\t\t\t\t\treturn item !== '';\n\t\t\t\t});\n\t\t\t\turl = __WEBPACK_IMPORTED_MODULE_2_query_string___default.a.stringify({ url: url }, { arrayFormat: 'bracket' });\n\t\t\t}\n\n\t\t\twp.apiRequest({ path: '/feedzy/v1/feed?' + url }).then(function (data) {\n\t\t\t\tif (_this.unmounting) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\t\t\t\tif (!data['error']) {\n\t\t\t\t\tprops.setAttributes({ feedData: data });\n\t\t\t\t\tprops.setAttributes({ status: 2 });\n\t\t\t\t\treturn data;\n\t\t\t\t} else {\n\t\t\t\t\tprops.setAttributes({ status: 3 });\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\t\t\t}).fail(function (err) {\n\t\t\t\tprops.setAttributes({ status: 3 });\n\t\t\t\treturn err;\n\t\t\t});\n\t\t};\n\t\tvar loadCategories = function loadCategories() {\n\t\t\twp.apiRequest({ path: '/wp/v2/feedzy_categories' }).then(function (data) {\n\t\t\t\tif (_this.unmounting) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\t\t\t\tvar i = 0;\n\t\t\t\tvar categories = [];\n\t\t\t\tdata.forEach(function (item) {\n\t\t\t\t\tcategories[i] = item.slug;\n\t\t\t\t\ti = i + 1;\n\t\t\t\t});\n\t\t\t\tprops.setAttributes({ categories: categories });\n\t\t\t\tjQuery('.feedzy-source input').autocomplete({\n\t\t\t\t\tsource: categories,\n\t\t\t\t\tselect: function select(event, ui) {\n\t\t\t\t\t\tprops.setAttributes({ feeds: ui.item.label });\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}).fail(function (err) {\n\t\t\t\treturn err;\n\t\t\t});\n\t\t};\n\t\tvar metaExists = function metaExists(value) {\n\t\t\treturn 0 <= props.attributes.metafields.replace(/\\s/g, '').split(',').indexOf(value) || '' === props.attributes.metafields;\n\t\t};\n\t\tvar multipleMetaExists = function multipleMetaExists(value) {\n\t\t\treturn 0 <= props.attributes.multiple_meta.replace(/\\s/g, '').split(',').indexOf(value) || '' === props.attributes.multiple_meta;\n\t\t};\n\t\tif (props.attributes.categories === undefined) {\n\t\t\tif (!props.attributes.meta) {\n\t\t\t\tprops.setAttributes({\n\t\t\t\t\tmeta: true,\n\t\t\t\t\tmetafields: 'no'\n\t\t\t\t});\n\t\t\t}\n\t\t\tloadCategories();\n\t\t}\n\t\treturn [\n\t\t// Inspector\n\t\t!!props.isSelected && wp.element.createElement(__WEBPACK_IMPORTED_MODULE_4__inspector__[\"a\" /* default */], __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({ onChangeFeeds: onChangeFeeds, onChangeMax: onChangeMax, onChangeOffset: onChangeOffset, toggleFeedTitle: toggleFeedTitle, onRefresh: onRefresh, onSort: onSort, onTarget: onTarget, onTitle: onTitle, changeMeta: changeMeta, changeMultipleMeta: changeMultipleMeta, toggleSummary: toggleSummary, toggleLazy: toggleLazy, onSummaryLength: onSummaryLength, onKeywordsTitle: onKeywordsTitle, onKeywordsBan: onKeywordsBan, onThumb: onThumb, onDefault: onDefault, onSize: onSize, onReferralURL: onReferralURL, onColumns: onColumns, onTemplate: onTemplate, togglePrice: togglePrice, loadFeed: loadFeed }, props)), props.attributes.status !== 2 && wp.element.createElement(\n\t\t\t'div',\n\t\t\t{ className: props.className },\n\t\t\twp.element.createElement(\n\t\t\t\tPlaceholder,\n\t\t\t\t{\n\t\t\t\t\tkey: 'placeholder',\n\t\t\t\t\ticon: 'rss',\n\t\t\t\t\tlabel: __('Feedzy RSS Feeds')\n\t\t\t\t},\n\t\t\t\tprops.attributes.status === 1 ? wp.element.createElement(\n\t\t\t\t\t'div',\n\t\t\t\t\t{ key: 'loading', className: 'wp-block-embed is-loading' },\n\t\t\t\t\twp.element.createElement(Spinner, null),\n\t\t\t\t\twp.element.createElement(\n\t\t\t\t\t\t'p',\n\t\t\t\t\t\tnull,\n\t\t\t\t\t\t__('Fetching…')\n\t\t\t\t\t)\n\t\t\t\t) : [wp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'url',\n\t\t\t\t\tclassName: 'feedzy-source',\n\t\t\t\t\tplaceholder: __('Enter URL or category of your feed here…'),\n\t\t\t\t\tonChange: onChangeFeeds,\n\t\t\t\t\tvalue: props.attributes.feeds\n\t\t\t\t}), wp.element.createElement(\n\t\t\t\t\tButton,\n\t\t\t\t\t{\n\t\t\t\t\t\tisLarge: true,\n\t\t\t\t\t\ttype: 'submit',\n\t\t\t\t\t\tonClick: loadFeed\n\t\t\t\t\t},\n\t\t\t\t\t__('Load Feed')\n\t\t\t\t), props.attributes.status === 3 && wp.element.createElement(\n\t\t\t\t\t'span',\n\t\t\t\t\tnull,\n\t\t\t\t\t__('Feed URL Invalid')\n\t\t\t\t), wp.element.createElement(\n\t\t\t\t\t'span',\n\t\t\t\t\tnull,\n\t\t\t\t\twp.element.createElement(\n\t\t\t\t\t\tExternalLink,\n\t\t\t\t\t\t{ href: 'https://validator.w3.org/feed/' },\n\t\t\t\t\t\t__('Click here to check if feed is valid. ')\n\t\t\t\t\t),\n\t\t\t\t\t__('Invalid feeds will NOT display items.')\n\t\t\t\t)]\n\t\t\t)\n\t\t), !!(props.attributes.status === 2 && props.attributes.feedData !== undefined) && wp.element.createElement(\n\t\t\t'div',\n\t\t\t{ className: 'feedzy-rss' },\n\t\t\tprops.attributes.feed_title && props.attributes.feedData['channel'] !== null && wp.element.createElement(\n\t\t\t\t'div',\n\t\t\t\t{ className: 'rss_header' },\n\t\t\t\twp.element.createElement(\n\t\t\t\t\t'h2',\n\t\t\t\t\tnull,\n\t\t\t\t\twp.element.createElement(\n\t\t\t\t\t\t'a',\n\t\t\t\t\t\t{ className: 'rss_title' },\n\t\t\t\t\t\tObject(__WEBPACK_IMPORTED_MODULE_5__utils__[\"d\" /* unescapeHTML */])(props.attributes.feedData['channel']['title'])\n\t\t\t\t\t),\n\t\t\t\t\twp.element.createElement(\n\t\t\t\t\t\t'span',\n\t\t\t\t\t\t{ className: 'rss_description' },\n\t\t\t\t\t\t' ' + Object(__WEBPACK_IMPORTED_MODULE_5__utils__[\"d\" /* unescapeHTML */])(props.attributes.feedData['channel']['description'])\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t),\n\t\t\twp.element.createElement(\n\t\t\t\t'ul',\n\t\t\t\t{ className: 'feedzy-' + props.attributes.template },\n\t\t\t\tObject(__WEBPACK_IMPORTED_MODULE_5__utils__[\"b\" /* filterData */])(props.attributes.feedData['items'], props.attributes.sort, props.attributes.keywords_title, props.attributes.keywords_ban, props.attributes.max, props.attributes.offset).map(function (item, i) {\n\t\t\t\t\tvar itemDateTime = (item['date'] || '') + ' ' + (item['time'] || '') + ' UTC +0000';\n\t\t\t\t\tvar itemDate = Object(__WEBPACK_IMPORTED_MODULE_5__utils__[\"d\" /* unescapeHTML */])(item['date']) || '';\n\t\t\t\t\tvar itemTime = Object(__WEBPACK_IMPORTED_MODULE_5__utils__[\"d\" /* unescapeHTML */])(item['time']) || '';\n\t\t\t\t\tvar categories = Object(__WEBPACK_IMPORTED_MODULE_5__utils__[\"d\" /* unescapeHTML */])(item['categories']) || '';\n\t\t\t\t\tif (metaExists('tz=local')) {\n\t\t\t\t\t\titemDate = date('F jS, \\o', itemDateTime);\n\t\t\t\t\t\titemTime = date('h:i A', itemDateTime);\n\t\t\t\t\t}\n\n\t\t\t\t\tvar author = item['creator'] && metaExists('author') ? item['creator'] : '';\n\t\t\t\t\tif (props.attributes.multiple_meta !== '' && props.attributes.multiple_meta !== 'no') {\n\t\t\t\t\t\tif ((multipleMetaExists('source') || multipleMetaExists('yes')) && author !== '' && item['source'] !== '') {\n\t\t\t\t\t\t\tauthor = author + ' (' + item['source'] + ')';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tvar meta_values = new Object();\n\t\t\t\t\tmeta_values['author'] = __('by') + ' ' + author;\n\t\t\t\t\tmeta_values['date'] = __('on') + ' ' + Object(__WEBPACK_IMPORTED_MODULE_5__utils__[\"d\" /* unescapeHTML */])(itemDate);\n\t\t\t\t\tmeta_values['time'] = __('at') + ' ' + Object(__WEBPACK_IMPORTED_MODULE_5__utils__[\"d\" /* unescapeHTML */])(itemTime);\n\t\t\t\t\tmeta_values['categories'] = __('in') + ' ' + Object(__WEBPACK_IMPORTED_MODULE_5__utils__[\"d\" /* unescapeHTML */])(categories);\n\n\t\t\t\t\treturn wp.element.createElement(\n\t\t\t\t\t\t'li',\n\t\t\t\t\t\t{ key: i, style: { padding: '15px 0 25px' }, className: 'rss_item feedzy-rss-col-' + props.attributes.columns },\n\t\t\t\t\t\t(item['thumbnail'] && props.attributes.thumb === 'auto' || props.attributes.thumb === 'yes') && wp.element.createElement(\n\t\t\t\t\t\t\t'div',\n\t\t\t\t\t\t\t{ className: 'rss_image', style: { width: props.attributes.size + 'px', height: props.attributes.size + 'px' } },\n\t\t\t\t\t\t\twp.element.createElement(\n\t\t\t\t\t\t\t\t'a',\n\t\t\t\t\t\t\t\t{ title: Object(__WEBPACK_IMPORTED_MODULE_5__utils__[\"d\" /* unescapeHTML */])(item['title']), style: { width: props.attributes.size + 'px', height: props.attributes.size + 'px' } },\n\t\t\t\t\t\t\t\twp.element.createElement('span', { className: 'fetched', style: { width: props.attributes.size + 'px', height: props.attributes.size + 'px', backgroundImage: 'url(' + (item['thumbnail'] ? item['thumbnail'] : props.attributes.default ? props.attributes.default.url : feedzyjs.imagepath + 'feedzy-default.jpg') + ')' }, title: Object(__WEBPACK_IMPORTED_MODULE_5__utils__[\"d\" /* unescapeHTML */])(item['title']) })\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t),\n\t\t\t\t\t\twp.element.createElement(\n\t\t\t\t\t\t\t'div',\n\t\t\t\t\t\t\t{ className: 'rss_content_wrap' },\n\t\t\t\t\t\t\twp.element.createElement(\n\t\t\t\t\t\t\t\t'span',\n\t\t\t\t\t\t\t\t{ className: 'title' },\n\t\t\t\t\t\t\t\twp.element.createElement(\n\t\t\t\t\t\t\t\t\t'a',\n\t\t\t\t\t\t\t\t\tnull,\n\t\t\t\t\t\t\t\t\tprops.attributes.title && Object(__WEBPACK_IMPORTED_MODULE_5__utils__[\"d\" /* unescapeHTML */])(item['title']).length > props.attributes.title ? Object(__WEBPACK_IMPORTED_MODULE_5__utils__[\"d\" /* unescapeHTML */])(item['title']).substring(0, props.attributes.title) + '...' : Object(__WEBPACK_IMPORTED_MODULE_5__utils__[\"d\" /* unescapeHTML */])(item['title'])\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\twp.element.createElement(\n\t\t\t\t\t\t\t\t'div',\n\t\t\t\t\t\t\t\t{ className: 'rss_content' },\n\t\t\t\t\t\t\t\tprops.attributes.metafields !== 'no' && wp.element.createElement(\n\t\t\t\t\t\t\t\t\t'small',\n\t\t\t\t\t\t\t\t\t{ className: 'meta' },\n\t\t\t\t\t\t\t\t\tObject(__WEBPACK_IMPORTED_MODULE_5__utils__[\"a\" /* arrangeMeta */])(meta_values, props.attributes.metafields)\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tprops.attributes.summary && wp.element.createElement(\n\t\t\t\t\t\t\t\t\t'p',\n\t\t\t\t\t\t\t\t\t{ className: 'description' },\n\t\t\t\t\t\t\t\t\tprops.attributes.summarylength && Object(__WEBPACK_IMPORTED_MODULE_5__utils__[\"d\" /* unescapeHTML */])(item['description']).length > props.attributes.summarylength ? Object(__WEBPACK_IMPORTED_MODULE_5__utils__[\"d\" /* unescapeHTML */])(item['description']).substring(0, props.attributes.summarylength) + ' […]' : Object(__WEBPACK_IMPORTED_MODULE_5__utils__[\"d\" /* unescapeHTML */])(item['description'])\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tfeedzyjs.isPro && item['media'] && item['media']['src'] && wp.element.createElement(\n\t\t\t\t\t\t\t\t\t'audio',\n\t\t\t\t\t\t\t\t\t{ controls: true, controlsList: 'nodownload' },\n\t\t\t\t\t\t\t\t\twp.element.createElement('source', { src: item['media']['src'], type: item['media']['type'] }),\n\t\t\t\t\t\t\t\t\t__('Your browser does not support the audio element. But you can check this for the original link: '),\n\t\t\t\t\t\t\t\t\twp.element.createElement(\n\t\t\t\t\t\t\t\t\t\t'a',\n\t\t\t\t\t\t\t\t\t\t{ href: item['media']['src'] },\n\t\t\t\t\t\t\t\t\t\titem['media']['src']\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tfeedzyjs.isPro && props.attributes.price && item['price'] && props.attributes.template !== 'default' && wp.element.createElement(\n\t\t\t\t\t\t\t\t\t'div',\n\t\t\t\t\t\t\t\t\t{ className: 'price-wrap' },\n\t\t\t\t\t\t\t\t\twp.element.createElement(\n\t\t\t\t\t\t\t\t\t\t'a',\n\t\t\t\t\t\t\t\t\t\tnull,\n\t\t\t\t\t\t\t\t\t\twp.element.createElement(\n\t\t\t\t\t\t\t\t\t\t\t'button',\n\t\t\t\t\t\t\t\t\t\t\t{ className: 'price' },\n\t\t\t\t\t\t\t\t\t\t\titem['price']\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t})\n\t\t\t)\n\t\t)];\n\t},\n\tsave: function save() {\n\t\t// Rendering in PHP\n\t\treturn null;\n\t}\n}));//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjkuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9pbmNsdWRlcy9ndXRlbmJlcmcvc3JjL2Jsb2NrLmpzPzUxZTMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IF9leHRlbmRzIGZyb20gJ2JhYmVsLXJ1bnRpbWUvaGVscGVycy9leHRlbmRzJztcblxudmFyIF90aGlzID0gdGhpcztcblxuLy8ganNoaW50IGlnbm9yZTogc3RhcnRcblxuLyoqXHJcbiAqIEJsb2NrIGRlcGVuZGVuY2llc1xyXG4gKi9cbmltcG9ydCAnLi9zdHlsZS5zY3NzJztcbmltcG9ydCBxdWVyeVN0cmluZyBmcm9tICdxdWVyeS1zdHJpbmcnO1xuaW1wb3J0IGJsb2NrQXR0cmlidXRlcyBmcm9tICcuL2F0dHJpYnV0ZXMnO1xuaW1wb3J0IEluc3BlY3RvciBmcm9tICcuL2luc3BlY3Rvcic7XG5pbXBvcnQgeyB1bmVzY2FwZUhUTUwsIGZpbHRlckRhdGEsIGluQXJyYXksIGFycmFuZ2VNZXRhIH0gZnJvbSAnLi91dGlscyc7XG5cbi8qKlxyXG4gKiBJbnRlcm5hbCBibG9jayBsaWJyYXJpZXNcclxuICovXG52YXIgX18gPSB3cC5pMThuLl9fO1xudmFyIHJlZ2lzdGVyQmxvY2tUeXBlID0gd3AuYmxvY2tzLnJlZ2lzdGVyQmxvY2tUeXBlO1xudmFyIF93cCRjb21wb25lbnRzID0gd3AuY29tcG9uZW50cyxcbiAgICBFeHRlcm5hbExpbmsgPSBfd3AkY29tcG9uZW50cy5FeHRlcm5hbExpbmssXG4gICAgUGxhY2Vob2xkZXIgPSBfd3AkY29tcG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BO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///29\n");
|
246 |
|
247 |
/***/ }),
|
248 |
/* 30 */
|
242 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
243 |
|
244 |
"use strict";
|
245 |
+
eval("Object.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(30);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__style_scss__ = __webpack_require__(43);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__style_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__style_scss__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_query_string__ = __webpack_require__(44);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_query_string___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_query_string__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__attributes__ = __webpack_require__(48);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__inspector__ = __webpack_require__(49);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils__ = __webpack_require__(52);\n\n\nvar _this = this;\n\n// jshint ignore: start\n\n/**\r\n * Block dependencies\r\n */\n\n\n\n\n\n\n/**\r\n * Internal block libraries\r\n */\nvar __ = wp.i18n.__;\nvar registerBlockType = wp.blocks.registerBlockType;\nvar _wp$components = wp.components,\n ExternalLink = _wp$components.ExternalLink,\n Placeholder = _wp$components.Placeholder,\n TextControl = _wp$components.TextControl,\n Button = _wp$components.Button,\n Spinner = _wp$components.Spinner;\nvar date = wp.date.date;\n\n/**\r\n * Register block\r\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (registerBlockType('feedzy-rss-feeds/feedzy-block', {\n\ttitle: __('Feedzy RSS Feeds'),\n\tcategory: 'common',\n\ticon: 'rss',\n\tkeywords: [__('Feedzy RSS Feeds'), __('RSS'), __('Feeds')],\n\tsupports: {\n\t\thtml: false\n\t},\n\tattributes: __WEBPACK_IMPORTED_MODULE_3__attributes__[\"a\" /* default */],\n\tedit: function edit(props) {\n\t\tvar onChangeFeeds = function onChangeFeeds(value) {\n\t\t\tprops.setAttributes({ feeds: value });\n\t\t};\n\t\tvar onChangeMax = function onChangeMax(value) {\n\t\t\tprops.setAttributes({ max: !value ? 5 : Number(value) });\n\t\t};\n\t\tvar onChangeOffset = function onChangeOffset(value) {\n\t\t\tprops.setAttributes({ offset: Number(value) });\n\t\t};\n\t\tvar toggleFeedTitle = function toggleFeedTitle(value) {\n\t\t\tprops.setAttributes({ feed_title: !props.attributes.feed_title });\n\t\t};\n\t\tvar onRefresh = function onRefresh(value) {\n\t\t\tprops.setAttributes({ refresh: value });\n\t\t};\n\t\tvar onSort = function onSort(value) {\n\t\t\tprops.setAttributes({ sort: value });\n\t\t};\n\t\tvar onTarget = function onTarget(value) {\n\t\t\tprops.setAttributes({ target: value });\n\t\t};\n\t\tvar onTitle = function onTitle(value) {\n\t\t\tprops.setAttributes({ title: Number(value) });\n\t\t};\n\t\tvar changeMeta = function changeMeta(value) {\n\t\t\tprops.setAttributes({ metafields: value });\n\t\t};\n\t\tvar changeMultipleMeta = function changeMultipleMeta(value) {\n\t\t\tprops.setAttributes({ multiple_meta: value });\n\t\t};\n\t\tvar toggleSummary = function toggleSummary(value) {\n\t\t\tprops.setAttributes({ summary: !props.attributes.summary });\n\t\t};\n\t\tvar toggleLazy = function toggleLazy(value) {\n\t\t\tprops.setAttributes({ lazy: !props.attributes.lazy });\n\t\t};\n\t\tvar onSummaryLength = function onSummaryLength(value) {\n\t\t\tprops.setAttributes({ summarylength: Number(value) });\n\t\t};\n\t\tvar onKeywordsTitle = function onKeywordsTitle(value) {\n\t\t\tprops.setAttributes({ keywords_title: value });\n\t\t};\n\t\tvar onKeywordsBan = function onKeywordsBan(value) {\n\t\t\tprops.setAttributes({ keywords_ban: value });\n\t\t};\n\t\tvar onThumb = function onThumb(value) {\n\t\t\tprops.setAttributes({ thumb: value });\n\t\t};\n\t\tvar onDefault = function onDefault(value) {\n\t\t\tprops.setAttributes({ default: value });\n\t\t};\n\t\tvar onSize = function onSize(value) {\n\t\t\tprops.setAttributes({ size: !value ? 150 : Number(value) });\n\t\t};\n\t\tvar onReferralURL = function onReferralURL(value) {\n\t\t\tprops.setAttributes({ referral_url: value });\n\t\t};\n\t\tvar onColumns = function onColumns(value) {\n\t\t\tprops.setAttributes({ columns: value });\n\t\t};\n\t\tvar onTemplate = function onTemplate(value) {\n\t\t\tprops.setAttributes({ template: value });\n\t\t};\n\t\tvar togglePrice = function togglePrice(value) {\n\t\t\tprops.setAttributes({ price: !props.attributes.price });\n\t\t};\n\t\tvar loadFeed = function loadFeed() {\n\t\t\tprops.setAttributes({ status: 1 });\n\n\t\t\tvar url = props.attributes.feeds;\n\n\t\t\tif (url === undefined) {\n\t\t\t\treturn props.setAttributes({ status: 3 });\n\t\t\t}\n\n\t\t\tif (Object(__WEBPACK_IMPORTED_MODULE_5__utils__[\"c\" /* inArray */])(url, props.attributes.categories)) {\n\t\t\t\tvar category = url;\n\t\t\t\turl = __WEBPACK_IMPORTED_MODULE_2_query_string___default.a.stringify({ category: category }, { arrayFormat: 'bracket' });\n\t\t\t} else {\n\t\t\t\turl = url.replace(/\\s/g, '').split(',').filter(function (item) {\n\t\t\t\t\treturn item !== '';\n\t\t\t\t});\n\t\t\t\turl = __WEBPACK_IMPORTED_MODULE_2_query_string___default.a.stringify({ url: url }, { arrayFormat: 'bracket' });\n\t\t\t}\n\n\t\t\twp.apiRequest({ path: '/feedzy/v1/feed?' + url }).then(function (data) {\n\t\t\t\tif (_this.unmounting) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\t\t\t\tif (!data['error']) {\n\t\t\t\t\tprops.setAttributes({ feedData: data });\n\t\t\t\t\tprops.setAttributes({ status: 2 });\n\t\t\t\t\treturn data;\n\t\t\t\t} else {\n\t\t\t\t\tprops.setAttributes({ status: 3 });\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\t\t\t}).fail(function (err) {\n\t\t\t\tprops.setAttributes({ status: 3 });\n\t\t\t\treturn err;\n\t\t\t});\n\t\t};\n\t\tvar loadCategories = function loadCategories() {\n\t\t\twp.apiRequest({ path: '/wp/v2/feedzy_categories' }).then(function (data) {\n\t\t\t\tif (_this.unmounting) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\t\t\t\tvar i = 0;\n\t\t\t\tvar categories = [];\n\t\t\t\tdata.forEach(function (item) {\n\t\t\t\t\tcategories[i] = item.slug;\n\t\t\t\t\ti = i + 1;\n\t\t\t\t});\n\t\t\t\tprops.setAttributes({ categories: categories });\n\t\t\t\tjQuery('.feedzy-source input').autocomplete({\n\t\t\t\t\tsource: categories,\n\t\t\t\t\tselect: function select(event, ui) {\n\t\t\t\t\t\tprops.setAttributes({ feeds: ui.item.label });\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}).fail(function (err) {\n\t\t\t\treturn err;\n\t\t\t});\n\t\t};\n\t\tvar metaExists = function metaExists(value) {\n\t\t\treturn 0 <= props.attributes.metafields.replace(/\\s/g, '').split(',').indexOf(value) || '' === props.attributes.metafields;\n\t\t};\n\t\tvar multipleMetaExists = function multipleMetaExists(value) {\n\t\t\treturn 0 <= props.attributes.multiple_meta.replace(/\\s/g, '').split(',').indexOf(value) || '' === props.attributes.multiple_meta;\n\t\t};\n\n\t\tvar validateURL = 'https://validator.w3.org/feed/';\n\t\tif (props.attributes.feeds) {\n\t\t\tvalidateURL += 'check.cgi?url=' + props.attributes.feeds;\n\t\t}\n\n\t\tif (props.attributes.categories === undefined) {\n\t\t\tif (!props.attributes.meta) {\n\t\t\t\tprops.setAttributes({\n\t\t\t\t\tmeta: true,\n\t\t\t\t\tmetafields: 'no'\n\t\t\t\t});\n\t\t\t}\n\t\t\tloadCategories();\n\t\t}\n\t\treturn [\n\t\t// Inspector\n\t\t!!props.isSelected && wp.element.createElement(__WEBPACK_IMPORTED_MODULE_4__inspector__[\"a\" /* default */], __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({ onChangeFeeds: onChangeFeeds, onChangeMax: onChangeMax, onChangeOffset: onChangeOffset, toggleFeedTitle: toggleFeedTitle, onRefresh: onRefresh, onSort: onSort, onTarget: onTarget, onTitle: onTitle, changeMeta: changeMeta, changeMultipleMeta: changeMultipleMeta, toggleSummary: toggleSummary, toggleLazy: toggleLazy, onSummaryLength: onSummaryLength, onKeywordsTitle: onKeywordsTitle, onKeywordsBan: onKeywordsBan, onThumb: onThumb, onDefault: onDefault, onSize: onSize, onReferralURL: onReferralURL, onColumns: onColumns, onTemplate: onTemplate, togglePrice: togglePrice, loadFeed: loadFeed }, props)), props.attributes.status !== 2 && wp.element.createElement(\n\t\t\t'div',\n\t\t\t{ className: props.className },\n\t\t\twp.element.createElement(\n\t\t\t\tPlaceholder,\n\t\t\t\t{\n\t\t\t\t\tkey: 'placeholder',\n\t\t\t\t\ticon: 'rss',\n\t\t\t\t\tlabel: __('Feedzy RSS Feeds')\n\t\t\t\t},\n\t\t\t\tprops.attributes.status === 1 ? wp.element.createElement(\n\t\t\t\t\t'div',\n\t\t\t\t\t{ key: 'loading', className: 'wp-block-embed is-loading' },\n\t\t\t\t\twp.element.createElement(Spinner, null),\n\t\t\t\t\twp.element.createElement(\n\t\t\t\t\t\t'p',\n\t\t\t\t\t\tnull,\n\t\t\t\t\t\t__('Fetching…')\n\t\t\t\t\t)\n\t\t\t\t) : [wp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'url',\n\t\t\t\t\tclassName: 'feedzy-source',\n\t\t\t\t\tplaceholder: __('Enter URL or category of your feed here…'),\n\t\t\t\t\tonChange: onChangeFeeds,\n\t\t\t\t\tvalue: props.attributes.feeds\n\t\t\t\t}), wp.element.createElement(\n\t\t\t\t\tButton,\n\t\t\t\t\t{\n\t\t\t\t\t\tisLarge: true,\n\t\t\t\t\t\tisPrimary: true,\n\t\t\t\t\t\ttype: 'submit',\n\t\t\t\t\t\tonClick: loadFeed\n\t\t\t\t\t},\n\t\t\t\t\t__('Load Feed')\n\t\t\t\t), wp.element.createElement(\n\t\t\t\t\tExternalLink,\n\t\t\t\t\t{ href: validateURL, title: __('Validate Feed ') },\n\t\t\t\t\t__('Validate ')\n\t\t\t\t), props.attributes.status === 3 && wp.element.createElement(\n\t\t\t\t\t'div',\n\t\t\t\t\tnull,\n\t\t\t\t\t__('Feed URL is invalid. Invalid feeds will NOT display items.')\n\t\t\t\t)]\n\t\t\t)\n\t\t), !!(props.attributes.status === 2 && props.attributes.feedData !== undefined) && wp.element.createElement(\n\t\t\t'div',\n\t\t\t{ className: 'feedzy-rss' },\n\t\t\tprops.attributes.feed_title && props.attributes.feedData['channel'] !== null && wp.element.createElement(\n\t\t\t\t'div',\n\t\t\t\t{ className: 'rss_header' },\n\t\t\t\twp.element.createElement(\n\t\t\t\t\t'h2',\n\t\t\t\t\tnull,\n\t\t\t\t\twp.element.createElement(\n\t\t\t\t\t\t'a',\n\t\t\t\t\t\t{ className: 'rss_title' },\n\t\t\t\t\t\tObject(__WEBPACK_IMPORTED_MODULE_5__utils__[\"d\" /* unescapeHTML */])(props.attributes.feedData['channel']['title'])\n\t\t\t\t\t),\n\t\t\t\t\twp.element.createElement(\n\t\t\t\t\t\t'span',\n\t\t\t\t\t\t{ className: 'rss_description' },\n\t\t\t\t\t\t' ' + Object(__WEBPACK_IMPORTED_MODULE_5__utils__[\"d\" /* unescapeHTML */])(props.attributes.feedData['channel']['description'])\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t),\n\t\t\twp.element.createElement(\n\t\t\t\t'ul',\n\t\t\t\t{ className: 'feedzy-' + props.attributes.template },\n\t\t\t\tObject(__WEBPACK_IMPORTED_MODULE_5__utils__[\"b\" /* filterData */])(props.attributes.feedData['items'], props.attributes.sort, props.attributes.keywords_title, props.attributes.keywords_ban, props.attributes.max, props.attributes.offset).map(function (item, i) {\n\t\t\t\t\tvar itemDateTime = (item['date'] || '') + ' ' + (item['time'] || '') + ' UTC +0000';\n\t\t\t\t\tvar itemDate = Object(__WEBPACK_IMPORTED_MODULE_5__utils__[\"d\" /* unescapeHTML */])(item['date']) || '';\n\t\t\t\t\tvar itemTime = Object(__WEBPACK_IMPORTED_MODULE_5__utils__[\"d\" /* unescapeHTML */])(item['time']) || '';\n\t\t\t\t\tvar categories = Object(__WEBPACK_IMPORTED_MODULE_5__utils__[\"d\" /* unescapeHTML */])(item['categories']) || '';\n\t\t\t\t\tif (metaExists('tz=local')) {\n\t\t\t\t\t\titemDate = date('F jS, \\o', itemDateTime);\n\t\t\t\t\t\titemTime = date('h:i A', itemDateTime);\n\t\t\t\t\t}\n\n\t\t\t\t\tvar author = item['creator'] && metaExists('author') ? item['creator'] : '';\n\t\t\t\t\tif (props.attributes.multiple_meta !== '' && props.attributes.multiple_meta !== 'no') {\n\t\t\t\t\t\tif ((multipleMetaExists('source') || multipleMetaExists('yes')) && author !== '' && item['source'] !== '') {\n\t\t\t\t\t\t\tauthor = author + ' (' + item['source'] + ')';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tvar meta_values = new Object();\n\t\t\t\t\tmeta_values['author'] = __('by') + ' ' + author;\n\t\t\t\t\tmeta_values['date'] = __('on') + ' ' + Object(__WEBPACK_IMPORTED_MODULE_5__utils__[\"d\" /* unescapeHTML */])(itemDate);\n\t\t\t\t\tmeta_values['time'] = __('at') + ' ' + Object(__WEBPACK_IMPORTED_MODULE_5__utils__[\"d\" /* unescapeHTML */])(itemTime);\n\t\t\t\t\tmeta_values['categories'] = __('in') + ' ' + Object(__WEBPACK_IMPORTED_MODULE_5__utils__[\"d\" /* unescapeHTML */])(categories);\n\n\t\t\t\t\treturn wp.element.createElement(\n\t\t\t\t\t\t'li',\n\t\t\t\t\t\t{ key: i, style: { padding: '15px 0 25px' }, className: 'rss_item feedzy-rss-col-' + props.attributes.columns },\n\t\t\t\t\t\t(item['thumbnail'] && props.attributes.thumb === 'auto' || props.attributes.thumb === 'yes') && wp.element.createElement(\n\t\t\t\t\t\t\t'div',\n\t\t\t\t\t\t\t{ className: 'rss_image', style: { width: props.attributes.size + 'px', height: props.attributes.size + 'px' } },\n\t\t\t\t\t\t\twp.element.createElement(\n\t\t\t\t\t\t\t\t'a',\n\t\t\t\t\t\t\t\t{ title: Object(__WEBPACK_IMPORTED_MODULE_5__utils__[\"d\" /* unescapeHTML */])(item['title']), style: { width: props.attributes.size + 'px', height: props.attributes.size + 'px' } },\n\t\t\t\t\t\t\t\twp.element.createElement('span', { className: 'fetched', style: { width: props.attributes.size + 'px', height: props.attributes.size + 'px', backgroundImage: 'url(' + (item['thumbnail'] ? item['thumbnail'] : props.attributes.default ? props.attributes.default.url : feedzyjs.imagepath + 'feedzy-default.jpg') + ')' }, title: Object(__WEBPACK_IMPORTED_MODULE_5__utils__[\"d\" /* unescapeHTML */])(item['title']) })\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t),\n\t\t\t\t\t\twp.element.createElement(\n\t\t\t\t\t\t\t'div',\n\t\t\t\t\t\t\t{ className: 'rss_content_wrap' },\n\t\t\t\t\t\t\twp.element.createElement(\n\t\t\t\t\t\t\t\t'span',\n\t\t\t\t\t\t\t\t{ className: 'title' },\n\t\t\t\t\t\t\t\twp.element.createElement(\n\t\t\t\t\t\t\t\t\t'a',\n\t\t\t\t\t\t\t\t\tnull,\n\t\t\t\t\t\t\t\t\tprops.attributes.title && Object(__WEBPACK_IMPORTED_MODULE_5__utils__[\"d\" /* unescapeHTML */])(item['title']).length > props.attributes.title ? Object(__WEBPACK_IMPORTED_MODULE_5__utils__[\"d\" /* unescapeHTML */])(item['title']).substring(0, props.attributes.title) + '...' : Object(__WEBPACK_IMPORTED_MODULE_5__utils__[\"d\" /* unescapeHTML */])(item['title'])\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\twp.element.createElement(\n\t\t\t\t\t\t\t\t'div',\n\t\t\t\t\t\t\t\t{ className: 'rss_content' },\n\t\t\t\t\t\t\t\tprops.attributes.metafields !== 'no' && wp.element.createElement(\n\t\t\t\t\t\t\t\t\t'small',\n\t\t\t\t\t\t\t\t\t{ className: 'meta' },\n\t\t\t\t\t\t\t\t\tObject(__WEBPACK_IMPORTED_MODULE_5__utils__[\"a\" /* arrangeMeta */])(meta_values, props.attributes.metafields)\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tprops.attributes.summary && wp.element.createElement(\n\t\t\t\t\t\t\t\t\t'p',\n\t\t\t\t\t\t\t\t\t{ className: 'description' },\n\t\t\t\t\t\t\t\t\tprops.attributes.summarylength && Object(__WEBPACK_IMPORTED_MODULE_5__utils__[\"d\" /* unescapeHTML */])(item['description']).length > props.attributes.summarylength ? Object(__WEBPACK_IMPORTED_MODULE_5__utils__[\"d\" /* unescapeHTML */])(item['description']).substring(0, props.attributes.summarylength) + ' […]' : Object(__WEBPACK_IMPORTED_MODULE_5__utils__[\"d\" /* unescapeHTML */])(item['description'])\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tfeedzyjs.isPro && item['media'] && item['media']['src'] && wp.element.createElement(\n\t\t\t\t\t\t\t\t\t'audio',\n\t\t\t\t\t\t\t\t\t{ controls: true, controlsList: 'nodownload' },\n\t\t\t\t\t\t\t\t\twp.element.createElement('source', { src: item['media']['src'], type: item['media']['type'] }),\n\t\t\t\t\t\t\t\t\t__('Your browser does not support the audio element. But you can check this for the original link: '),\n\t\t\t\t\t\t\t\t\twp.element.createElement(\n\t\t\t\t\t\t\t\t\t\t'a',\n\t\t\t\t\t\t\t\t\t\t{ href: item['media']['src'] },\n\t\t\t\t\t\t\t\t\t\titem['media']['src']\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tfeedzyjs.isPro && props.attributes.price && item['price'] && props.attributes.template !== 'default' && wp.element.createElement(\n\t\t\t\t\t\t\t\t\t'div',\n\t\t\t\t\t\t\t\t\t{ className: 'price-wrap' },\n\t\t\t\t\t\t\t\t\twp.element.createElement(\n\t\t\t\t\t\t\t\t\t\t'a',\n\t\t\t\t\t\t\t\t\t\tnull,\n\t\t\t\t\t\t\t\t\t\twp.element.createElement(\n\t\t\t\t\t\t\t\t\t\t\t'button',\n\t\t\t\t\t\t\t\t\t\t\t{ className: 'price' },\n\t\t\t\t\t\t\t\t\t\t\titem['price']\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t})\n\t\t\t)\n\t\t)];\n\t},\n\tsave: function save() {\n\t\t// Rendering in PHP\n\t\treturn null;\n\t}\n}));//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjkuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9pbmNsdWRlcy9ndXRlbmJlcmcvc3JjL2Jsb2NrLmpzPzUxZTMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IF9leHRlbmRzIGZyb20gJ2JhYmVsLXJ1bnRpbWUvaGVscGVycy9leHRlbmRzJztcblxudmFyIF90aGlzID0gdGhpcztcblxuLy8ganNoaW50IGlnbm9yZTogc3RhcnRcblxuLyoqXHJcbiAqIE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-233,6 +233,8 @@ class Feedzy_Rss_Feeds_Gutenberg_Block {
|
|
233 |
$feed = $data['category'];
|
234 |
}
|
235 |
|
|
|
|
|
236 |
$meta_args = array(
|
237 |
'date_format' => get_option( 'date_format' ),
|
238 |
'time_format' => get_option( 'time_format' ),
|
@@ -241,7 +243,6 @@ class Feedzy_Rss_Feeds_Gutenberg_Block {
|
|
241 |
$instance = Feedzy_Rss_Feeds::instance();
|
242 |
$admin = $instance->get_admin();
|
243 |
$feed = $admin->fetch_feed( $feed, '12_hours', array( '' ) );
|
244 |
-
|
245 |
$feedy = array();
|
246 |
|
247 |
if ( ! $feed->init() ) {
|
@@ -260,19 +261,11 @@ class Feedzy_Rss_Feeds_Gutenberg_Block {
|
|
260 |
);
|
261 |
}
|
262 |
|
263 |
-
if ( feedzy_is_pro() ) {
|
264 |
-
$pro = new Feedzy_Rss_Feeds_Pro_Admin( $instance->get_plugin_name(), $instance->get_version() );
|
265 |
-
}
|
266 |
-
|
267 |
$feedy['items'] = array();
|
268 |
$items = $feed->get_items();
|
269 |
$is_multiple = ! empty( $feed->multifeed_url ) && is_array( $feed->multifeed_url );
|
270 |
foreach ( $items as $item ) {
|
271 |
-
|
272 |
-
$item_attrs = $pro->feedzy_pro_add_data_to_item( array(), $item );
|
273 |
-
}
|
274 |
-
|
275 |
-
$description = isset( $item_attrs['item_description'] ) ? $item_attrs['item_description'] : ( $item->get_description() ? $item->get_description() : null );
|
276 |
|
277 |
array_push(
|
278 |
$feedy['items'], array(
|
@@ -283,15 +276,20 @@ class Feedzy_Rss_Feeds_Gutenberg_Block {
|
|
283 |
'pubDate' => ( ( $item->get_date() ) ? $item->get_date( 'U' ) : null ),
|
284 |
'date' => ( ( $item->get_date() ) ? date_i18n( $meta_args['date_format'], $item->get_date( 'U' ) ) : null ),
|
285 |
'time' => ( ( $item->get_date() ) ? date_i18n( $meta_args['time_format'], $item->get_date( 'U' ) ) : null ),
|
286 |
-
'description' => $
|
287 |
'thumbnail' => $admin->feedzy_retrieve_image( $item ),
|
288 |
-
'price' => (
|
289 |
-
'media' => (
|
290 |
-
'categories' => (
|
291 |
)
|
292 |
);
|
293 |
}
|
294 |
|
|
|
|
|
|
|
|
|
|
|
295 |
header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ) );
|
296 |
$output = $feedy;
|
297 |
return $output;
|
233 |
$feed = $data['category'];
|
234 |
}
|
235 |
|
236 |
+
$url = $feed;
|
237 |
+
|
238 |
$meta_args = array(
|
239 |
'date_format' => get_option( 'date_format' ),
|
240 |
'time_format' => get_option( 'time_format' ),
|
243 |
$instance = Feedzy_Rss_Feeds::instance();
|
244 |
$admin = $instance->get_admin();
|
245 |
$feed = $admin->fetch_feed( $feed, '12_hours', array( '' ) );
|
|
|
246 |
$feedy = array();
|
247 |
|
248 |
if ( ! $feed->init() ) {
|
261 |
);
|
262 |
}
|
263 |
|
|
|
|
|
|
|
|
|
264 |
$feedy['items'] = array();
|
265 |
$items = $feed->get_items();
|
266 |
$is_multiple = ! empty( $feed->multifeed_url ) && is_array( $feed->multifeed_url );
|
267 |
foreach ( $items as $item ) {
|
268 |
+
$item_attrs = apply_filters( 'feedzy_item_filter', array(), $item );
|
|
|
|
|
|
|
|
|
269 |
|
270 |
array_push(
|
271 |
$feedy['items'], array(
|
276 |
'pubDate' => ( ( $item->get_date() ) ? $item->get_date( 'U' ) : null ),
|
277 |
'date' => ( ( $item->get_date() ) ? date_i18n( $meta_args['date_format'], $item->get_date( 'U' ) ) : null ),
|
278 |
'time' => ( ( $item->get_date() ) ? date_i18n( $meta_args['time_format'], $item->get_date( 'U' ) ) : null ),
|
279 |
+
'description' => isset( $item_attrs['item_description'] ) ? $item_attrs['item_description'] : ( $item->get_description() ? $item->get_description() : null ),
|
280 |
'thumbnail' => $admin->feedzy_retrieve_image( $item ),
|
281 |
+
'price' => isset( $item_attrs['item_price'] ) ? $item_attrs['item_price'] : null,
|
282 |
+
'media' => isset( $item_attrs['item_media'] ) ? $item_attrs['item_media'] : null,
|
283 |
+
'categories' => isset( $item_attrs['item_categories'] ) ? $item_attrs['item_categories'] : null,
|
284 |
)
|
285 |
);
|
286 |
}
|
287 |
|
288 |
+
// manually delete the transient so that correct cache time can be used.
|
289 |
+
if ( ! defined( 'TI_CYPRESS_TESTING' ) ) {
|
290 |
+
delete_transient( 'feed_' . md5( $url ) );
|
291 |
+
}
|
292 |
+
|
293 |
header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ) );
|
294 |
$output = $feedy;
|
295 |
return $output;
|
includes/layouts/feedzy-improve.php
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
-
|
|
|
2 |
<div class="fz-feature-features">
|
3 |
<h2>Answer a few questions for us to help us improve the product</h2>
|
4 |
<p>We're always looking for suggestions to further improve Feedzy RSS Feeds. If you'd like to help us, please fill out this <a href="<?php echo FEEDZY_SURVEY; ?>" target="_blank">survey</a>.</p>
|
@@ -6,4 +7,7 @@
|
|
6 |
<p>If your feedback is especially helpful and we choose to do an interview with you to discuss your suggestions, you will even gain a yearly membership for free for your trouble.</p>
|
7 |
<?php } ?>
|
8 |
</div>
|
|
|
9 |
</div>
|
|
|
|
1 |
+
<div class="fz-feature">
|
2 |
+
<div class="fz-feature-inner">
|
3 |
<div class="fz-feature-features">
|
4 |
<h2>Answer a few questions for us to help us improve the product</h2>
|
5 |
<p>We're always looking for suggestions to further improve Feedzy RSS Feeds. If you'd like to help us, please fill out this <a href="<?php echo FEEDZY_SURVEY; ?>" target="_blank">survey</a>.</p>
|
7 |
<p>If your feedback is especially helpful and we choose to do an interview with you to discuss your suggestions, you will even gain a yearly membership for free for your trouble.</p>
|
8 |
<?php } ?>
|
9 |
</div>
|
10 |
+
<div class="clear"></div>
|
11 |
</div>
|
12 |
+
</div>
|
13 |
+
<div class="clear"></div>
|
includes/layouts/feedzy-support.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
|
5 |
<?php
|
6 |
$active_tab = isset( $_REQUEST['tab'] ) ? sanitize_text_field( $_REQUEST['tab'] ) : 'help';
|
7 |
-
$show_more = !
|
8 |
?>
|
9 |
|
10 |
<h2 class="nav-tab-wrapper">
|
@@ -25,7 +25,6 @@
|
|
25 |
</h2>
|
26 |
|
27 |
<div class="fz-features-content">
|
28 |
-
<div class="fz-feature">
|
29 |
<div id="feedzy_import_feeds" class="fz-feature-features">
|
30 |
<?php
|
31 |
switch ( $active_tab ) {
|
@@ -48,7 +47,6 @@
|
|
48 |
}
|
49 |
?>
|
50 |
</div>
|
51 |
-
</div>
|
52 |
</div>
|
53 |
|
54 |
</div>
|
4 |
|
5 |
<?php
|
6 |
$active_tab = isset( $_REQUEST['tab'] ) ? sanitize_text_field( $_REQUEST['tab'] ) : 'help';
|
7 |
+
$show_more = ! feedzy_is_pro() || false === apply_filters( 'feedzy_is_license_of_type', false, 'agency' );
|
8 |
?>
|
9 |
|
10 |
<h2 class="nav-tab-wrapper">
|
25 |
</h2>
|
26 |
|
27 |
<div class="fz-features-content">
|
|
|
28 |
<div id="feedzy_import_feeds" class="fz-feature-features">
|
29 |
<?php
|
30 |
switch ( $active_tab ) {
|
47 |
}
|
48 |
?>
|
49 |
</div>
|
|
|
50 |
</div>
|
51 |
|
52 |
</div>
|
includes/layouts/feedzy-tutorial.php
CHANGED
@@ -4,77 +4,125 @@ Layout For Tutorial Page of Feedzy RSS Feeds
|
|
4 |
@since ?
|
5 |
@package feedzy-rss-feeds
|
6 |
-->
|
7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
|
9 |
-
<div class="fz-features-content">
|
10 |
-
|
11 |
<a name="shortcode"></a>
|
12 |
<div class="fz-feature">
|
13 |
-
<div class="fz-feature-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
<
|
|
|
|
|
|
|
20 |
</div>
|
21 |
</div>
|
|
|
22 |
|
23 |
-
<?php if (
|
24 |
<div class="fz-feature">
|
25 |
-
<div class="fz-feature-
|
26 |
-
<
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
<
|
|
|
|
|
|
|
32 |
</div>
|
33 |
</div>
|
|
|
34 |
<?php } ?>
|
35 |
|
36 |
-
<?php if ( class_exists( 'Feedzy_Rss_Feeds_Pro' ) ) { ?>
|
37 |
<a name="import"></a>
|
38 |
<div class="fz-feature">
|
39 |
-
<div class="fz-feature-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
<
|
|
|
|
|
|
|
46 |
</div>
|
47 |
</div>
|
48 |
-
|
49 |
|
50 |
<?php if ( true === apply_filters( 'feedzy_is_license_of_type', false, 'agency' ) ) { ?>
|
|
|
51 |
<div class="fz-feature">
|
52 |
-
<div class="fz-feature-
|
53 |
-
<
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
<
|
|
|
|
|
|
|
58 |
</div>
|
59 |
</div>
|
|
|
60 |
<?php } ?>
|
61 |
|
62 |
-
<div class="fz-feature">
|
63 |
-
<div class="fz-feature-features fz-feature-centered">
|
64 |
-
<h2>Grow your WordPress business with Feedzy today.</h4>
|
65 |
-
<div class="header-btns">
|
66 |
-
<?php
|
67 |
-
$show_more = ! class_exists( 'Feedzy_Rss_Feeds_Pro' ) || false === apply_filters( 'feedzy_is_license_of_type', false, 'agency' );
|
68 |
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
</div>
|
77 |
-
|
78 |
-
</div><!-- .fz-features-content -->
|
79 |
-
|
80 |
-
</div>
|
4 |
@since ?
|
5 |
@package feedzy-rss-feeds
|
6 |
-->
|
7 |
+
<?php
|
8 |
+
$is_pro = feedzy_is_pro();
|
9 |
+
?>
|
10 |
+
<div class="fz-feature">
|
11 |
+
<div class="fz-feature-inner">
|
12 |
+
<div class="fz-feature-features">
|
13 |
+
<h2>Welcome to Feedzy!</h2>
|
14 |
+
<p>Feedzy helps you aggregate unlimited RSS feeds and automatically publish them on your site within a few minutes.</p>
|
15 |
+
<p>With this version, you can already:</p>
|
16 |
+
|
17 |
+
<ul style="list-style: disc; list-style-position: inside;">
|
18 |
+
<li>Import an unlimited number of feeds</li>
|
19 |
+
<li>Automatically create posts from your feeds (feed to post)</li>
|
20 |
+
<li>Easily display RSS feeds (shortcodes, gutenberg blocks etc.)</li>
|
21 |
+
<li>Import images</li>
|
22 |
+
<li>Organize feeds into categories</li>
|
23 |
+
<?php if ( $is_pro ) { ?>
|
24 |
+
<li>Filter feeds based on keywords</li>
|
25 |
+
<li>WordAI and SpinnerChief integration</li>
|
26 |
+
<li>Add affiliate links and referral parameters</li>
|
27 |
+
<li>Automatically delete posts after X days</li>
|
28 |
+
<?php } ?>
|
29 |
+
</ul>
|
30 |
+
|
31 |
+
<?php if ( ! $is_pro ) { ?>
|
32 |
+
<p>We have many more features and offer email & chat support if you purchase our <a href="<?php echo FEEDZY_UPSELL_LINK; ?>" target="_blank">Pro Version</a>.</p>
|
33 |
+
<?php } ?>
|
34 |
+
|
35 |
+
<p>Ready to begin? Let's <a href="<?php echo add_query_arg( 'post_type', 'feedzy_imports', admin_url( 'post-new.php' ) ); ?>">import a post</a> or <a href="<?php echo add_query_arg( 'post_type', 'feedzy_categories', admin_url( 'post-new.php' ) ); ?>" target="_blank">create a category</a>!
|
36 |
+
|
37 |
+
</div>
|
38 |
+
<div class="clear"></div>
|
39 |
+
</div>
|
40 |
+
</div>
|
41 |
+
<div class="clear"></div>
|
42 |
|
|
|
|
|
43 |
<a name="shortcode"></a>
|
44 |
<div class="fz-feature">
|
45 |
+
<div class="fz-feature-inner">
|
46 |
+
<div class="fz-feature-features">
|
47 |
+
<h2>Shortcode</h2>
|
48 |
+
<p>Show feed items using the <code>[feedzy-rss]</code>shortcode in a few easy steps.</p>
|
49 |
+
<p>You can view our documentation <a href="https://docs.themeisle.com/article/658-feedzy-rss-feeds" target="_blank">here</a></p>
|
50 |
+
</div>
|
51 |
+
<div class="fz-feature-image">
|
52 |
+
<iframe width="600" height="300" src="https://www.youtube.com/embed/GEFAY2IxxEc?start=84" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
|
53 |
+
</div>
|
54 |
+
<div class="clear"></div>
|
55 |
</div>
|
56 |
</div>
|
57 |
+
<div class="clear"></div>
|
58 |
|
59 |
+
<?php if ( $is_pro ) { ?>
|
60 |
<div class="fz-feature">
|
61 |
+
<div class="fz-feature-inner">
|
62 |
+
<div class="fz-feature-features">
|
63 |
+
<h2>Shortcode templates to suit your style</h2>
|
64 |
+
<p><a href="https://docs.themeisle.com/article/1119-feedzy-rss-feeds-documentation#examples" target="_blank">Three beautiful templates</a> are available for you to choose the style which best fits your design. We even have support for complex media such as <a href="https://demo.themeisle.com/feedzy-rss-feeds/audio-feed-template/" target="_blank">audio playback</a> and <a href="https://docs.themeisle.com/article/1113-how-to-get-videos-from-youtube-with-feedzy" target="_blank">YouTube videos</a>.</p>
|
65 |
+
<p>If you like to roll your own templates, <a href="https://docs.themeisle.com/article/1162-feedzy-custom-templates" target="_blank">template tags</a> are available to help you do just that!</p>
|
66 |
+
</div>
|
67 |
+
<div class="fz-feature-image">
|
68 |
+
<img src="<?php echo FEEDZY_ABSURL; ?>/img/features-templates.jpg" alt="Feed templates">
|
69 |
+
</div>
|
70 |
+
<div class="clear"></div>
|
71 |
</div>
|
72 |
</div>
|
73 |
+
<div class="clear"></div>
|
74 |
<?php } ?>
|
75 |
|
|
|
76 |
<a name="import"></a>
|
77 |
<div class="fz-feature">
|
78 |
+
<div class="fz-feature-inner">
|
79 |
+
<div class="fz-feature-features">
|
80 |
+
<h2>Feed to Post</h2>
|
81 |
+
<p>Convert feed items into WordPress Posts, Pages, or any custom post type in a few easy steps.</p>
|
82 |
+
<p>You can view our documentation <a href="https://docs.themeisle.com/article/742-how-to-import-posts-from-feeds-in-feedzy" target="_blank">here</a></p>
|
83 |
+
</div>
|
84 |
+
<div class="fz-feature-image">
|
85 |
+
<iframe width="600" height="300" src="https://www.youtube.com/embed/Fzx5W_PfQsQ" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
|
86 |
+
</div>
|
87 |
+
<div class="clear"></div>
|
88 |
</div>
|
89 |
</div>
|
90 |
+
<div class="clear"></div>
|
91 |
|
92 |
<?php if ( true === apply_filters( 'feedzy_is_license_of_type', false, 'agency' ) ) { ?>
|
93 |
+
|
94 |
<div class="fz-feature">
|
95 |
+
<div class="fz-feature-inner">
|
96 |
+
<div class="fz-feature-features">
|
97 |
+
<h2>Integration with SpinnerChief & WordAI</h2>
|
98 |
+
<p>Through WordAI integration, Feedzy will give you unlimited new content. Your SpinnerChief or WordAI subscriptions (not included) integrate seamlessly with Feedzy, so you won't ever have to worry about duplicate content - or Google penalties - again. <a href="https://docs.themeisle.com/article/746-how-to-use-wordai-to-rephrase-rss-content-in-feedzy" target="_blank">Check this out here.</a></p>
|
99 |
+
</div>
|
100 |
+
<div class="fz-feature-image">
|
101 |
+
<img src="<?php echo FEEDZY_ABSURL; ?>/img/feedzy-rss-feeds-wordai.jpg" alt="WordAi integration">
|
102 |
+
</div>
|
103 |
+
<div class="clear"></div>
|
104 |
</div>
|
105 |
</div>
|
106 |
+
<div class="clear"></div>
|
107 |
<?php } ?>
|
108 |
|
|
|
|
|
|
|
|
|
|
|
|
|
109 |
|
110 |
+
<div class="fz-feature">
|
111 |
+
<div class="fz-feature-inner">
|
112 |
+
<div class="fz-feature-features fz-feature-centered">
|
113 |
+
<h2>Grow your WordPress business with Feedzy today.</h2>
|
114 |
+
<?php
|
115 |
+
if ( ! $is_pro || false === apply_filters( 'feedzy_is_license_of_type', false, 'agency' ) ) {
|
116 |
+
?>
|
117 |
+
<div class="header-btns">
|
118 |
+
<a href="<?php echo esc_url( admin_url( 'admin.php?page=feedzy-support&tab=more' ) ); ?>" class="buy-now">
|
119 |
+
<span class="dashicons dashicons-cart"></span> Click here to see the additional features in Feedzy Pro</a>
|
120 |
+
</div>
|
121 |
+
<?php
|
122 |
+
}
|
123 |
+
?>
|
124 |
+
</div>
|
125 |
+
<div class="clear"></div>
|
126 |
+
</div>
|
127 |
</div>
|
128 |
+
<div class="clear"></div>
|
|
|
|
|
|
includes/layouts/feedzy-upsell.php
CHANGED
@@ -5,109 +5,163 @@ Layout For Upsell Page of Feedzy RSS Feeds
|
|
5 |
@package feedzy-rss-feeds
|
6 |
-->
|
7 |
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
<div class="header-btns">
|
21 |
-
<a target="_blank" href="<?php echo FEEDZY_UPSELL_LINK; ?>" class="buy-now"><span class="dashicons dashicons-cart"></span> Upgrade to Pro now</a>
|
22 |
-
</div>
|
23 |
-
</div>
|
24 |
</div>
|
25 |
-
<div class="fz-feature">
|
26 |
-
<div class="
|
27 |
-
|
28 |
-
<p>With Pro, collect RSS feeds from an unlimited number of sources and bring them to up to 30 of your own WordPress sites.</p>
|
29 |
-
<p>Feedzy will automatically filter each feed item and place it wherever you want in your site. Easy to install and ready to go.</p>
|
30 |
-
<h2>Feed to Post</h2>
|
31 |
-
<p>Convert feed items into WordPress Posts, Pages, or any custom post type in a few easy steps.</p>
|
32 |
-
</div>
|
33 |
-
<div class="fz-feature-image">
|
34 |
-
<img src="<?php echo FEEDZY_ABSURL; ?>/img/features-feed-to-post.jpg" alt="Feed to post">
|
35 |
</div>
|
36 |
</div>
|
37 |
-
<div class="
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
</
|
|
|
|
|
|
|
46 |
</div>
|
47 |
-
<div class="fz-feature">
|
48 |
-
<
|
49 |
-
<h2>Grow your business</h2>
|
50 |
-
<p>Feature affiliate links on your site with Feedzy. Pro automatically includes your referral/affiliate ID on feed links. You can even import prices from product sources to create extra value for your readers.</p>
|
51 |
-
</div>
|
52 |
-
<div class="fz-feature-image">
|
53 |
-
<img src="<?php echo FEEDZY_ABSURL; ?>/img/features-affiliate-ready.jpg" alt="Protect your Brand">
|
54 |
-
</div>
|
55 |
</div>
|
56 |
-
<div class="
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
|
|
|
|
|
|
64 |
</div>
|
65 |
-
|
66 |
-
|
67 |
-
<div class="fz-feature">
|
68 |
-
<div class="fz-feature-features">
|
69 |
-
<h2>Unlimited Content</h2>
|
70 |
-
<p>With Pro, collect RSS feeds from an unlimited number of sources and bring them to up to 30 of your own WordPress sites.</p>
|
71 |
-
<p>Feedzy will automatically filter each feed item and place it wherever you want in your site. Easy to install and ready to go.</p>
|
72 |
-
<h2>Feed to Post</h2>
|
73 |
-
<p>Convert feed items along with their <b>full content</b> into WordPress Posts, Pages, or any custom post type in a few easy steps.</p>
|
74 |
-
</div>
|
75 |
-
<div class="fz-feature-image">
|
76 |
-
<img src="<?php echo FEEDZY_ABSURL; ?>/img/features-feed-to-post.jpg" alt="Feed to post">
|
77 |
-
</div>
|
78 |
-
</div>
|
79 |
-
<?php } ?>
|
80 |
-
<?php if ( false === apply_filters( 'feedzy_is_license_of_type', false, 'agency' ) ) { ?>
|
81 |
-
<div class="fz-feature">
|
82 |
-
<div class="fz-feature-features">
|
83 |
-
<h2>Integration with SpinnerChief & WordAI</h2>
|
84 |
-
<p>Through WordAI integration, Feedzy will give you unlimited new content. Your SpinnerChief or WordAI subscriptions (not included) integrate seamlessly with Feedzy, so you won't ever have to worry about duplicate content - or Google penalties - again. <a href="https://docs.themeisle.com/article/746-how-to-use-wordai-to-rephrase-rss-content-in-feedzy" target="_blank">Check this out here.</a></p>
|
85 |
-
</div>
|
86 |
-
<div class="fz-feature-image">
|
87 |
-
<img src="<?php echo FEEDZY_ABSURL; ?>/img/feedzy-rss-feeds-wordai.jpg" alt="WordAi integration">
|
88 |
-
</div>
|
89 |
</div>
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
|
|
|
|
99 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
<a target="_blank" href="<?php echo FEEDZY_UPSELL_LINK; ?>" class="buy-now"><span
|
107 |
-
class="dashicons dashicons-cart"></span> Get Feedzy Pro</a>
|
108 |
-
<?php } ?>
|
109 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
110 |
|
111 |
-
|
112 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
113 |
</div>
|
|
5 |
@package feedzy-rss-feeds
|
6 |
-->
|
7 |
|
8 |
+
<?php
|
9 |
+
$is_pro = feedzy_is_pro();
|
10 |
+
?>
|
11 |
+
|
12 |
+
<?php if ( ! $is_pro ) { ?>
|
13 |
+
<div class="fz-feature">
|
14 |
+
<div class="fz-feature-inner">
|
15 |
+
<div class="fz-feature-features">
|
16 |
+
<h2>Boost your Business with Pro Content</h2>
|
17 |
+
<h3>Upgrade to Feedzy Pro to experience powerful benefits</h3>
|
18 |
+
<p>Aggregate unlimited RSS feeds in your posts, pages or custom content types</p>
|
19 |
+
<p>Add content on up to 30 of your own websites, automatically build affiliate links, integrate with WordAI and even add live product pricing feeds.</p>
|
|
|
|
|
|
|
|
|
20 |
</div>
|
21 |
+
<div class="fz-feature-image">
|
22 |
+
<div class="header-btns">
|
23 |
+
<a target="_blank" href="<?php echo FEEDZY_UPSELL_LINK; ?>" class="buy-now"><span class="dashicons dashicons-cart"></span> Upgrade to Pro now</a>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
</div>
|
25 |
</div>
|
26 |
+
<div class="clear"></div>
|
27 |
+
</div>
|
28 |
+
</div>
|
29 |
+
<div class="clear"></div>
|
30 |
+
|
31 |
+
<div class="fz-feature">
|
32 |
+
<div class="fz-feature-inner">
|
33 |
+
<div class="fz-feature-features">
|
34 |
+
<h2>Unlimited Content with Feed to Post</h2>
|
35 |
+
<p>Convert feed items into WordPress Posts, Pages, or any custom post type in a few easy steps.</p>
|
36 |
+
<p>With Pro, collect RSS feeds from an unlimited number of sources and bring them to up to 30 of your own WordPress sites.</p>
|
37 |
+
<p>Feedzy will automatically filter each feed item and place it wherever you want in your site. Easy to install and ready to go.</p>
|
38 |
</div>
|
39 |
+
<div class="fz-feature-image">
|
40 |
+
<img src="<?php echo FEEDZY_ABSURL; ?>/img/features-feed-to-post.jpg" alt="Feed to post">
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
</div>
|
42 |
+
<div class="clear"></div>
|
43 |
+
</div>
|
44 |
+
</div>
|
45 |
+
<div class="clear"></div>
|
46 |
+
|
47 |
+
<div class="fz-feature">
|
48 |
+
<div class="fz-feature-inner">
|
49 |
+
<div class="fz-feature-features">
|
50 |
+
<h2>Shortcode templates to suit your style</h2>
|
51 |
+
<p><a href="https://docs.themeisle.com/article/1119-feedzy-rss-feeds-documentation#examples" target="_blank">Three beautiful templates</a> are available for you to choose the style which best fits your design. We even have support for complex media such as <a href="https://demo.themeisle.com/feedzy-rss-feeds/audio-feed-template/" target="_blank">audio playback</a> and <a href="https://docs.themeisle.com/article/1113-how-to-get-videos-from-youtube-with-feedzy" target="_blank">YouTube videos</a>.</p>
|
52 |
+
<p>If you like to roll your own templates, <a href="https://docs.themeisle.com/article/1162-feedzy-custom-templates" target="_blank">template tags</a> are available to help you do just that!</p>
|
53 |
</div>
|
54 |
+
<div class="fz-feature-image">
|
55 |
+
<img src="<?php echo FEEDZY_ABSURL; ?>/img/features-templates.jpg" alt="Feed templates">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
</div>
|
57 |
+
<div class="clear"></div>
|
58 |
+
</div>
|
59 |
+
</div>
|
60 |
+
<div class="clear"></div>
|
61 |
+
|
62 |
+
|
63 |
+
<div class="fz-feature">
|
64 |
+
<div class="fz-feature-inner">
|
65 |
+
<div class="fz-feature-features">
|
66 |
+
<h2>Grow your business</h2>
|
67 |
+
<p>Feature affiliate links on your site with Feedzy. Pro automatically includes your referral/affiliate ID on feed links. You can even import prices from product sources to create extra value for your readers.</p>
|
68 |
</div>
|
69 |
+
<div class="fz-feature-image">
|
70 |
+
<img src="<?php echo FEEDZY_ABSURL; ?>/img/features-affiliate-ready.jpg" alt="Protect your Brand">
|
71 |
+
</div>
|
72 |
+
<div class="clear"></div>
|
73 |
+
</div>
|
74 |
+
</div>
|
75 |
+
<div class="clear"></div>
|
76 |
|
77 |
+
<div class="fz-feature">
|
78 |
+
<div class="fz-feature-inner">
|
79 |
+
<div class="fz-feature-features">
|
80 |
+
<h2>Protect your Brand</h2>
|
81 |
+
<p>Take control of your content: blacklist specific keywords to show only the content you want to display on your site.</p>
|
|
|
|
|
|
|
82 |
</div>
|
83 |
+
<div class="fz-feature-image">
|
84 |
+
<img src="<?php echo FEEDZY_ABSURL; ?>/img/Protect-your-Brand.jpg" alt="Affiliate ready">
|
85 |
+
</div>
|
86 |
+
<div class="clear"></div>
|
87 |
+
</div>
|
88 |
+
</div>
|
89 |
+
<div class="clear"></div>
|
90 |
+
|
91 |
+
<?php } ?>
|
92 |
+
|
93 |
+
<?php if ( $is_pro && false === apply_filters( 'feedzy_is_license_of_type', false, 'business' ) ) { ?>
|
94 |
+
|
95 |
+
<div class="fz-feature">
|
96 |
+
<div class="fz-feature-inner">
|
97 |
+
<div class="fz-feature-features">
|
98 |
+
<h2>Unlimited Content with Feed to Post</h2>
|
99 |
+
<p>Convert feed items into WordPress Posts, Pages, or any custom post type in a few easy steps.</p>
|
100 |
+
<p>With Pro, collect RSS feeds from an unlimited number of sources and bring them to up to 30 of your own WordPress sites.</p>
|
101 |
+
<p>Feedzy will automatically filter each feed item and place it wherever you want in your site. Easy to install and ready to go.</p>
|
102 |
+
</div>
|
103 |
+
<div class="fz-feature-image">
|
104 |
+
<img src="<?php echo FEEDZY_ABSURL; ?>/img/features-feed-to-post.jpg" alt="Feed to post">
|
105 |
+
</div>
|
106 |
+
<div class="clear"></div>
|
107 |
+
</div>
|
108 |
+
</div>
|
109 |
+
<div class="clear"></div>
|
110 |
+
|
111 |
+
<?php } ?>
|
112 |
|
113 |
+
<?php if ( $is_pro && false === apply_filters( 'feedzy_is_license_of_type', false, 'agency' ) ) { ?>
|
114 |
|
115 |
+
<div class="fz-feature">
|
116 |
+
<div class="fz-feature-inner">
|
117 |
+
<div class="fz-feature-features">
|
118 |
+
<h2>Integration with SpinnerChief & WordAI</h2>
|
119 |
+
<p>Through WordAI integration, Feedzy will give you unlimited new content. Your SpinnerChief or WordAI subscriptions (not included) integrate seamlessly with Feedzy, so you won't ever have to worry about duplicate content - or Google penalties - again. <a href="https://docs.themeisle.com/article/746-how-to-use-wordai-to-rephrase-rss-content-in-feedzy" target="_blank">Check this out here.</a></p>
|
120 |
+
</div>
|
121 |
+
<div class="fz-feature-image">
|
122 |
+
<img src="<?php echo FEEDZY_ABSURL; ?>/img/feedzy-rss-feeds-wordai.jpg" alt="WordAi integration">
|
123 |
+
</div>
|
124 |
+
<div class="clear"></div>
|
125 |
+
</div>
|
126 |
+
</div>
|
127 |
+
<div class="clear"></div>
|
128 |
+
|
129 |
+
<?php } ?>
|
130 |
+
|
131 |
+
<?php if ( ! $is_pro ) { ?>
|
132 |
+
|
133 |
+
<div class="fz-feature">
|
134 |
+
<div class="fz-feature-inner">
|
135 |
+
<div class="fz-feature-features">
|
136 |
+
<h2>World-class support</h2>
|
137 |
+
<p>We're proud to serve over 10,000 happy customers and provide unlimited support/updates for the duration of your subscription. If you need help, our customer service and developer teams are on-hand to offer personalized, priority assistance to Pro customers.</p>
|
138 |
+
</div>
|
139 |
+
<div class="fz-feature-image">
|
140 |
+
<img src="<?php echo FEEDZY_ABSURL; ?>/img/World-class-support.jpg" alt="World Class Support">
|
141 |
+
</div>
|
142 |
+
<div class="clear"></div>
|
143 |
+
</div>
|
144 |
+
</div>
|
145 |
+
<div class="clear"></div>
|
146 |
+
|
147 |
+
<?php } ?>
|
148 |
+
|
149 |
+
<div class="fz-feature">
|
150 |
+
<div class="fz-feature-inner">
|
151 |
+
<div class="fz-feature-features fz-feature-centered">
|
152 |
+
<h2>Grow your WordPress business with Feedzy today.</h2>
|
153 |
+
<?php
|
154 |
+
if ( false === apply_filters( 'feedzy_is_license_of_type', false, 'agency' ) ) {
|
155 |
+
?>
|
156 |
+
<div class="header-btns">
|
157 |
+
<a href="<?php echo FEEDZY_UPSELL_LINK; ?>" class="buy-now">
|
158 |
+
<span class="dashicons dashicons-cart"></span> Upgrade to Feedzy Pro</a>
|
159 |
+
</div>
|
160 |
+
<?php
|
161 |
+
}
|
162 |
+
?>
|
163 |
+
</div>
|
164 |
+
<div class="clear"></div>
|
165 |
+
</div>
|
166 |
</div>
|
167 |
+
<div class="clear"></div>
|
includes/layouts/settings.php
CHANGED
@@ -35,11 +35,14 @@
|
|
35 |
<div class="error"><p><?php echo $this->error; ?></p></div>
|
36 |
<?php } ?>
|
37 |
|
|
|
38 |
<div class="fz-features-content">
|
39 |
-
<div class="fz-feature">
|
40 |
-
<div
|
|
|
|
|
41 |
|
42 |
-
|
43 |
<?php
|
44 |
$disble_featured_image = '';
|
45 |
if ( isset( $settings['general']['rss-feeds'] ) && 1 === intval( $settings['general']['rss-feeds'] ) ) {
|
@@ -132,9 +135,10 @@
|
|
132 |
<?php
|
133 |
}
|
134 |
?>
|
135 |
-
|
|
|
|
|
136 |
</div>
|
137 |
</div>
|
138 |
</div>
|
139 |
-
|
140 |
</div>
|
35 |
<div class="error"><p><?php echo $this->error; ?></p></div>
|
36 |
<?php } ?>
|
37 |
|
38 |
+
|
39 |
<div class="fz-features-content">
|
40 |
+
<div id="feedzy_import_feeds" class="fz-feature-features">
|
41 |
+
<div class="fz-feature">
|
42 |
+
<div class="fz-feature-inner">
|
43 |
+
<div class="fz-feature-features">
|
44 |
|
45 |
+
<form method="post" action="">
|
46 |
<?php
|
47 |
$disble_featured_image = '';
|
48 |
if ( isset( $settings['general']['rss-feeds'] ) && 1 === intval( $settings['general']['rss-feeds'] ) ) {
|
135 |
<?php
|
136 |
}
|
137 |
?>
|
138 |
+
</form>
|
139 |
+
</div>
|
140 |
+
</div>
|
141 |
</div>
|
142 |
</div>
|
143 |
</div>
|
|
|
144 |
</div>
|
includes/views/css/chosen-sprite.png
ADDED
Binary file
|
includes/views/css/chosen-sprite@2x.png
ADDED
Binary file
|
includes/views/css/chosen.css
ADDED
@@ -0,0 +1,484 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* chosen.css
|
3 |
+
*
|
4 |
+
* @since 1.2.0
|
5 |
+
* @package feedzy-rss-feeds-pro
|
6 |
+
*/
|
7 |
+
/*!
|
8 |
+
Chosen, a Select Box Enhancer for jQuery and Prototype
|
9 |
+
by Patrick Filler for Harvest, http://getharvest.com
|
10 |
+
|
11 |
+
Version 1.7.0
|
12 |
+
Full source at https://github.com/harvesthq/chosen
|
13 |
+
Copyright (c) 2011-2017 Harvest http://getharvest.com
|
14 |
+
|
15 |
+
MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
|
16 |
+
This file is generated by `grunt build`, do not edit it by hand.
|
17 |
+
*/
|
18 |
+
|
19 |
+
/* @group Base */
|
20 |
+
.chosen-container {
|
21 |
+
display: inline-block;
|
22 |
+
position: relative;
|
23 |
+
font-size: 13px;
|
24 |
+
vertical-align: middle;
|
25 |
+
-webkit-user-select: none;
|
26 |
+
-moz-user-select: none;
|
27 |
+
-ms-user-select: none;
|
28 |
+
user-select: none;
|
29 |
+
}
|
30 |
+
|
31 |
+
.chosen-container * {
|
32 |
+
box-sizing: border-box;
|
33 |
+
}
|
34 |
+
|
35 |
+
.chosen-container .chosen-drop {
|
36 |
+
clip: rect(0, 0, 0, 0);
|
37 |
+
position: absolute;
|
38 |
+
z-index: 1010;
|
39 |
+
top: 100%;
|
40 |
+
width: 100%;
|
41 |
+
border: 1px solid #aaa;
|
42 |
+
border-top: 0;
|
43 |
+
background: #fff;
|
44 |
+
box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15);
|
45 |
+
}
|
46 |
+
|
47 |
+
.chosen-container.chosen-with-drop .chosen-drop {
|
48 |
+
clip: auto;
|
49 |
+
}
|
50 |
+
|
51 |
+
.chosen-container a {
|
52 |
+
cursor: pointer;
|
53 |
+
}
|
54 |
+
|
55 |
+
.chosen-container .search-choice .group-name,
|
56 |
+
.chosen-container .chosen-single .group-name {
|
57 |
+
overflow: hidden;
|
58 |
+
margin-right: 4px;
|
59 |
+
color: #999;
|
60 |
+
font-weight: normal;
|
61 |
+
white-space: nowrap;
|
62 |
+
text-overflow: ellipsis;
|
63 |
+
}
|
64 |
+
|
65 |
+
.chosen-container .search-choice .group-name:after,
|
66 |
+
.chosen-container .chosen-single .group-name:after {
|
67 |
+
padding-left: 2px;
|
68 |
+
vertical-align: top;
|
69 |
+
content: ":";
|
70 |
+
}
|
71 |
+
|
72 |
+
.chosen-container-single .chosen-single {
|
73 |
+
display: block;
|
74 |
+
overflow: hidden;
|
75 |
+
position: relative;
|
76 |
+
height: 25px;
|
77 |
+
padding: 0 0 0 8px;
|
78 |
+
border: 1px solid #aaa;
|
79 |
+
border-radius: 5px;
|
80 |
+
color: #444;
|
81 |
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(20%, #fff), color-stop(50%, #f6f6f6), color-stop(52%, #eee), to(#f4f4f4));
|
82 |
+
background: -webkit-linear-gradient(#fff 20%, #f6f6f6 50%, #eee 52%, #f4f4f4 100%);
|
83 |
+
background: linear-gradient(#fff 20%, #f6f6f6 50%, #eee 52%, #f4f4f4 100%);
|
84 |
+
background-color: #fff;
|
85 |
+
background-clip: padding-box;
|
86 |
+
box-shadow: 0 0 3px #fff inset, 0 1px 1px rgba(0, 0, 0, 0.1);
|
87 |
+
line-height: 24px;
|
88 |
+
white-space: nowrap;
|
89 |
+
text-decoration: none;
|
90 |
+
}
|
91 |
+
|
92 |
+
.chosen-container-single .chosen-default {
|
93 |
+
color: #999;
|
94 |
+
}
|
95 |
+
|
96 |
+
.chosen-container-single .chosen-single span {
|
97 |
+
display: block;
|
98 |
+
overflow: hidden;
|
99 |
+
margin-right: 26px;
|
100 |
+
white-space: nowrap;
|
101 |
+
text-overflow: ellipsis;
|
102 |
+
}
|
103 |
+
|
104 |
+
.chosen-container-single .chosen-single-with-deselect span {
|
105 |
+
margin-right: 38px;
|
106 |
+
}
|
107 |
+
|
108 |
+
.chosen-container-single .chosen-single abbr {
|
109 |
+
display: block;
|
110 |
+
position: absolute;
|
111 |
+
top: 6px;
|
112 |
+
right: 26px;
|
113 |
+
width: 12px;
|
114 |
+
height: 12px;
|
115 |
+
background: url("chosen-sprite.png") -42px 1px no-repeat;
|
116 |
+
font-size: 1px;
|
117 |
+
}
|
118 |
+
|
119 |
+
.chosen-container-single .chosen-single abbr:hover {
|
120 |
+
background-position: -42px -10px;
|
121 |
+
}
|
122 |
+
|
123 |
+
.chosen-container-single.chosen-disabled .chosen-single abbr:hover {
|
124 |
+
background-position: -42px -10px;
|
125 |
+
}
|
126 |
+
|
127 |
+
.chosen-container-single .chosen-single div {
|
128 |
+
display: block;
|
129 |
+
position: absolute;
|
130 |
+
top: 0;
|
131 |
+
right: 0;
|
132 |
+
width: 18px;
|
133 |
+
height: 100%;
|
134 |
+
}
|
135 |
+
|
136 |
+
.chosen-container-single .chosen-single div b {
|
137 |
+
display: block;
|
138 |
+
width: 100%;
|
139 |
+
height: 100%;
|
140 |
+
background: url("chosen-sprite.png") no-repeat 0 2px;
|
141 |
+
}
|
142 |
+
|
143 |
+
.chosen-container-single .chosen-search {
|
144 |
+
position: relative;
|
145 |
+
z-index: 1010;
|
146 |
+
margin: 0;
|
147 |
+
padding: 3px 4px;
|
148 |
+
white-space: nowrap;
|
149 |
+
}
|
150 |
+
|
151 |
+
.chosen-container-single .chosen-search input[type="text"] {
|
152 |
+
width: 100%;
|
153 |
+
height: auto;
|
154 |
+
margin: 1px 0;
|
155 |
+
padding: 4px 20px 4px 5px;
|
156 |
+
border: 1px solid #aaa;
|
157 |
+
border-radius: 0;
|
158 |
+
outline: 0;
|
159 |
+
background: url("chosen-sprite.png") no-repeat 100% -20px;
|
160 |
+
font-family: sans-serif;
|
161 |
+
font-size: 1em;
|
162 |
+
line-height: normal;
|
163 |
+
}
|
164 |
+
|
165 |
+
.chosen-container-single .chosen-drop {
|
166 |
+
margin-top: -1px;
|
167 |
+
border-radius: 0 0 4px 4px;
|
168 |
+
background-clip: padding-box;
|
169 |
+
}
|
170 |
+
|
171 |
+
.chosen-container-single.chosen-container-single-nosearch .chosen-search {
|
172 |
+
clip: rect(0, 0, 0, 0);
|
173 |
+
position: absolute;
|
174 |
+
}
|
175 |
+
|
176 |
+
.chosen-container .chosen-results {
|
177 |
+
overflow-x: hidden;
|
178 |
+
overflow-y: auto;
|
179 |
+
position: relative;
|
180 |
+
max-height: 240px;
|
181 |
+
margin: 0 4px 4px 0;
|
182 |
+
padding: 0 0 0 4px;
|
183 |
+
color: #444;
|
184 |
+
|
185 |
+
-webkit-overflow-scrolling: touch;
|
186 |
+
}
|
187 |
+
|
188 |
+
.chosen-container .chosen-results li {
|
189 |
+
display: none;
|
190 |
+
margin: 0;
|
191 |
+
padding: 5px 6px;
|
192 |
+
line-height: 15px;
|
193 |
+
word-wrap: break-word;
|
194 |
+
list-style: none;
|
195 |
+
|
196 |
+
-webkit-touch-callout: none;
|
197 |
+
}
|
198 |
+
|
199 |
+
.chosen-container .chosen-results li.active-result {
|
200 |
+
display: list-item;
|
201 |
+
cursor: pointer;
|
202 |
+
}
|
203 |
+
|
204 |
+
.chosen-container .chosen-results li.disabled-result {
|
205 |
+
display: list-item;
|
206 |
+
color: #ccc;
|
207 |
+
cursor: default;
|
208 |
+
}
|
209 |
+
|
210 |
+
.chosen-container .chosen-results li.highlighted {
|
211 |
+
color: #fff;
|
212 |
+
background-color: #3875d7;
|
213 |
+
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(20%, #3875d7), color-stop(90%, #2a62bc));
|
214 |
+
background-image: -webkit-linear-gradient(#3875d7 20%, #2a62bc 90%);
|
215 |
+
background-image: linear-gradient(#3875d7 20%, #2a62bc 90%);
|
216 |
+
}
|
217 |
+
|
218 |
+
.chosen-container .chosen-results li.no-results {
|
219 |
+
display: list-item;
|
220 |
+
color: #777;
|
221 |
+
background: #f4f4f4;
|
222 |
+
}
|
223 |
+
|
224 |
+
.chosen-container .chosen-results li.group-result {
|
225 |
+
display: list-item;
|
226 |
+
font-weight: bold;
|
227 |
+
cursor: default;
|
228 |
+
}
|
229 |
+
|
230 |
+
.chosen-container .chosen-results li.group-option {
|
231 |
+
padding-left: 15px;
|
232 |
+
}
|
233 |
+
|
234 |
+
.chosen-container .chosen-results li em {
|
235 |
+
font-style: normal;
|
236 |
+
text-decoration: underline;
|
237 |
+
}
|
238 |
+
|
239 |
+
.chosen-container-multi .chosen-choices {
|
240 |
+
overflow: hidden;
|
241 |
+
position: relative;
|
242 |
+
width: 100%;
|
243 |
+
height: auto;
|
244 |
+
margin: 0;
|
245 |
+
padding: 0 5px;
|
246 |
+
border: 1px solid #aaa;
|
247 |
+
background-color: #fff;
|
248 |
+
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(1%, #eee), color-stop(15%, #fff));
|
249 |
+
background-image: -webkit-linear-gradient(#eee 1%, #fff 15%);
|
250 |
+
background-image: linear-gradient(#eee 1%, #fff 15%);
|
251 |
+
cursor: text;
|
252 |
+
}
|
253 |
+
|
254 |
+
.chosen-container-multi .chosen-choices li {
|
255 |
+
float: left;
|
256 |
+
list-style: none;
|
257 |
+
}
|
258 |
+
|
259 |
+
.chosen-container-multi .chosen-choices li.search-field {
|
260 |
+
margin: 0;
|
261 |
+
padding: 0;
|
262 |
+
white-space: nowrap;
|
263 |
+
}
|
264 |
+
|
265 |
+
.chosen-container-multi .chosen-choices li.search-field input[type="text"] {
|
266 |
+
width: 25px;
|
267 |
+
height: 25px;
|
268 |
+
margin: 1px 0;
|
269 |
+
padding: 0;
|
270 |
+
border: 0 !important;
|
271 |
+
border-radius: 0;
|
272 |
+
outline: 0;
|
273 |
+
color: #999;
|
274 |
+
background: transparent !important;
|
275 |
+
box-shadow: none;
|
276 |
+
font-family: sans-serif;
|
277 |
+
font-size: 100%;
|
278 |
+
line-height: normal;
|
279 |
+
}
|
280 |
+
|
281 |
+
.chosen-container-multi .chosen-choices li.search-choice {
|
282 |
+
position: relative;
|
283 |
+
max-width: 100%;
|
284 |
+
margin: 3px 5px 3px 0;
|
285 |
+
padding: 3px 20px 3px 5px;
|
286 |
+
border: 1px solid #aaa;
|
287 |
+
border-radius: 3px;
|
288 |
+
color: #333;
|
289 |
+
background-color: #eee;
|
290 |
+
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), to(#eee));
|
291 |
+
background-image: -webkit-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%);
|
292 |
+
background-image: linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%);
|
293 |
+
background-repeat: repeat-x;
|
294 |
+
background-clip: padding-box;
|
295 |
+
background-size: 100% 19px;
|
296 |
+
box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0, 0, 0, 0.05);
|
297 |
+
line-height: 13px;
|
298 |
+
cursor: default;
|
299 |
+
}
|
300 |
+
|
301 |
+
.chosen-container-multi .chosen-choices li.search-choice span {
|
302 |
+
word-wrap: break-word;
|
303 |
+
}
|
304 |
+
|
305 |
+
.chosen-container-multi .chosen-choices li.search-choice .search-choice-close {
|
306 |
+
display: block;
|
307 |
+
position: absolute;
|
308 |
+
top: 4px;
|
309 |
+
right: 3px;
|
310 |
+
width: 12px;
|
311 |
+
height: 12px;
|
312 |
+
background: url("chosen-sprite.png") -42px 1px no-repeat;
|
313 |
+
font-size: 1px;
|
314 |
+
}
|
315 |
+
|
316 |
+
.chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover {
|
317 |
+
background-position: -42px -10px;
|
318 |
+
}
|
319 |
+
|
320 |
+
.chosen-container-multi .chosen-choices li.search-choice-disabled {
|
321 |
+
padding-right: 5px;
|
322 |
+
border: 1px solid #ccc;
|
323 |
+
color: #666;
|
324 |
+
background-color: #e4e4e4;
|
325 |
+
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), to(#eee));
|
326 |
+
background-image: -webkit-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%);
|
327 |
+
background-image: linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%);
|
328 |
+
}
|
329 |
+
|
330 |
+
.chosen-container-multi .chosen-choices li.search-choice-focus {
|
331 |
+
background: #d4d4d4;
|
332 |
+
}
|
333 |
+
|
334 |
+
.chosen-container-multi .chosen-choices li.search-choice-focus .search-choice-close {
|
335 |
+
background-position: -42px -10px;
|
336 |
+
}
|
337 |
+
|
338 |
+
.chosen-container-multi .chosen-results {
|
339 |
+
margin: 0;
|
340 |
+
padding: 0;
|
341 |
+
}
|
342 |
+
|
343 |
+
.chosen-container-multi .chosen-drop .result-selected {
|
344 |
+
display: list-item;
|
345 |
+
color: #ccc;
|
346 |
+
cursor: default;
|
347 |
+
}
|
348 |
+
|
349 |
+
.chosen-container-active .chosen-single {
|
350 |
+
border: 1px solid #5897fb;
|
351 |
+
box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
|
352 |
+
}
|
353 |
+
|
354 |
+
.chosen-container-active.chosen-with-drop .chosen-single {
|
355 |
+
border: 1px solid #aaa;
|
356 |
+
border-bottom-right-radius: 0;
|
357 |
+
border-bottom-left-radius: 0;
|
358 |
+
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(20%, #eee), color-stop(80%, #fff));
|
359 |
+
background-image: -webkit-linear-gradient(#eee 20%, #fff 80%);
|
360 |
+
background-image: linear-gradient(#eee 20%, #fff 80%);
|
361 |
+
box-shadow: 0 1px 0 #fff inset;
|
362 |
+
}
|
363 |
+
|
364 |
+
.chosen-container-active.chosen-with-drop .chosen-single div {
|
365 |
+
border-left: none;
|
366 |
+
background: transparent;
|
367 |
+
}
|
368 |
+
|
369 |
+
.chosen-container-active.chosen-with-drop .chosen-single div b {
|
370 |
+
background-position: -18px 2px;
|
371 |
+
}
|
372 |
+
|
373 |
+
.chosen-container-active .chosen-choices {
|
374 |
+
border: 1px solid #5897fb;
|
375 |
+
box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
|
376 |
+
}
|
377 |
+
|
378 |
+
.chosen-container-active .chosen-choices li.search-field input[type="text"] {
|
379 |
+
color: #222 !important;
|
380 |
+
}
|
381 |
+
|
382 |
+
.chosen-disabled {
|
383 |
+
opacity: 0.5 !important;
|
384 |
+
cursor: default;
|
385 |
+
}
|
386 |
+
|
387 |
+
.chosen-disabled .chosen-single {
|
388 |
+
cursor: default;
|
389 |
+
}
|
390 |
+
|
391 |
+
.chosen-disabled .chosen-choices .search-choice .search-choice-close {
|
392 |
+
cursor: default;
|
393 |
+
}
|
394 |
+
|
395 |
+
.chosen-rtl {
|
396 |
+
text-align: right;
|
397 |
+
}
|
398 |
+
|
399 |
+
.chosen-rtl .chosen-single {
|
400 |
+
overflow: visible;
|
401 |
+
padding: 0 8px 0 0;
|
402 |
+
}
|
403 |
+
|
404 |
+
.chosen-rtl .chosen-single span {
|
405 |
+
margin-right: 0;
|
406 |
+
margin-left: 26px;
|
407 |
+
|
408 |
+
direction: rtl;
|
409 |
+
}
|
410 |
+
|
411 |
+
.chosen-rtl .chosen-single-with-deselect span {
|
412 |
+
margin-left: 38px;
|
413 |
+
}
|
414 |
+
|
415 |
+
.chosen-rtl .chosen-single div {
|
416 |
+
right: auto;
|
417 |
+
left: 3px;
|
418 |
+
}
|
419 |
+
|
420 |
+
.chosen-rtl .chosen-single abbr {
|
421 |
+
right: auto;
|
422 |
+
left: 26px;
|
423 |
+
}
|
424 |
+
|
425 |
+
.chosen-rtl .chosen-choices li {
|
426 |
+
float: right;
|
427 |
+
}
|
428 |
+
|
429 |
+
.chosen-rtl .chosen-choices li.search-field input[type="text"] {
|
430 |
+
direction: rtl;
|
431 |
+
}
|
432 |
+
|
433 |
+
.chosen-rtl .chosen-choices li.search-choice {
|
434 |
+
margin: 3px 5px 3px 0;
|
435 |
+
padding: 3px 5px 3px 19px;
|
436 |
+
}
|
437 |
+
|
438 |
+
.chosen-rtl .chosen-choices li.search-choice .search-choice-close {
|
439 |
+
right: auto;
|
440 |
+
left: 4px;
|
441 |
+
}
|
442 |
+
|
443 |
+
.chosen-rtl.chosen-container-single .chosen-results {
|
444 |
+
margin: 0 0 4px 4px;
|
445 |
+
padding: 0 4px 0 0;
|
446 |
+
}
|
447 |
+
|
448 |
+
.chosen-rtl .chosen-results li.group-option {
|
449 |
+
padding-right: 15px;
|
450 |
+
padding-left: 0;
|
451 |
+
}
|
452 |
+
|
453 |
+
.chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div {
|
454 |
+
border-right: none;
|
455 |
+
}
|
456 |
+
|
457 |
+
.chosen-rtl .chosen-search input[type="text"] {
|
458 |
+
padding: 4px 5px 4px 20px;
|
459 |
+
background: url("chosen-sprite.png") no-repeat -30px -20px;
|
460 |
+
|
461 |
+
direction: rtl;
|
462 |
+
}
|
463 |
+
|
464 |
+
.chosen-rtl.chosen-container-single .chosen-single div b {
|
465 |
+
background-position: 6px 2px;
|
466 |
+
}
|
467 |
+
|
468 |
+
.chosen-rtl.chosen-container-single.chosen-with-drop .chosen-single div b {
|
469 |
+
background-position: -12px 2px;
|
470 |
+
}
|
471 |
+
|
472 |
+
@media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-resolution: 144dpi), only screen and (min-resolution: 1.5dppx) {
|
473 |
+
.chosen-rtl .chosen-search input[type="text"],
|
474 |
+
.chosen-container-single .chosen-single abbr,
|
475 |
+
.chosen-container-single .chosen-single div b,
|
476 |
+
.chosen-container-single .chosen-search input[type="text"],
|
477 |
+
.chosen-container-multi .chosen-choices .search-choice .search-choice-close,
|
478 |
+
.chosen-container .chosen-results-scroll-down span,
|
479 |
+
.chosen-container .chosen-results-scroll-up span {
|
480 |
+
background-image: url("chosen-sprite@2x.png") !important;
|
481 |
+
background-repeat: no-repeat !important;
|
482 |
+
background-size: 52px 37px !important;
|
483 |
+
}
|
484 |
+
}
|
includes/views/css/import-metabox-edit.css
ADDED
@@ -0,0 +1,2123 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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height: 34px;
|
11 |
+
padding: 6px 12px;
|
12 |
+
border: 1px solid #ccc;
|
13 |
+
border-radius: 4px;
|
14 |
+
color: #555;
|
15 |
+
background-color: #fff;
|
16 |
+
background-image: none;
|
17 |
+
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
18 |
+
font-size: 14px;
|
19 |
+
line-height: 1.42857143;
|
20 |
+
-webkit-transition: border-color ease-in-out 0.15s, -webkit-box-shadow ease-in-out 0.15s;
|
21 |
+
-webkit-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
|
22 |
+
transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
|
23 |
+
}
|
24 |
+
|
25 |
+
.form-control:focus {
|
26 |
+
border-color: #66afe9;
|
27 |
+
outline: 0;
|
28 |
+
box-shadow: inset 0 1px 1px rgba(0,0,0,0.075), 0 0 8px rgba(102, 175, 233, 0.6);
|
29 |
+
}
|
30 |
+
|
31 |
+
.form-control::-moz-placeholder {
|
32 |
+
opacity: 1;
|
33 |
+
color: #999;
|
34 |
+
}
|
35 |
+
|
36 |
+
.form-control:-ms-input-placeholder {
|
37 |
+
color: #999;
|
38 |
+
}
|
39 |
+
|
40 |
+
.form-control::-webkit-input-placeholder {
|
41 |
+
color: #999;
|
42 |
+
}
|
43 |
+
|
44 |
+
.form-control::-ms-expand {
|
45 |
+
border: 0;
|
46 |
+
background-color: transparent;
|
47 |
+
}
|
48 |
+
|
49 |
+
.form-control[disabled],
|
50 |
+
.form-control[readonly],
|
51 |
+
fieldset[disabled] .form-control {
|
52 |
+
opacity: 1;
|
53 |
+
background-color: #eee;
|
54 |
+
}
|
55 |
+
|
56 |
+
.form-control[disabled],
|
57 |
+
fieldset[disabled] .form-control {
|
58 |
+
cursor: not-allowed;
|
59 |
+
}
|
60 |
+
|
61 |
+
textarea.form-control {
|
62 |
+
height: auto;
|
63 |
+
}
|
64 |
+
|
65 |
+
input[type="search"] {
|
66 |
+
-webkit-appearance: none;
|
67 |
+
}
|
68 |
+
|
69 |
+
@media screen and (-webkit-min-device-pixel-ratio: 0) {
|
70 |
+
input[type="date"].form-control,
|
71 |
+
input[type="time"].form-control,
|
72 |
+
input[type="datetime-local"].form-control,
|
73 |
+
input[type="month"].form-control {
|
74 |
+
line-height: 34px;
|
75 |
+
}
|
76 |
+
|
77 |
+
input[type="date"].input-sm,
|
78 |
+
input[type="time"].input-sm,
|
79 |
+
input[type="datetime-local"].input-sm,
|
80 |
+
input[type="month"].input-sm,
|
81 |
+
.input-group-sm input[type="date"],
|
82 |
+
.input-group-sm input[type="time"],
|
83 |
+
.input-group-sm input[type="datetime-local"],
|
84 |
+
.input-group-sm input[type="month"] {
|
85 |
+
line-height: 30px;
|
86 |
+
}
|
87 |
+
|
88 |
+
input[type="date"].input-lg,
|
89 |
+
input[type="time"].input-lg,
|
90 |
+
input[type="datetime-local"].input-lg,
|
91 |
+
input[type="month"].input-lg,
|
92 |
+
.input-group-lg input[type="date"],
|
93 |
+
.input-group-lg input[type="time"],
|
94 |
+
.input-group-lg input[type="datetime-local"],
|
95 |
+
.input-group-lg input[type="month"] {
|
96 |
+
line-height: 46px;
|
97 |
+
}
|
98 |
+
}
|
99 |
+
|
100 |
+
.form-group {
|
101 |
+
margin-bottom: 15px;
|
102 |
+
}
|
103 |
+
|
104 |
+
.radio,
|
105 |
+
.checkbox {
|
106 |
+
display: block;
|
107 |
+
position: relative;
|
108 |
+
margin-top: 10px;
|
109 |
+
margin-bottom: 10px;
|
110 |
+
}
|
111 |
+
|
112 |
+
.radio label,
|
113 |
+
.checkbox label {
|
114 |
+
min-height: 20px;
|
115 |
+
margin-bottom: 0;
|
116 |
+
padding-left: 20px;
|
117 |
+
font-weight: normal;
|
118 |
+
cursor: pointer;
|
119 |
+
}
|
120 |
+
|
121 |
+
.radio input[type="radio"],
|
122 |
+
.radio-inline input[type="radio"],
|
123 |
+
.checkbox input[type="checkbox"],
|
124 |
+
.checkbox-inline input[type="checkbox"] {
|
125 |
+
position: absolute;
|
126 |
+
margin-top: 4px \9;
|
127 |
+
margin-left: -20px;
|
128 |
+
}
|
129 |
+
|
130 |
+
.radio + .radio,
|
131 |
+
.checkbox + .checkbox {
|
132 |
+
margin-top: -5px;
|
133 |
+
}
|
134 |
+
|
135 |
+
.radio-inline,
|
136 |
+
.checkbox-inline {
|
137 |
+
display: inline-block;
|
138 |
+
position: relative;
|
139 |
+
margin-bottom: 0;
|
140 |
+
padding-left: 20px;
|
141 |
+
font-weight: normal;
|
142 |
+
vertical-align: middle;
|
143 |
+
cursor: pointer;
|
144 |
+
}
|
145 |
+
|
146 |
+
.radio-inline + .radio-inline,
|
147 |
+
.checkbox-inline + .checkbox-inline {
|
148 |
+
margin-top: 0;
|
149 |
+
margin-left: 10px;
|
150 |
+
}
|
151 |
+
|
152 |
+
input[type="radio"][disabled],
|
153 |
+
input[type="checkbox"][disabled],
|
154 |
+
input[type="radio"].disabled,
|
155 |
+
input[type="checkbox"].disabled,
|
156 |
+
fieldset[disabled] input[type="radio"],
|
157 |
+
fieldset[disabled] input[type="checkbox"] {
|
158 |
+
cursor: not-allowed;
|
159 |
+
}
|
160 |
+
|
161 |
+
.radio-inline.disabled,
|
162 |
+
.checkbox-inline.disabled,
|
163 |
+
fieldset[disabled] .radio-inline,
|
164 |
+
fieldset[disabled] .checkbox-inline {
|
165 |
+
cursor: not-allowed;
|
166 |
+
}
|
167 |
+
|
168 |
+
.radio.disabled label,
|
169 |
+
.checkbox.disabled label,
|
170 |
+
fieldset[disabled] .radio label,
|
171 |
+
fieldset[disabled] .checkbox label {
|
172 |
+
cursor: not-allowed;
|
173 |
+
}
|
174 |
+
|
175 |
+
.form-control-static {
|
176 |
+
min-height: 34px;
|
177 |
+
margin-bottom: 0;
|
178 |
+
padding-top: 7px;
|
179 |
+
padding-bottom: 7px;
|
180 |
+
}
|
181 |
+
|
182 |
+
.form-control-static.input-lg,
|
183 |
+
.form-control-static.input-sm {
|
184 |
+
padding-right: 0;
|
185 |
+
padding-left: 0;
|
186 |
+
}
|
187 |
+
|
188 |
+
.input-sm {
|
189 |
+
height: 30px;
|
190 |
+
padding: 5px 10px;
|
191 |
+
border-radius: 3px;
|
192 |
+
font-size: 12px;
|
193 |
+
line-height: 1.5;
|
194 |
+
}
|
195 |
+
|
196 |
+
select.input-sm {
|
197 |
+
height: 30px;
|
198 |
+
line-height: 30px;
|
199 |
+
}
|
200 |
+
|
201 |
+
textarea.input-sm,
|
202 |
+
select[multiple].input-sm {
|
203 |
+
height: auto;
|
204 |
+
}
|
205 |
+
|
206 |
+
.form-group-sm .form-control {
|
207 |
+
height: 30px;
|
208 |
+
padding: 5px 10px;
|
209 |
+
border-radius: 3px;
|
210 |
+
font-size: 12px;
|
211 |
+
line-height: 1.5;
|
212 |
+
}
|
213 |
+
|
214 |
+
.form-group-sm select.form-control {
|
215 |
+
height: 30px;
|
216 |
+
line-height: 30px;
|
217 |
+
}
|
218 |
+
|
219 |
+
.form-group-sm textarea.form-control,
|
220 |
+
.form-group-sm select[multiple].form-control {
|
221 |
+
height: auto;
|
222 |
+
}
|
223 |
+
|
224 |
+
.form-group-sm .form-control-static {
|
225 |
+
height: 30px;
|
226 |
+
min-height: 32px;
|
227 |
+
padding: 6px 10px;
|
228 |
+
font-size: 12px;
|
229 |
+
line-height: 1.5;
|
230 |
+
}
|
231 |
+
|
232 |
+
.input-lg {
|
233 |
+
height: 46px;
|
234 |
+
padding: 10px 16px;
|
235 |
+
border-radius: 6px;
|
236 |
+
font-size: 18px;
|
237 |
+
line-height: 1.3333333;
|
238 |
+
}
|
239 |
+
|
240 |
+
select.input-lg {
|
241 |
+
height: 46px;
|
242 |
+
line-height: 46px;
|
243 |
+
}
|
244 |
+
|
245 |
+
textarea.input-lg,
|
246 |
+
select[multiple].input-lg {
|
247 |
+
height: auto;
|
248 |
+
}
|
249 |
+
|
250 |
+
.form-group-lg .form-control {
|
251 |
+
height: 46px;
|
252 |
+
padding: 10px 16px;
|
253 |
+
border-radius: 6px;
|
254 |
+
font-size: 18px;
|
255 |
+
line-height: 1.3333333;
|
256 |
+
}
|
257 |
+
|
258 |
+
.form-group-lg select.form-control {
|
259 |
+
height: 46px;
|
260 |
+
line-height: 46px;
|
261 |
+
}
|
262 |
+
|
263 |
+
.form-group-lg textarea.form-control,
|
264 |
+
.form-group-lg select[multiple].form-control {
|
265 |
+
height: auto;
|
266 |
+
}
|
267 |
+
|
268 |
+
.form-group-lg .form-control-static {
|
269 |
+
height: 46px;
|
270 |
+
min-height: 38px;
|
271 |
+
padding: 11px 16px;
|
272 |
+
font-size: 18px;
|
273 |
+
line-height: 1.3333333;
|
274 |
+
}
|
275 |
+
|
276 |
+
.has-feedback {
|
277 |
+
position: relative;
|
278 |
+
}
|
279 |
+
|
280 |
+
.has-feedback .form-control {
|
281 |
+
padding-right: 42.5px;
|
282 |
+
}
|
283 |
+
|
284 |
+
.form-control-feedback {
|
285 |
+
display: block;
|
286 |
+
position: absolute;
|
287 |
+
z-index: 2;
|
288 |
+
top: 0;
|
289 |
+
right: 0;
|
290 |
+
width: 34px;
|
291 |
+
height: 34px;
|
292 |
+
line-height: 34px;
|
293 |
+
text-align: center;
|
294 |
+
pointer-events: none;
|
295 |
+
}
|
296 |
+
|
297 |
+
.input-lg + .form-control-feedback,
|
298 |
+
.input-group-lg + .form-control-feedback,
|
299 |
+
.form-group-lg .form-control + .form-control-feedback {
|
300 |
+
width: 46px;
|
301 |
+
height: 46px;
|
302 |
+
line-height: 46px;
|
303 |
+
}
|
304 |
+
|
305 |
+
.input-sm + .form-control-feedback,
|
306 |
+
.input-group-sm + .form-control-feedback,
|
307 |
+
.form-group-sm .form-control + .form-control-feedback {
|
308 |
+
width: 30px;
|
309 |
+
height: 30px;
|
310 |
+
line-height: 30px;
|
311 |
+
}
|
312 |
+
|
313 |
+
.has-success .help-block,
|
314 |
+
.has-success .control-label,
|
315 |
+
.has-success .radio,
|
316 |
+
.has-success .checkbox,
|
317 |
+
.has-success .radio-inline,
|
318 |
+
.has-success .checkbox-inline,
|
319 |
+
.has-success.radio label,
|
320 |
+
.has-success.checkbox label,
|
321 |
+
.has-success.radio-inline label,
|
322 |
+
.has-success.checkbox-inline label {
|
323 |
+
color: #3c763d;
|
324 |
+
}
|
325 |
+
|
326 |
+
.has-success .form-control {
|
327 |
+
border-color: #3c763d;
|
328 |
+
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
329 |
+
}
|
330 |
+
|
331 |
+
.has-success .form-control:focus {
|
332 |
+
border-color: #2b542c;
|
333 |
+
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168;
|
334 |
+
}
|
335 |
+
|
336 |
+
.has-success .input-group-addon {
|
337 |
+
border-color: #3c763d;
|
338 |
+
color: #3c763d;
|
339 |
+
background-color: #dff0d8;
|
340 |
+
}
|
341 |
+
|
342 |
+
.has-success .form-control-feedback {
|
343 |
+
color: #3c763d;
|
344 |
+
}
|
345 |
+
|
346 |
+
.has-warning .help-block,
|
347 |
+
.has-warning .control-label,
|
348 |
+
.has-warning .radio,
|
349 |
+
.has-warning .checkbox,
|
350 |
+
.has-warning .radio-inline,
|
351 |
+
.has-warning .checkbox-inline,
|
352 |
+
.has-warning.radio label,
|
353 |
+
.has-warning.checkbox label,
|
354 |
+
.has-warning.radio-inline label,
|
355 |
+
.has-warning.checkbox-inline label {
|
356 |
+
color: #8a6d3b;
|
357 |
+
}
|
358 |
+
|
359 |
+
.has-warning .form-control {
|
360 |
+
border-color: #8a6d3b;
|
361 |
+
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
362 |
+
}
|
363 |
+
|
364 |
+
.has-warning .form-control:focus {
|
365 |
+
border-color: #66512c;
|
366 |
+
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b;
|
367 |
+
}
|
368 |
+
|
369 |
+
.has-warning .input-group-addon {
|
370 |
+
border-color: #8a6d3b;
|
371 |
+
color: #8a6d3b;
|
372 |
+
background-color: #fcf8e3;
|
373 |
+
}
|
374 |
+
|
375 |
+
.has-warning .form-control-feedback {
|
376 |
+
color: #8a6d3b;
|
377 |
+
}
|
378 |
+
|
379 |
+
.has-error .help-block,
|
380 |
+
.has-error .control-label,
|
381 |
+
.has-error .radio,
|
382 |
+
.has-error .checkbox,
|
383 |
+
.has-error .radio-inline,
|
384 |
+
.has-error .checkbox-inline,
|
385 |
+
.has-error.radio label,
|
386 |
+
.has-error.checkbox label,
|
387 |
+
.has-error.radio-inline label,
|
388 |
+
.has-error.checkbox-inline label {
|
389 |
+
color: #a94442;
|
390 |
+
}
|
391 |
+
|
392 |
+
.has-error .form-control {
|
393 |
+
border-color: #a94442;
|
394 |
+
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
395 |
+
}
|
396 |
+
|
397 |
+
.has-error .form-control:focus {
|
398 |
+
border-color: #843534;
|
399 |
+
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;
|
400 |
+
}
|
401 |
+
|
402 |
+
.has-error .input-group-addon {
|
403 |
+
border-color: #a94442;
|
404 |
+
color: #a94442;
|
405 |
+
background-color: #f2dede;
|
406 |
+
}
|
407 |
+
|
408 |
+
.has-error .form-control-feedback {
|
409 |
+
color: #a94442;
|
410 |
+
}
|
411 |
+
|
412 |
+
.has-feedback label ~ .form-control-feedback {
|
413 |
+
top: 25px;
|
414 |
+
}
|
415 |
+
|
416 |
+
.has-feedback label.feedzy-sr-only ~ .form-control-feedback {
|
417 |
+
top: 0;
|
418 |
+
}
|
419 |
+
|
420 |
+
.help-block {
|
421 |
+
display: block;
|
422 |
+
margin-top: 5px;
|
423 |
+
margin-bottom: 10px;
|
424 |
+
color: #737373;
|
425 |
+
}
|
426 |
+
|
427 |
+
@media (min-width: 768px) {
|
428 |
+
.form-inline .form-group {
|
429 |
+
display: inline-block;
|
430 |
+
margin-bottom: 0;
|
431 |
+
vertical-align: middle;
|
432 |
+
}
|
433 |
+
|
434 |
+
.form-inline .form-control {
|
435 |
+
display: inline-block;
|
436 |
+
width: auto;
|
437 |
+
vertical-align: middle;
|
438 |
+
}
|
439 |
+
|
440 |
+
.form-inline .form-control-static {
|
441 |
+
display: inline-block;
|
442 |
+
}
|
443 |
+
|
444 |
+
.form-inline .input-group {
|
445 |
+
display: inline-table;
|
446 |
+
vertical-align: middle;
|
447 |
+
}
|
448 |
+
|
449 |
+
.form-inline .input-group .input-group-addon,
|
450 |
+
.form-inline .input-group .input-group-btn,
|
451 |
+
.form-inline .input-group .form-control {
|
452 |
+
width: auto;
|
453 |
+
}
|
454 |
+
|
455 |
+
.form-inline .input-group > .form-control {
|
456 |
+
width: 100%;
|
457 |
+
}
|
458 |
+
|
459 |
+
.form-inline .control-label {
|
460 |
+
margin-bottom: 0;
|
461 |
+
vertical-align: middle;
|
462 |
+
}
|
463 |
+
|
464 |
+
.form-inline .radio,
|
465 |
+
.form-inline .checkbox {
|
466 |
+
display: inline-block;
|
467 |
+
margin-top: 0;
|
468 |
+
margin-bottom: 0;
|
469 |
+
vertical-align: middle;
|
470 |
+
}
|
471 |
+
|
472 |
+
.form-inline .radio label,
|
473 |
+
.form-inline .checkbox label {
|
474 |
+
padding-left: 0;
|
475 |
+
}
|
476 |
+
|
477 |
+
.form-inline .radio input[type="radio"],
|
478 |
+
.form-inline .checkbox input[type="checkbox"] {
|
479 |
+
position: relative;
|
480 |
+
margin-left: 0;
|
481 |
+
}
|
482 |
+
|
483 |
+
.form-inline .has-feedback .form-control-feedback {
|
484 |
+
top: 0;
|
485 |
+
}
|
486 |
+
}
|
487 |
+
|
488 |
+
.form-horizontal .radio,
|
489 |
+
.form-horizontal .checkbox,
|
490 |
+
.form-horizontal .radio-inline,
|
491 |
+
.form-horizontal .checkbox-inline {
|
492 |
+
margin-top: 0;
|
493 |
+
margin-bottom: 0;
|
494 |
+
padding-top: 7px;
|
495 |
+
}
|
496 |
+
|
497 |
+
.form-horizontal .radio,
|
498 |
+
.form-horizontal .checkbox {
|
499 |
+
min-height: 27px;
|
500 |
+
}
|
501 |
+
|
502 |
+
.form-horizontal .form-group {
|
503 |
+
margin-right: -15px;
|
504 |
+
margin-left: -15px;
|
505 |
+
}
|
506 |
+
|
507 |
+
@media (min-width: 768px) {
|
508 |
+
.form-horizontal .control-label {
|
509 |
+
margin-bottom: 0;
|
510 |
+
padding-top: 7px;
|
511 |
+
text-align: right;
|
512 |
+
}
|
513 |
+
}
|
514 |
+
|
515 |
+
.form-horizontal .has-feedback .form-control-feedback {
|
516 |
+
right: 15px;
|
517 |
+
}
|
518 |
+
|
519 |
+
@media (min-width: 768px) {
|
520 |
+
.form-horizontal .form-group-lg .control-label {
|
521 |
+
padding-top: 11px;
|
522 |
+
font-size: 18px;
|
523 |
+
}
|
524 |
+
}
|
525 |
+
|
526 |
+
@media (min-width: 768px) {
|
527 |
+
.form-horizontal .form-group-sm .control-label {
|
528 |
+
padding-top: 6px;
|
529 |
+
font-size: 12px;
|
530 |
+
}
|
531 |
+
}
|
532 |
+
|
533 |
+
.btn {
|
534 |
+
display: inline-block;
|
535 |
+
margin-bottom: 0;
|
536 |
+
padding: 6px 12px;
|
537 |
+
border: 1px solid transparent;
|
538 |
+
border-radius: 4px;
|
539 |
+
background-image: none;
|
540 |
+
font-size: 14px;
|
541 |
+
font-weight: normal;
|
542 |
+
line-height: 1.42857143;
|
543 |
+
text-align: center;
|
544 |
+
vertical-align: middle;
|
545 |
+
white-space: nowrap;
|
546 |
+
cursor: pointer;
|
547 |
+
-webkit-user-select: none;
|
548 |
+
-moz-user-select: none;
|
549 |
+
-ms-user-select: none;
|
550 |
+
user-select: none;
|
551 |
+
|
552 |
+
-ms-touch-action: manipulation;
|
553 |
+
touch-action: manipulation;
|
554 |
+
}
|
555 |
+
|
556 |
+
.btn:focus,
|
557 |
+
.btn:active:focus,
|
558 |
+
.btn.active:focus,
|
559 |
+
.btn.focus,
|
560 |
+
.btn:active.focus,
|
561 |
+
.btn.active.focus {
|
562 |
+
outline: 5px auto -webkit-focus-ring-color;
|
563 |
+
outline-offset: -2px;
|
564 |
+
}
|
565 |
+
|
566 |
+
.btn:hover,
|
567 |
+
.btn:focus,
|
568 |
+
.btn.focus {
|
569 |
+
color: #333;
|
570 |
+
text-decoration: none;
|
571 |
+
}
|
572 |
+
|
573 |
+
.btn:active,
|
574 |
+
.btn.active {
|
575 |
+
outline: 0;
|
576 |
+
background-image: none;
|
577 |
+
box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
|
578 |
+
}
|
579 |
+
|
580 |
+
.btn.disabled,
|
581 |
+
.btn[disabled],
|
582 |
+
fieldset[disabled] .btn {
|
583 |
+
opacity: 0.65;
|
584 |
+
box-shadow: none;
|
585 |
+
cursor: not-allowed;
|
586 |
+
|
587 |
+
filter: alpha(opacity=65);
|
588 |
+
}
|
589 |
+
|
590 |
+
a.btn.disabled,
|
591 |
+
fieldset[disabled] a.btn {
|
592 |
+
pointer-events: none;
|
593 |
+
}
|
594 |
+
|
595 |
+
.btn-default {
|
596 |
+
border-color: #ccc;
|
597 |
+
color: #333;
|
598 |
+
background-color: #fff;
|
599 |
+
}
|
600 |
+
|
601 |
+
.btn-default:focus,
|
602 |
+
.btn-default.focus {
|
603 |
+
border-color: #8c8c8c;
|
604 |
+
color: #333;
|
605 |
+
background-color: #e6e6e6;
|
606 |
+
}
|
607 |
+
|
608 |
+
.btn-default:hover {
|
609 |
+
border-color: #adadad;
|
610 |
+
color: #333;
|
611 |
+
background-color: #e6e6e6;
|
612 |
+
}
|
613 |
+
|
614 |
+
.btn-default:active,
|
615 |
+
.btn-default.active,
|
616 |
+
.open > .dropdown-toggle.btn-default {
|
617 |
+
border-color: #adadad;
|
618 |
+
color: #333;
|
619 |
+
background-color: #e6e6e6;
|
620 |
+
}
|
621 |
+
|
622 |
+
.btn-default:active:hover,
|
623 |
+
.btn-default.active:hover,
|
624 |
+
.open > .dropdown-toggle.btn-default:hover,
|
625 |
+
.btn-default:active:focus,
|
626 |
+
.btn-default.active:focus,
|
627 |
+
.open > .dropdown-toggle.btn-default:focus,
|
628 |
+
.btn-default:active.focus,
|
629 |
+
.btn-default.active.focus,
|
630 |
+
.open > .dropdown-toggle.btn-default.focus {
|
631 |
+
border-color: #8c8c8c;
|
632 |
+
color: #333;
|
633 |
+
background-color: #d4d4d4;
|
634 |
+
}
|
635 |
+
|
636 |
+
.btn-default:active,
|
637 |
+
.btn-default.active,
|
638 |
+
.open > .dropdown-toggle.btn-default {
|
639 |
+
background-image: none;
|
640 |
+
}
|
641 |
+
|
642 |
+
.btn-default.disabled:hover,
|
643 |
+
.btn-default[disabled]:hover,
|
644 |
+
fieldset[disabled] .btn-default:hover,
|
645 |
+
.btn-default.disabled:focus,
|
646 |
+
.btn-default[disabled]:focus,
|
647 |
+
fieldset[disabled] .btn-default:focus,
|
648 |
+
.btn-default.disabled.focus,
|
649 |
+
.btn-default[disabled].focus,
|
650 |
+
fieldset[disabled] .btn-default.focus {
|
651 |
+
border-color: #ccc;
|
652 |
+
background-color: #fff;
|
653 |
+
}
|
654 |
+
|
655 |
+
.btn-default .badge {
|
656 |
+
color: #fff;
|
657 |
+
background-color: #333;
|
658 |
+
}
|
659 |
+
|
660 |
+
.btn-primary {
|
661 |
+
border-color: #2e6da4;
|
662 |
+
color: #fff;
|
663 |
+
background-color: #337ab7;
|
664 |
+
}
|
665 |
+
|
666 |
+
.btn-primary:focus,
|
667 |
+
.btn-primary.focus {
|
668 |
+
border-color: #122b40;
|
669 |
+
color: #fff;
|
670 |
+
background-color: #286090;
|
671 |
+
}
|
672 |
+
|
673 |
+
.btn-primary:hover {
|
674 |
+
border-color: #204d74;
|
675 |
+
color: #fff;
|
676 |
+
background-color: #286090;
|
677 |
+
}
|
678 |
+
|
679 |
+
.btn-primary:active,
|
680 |
+
.btn-primary.active,
|
681 |
+
.open > .dropdown-toggle.btn-primary {
|
682 |
+
border-color: #204d74;
|
683 |
+
color: #fff;
|
684 |
+
background-color: #286090;
|
685 |
+
}
|
686 |
+
|
687 |
+
.btn-primary:active:hover,
|
688 |
+
.btn-primary.active:hover,
|
689 |
+
.open > .dropdown-toggle.btn-primary:hover,
|
690 |
+
.btn-primary:active:focus,
|
691 |
+
.btn-primary.active:focus,
|
692 |
+
.open > .dropdown-toggle.btn-primary:focus,
|
693 |
+
.btn-primary:active.focus,
|
694 |
+
.btn-primary.active.focus,
|
695 |
+
.open > .dropdown-toggle.btn-primary.focus {
|
696 |
+
border-color: #122b40;
|
697 |
+
color: #fff;
|
698 |
+
background-color: #204d74;
|
699 |
+
}
|
700 |
+
|
701 |
+
.btn-primary:active,
|
702 |
+
.btn-primary.active,
|
703 |
+
.open > .dropdown-toggle.btn-primary {
|
704 |
+
background-image: none;
|
705 |
+
}
|
706 |
+
|
707 |
+
.btn-primary.disabled:hover,
|
708 |
+
.btn-primary[disabled]:hover,
|
709 |
+
fieldset[disabled] .btn-primary:hover,
|
710 |
+
.btn-primary.disabled:focus,
|
711 |
+
.btn-primary[disabled]:focus,
|
712 |
+
fieldset[disabled] .btn-primary:focus,
|
713 |
+
.btn-primary.disabled.focus,
|
714 |
+
.btn-primary[disabled].focus,
|
715 |
+
fieldset[disabled] .btn-primary.focus {
|
716 |
+
border-color: #2e6da4;
|
717 |
+
background-color: #337ab7;
|
718 |
+
}
|
719 |
+
|
720 |
+
.btn-primary .badge {
|
721 |
+
color: #337ab7;
|
722 |
+
background-color: #fff;
|
723 |
+
}
|
724 |
+
|
725 |
+
.btn-success {
|
726 |
+
border-color: #4cae4c;
|
727 |
+
color: #fff;
|
728 |
+
background-color: #5cb85c;
|
729 |
+
}
|
730 |
+
|
731 |
+
.btn-success:focus,
|
732 |
+
.btn-success.focus {
|
733 |
+
border-color: #255625;
|
734 |
+
color: #fff;
|
735 |
+
background-color: #449d44;
|
736 |
+
}
|
737 |
+
|
738 |
+
.btn-success:hover {
|
739 |
+
border-color: #398439;
|
740 |
+
color: #fff;
|
741 |
+
background-color: #449d44;
|
742 |
+
}
|
743 |
+
|
744 |
+
.btn-success:active,
|
745 |
+
.btn-success.active,
|
746 |
+
.open > .dropdown-toggle.btn-success {
|
747 |
+
border-color: #398439;
|
748 |
+
color: #fff;
|
749 |
+
background-color: #449d44;
|
750 |
+
}
|
751 |
+
|
752 |
+
.btn-success:active:hover,
|
753 |
+
.btn-success.active:hover,
|
754 |
+
.open > .dropdown-toggle.btn-success:hover,
|
755 |
+
.btn-success:active:focus,
|
756 |
+
.btn-success.active:focus,
|
757 |
+
.open > .dropdown-toggle.btn-success:focus,
|
758 |
+
.btn-success:active.focus,
|
759 |
+
.btn-success.active.focus,
|
760 |
+
.open > .dropdown-toggle.btn-success.focus {
|
761 |
+
border-color: #255625;
|
762 |
+
color: #fff;
|
763 |
+
background-color: #398439;
|
764 |
+
}
|
765 |
+
|
766 |
+
.btn-success:active,
|
767 |
+
.btn-success.active,
|
768 |
+
.open > .dropdown-toggle.btn-success {
|
769 |
+
background-image: none;
|
770 |
+
}
|
771 |
+
|
772 |
+
.btn-success.disabled:hover,
|
773 |
+
.btn-success[disabled]:hover,
|
774 |
+
fieldset[disabled] .btn-success:hover,
|
775 |
+
.btn-success.disabled:focus,
|
776 |
+
.btn-success[disabled]:focus,
|
777 |
+
fieldset[disabled] .btn-success:focus,
|
778 |
+
.btn-success.disabled.focus,
|
779 |
+
.btn-success[disabled].focus,
|
780 |
+
fieldset[disabled] .btn-success.focus {
|
781 |
+
border-color: #4cae4c;
|
782 |
+
background-color: #5cb85c;
|
783 |
+
}
|
784 |
+
|
785 |
+
.btn-success .badge {
|
786 |
+
color: #5cb85c;
|
787 |
+
background-color: #fff;
|
788 |
+
}
|
789 |
+
|
790 |
+
.btn-info {
|
791 |
+
border-color: #46b8da;
|
792 |
+
color: #fff;
|
793 |
+
background-color: #5bc0de;
|
794 |
+
}
|
795 |
+
|
796 |
+
.btn-info:focus,
|
797 |
+
.btn-info.focus {
|
798 |
+
border-color: #1b6d85;
|
799 |
+
color: #fff;
|
800 |
+
background-color: #31b0d5;
|
801 |
+
}
|
802 |
+
|
803 |
+
.btn-info:hover {
|
804 |
+
border-color: #269abc;
|
805 |
+
color: #fff;
|
806 |
+
background-color: #31b0d5;
|
807 |
+
}
|
808 |
+
|
809 |
+
.btn-info:active,
|
810 |
+
.btn-info.active,
|
811 |
+
.open > .dropdown-toggle.btn-info {
|
812 |
+
border-color: #269abc;
|
813 |
+
color: #fff;
|
814 |
+
background-color: #31b0d5;
|
815 |
+
}
|
816 |
+
|
817 |
+
.btn-info:active:hover,
|
818 |
+
.btn-info.active:hover,
|
819 |
+
.open > .dropdown-toggle.btn-info:hover,
|
820 |
+
.btn-info:active:focus,
|
821 |
+
.btn-info.active:focus,
|
822 |
+
.open > .dropdown-toggle.btn-info:focus,
|
823 |
+
.btn-info:active.focus,
|
824 |
+
.btn-info.active.focus,
|
825 |
+
.open > .dropdown-toggle.btn-info.focus {
|
826 |
+
border-color: #1b6d85;
|
827 |
+
color: #fff;
|
828 |
+
background-color: #269abc;
|
829 |
+
}
|
830 |
+
|
831 |
+
.btn-info:active,
|
832 |
+
.btn-info.active,
|
833 |
+
.open > .dropdown-toggle.btn-info {
|
834 |
+
background-image: none;
|
835 |
+
}
|
836 |
+
|
837 |
+
.btn-info.disabled:hover,
|
838 |
+
.btn-info[disabled]:hover,
|
839 |
+
fieldset[disabled] .btn-info:hover,
|
840 |
+
.btn-info.disabled:focus,
|
841 |
+
.btn-info[disabled]:focus,
|
842 |
+
fieldset[disabled] .btn-info:focus,
|
843 |
+
.btn-info.disabled.focus,
|
844 |
+
.btn-info[disabled].focus,
|
845 |
+
fieldset[disabled] .btn-info.focus {
|
846 |
+
border-color: #46b8da;
|
847 |
+
background-color: #5bc0de;
|
848 |
+
}
|
849 |
+
|
850 |
+
.btn-info .badge {
|
851 |
+
color: #5bc0de;
|
852 |
+
background-color: #fff;
|
853 |
+
}
|
854 |
+
|
855 |
+
.btn-warning {
|
856 |
+
border-color: #eea236;
|
857 |
+
color: #fff;
|
858 |
+
background-color: #f0ad4e;
|
859 |
+
}
|
860 |
+
|
861 |
+
.btn-warning:focus,
|
862 |
+
.btn-warning.focus {
|
863 |
+
border-color: #985f0d;
|
864 |
+
color: #fff;
|
865 |
+
background-color: #ec971f;
|
866 |
+
}
|
867 |
+
|
868 |
+
.btn-warning:hover {
|
869 |
+
border-color: #d58512;
|
870 |
+
color: #fff;
|
871 |
+
background-color: #ec971f;
|
872 |
+
}
|
873 |
+
|
874 |
+
.btn-warning:active,
|
875 |
+
.btn-warning.active,
|
876 |
+
.open > .dropdown-toggle.btn-warning {
|
877 |
+
border-color: #d58512;
|
878 |
+
color: #fff;
|
879 |
+
background-color: #ec971f;
|
880 |
+
}
|
881 |
+
|
882 |
+
.btn-warning:active:hover,
|
883 |
+
.btn-warning.active:hover,
|
884 |
+
.open > .dropdown-toggle.btn-warning:hover,
|
885 |
+
.btn-warning:active:focus,
|
886 |
+
.btn-warning.active:focus,
|
887 |
+
.open > .dropdown-toggle.btn-warning:focus,
|
888 |
+
.btn-warning:active.focus,
|
889 |
+
.btn-warning.active.focus,
|
890 |
+
.open > .dropdown-toggle.btn-warning.focus {
|
891 |
+
border-color: #985f0d;
|
892 |
+
color: #fff;
|
893 |
+
background-color: #d58512;
|
894 |
+
}
|
895 |
+
|
896 |
+
.btn-warning:active,
|
897 |
+
.btn-warning.active,
|
898 |
+
.open > .dropdown-toggle.btn-warning {
|
899 |
+
background-image: none;
|
900 |
+
}
|
901 |
+
|
902 |
+
.btn-warning.disabled:hover,
|
903 |
+
.btn-warning[disabled]:hover,
|
904 |
+
fieldset[disabled] .btn-warning:hover,
|
905 |
+
.btn-warning.disabled:focus,
|
906 |
+
.btn-warning[disabled]:focus,
|
907 |
+
fieldset[disabled] .btn-warning:focus,
|
908 |
+
.btn-warning.disabled.focus,
|
909 |
+
.btn-warning[disabled].focus,
|
910 |
+
fieldset[disabled] .btn-warning.focus {
|
911 |
+
border-color: #eea236;
|
912 |
+
background-color: #f0ad4e;
|
913 |
+
}
|
914 |
+
|
915 |
+
.btn-warning .badge {
|
916 |
+
color: #f0ad4e;
|
917 |
+
background-color: #fff;
|
918 |
+
}
|
919 |
+
|
920 |
+
.btn-danger {
|
921 |
+
border-color: #d43f3a;
|
922 |
+
color: #fff;
|
923 |
+
background-color: #d9534f;
|
924 |
+
}
|
925 |
+
|
926 |
+
.btn-danger:focus,
|
927 |
+
.btn-danger.focus {
|
928 |
+
border-color: #761c19;
|
929 |
+
color: #fff;
|
930 |
+
background-color: #c9302c;
|
931 |
+
}
|
932 |
+
|
933 |
+
.btn-danger:hover {
|
934 |
+
border-color: #ac2925;
|
935 |
+
color: #fff;
|
936 |
+
background-color: #c9302c;
|
937 |
+
}
|
938 |
+
|
939 |
+
.btn-danger:active,
|
940 |
+
.btn-danger.active,
|
941 |
+
.open > .dropdown-toggle.btn-danger {
|
942 |
+
border-color: #ac2925;
|
943 |
+
color: #fff;
|
944 |
+
background-color: #c9302c;
|
945 |
+
}
|
946 |
+
|
947 |
+
.btn-danger:active:hover,
|
948 |
+
.btn-danger.active:hover,
|
949 |
+
.open > .dropdown-toggle.btn-danger:hover,
|
950 |
+
.btn-danger:active:focus,
|
951 |
+
.btn-danger.active:focus,
|
952 |
+
.open > .dropdown-toggle.btn-danger:focus,
|
953 |
+
.btn-danger:active.focus,
|
954 |
+
.btn-danger.active.focus,
|
955 |
+
.open > .dropdown-toggle.btn-danger.focus {
|
956 |
+
border-color: #761c19;
|
957 |
+
color: #fff;
|
958 |
+
background-color: #ac2925;
|
959 |
+
}
|
960 |
+
|
961 |
+
.btn-danger:active,
|
962 |
+
.btn-danger.active,
|
963 |
+
.open > .dropdown-toggle.btn-danger {
|
964 |
+
background-image: none;
|
965 |
+
}
|
966 |
+
|
967 |
+
.btn-danger.disabled:hover,
|
968 |
+
.btn-danger[disabled]:hover,
|
969 |
+
fieldset[disabled] .btn-danger:hover,
|
970 |
+
.btn-danger.disabled:focus,
|
971 |
+
.btn-danger[disabled]:focus,
|
972 |
+
fieldset[disabled] .btn-danger:focus,
|
973 |
+
.btn-danger.disabled.focus,
|
974 |
+
.btn-danger[disabled].focus,
|
975 |
+
fieldset[disabled] .btn-danger.focus {
|
976 |
+
border-color: #d43f3a;
|
977 |
+
background-color: #d9534f;
|
978 |
+
}
|
979 |
+
|
980 |
+
.btn-danger .badge {
|
981 |
+
color: #d9534f;
|
982 |
+
background-color: #fff;
|
983 |
+
}
|
984 |
+
|
985 |
+
.btn-link {
|
986 |
+
border-radius: 0;
|
987 |
+
color: #337ab7;
|
988 |
+
font-weight: normal;
|
989 |
+
}
|
990 |
+
|
991 |
+
.btn-link,
|
992 |
+
.btn-link:active,
|
993 |
+
.btn-link.active,
|
994 |
+
.btn-link[disabled],
|
995 |
+
fieldset[disabled] .btn-link {
|
996 |
+
background-color: transparent;
|
997 |
+
box-shadow: none;
|
998 |
+
}
|
999 |
+
|
1000 |
+
.btn-link,
|
1001 |
+
.btn-link:hover,
|
1002 |
+
.btn-link:focus,
|
1003 |
+
.btn-link:active {
|
1004 |
+
border-color: transparent;
|
1005 |
+
}
|
1006 |
+
|
1007 |
+
.btn-link:hover,
|
1008 |
+
.btn-link:focus {
|
1009 |
+
color: #23527c;
|
1010 |
+
background-color: transparent;
|
1011 |
+
text-decoration: underline;
|
1012 |
+
}
|
1013 |
+
|
1014 |
+
.btn-link[disabled]:hover,
|
1015 |
+
fieldset[disabled] .btn-link:hover,
|
1016 |
+
.btn-link[disabled]:focus,
|
1017 |
+
fieldset[disabled] .btn-link:focus {
|
1018 |
+
color: #777;
|
1019 |
+
text-decoration: none;
|
1020 |
+
}
|
1021 |
+
|
1022 |
+
.btn-lg,
|
1023 |
+
.btn-group-lg > .btn {
|
1024 |
+
padding: 10px 16px;
|
1025 |
+
border-radius: 6px;
|
1026 |
+
font-size: 18px;
|
1027 |
+
line-height: 1.3333333;
|
1028 |
+
}
|
1029 |
+
|
1030 |
+
.btn-sm,
|
1031 |
+
.btn-group-sm > .btn {
|
1032 |
+
padding: 5px 10px;
|
1033 |
+
border-radius: 3px;
|
1034 |
+
font-size: 12px;
|
1035 |
+
line-height: 1.5;
|
1036 |
+
}
|
1037 |
+
|
1038 |
+
.btn-xs,
|
1039 |
+
.btn-group-xs > .btn {
|
1040 |
+
padding: 1px 5px;
|
1041 |
+
border-radius: 3px;
|
1042 |
+
font-size: 12px;
|
1043 |
+
line-height: 1.5;
|
1044 |
+
}
|
1045 |
+
|
1046 |
+
.btn-block {
|
1047 |
+
display: block;
|
1048 |
+
width: 100%;
|
1049 |
+
}
|
1050 |
+
|
1051 |
+
.btn-block + .btn-block {
|
1052 |
+
margin-top: 5px;
|
1053 |
+
}
|
1054 |
+
|
1055 |
+
input[type="submit"].btn-block,
|
1056 |
+
input[type="reset"].btn-block,
|
1057 |
+
input[type="button"].btn-block {
|
1058 |
+
width: 100%;
|
1059 |
+
}
|
1060 |
+
|
1061 |
+
.caret {
|
1062 |
+
display: inline-block;
|
1063 |
+
width: 0;
|
1064 |
+
height: 0;
|
1065 |
+
margin-left: 2px;
|
1066 |
+
border-top: 4px dashed;
|
1067 |
+
border-top: 4px solid \9;
|
1068 |
+
border-right: 4px solid transparent;
|
1069 |
+
border-left: 4px solid transparent;
|
1070 |
+
vertical-align: middle;
|
1071 |
+
}
|
1072 |
+
|
1073 |
+
.dropup,
|
1074 |
+
.dropdown {
|
1075 |
+
position: relative;
|
1076 |
+
}
|
1077 |
+
|
1078 |
+
.dropdown-toggle:focus {
|
1079 |
+
outline: 0;
|
1080 |
+
}
|
1081 |
+
|
1082 |
+
.dropdown-menu {
|
1083 |
+
display: none;
|
1084 |
+
float: left;
|
1085 |
+
position: absolute;
|
1086 |
+
z-index: 1000;
|
1087 |
+
top: 40px;
|
1088 |
+
left: 0;
|
1089 |
+
min-width: 160px;
|
1090 |
+
/* fallback if 100% not supported */
|
1091 |
+
min-width: 100%;
|
1092 |
+
margin: 2px 0 0;
|
1093 |
+
padding: 5px 0;
|
1094 |
+
border: 1px solid #ccc;
|
1095 |
+
border: 1px solid rgba(0, 0, 0, 0.15);
|
1096 |
+
border-radius: 4px;
|
1097 |
+
background-color: #fff;
|
1098 |
+
background-clip: padding-box;
|
1099 |
+
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
|
1100 |
+
font-size: 14px;
|
1101 |
+
text-align: left;
|
1102 |
+
list-style: none;
|
1103 |
+
}
|
1104 |
+
|
1105 |
+
.dropdown-menu.pull-right {
|
1106 |
+
right: 0;
|
1107 |
+
left: auto;
|
1108 |
+
}
|
1109 |
+
|
1110 |
+
.dropdown-menu .divider {
|
1111 |
+
overflow: hidden;
|
1112 |
+
height: 1px;
|
1113 |
+
margin: 9px 0;
|
1114 |
+
background-color: #e5e5e5;
|
1115 |
+
}
|
1116 |
+
|
1117 |
+
.dropdown-menu > li > a {
|
1118 |
+
display: block;
|
1119 |
+
clear: both;
|
1120 |
+
padding: 3px 20px;
|
1121 |
+
color: #333;
|
1122 |
+
font-weight: normal;
|
1123 |
+
line-height: 1.42857143;
|
1124 |
+
white-space: nowrap;
|
1125 |
+
}
|
1126 |
+
|
1127 |
+
.dropdown-menu > li > a:hover,
|
1128 |
+
.dropdown-menu > li > a:focus {
|
1129 |
+
color: #262626;
|
1130 |
+
background-color: #f5f5f5;
|
1131 |
+
text-decoration: none;
|
1132 |
+
}
|
1133 |
+
|
1134 |
+
.dropdown-menu > .active > a,
|
1135 |
+
.dropdown-menu > .active > a:hover,
|
1136 |
+
.dropdown-menu > .active > a:focus {
|
1137 |
+
outline: 0;
|
1138 |
+
color: #fff;
|
1139 |
+
background-color: #337ab7;
|
1140 |
+
text-decoration: none;
|
1141 |
+
}
|
1142 |
+
|
1143 |
+
.dropdown-menu > .disabled > a,
|
1144 |
+
.dropdown-menu > .disabled > a:hover,
|
1145 |
+
.dropdown-menu > .disabled > a:focus {
|
1146 |
+
color: #777;
|
1147 |
+
}
|
1148 |
+
|
1149 |
+
.dropdown-menu > .disabled > a:hover,
|
1150 |
+
.dropdown-menu > .disabled > a:focus {
|
1151 |
+
background-color: transparent;
|
1152 |
+
background-image: none;
|
1153 |
+
text-decoration: none;
|
1154 |
+
cursor: not-allowed;
|
1155 |
+
|
1156 |
+
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
1157 |
+
}
|
1158 |
+
|
1159 |
+
.open > .dropdown-menu {
|
1160 |
+
display: block;
|
1161 |
+
z-index: 99999999;
|
1162 |
+
}
|
1163 |
+
|
1164 |
+
.open > a {
|
1165 |
+
outline: 0;
|
1166 |
+
}
|
1167 |
+
|
1168 |
+
.dropdown-menu-right {
|
1169 |
+
right: 0;
|
1170 |
+
left: auto;
|
1171 |
+
}
|
1172 |
+
|
1173 |
+
.dropdown-menu-left {
|
1174 |
+
right: auto;
|
1175 |
+
left: 0;
|
1176 |
+
}
|
1177 |
+
|
1178 |
+
.dropdown-header {
|
1179 |
+
display: block;
|
1180 |
+
padding: 3px 20px;
|
1181 |
+
color: #777;
|
1182 |
+
font-size: 12px;
|
1183 |
+
line-height: 1.42857143;
|
1184 |
+
white-space: nowrap;
|
1185 |
+
}
|
1186 |
+
|
1187 |
+
.dropdown-backdrop {
|
1188 |
+
position: fixed;
|
1189 |
+
z-index: 990;
|
1190 |
+
top: 0;
|
1191 |
+
right: 0;
|
1192 |
+
bottom: 0;
|
1193 |
+
left: 0;
|
1194 |
+
}
|
1195 |
+
|
1196 |
+
.pull-right > .dropdown-menu {
|
1197 |
+
right: 0;
|
1198 |
+
left: auto;
|
1199 |
+
}
|
1200 |
+
|
1201 |
+
.dropup .caret,
|
1202 |
+
.navbar-fixed-bottom .dropdown .caret {
|
1203 |
+
border-top: 0;
|
1204 |
+
border-bottom: 4px dashed;
|
1205 |
+
border-bottom: 4px solid \9;
|
1206 |
+
content: "";
|
1207 |
+
}
|
1208 |
+
|
1209 |
+
.dropup .dropdown-menu,
|
1210 |
+
.navbar-fixed-bottom .dropdown .dropdown-menu {
|
1211 |
+
top: auto;
|
1212 |
+
bottom: 100%;
|
1213 |
+
margin-bottom: 2px;
|
1214 |
+
}
|
1215 |
+
|
1216 |
+
@media (min-width: 768px) {
|
1217 |
+
.navbar-right .dropdown-menu {
|
1218 |
+
right: 0;
|
1219 |
+
left: auto;
|
1220 |
+
}
|
1221 |
+
|
1222 |
+
.navbar-right .dropdown-menu-left {
|
1223 |
+
right: auto;
|
1224 |
+
left: 0;
|
1225 |
+
}
|
1226 |
+
}
|
1227 |
+
|
1228 |
+
.btn-group,
|
1229 |
+
.btn-group-vertical {
|
1230 |
+
display: inline-block;
|
1231 |
+
position: relative;
|
1232 |
+
vertical-align: middle;
|
1233 |
+
}
|
1234 |
+
|
1235 |
+
.btn-group > .btn,
|
1236 |
+
.btn-group-vertical > .btn {
|
1237 |
+
float: left;
|
1238 |
+
position: relative;
|
1239 |
+
}
|
1240 |
+
|
1241 |
+
.btn-group > .btn:hover,
|
1242 |
+
.btn-group-vertical > .btn:hover,
|
1243 |
+
.btn-group > .btn:focus,
|
1244 |
+
.btn-group-vertical > .btn:focus,
|
1245 |
+
.btn-group > .btn:active,
|
1246 |
+
.btn-group-vertical > .btn:active,
|
1247 |
+
.btn-group > .btn.active,
|
1248 |
+
.btn-group-vertical > .btn.active {
|
1249 |
+
z-index: 2;
|
1250 |
+
}
|
1251 |
+
|
1252 |
+
.btn-group .btn + .btn,
|
1253 |
+
.btn-group .btn + .btn-group,
|
1254 |
+
.btn-group .btn-group + .btn,
|
1255 |
+
.btn-group .btn-group + .btn-group {
|
1256 |
+
margin-left: -1px;
|
1257 |
+
}
|
1258 |
+
|
1259 |
+
.btn-toolbar {
|
1260 |
+
margin-left: -5px;
|
1261 |
+
}
|
1262 |
+
|
1263 |
+
.btn-toolbar .btn,
|
1264 |
+
.btn-toolbar .btn-group,
|
1265 |
+
.btn-toolbar .input-group {
|
1266 |
+
float: left;
|
1267 |
+
}
|
1268 |
+
|
1269 |
+
.btn-toolbar > .btn,
|
1270 |
+
.btn-toolbar > .btn-group,
|
1271 |
+
.btn-toolbar > .input-group {
|
1272 |
+
margin-left: 5px;
|
1273 |
+
}
|
1274 |
+
|
1275 |
+
.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
|
1276 |
+
border-radius: 0;
|
1277 |
+
}
|
1278 |
+
|
1279 |
+
.btn-group > .btn:first-child {
|
1280 |
+
margin-left: 0;
|
1281 |
+
}
|
1282 |
+
|
1283 |
+
.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {
|
1284 |
+
border-top-right-radius: 0;
|
1285 |
+
border-bottom-right-radius: 0;
|
1286 |
+
}
|
1287 |
+
|
1288 |
+
.btn-group > .btn:last-child:not(:first-child),
|
1289 |
+
.btn-group > .dropdown-toggle:not(:first-child) {
|
1290 |
+
border-top-left-radius: 0;
|
1291 |
+
border-bottom-left-radius: 0;
|
1292 |
+
}
|
1293 |
+
|
1294 |
+
.btn-group > .btn-group {
|
1295 |
+
float: left;
|
1296 |
+
}
|
1297 |
+
|
1298 |
+
.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {
|
1299 |
+
border-radius: 0;
|
1300 |
+
}
|
1301 |
+
|
1302 |
+
.btn-group > .btn-group:first-child:not(:last-child) > .btn:last-child,
|
1303 |
+
.btn-group > .btn-group:first-child:not(:last-child) > .dropdown-toggle {
|
1304 |
+
border-top-right-radius: 0;
|
1305 |
+
border-bottom-right-radius: 0;
|
1306 |
+
}
|
1307 |
+
|
1308 |
+
.btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child {
|
1309 |
+
border-top-left-radius: 0;
|
1310 |
+
border-bottom-left-radius: 0;
|
1311 |
+
}
|
1312 |
+
|
1313 |
+
.btn-group .dropdown-toggle:active,
|
1314 |
+
.btn-group.open .dropdown-toggle {
|
1315 |
+
outline: 0;
|
1316 |
+
}
|
1317 |
+
|
1318 |
+
.btn-group > .btn + .dropdown-toggle {
|
1319 |
+
padding-right: 8px;
|
1320 |
+
padding-left: 8px;
|
1321 |
+
}
|
1322 |
+
|
1323 |
+
.btn-group > .btn-lg + .dropdown-toggle {
|
1324 |
+
padding-right: 12px;
|
1325 |
+
padding-left: 12px;
|
1326 |
+
}
|
1327 |
+
|
1328 |
+
.btn-group.open .dropdown-toggle {
|
1329 |
+
box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
|
1330 |
+
}
|
1331 |
+
|
1332 |
+
.btn-group.open .dropdown-toggle.btn-link {
|
1333 |
+
box-shadow: none;
|
1334 |
+
}
|
1335 |
+
|
1336 |
+
.btn .caret {
|
1337 |
+
margin-left: 0;
|
1338 |
+
}
|
1339 |
+
|
1340 |
+
.btn-lg .caret {
|
1341 |
+
border-width: 5px 5px 0;
|
1342 |
+
border-bottom-width: 0;
|
1343 |
+
}
|
1344 |
+
|
1345 |
+
.dropup .btn-lg .caret {
|
1346 |
+
border-width: 0 5px 5px;
|
1347 |
+
}
|
1348 |
+
|
1349 |
+
.btn-group-vertical > .btn,
|
1350 |
+
.btn-group-vertical > .btn-group,
|
1351 |
+
.btn-group-vertical > .btn-group > .btn {
|
1352 |
+
display: block;
|
1353 |
+
float: none;
|
1354 |
+
width: 100%;
|
1355 |
+
max-width: 100%;
|
1356 |
+
}
|
1357 |
+
|
1358 |
+
.btn-group-vertical > .btn-group > .btn {
|
1359 |
+
float: none;
|
1360 |
+
}
|
1361 |
+
|
1362 |
+
.btn-group-vertical > .btn + .btn,
|
1363 |
+
.btn-group-vertical > .btn + .btn-group,
|
1364 |
+
.btn-group-vertical > .btn-group + .btn,
|
1365 |
+
.btn-group-vertical > .btn-group + .btn-group {
|
1366 |
+
margin-top: -1px;
|
1367 |
+
margin-left: 0;
|
1368 |
+
}
|
1369 |
+
|
1370 |
+
.btn-group-vertical > .btn:not(:first-child):not(:last-child) {
|
1371 |
+
border-radius: 0;
|
1372 |
+
}
|
1373 |
+
|
1374 |
+
.btn-group-vertical > .btn:first-child:not(:last-child) {
|
1375 |
+
border-top-left-radius: 4px;
|
1376 |
+
border-top-right-radius: 4px;
|
1377 |
+
border-bottom-right-radius: 0;
|
1378 |
+
border-bottom-left-radius: 0;
|
1379 |
+
}
|
1380 |
+
|
1381 |
+
.btn-group-vertical > .btn:last-child:not(:first-child) {
|
1382 |
+
border-top-left-radius: 0;
|
1383 |
+
border-top-right-radius: 0;
|
1384 |
+
border-bottom-right-radius: 4px;
|
1385 |
+
border-bottom-left-radius: 4px;
|
1386 |
+
}
|
1387 |
+
|
1388 |
+
.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {
|
1389 |
+
border-radius: 0;
|
1390 |
+
}
|
1391 |
+
|
1392 |
+
.btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child,
|
1393 |
+
.btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle {
|
1394 |
+
border-bottom-right-radius: 0;
|
1395 |
+
border-bottom-left-radius: 0;
|
1396 |
+
}
|
1397 |
+
|
1398 |
+
.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {
|
1399 |
+
border-top-left-radius: 0;
|
1400 |
+
border-top-right-radius: 0;
|
1401 |
+
}
|
1402 |
+
|
1403 |
+
.btn-group-justified {
|
1404 |
+
display: table;
|
1405 |
+
width: 100%;
|
1406 |
+
table-layout: fixed;
|
1407 |
+
border-collapse: separate;
|
1408 |
+
}
|
1409 |
+
|
1410 |
+
.btn-group-justified > .btn,
|
1411 |
+
.btn-group-justified > .btn-group {
|
1412 |
+
display: table-cell;
|
1413 |
+
float: none;
|
1414 |
+
width: 1%;
|
1415 |
+
}
|
1416 |
+
|
1417 |
+
.btn-group-justified > .btn-group .btn {
|
1418 |
+
width: 100%;
|
1419 |
+
}
|
1420 |
+
|
1421 |
+
.btn-group-justified > .btn-group .dropdown-menu {
|
1422 |
+
left: auto;
|
1423 |
+
}
|
1424 |
+
|
1425 |
+
[data-toggle="buttons"] > .btn input[type="radio"],
|
1426 |
+
[data-toggle="buttons"] > .btn-group > .btn input[type="radio"],
|
1427 |
+
[data-toggle="buttons"] > .btn input[type="checkbox"],
|
1428 |
+
[data-toggle="buttons"] > .btn-group > .btn input[type="checkbox"] {
|
1429 |
+
clip: rect(0, 0, 0, 0);
|
1430 |
+
position: absolute;
|
1431 |
+
pointer-events: none;
|
1432 |
+
}
|
1433 |
+
|
1434 |
+
.input-group {
|
1435 |
+
display: table;
|
1436 |
+
position: relative;
|
1437 |
+
border-collapse: separate;
|
1438 |
+
}
|
1439 |
+
|
1440 |
+
.input-group[class*="col-"] {
|
1441 |
+
float: none;
|
1442 |
+
padding-right: 0;
|
1443 |
+
padding-left: 0;
|
1444 |
+
}
|
1445 |
+
|
1446 |
+
.input-group .form-control {
|
1447 |
+
float: left;
|
1448 |
+
position: relative;
|
1449 |
+
z-index: 2;
|
1450 |
+
width: 100%;
|
1451 |
+
margin-bottom: 0;
|
1452 |
+
}
|
1453 |
+
|
1454 |
+
.input-group .form-control:focus {
|
1455 |
+
z-index: 3;
|
1456 |
+
}
|
1457 |
+
|
1458 |
+
.input-group-lg > .form-control,
|
1459 |
+
.input-group-lg > .input-group-addon,
|
1460 |
+
.input-group-lg > .input-group-btn > .btn {
|
1461 |
+
height: 46px;
|
1462 |
+
padding: 10px 16px;
|
1463 |
+
border-radius: 6px;
|
1464 |
+
font-size: 18px;
|
1465 |
+
line-height: 1.3333333;
|
1466 |
+
}
|
1467 |
+
|
1468 |
+
select.input-group-lg > .form-control,
|
1469 |
+
select.input-group-lg > .input-group-addon,
|
1470 |
+
select.input-group-lg > .input-group-btn > .btn {
|
1471 |
+
height: 46px;
|
1472 |
+
line-height: 46px;
|
1473 |
+
}
|
1474 |
+
|
1475 |
+
textarea.input-group-lg > .form-control,
|
1476 |
+
textarea.input-group-lg > .input-group-addon,
|
1477 |
+
textarea.input-group-lg > .input-group-btn > .btn,
|
1478 |
+
select[multiple].input-group-lg > .form-control,
|
1479 |
+
select[multiple].input-group-lg > .input-group-addon,
|
1480 |
+
select[multiple].input-group-lg > .input-group-btn > .btn {
|
1481 |
+
height: auto;
|
1482 |
+
}
|
1483 |
+
|
1484 |
+
.input-group-sm > .form-control,
|
1485 |
+
.input-group-sm > .input-group-addon,
|
1486 |
+
.input-group-sm > .input-group-btn > .btn {
|
1487 |
+
height: 30px;
|
1488 |
+
padding: 5px 10px;
|
1489 |
+
border-radius: 3px;
|
1490 |
+
font-size: 12px;
|
1491 |
+
line-height: 1.5;
|
1492 |
+
}
|
1493 |
+
|
1494 |
+
select.input-group-sm > .form-control,
|
1495 |
+
select.input-group-sm > .input-group-addon,
|
1496 |
+
select.input-group-sm > .input-group-btn > .btn {
|
1497 |
+
height: 30px;
|
1498 |
+
line-height: 30px;
|
1499 |
+
}
|
1500 |
+
|
1501 |
+
textarea.input-group-sm > .form-control,
|
1502 |
+
textarea.input-group-sm > .input-group-addon,
|
1503 |
+
textarea.input-group-sm > .input-group-btn > .btn,
|
1504 |
+
select[multiple].input-group-sm > .form-control,
|
1505 |
+
select[multiple].input-group-sm > .input-group-addon,
|
1506 |
+
select[multiple].input-group-sm > .input-group-btn > .btn {
|
1507 |
+
height: auto;
|
1508 |
+
}
|
1509 |
+
|
1510 |
+
.input-group-addon,
|
1511 |
+
.input-group-btn,
|
1512 |
+
.input-group .form-control {
|
1513 |
+
display: table-cell;
|
1514 |
+
}
|
1515 |
+
|
1516 |
+
.input-group-addon:not(:first-child):not(:last-child),
|
1517 |
+
.input-group-btn:not(:first-child):not(:last-child),
|
1518 |
+
.input-group .form-control:not(:first-child):not(:last-child) {
|
1519 |
+
border-radius: 0;
|
1520 |
+
}
|
1521 |
+
|
1522 |
+
.input-group-addon,
|
1523 |
+
.input-group-btn {
|
1524 |
+
width: 1%;
|
1525 |
+
vertical-align: top;
|
1526 |
+
white-space: nowrap;
|
1527 |
+
}
|
1528 |
+
|
1529 |
+
.input-group-addon {
|
1530 |
+
padding: 6px 12px;
|
1531 |
+
border: 1px solid #ccc;
|
1532 |
+
border-radius: 4px;
|
1533 |
+
color: #555;
|
1534 |
+
background-color: #eee;
|
1535 |
+
font-size: 14px;
|
1536 |
+
font-weight: normal;
|
1537 |
+
line-height: 1;
|
1538 |
+
text-align: center;
|
1539 |
+
}
|
1540 |
+
|
1541 |
+
.input-group-addon.input-sm {
|
1542 |
+
padding: 5px 10px;
|
1543 |
+
border-radius: 3px;
|
1544 |
+
font-size: 12px;
|
1545 |
+
}
|
1546 |
+
|
1547 |
+
.input-group-addon.input-lg {
|
1548 |
+
padding: 10px 16px;
|
1549 |
+
border-radius: 6px;
|
1550 |
+
font-size: 18px;
|
1551 |
+
}
|
1552 |
+
|
1553 |
+
.input-group-addon input[type="radio"],
|
1554 |
+
.input-group-addon input[type="checkbox"] {
|
1555 |
+
margin-top: 0;
|
1556 |
+
}
|
1557 |
+
|
1558 |
+
.input-group .form-control:first-child,
|
1559 |
+
.input-group-addon:first-child,
|
1560 |
+
.input-group-btn:first-child > .btn,
|
1561 |
+
.input-group-btn:first-child > .btn-group > .btn,
|
1562 |
+
.input-group-btn:first-child > .dropdown-toggle,
|
1563 |
+
.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),
|
1564 |
+
.input-group-btn:last-child > .btn-group:not(:last-child) > .btn {
|
1565 |
+
border-top-right-radius: 0;
|
1566 |
+
border-bottom-right-radius: 0;
|
1567 |
+
}
|
1568 |
+
|
1569 |
+
.input-group-addon:first-child {
|
1570 |
+
border-right: 0;
|
1571 |
+
}
|
1572 |
+
|
1573 |
+
.input-group .form-control:last-child,
|
1574 |
+
.input-group-addon:last-child,
|
1575 |
+
.input-group-btn:last-child > .btn,
|
1576 |
+
.input-group-btn:last-child > .btn-group > .btn,
|
1577 |
+
.input-group-btn:last-child > .dropdown-toggle,
|
1578 |
+
.input-group-btn:first-child > .btn:not(:first-child),
|
1579 |
+
.input-group-btn:first-child > .btn-group:not(:first-child) > .btn {
|
1580 |
+
border-top-left-radius: 0;
|
1581 |
+
border-bottom-left-radius: 0;
|
1582 |
+
}
|
1583 |
+
|
1584 |
+
.input-group-addon:last-child {
|
1585 |
+
border-left: 0;
|
1586 |
+
}
|
1587 |
+
|
1588 |
+
.input-group-btn {
|
1589 |
+
position: relative;
|
1590 |
+
font-size: 0;
|
1591 |
+
white-space: nowrap;
|
1592 |
+
}
|
1593 |
+
|
1594 |
+
.input-group-btn > .btn {
|
1595 |
+
position: relative;
|
1596 |
+
}
|
1597 |
+
|
1598 |
+
.input-group-btn > .btn + .btn {
|
1599 |
+
margin-left: -1px;
|
1600 |
+
}
|
1601 |
+
|
1602 |
+
.input-group-btn > .btn:hover,
|
1603 |
+
.input-group-btn > .btn:focus,
|
1604 |
+
.input-group-btn > .btn:active {
|
1605 |
+
z-index: 2;
|
1606 |
+
}
|
1607 |
+
|
1608 |
+
.input-group-btn:first-child > .btn,
|
1609 |
+
.input-group-btn:first-child > .btn-group {
|
1610 |
+
margin-right: -1px;
|
1611 |
+
}
|
1612 |
+
|
1613 |
+
.input-group-btn:last-child > .btn,
|
1614 |
+
.input-group-btn:last-child > .btn-group {
|
1615 |
+
z-index: 2;
|
1616 |
+
margin-left: -1px;
|
1617 |
+
}
|
1618 |
+
|
1619 |
+
|
1620 |
+
.label_description,
|
1621 |
+
.form_item {
|
1622 |
+
margin-top: 8px;
|
1623 |
+
margin-bottom: 8px;
|
1624 |
+
}
|
1625 |
+
|
1626 |
+
.label_description h4 {
|
1627 |
+
text-align: center;
|
1628 |
+
text-transform: uppercase;
|
1629 |
+
}
|
1630 |
+
|
1631 |
+
a.dropdown-item,
|
1632 |
+
span.dropdown-item[disabled] {
|
1633 |
+
display: block;
|
1634 |
+
padding: 5px 8px;
|
1635 |
+
color: #f35b3f;
|
1636 |
+
text-align: center;
|
1637 |
+
text-decoration: none;
|
1638 |
+
}
|
1639 |
+
|
1640 |
+
span.dropdown-item[disabled] {
|
1641 |
+
color: #808080;
|
1642 |
+
}
|
1643 |
+
|
1644 |
+
a:hover.dropdown-item,
|
1645 |
+
a:focus.dropdown-item {
|
1646 |
+
color: #f89c8b;
|
1647 |
+
background-color: #f8f8f8;
|
1648 |
+
}
|
1649 |
+
|
1650 |
+
.btn.btn-add-fields {
|
1651 |
+
background-color: #099bb2;
|
1652 |
+
}
|
1653 |
+
|
1654 |
+
.btn.btn-add-fields:hover {
|
1655 |
+
background-color: #14b2cc;
|
1656 |
+
}
|
1657 |
+
|
1658 |
+
.btn.btn-remove-fields {
|
1659 |
+
color: #f35b3f;
|
1660 |
+
}
|
1661 |
+
|
1662 |
+
.btn.btn-remove-fields:hover {
|
1663 |
+
color: #f89c8b;
|
1664 |
+
}
|
1665 |
+
|
1666 |
+
.btn > span.dashicons {
|
1667 |
+
vertical-align: middle;
|
1668 |
+
}
|
1669 |
+
|
1670 |
+
.f1 {
|
1671 |
+
padding: 25px;
|
1672 |
+
border-radius: 4px;
|
1673 |
+
background: #fff;
|
1674 |
+
}
|
1675 |
+
|
1676 |
+
.f1 h3 {
|
1677 |
+
margin-top: 0;
|
1678 |
+
margin-bottom: 5px;
|
1679 |
+
text-transform: uppercase;
|
1680 |
+
}
|
1681 |
+
|
1682 |
+
.f1-steps {
|
1683 |
+
overflow: hidden;
|
1684 |
+
position: relative;
|
1685 |
+
margin-top: 20px;
|
1686 |
+
}
|
1687 |
+
|
1688 |
+
.f1-progress {
|
1689 |
+
position: absolute;
|
1690 |
+
top: 24px;
|
1691 |
+
left: 0;
|
1692 |
+
width: 100%;
|
1693 |
+
height: 1px;
|
1694 |
+
background: #ddd;
|
1695 |
+
}
|
1696 |
+
|
1697 |
+
.f1-progress-line {
|
1698 |
+
position: absolute;
|
1699 |
+
top: 0;
|
1700 |
+
left: 0;
|
1701 |
+
height: 1px;
|
1702 |
+
background: #f35b3f;
|
1703 |
+
}
|
1704 |
+
|
1705 |
+
.f1-step {
|
1706 |
+
display: inline-block;
|
1707 |
+
position: relative;
|
1708 |
+
width: calc(100%/3 - 10px);
|
1709 |
+
width: -webkit-calc(100%/3 - 10px);
|
1710 |
+
text-align: center;
|
1711 |
+
}
|
1712 |
+
|
1713 |
+
.f1-step-icon {
|
1714 |
+
display: inline-block;
|
1715 |
+
width: 40px;
|
1716 |
+
height: 40px;
|
1717 |
+
margin-top: 4px;
|
1718 |
+
border-radius: 50%;
|
1719 |
+
color: #fff;
|
1720 |
+
background: #ddd;
|
1721 |
+
font-size: 16px;
|
1722 |
+
line-height: 40px;
|
1723 |
+
}
|
1724 |
+
|
1725 |
+
.f1-step-icon span {
|
1726 |
+
display: inline-block;
|
1727 |
+
width: 18px;
|
1728 |
+
height: 18px;
|
1729 |
+
padding: 11px;
|
1730 |
+
font-size: 18px;
|
1731 |
+
}
|
1732 |
+
|
1733 |
+
.f1-step.activated .f1-step-icon span {
|
1734 |
+
width: 20px;
|
1735 |
+
height: 20px;
|
1736 |
+
margin-top: -2px;
|
1737 |
+
margin-left: -1px;
|
1738 |
+
padding: 12px;
|
1739 |
+
font-size: 20px;
|
1740 |
+
}
|
1741 |
+
|
1742 |
+
.f1-step.active .f1-step-icon span {
|
1743 |
+
width: 24px;
|
1744 |
+
height: 24px;
|
1745 |
+
padding: 12px;
|
1746 |
+
font-size: 24px;
|
1747 |
+
}
|
1748 |
+
|
1749 |
+
.f1-step.activated .f1-step-icon {
|
1750 |
+
border: 1px solid #f35b3f;
|
1751 |
+
color: #f35b3f;
|
1752 |
+
background: #fff;
|
1753 |
+
line-height: 48px;
|
1754 |
+
}
|
1755 |
+
|
1756 |
+
.f1-step.active .f1-step-icon {
|
1757 |
+
width: 48px;
|
1758 |
+
height: 48px;
|
1759 |
+
margin-top: 0;
|
1760 |
+
background: #f35b3f;
|
1761 |
+
font-size: 22px;
|
1762 |
+
line-height: 48px;
|
1763 |
+
}
|
1764 |
+
|
1765 |
+
.f1-step p {
|
1766 |
+
color: #ccc;
|
1767 |
+
}
|
1768 |
+
|
1769 |
+
.f1-step.activated p {
|
1770 |
+
color: #f35b3f;
|
1771 |
+
}
|
1772 |
+
|
1773 |
+
.f1-step.active p {
|
1774 |
+
color: #f35b3f;
|
1775 |
+
}
|
1776 |
+
|
1777 |
+
.f1 fieldset {
|
1778 |
+
display: none;
|
1779 |
+
text-align: left;
|
1780 |
+
}
|
1781 |
+
|
1782 |
+
.f1-buttons {
|
1783 |
+
text-align: right;
|
1784 |
+
}
|
1785 |
+
|
1786 |
+
.f1 .input-error {
|
1787 |
+
border-color: #f35b3f;
|
1788 |
+
}
|
1789 |
+
|
1790 |
+
input[type="text"],
|
1791 |
+
input[type="password"],
|
1792 |
+
textarea,
|
1793 |
+
textarea.form-control {
|
1794 |
+
width: 100%;
|
1795 |
+
height: 44px;
|
1796 |
+
margin: 0;
|
1797 |
+
padding: 0 20px;
|
1798 |
+
border: 1px solid #ddd;
|
1799 |
+
border-radius: 4px;
|
1800 |
+
color: #888;
|
1801 |
+
background: #fff;
|
1802 |
+
box-shadow: none;
|
1803 |
+
font-family: "Roboto", sans-serif;
|
1804 |
+
font-size: 16px;
|
1805 |
+
font-weight: 300;
|
1806 |
+
line-height: 44px;
|
1807 |
+
vertical-align: middle;
|
1808 |
+
-webkit-transition: all 0.3s;
|
1809 |
+
transition: all 0.3s;
|
1810 |
+
}
|
1811 |
+
|
1812 |
+
textarea,
|
1813 |
+
textarea.form-control {
|
1814 |
+
height: 90px;
|
1815 |
+
}
|
1816 |
+
|
1817 |
+
input[type="text"]:focus,
|
1818 |
+
input[type="password"]:focus,
|
1819 |
+
textarea:focus,
|
1820 |
+
textarea.form-control:focus {
|
1821 |
+
border: 1px solid #ccc;
|
1822 |
+
outline: 0;
|
1823 |
+
background: #fff;
|
1824 |
+
box-shadow: none;
|
1825 |
+
}
|
1826 |
+
|
1827 |
+
input[type="text"]:-moz-placeholder,
|
1828 |
+
input[type="password"]:-moz-placeholder,
|
1829 |
+
textarea:-moz-placeholder,
|
1830 |
+
textarea.form-control:-moz-placeholder {
|
1831 |
+
color: #888;
|
1832 |
+
}
|
1833 |
+
|
1834 |
+
input[type="text"]:-ms-input-placeholder,
|
1835 |
+
input[type="password"]:-ms-input-placeholder,
|
1836 |
+
textarea:-ms-input-placeholder,
|
1837 |
+
textarea.form-control:-ms-input-placeholder {
|
1838 |
+
color: #888;
|
1839 |
+
}
|
1840 |
+
|
1841 |
+
input[type="text"]::-webkit-input-placeholder,
|
1842 |
+
input[type="password"]::-webkit-input-placeholder,
|
1843 |
+
textarea::-webkit-input-placeholder,
|
1844 |
+
textarea.form-control::-webkit-input-placeholder {
|
1845 |
+
color: #888;
|
1846 |
+
}
|
1847 |
+
|
1848 |
+
label {
|
1849 |
+
font-weight: 300;
|
1850 |
+
}
|
1851 |
+
|
1852 |
+
button.btn {
|
1853 |
+
min-width: 105px;
|
1854 |
+
height: 44px;
|
1855 |
+
margin: 0;
|
1856 |
+
padding: 0 20px;
|
1857 |
+
border: 0;
|
1858 |
+
border-radius: 4px;
|
1859 |
+
color: #fff;
|
1860 |
+
box-shadow: none;
|
1861 |
+
text-shadow: none;
|
1862 |
+
font-family: "Roboto", sans-serif;
|
1863 |
+
font-size: 16px;
|
1864 |
+
font-weight: 300;
|
1865 |
+
line-height: 40px;
|
1866 |
+
vertical-align: middle;
|
1867 |
+
-webkit-transition: all 0.3s;
|
1868 |
+
transition: all 0.3s;
|
1869 |
+
}
|
1870 |
+
|
1871 |
+
button.btn:hover {
|
1872 |
+
opacity: 0.6;
|
1873 |
+
color: #fff;
|
1874 |
+
}
|
1875 |
+
|
1876 |
+
button.btn:active {
|
1877 |
+
outline: 0;
|
1878 |
+
opacity: 0.6;
|
1879 |
+
color: #fff;
|
1880 |
+
box-shadow: none;
|
1881 |
+
}
|
1882 |
+
|
1883 |
+
button.btn:focus,
|
1884 |
+
button.btn:active:focus,
|
1885 |
+
button.btn.active:focus {
|
1886 |
+
outline: 0;
|
1887 |
+
opacity: 0.6;
|
1888 |
+
color: #fff;
|
1889 |
+
}
|
1890 |
+
|
1891 |
+
button.btn.btn-next,
|
1892 |
+
button.btn.btn-next:focus,
|
1893 |
+
button.btn.btn-next:active:focus,
|
1894 |
+
button.btn.btn-next.active:focus {
|
1895 |
+
background: #f35b3f;
|
1896 |
+
}
|
1897 |
+
|
1898 |
+
button.btn.btn-submit,
|
1899 |
+
button.btn.btn-submit:focus,
|
1900 |
+
button.btn.btn-submit:active:focus,
|
1901 |
+
button.btn.btn-submit.active:focus {
|
1902 |
+
background: #f35b3f;
|
1903 |
+
}
|
1904 |
+
|
1905 |
+
button.btn.btn-previous,
|
1906 |
+
button.btn.btn-previous:focus,
|
1907 |
+
button.btn.btn-previous:active:focus,
|
1908 |
+
button.btn.btn-previous.active:focus {
|
1909 |
+
background: #bbb;
|
1910 |
+
}
|
1911 |
+
|
1912 |
+
button.btn.btn-submit.btn-activate,
|
1913 |
+
button.btn.btn-submit.btn-activate:focus,
|
1914 |
+
button.btn.btn-submit.btn-activate:active:focus,
|
1915 |
+
button.btn.btn-submit.btn-activate.active:focus {
|
1916 |
+
background: #8ce196;
|
1917 |
+
}
|
1918 |
+
|
1919 |
+
/*
|
1920 |
+
Toggle switches
|
1921 |
+
*/
|
1922 |
+
.feedzy-toggle {
|
1923 |
+
visibility: hidden;
|
1924 |
+
position: absolute;
|
1925 |
+
margin-left: -9999px;
|
1926 |
+
}
|
1927 |
+
|
1928 |
+
.feedzy-toggle + label {
|
1929 |
+
display: block;
|
1930 |
+
position: relative;
|
1931 |
+
outline: none;
|
1932 |
+
cursor: pointer;
|
1933 |
+
-webkit-user-select: none;
|
1934 |
+
-moz-user-select: none;
|
1935 |
+
-ms-user-select: none;
|
1936 |
+
user-select: none;
|
1937 |
+
}
|
1938 |
+
|
1939 |
+
input.feedzy-toggle-round + label {
|
1940 |
+
width: 60px;
|
1941 |
+
height: 22px;
|
1942 |
+
border-radius: 22px;
|
1943 |
+
background-color: #ddd;
|
1944 |
+
}
|
1945 |
+
|
1946 |
+
input.feedzy-toggle-round + label:before,
|
1947 |
+
input.feedzy-toggle-round + label:after {
|
1948 |
+
display: block;
|
1949 |
+
position: absolute;
|
1950 |
+
top: 1px;
|
1951 |
+
bottom: 1px;
|
1952 |
+
left: 1px;
|
1953 |
+
content: "";
|
1954 |
+
}
|
1955 |
+
|
1956 |
+
input.feedzy-toggle-round + label:before {
|
1957 |
+
right: 1px;
|
1958 |
+
border-radius: 15px;
|
1959 |
+
background-color: #f1f1f1;
|
1960 |
+
-webkit-transition: background 0.4s;
|
1961 |
+
transition: background 0.4s;
|
1962 |
+
}
|
1963 |
+
|
1964 |
+
input.feedzy-toggle-round + label:after {
|
1965 |
+
width: 23px;
|
1966 |
+
height: 23px;
|
1967 |
+
border-radius: 100%;
|
1968 |
+
background-color: #fff;
|
1969 |
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
|
1970 |
+
-webkit-transition: margin 0.4s;
|
1971 |
+
transition: margin 0.4s;
|
1972 |
+
}
|
1973 |
+
|
1974 |
+
input.feedzy-toggle-round:checked + label:before {
|
1975 |
+
background-color: #44cf6c;
|
1976 |
+
}
|
1977 |
+
|
1978 |
+
input.feedzy-toggle-round:checked + label:after {
|
1979 |
+
margin-left: 36px;
|
1980 |
+
}
|
1981 |
+
|
1982 |
+
div.feedzy-row > div.label_description,
|
1983 |
+
div.feedzy-row > div.feedzy-separator,
|
1984 |
+
div.feedzy-row > div.form_item {
|
1985 |
+
display: inline-block;
|
1986 |
+
width: 10%;
|
1987 |
+
vertical-align: middle;
|
1988 |
+
border-bottom: none !important;
|
1989 |
+
}
|
1990 |
+
|
1991 |
+
div.feedzy-row {
|
1992 |
+
border-bottom: 1px solid #efefef;
|
1993 |
+
min-height: 90px;
|
1994 |
+
}
|
1995 |
+
|
1996 |
+
div.feedzy-separator {
|
1997 |
+
font-size: 30px;
|
1998 |
+
}
|
1999 |
+
|
2000 |
+
div.feedzy-row > div.form_item {
|
2001 |
+
display: inline-table;
|
2002 |
+
}
|
2003 |
+
|
2004 |
+
div.feedzy-row > div.label_description,
|
2005 |
+
div.feedzy-row > div.form_item {
|
2006 |
+
width: 43%;
|
2007 |
+
}
|
2008 |
+
|
2009 |
+
.feedzy-inline {
|
2010 |
+
display: inline-block !important;
|
2011 |
+
}
|
2012 |
+
|
2013 |
+
/*
|
2014 |
+
!!! CAUTION -- Hides Core WordPress Post Elements
|
2015 |
+
*/
|
2016 |
+
|
2017 |
+
#poststuff #post-body.columns-2 {
|
2018 |
+
margin-right: 0;
|
2019 |
+
}
|
2020 |
+
|
2021 |
+
div#side-sortables {
|
2022 |
+
display: none;
|
2023 |
+
}
|
2024 |
+
|
2025 |
+
#titlediv .inside {
|
2026 |
+
display: none;
|
2027 |
+
}
|
2028 |
+
|
2029 |
+
div#advanced-sortables {
|
2030 |
+
display: none;
|
2031 |
+
}
|
2032 |
+
|
2033 |
+
div.feedzy-custom-right {
|
2034 |
+
text-indent: 5%;
|
2035 |
+
}
|
2036 |
+
|
2037 |
+
span.feedzy-spinner {
|
2038 |
+
float: none !important;
|
2039 |
+
}
|
2040 |
+
|
2041 |
+
|
2042 |
+
.only-pro,
|
2043 |
+
.only-pro input,
|
2044 |
+
.only-pro button,
|
2045 |
+
.only-pro textarea,
|
2046 |
+
.only-pro select {
|
2047 |
+
cursor: not-allowed !important;
|
2048 |
+
}
|
2049 |
+
|
2050 |
+
.only-pro .chosen-container,
|
2051 |
+
.only-pro .chosen-single {
|
2052 |
+
pointer-events: none;
|
2053 |
+
}
|
2054 |
+
|
2055 |
+
.only-pro > div {
|
2056 |
+
position: relative;
|
2057 |
+
}
|
2058 |
+
|
2059 |
+
.only-pro-content {
|
2060 |
+
position: absolute;
|
2061 |
+
top: 0;
|
2062 |
+
bottom: 0;
|
2063 |
+
left: 0;
|
2064 |
+
width: 100%;
|
2065 |
+
opacity: 0;
|
2066 |
+
background: rgba(253,253,253,0.9);
|
2067 |
+
transition: 0.5s ease;
|
2068 |
+
z-index: 99999;
|
2069 |
+
}
|
2070 |
+
|
2071 |
+
.only-pro:hover .only-pro-content {
|
2072 |
+
opacity: 1;
|
2073 |
+
}
|
2074 |
+
|
2075 |
+
.only-pro:hover input,
|
2076 |
+
.only-pro:hover label,
|
2077 |
+
.only-pro:hover button,
|
2078 |
+
.only-pro:hover textarea,
|
2079 |
+
.only-pro:hover select,
|
2080 |
+
.only-pro:hover button,
|
2081 |
+
.only-pro:hover .chosen-container,
|
2082 |
+
.only-pro:hover .chosen-single,
|
2083 |
+
.only-pro:hover select option {
|
2084 |
+
opacity: 0.3;
|
2085 |
+
}
|
2086 |
+
|
2087 |
+
.only-pro-container {
|
2088 |
+
display: table;
|
2089 |
+
width: 100%;
|
2090 |
+
height: 100%;
|
2091 |
+
}
|
2092 |
+
|
2093 |
+
.only-pro-inner {
|
2094 |
+
display: table-cell;
|
2095 |
+
vertical-align: middle;
|
2096 |
+
}
|
2097 |
+
|
2098 |
+
.only-pro-content p {
|
2099 |
+
margin: 0px 15px;
|
2100 |
+
padding: 15px;
|
2101 |
+
font-size: 14px;
|
2102 |
+
font-weight: 700;
|
2103 |
+
}
|
2104 |
+
|
2105 |
+
.only-pro-content a {
|
2106 |
+
display: inline-block;
|
2107 |
+
padding: 7px 12px;
|
2108 |
+
color: #fff;
|
2109 |
+
background: #ff595e;
|
2110 |
+
font-weight: 600;
|
2111 |
+
text-decoration: none;
|
2112 |
+
text-transform: uppercase;
|
2113 |
+
transition: 0.1s ease;
|
2114 |
+
}
|
2115 |
+
|
2116 |
+
.only-pro-content a:hover {
|
2117 |
+
background: #ce484c;
|
2118 |
+
}
|
2119 |
+
|
2120 |
+
.feedzy-highlight {
|
2121 |
+
background-color: #ccff00;
|
2122 |
+
padding: 1%;
|
2123 |
+
}
|
includes/views/import-metabox-edit.php
ADDED
@@ -0,0 +1,436 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* View for Import Post Type Meta Box Import Options
|
4 |
+
*
|
5 |
+
* @since 1.2.0
|
6 |
+
* @package feedzy-rss-feeds-pro
|
7 |
+
*/
|
8 |
+
?>
|
9 |
+
<div class="f1">
|
10 |
+
|
11 |
+
<h3><?php echo __( 'Import Setup Wizard', 'feedzy-rss-feeds' ); ?></h3>
|
12 |
+
<p><?php echo __( 'Follow the steps to setup an import rule.', 'feedzy-rss-feeds' ); ?></p>
|
13 |
+
<div class="f1-steps">
|
14 |
+
<div class="f1-progress">
|
15 |
+
<div class="f1-progress-line" data-now-value="16.66" data-number-of-steps="3" style="width: 16.66%;"></div>
|
16 |
+
</div>
|
17 |
+
<div class="f1-step active">
|
18 |
+
<div class="f1-step-icon"><span class="dashicons dashicons-rss"></span></div>
|
19 |
+
<p><?php echo __( 'Sources', 'feedzy-rss-feeds' ); ?></p>
|
20 |
+
</div>
|
21 |
+
<div class="f1-step">
|
22 |
+
<div class="f1-step-icon"><span class="dashicons dashicons-filter"></span></div>
|
23 |
+
<p><?php echo __( 'Filters', 'feedzy-rss-feeds' ); ?></p>
|
24 |
+
</div>
|
25 |
+
<div class="f1-step">
|
26 |
+
<div class="f1-step-icon"><span class="dashicons dashicons-randomize"></span></div>
|
27 |
+
<p><?php echo __( 'Assign', 'feedzy-rss-feeds' ); ?></p>
|
28 |
+
</div>
|
29 |
+
</div>
|
30 |
+
|
31 |
+
<fieldset>
|
32 |
+
<h4><?php echo __( 'Feed sources:', 'feedzy-rss-feeds' ); ?></h4>
|
33 |
+
<div class="form-group">
|
34 |
+
<label class="feedzy-sr-only"><?php echo __( 'Feedzy RSS Feed sources (URL\'s comma separated or Feed Categories slug)', 'feedzy-rss-feeds' ); ?></label>
|
35 |
+
</div>
|
36 |
+
<div class="form-group input-group">
|
37 |
+
<input type="text" name="feedzy_meta_data[source]" placeholder="<?php echo __( 'Source', 'feedzy-rss-feeds' ); ?>" class="form-control " value="<?php echo $source; ?>"/>
|
38 |
+
<div class="input-group-btn">
|
39 |
+
<?php
|
40 |
+
if ( isset( $feed_categories ) && ! empty( $feed_categories ) ) {
|
41 |
+
?>
|
42 |
+
<button type="button" class="btn btn-add-fields dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
43 |
+
<?php echo __( 'Add Feed Category', 'feedzy-rss-feeds' ); ?> <span class="dashicons dashicons-arrow-down-alt2"></span>
|
44 |
+
</button>
|
45 |
+
<div class="dropdown-menu dropdown-menu-right">
|
46 |
+
<?php
|
47 |
+
foreach ( $feed_categories as $category ) {
|
48 |
+
?>
|
49 |
+
<a class="dropdown-item source" href="#" data-field-name="source" data-field-tag="<?php echo $category->post_name; ?>"><?php echo $category->post_title; ?></a>
|
50 |
+
<?php
|
51 |
+
}
|
52 |
+
?>
|
53 |
+
</div>
|
54 |
+
<?php
|
55 |
+
} else {
|
56 |
+
?>
|
57 |
+
<button type="button" class=" disabled btn-add-fields btn " >
|
58 |
+
<?php echo __( 'No feed categories available', 'feedzy-rss-feeds' ); ?>
|
59 |
+
</button>
|
60 |
+
<?php
|
61 |
+
|
62 |
+
}
|
63 |
+
?>
|
64 |
+
</div>
|
65 |
+
</div>
|
66 |
+
<div class="f1-buttons">
|
67 |
+
<button type="button" class="btn btn-next"><?php echo __( 'Next', 'feedzy-rss-feeds' ); ?></button>
|
68 |
+
</div>
|
69 |
+
</fieldset>
|
70 |
+
|
71 |
+
<fieldset>
|
72 |
+
<h4><?php echo __( 'Feed filters:', 'feedzy-rss-feeds' ); ?></h4>
|
73 |
+
<div class="form-group <?php echo apply_filters( 'feedzy_upsell_class', '' ); ?>">
|
74 |
+
<?php echo apply_filters( 'feedzy_upsell_content', '' ); ?>
|
75 |
+
<label class="feedzy-sr-only"><?php echo __( 'Only display item if title contains specific keyword(s) (comma-separated list/case sensitive).', 'feedzy-rss-feeds' ); ?></label>
|
76 |
+
<input type="text" name="feedzy_meta_data[inc_key]" placeholder="<?php echo __( '(eg. news, sports etc.)', 'feedzy-rss-feeds' ); ?>" class="form-control" value="<?php echo $inc_key; ?>"/>
|
77 |
+
</div>
|
78 |
+
<div class="form-group <?php echo apply_filters( 'feedzy_upsell_class', '' ); ?>">
|
79 |
+
<?php echo apply_filters( 'feedzy_upsell_content', '' ); ?>
|
80 |
+
<label class="feedzy-sr-only"><?php echo __( 'Exclude items if title contains specific keyword(s) (comma-separated list/case sensitive).', 'feedzy-rss-feeds' ); ?></label>
|
81 |
+
<input type="text" name="feedzy_meta_data[exc_key]" placeholder="<?php echo __( '(eg. news, sports etc.)', 'feedzy-rss-feeds' ); ?>" class="form-control" value="<?php echo $exc_key; ?>"/>
|
82 |
+
</div>
|
83 |
+
<div class="form-group">
|
84 |
+
<label class="feedzy-sr-only"><?php _e( 'How many feed items to process from the feed?', 'feedzy-rss-feeds' ); ?></label>
|
85 |
+
<select id="feedzy_item_limit" class="form-control feedzy-chosen" name="feedzy_meta_data[import_feed_limit]" >
|
86 |
+
<?php
|
87 |
+
$limits = apply_filters( 'feedzy_items_limit', range( 10, 100, 10 ), $post );
|
88 |
+
$limits[] = 9999;
|
89 |
+
if ( '' === $import_feed_limit ) {
|
90 |
+
$import_feed_limit = 20;
|
91 |
+
}
|
92 |
+
foreach ( $limits as $v ) {
|
93 |
+
$selected = '';
|
94 |
+
// phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison
|
95 |
+
if ( $v == $import_feed_limit ) {
|
96 |
+
$selected = 'selected';
|
97 |
+
}
|
98 |
+
$display = $v;
|
99 |
+
if ( $v === 9999 ) {
|
100 |
+
$display = __( 'All (check that your server configuration can support this)', 'feedzy-rss-feeds' );
|
101 |
+
if ( ! feedzy_is_pro() ) {
|
102 |
+
$display = __( 'More options available in PRO.', 'feedzy-rss-feeds' );
|
103 |
+
$selected = 'disabled';
|
104 |
+
$v = '';
|
105 |
+
}
|
106 |
+
}
|
107 |
+
?>
|
108 |
+
<option value="<?php echo $v; ?>" <?php echo $selected; ?>><?php echo $display; ?></option>
|
109 |
+
<?php
|
110 |
+
}
|
111 |
+
?>
|
112 |
+
</select>
|
113 |
+
</div>
|
114 |
+
<div class="form-group <?php echo apply_filters( 'feedzy_upsell_class', '' ); ?>">
|
115 |
+
<?php echo apply_filters( 'feedzy_upsell_content', '' ); ?>
|
116 |
+
<label class="feedzy-sr-only"><?php _e( 'Delete the posts created for this import after how many days?', 'feedzy-rss-feeds' ); ?></label>
|
117 |
+
<select id="feedzy_delete_limit" class="form-control feedzy-chosen" name="feedzy_meta_data[import_feed_delete_days]" >
|
118 |
+
<?php
|
119 |
+
// 0 is never delete.
|
120 |
+
$days = apply_filters( 'feedzy_items_delete_days', range( 0, 100, 1 ), $post );
|
121 |
+
if ( '' === $import_feed_delete_days ) {
|
122 |
+
$import_feed_delete_days = 0;
|
123 |
+
}
|
124 |
+
foreach ( $days as $v ) {
|
125 |
+
$selected = '';
|
126 |
+
if ( $v === $import_feed_delete_days ) {
|
127 |
+
$selected = 'selected';
|
128 |
+
}
|
129 |
+
$display = $v;
|
130 |
+
if ( $v === 0 ) {
|
131 |
+
$display = __( 'Never', 'feedzy-rss-feeds' );
|
132 |
+
}
|
133 |
+
?>
|
134 |
+
<option value="<?php echo $v; ?>" <?php echo $selected; ?>><?php echo $display; ?></option>
|
135 |
+
<?php
|
136 |
+
}
|
137 |
+
?>
|
138 |
+
</select>
|
139 |
+
</div>
|
140 |
+
<div class="f1-buttons">
|
141 |
+
<button type="button" class="btn btn-previous"><?php echo __( 'Previous', 'feedzy-rss-feeds' ); ?></button>
|
142 |
+
<button type="button" class="btn btn-next"><?php echo __( 'Next', 'feedzy-rss-feeds' ); ?></button>
|
143 |
+
</div>
|
144 |
+
</fieldset>
|
145 |
+
|
146 |
+
<fieldset>
|
147 |
+
<h4><?php echo __( 'Feed assign:', 'feedzy-rss-feeds' ); ?></h4>
|
148 |
+
<p><?php echo __( 'Map post elements to custom post from feed imports.', 'feedzy-rss-feeds' ); ?></p>
|
149 |
+
|
150 |
+
<div class="feedzy-rows">
|
151 |
+
<div class="feedzy-row">
|
152 |
+
<div class="label_description">
|
153 |
+
<h4><?php echo __( 'Post Element', 'feedzy-rss-feeds' ); ?></h4>
|
154 |
+
</div>
|
155 |
+
<div class="feedzy-separator"></div>
|
156 |
+
<div class="label_description">
|
157 |
+
<h4><?php echo __( 'Element Value', 'feedzy-rss-feeds' ); ?></h4>
|
158 |
+
</div>
|
159 |
+
</div>
|
160 |
+
<div class="feedzy-row">
|
161 |
+
<div class="label_description">
|
162 |
+
<label class="feedzy-sr-only" for="f1-post-type"><?php echo __( 'Post Type', 'feedzy-rss-feeds' ); ?></label><br/>
|
163 |
+
<small><?php _e( 'The post type you want to use for the generated post.', 'feedzy-rss-feeds' ); ?></small>
|
164 |
+
</div>
|
165 |
+
<div class="feedzy-separator dashicons dashicons-leftright"></div>
|
166 |
+
<div class="form-group input-group form_item">
|
167 |
+
<select id="feedzy_post_type" class="form-control feedzy-chosen" name="feedzy_meta_data[import_post_type]" data-tax="<?php echo $import_post_term; ?>" >
|
168 |
+
<?php
|
169 |
+
foreach ( $post_types as $post_type ) {
|
170 |
+
$selected = '';
|
171 |
+
if ( $post_type === $import_post_type ) {
|
172 |
+
$selected = 'selected';
|
173 |
+
}
|
174 |
+
?>
|
175 |
+
<option value="<?php echo $post_type; ?>" <?php echo $selected; ?>><?php echo $post_type; ?></option>
|
176 |
+
<?php
|
177 |
+
}
|
178 |
+
?>
|
179 |
+
</select>
|
180 |
+
</div>
|
181 |
+
</div>
|
182 |
+
<div class="feedzy-row">
|
183 |
+
<div class="label_description">
|
184 |
+
<label class="feedzy-sr-only" for="f1-post-type"><?php echo __( 'Post Taxonomy', 'feedzy-rss-feeds' ); ?></label><br/>
|
185 |
+
<small><?php _e( 'Assign to a taxonomy term (eg. "Category", "Tags" etc.)', 'feedzy-rss-feeds' ); ?></small>
|
186 |
+
</div>
|
187 |
+
<div class="feedzy-separator dashicons dashicons-leftright"></div>
|
188 |
+
<div class="form-group input-group form_item">
|
189 |
+
<select id="feedzy_post_terms" multiple class="form-control feedzy-chosen" name="feedzy_meta_data[import_post_term][]" >
|
190 |
+
</select>
|
191 |
+
</div>
|
192 |
+
</div>
|
193 |
+
<div class="feedzy-row">
|
194 |
+
<div class="label_description">
|
195 |
+
<label class="feedzy-sr-only" for="f1-post-status"><?php echo __( 'Post Status', 'feedzy-rss-feeds' ); ?></label><br/>
|
196 |
+
<small>
|
197 |
+
<?php
|
198 |
+
echo __( 'The post status you want your posts to have. You can choose Publish if you want to publish your posts right away, or you can use Draft if you want to draft your posts and publish it after reviewing them manually.', 'feedzy-rss-feeds' );
|
199 |
+
?>
|
200 |
+
</small>
|
201 |
+
</div>
|
202 |
+
<div class="feedzy-separator dashicons dashicons-leftright"></div>
|
203 |
+
<div class="form-group input-group form_item">
|
204 |
+
<select id="feedzy_post_status" class="form-control feedzy-chosen" name="feedzy_meta_data[import_post_status]" >
|
205 |
+
<?php
|
206 |
+
foreach ( $published_status as $status ) {
|
207 |
+
$selected = '';
|
208 |
+
if ( $status === $import_post_status ) {
|
209 |
+
$selected = 'selected';
|
210 |
+
}
|
211 |
+
?>
|
212 |
+
<option value="<?php echo $status; ?>" <?php echo $selected; ?>><?php echo ucfirst( $status ); ?></option>
|
213 |
+
<?php
|
214 |
+
}
|
215 |
+
?>
|
216 |
+
</select>
|
217 |
+
</div>
|
218 |
+
</div>
|
219 |
+
<div class="feedzy-row">
|
220 |
+
<div class="label_description">
|
221 |
+
<label class="feedzy-sr-only" for="f1-post-title"><?php echo __( 'Post Title', 'feedzy-rss-feeds' ); ?></label><br/>
|
222 |
+
<small>
|
223 |
+
<?php
|
224 |
+
$magic_tags = array(
|
225 |
+
'item_title',
|
226 |
+
'item_author',
|
227 |
+
'item_date',
|
228 |
+
);
|
229 |
+
$magic_tags = apply_filters( 'feedzy_get_service_magic_tags', $magic_tags, 'title' );
|
230 |
+
|
231 |
+
echo __( 'The title for the generated post. You can use ', 'feedzy-rss-feeds' ) .
|
232 |
+
'<b>[#' . implode( ']</b>, <b>[#', $magic_tags ) . ']</b>' .
|
233 |
+
__( ' tags to append the feed item title to the generated post title or mix and match your own.', 'feedzy-rss-feeds' );
|
234 |
+
?>
|
235 |
+
</small>
|
236 |
+
</div>
|
237 |
+
<div class="feedzy-separator dashicons dashicons-leftright"></div>
|
238 |
+
<div class="form-group input-group form_item">
|
239 |
+
<input type="text" name="feedzy_meta_data[import_post_title]" placeholder="<?php echo __( 'Post Title', 'feedzy-rss-feeds' ); ?>" class="form-control" value="<?php echo $import_title; ?>"/>
|
240 |
+
<div class="input-group-btn">
|
241 |
+
<button type="button" class="btn btn-add-fields dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
242 |
+
<?php echo __( 'Insert Tag', 'feedzy-rss-feeds' ); ?> <span class="dashicons dashicons-arrow-down-alt2"></span>
|
243 |
+
</button>
|
244 |
+
<div class="dropdown-menu dropdown-menu-right">
|
245 |
+
<?php echo apply_filters( 'feedzy_render_magic_tags', '', apply_filters( 'feedzy_magic_tags_title', array() ), 'import_post_title' ); ?>
|
246 |
+
</div>
|
247 |
+
</div>
|
248 |
+
</div>
|
249 |
+
</div>
|
250 |
+
<div class="feedzy-row">
|
251 |
+
<div class="label_description">
|
252 |
+
<label class="feedzy-sr-only" for="f1-post-title"><?php echo __( 'Post Date', 'feedzy-rss-feeds' ); ?></label><br/>
|
253 |
+
<small>
|
254 |
+
<?php
|
255 |
+
echo __( 'The date for the generated post. You can use ', 'feedzy-rss-feeds' ) .
|
256 |
+
'<b>[#item_date]</b>, <b>[#post_date]</b>' .
|
257 |
+
__( ' tags or leave blank.', 'feedzy-rss-feeds' );
|
258 |
+
?>
|
259 |
+
</small>
|
260 |
+
</div>
|
261 |
+
<div class="feedzy-separator dashicons dashicons-leftright"></div>
|
262 |
+
<div class="form-group input-group form_item">
|
263 |
+
<input type="text" name="feedzy_meta_data[import_post_date]" placeholder="<?php echo __( 'Post Date', 'feedzy-rss-feeds' ); ?>" class="form-control" value="<?php echo $import_date; ?>"/>
|
264 |
+
<div class="input-group-btn">
|
265 |
+
<button type="button" class="btn btn-add-fields dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
266 |
+
<?php echo __( 'Insert Tag', 'feedzy-rss-feeds' ); ?> <span class="dashicons dashicons-arrow-down-alt2"></span>
|
267 |
+
</button>
|
268 |
+
<div class="dropdown-menu dropdown-menu-right">
|
269 |
+
<?php echo apply_filters( 'feedzy_render_magic_tags', '', apply_filters( 'feedzy_magic_tags_date', array() ), 'import_post_date' ); ?>
|
270 |
+
</div>
|
271 |
+
</div>
|
272 |
+
</div>
|
273 |
+
</div>
|
274 |
+
<div class="feedzy-row">
|
275 |
+
<div class="label_description">
|
276 |
+
<label class="feedzy-sr-only" for="f1-post-content"><?php echo __( 'Item Content', 'feedzy-rss-feeds' ); ?></label><br/>
|
277 |
+
<small>
|
278 |
+
<?php
|
279 |
+
$magic_tags = array(
|
280 |
+
'item_description',
|
281 |
+
'item_content',
|
282 |
+
'item_image',
|
283 |
+
);
|
284 |
+
if ( apply_filters( 'feedzy_is_license_of_type', false, 'business' ) ) {
|
285 |
+
$magic_tags = array_merge(
|
286 |
+
$magic_tags,
|
287 |
+
array(
|
288 |
+
'item_full_content',
|
289 |
+
)
|
290 |
+
);
|
291 |
+
$magic_tags = apply_filters( 'feedzy_get_service_magic_tags', $magic_tags, 'full_content' );
|
292 |
+
}
|
293 |
+
$magic_tags = apply_filters( 'feedzy_get_service_magic_tags', $magic_tags, 'content' );
|
294 |
+
|
295 |
+
echo __( 'The content for the generated post. You can use ', 'feedzy-rss-feeds' ) .
|
296 |
+
'<b>[#' . implode( ']</b>, <b>[#', $magic_tags ) . ']</b>' .
|
297 |
+
__( ' tags to append the feed item content for the generated post content.', 'feedzy-rss-feeds' );
|
298 |
+
?>
|
299 |
+
</small>
|
300 |
+
|
301 |
+
<p class="feedzy-highlight"><i class="dashicons dashicons-megaphone"></i>
|
302 |
+
<?php
|
303 |
+
if ( apply_filters( 'feedzy_is_license_of_type', false, 'business' ) ) {
|
304 |
+
echo sprintf( __( 'You can add custom magic tags to extract custom elements from your feed as explained %1$shere%2$s. This will work only for single-feeds (not if you have specified a feed category that contains multiple feeds).', 'feedzy-rss-feeds' ), '<a href="https://docs.themeisle.com/article/977-how-do-i-extract-values-from-custom-tags-in-feedzy" target="_blank">', '</a>' );
|
305 |
+
} else {
|
306 |
+
echo sprintf( __( 'Want to extract custom elements from your feed as explained %1$shere%2$s? Upgrade your %3$slicense%4$s today!', 'feedzy-rss-feeds' ), '<a href="https://docs.themeisle.com/article/977-how-do-i-extract-values-from-custom-tags-in-feedzy" target="_blank">', '</a>', '<a href="' . FEEDZY_UPSELL_LINK . '" target="_blank">', '</a>' );
|
307 |
+
}
|
308 |
+
?>
|
309 |
+
</p>
|
310 |
+
|
311 |
+
</div>
|
312 |
+
<div class="feedzy-separator dashicons dashicons-leftright"></div>
|
313 |
+
<div class="form-group input-group form_item">
|
314 |
+
<textarea name="feedzy_meta_data[import_post_content]" placeholder="<?php echo __( 'Post Content', 'feedzy-rss-feeds' ); ?>" class="form-control"><?php echo $import_content; ?></textarea>
|
315 |
+
<div class="input-group-btn">
|
316 |
+
<button type="button" class="btn btn-add-fields dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
317 |
+
<?php echo __( 'Insert Tag', 'feedzy-rss-feeds' ); ?> <span class="dashicons dashicons-arrow-down-alt2"></span>
|
318 |
+
</button>
|
319 |
+
<div class="dropdown-menu dropdown-menu-right">
|
320 |
+
<?php echo apply_filters( 'feedzy_render_magic_tags', '', apply_filters( 'feedzy_magic_tags_content', array() ), 'import_post_content' ); ?>
|
321 |
+
</div>
|
322 |
+
</div>
|
323 |
+
</div>
|
324 |
+
</div>
|
325 |
+
<div class="feedzy-row">
|
326 |
+
<div class="label_description">
|
327 |
+
<label class="feedzy-sr-only" for="f1-post-content"><?php echo __( 'Featured Image', 'feedzy-rss-feeds' ); ?></label><br/>
|
328 |
+
<small>
|
329 |
+
<?php
|
330 |
+
echo __( 'The URL for the featured image. You can use ', 'feedzy-rss-feeds' ) .
|
331 |
+
'<b>[#item_image]</b>' .
|
332 |
+
__( ' tag, use your own URL or leave it empty. (*optional)', 'feedzy-rss-feeds' );
|
333 |
+
?>
|
334 |
+
</small>
|
335 |
+
</div>
|
336 |
+
<div class="feedzy-separator dashicons dashicons-leftright"></div>
|
337 |
+
<div class="form-group input-group form_item">
|
338 |
+
<input type="text" name="feedzy_meta_data[import_post_featured_img]" placeholder="<?php echo __( 'Featured Image', 'feedzy-rss-feeds' ); ?>" class="form-control" value="<?php echo $import_featured_img; ?>"/>
|
339 |
+
<div class="input-group-btn">
|
340 |
+
<button type="button" class="btn btn-add-fields dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
341 |
+
<?php echo __( 'Insert Tag', 'feedzy-rss-feeds' ); ?> <span class="dashicons dashicons-arrow-down-alt2"></span>
|
342 |
+
</button>
|
343 |
+
<div class="dropdown-menu dropdown-menu-right">
|
344 |
+
<?php echo apply_filters( 'feedzy_render_magic_tags', '', apply_filters( 'feedzy_magic_tags_image', array() ), 'import_post_featured_img' ); ?>
|
345 |
+
</div>
|
346 |
+
</div>
|
347 |
+
</div>
|
348 |
+
</div>
|
349 |
+
<div class="feedzy-row">
|
350 |
+
<div class="label_description">
|
351 |
+
<label class="feedzy-sr-only" for="f1-post-content"><?php echo __( 'Post Author', 'feedzy-rss-feeds' ); ?></label><br/>
|
352 |
+
<small>
|
353 |
+
<?php
|
354 |
+
_e( 'Show the original author', 'feedzy-rss-feeds' );
|
355 |
+
?>
|
356 |
+
</small>
|
357 |
+
</div>
|
358 |
+
<div class="feedzy-separator dashicons dashicons-leftright"></div>
|
359 |
+
<div class="form-group input-group form_item <?php echo apply_filters( 'feedzy_upsell_class', '' ); ?>">
|
360 |
+
<?php echo apply_filters( 'feedzy_upsell_content', '' ); ?>
|
361 |
+
<div>
|
362 |
+
<input type="checkbox" name="feedzy_meta_data[import_link_author_admin]" id="import_link_author_admin" value="yes" <?php echo $import_link_author[0]; ?>/>
|
363 |
+
<label class="feedzy-inline" for="import_link_author_admin"><?php echo __( 'In the backend', 'feedzy-rss-feeds' ); ?></label>
|
364 |
+
</div>
|
365 |
+
<div>
|
366 |
+
<input type="checkbox" name="feedzy_meta_data[import_link_author_public]" id="import_link_author_public" value="yes" <?php echo $import_link_author[1]; ?>/>
|
367 |
+
<label class="feedzy-inline" for="import_link_author_public"><?php echo __( 'Link to the original post in the frontend', 'feedzy-rss-feeds' ); ?></label>
|
368 |
+
</div>
|
369 |
+
</div>
|
370 |
+
</div>
|
371 |
+
|
372 |
+
|
373 |
+
<div class="custom_fields <?php echo apply_filters( 'feedzy_upsell_class', '' ); ?>">
|
374 |
+
<?php echo apply_filters( 'feedzy_upsell_content', '' ); ?>
|
375 |
+
<!-- Custom Fields Added By JS -->
|
376 |
+
<?php
|
377 |
+
if ( isset( $import_custom_fields ) && ! empty( $import_custom_fields ) ) {
|
378 |
+
foreach ( $import_custom_fields as $custom_field_key => $custom_field_value ) {
|
379 |
+
?>
|
380 |
+
<div class="row">
|
381 |
+
<div class="feedzy-row fields">
|
382 |
+
<div class="form-group form_item">
|
383 |
+
<input type="text" name="custom_vars_key[]" placeholder="<?php echo __( 'Key Name', 'feedzy-rss-feeds' ); ?>" class="form-control" value="<?php echo $custom_field_key; ?>"/>
|
384 |
+
</div>
|
385 |
+
<div class="feedzy-separator dashicons dashicons-leftright"></div>
|
386 |
+
<div class="form-group input-group form_item">
|
387 |
+
<input type="text" name="custom_vars_value[]" placeholder="<?php echo __( 'Value', 'feedzy-rss-feeds' ); ?>" class="form-control" value="<?php echo $custom_field_value; ?>"/>
|
388 |
+
<div class="input-group-btn">
|
389 |
+
<button type="button" class="btn btn-remove-fields">
|
390 |
+
<span class="dashicons dashicons-trash"></span>
|
391 |
+
</button>
|
392 |
+
</div>
|
393 |
+
</div>
|
394 |
+
</div>
|
395 |
+
</div>
|
396 |
+
<?php
|
397 |
+
}
|
398 |
+
}
|
399 |
+
?>
|
400 |
+
</div>
|
401 |
+
|
402 |
+
<button id="new_custom_fields" type="button" class="btn btn-add-fields" style="width: 100%; margin-bottom: 16px; margin-top: 16px;" ><?php echo __( 'Add custom fields', 'feedzy-rss-feeds' ); ?> <span class="dashicons dashicons-plus-alt"></span></button>
|
403 |
+
</div>
|
404 |
+
|
405 |
+
|
406 |
+
<div class="f1-buttons">
|
407 |
+
<input type="hidden" id="custom_post_status" name="custom_post_status" value="draft" />
|
408 |
+
<button type="button" class="btn btn-previous"><?php echo __( 'Previous', 'feedzy-rss-feeds' ); ?></button>
|
409 |
+
<?php
|
410 |
+
if ( $post_status === 'publish' ) {
|
411 |
+
?>
|
412 |
+
<button type="submit" name="publish" class="btn btn-submit" value="Publish"><?php echo __( 'Save', 'feedzy-rss-feeds' ); ?></button>
|
413 |
+
<?php
|
414 |
+
} else {
|
415 |
+
?>
|
416 |
+
<button type="submit" name="save" class="btn btn-submit" value="Save Draft" style="float: none;"><?php echo __( 'Save', 'feedzy-rss-feeds' ); ?></button>
|
417 |
+
<button type="submit" name="publish" class="btn btn-submit btn-activate" value="Publish" ><?php echo __( 'Save & Activate', 'feedzy-rss-feeds' ); ?></button>
|
418 |
+
<?php
|
419 |
+
}
|
420 |
+
?>
|
421 |
+
</div>
|
422 |
+
</fieldset>
|
423 |
+
</div>
|
424 |
+
|
425 |
+
<script id="empty_select_tpl" type="text/template">
|
426 |
+
<option value="none"><?php echo __( 'None', 'feedzy-rss-feeds' ); ?></option>
|
427 |
+
</script>
|
428 |
+
|
429 |
+
<script id="loading_select_tpl" type="text/template">
|
430 |
+
<option value=""><?php echo __( 'Loading...', 'feedzy-rss-feeds' ); ?></option>
|
431 |
+
</script>
|
432 |
+
|
433 |
+
<script id="new_field_tpl" type="text/template">
|
434 |
+
<?php echo apply_filters( 'feedzy_custom_field_template', '' ); ?>
|
435 |
+
</script>
|
436 |
+
|
includes/views/js/chosen.js
ADDED
@@ -0,0 +1,1331 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Third Party library ( imported from Chosen ).
|
3 |
+
* chosen.js
|
4 |
+
*
|
5 |
+
* @since 1.2.0
|
6 |
+
* @package feedzy-rss-feeds-pro
|
7 |
+
*/
|
8 |
+
/*!
|
9 |
+
Chosen, a Select Box Enhancer for jQuery and Prototype
|
10 |
+
by Patrick Filler for Harvest, http://getharvest.com
|
11 |
+
|
12 |
+
Version 1.7.0
|
13 |
+
Full source at https://github.com/harvesthq/chosen
|
14 |
+
Copyright (c) 2011-2017 Harvest http://getharvest.com
|
15 |
+
|
16 |
+
MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
|
17 |
+
This file is generated by `grunt build`, do not edit it by hand.
|
18 |
+
*/
|
19 |
+
/* jshint ignore:start */
|
20 |
+
(function() {
|
21 |
+
var $, AbstractChosen, Chosen, SelectParser, _ref,
|
22 |
+
__bind = function(fn, me){ return function(){ return fn.apply( me, arguments ); }; },
|
23 |
+
__hasProp = {}.hasOwnProperty,
|
24 |
+
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call( parent, key )) { child[key] = parent[key];
|
25 |
+
} } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
|
26 |
+
|
27 |
+
SelectParser = (function() {
|
28 |
+
function SelectParser() {
|
29 |
+
this.options_index = 0;
|
30 |
+
this.parsed = [];
|
31 |
+
}
|
32 |
+
|
33 |
+
SelectParser.prototype.add_node = function(child) {
|
34 |
+
if (child.nodeName.toUpperCase() === "OPTGROUP") {
|
35 |
+
return this.add_group( child );
|
36 |
+
} else {
|
37 |
+
return this.add_option( child );
|
38 |
+
}
|
39 |
+
};
|
40 |
+
|
41 |
+
SelectParser.prototype.add_group = function(group) {
|
42 |
+
var group_position, option, _i, _len, _ref, _results;
|
43 |
+
group_position = this.parsed.length;
|
44 |
+
this.parsed.push({
|
45 |
+
array_index: group_position,
|
46 |
+
group: true,
|
47 |
+
label: this.escapeExpression( group.label ),
|
48 |
+
title: group.title ? group.title : void 0,
|
49 |
+
children: 0,
|
50 |
+
disabled: group.disabled,
|
51 |
+
classes: group.className
|
52 |
+
});
|
53 |
+
_ref = group.childNodes;
|
54 |
+
_results = [];
|
55 |
+
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
56 |
+
option = _ref[_i];
|
57 |
+
_results.push( this.add_option( option, group_position, group.disabled ) );
|
58 |
+
}
|
59 |
+
return _results;
|
60 |
+
};
|
61 |
+
|
62 |
+
SelectParser.prototype.add_option = function(option, group_position, group_disabled) {
|
63 |
+
if (option.nodeName.toUpperCase() === "OPTION") {
|
64 |
+
if (option.text !== "") {
|
65 |
+
if (group_position != null) {
|
66 |
+
this.parsed[group_position].children += 1;
|
67 |
+
}
|
68 |
+
this.parsed.push({
|
69 |
+
array_index: this.parsed.length,
|
70 |
+
options_index: this.options_index,
|
71 |
+
value: option.value,
|
72 |
+
text: option.text,
|
73 |
+
html: option.innerHTML,
|
74 |
+
title: option.title ? option.title : void 0,
|
75 |
+
selected: option.selected,
|
76 |
+
disabled: group_disabled === true ? group_disabled : option.disabled,
|
77 |
+
group_array_index: group_position,
|
78 |
+
group_label: group_position != null ? this.parsed[group_position].label : null,
|
79 |
+
classes: option.className,
|
80 |
+
style: option.style.cssText
|
81 |
+
});
|
82 |
+
} else {
|
83 |
+
this.parsed.push({
|
84 |
+
array_index: this.parsed.length,
|
85 |
+
options_index: this.options_index,
|
86 |
+
empty: true
|
87 |
+
});
|
88 |
+
}
|
89 |
+
return this.options_index += 1;
|
90 |
+
}
|
91 |
+
};
|
92 |
+
|
93 |
+
SelectParser.prototype.escapeExpression = function(text) {
|
94 |
+
var map, unsafe_chars;
|
95 |
+
if ((text == null) || text === false) {
|
96 |
+
return "";
|
97 |
+
}
|
98 |
+
if ( ! / [\&\ < \ > \"\'\`] / .test( text )) {
|
99 |
+
return text;
|
100 |
+
}
|
101 |
+
map = {
|
102 |
+
"<": "<",
|
103 |
+
">": ">",
|
104 |
+
'"': """,
|
105 |
+
"'": "'",
|
106 |
+
"`": "`"
|
107 |
+
};
|
108 |
+
unsafe_chars = /&(?!\w+;)|[\<\>\"\'\`]/g;
|
109 |
+
return text.replace(unsafe_chars, function(chr) {
|
110 |
+
return map[chr] || "&";
|
111 |
+
});
|
112 |
+
};
|
113 |
+
|
114 |
+
return SelectParser;
|
115 |
+
|
116 |
+
})();
|
117 |
+
|
118 |
+
SelectParser.select_to_array = function(select) {
|
119 |
+
var child, parser, _i, _len, _ref;
|
120 |
+
parser = new SelectParser();
|
121 |
+
_ref = select.childNodes;
|
122 |
+
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
123 |
+
child = _ref[_i];
|
124 |
+
parser.add_node( child );
|
125 |
+
}
|
126 |
+
return parser.parsed;
|
127 |
+
};
|
128 |
+
|
129 |
+
AbstractChosen = (function() {
|
130 |
+
function AbstractChosen(form_field, options) {
|
131 |
+
this.form_field = form_field;
|
132 |
+
this.options = options != null ? options : {};
|
133 |
+
this.label_click_handler = __bind( this.label_click_handler, this );
|
134 |
+
if ( ! AbstractChosen.browser_is_supported()) {
|
135 |
+
return;
|
136 |
+
}
|
137 |
+
this.is_multiple = this.form_field.multiple;
|
138 |
+
this.set_default_text();
|
139 |
+
this.set_default_values();
|
140 |
+
this.setup();
|
141 |
+
this.set_up_html();
|
142 |
+
this.register_observers();
|
143 |
+
this.on_ready();
|
144 |
+
}
|
145 |
+
|
146 |
+
AbstractChosen.prototype.set_default_values = function() {
|
147 |
+
var _this = this;
|
148 |
+
this.click_test_action = function(evt) {
|
149 |
+
return _this.test_active_click( evt );
|
150 |
+
};
|
151 |
+
this.activate_action = function(evt) {
|
152 |
+
return _this.activate_field( evt );
|
153 |
+
};
|
154 |
+
this.active_field = false;
|
155 |
+
this.mouse_on_container = false;
|
156 |
+
this.results_showing = false;
|
157 |
+
this.result_highlighted = null;
|
158 |
+
this.is_rtl = this.options.rtl || /\bchosen-rtl\b/.test( this.form_field.className );
|
159 |
+
this.allow_single_deselect = (this.options.allow_single_deselect != null) && (this.form_field.options[0] != null) && this.form_field.options[0].text === "" ? this.options.allow_single_deselect : false;
|
160 |
+
this.disable_search_threshold = this.options.disable_search_threshold || 0;
|
161 |
+
this.disable_search = this.options.disable_search || false;
|
162 |
+
this.enable_split_word_search = this.options.enable_split_word_search != null ? this.options.enable_split_word_search : true;
|
163 |
+
this.group_search = this.options.group_search != null ? this.options.group_search : true;
|
164 |
+
this.search_contains = this.options.search_contains || false;
|
165 |
+
this.single_backstroke_delete = this.options.single_backstroke_delete != null ? this.options.single_backstroke_delete : true;
|
166 |
+
this.max_selected_options = this.options.max_selected_options || Infinity;
|
167 |
+
this.inherit_select_classes = this.options.inherit_select_classes || false;
|
168 |
+
this.display_selected_options = this.options.display_selected_options != null ? this.options.display_selected_options : true;
|
169 |
+
this.display_disabled_options = this.options.display_disabled_options != null ? this.options.display_disabled_options : true;
|
170 |
+
this.include_group_label_in_selected = this.options.include_group_label_in_selected || false;
|
171 |
+
this.max_shown_results = this.options.max_shown_results || Number.POSITIVE_INFINITY;
|
172 |
+
this.case_sensitive_search = this.options.case_sensitive_search || false;
|
173 |
+
return this.hide_results_on_select = this.options.hide_results_on_select != null ? this.options.hide_results_on_select : true;
|
174 |
+
};
|
175 |
+
|
176 |
+
AbstractChosen.prototype.set_default_text = function() {
|
177 |
+
if (this.form_field.getAttribute( "data-placeholder" )) {
|
178 |
+
this.default_text = this.form_field.getAttribute( "data-placeholder" );
|
179 |
+
} else if (this.is_multiple) {
|
180 |
+
this.default_text = this.options.placeholder_text_multiple || this.options.placeholder_text || AbstractChosen.default_multiple_text;
|
181 |
+
} else {
|
182 |
+
this.default_text = this.options.placeholder_text_single || this.options.placeholder_text || AbstractChosen.default_single_text;
|
183 |
+
}
|
184 |
+
this.default_text = this.escape_html( this.default_text );
|
185 |
+
return this.results_none_found = this.form_field.getAttribute( "data-no_results_text" ) || this.options.no_results_text || AbstractChosen.default_no_result_text;
|
186 |
+
};
|
187 |
+
|
188 |
+
AbstractChosen.prototype.choice_label = function(item) {
|
189 |
+
if (this.include_group_label_in_selected && (item.group_label != null)) {
|
190 |
+
return "<b class='group-name'>" + item.group_label + "</b>" + item.html;
|
191 |
+
} else {
|
192 |
+
return item.html;
|
193 |
+
}
|
194 |
+
};
|
195 |
+
|
196 |
+
AbstractChosen.prototype.mouse_enter = function() {
|
197 |
+
return this.mouse_on_container = true;
|
198 |
+
};
|
199 |
+
|
200 |
+
AbstractChosen.prototype.mouse_leave = function() {
|
201 |
+
return this.mouse_on_container = false;
|
202 |
+
};
|
203 |
+
|
204 |
+
AbstractChosen.prototype.input_focus = function(evt) {
|
205 |
+
var _this = this;
|
206 |
+
if (this.is_multiple) {
|
207 |
+
if ( ! this.active_field) {
|
208 |
+
return setTimeout((function() {
|
209 |
+
return _this.container_mousedown();
|
210 |
+
}), 50);
|
211 |
+
}
|
212 |
+
} else {
|
213 |
+
if ( ! this.active_field) {
|
214 |
+
return this.activate_field();
|
215 |
+
}
|
216 |
+
}
|
217 |
+
};
|
218 |
+
|
219 |
+
AbstractChosen.prototype.input_blur = function(evt) {
|
220 |
+
var _this = this;
|
221 |
+
if ( ! this.mouse_on_container) {
|
222 |
+
this.active_field = false;
|
223 |
+
return setTimeout((function() {
|
224 |
+
return _this.blur_test();
|
225 |
+
}), 100);
|
226 |
+
}
|
227 |
+
};
|
228 |
+
|
229 |
+
AbstractChosen.prototype.label_click_handler = function(evt) {
|
230 |
+
if (this.is_multiple) {
|
231 |
+
return this.container_mousedown( evt );
|
232 |
+
} else {
|
233 |
+
return this.activate_field();
|
234 |
+
}
|
235 |
+
};
|
236 |
+
|
237 |
+
AbstractChosen.prototype.results_option_build = function(options) {
|
238 |
+
var content, data, data_content, shown_results, _i, _len, _ref;
|
239 |
+
content = '';
|
240 |
+
shown_results = 0;
|
241 |
+
_ref = this.results_data;
|
242 |
+
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
243 |
+
data = _ref[_i];
|
244 |
+
data_content = '';
|
245 |
+
if (data.group) {
|
246 |
+
data_content = this.result_add_group( data );
|
247 |
+
} else {
|
248 |
+
data_content = this.result_add_option( data );
|
249 |
+
}
|
250 |
+
if (data_content !== '') {
|
251 |
+
shown_results++;
|
252 |
+
content += data_content;
|
253 |
+
}
|
254 |
+
if (options != null ? options.first : void 0) {
|
255 |
+
if (data.selected && this.is_multiple) {
|
256 |
+
this.choice_build( data );
|
257 |
+
} else if (data.selected && ! this.is_multiple) {
|
258 |
+
this.single_set_selected_text( this.choice_label( data ) );
|
259 |
+
}
|
260 |
+
}
|
261 |
+
if (shown_results >= this.max_shown_results) {
|
262 |
+
break;
|
263 |
+
}
|
264 |
+
}
|
265 |
+
return content;
|
266 |
+
};
|
267 |
+
|
268 |
+
AbstractChosen.prototype.result_add_option = function(option) {
|
269 |
+
var classes, option_el;
|
270 |
+
if ( ! option.search_match) {
|
271 |
+
return '';
|
272 |
+
}
|
273 |
+
if ( ! this.include_option_in_results( option )) {
|
274 |
+
return '';
|
275 |
+
}
|
276 |
+
classes = [];
|
277 |
+
if ( ! option.disabled && ! (option.selected && this.is_multiple)) {
|
278 |
+
classes.push( "active-result" );
|
279 |
+
}
|
280 |
+
if (option.disabled && ! (option.selected && this.is_multiple)) {
|
281 |
+
classes.push( "disabled-result" );
|
282 |
+
}
|
283 |
+
if (option.selected) {
|
284 |
+
classes.push( "result-selected" );
|
285 |
+
}
|
286 |
+
if (option.group_array_index != null) {
|
287 |
+
classes.push( "group-option" );
|
288 |
+
}
|
289 |
+
if (option.classes !== "") {
|
290 |
+
classes.push( option.classes );
|
291 |
+
}
|
292 |
+
option_el = document.createElement( "li" );
|
293 |
+
option_el.className = classes.join( " " );
|
294 |
+
option_el.style.cssText = option.style;
|
295 |
+
option_el.setAttribute( "data-option-array-index", option.array_index );
|
296 |
+
option_el.innerHTML = option.search_text;
|
297 |
+
if (option.title) {
|
298 |
+
option_el.title = option.title;
|
299 |
+
}
|
300 |
+
return this.outerHTML( option_el );
|
301 |
+
};
|
302 |
+
|
303 |
+
AbstractChosen.prototype.result_add_group = function(group) {
|
304 |
+
var classes, group_el;
|
305 |
+
if ( ! (group.search_match || group.group_match)) {
|
306 |
+
return '';
|
307 |
+
}
|
308 |
+
if ( ! (group.active_options > 0)) {
|
309 |
+
return '';
|
310 |
+
}
|
311 |
+
classes = [];
|
312 |
+
classes.push( "group-result" );
|
313 |
+
if (group.classes) {
|
314 |
+
classes.push( group.classes );
|
315 |
+
}
|
316 |
+
group_el = document.createElement( "li" );
|
317 |
+
group_el.className = classes.join( " " );
|
318 |
+
group_el.innerHTML = group.search_text;
|
319 |
+
if (group.title) {
|
320 |
+
group_el.title = group.title;
|
321 |
+
}
|
322 |
+
return this.outerHTML( group_el );
|
323 |
+
};
|
324 |
+
|
325 |
+
AbstractChosen.prototype.results_update_field = function() {
|
326 |
+
this.set_default_text();
|
327 |
+
if ( ! this.is_multiple) {
|
328 |
+
this.results_reset_cleanup();
|
329 |
+
}
|
330 |
+
this.result_clear_highlight();
|
331 |
+
this.results_build();
|
332 |
+
if (this.results_showing) {
|
333 |
+
return this.winnow_results();
|
334 |
+
}
|
335 |
+
};
|
336 |
+
|
337 |
+
AbstractChosen.prototype.reset_single_select_options = function() {
|
338 |
+
var result, _i, _len, _ref, _results;
|
339 |
+
_ref = this.results_data;
|
340 |
+
_results = [];
|
341 |
+
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
342 |
+
result = _ref[_i];
|
343 |
+
if (result.selected) {
|
344 |
+
_results.push( result.selected = false );
|
345 |
+
} else {
|
346 |
+
_results.push( void 0 );
|
347 |
+
}
|
348 |
+
}
|
349 |
+
return _results;
|
350 |
+
};
|
351 |
+
|
352 |
+
AbstractChosen.prototype.results_toggle = function() {
|
353 |
+
if (this.results_showing) {
|
354 |
+
return this.results_hide();
|
355 |
+
} else {
|
356 |
+
return this.results_show();
|
357 |
+
}
|
358 |
+
};
|
359 |
+
|
360 |
+
AbstractChosen.prototype.results_search = function(evt) {
|
361 |
+
if (this.results_showing) {
|
362 |
+
return this.winnow_results();
|
363 |
+
} else {
|
364 |
+
return this.results_show();
|
365 |
+
}
|
366 |
+
};
|
367 |
+
|
368 |
+
AbstractChosen.prototype.winnow_results = function() {
|
369 |
+
var escapedSearchText, highlightRegex, option, regex, results, results_group, searchText, startpos, text, _i, _len, _ref;
|
370 |
+
this.no_results_clear();
|
371 |
+
results = 0;
|
372 |
+
searchText = this.get_search_text();
|
373 |
+
escapedSearchText = searchText.replace( /[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&" );
|
374 |
+
regex = this.get_search_regex( escapedSearchText );
|
375 |
+
highlightRegex = this.get_highlight_regex( escapedSearchText );
|
376 |
+
_ref = this.results_data;
|
377 |
+
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
378 |
+
option = _ref[_i];
|
379 |
+
option.search_match = false;
|
380 |
+
results_group = null;
|
381 |
+
if (this.include_option_in_results( option )) {
|
382 |
+
if (option.group) {
|
383 |
+
option.group_match = false;
|
384 |
+
option.active_options = 0;
|
385 |
+
}
|
386 |
+
if ((option.group_array_index != null) && this.results_data[option.group_array_index]) {
|
387 |
+
results_group = this.results_data[option.group_array_index];
|
388 |
+
if (results_group.active_options === 0 && results_group.search_match) {
|
389 |
+
results += 1;
|
390 |
+
}
|
391 |
+
results_group.active_options += 1;
|
392 |
+
}
|
393 |
+
option.search_text = option.group ? option.label : option.html;
|
394 |
+
if ( ! (option.group && ! this.group_search)) {
|
395 |
+
option.search_match = this.search_string_match( option.search_text, regex );
|
396 |
+
if (option.search_match && ! option.group) {
|
397 |
+
results += 1;
|
398 |
+
}
|
399 |
+
if (option.search_match) {
|
400 |
+
if (searchText.length) {
|
401 |
+
startpos = option.search_text.search( highlightRegex );
|
402 |
+
text = option.search_text.substr( 0, startpos + searchText.length ) + '</em>' + option.search_text.substr( startpos + searchText.length );
|
403 |
+
option.search_text = text.substr( 0, startpos ) + '<em>' + text.substr( startpos );
|
404 |
+
}
|
405 |
+
if (results_group != null) {
|
406 |
+
results_group.group_match = true;
|
407 |
+
}
|
408 |
+
} else if ((option.group_array_index != null) && this.results_data[option.group_array_index].search_match) {
|
409 |
+
option.search_match = true;
|
410 |
+
}
|
411 |
+
}
|
412 |
+
}
|
413 |
+
}// End for().
|
414 |
+
this.result_clear_highlight();
|
415 |
+
if (results < 1 && searchText.length) {
|
416 |
+
this.update_results_content( "" );
|
417 |
+
return this.no_results( searchText );
|
418 |
+
} else {
|
419 |
+
this.update_results_content( this.results_option_build() );
|
420 |
+
return this.winnow_results_set_highlight();
|
421 |
+
}
|
422 |
+
};
|
423 |
+
|
424 |
+
AbstractChosen.prototype.get_search_regex = function(escaped_search_string) {
|
425 |
+
var regex_anchor, regex_flag;
|
426 |
+
regex_anchor = this.search_contains ? "" : "^";
|
427 |
+
regex_flag = this.case_sensitive_search ? "" : "i";
|
428 |
+
return new RegExp( regex_anchor + escaped_search_string, regex_flag );
|
429 |
+
};
|
430 |
+
|
431 |
+
AbstractChosen.prototype.get_highlight_regex = function(escaped_search_string) {
|
432 |
+
var regex_anchor, regex_flag;
|
433 |
+
regex_anchor = this.search_contains ? "" : "\\b";
|
434 |
+
regex_flag = this.case_sensitive_search ? "" : "i";
|
435 |
+
return new RegExp( regex_anchor + escaped_search_string, regex_flag );
|
436 |
+
};
|
437 |
+
|
438 |
+
AbstractChosen.prototype.search_string_match = function(search_string, regex) {
|
439 |
+
var part, parts, _i, _len;
|
440 |
+
if (regex.test( search_string )) {
|
441 |
+
return true;
|
442 |
+
} else if (this.enable_split_word_search && (search_string.indexOf( " " ) >= 0 || search_string.indexOf( "[" ) === 0)) {
|
443 |
+
parts = search_string.replace( /\[|\]/g, "" ).split( " " );
|
444 |
+
if (parts.length) {
|
445 |
+
for (_i = 0, _len = parts.length; _i < _len; _i++) {
|
446 |
+
part = parts[_i];
|
447 |
+
if (regex.test( part )) {
|
448 |
+
return true;
|
449 |
+
}
|
450 |
+
}
|
451 |
+
}
|
452 |
+
}
|
453 |
+
};
|
454 |
+
|
455 |
+
AbstractChosen.prototype.choices_count = function() {
|
456 |
+
var option, _i, _len, _ref;
|
457 |
+
if (this.selected_option_count != null) {
|
458 |
+
return this.selected_option_count;
|
459 |
+
}
|
460 |
+
this.selected_option_count = 0;
|
461 |
+
_ref = this.form_field.options;
|
462 |
+
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
463 |
+
option = _ref[_i];
|
464 |
+
if (option.selected) {
|
465 |
+
this.selected_option_count += 1;
|
466 |
+
}
|
467 |
+
}
|
468 |
+
return this.selected_option_count;
|
469 |
+
};
|
470 |
+
|
471 |
+
AbstractChosen.prototype.choices_click = function(evt) {
|
472 |
+
evt.preventDefault();
|
473 |
+
this.activate_field();
|
474 |
+
if ( ! (this.results_showing || this.is_disabled)) {
|
475 |
+
return this.results_show();
|
476 |
+
}
|
477 |
+
};
|
478 |
+
|
479 |
+
AbstractChosen.prototype.keydown_checker = function(evt) {
|
480 |
+
var stroke, _ref;
|
481 |
+
stroke = (_ref = evt.which) != null ? _ref : evt.keyCode;
|
482 |
+
this.search_field_scale();
|
483 |
+
if (stroke !== 8 && this.pending_backstroke) {
|
484 |
+
this.clear_backstroke();
|
485 |
+
}
|
486 |
+
switch (stroke) {
|
487 |
+
case 8:
|
488 |
+
this.backstroke_length = this.get_search_field_value().length;
|
489 |
+
break;
|
490 |
+
case 9:
|
491 |
+
if (this.results_showing && ! this.is_multiple) {
|
492 |
+
this.result_select( evt );
|
493 |
+
}
|
494 |
+
this.mouse_on_container = false;
|
495 |
+
break;
|
496 |
+
case 13:
|
497 |
+
if (this.results_showing) {
|
498 |
+
evt.preventDefault();
|
499 |
+
}
|
500 |
+
break;
|
501 |
+
case 27:
|
502 |
+
if (this.results_showing) {
|
503 |
+
evt.preventDefault();
|
504 |
+
}
|
505 |
+
break;
|
506 |
+
case 32:
|
507 |
+
if (this.disable_search) {
|
508 |
+
evt.preventDefault();
|
509 |
+
}
|
510 |
+
break;
|
511 |
+
case 38:
|
512 |
+
evt.preventDefault();
|
513 |
+
this.keyup_arrow();
|
514 |
+
break;
|
515 |
+
case 40:
|
516 |
+
evt.preventDefault();
|
517 |
+
this.keydown_arrow();
|
518 |
+
break;
|
519 |
+
}
|
520 |
+
};
|
521 |
+
|
522 |
+
AbstractChosen.prototype.keyup_checker = function(evt) {
|
523 |
+
var stroke, _ref;
|
524 |
+
stroke = (_ref = evt.which) != null ? _ref : evt.keyCode;
|
525 |
+
this.search_field_scale();
|
526 |
+
switch (stroke) {
|
527 |
+
case 8:
|
528 |
+
if (this.is_multiple && this.backstroke_length < 1 && this.choices_count() > 0) {
|
529 |
+
this.keydown_backstroke();
|
530 |
+
} else if ( ! this.pending_backstroke) {
|
531 |
+
this.result_clear_highlight();
|
532 |
+
this.results_search();
|
533 |
+
}
|
534 |
+
break;
|
535 |
+
case 13:
|
536 |
+
evt.preventDefault();
|
537 |
+
if (this.results_showing) {
|
538 |
+
this.result_select( evt );
|
539 |
+
}
|
540 |
+
break;
|
541 |
+
case 27:
|
542 |
+
if (this.results_showing) {
|
543 |
+
this.results_hide();
|
544 |
+
}
|
545 |
+
break;
|
546 |
+
case 9:
|
547 |
+
case 16:
|
548 |
+
case 17:
|
549 |
+
case 18:
|
550 |
+
case 38:
|
551 |
+
case 40:
|
552 |
+
case 91:
|
553 |
+
break;
|
554 |
+
default:
|
555 |
+
this.results_search();
|
556 |
+
break;
|
557 |
+
}
|
558 |
+
};
|
559 |
+
|
560 |
+
AbstractChosen.prototype.clipboard_event_checker = function(evt) {
|
561 |
+
var _this = this;
|
562 |
+
if (this.is_disabled) {
|
563 |
+
return;
|
564 |
+
}
|
565 |
+
return setTimeout((function() {
|
566 |
+
return _this.results_search();
|
567 |
+
}), 50);
|
568 |
+
};
|
569 |
+
|
570 |
+
AbstractChosen.prototype.container_width = function() {
|
571 |
+
if (this.options.width != null) {
|
572 |
+
return this.options.width;
|
573 |
+
} else {
|
574 |
+
return "" + this.form_field.offsetWidth + "px";
|
575 |
+
}
|
576 |
+
};
|
577 |
+
|
578 |
+
AbstractChosen.prototype.include_option_in_results = function(option) {
|
579 |
+
if (this.is_multiple && ( ! this.display_selected_options && option.selected)) {
|
580 |
+
return false;
|
581 |
+
}
|
582 |
+
if ( ! this.display_disabled_options && option.disabled) {
|
583 |
+
return false;
|
584 |
+
}
|
585 |
+
if (option.empty) {
|
586 |
+
return false;
|
587 |
+
}
|
588 |
+
return true;
|
589 |
+
};
|
590 |
+
|
591 |
+
AbstractChosen.prototype.search_results_touchstart = function(evt) {
|
592 |
+
this.touch_started = true;
|
593 |
+
return this.search_results_mouseover( evt );
|
594 |
+
};
|
595 |
+
|
596 |
+
AbstractChosen.prototype.search_results_touchmove = function(evt) {
|
597 |
+
this.touch_started = false;
|
598 |
+
return this.search_results_mouseout( evt );
|
599 |
+
};
|
600 |
+
|
601 |
+
AbstractChosen.prototype.search_results_touchend = function(evt) {
|
602 |
+
if (this.touch_started) {
|
603 |
+
return this.search_results_mouseup( evt );
|
604 |
+
}
|
605 |
+
};
|
606 |
+
|
607 |
+
AbstractChosen.prototype.outerHTML = function(element) {
|
608 |
+
var tmp;
|
609 |
+
if (element.outerHTML) {
|
610 |
+
return element.outerHTML;
|
611 |
+
}
|
612 |
+
tmp = document.createElement( "div" );
|
613 |
+
tmp.appendChild( element );
|
614 |
+
return tmp.innerHTML;
|
615 |
+
};
|
616 |
+
|
617 |
+
AbstractChosen.prototype.get_single_html = function() {
|
618 |
+
return "<a class=\"chosen-single chosen-default\">\n <span>" + this.default_text + "</span>\n <div><b></b></div>\n</a>\n<div class=\"chosen-drop\">\n <div class=\"chosen-search\">\n <input class=\"chosen-search-input\" type=\"text\" autocomplete=\"off\" />\n </div>\n <ul class=\"chosen-results\"></ul>\n</div>";
|
619 |
+
};
|
620 |
+
|
621 |
+
AbstractChosen.prototype.get_multi_html = function() {
|
622 |
+
return "<ul class=\"chosen-choices\">\n <li class=\"search-field\">\n <input class=\"chosen-search-input\" type=\"text\" autocomplete=\"off\" value=\"" + this.default_text + "\" />\n </li>\n</ul>\n<div class=\"chosen-drop\">\n <ul class=\"chosen-results\"></ul>\n</div>";
|
623 |
+
};
|
624 |
+
|
625 |
+
AbstractChosen.prototype.get_no_results_html = function(terms) {
|
626 |
+
return "<li class=\"no-results\">\n " + this.results_none_found + " <span>" + terms + "</span>\n</li>";
|
627 |
+
};
|
628 |
+
|
629 |
+
AbstractChosen.browser_is_supported = function() {
|
630 |
+
if ("Microsoft Internet Explorer" === window.navigator.appName) {
|
631 |
+
return document.documentMode >= 8;
|
632 |
+
}
|
633 |
+
if (/iP(od|hone)/i.test( window.navigator.userAgent ) || /IEMobile/i.test( window.navigator.userAgent ) || /Windows Phone/i.test( window.navigator.userAgent ) || /BlackBerry/i.test( window.navigator.userAgent ) || /BB10/i.test( window.navigator.userAgent ) || /Android.*Mobile/i.test( window.navigator.userAgent )) {
|
634 |
+
return false;
|
635 |
+
}
|
636 |
+
return true;
|
637 |
+
};
|
638 |
+
|
639 |
+
AbstractChosen.default_multiple_text = "Select Some Options";
|
640 |
+
|
641 |
+
AbstractChosen.default_single_text = "Select an Option";
|
642 |
+
|
643 |
+
AbstractChosen.default_no_result_text = "No results match";
|
644 |
+
|
645 |
+
return AbstractChosen;
|
646 |
+
|
647 |
+
})();
|
648 |
+
|
649 |
+
$ = jQuery;
|
650 |
+
|
651 |
+
$.fn.extend({
|
652 |
+
chosen: function(options) {
|
653 |
+
if ( ! AbstractChosen.browser_is_supported()) {
|
654 |
+
return this;
|
655 |
+
}
|
656 |
+
return this.each(function(input_field) {
|
657 |
+
var $this, chosen;
|
658 |
+
$this = $( this );
|
659 |
+
chosen = $this.data( 'chosen' );
|
660 |
+
if (options === 'destroy') {
|
661 |
+
if (chosen instanceof Chosen) {
|
662 |
+
chosen.destroy();
|
663 |
+
}
|
664 |
+
return;
|
665 |
+
}
|
666 |
+
if ( ! (chosen instanceof Chosen)) {
|
667 |
+
$this.data( 'chosen', new Chosen( this, options ) );
|
668 |
+
}
|
669 |
+
});
|
670 |
+
}
|
671 |
+
});
|
672 |
+
|
673 |
+
Chosen = (function(_super) {
|
674 |
+
__extends( Chosen, _super );
|
675 |
+
|
676 |
+
function Chosen() {
|
677 |
+
_ref = Chosen.__super__.constructor.apply( this, arguments );
|
678 |
+
return _ref;
|
679 |
+
}
|
680 |
+
|
681 |
+
Chosen.prototype.setup = function() {
|
682 |
+
this.form_field_jq = $( this.form_field );
|
683 |
+
return this.current_selectedIndex = this.form_field.selectedIndex;
|
684 |
+
};
|
685 |
+
|
686 |
+
Chosen.prototype.set_up_html = function() {
|
687 |
+
var container_classes, container_props;
|
688 |
+
container_classes = ["chosen-container"];
|
689 |
+
container_classes.push( "chosen-container-" + (this.is_multiple ? "multi" : "single") );
|
690 |
+
if (this.inherit_select_classes && this.form_field.className) {
|
691 |
+
container_classes.push( this.form_field.className );
|
692 |
+
}
|
693 |
+
if (this.is_rtl) {
|
694 |
+
container_classes.push( "chosen-rtl" );
|
695 |
+
}
|
696 |
+
container_props = {
|
697 |
+
'class': container_classes.join( ' ' ),
|
698 |
+
'title': this.form_field.title
|
699 |
+
};
|
700 |
+
if (this.form_field.id.length) {
|
701 |
+
container_props.id = this.form_field.id.replace( /[^\w]/g, '_' ) + "_chosen";
|
702 |
+
}
|
703 |
+
this.container = $( "<div />", container_props );
|
704 |
+
this.container.width( this.container_width() );
|
705 |
+
if (this.is_multiple) {
|
706 |
+
this.container.html( this.get_multi_html() );
|
707 |
+
} else {
|
708 |
+
this.container.html( this.get_single_html() );
|
709 |
+
}
|
710 |
+
this.form_field_jq.hide().after( this.container );
|
711 |
+
this.dropdown = this.container.find( 'div.chosen-drop' ).first();
|
712 |
+
this.search_field = this.container.find( 'input' ).first();
|
713 |
+
this.search_results = this.container.find( 'ul.chosen-results' ).first();
|
714 |
+
this.search_field_scale();
|
715 |
+
this.search_no_results = this.container.find( 'li.no-results' ).first();
|
716 |
+
if (this.is_multiple) {
|
717 |
+
this.search_choices = this.container.find( 'ul.chosen-choices' ).first();
|
718 |
+
this.search_container = this.container.find( 'li.search-field' ).first();
|
719 |
+
} else {
|
720 |
+
this.search_container = this.container.find( 'div.chosen-search' ).first();
|
721 |
+
this.selected_item = this.container.find( '.chosen-single' ).first();
|
722 |
+
}
|
723 |
+
this.results_build();
|
724 |
+
this.set_tab_index();
|
725 |
+
return this.set_label_behavior();
|
726 |
+
};
|
727 |
+
|
728 |
+
Chosen.prototype.on_ready = function() {
|
729 |
+
return this.form_field_jq.trigger("chosen:ready", {
|
730 |
+
chosen: this
|
731 |
+
});
|
732 |
+
};
|
733 |
+
|
734 |
+
Chosen.prototype.register_observers = function() {
|
735 |
+
var _this = this;
|
736 |
+
this.container.bind('touchstart.chosen', function(evt) {
|
737 |
+
_this.container_mousedown( evt );
|
738 |
+
});
|
739 |
+
this.container.bind('touchend.chosen', function(evt) {
|
740 |
+
_this.container_mouseup( evt );
|
741 |
+
});
|
742 |
+
this.container.bind('mousedown.chosen', function(evt) {
|
743 |
+
_this.container_mousedown( evt );
|
744 |
+
});
|
745 |
+
this.container.bind('mouseup.chosen', function(evt) {
|
746 |
+
_this.container_mouseup( evt );
|
747 |
+
});
|
748 |
+
this.container.bind('mouseenter.chosen', function(evt) {
|
749 |
+
_this.mouse_enter( evt );
|
750 |
+
});
|
751 |
+
this.container.bind('mouseleave.chosen', function(evt) {
|
752 |
+
_this.mouse_leave( evt );
|
753 |
+
});
|
754 |
+
this.search_results.bind('mouseup.chosen', function(evt) {
|
755 |
+
_this.search_results_mouseup( evt );
|
756 |
+
});
|
757 |
+
this.search_results.bind('mouseover.chosen', function(evt) {
|
758 |
+
_this.search_results_mouseover( evt );
|
759 |
+
});
|
760 |
+
this.search_results.bind('mouseout.chosen', function(evt) {
|
761 |
+
_this.search_results_mouseout( evt );
|
762 |
+
});
|
763 |
+
this.search_results.bind('mousewheel.chosen DOMMouseScroll.chosen', function(evt) {
|
764 |
+
_this.search_results_mousewheel( evt );
|
765 |
+
});
|
766 |
+
this.search_results.bind('touchstart.chosen', function(evt) {
|
767 |
+
_this.search_results_touchstart( evt );
|
768 |
+
});
|
769 |
+
this.search_results.bind('touchmove.chosen', function(evt) {
|
770 |
+
_this.search_results_touchmove( evt );
|
771 |
+
});
|
772 |
+
this.search_results.bind('touchend.chosen', function(evt) {
|
773 |
+
_this.search_results_touchend( evt );
|
774 |
+
});
|
775 |
+
this.form_field_jq.bind("chosen:updated.chosen", function(evt) {
|
776 |
+
_this.results_update_field( evt );
|
777 |
+
});
|
778 |
+
this.form_field_jq.bind("chosen:activate.chosen", function(evt) {
|
779 |
+
_this.activate_field( evt );
|
780 |
+
});
|
781 |
+
this.form_field_jq.bind("chosen:open.chosen", function(evt) {
|
782 |
+
_this.container_mousedown( evt );
|
783 |
+
});
|
784 |
+
this.form_field_jq.bind("chosen:close.chosen", function(evt) {
|
785 |
+
_this.close_field( evt );
|
786 |
+
});
|
787 |
+
this.search_field.bind('blur.chosen', function(evt) {
|
788 |
+
_this.input_blur( evt );
|
789 |
+
});
|
790 |
+
this.search_field.bind('keyup.chosen', function(evt) {
|
791 |
+
_this.keyup_checker( evt );
|
792 |
+
});
|
793 |
+
this.search_field.bind('keydown.chosen', function(evt) {
|
794 |
+
_this.keydown_checker( evt );
|
795 |
+
});
|
796 |
+
this.search_field.bind('focus.chosen', function(evt) {
|
797 |
+
_this.input_focus( evt );
|
798 |
+
});
|
799 |
+
this.search_field.bind('cut.chosen', function(evt) {
|
800 |
+
_this.clipboard_event_checker( evt );
|
801 |
+
});
|
802 |
+
this.search_field.bind('paste.chosen', function(evt) {
|
803 |
+
_this.clipboard_event_checker( evt );
|
804 |
+
});
|
805 |
+
if (this.is_multiple) {
|
806 |
+
return this.search_choices.bind('click.chosen', function(evt) {
|
807 |
+
_this.choices_click( evt );
|
808 |
+
});
|
809 |
+
} else {
|
810 |
+
return this.container.bind('click.chosen', function(evt) {
|
811 |
+
evt.preventDefault();
|
812 |
+
});
|
813 |
+
}
|
814 |
+
};
|
815 |
+
|
816 |
+
Chosen.prototype.destroy = function() {
|
817 |
+
$( this.container[0].ownerDocument ).unbind( 'click.chosen', this.click_test_action );
|
818 |
+
if (this.form_field_label.length > 0) {
|
819 |
+
this.form_field_label.unbind( 'click.chosen' );
|
820 |
+
}
|
821 |
+
if (this.search_field[0].tabIndex) {
|
822 |
+
this.form_field_jq[0].tabIndex = this.search_field[0].tabIndex;
|
823 |
+
}
|
824 |
+
this.container.remove();
|
825 |
+
this.form_field_jq.removeData( 'chosen' );
|
826 |
+
return this.form_field_jq.show();
|
827 |
+
};
|
828 |
+
|
829 |
+
Chosen.prototype.search_field_disabled = function() {
|
830 |
+
this.is_disabled = this.form_field.disabled || this.form_field_jq.parents( 'fieldset' ).is( ':disabled' );
|
831 |
+
this.container.toggleClass( 'chosen-disabled', this.is_disabled );
|
832 |
+
this.search_field[0].disabled = this.is_disabled;
|
833 |
+
if ( ! this.is_multiple) {
|
834 |
+
this.selected_item.unbind( 'focus.chosen', this.activate_field );
|
835 |
+
}
|
836 |
+
if (this.is_disabled) {
|
837 |
+
return this.close_field();
|
838 |
+
} else if ( ! this.is_multiple) {
|
839 |
+
return this.selected_item.bind( 'focus.chosen', this.activate_field );
|
840 |
+
}
|
841 |
+
};
|
842 |
+
|
843 |
+
Chosen.prototype.container_mousedown = function(evt) {
|
844 |
+
var _ref1;
|
845 |
+
if (this.is_disabled) {
|
846 |
+
return;
|
847 |
+
}
|
848 |
+
if (evt && ((_ref1 = evt.type) === 'mousedown' || _ref1 === 'touchstart') && ! this.results_showing) {
|
849 |
+
evt.preventDefault();
|
850 |
+
}
|
851 |
+
if ( ! ((evt != null) && ($( evt.target )).hasClass( "search-choice-close" ))) {
|
852 |
+
if ( ! this.active_field) {
|
853 |
+
if (this.is_multiple) {
|
854 |
+
this.search_field.val( "" );
|
855 |
+
}
|
856 |
+
$( this.container[0].ownerDocument ).bind( 'click.chosen', this.click_test_action );
|
857 |
+
this.results_show();
|
858 |
+
} else if ( ! this.is_multiple && evt && (($( evt.target )[0] === this.selected_item[0]) || $( evt.target ).parents( "a.chosen-single" ).length)) {
|
859 |
+
evt.preventDefault();
|
860 |
+
this.results_toggle();
|
861 |
+
}
|
862 |
+
return this.activate_field();
|
863 |
+
}
|
864 |
+
};
|
865 |
+
|
866 |
+
Chosen.prototype.container_mouseup = function(evt) {
|
867 |
+
if (evt.target.nodeName === "ABBR" && ! this.is_disabled) {
|
868 |
+
return this.results_reset( evt );
|
869 |
+
}
|
870 |
+
};
|
871 |
+
|
872 |
+
Chosen.prototype.search_results_mousewheel = function(evt) {
|
873 |
+
var delta;
|
874 |
+
if (evt.originalEvent) {
|
875 |
+
delta = evt.originalEvent.deltaY || -evt.originalEvent.wheelDelta || evt.originalEvent.detail;
|
876 |
+
}
|
877 |
+
if (delta != null) {
|
878 |
+
evt.preventDefault();
|
879 |
+
if (evt.type === 'DOMMouseScroll') {
|
880 |
+
delta = delta * 40;
|
881 |
+
}
|
882 |
+
return this.search_results.scrollTop( delta + this.search_results.scrollTop() );
|
883 |
+
}
|
884 |
+
};
|
885 |
+
|
886 |
+
Chosen.prototype.blur_test = function(evt) {
|
887 |
+
if ( ! this.active_field && this.container.hasClass( "chosen-container-active" )) {
|
888 |
+
return this.close_field();
|
889 |
+
}
|
890 |
+
};
|
891 |
+
|
892 |
+
Chosen.prototype.close_field = function() {
|
893 |
+
$( this.container[0].ownerDocument ).unbind( "click.chosen", this.click_test_action );
|
894 |
+
this.active_field = false;
|
895 |
+
this.results_hide();
|
896 |
+
this.container.removeClass( "chosen-container-active" );
|
897 |
+
this.clear_backstroke();
|
898 |
+
this.show_search_field_default();
|
899 |
+
this.search_field_scale();
|
900 |
+
return this.search_field.blur();
|
901 |
+
};
|
902 |
+
|
903 |
+
Chosen.prototype.activate_field = function() {
|
904 |
+
if (this.is_disabled) {
|
905 |
+
return;
|
906 |
+
}
|
907 |
+
this.container.addClass( "chosen-container-active" );
|
908 |
+
this.active_field = true;
|
909 |
+
this.search_field.val( this.search_field.val() );
|
910 |
+
return this.search_field.focus();
|
911 |
+
};
|
912 |
+
|
913 |
+
Chosen.prototype.test_active_click = function(evt) {
|
914 |
+
var active_container;
|
915 |
+
active_container = $( evt.target ).closest( '.chosen-container' );
|
916 |
+
if (active_container.length && this.container[0] === active_container[0]) {
|
917 |
+
return this.active_field = true;
|
918 |
+
} else {
|
919 |
+
return this.close_field();
|
920 |
+
}
|
921 |
+
};
|
922 |
+
|
923 |
+
Chosen.prototype.results_build = function() {
|
924 |
+
this.parsing = true;
|
925 |
+
this.selected_option_count = null;
|
926 |
+
this.results_data = SelectParser.select_to_array( this.form_field );
|
927 |
+
if (this.is_multiple) {
|
928 |
+
this.search_choices.find( "li.search-choice" ).remove();
|
929 |
+
} else if ( ! this.is_multiple) {
|
930 |
+
this.single_set_selected_text();
|
931 |
+
if (this.disable_search || this.form_field.options.length <= this.disable_search_threshold) {
|
932 |
+
this.search_field[0].readOnly = true;
|
933 |
+
this.container.addClass( "chosen-container-single-nosearch" );
|
934 |
+
} else {
|
935 |
+
this.search_field[0].readOnly = false;
|
936 |
+
this.container.removeClass( "chosen-container-single-nosearch" );
|
937 |
+
}
|
938 |
+
}
|
939 |
+
this.update_results_content(this.results_option_build({
|
940 |
+
first: true
|
941 |
+
}));
|
942 |
+
this.search_field_disabled();
|
943 |
+
this.show_search_field_default();
|
944 |
+
this.search_field_scale();
|
945 |
+
return this.parsing = false;
|
946 |
+
};
|
947 |
+
|
948 |
+
Chosen.prototype.result_do_highlight = function(el) {
|
949 |
+
var high_bottom, high_top, maxHeight, visible_bottom, visible_top;
|
950 |
+
if (el.length) {
|
951 |
+
this.result_clear_highlight();
|
952 |
+
this.result_highlight = el;
|
953 |
+
this.result_highlight.addClass( "highlighted" );
|
954 |
+
maxHeight = parseInt( this.search_results.css( "maxHeight" ), 10 );
|
955 |
+
visible_top = this.search_results.scrollTop();
|
956 |
+
visible_bottom = maxHeight + visible_top;
|
957 |
+
high_top = this.result_highlight.position().top + this.search_results.scrollTop();
|
958 |
+
high_bottom = high_top + this.result_highlight.outerHeight();
|
959 |
+
if (high_bottom >= visible_bottom) {
|
960 |
+
return this.search_results.scrollTop( (high_bottom - maxHeight) > 0 ? high_bottom - maxHeight : 0 );
|
961 |
+
} else if (high_top < visible_top) {
|
962 |
+
return this.search_results.scrollTop( high_top );
|
963 |
+
}
|
964 |
+
}
|
965 |
+
};
|
966 |
+
|
967 |
+
Chosen.prototype.result_clear_highlight = function() {
|
968 |
+
if (this.result_highlight) {
|
969 |
+
this.result_highlight.removeClass( "highlighted" );
|
970 |
+
}
|
971 |
+
return this.result_highlight = null;
|
972 |
+
};
|
973 |
+
|
974 |
+
Chosen.prototype.results_show = function() {
|
975 |
+
if (this.is_multiple && this.max_selected_options <= this.choices_count()) {
|
976 |
+
this.form_field_jq.trigger("chosen:maxselected", {
|
977 |
+
chosen: this
|
978 |
+
});
|
979 |
+
return false;
|
980 |
+
}
|
981 |
+
this.container.addClass( "chosen-with-drop" );
|
982 |
+
this.results_showing = true;
|
983 |
+
this.search_field.focus();
|
984 |
+
this.search_field.val( this.get_search_field_value() );
|
985 |
+
this.winnow_results();
|
986 |
+
return this.form_field_jq.trigger("chosen:showing_dropdown", {
|
987 |
+
chosen: this
|
988 |
+
});
|
989 |
+
};
|
990 |
+
|
991 |
+
Chosen.prototype.update_results_content = function(content) {
|
992 |
+
return this.search_results.html( content );
|
993 |
+
};
|
994 |
+
|
995 |
+
Chosen.prototype.results_hide = function() {
|
996 |
+
if (this.results_showing) {
|
997 |
+
this.result_clear_highlight();
|
998 |
+
this.container.removeClass( "chosen-with-drop" );
|
999 |
+
this.form_field_jq.trigger("chosen:hiding_dropdown", {
|
1000 |
+
chosen: this
|
1001 |
+
});
|
1002 |
+
}
|
1003 |
+
return this.results_showing = false;
|
1004 |
+
};
|
1005 |
+
|
1006 |
+
Chosen.prototype.set_tab_index = function(el) {
|
1007 |
+
var ti;
|
1008 |
+
if (this.form_field.tabIndex) {
|
1009 |
+
ti = this.form_field.tabIndex;
|
1010 |
+
this.form_field.tabIndex = -1;
|
1011 |
+
return this.search_field[0].tabIndex = ti;
|
1012 |
+
}
|
1013 |
+
};
|
1014 |
+
|
1015 |
+
Chosen.prototype.set_label_behavior = function() {
|
1016 |
+
this.form_field_label = this.form_field_jq.parents( "label" );
|
1017 |
+
if ( ! this.form_field_label.length && this.form_field.id.length) {
|
1018 |
+
this.form_field_label = $( "label[for='" + this.form_field.id + "']" );
|
1019 |
+
}
|
1020 |
+
if (this.form_field_label.length > 0) {
|
1021 |
+
return this.form_field_label.bind( 'click.chosen', this.label_click_handler );
|
1022 |
+
}
|
1023 |
+
};
|
1024 |
+
|
1025 |
+
Chosen.prototype.show_search_field_default = function() {
|
1026 |
+
if (this.is_multiple && this.choices_count() < 1 && ! this.active_field) {
|
1027 |
+
this.search_field.val( this.default_text );
|
1028 |
+
return this.search_field.addClass( "default" );
|
1029 |
+
} else {
|
1030 |
+
this.search_field.val( "" );
|
1031 |
+
return this.search_field.removeClass( "default" );
|
1032 |
+
}
|
1033 |
+
};
|
1034 |
+
|
1035 |
+
Chosen.prototype.search_results_mouseup = function(evt) {
|
1036 |
+
var target;
|
1037 |
+
target = $( evt.target ).hasClass( "active-result" ) ? $( evt.target ) : $( evt.target ).parents( ".active-result" ).first();
|
1038 |
+
if (target.length) {
|
1039 |
+
this.result_highlight = target;
|
1040 |
+
this.result_select( evt );
|
1041 |
+
return this.search_field.focus();
|
1042 |
+
}
|
1043 |
+
};
|
1044 |
+
|
1045 |
+
Chosen.prototype.search_results_mouseover = function(evt) {
|
1046 |
+
var target;
|
1047 |
+
target = $( evt.target ).hasClass( "active-result" ) ? $( evt.target ) : $( evt.target ).parents( ".active-result" ).first();
|
1048 |
+
if (target) {
|
1049 |
+
return this.result_do_highlight( target );
|
1050 |
+
}
|
1051 |
+
};
|
1052 |
+
|
1053 |
+
Chosen.prototype.search_results_mouseout = function(evt) {
|
1054 |
+
if ($( evt.target ).hasClass( "active-result" || $( evt.target ).parents( '.active-result' ).first() )) {
|
1055 |
+
return this.result_clear_highlight();
|
1056 |
+
}
|
1057 |
+
};
|
1058 |
+
|
1059 |
+
Chosen.prototype.choice_build = function(item) {
|
1060 |
+
var choice, close_link,
|
1061 |
+
_this = this;
|
1062 |
+
choice = $('<li />', {
|
1063 |
+
"class": "search-choice"
|
1064 |
+
}).html( "<span>" + (this.choice_label( item )) + "</span>" );
|
1065 |
+
if (item.disabled) {
|
1066 |
+
choice.addClass( 'search-choice-disabled' );
|
1067 |
+
} else {
|
1068 |
+
close_link = $('<a />', {
|
1069 |
+
"class": 'search-choice-close',
|
1070 |
+
'data-option-array-index': item.array_index
|
1071 |
+
});
|
1072 |
+
close_link.bind('click.chosen', function(evt) {
|
1073 |
+
return _this.choice_destroy_link_click( evt );
|
1074 |
+
});
|
1075 |
+
choice.append( close_link );
|
1076 |
+
}
|
1077 |
+
return this.search_container.before( choice );
|
1078 |
+
};
|
1079 |
+
|
1080 |
+
Chosen.prototype.choice_destroy_link_click = function(evt) {
|
1081 |
+
evt.preventDefault();
|
1082 |
+
evt.stopPropagation();
|
1083 |
+
if ( ! this.is_disabled) {
|
1084 |
+
return this.choice_destroy( $( evt.target ) );
|
1085 |
+
}
|
1086 |
+
};
|
1087 |
+
|
1088 |
+
Chosen.prototype.choice_destroy = function(link) {
|
1089 |
+
if (this.result_deselect( link[0].getAttribute( "data-option-array-index" ) )) {
|
1090 |
+
if (this.active_field) {
|
1091 |
+
this.search_field.focus();
|
1092 |
+
} else {
|
1093 |
+
this.show_search_field_default();
|
1094 |
+
}
|
1095 |
+
if (this.is_multiple && this.choices_count() > 0 && this.get_search_field_value().length < 1) {
|
1096 |
+
this.results_hide();
|
1097 |
+
}
|
1098 |
+
link.parents( 'li' ).first().remove();
|
1099 |
+
return this.search_field_scale();
|
1100 |
+
}
|
1101 |
+
};
|
1102 |
+
|
1103 |
+
Chosen.prototype.results_reset = function() {
|
1104 |
+
this.reset_single_select_options();
|
1105 |
+
this.form_field.options[0].selected = true;
|
1106 |
+
this.single_set_selected_text();
|
1107 |
+
this.show_search_field_default();
|
1108 |
+
this.results_reset_cleanup();
|
1109 |
+
this.trigger_form_field_change();
|
1110 |
+
if (this.active_field) {
|
1111 |
+
return this.results_hide();
|
1112 |
+
}
|
1113 |
+
};
|
1114 |
+
|
1115 |
+
Chosen.prototype.results_reset_cleanup = function() {
|
1116 |
+
this.current_selectedIndex = this.form_field.selectedIndex;
|
1117 |
+
return this.selected_item.find( "abbr" ).remove();
|
1118 |
+
};
|
1119 |
+
|
1120 |
+
Chosen.prototype.result_select = function(evt) {
|
1121 |
+
var high, item;
|
1122 |
+
if (this.result_highlight) {
|
1123 |
+
high = this.result_highlight;
|
1124 |
+
this.result_clear_highlight();
|
1125 |
+
if (this.is_multiple && this.max_selected_options <= this.choices_count()) {
|
1126 |
+
this.form_field_jq.trigger("chosen:maxselected", {
|
1127 |
+
chosen: this
|
1128 |
+
});
|
1129 |
+
return false;
|
1130 |
+
}
|
1131 |
+
if (this.is_multiple) {
|
1132 |
+
high.removeClass( "active-result" );
|
1133 |
+
} else {
|
1134 |
+
this.reset_single_select_options();
|
1135 |
+
}
|
1136 |
+
high.addClass( "result-selected" );
|
1137 |
+
item = this.results_data[high[0].getAttribute( "data-option-array-index" )];
|
1138 |
+
item.selected = true;
|
1139 |
+
this.form_field.options[item.options_index].selected = true;
|
1140 |
+
this.selected_option_count = null;
|
1141 |
+
if (this.is_multiple) {
|
1142 |
+
this.choice_build( item );
|
1143 |
+
} else {
|
1144 |
+
this.single_set_selected_text( this.choice_label( item ) );
|
1145 |
+
}
|
1146 |
+
if ( ! (this.is_multiple && ( ! this.hide_results_on_select || (evt.metaKey || evt.ctrlKey)))) {
|
1147 |
+
this.results_hide();
|
1148 |
+
this.show_search_field_default();
|
1149 |
+
}
|
1150 |
+
if (this.is_multiple || this.form_field.selectedIndex !== this.current_selectedIndex) {
|
1151 |
+
this.trigger_form_field_change({
|
1152 |
+
selected: this.form_field.options[item.options_index].value
|
1153 |
+
});
|
1154 |
+
}
|
1155 |
+
this.current_selectedIndex = this.form_field.selectedIndex;
|
1156 |
+
evt.preventDefault();
|
1157 |
+
return this.search_field_scale();
|
1158 |
+
}// End if().
|
1159 |
+
};
|
1160 |
+
|
1161 |
+
Chosen.prototype.single_set_selected_text = function(text) {
|
1162 |
+
if (text == null) {
|
1163 |
+
text = this.default_text;
|
1164 |
+
}
|
1165 |
+
if (text === this.default_text) {
|
1166 |
+
this.selected_item.addClass( "chosen-default" );
|
1167 |
+
} else {
|
1168 |
+
this.single_deselect_control_build();
|
1169 |
+
this.selected_item.removeClass( "chosen-default" );
|
1170 |
+
}
|
1171 |
+
return this.selected_item.find( "span" ).html( text );
|
1172 |
+
};
|
1173 |
+
|
1174 |
+
Chosen.prototype.result_deselect = function(pos) {
|
1175 |
+
var result_data;
|
1176 |
+
result_data = this.results_data[pos];
|
1177 |
+
if ( ! this.form_field.options[result_data.options_index].disabled) {
|
1178 |
+
result_data.selected = false;
|
1179 |
+
this.form_field.options[result_data.options_index].selected = false;
|
1180 |
+
this.selected_option_count = null;
|
1181 |
+
this.result_clear_highlight();
|
1182 |
+
if (this.results_showing) {
|
1183 |
+
this.winnow_results();
|
1184 |
+
}
|
1185 |
+
this.trigger_form_field_change({
|
1186 |
+
deselected: this.form_field.options[result_data.options_index].value
|
1187 |
+
});
|
1188 |
+
this.search_field_scale();
|
1189 |
+
return true;
|
1190 |
+
} else {
|
1191 |
+
return false;
|
1192 |
+
}
|
1193 |
+
};
|
1194 |
+
|
1195 |
+
Chosen.prototype.single_deselect_control_build = function() {
|
1196 |
+
if ( ! this.allow_single_deselect) {
|
1197 |
+
return;
|
1198 |
+
}
|
1199 |
+
if ( ! this.selected_item.find( "abbr" ).length) {
|
1200 |
+
this.selected_item.find( "span" ).first().after( "<abbr class=\"search-choice-close\"></abbr>" );
|
1201 |
+
}
|
1202 |
+
return this.selected_item.addClass( "chosen-single-with-deselect" );
|
1203 |
+
};
|
1204 |
+
|
1205 |
+
Chosen.prototype.get_search_field_value = function() {
|
1206 |
+
return this.search_field.val();
|
1207 |
+
};
|
1208 |
+
|
1209 |
+
Chosen.prototype.get_search_text = function() {
|
1210 |
+
return this.escape_html( $.trim( this.get_search_field_value() ) );
|
1211 |
+
};
|
1212 |
+
|
1213 |
+
Chosen.prototype.escape_html = function(text) {
|
1214 |
+
return $( '<div/>' ).text( text ).html();
|
1215 |
+
};
|
1216 |
+
|
1217 |
+
Chosen.prototype.winnow_results_set_highlight = function() {
|
1218 |
+
var do_high, selected_results;
|
1219 |
+
selected_results = ! this.is_multiple ? this.search_results.find( ".result-selected.active-result" ) : [];
|
1220 |
+
do_high = selected_results.length ? selected_results.first() : this.search_results.find( ".active-result" ).first();
|
1221 |
+
if (do_high != null) {
|
1222 |
+
return this.result_do_highlight( do_high );
|
1223 |
+
}
|
1224 |
+
};
|
1225 |
+
|
1226 |
+
Chosen.prototype.no_results = function(terms) {
|
1227 |
+
var no_results_html;
|
1228 |
+
no_results_html = this.get_no_results_html( terms );
|
1229 |
+
this.search_results.append( no_results_html );
|
1230 |
+
return this.form_field_jq.trigger("chosen:no_results", {
|
1231 |
+
chosen: this
|
1232 |
+
});
|
1233 |
+
};
|
1234 |
+
|
1235 |
+
Chosen.prototype.no_results_clear = function() {
|
1236 |
+
return this.search_results.find( ".no-results" ).remove();
|
1237 |
+
};
|
1238 |
+
|
1239 |
+
Chosen.prototype.keydown_arrow = function() {
|
1240 |
+
var next_sib;
|
1241 |
+
if (this.results_showing && this.result_highlight) {
|
1242 |
+
next_sib = this.result_highlight.nextAll( "li.active-result" ).first();
|
1243 |
+
if (next_sib) {
|
1244 |
+
return this.result_do_highlight( next_sib );
|
1245 |
+
}
|
1246 |
+
} else {
|
1247 |
+
return this.results_show();
|
1248 |
+
}
|
1249 |
+
};
|
1250 |
+
|
1251 |
+
Chosen.prototype.keyup_arrow = function() {
|
1252 |
+
var prev_sibs;
|
1253 |
+
if ( ! this.results_showing && ! this.is_multiple) {
|
1254 |
+
return this.results_show();
|
1255 |
+
} else if (this.result_highlight) {
|
1256 |
+
prev_sibs = this.result_highlight.prevAll( "li.active-result" );
|
1257 |
+
if (prev_sibs.length) {
|
1258 |
+
return this.result_do_highlight( prev_sibs.first() );
|
1259 |
+
} else {
|
1260 |
+
if (this.choices_count() > 0) {
|
1261 |
+
this.results_hide();
|
1262 |
+
}
|
1263 |
+
return this.result_clear_highlight();
|
1264 |
+
}
|
1265 |
+
}
|
1266 |
+
};
|
1267 |
+
|
1268 |
+
Chosen.prototype.keydown_backstroke = function() {
|
1269 |
+
var next_available_destroy;
|
1270 |
+
if (this.pending_backstroke) {
|
1271 |
+
this.choice_destroy( this.pending_backstroke.find( "a" ).first() );
|
1272 |
+
return this.clear_backstroke();
|
1273 |
+
} else {
|
1274 |
+
next_available_destroy = this.search_container.siblings( "li.search-choice" ).last();
|
1275 |
+
if (next_available_destroy.length && ! next_available_destroy.hasClass( "search-choice-disabled" )) {
|
1276 |
+
this.pending_backstroke = next_available_destroy;
|
1277 |
+
if (this.single_backstroke_delete) {
|
1278 |
+
return this.keydown_backstroke();
|
1279 |
+
} else {
|
1280 |
+
return this.pending_backstroke.addClass( "search-choice-focus" );
|
1281 |
+
}
|
1282 |
+
}
|
1283 |
+
}
|
1284 |
+
};
|
1285 |
+
|
1286 |
+
Chosen.prototype.clear_backstroke = function() {
|
1287 |
+
if (this.pending_backstroke) {
|
1288 |
+
this.pending_backstroke.removeClass( 'search-choice-focus' );
|
1289 |
+
}
|
1290 |
+
this.pending_backstroke = null;
|
1291 |
+
return this.pending_backstroke;
|
1292 |
+
};
|
1293 |
+
|
1294 |
+
Chosen.prototype.search_field_scale = function() {
|
1295 |
+
var container_width, div, style, style_block, styles, width, _i, _len;
|
1296 |
+
if ( ! this.is_multiple) {
|
1297 |
+
return;
|
1298 |
+
}
|
1299 |
+
style_block = {
|
1300 |
+
position: 'absolute',
|
1301 |
+
left: '-1000px',
|
1302 |
+
top: '-1000px',
|
1303 |
+
display: 'none',
|
1304 |
+
whiteSpace: 'pre'
|
1305 |
+
};
|
1306 |
+
styles = ['fontSize', 'fontStyle', 'fontWeight', 'fontFamily', 'lineHeight', 'textTransform', 'letterSpacing'];
|
1307 |
+
for (_i = 0, _len = styles.length; _i < _len; _i++) {
|
1308 |
+
style = styles[_i];
|
1309 |
+
style_block[style] = this.search_field.css( style );
|
1310 |
+
}
|
1311 |
+
div = $( '<div />' ).css( style_block );
|
1312 |
+
div.text( this.get_search_field_value() );
|
1313 |
+
$( 'body' ).append( div );
|
1314 |
+
width = div.width() + 25;
|
1315 |
+
div.remove();
|
1316 |
+
container_width = this.container.outerWidth();
|
1317 |
+
width = Math.min( container_width - 10, width );
|
1318 |
+
return this.search_field.width( width );
|
1319 |
+
};
|
1320 |
+
|
1321 |
+
Chosen.prototype.trigger_form_field_change = function(extra) {
|
1322 |
+
this.form_field_jq.trigger( 'input', extra );
|
1323 |
+
return this.form_field_jq.trigger( 'change', extra );
|
1324 |
+
};
|
1325 |
+
|
1326 |
+
return Chosen;
|
1327 |
+
|
1328 |
+
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Core Library for managing feedzy custom post page js actions.
|
3 |
+
* import-metabox-edit.js
|
4 |
+
*
|
5 |
+
* @since 1.2.0
|
6 |
+
* @package feedzy-rss-feeds-pro
|
7 |
+
*/
|
8 |
+
/* global jQuery, ajaxurl, feedzy */
|
9 |
+
(function($){
|
10 |
+
function scroll_to_class(element_class, removed_height) {
|
11 |
+
var scroll_to = $( element_class ).offset().top - removed_height;
|
12 |
+
if ($( window ).scrollTop() !== scroll_to) {
|
13 |
+
$( 'html, body' ).stop().animate( {scrollTop: scroll_to}, 0 );
|
14 |
+
}
|
15 |
+
}
|
16 |
+
|
17 |
+
function bar_progress(progress_line_object, direction) {
|
18 |
+
var number_of_steps = progress_line_object.data( 'number-of-steps' );
|
19 |
+
var now_value = progress_line_object.data( 'now-value' );
|
20 |
+
var new_value = 0;
|
21 |
+
if (direction === 'right') {
|
22 |
+
new_value = now_value + ( 100 / number_of_steps );
|
23 |
+
} else if (direction === 'left') {
|
24 |
+
new_value = now_value - ( 100 / number_of_steps );
|
25 |
+
}
|
26 |
+
progress_line_object.attr( 'style', 'width: ' + new_value + '%;' ).data( 'now-value', new_value );
|
27 |
+
}
|
28 |
+
|
29 |
+
function add_source() {
|
30 |
+
var field_name = $( this ).data( 'field-name' );
|
31 |
+
var field_tag = $( this ).data( 'field-tag' );
|
32 |
+
$( '[name="feedzy_meta_data[' + field_name + ']"]' ).val( field_tag );
|
33 |
+
$( '[name="feedzy_meta_data[' + field_name + ']"]' ).focus();
|
34 |
+
return false;
|
35 |
+
}
|
36 |
+
|
37 |
+
function append_tag() {
|
38 |
+
var field_name = $( this ).data( 'field-name' );
|
39 |
+
var field_tag = $( this ).data( 'field-tag' );
|
40 |
+
if ( field_name === 'import_post_date' ) {
|
41 |
+
$( '[name="feedzy_meta_data[' + field_name + ']"]' ).val( '[#' + field_tag + ']' );
|
42 |
+
} else {
|
43 |
+
var current_value = $( '[name="feedzy_meta_data[' + field_name + ']"]' ).val();
|
44 |
+
$( '[name="feedzy_meta_data[' + field_name + ']"]' ).val( current_value + '[#' + field_tag + ']' );
|
45 |
+
}
|
46 |
+
$( '[data-toggle="dropdown"]' ).parent().removeClass( 'open' );
|
47 |
+
$( '[name="feedzy_meta_data[' + field_name + ']"]' ).focus();
|
48 |
+
return false;
|
49 |
+
}
|
50 |
+
|
51 |
+
function remove_row() {
|
52 |
+
$( this ).closest( '.row' ).remove();
|
53 |
+
return false;
|
54 |
+
}
|
55 |
+
|
56 |
+
function new_row() {
|
57 |
+
var html_row = '';
|
58 |
+
html_row = $( '#new_field_tpl' ).html();
|
59 |
+
$( '.custom_fields' ).append( html_row );
|
60 |
+
$( '.btn.btn-remove-fields' ).on( 'click', remove_row );
|
61 |
+
return false;
|
62 |
+
}
|
63 |
+
|
64 |
+
function update_status() {
|
65 |
+
var post_id = $( this ).val();
|
66 |
+
var status = $( this ).is( ':checked' );
|
67 |
+
|
68 |
+
var data = {
|
69 |
+
'action': 'import_status',
|
70 |
+
'id': post_id,
|
71 |
+
'status': status
|
72 |
+
};
|
73 |
+
|
74 |
+
// since 2.8 ajaxurl is always defined in the admin header and points to admin-ajax.php
|
75 |
+
$.post( ajaxurl, data, function() {} );
|
76 |
+
return true;
|
77 |
+
}
|
78 |
+
|
79 |
+
function toggle_dropdown() {
|
80 |
+
$( this ).parent().toggleClass( 'open' );
|
81 |
+
}
|
82 |
+
|
83 |
+
function in_array( $key, $array ) {
|
84 |
+
if(typeof $array === 'undefined' || $array.length === 0 || $key === ''){
|
85 |
+
return false;
|
86 |
+
}
|
87 |
+
for(var i = 0; i < $array.length; i++){
|
88 |
+
if($array[i] === $key){
|
89 |
+
return true;
|
90 |
+
}
|
91 |
+
}
|
92 |
+
return false;
|
93 |
+
}
|
94 |
+
|
95 |
+
function update_taxonomy() {
|
96 |
+
var selected = $( this ).val();
|
97 |
+
var tax_selected = $( this ).data( 'tax' );
|
98 |
+
if(typeof tax_selected !== 'undefined'){
|
99 |
+
tax_selected = tax_selected.split(',');
|
100 |
+
}else{
|
101 |
+
tax_selected = '';
|
102 |
+
}
|
103 |
+
|
104 |
+
var data = {
|
105 |
+
'action': 'get_taxonomies',
|
106 |
+
'post_type': selected
|
107 |
+
};
|
108 |
+
|
109 |
+
$( '#feedzy_post_terms' ).html( $( '#loading_select_tpl' ).html() ).trigger( 'chosen:updated' );
|
110 |
+
|
111 |
+
$.post( ajaxurl, data, function(response) {
|
112 |
+
var taxonomies = JSON.parse( response );
|
113 |
+
var show_terms = true;
|
114 |
+
|
115 |
+
var options = '';
|
116 |
+
if ( taxonomies.length !== 0 ) {
|
117 |
+
$.each(taxonomies, function ( index, terms ) {
|
118 |
+
if ( terms.length !== 0 ) {
|
119 |
+
options += '<optgroup label="' + index + '">';
|
120 |
+
$.each(terms, function (i, term) {
|
121 |
+
var sel_option = '';
|
122 |
+
if ( in_array( index + '_' + term.term_id, tax_selected ) ) {
|
123 |
+
sel_option = 'selected';
|
124 |
+
}
|
125 |
+
options += '<option value="' + index + '_' + term.term_id + '" ' + sel_option + '>' + term.name + '</option>';
|
126 |
+
});
|
127 |
+
options += '</optgroup>';
|
128 |
+
}
|
129 |
+
});
|
130 |
+
} else {
|
131 |
+
show_terms = false;
|
132 |
+
options = $( '#empty_select_tpl' ).html();
|
133 |
+
}
|
134 |
+
|
135 |
+
$( '#feedzy_post_terms' ).html( options ).trigger( 'chosen:updated' );
|
136 |
+
});
|
137 |
+
return true;
|
138 |
+
}
|
139 |
+
|
140 |
+
$( document ).ready(function() {
|
141 |
+
$( 'button.btn-submit' ).on( 'click', function( e ) {
|
142 |
+
$( window ).unbind( 'beforeunload' );
|
143 |
+
$( '#custom_post_status' ).val( $( this ).val() );
|
144 |
+
e.preventDefault();
|
145 |
+
$( '#post' ).submit();
|
146 |
+
return false;
|
147 |
+
} );
|
148 |
+
|
149 |
+
$( 'a.dropdown-item' ).on( 'click', append_tag );
|
150 |
+
$( 'a.dropdown-item.source' ).on( 'click', add_source );
|
151 |
+
$( '.btn.btn-remove-fields' ).on( 'click', remove_row );
|
152 |
+
$( '#new_custom_fields' ).on( 'click', new_row );
|
153 |
+
|
154 |
+
$( '.feedzy-toggle' ).on( 'click', update_status );
|
155 |
+
$( '.dropdown-toggle' ).on( 'click', toggle_dropdown );
|
156 |
+
if ( $( '#toplevel_page_feedzy-admin-menu li' ).hasClass( 'current' ) ) {
|
157 |
+
$( '#toplevel_page_feedzy-admin-menu' ).removeClass( 'wp-not-current-submenu' ).addClass( 'wp-has-current-submenu' );
|
158 |
+
}
|
159 |
+
$( '.feedzy-chosen' ).chosen( { width: '100%' } );
|
160 |
+
$( '#feedzy_post_type' ).on( 'change', update_taxonomy );
|
161 |
+
$( '#feedzy_post_type' ).trigger( 'change' );
|
162 |
+
$( '#feedzy_post_status' ).trigger( 'change' );
|
163 |
+
|
164 |
+
/*
|
165 |
+
Form
|
166 |
+
*/
|
167 |
+
$( '.f1 fieldset:first' ).fadeIn( 'slow' );
|
168 |
+
|
169 |
+
// next step
|
170 |
+
$( '.f1 .btn-next' ).on('click', function() {
|
171 |
+
var parent_fieldset = $( this ).parents( 'fieldset' );
|
172 |
+
var next_step = true;
|
173 |
+
// navigation steps / progress steps
|
174 |
+
var current_active_step = $( this ).parents( '.f1' ).find( '.f1-step.active' );
|
175 |
+
var progress_line = $( this ).parents( '.f1' ).find( '.f1-progress-line' );
|
176 |
+
|
177 |
+
// fields validation
|
178 |
+
if ( next_step ) {
|
179 |
+
parent_fieldset.fadeOut(400, function() {
|
180 |
+
// change icons
|
181 |
+
current_active_step.removeClass( 'active' ).addClass( 'activated' ).next().addClass( 'active' );
|
182 |
+
// progress bar
|
183 |
+
bar_progress( progress_line, 'right' );
|
184 |
+
// show next step
|
185 |
+
$( this ).next().fadeIn();
|
186 |
+
// scroll window to beginning of the form
|
187 |
+
scroll_to_class( $( '.f1' ), 20 );
|
188 |
+
});
|
189 |
+
}
|
190 |
+
|
191 |
+
});
|
192 |
+
|
193 |
+
// previous step
|
194 |
+
$( '.f1 .btn-previous' ).on('click', function() {
|
195 |
+
// navigation steps / progress steps
|
196 |
+
var current_active_step = $( this ).parents( '.f1' ).find( '.f1-step.active' );
|
197 |
+
var progress_line = $( this ).parents( '.f1' ).find( '.f1-progress-line' );
|
198 |
+
|
199 |
+
$( this ).parents( 'fieldset' ).fadeOut(400, function() {
|
200 |
+
// change icons
|
201 |
+
current_active_step.removeClass( 'active' ).prev().removeClass( 'activated' ).addClass( 'active' );
|
202 |
+
// progress bar
|
203 |
+
bar_progress( progress_line, 'left' );
|
204 |
+
// show previous step
|
205 |
+
$( this ).prev().fadeIn();
|
206 |
+
// scroll window to beginning of the form
|
207 |
+
scroll_to_class( $( '.f1' ), 20 );
|
208 |
+
});
|
209 |
+
});
|
210 |
+
|
211 |
+
// run now.
|
212 |
+
$('.feedzy-run-now').on('click', function(e){
|
213 |
+
e.preventDefault();
|
214 |
+
var button = $(this);
|
215 |
+
showSpinner(button);
|
216 |
+
button.parent().find('.feedzy-error').remove();
|
217 |
+
$.ajax({
|
218 |
+
url : ajaxurl,
|
219 |
+
method : 'post',
|
220 |
+
data : {
|
221 |
+
security : feedzy.ajax.security,
|
222 |
+
id : $(this).attr('data-id'),
|
223 |
+
action : 'run_now'
|
224 |
+
},
|
225 |
+
success: function(data){
|
226 |
+
hideSpinner(button);
|
227 |
+
button.after($('<div class="feedzy-error feedzy-error-critical">' + data.data.msg + '</div>'));
|
228 |
+
}
|
229 |
+
});
|
230 |
+
});
|
231 |
+
|
232 |
+
});
|
233 |
+
|
234 |
+
function showSpinner(el){
|
235 |
+
el.parent().find('.feedzy-spinner').addClass('is-active');
|
236 |
+
}
|
237 |
+
function hideSpinner(el){
|
238 |
+
el.parent().find('.feedzy-spinner').removeClass('is-active');
|
239 |
+
}
|
240 |
+
})(jQuery, feedzy);
|
includes/views/misc-view.php
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$canonical_checked = '';
|
3 |
+
if ( isset( $this->free_settings['canonical'] ) && 1 === intval( $this->free_settings['canonical'] ) ) {
|
4 |
+
$canonical_checked = 'checked';
|
5 |
+
}
|
6 |
+
?>
|
7 |
+
<h2><?php echo __( 'Import Posts', 'feedzy-rss-feeds' ); ?></h2>
|
8 |
+
<div class="fz-form-group">
|
9 |
+
<input type="checkbox" id="canonical" class="fz-form-control" name="canonical"
|
10 |
+
value="1" <?php echo $canonical_checked; ?> />
|
11 |
+
<label><?php echo __( 'Add canonical URL to imported posts from RSS feeds.', 'feedzy-rss-feeds' ); ?></label>
|
12 |
+
|
13 |
+
</div>
|
readme.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
# RSS Aggregator by Feedzy - Powerful WP Autoblogging and News Aggregator #
|
2 |
-
**Contributors:** [themeisle](https://profiles.wordpress.org/themeisle), [codeinwp](https://profiles.wordpress.org/codeinwp), [hardeepasrani](https://profiles.wordpress.org/hardeepasrani), [
|
3 |
**Tags:** rss aggregator, news aggregator, autoblogging, feed to post, rss import
|
4 |
**Requires at least:** 3.7
|
5 |
**Requires PHP:** 5.3
|
@@ -160,6 +160,8 @@ This plugin is maintained and supported by Themeisle, check out some of the othe
|
|
160 |
|
161 |
|
162 |
|
|
|
|
|
163 |
### Is it responsive friendly? ###
|
164 |
|
165 |
Yes it is.
|
@@ -444,6 +446,12 @@ You have to check first if your feed is valid. Please test it here: https://vali
|
|
444 |
= How to change the date format RSS items in Feedzy =
|
445 |
[https://docs.themeisle.com/article/1200-how-to-change-the-date-format-for-rss-items-in-feedzy](https://docs.themeisle.com/article/1200-how-to-change-the-date-format-for-rss-items-in-feedzy)
|
446 |
|
|
|
|
|
|
|
|
|
|
|
|
|
447 |
== Screenshots ==
|
448 |
|
449 |
1. Simple example
|
@@ -453,6 +461,20 @@ You have to check first if your feed is valid. Please test it here: https://vali
|
|
453 |
|
454 |
|
455 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
456 |
### 3.3.19 - 2020-04-08 ###
|
457 |
|
458 |
* Tested up to 5.4
|
@@ -924,4 +946,4 @@ You have to check first if your feed is valid. Please test it here: https://vali
|
|
924 |
* IMPORTANT: You have to reactivate the plugin after its update!
|
925 |
|
926 |
### 1.0 ###
|
927 |
-
* First release.
|
1 |
# RSS Aggregator by Feedzy - Powerful WP Autoblogging and News Aggregator #
|
2 |
+
**Contributors:** [themeisle](https://profiles.wordpress.org/themeisle), [codeinwp](https://profiles.wordpress.org/codeinwp), [hardeepasrani](https://profiles.wordpress.org/hardeepasrani), [rozroz](https://profiles.wordpress.org/rozroz)
|
3 |
**Tags:** rss aggregator, news aggregator, autoblogging, feed to post, rss import
|
4 |
**Requires at least:** 3.7
|
5 |
**Requires PHP:** 5.3
|
160 |
|
161 |
|
162 |
|
163 |
+
|
164 |
+
|
165 |
### Is it responsive friendly? ###
|
166 |
|
167 |
Yes it is.
|
446 |
= How to change the date format RSS items in Feedzy =
|
447 |
[https://docs.themeisle.com/article/1200-how-to-change-the-date-format-for-rss-items-in-feedzy](https://docs.themeisle.com/article/1200-how-to-change-the-date-format-for-rss-items-in-feedzy)
|
448 |
|
449 |
+
= Lazy loading feed items with Feedzy =
|
450 |
+
[https://docs.themeisle.com/article/1220-lazy-loading-feed-items-with-feedzy](https://docs.themeisle.com/article/1220-lazy-loading-feed-items-with-feedzy)
|
451 |
+
|
452 |
+
= How to install and activate Feedzy Pro =
|
453 |
+
[https://docs.themeisle.com/article/1247-how-to-install-and-activate-feedzy-pro](https://docs.themeisle.com/article/1247-how-to-install-and-activate-feedzy-pro)
|
454 |
+
|
455 |
== Screenshots ==
|
456 |
|
457 |
1. Simple example
|
461 |
|
462 |
|
463 |
== Changelog ==
|
464 |
+
### 3.4.0 - 2020-05-28 ###
|
465 |
+
|
466 |
+
* - [Feat] Options to import feeds to posts
|
467 |
+
* - [Feat] New [#item_source] tag for Feed to Post to display the feed source name
|
468 |
+
* - [Feat] Improved Settings page style and layout
|
469 |
+
* - [Feat] Use SimplePieItem's get_id to determine the uniqueness of feed items
|
470 |
+
* - [Fix] WP 5.4 Feedzy block compatibility
|
471 |
+
* - [Fix] Feed Caching time stuck to 12 hours
|
472 |
+
* - [Fix] PHP Notice: Undefined index errors in the widget
|
473 |
+
* - [Fix] Bulk activation of plugin aborts activation of subsequent plugins
|
474 |
+
* - [Fix] Wrong shortcode mentioned in the Support tab
|
475 |
+
* - [Fix] Notice: Undefined index: host when item has no link element
|
476 |
+
|
477 |
+
|
478 |
### 3.3.19 - 2020-04-08 ###
|
479 |
|
480 |
* Tested up to 5.4
|
946 |
* IMPORTANT: You have to reactivate the plugin after its update!
|
947 |
|
948 |
### 1.0 ###
|
949 |
+
* First release.
|
readme.txt
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
=== RSS Aggregator by Feedzy - Powerful WP Autoblogging and News Aggregator ===
|
2 |
-
Contributors: themeisle,codeinwp,hardeepasrani,
|
3 |
Tags: rss aggregator, news aggregator, autoblogging, feed to post, rss import
|
4 |
Requires at least: 3.7
|
5 |
Requires PHP: 5.3
|
@@ -161,6 +161,7 @@ This plugin is maintained and supported by Themeisle, check out some of the othe
|
|
161 |
|
162 |
|
163 |
|
|
|
164 |
= Is it responsive friendly? =
|
165 |
|
166 |
Yes it is.
|
@@ -448,6 +449,9 @@ You have to check first if your feed is valid. Please test it here: https://vali
|
|
448 |
= Lazy loading feed items with Feedzy =
|
449 |
[https://docs.themeisle.com/article/1220-lazy-loading-feed-items-with-feedzy](https://docs.themeisle.com/article/1220-lazy-loading-feed-items-with-feedzy)
|
450 |
|
|
|
|
|
|
|
451 |
== Screenshots ==
|
452 |
|
453 |
1. Simple example
|
@@ -457,6 +461,20 @@ You have to check first if your feed is valid. Please test it here: https://vali
|
|
457 |
|
458 |
|
459 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
460 |
= 3.3.19 - 2020-04-08 =
|
461 |
|
462 |
* Tested up to 5.4
|
@@ -928,4 +946,4 @@ You have to check first if your feed is valid. Please test it here: https://vali
|
|
928 |
* IMPORTANT: You have to reactivate the plugin after its update!
|
929 |
|
930 |
= 1.0 =
|
931 |
-
* First release.
|
1 |
=== RSS Aggregator by Feedzy - Powerful WP Autoblogging and News Aggregator ===
|
2 |
+
Contributors: themeisle,codeinwp,hardeepasrani,rozroz
|
3 |
Tags: rss aggregator, news aggregator, autoblogging, feed to post, rss import
|
4 |
Requires at least: 3.7
|
5 |
Requires PHP: 5.3
|
161 |
|
162 |
|
163 |
|
164 |
+
|
165 |
= Is it responsive friendly? =
|
166 |
|
167 |
Yes it is.
|
449 |
= Lazy loading feed items with Feedzy =
|
450 |
[https://docs.themeisle.com/article/1220-lazy-loading-feed-items-with-feedzy](https://docs.themeisle.com/article/1220-lazy-loading-feed-items-with-feedzy)
|
451 |
|
452 |
+
= How to install and activate Feedzy Pro =
|
453 |
+
[https://docs.themeisle.com/article/1247-how-to-install-and-activate-feedzy-pro](https://docs.themeisle.com/article/1247-how-to-install-and-activate-feedzy-pro)
|
454 |
+
|
455 |
== Screenshots ==
|
456 |
|
457 |
1. Simple example
|
461 |
|
462 |
|
463 |
== Changelog ==
|
464 |
+
= 3.4.0 - 2020-05-28 =
|
465 |
+
|
466 |
+
* - [Feat] Options to import feeds to posts
|
467 |
+
* - [Feat] New [#item_source] tag for Feed to Post to display the feed source name
|
468 |
+
* - [Feat] Improved Settings page style and layout
|
469 |
+
* - [Feat] Use SimplePieItem's get_id to determine the uniqueness of feed items
|
470 |
+
* - [Fix] WP 5.4 Feedzy block compatibility
|
471 |
+
* - [Fix] Feed Caching time stuck to 12 hours
|
472 |
+
* - [Fix] PHP Notice: Undefined index errors in the widget
|
473 |
+
* - [Fix] Bulk activation of plugin aborts activation of subsequent plugins
|
474 |
+
* - [Fix] Wrong shortcode mentioned in the Support tab
|
475 |
+
* - [Fix] Notice: Undefined index: host when item has no link element
|
476 |
+
|
477 |
+
|
478 |
= 3.3.19 - 2020-04-08 =
|
479 |
|
480 |
* Tested up to 5.4
|
946 |
* IMPORTANT: You have to reactivate the plugin after its update!
|
947 |
|
948 |
= 1.0 =
|
949 |
+
* First release.
|
themeisle-hash.json
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"feedzy-rss-feed.php":"
|
1 |
+
{"feedzy-rss-feed.php":"970497daf806094d033d5f73c3acd972","index.php":"71c0755260138a4b7b2182c3c61179f6","uninstall.php":"cdb21f8648e005cbb9c73481d1750186"}
|
vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer' . '/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer' . '/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInitbb8ff899ef948419e9f376e88de1ad01::getLoader();
|
vendor/autoload_52.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInit87c75a2e2c105f87509a5fec49db9742::getLoader();
|
vendor/codeinwp/themeisle-sdk/CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
|
|
|
|
|
|
|
|
1 |
##### [Version 3.2.8](https://github.com/Codeinwp/themeisle-sdk/compare/v3.2.7...v3.2.8) (2020-03-24)
|
2 |
|
3 |
* change license handler method access
|
1 |
+
##### [Version 3.2.9](https://github.com/Codeinwp/themeisle-sdk/compare/v3.2.8...v3.2.9) (2020-05-18)
|
2 |
+
|
3 |
+
adds new endpoints
|
4 |
+
|
5 |
##### [Version 3.2.8](https://github.com/Codeinwp/themeisle-sdk/compare/v3.2.7...v3.2.8) (2020-03-24)
|
6 |
|
7 |
* change license handler method access
|
vendor/codeinwp/themeisle-sdk/load.php
CHANGED
@@ -14,7 +14,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
14 |
return;
|
15 |
}
|
16 |
// Current SDK version and path.
|
17 |
-
$themeisle_sdk_version = '3.2.
|
18 |
$themeisle_sdk_path = dirname( __FILE__ );
|
19 |
|
20 |
global $themeisle_sdk_max_version;
|
14 |
return;
|
15 |
}
|
16 |
// Current SDK version and path.
|
17 |
+
$themeisle_sdk_version = '3.2.9';
|
18 |
$themeisle_sdk_path = dirname( __FILE__ );
|
19 |
|
20 |
global $themeisle_sdk_max_version;
|
vendor/codeinwp/themeisle-sdk/src/Modules/Licenser.php
CHANGED
@@ -796,6 +796,7 @@ class Licenser extends Abstract_Module {
|
|
796 |
|
797 |
if ( false !== $namespace ) {
|
798 |
add_filter( 'themeisle_sdk_license_process_' . $namespace, [ $this, 'do_license_process' ], 10, 2 );
|
|
|
799 |
if ( defined( 'WP_CLI' ) && WP_CLI ) {
|
800 |
\WP_CLI::add_command( $namespace . ' activate', [ $this, 'cli_activate' ] );
|
801 |
\WP_CLI::add_command( $namespace . ' deactivate', [ $this, 'cli_deactivate' ] );
|
796 |
|
797 |
if ( false !== $namespace ) {
|
798 |
add_filter( 'themeisle_sdk_license_process_' . $namespace, [ $this, 'do_license_process' ], 10, 2 );
|
799 |
+
add_filter( 'product_' . $namespace . '_license_status', [ $this, 'get_license_status' ] );
|
800 |
if ( defined( 'WP_CLI' ) && WP_CLI ) {
|
801 |
\WP_CLI::add_command( $namespace . ' activate', [ $this, 'cli_activate' ] );
|
802 |
\WP_CLI::add_command( $namespace . ' deactivate', [ $this, 'cli_deactivate' ] );
|
vendor/codeinwp/themeisle-sdk/src/Modules/Logger.php
CHANGED
@@ -27,7 +27,7 @@ class Logger extends Abstract_Module {
|
|
27 |
/**
|
28 |
* Endpoint where to collect logs.
|
29 |
*/
|
30 |
-
const TRACKING_ENDPOINT = '
|
31 |
|
32 |
|
33 |
/**
|
@@ -90,19 +90,22 @@ class Logger extends Abstract_Module {
|
|
90 |
* @return bool Is logger active?
|
91 |
*/
|
92 |
private function is_logger_active() {
|
93 |
-
|
94 |
-
return true;
|
95 |
-
}
|
96 |
-
$pro_slug = $this->product->get_pro_slug();
|
97 |
|
98 |
-
if ( !
|
99 |
-
$
|
100 |
-
|
101 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
}
|
103 |
}
|
104 |
|
105 |
-
return ( get_option( $this->product->get_key() . '_logger_flag',
|
106 |
}
|
107 |
|
108 |
/**
|
@@ -151,6 +154,7 @@ class Logger extends Abstract_Module {
|
|
151 |
$environment['theme'] = array();
|
152 |
$environment['theme']['name'] = $theme->get( 'Name' );
|
153 |
$environment['theme']['author'] = $theme->get( 'Author' );
|
|
|
154 |
$environment['plugins'] = get_option( 'active_plugins' );
|
155 |
global $wp_version;
|
156 |
wp_remote_post(
|
@@ -159,14 +163,12 @@ class Logger extends Abstract_Module {
|
|
159 |
'method' => 'POST',
|
160 |
'timeout' => 3,
|
161 |
'redirection' => 5,
|
162 |
-
'headers' => array(
|
163 |
-
'X-ThemeIsle-Event' => 'log_site',
|
164 |
-
),
|
165 |
'body' => array(
|
166 |
'site' => get_site_url(),
|
167 |
'slug' => $this->product->get_slug(),
|
168 |
'version' => $this->product->get_version(),
|
169 |
'wp_version' => $wp_version,
|
|
|
170 |
'data' => apply_filters( $this->product->get_key() . '_logger_data', array() ),
|
171 |
'environment' => $environment,
|
172 |
'license' => apply_filters( $this->product->get_key() . '_license_status', '' ),
|
27 |
/**
|
28 |
* Endpoint where to collect logs.
|
29 |
*/
|
30 |
+
const TRACKING_ENDPOINT = 'https://api.themeisle.com/tracking/log';
|
31 |
|
32 |
|
33 |
/**
|
90 |
* @return bool Is logger active?
|
91 |
*/
|
92 |
private function is_logger_active() {
|
93 |
+
$default = 'no';
|
|
|
|
|
|
|
94 |
|
95 |
+
if ( ! $this->product->is_wordpress_available() ) {
|
96 |
+
$default = 'yes';
|
97 |
+
} else {
|
98 |
+
$pro_slug = $this->product->get_pro_slug();
|
99 |
+
|
100 |
+
if ( ! empty( $pro_slug ) ) {
|
101 |
+
$all_products = Loader::get_products();
|
102 |
+
if ( isset( $all_products[ $pro_slug ] ) ) {
|
103 |
+
$default = 'yes';
|
104 |
+
}
|
105 |
}
|
106 |
}
|
107 |
|
108 |
+
return ( get_option( $this->product->get_key() . '_logger_flag', $default ) === 'yes' );
|
109 |
}
|
110 |
|
111 |
/**
|
154 |
$environment['theme'] = array();
|
155 |
$environment['theme']['name'] = $theme->get( 'Name' );
|
156 |
$environment['theme']['author'] = $theme->get( 'Author' );
|
157 |
+
$environment['theme']['parent'] = $theme->parent() !== false ? $theme->parent()->get( 'Name' ) : $theme->get( 'Name' );
|
158 |
$environment['plugins'] = get_option( 'active_plugins' );
|
159 |
global $wp_version;
|
160 |
wp_remote_post(
|
163 |
'method' => 'POST',
|
164 |
'timeout' => 3,
|
165 |
'redirection' => 5,
|
|
|
|
|
|
|
166 |
'body' => array(
|
167 |
'site' => get_site_url(),
|
168 |
'slug' => $this->product->get_slug(),
|
169 |
'version' => $this->product->get_version(),
|
170 |
'wp_version' => $wp_version,
|
171 |
+
'locale' => get_locale(),
|
172 |
'data' => apply_filters( $this->product->get_key() . '_logger_data', array() ),
|
173 |
'environment' => $environment,
|
174 |
'license' => apply_filters( $this->product->get_key() . '_license_status', '' ),
|
vendor/codeinwp/themeisle-sdk/src/Modules/Uninstall_feedback.php
CHANGED
@@ -40,7 +40,7 @@ class Uninstall_Feedback extends Abstract_Module {
|
|
40 |
*
|
41 |
* @var string Endpoint url.
|
42 |
*/
|
43 |
-
const FEEDBACK_ENDPOINT = '
|
44 |
|
45 |
/**
|
46 |
* Default options for plugins.
|
@@ -698,6 +698,7 @@ class Uninstall_Feedback extends Abstract_Module {
|
|
698 |
'title' => 'Below is a detailed view of all data that ThemeIsle will receive if you fill in this survey. No domain name, email address or IP addresses are transmited after you submit the survey.',
|
699 |
'items' => [
|
700 |
sprintf( '%s %s version %s %s %s %s', '<strong>', ucwords( $this->product->get_type() ), '</strong>', '<code>', $this->product->get_version(), '</code>' ),
|
|
|
701 |
sprintf( '%s Uninstall reason %s %s Selected reason from the above survey %s ', '<strong>', '</strong>', '<i>', '</i>' ),
|
702 |
],
|
703 |
],
|
@@ -782,6 +783,7 @@ class Uninstall_Feedback extends Abstract_Module {
|
|
782 |
$version = $this->product->get_version();
|
783 |
$attributes['slug'] = $slug;
|
784 |
$attributes['version'] = $version;
|
|
|
785 |
|
786 |
$response = wp_remote_post(
|
787 |
self::FEEDBACK_ENDPOINT,
|
40 |
*
|
41 |
* @var string Endpoint url.
|
42 |
*/
|
43 |
+
const FEEDBACK_ENDPOINT = 'https://api.themeisle.com/tracking/uninstall';
|
44 |
|
45 |
/**
|
46 |
* Default options for plugins.
|
698 |
'title' => 'Below is a detailed view of all data that ThemeIsle will receive if you fill in this survey. No domain name, email address or IP addresses are transmited after you submit the survey.',
|
699 |
'items' => [
|
700 |
sprintf( '%s %s version %s %s %s %s', '<strong>', ucwords( $this->product->get_type() ), '</strong>', '<code>', $this->product->get_version(), '</code>' ),
|
701 |
+
sprintf( '%sCurrent website:%s %s %s %s', '<strong>', '</strong>', '<code>', get_site_url(), '</code>' ),
|
702 |
sprintf( '%s Uninstall reason %s %s Selected reason from the above survey %s ', '<strong>', '</strong>', '<i>', '</i>' ),
|
703 |
],
|
704 |
],
|
783 |
$version = $this->product->get_version();
|
784 |
$attributes['slug'] = $slug;
|
785 |
$attributes['version'] = $version;
|
786 |
+
$attributes['url'] = get_site_url();
|
787 |
|
788 |
$response = wp_remote_post(
|
789 |
self::FEEDBACK_ENDPOINT,
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -19,9 +19,9 @@ class ComposerAutoloaderInita10706ed67f4e2e516cd1a7d3bb6364e
|
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
-
spl_autoload_register(array('
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
-
spl_autoload_unregister(array('
|
25 |
|
26 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
27 |
foreach ($map as $namespace => $path) {
|
@@ -42,14 +42,14 @@ class ComposerAutoloaderInita10706ed67f4e2e516cd1a7d3bb6364e
|
|
42 |
|
43 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
44 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
45 |
-
|
46 |
}
|
47 |
|
48 |
return $loader;
|
49 |
}
|
50 |
}
|
51 |
|
52 |
-
function
|
53 |
{
|
54 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
55 |
require $file;
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInitbb8ff899ef948419e9f376e88de1ad01
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInitbb8ff899ef948419e9f376e88de1ad01', 'loadClassLoader'), true, true);
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInitbb8ff899ef948419e9f376e88de1ad01', 'loadClassLoader'));
|
25 |
|
26 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
27 |
foreach ($map as $namespace => $path) {
|
42 |
|
43 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
44 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
45 |
+
composerRequirebb8ff899ef948419e9f376e88de1ad01($fileIdentifier, $file);
|
46 |
}
|
47 |
|
48 |
return $loader;
|
49 |
}
|
50 |
}
|
51 |
|
52 |
+
function composerRequirebb8ff899ef948419e9f376e88de1ad01($fileIdentifier, $file)
|
53 |
{
|
54 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
55 |
require $file;
|
vendor/composer/autoload_real_52.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real_52.php generated by xrstf/composer-php52
|
4 |
|
5 |
-
class
|
6 |
private static $loader;
|
7 |
|
8 |
public static function loadClassLoader($class) {
|
@@ -19,9 +19,9 @@ class ComposerAutoloaderInitac2c9200e7ae30bfadcb0fa3236dee73 {
|
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
-
spl_autoload_register(array('
|
23 |
self::$loader = $loader = new xrstf_Composer52_ClassLoader();
|
24 |
-
spl_autoload_unregister(array('
|
25 |
|
26 |
$vendorDir = dirname(dirname(__FILE__));
|
27 |
$baseDir = dirname($vendorDir);
|
2 |
|
3 |
// autoload_real_52.php generated by xrstf/composer-php52
|
4 |
|
5 |
+
class ComposerAutoloaderInit87c75a2e2c105f87509a5fec49db9742 {
|
6 |
private static $loader;
|
7 |
|
8 |
public static function loadClassLoader($class) {
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInit87c75a2e2c105f87509a5fec49db9742', 'loadClassLoader'), true /*, true */);
|
23 |
self::$loader = $loader = new xrstf_Composer52_ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit87c75a2e2c105f87509a5fec49db9742', 'loadClassLoader'));
|
25 |
|
26 |
$vendorDir = dirname(dirname(__FILE__));
|
27 |
$baseDir = dirname($vendorDir);
|
vendor/composer/installed.json
CHANGED
@@ -6,12 +6,12 @@
|
|
6 |
"source": {
|
7 |
"type": "git",
|
8 |
"url": "https://github.com/Codeinwp/themeisle-sdk.git",
|
9 |
-
"reference": "
|
10 |
},
|
11 |
"dist": {
|
12 |
"type": "zip",
|
13 |
-
"url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/
|
14 |
-
"reference": "
|
15 |
"shasum": ""
|
16 |
},
|
17 |
"require-dev": {
|
@@ -19,7 +19,7 @@
|
|
19 |
"squizlabs/php_codesniffer": "^3.1",
|
20 |
"wp-coding-standards/wpcs": "^1.0.0"
|
21 |
},
|
22 |
-
"time": "2020-
|
23 |
"type": "library",
|
24 |
"installation-source": "source",
|
25 |
"notification-url": "https://packagist.org/downloads/",
|
6 |
"source": {
|
7 |
"type": "git",
|
8 |
"url": "https://github.com/Codeinwp/themeisle-sdk.git",
|
9 |
+
"reference": "5923b377554028b3e2c2e98a5f752b9bcd23d4da"
|
10 |
},
|
11 |
"dist": {
|
12 |
"type": "zip",
|
13 |
+
"url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/5923b377554028b3e2c2e98a5f752b9bcd23d4da",
|
14 |
+
"reference": "5923b377554028b3e2c2e98a5f752b9bcd23d4da",
|
15 |
"shasum": ""
|
16 |
},
|
17 |
"require-dev": {
|
19 |
"squizlabs/php_codesniffer": "^3.1",
|
20 |
"wp-coding-standards/wpcs": "^1.0.0"
|
21 |
},
|
22 |
+
"time": "2020-05-18 16:59:05",
|
23 |
"type": "library",
|
24 |
"installation-source": "source",
|
25 |
"notification-url": "https://packagist.org/downloads/",
|