Version Description
General
- Enhance "Image Accordion" widget with new image border controller.
- Fix "Site Logo" link issue by changing the way the logo is loaded.
- Update plugin setup process.
Download this release
Release Info
Developer | ramiy |
Plugin | Press Elements – Widgets for Elementor |
Version | 1.6.1 |
Comparing to | |
See all releases |
Code changes from version 1.6.0 to 1.6.1
- language/press-elements.pot +952 -956
- press-elements-admin.php +1 -3
- press-elements-freemius.php +57 -46
- press-elements-plugin.php +21 -41
- press-elements.php +8 -6
- readme.txt +30 -10
- widgets/advanced-custom-fields.php +15 -15
- widgets/before-after-effect.php +11 -11
- widgets/flickr.php +11 -11
- widgets/gravatar.php +11 -11
- widgets/image-accordion.php +11 -11
- widgets/notes.php +11 -11
- widgets/pinterest.php +11 -11
- widgets/post-author.php +477 -477
- widgets/post-comments.php +84 -84
- widgets/post-custom-field.php +11 -11
- widgets/post-date.php +326 -326
- widgets/post-featured-image.php +374 -374
- widgets/post-terms.php +282 -282
- widgets/post-title.php +285 -285
- widgets/site-counters.php +363 -363
- widgets/site-description.php +257 -257
- widgets/site-logo.php +341 -337
- widgets/site-title.php +257 -257
language/press-elements.pot
CHANGED
@@ -1,956 +1,952 @@
|
|
1 |
-
# Copyright (C) 2017 Press Elements
|
2 |
-
# This file is distributed under the same license as the Press Elements package.
|
3 |
-
msgid ""
|
4 |
-
msgstr ""
|
5 |
-
"Project-Id-Version: Press Elements\n"
|
6 |
-
"MIME-Version: 1.0\n"
|
7 |
-
"Content-Type: text/plain; charset=UTF-8\n"
|
8 |
-
"Content-Transfer-Encoding: 8bit\n"
|
9 |
-
"PO-Revision-Date: 2017-MO-DA HO:MI+ZONE\n"
|
10 |
-
"Language-Team: Rami Yushuvaev <r_a_m_i@hotmail.com>\n"
|
11 |
-
"X-Poedit-Basepath: ..\n"
|
12 |
-
"X-Poedit-SourceCharset: UTF-8\n"
|
13 |
-
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
|
14 |
-
"X-Poedit-SearchPath-0: .\n"
|
15 |
-
"X-Poedit-SearchPathExcluded-0: *.js\n"
|
16 |
-
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
17 |
-
|
18 |
-
#: press-elements-admin.php:119, press-elements-admin.php:261, press-elements-freemius.php:
|
19 |
-
msgid "Press Elements - Widgets for Elementor"
|
20 |
-
msgstr ""
|
21 |
-
|
22 |
-
#: press-elements-admin.php:121, press-elements.php:
|
23 |
-
msgid "Press Elements"
|
24 |
-
msgstr ""
|
25 |
-
|
26 |
-
#: press-elements-admin.php:163
|
27 |
-
msgid "About"
|
28 |
-
msgstr ""
|
29 |
-
|
30 |
-
#: press-elements-admin.php:165, press-elements-admin.php:689
|
31 |
-
msgid "Getting Started"
|
32 |
-
msgstr ""
|
33 |
-
|
34 |
-
#: press-elements-admin.php:167, press-elements-admin.php:843
|
35 |
-
msgid "Changelog"
|
36 |
-
msgstr ""
|
37 |
-
|
38 |
-
#: press-elements-admin.php:169
|
39 |
-
msgid "Pricing"
|
40 |
-
msgstr ""
|
41 |
-
|
42 |
-
#: press-elements-admin.php:171
|
43 |
-
msgid "Account"
|
44 |
-
msgstr ""
|
45 |
-
|
46 |
-
#: press-elements-admin.php:173
|
47 |
-
msgid "Support Forum"
|
48 |
-
msgstr ""
|
49 |
-
|
50 |
-
#: press-elements-admin.php:265
|
51 |
-
msgid "Easy-to-use widgets that help you display and design your content using Elementor page builder."
|
52 |
-
msgstr ""
|
53 |
-
|
54 |
-
#: press-elements-admin.php:273
|
55 |
-
msgid "Press Elements combines the simplicity of Elementor with the efficiency of the built-in WordPress theme components."
|
56 |
-
msgstr ""
|
57 |
-
|
58 |
-
#: press-elements-admin.php:285
|
59 |
-
msgid "WordPress Elements"
|
60 |
-
msgstr ""
|
61 |
-
|
62 |
-
#: press-elements-admin.php:289
|
63 |
-
msgid "When you create a new post (or a page) on WordPress, you choose a title, write an excerpt, select a publish date, add an author, choose featured image, select several taxonomies and maybe you define some custom fields."
|
64 |
-
msgstr ""
|
65 |
-
|
66 |
-
#: press-elements-admin.php:293
|
67 |
-
msgid "In the Elementor page builder you can't display and style those components. You need to repeat the process and manually add a title, write the excerpt and add images."
|
68 |
-
msgstr ""
|
69 |
-
|
70 |
-
#: press-elements-admin.php:297
|
71 |
-
msgid "That's where Press Elements comes in handy. The plugin adds smart widgets that let you display those post components. Now you can drag a \"Post Title\" widget and style it your way. The widget will automatically insert the title used as the post title. Same applies for all the other post components."
|
72 |
-
msgstr ""
|
73 |
-
|
74 |
-
#: press-elements-admin.php:301
|
75 |
-
msgid "Dynamic Content"
|
76 |
-
msgstr ""
|
77 |
-
|
78 |
-
#: press-elements-admin.php:305
|
79 |
-
msgid "Regular Elementor widgets save the data as hard-coded content in the database. To change something you need to open the page builder and manually change the element inside the builder. Updating post titles, excerpts, authors and other WordPress Element won't affect the builder."
|
80 |
-
msgstr ""
|
81 |
-
|
82 |
-
#: press-elements-admin.php:309
|
83 |
-
msgid "Press Elements uses dynamic content architecture. It doesn't save the title and other element as hard-coded content. It generates them on-the-fly. Just like the WordPress theme system."
|
84 |
-
msgstr ""
|
85 |
-
|
86 |
-
#: press-elements-admin.php:313
|
87 |
-
msgid "When you change post titles and other post elements from your WordPress dashboard (outside of Elementor), they will be automatically updated in the content area and in the page builder."
|
88 |
-
msgstr ""
|
89 |
-
|
90 |
-
#: press-elements-admin.php:317
|
91 |
-
msgid "For example, you can bulk edit several posts from your sites dashboard to change the author, post that use \"Post Author\" widget will be automatically updates with the new data."
|
92 |
-
msgstr ""
|
93 |
-
|
94 |
-
#: press-elements-admin.php:321
|
95 |
-
msgid "Template Design"
|
96 |
-
msgstr ""
|
97 |
-
|
98 |
-
#: press-elements-admin.php:325
|
99 |
-
msgid "When using page builders, you need to create all the page element for each page over and over again. Currently you can't design single page templates and apply the design on the post. When you use the template system you need to manually change titles and images for each post/page."
|
100 |
-
msgstr ""
|
101 |
-
|
102 |
-
#: press-elements-admin.php:329
|
103 |
-
msgid "With Press Elements you can create custom designs with post elements and save them as template. When you apply the template on other posts, it will inherit the data from the new post. No more manual updates!"
|
104 |
-
msgstr ""
|
105 |
-
|
106 |
-
#: press-elements-admin.php:333
|
107 |
-
msgid "You don't need to hire developers to generate custom page templates - with Press Elements you can do it using a simple drag & drop interface! Now you can design different templates for different blog posts, pages and other Post Types. When creating new posts, load your predefined templates from your template library."
|
108 |
-
msgstr ""
|
109 |
-
|
110 |
-
#: press-elements-admin.php:337
|
111 |
-
msgid "With Press Elements you can use Elementor widgets to display and design your post elements! Just like developers use theme-functions to generate themes. How cool is that?!"
|
112 |
-
msgstr ""
|
113 |
-
|
114 |
-
#: press-elements-admin.php:341
|
115 |
-
msgid "Included Widgets"
|
116 |
-
msgstr ""
|
117 |
-
|
118 |
-
#: press-elements-admin.php:345, press-elements-admin.php:413
|
119 |
-
msgid "Site Elements:"
|
120 |
-
msgstr ""
|
121 |
-
|
122 |
-
#: press-elements-admin.php:349, widgets/site-title.php:
|
123 |
-
msgid "Site Title"
|
124 |
-
msgstr ""
|
125 |
-
|
126 |
-
#: press-elements-admin.php:351, widgets/site-description.php:
|
127 |
-
msgid "Site Description"
|
128 |
-
msgstr ""
|
129 |
-
|
130 |
-
#: press-elements-admin.php:353, widgets/site-logo.php:
|
131 |
-
msgid "Site Logo"
|
132 |
-
msgstr ""
|
133 |
-
|
134 |
-
#: press-elements-admin.php:355, widgets/site-counters.php:
|
135 |
-
msgid "Site Counters"
|
136 |
-
msgstr ""
|
137 |
-
|
138 |
-
#: press-elements-admin.php:359
|
139 |
-
msgid "Post Elements:"
|
140 |
-
msgstr ""
|
141 |
-
|
142 |
-
#: press-elements-admin.php:363
|
143 |
-
msgid "Post Title"
|
144 |
-
msgstr ""
|
145 |
-
|
146 |
-
#: press-elements-admin.php:365
|
147 |
-
msgid "Post Excerpt"
|
148 |
-
msgstr ""
|
149 |
-
|
150 |
-
#: press-elements-admin.php:367
|
151 |
-
msgid "Post Date"
|
152 |
-
msgstr ""
|
153 |
-
|
154 |
-
#: press-elements-admin.php:369
|
155 |
-
msgid "Post Author"
|
156 |
-
msgstr ""
|
157 |
-
|
158 |
-
#: press-elements-admin.php:371
|
159 |
-
msgid "Post Terms"
|
160 |
-
msgstr ""
|
161 |
-
|
162 |
-
#: press-elements-admin.php:373
|
163 |
-
msgid "Post Featured Image (Pro)"
|
164 |
-
msgstr ""
|
165 |
-
|
166 |
-
#: press-elements-admin.php:375
|
167 |
-
msgid "Post Custom Field (Pro)"
|
168 |
-
msgstr ""
|
169 |
-
|
170 |
-
#: press-elements-admin.php:377
|
171 |
-
msgid "Post Comments"
|
172 |
-
msgstr ""
|
173 |
-
|
174 |
-
#: press-elements-admin.php:381, press-elements-admin.php:435
|
175 |
-
msgid "Effects:"
|
176 |
-
msgstr ""
|
177 |
-
|
178 |
-
#: press-elements-admin.php:385
|
179 |
-
msgid "Image Accordion (Pro)"
|
180 |
-
msgstr ""
|
181 |
-
|
182 |
-
#: press-elements-admin.php:387
|
183 |
-
msgid "Before After Effect (Pro)"
|
184 |
-
msgstr ""
|
185 |
-
|
186 |
-
#: press-elements-admin.php:389
|
187 |
-
msgid "Notes (Pro)"
|
188 |
-
msgstr ""
|
189 |
-
|
190 |
-
#: press-elements-admin.php:393
|
191 |
-
msgid "Integrations:"
|
192 |
-
msgstr ""
|
193 |
-
|
194 |
-
#: press-elements-admin.php:397
|
195 |
-
msgid "Advanced Custom Fields (Pro)"
|
196 |
-
msgstr ""
|
197 |
-
|
198 |
-
#: press-elements-admin.php:399
|
199 |
-
msgid "Gravatar (Pro)"
|
200 |
-
msgstr ""
|
201 |
-
|
202 |
-
#: press-elements-admin.php:401
|
203 |
-
msgid "Flickr (Pro)"
|
204 |
-
msgstr ""
|
205 |
-
|
206 |
-
#: press-elements-admin.php:403
|
207 |
-
msgid "Pinterest (Pro)"
|
208 |
-
msgstr ""
|
209 |
-
|
210 |
-
#: press-elements-admin.php:409
|
211 |
-
msgid "Coming Soon"
|
212 |
-
msgstr ""
|
213 |
-
|
214 |
-
#: press-elements-admin.php:417
|
215 |
-
msgid "Login Form"
|
216 |
-
msgstr ""
|
217 |
-
|
218 |
-
#: press-elements-admin.php:419
|
219 |
-
msgid "Search Form"
|
220 |
-
msgstr ""
|
221 |
-
|
222 |
-
#: press-elements-admin.php:423
|
223 |
-
msgid "Comments Elements:"
|
224 |
-
msgstr ""
|
225 |
-
|
226 |
-
#: press-elements-admin.php:427
|
227 |
-
msgid "Comments Form"
|
228 |
-
msgstr ""
|
229 |
-
|
230 |
-
#: press-elements-admin.php:429
|
231 |
-
msgid "Comments List"
|
232 |
-
msgstr ""
|
233 |
-
|
234 |
-
#: press-elements-admin.php:431
|
235 |
-
msgid "Comments Pagination"
|
236 |
-
msgstr ""
|
237 |
-
|
238 |
-
#: press-elements-admin.php:439
|
239 |
-
msgid "Typing Effect (Pro)"
|
240 |
-
msgstr ""
|
241 |
-
|
242 |
-
#: press-elements-admin.php:457, press-elements-admin.php:461
|
243 |
-
msgid "Post edit screen with WordPress elements."
|
244 |
-
msgstr ""
|
245 |
-
|
246 |
-
#: press-elements-admin.php:475, press-elements-admin.php:479
|
247 |
-
msgid "Elementor widgets for each site and post element."
|
248 |
-
msgstr ""
|
249 |
-
|
250 |
-
#: press-elements-admin.php:493, press-elements-admin.php:497
|
251 |
-
msgid "Styling post title with a dedicated Elementor widget."
|
252 |
-
msgstr ""
|
253 |
-
|
254 |
-
#: press-elements-admin.php:511, press-elements-admin.php:515
|
255 |
-
msgid "Display post custom fields."
|
256 |
-
msgstr ""
|
257 |
-
|
258 |
-
#: press-elements-admin.php:529, press-elements-admin.php:533
|
259 |
-
msgid "Create your own author bio section."
|
260 |
-
msgstr ""
|
261 |
-
|
262 |
-
#: press-elements-admin.php:547, press-elements-admin.php:551
|
263 |
-
msgid "Widgets for your site logo, site name and site description."
|
264 |
-
msgstr ""
|
265 |
-
|
266 |
-
#: press-elements-admin.php:565, press-elements-admin.php:569
|
267 |
-
msgid "Site counters for Post Types, Taxonomies, Comments and Users."
|
268 |
-
msgstr ""
|
269 |
-
|
270 |
-
#: press-elements-admin.php:583, press-elements-admin.php:587
|
271 |
-
msgid "Custom fields as text fields and images, and linking to other custom fields."
|
272 |
-
msgstr ""
|
273 |
-
|
274 |
-
#: press-elements-admin.php:601, press-elements-admin.php:605
|
275 |
-
msgid "Display Gravatars based on an email address."
|
276 |
-
msgstr ""
|
277 |
-
|
278 |
-
#: press-elements-admin.php:619, press-elements-admin.php:623
|
279 |
-
msgid "Display Flickr photostream based on Flickr User ID."
|
280 |
-
msgstr ""
|
281 |
-
|
282 |
-
#: press-elements-admin.php:637, press-elements-admin.php:641
|
283 |
-
msgid "Display Pinterest pins based on Pinterest username."
|
284 |
-
msgstr ""
|
285 |
-
|
286 |
-
#: press-elements-admin.php:693
|
287 |
-
msgid "Welcome to Press Elements getting started guide."
|
288 |
-
msgstr ""
|
289 |
-
|
290 |
-
#: press-elements-admin.php:701
|
291 |
-
msgid "Getting started with Press Elements is easy! We put together this quick start guide to help first time users of the plugin. Our goal is to get you up and running in no time. Let's begin!"
|
292 |
-
msgstr ""
|
293 |
-
|
294 |
-
#: press-elements-admin.php:713
|
295 |
-
msgid "STEP 1: Create a new post"
|
296 |
-
msgstr ""
|
297 |
-
|
298 |
-
#: press-elements-admin.php:717
|
299 |
-
msgid "Navigate to \"Posts\" > \"Add New\" to create a new post. Enter a post title, write an excerpt, select a featured image, set an author, select a publish date and publish the post."
|
300 |
-
msgstr ""
|
301 |
-
|
302 |
-
#: press-elements-admin.php:737
|
303 |
-
msgid "STEP 2: Design your own template"
|
304 |
-
msgstr ""
|
305 |
-
|
306 |
-
#: press-elements-admin.php:741
|
307 |
-
msgid "Click the \"Edit with Elementor\" button and start designing the page layout. Design a page header, footer, and the content area."
|
308 |
-
msgstr ""
|
309 |
-
|
310 |
-
#: press-elements-admin.php:745
|
311 |
-
msgid "Use \"Press Elements\" widgets to display the post title, post excerpt, post date and the other fields used by WordPress. Don't forget to style those elements!"
|
312 |
-
msgstr ""
|
313 |
-
|
314 |
-
#: press-elements-admin.php:765
|
315 |
-
msgid "STEP 3: Save the template"
|
316 |
-
msgstr ""
|
317 |
-
|
318 |
-
#: press-elements-admin.php:769
|
319 |
-
msgid "Click on the \"Add Template\" button located at the bottom, and save the design. You will see the newly created template at the \"My Templates\" tab."
|
320 |
-
msgstr ""
|
321 |
-
|
322 |
-
#: press-elements-admin.php:773
|
323 |
-
msgid "You can save several templates for blogs posts, pages, and other post types. Or even several templates for a particular post type."
|
324 |
-
msgstr ""
|
325 |
-
|
326 |
-
#: press-elements-admin.php:793
|
327 |
-
msgid "STEP 4: Apply the design to new posts"
|
328 |
-
msgstr ""
|
329 |
-
|
330 |
-
#: press-elements-admin.php:797
|
331 |
-
msgid "For each new post you create, load the desired template and apply it to the post. The post will enherite the design but the elements will be updated with the current post data."
|
332 |
-
msgstr ""
|
333 |
-
|
334 |
-
#: press-elements-admin.php:847
|
335 |
-
msgid "Press Elements changelog."
|
336 |
-
msgstr ""
|
337 |
-
|
338 |
-
#: press-elements-admin.php:855
|
339 |
-
msgid "The Press Elements plugin is developed continuasly, this is the full changelog."
|
340 |
-
msgstr ""
|
341 |
-
|
342 |
-
#: press-elements-admin.php:897
|
343 |
-
msgid "No valid changelog was found."
|
344 |
-
msgstr ""
|
345 |
-
|
346 |
-
#: press-elements-plugin.php:
|
347 |
-
msgid "Site Elements"
|
348 |
-
msgstr ""
|
349 |
-
|
350 |
-
#: press-elements-plugin.php:
|
351 |
-
msgid "Post Elements"
|
352 |
-
msgstr ""
|
353 |
-
|
354 |
-
#: press-elements-plugin.php:
|
355 |
-
msgid "Press Elements Pro Effects"
|
356 |
-
msgstr ""
|
357 |
-
|
358 |
-
#: press-elements-plugin.php:
|
359 |
-
msgid "Press Elements Pro Integrations"
|
360 |
-
msgstr ""
|
361 |
-
|
362 |
-
#: press-elements.php:
|
363 |
-
msgid "\"%1$s\" requires \"%2$s\" to be installed and activated."
|
364 |
-
msgstr ""
|
365 |
-
|
366 |
-
#: press-elements.php:
|
367 |
-
msgid "Elementor"
|
368 |
-
msgstr ""
|
369 |
-
|
370 |
-
#: press-elements.php:
|
371 |
-
msgid "\"%1$s\" requires \"%2$s\" version %3$s or greater."
|
372 |
-
msgstr ""
|
373 |
-
|
374 |
-
#: widgets/advanced-custom-fields.php:
|
375 |
-
msgid "Advanced Custom Fields"
|
376 |
-
msgstr ""
|
377 |
-
|
378 |
-
#: widgets/advanced-custom-fields.php:
|
379 |
-
msgid "Pugin is Missing"
|
380 |
-
msgstr ""
|
381 |
-
|
382 |
-
#: widgets/advanced-custom-fields.php:
|
383 |
-
msgid "This feature requires \"%s\" plugin to be installed and active."
|
384 |
-
msgstr ""
|
385 |
-
|
386 |
-
#: widgets/advanced-custom-fields.php:
|
387 |
-
msgid "Premium Feature"
|
388 |
-
msgstr ""
|
389 |
-
|
390 |
-
#: widgets/advanced-custom-fields.php:
|
391 |
-
msgid "This feature is only available on \"%s\"."
|
392 |
-
msgstr ""
|
393 |
-
|
394 |
-
#: widgets/advanced-custom-fields.php:
|
395 |
-
msgid "Press Elements Pro"
|
396 |
-
msgstr ""
|
397 |
-
|
398 |
-
#: widgets/advanced-custom-fields.php:
|
399 |
-
msgid "Upgrade Now!"
|
400 |
-
msgstr ""
|
401 |
-
|
402 |
-
#: widgets/advanced-custom-fields.php:
|
403 |
-
msgid "Field"
|
404 |
-
msgstr ""
|
405 |
-
|
406 |
-
#: widgets/advanced-custom-fields.php:
|
407 |
-
msgid "Display As"
|
408 |
-
msgstr ""
|
409 |
-
|
410 |
-
#: widgets/advanced-custom-fields.php:
|
411 |
-
msgid "Text"
|
412 |
-
msgstr ""
|
413 |
-
|
414 |
-
#: widgets/advanced-custom-fields.php:
|
415 |
-
msgid "Image"
|
416 |
-
msgstr ""
|
417 |
-
|
418 |
-
#: widgets/advanced-custom-fields.php:
|
419 |
-
msgid "HTML Tag"
|
420 |
-
msgstr ""
|
421 |
-
|
422 |
-
#: widgets/advanced-custom-fields.php:
|
423 |
-
msgid "H1"
|
424 |
-
msgstr ""
|
425 |
-
|
426 |
-
#: widgets/advanced-custom-fields.php:
|
427 |
-
msgid "H2"
|
428 |
-
msgstr ""
|
429 |
-
|
430 |
-
#: widgets/advanced-custom-fields.php:
|
431 |
-
msgid "H3"
|
432 |
-
msgstr ""
|
433 |
-
|
434 |
-
#: widgets/advanced-custom-fields.php:
|
435 |
-
msgid "H4"
|
436 |
-
msgstr ""
|
437 |
-
|
438 |
-
#: widgets/advanced-custom-fields.php:
|
439 |
-
msgid "H5"
|
440 |
-
msgstr ""
|
441 |
-
|
442 |
-
#: widgets/advanced-custom-fields.php:
|
443 |
-
msgid "H6"
|
444 |
-
msgstr ""
|
445 |
-
|
446 |
-
#: widgets/advanced-custom-fields.php:
|
447 |
-
msgid "p"
|
448 |
-
msgstr ""
|
449 |
-
|
450 |
-
#: widgets/advanced-custom-fields.php:
|
451 |
-
msgid "div"
|
452 |
-
msgstr ""
|
453 |
-
|
454 |
-
#: widgets/advanced-custom-fields.php:
|
455 |
-
msgid "span"
|
456 |
-
msgstr ""
|
457 |
-
|
458 |
-
#: widgets/advanced-custom-fields.php:
|
459 |
-
msgid "Alignment"
|
460 |
-
msgstr ""
|
461 |
-
|
462 |
-
#: widgets/advanced-custom-fields.php:
|
463 |
-
msgid "Left"
|
464 |
-
msgstr ""
|
465 |
-
|
466 |
-
#: widgets/advanced-custom-fields.php:
|
467 |
-
msgid "Center"
|
468 |
-
msgstr ""
|
469 |
-
|
470 |
-
#: widgets/advanced-custom-fields.php:
|
471 |
-
msgid "Right"
|
472 |
-
msgstr ""
|
473 |
-
|
474 |
-
#: widgets/advanced-custom-fields.php:
|
475 |
-
msgid "Justified"
|
476 |
-
msgstr ""
|
477 |
-
|
478 |
-
#: widgets/advanced-custom-fields.php:
|
479 |
-
msgid "Link to"
|
480 |
-
msgstr ""
|
481 |
-
|
482 |
-
#: widgets/advanced-custom-fields.php:
|
483 |
-
msgid "None"
|
484 |
-
msgstr ""
|
485 |
-
|
486 |
-
#: widgets/advanced-custom-fields.php:
|
487 |
-
msgid "Home URL"
|
488 |
-
msgstr ""
|
489 |
-
|
490 |
-
#: widgets/advanced-custom-fields.php:
|
491 |
-
msgid "Post URL"
|
492 |
-
msgstr ""
|
493 |
-
|
494 |
-
#: widgets/advanced-custom-fields.php:
|
495 |
-
msgid "Other ACF Field"
|
496 |
-
msgstr ""
|
497 |
-
|
498 |
-
#: widgets/advanced-custom-fields.php:
|
499 |
-
msgid "Custom URL"
|
500 |
-
msgstr ""
|
501 |
-
|
502 |
-
#: widgets/advanced-custom-fields.php:
|
503 |
-
msgid "Link"
|
504 |
-
msgstr ""
|
505 |
-
|
506 |
-
#: widgets/advanced-custom-fields.php:
|
507 |
-
msgid "http://your-link.com"
|
508 |
-
msgstr ""
|
509 |
-
|
510 |
-
#: widgets/advanced-custom-fields.php:
|
511 |
-
msgid "Link to ACF Field"
|
512 |
-
msgstr ""
|
513 |
-
|
514 |
-
#: widgets/advanced-custom-fields.php:
|
515 |
-
msgid "Text Color"
|
516 |
-
msgstr ""
|
517 |
-
|
518 |
-
#: widgets/advanced-custom-fields.php:
|
519 |
-
msgid "Size (%)"
|
520 |
-
msgstr ""
|
521 |
-
|
522 |
-
#: widgets/advanced-custom-fields.php:
|
523 |
-
msgid "Opacity (%)"
|
524 |
-
msgstr ""
|
525 |
-
|
526 |
-
#: widgets/advanced-custom-fields.php:
|
527 |
-
msgid "Angle (deg)"
|
528 |
-
msgstr ""
|
529 |
-
|
530 |
-
#: widgets/advanced-custom-fields.php:
|
531 |
-
msgid "Hover Animation"
|
532 |
-
msgstr ""
|
533 |
-
|
534 |
-
#: widgets/advanced-custom-fields.php:
|
535 |
-
msgid "Image Border"
|
536 |
-
msgstr ""
|
537 |
-
|
538 |
-
#: widgets/advanced-custom-fields.php:
|
539 |
-
msgid "Border Radius"
|
540 |
-
msgstr ""
|
541 |
-
|
542 |
-
#: widgets/before-after-effect.php:
|
543 |
-
msgid "Before After Effect"
|
544 |
-
msgstr ""
|
545 |
-
|
546 |
-
#: widgets/before-after-effect.php:
|
547 |
-
msgid "Title & Image"
|
548 |
-
msgstr ""
|
549 |
-
|
550 |
-
#: widgets/before-after-effect.php:
|
551 |
-
msgid "Before"
|
552 |
-
msgstr ""
|
553 |
-
|
554 |
-
#: widgets/before-after-effect.php:
|
555 |
-
msgid "After"
|
556 |
-
msgstr ""
|
557 |
-
|
558 |
-
#: widgets/before-after-effect.php:
|
559 |
-
msgid "Settings"
|
560 |
-
msgstr ""
|
561 |
-
|
562 |
-
#: widgets/before-after-effect.php:
|
563 |
-
msgid "Orientation"
|
564 |
-
msgstr ""
|
565 |
-
|
566 |
-
#: widgets/before-after-effect.php:
|
567 |
-
msgid "Horizontal"
|
568 |
-
msgstr ""
|
569 |
-
|
570 |
-
#: widgets/before-after-effect.php:
|
571 |
-
msgid "Vertical"
|
572 |
-
msgstr ""
|
573 |
-
|
574 |
-
#: widgets/before-after-effect.php:
|
575 |
-
msgid "Starting Position (%)"
|
576 |
-
msgstr ""
|
577 |
-
|
578 |
-
#: widgets/before-after-effect.php:
|
579 |
-
msgid "Overlay"
|
580 |
-
msgstr ""
|
581 |
-
|
582 |
-
#: widgets/before-after-effect.php:
|
583 |
-
msgid "Overlay Color"
|
584 |
-
msgstr ""
|
585 |
-
|
586 |
-
#: widgets/before-after-effect.php:
|
587 |
-
msgid "Separetor"
|
588 |
-
msgstr ""
|
589 |
-
|
590 |
-
#: widgets/before-after-effect.php:
|
591 |
-
msgid "Separetor Color"
|
592 |
-
msgstr ""
|
593 |
-
|
594 |
-
#: widgets/before-after-effect.php:
|
595 |
-
msgid "Separetor Width (px)"
|
596 |
-
msgstr ""
|
597 |
-
|
598 |
-
#: widgets/before-after-effect.php:
|
599 |
-
msgid "Separetor Radius"
|
600 |
-
msgstr ""
|
601 |
-
|
602 |
-
#: widgets/before-after-effect.php:
|
603 |
-
msgid "Title"
|
604 |
-
msgstr ""
|
605 |
-
|
606 |
-
#: widgets/before-after-effect.php:
|
607 |
-
msgid "Background Color"
|
608 |
-
msgstr ""
|
609 |
-
|
610 |
-
#: widgets/before-after-effect.php:
|
611 |
-
msgid "1st Title Position (%)"
|
612 |
-
msgstr ""
|
613 |
-
|
614 |
-
#: widgets/before-after-effect.php:
|
615 |
-
msgid "2nd Title Position (%)"
|
616 |
-
msgstr ""
|
617 |
-
|
618 |
-
#: widgets/before-after-effect.php:
|
619 |
-
msgid "Margin"
|
620 |
-
msgstr ""
|
621 |
-
|
622 |
-
#: widgets/before-after-effect.php:
|
623 |
-
msgid "Padding"
|
624 |
-
msgstr ""
|
625 |
-
|
626 |
-
#: widgets/flickr.php:
|
627 |
-
msgid "Flickr"
|
628 |
-
msgstr ""
|
629 |
-
|
630 |
-
#: widgets/flickr.php:
|
631 |
-
msgid "Flickr ID"
|
632 |
-
msgstr ""
|
633 |
-
|
634 |
-
#: widgets/flickr.php:
|
635 |
-
msgid "Links"
|
636 |
-
msgstr ""
|
637 |
-
|
638 |
-
#: widgets/flickr.php:
|
639 |
-
msgid "Image page on Flickr"
|
640 |
-
msgstr ""
|
641 |
-
|
642 |
-
#: widgets/flickr.php:
|
643 |
-
msgid "Open links in"
|
644 |
-
msgstr ""
|
645 |
-
|
646 |
-
#: widgets/flickr.php:
|
647 |
-
msgid "Same window"
|
648 |
-
msgstr ""
|
649 |
-
|
650 |
-
#: widgets/flickr.php:
|
651 |
-
msgid "New window"
|
652 |
-
msgstr ""
|
653 |
-
|
654 |
-
#: widgets/flickr.php:
|
655 |
-
msgid "Size"
|
656 |
-
msgstr ""
|
657 |
-
|
658 |
-
#: widgets/flickr.php:
|
659 |
-
msgid "Thumbnails Grid"
|
660 |
-
msgstr ""
|
661 |
-
|
662 |
-
#: widgets/flickr.php:
|
663 |
-
msgid "Full Images Grid"
|
664 |
-
msgstr ""
|
665 |
-
|
666 |
-
#: widgets/flickr.php:
|
667 |
-
msgid "Colomns Per Row"
|
668 |
-
msgstr ""
|
669 |
-
|
670 |
-
#: widgets/flickr.php:
|
671 |
-
msgid "Number of Rows"
|
672 |
-
msgstr ""
|
673 |
-
|
674 |
-
#: widgets/gravatar.php:
|
675 |
-
msgid "Gravatar"
|
676 |
-
msgstr ""
|
677 |
-
|
678 |
-
#: widgets/gravatar.php:
|
679 |
-
msgid "Email"
|
680 |
-
msgstr ""
|
681 |
-
|
682 |
-
#: widgets/gravatar.php:
|
683 |
-
msgid "your@email.com"
|
684 |
-
msgstr ""
|
685 |
-
|
686 |
-
#: widgets/image-accordion.php:
|
687 |
-
msgid "Image Accordion"
|
688 |
-
msgstr ""
|
689 |
-
|
690 |
-
#: widgets/image-accordion.php:
|
691 |
-
msgid "Images"
|
692 |
-
msgstr ""
|
693 |
-
|
694 |
-
#: widgets/image-accordion.php:
|
695 |
-
msgid "Type out sentence"
|
696 |
-
msgstr ""
|
697 |
-
|
698 |
-
#: widgets/image-accordion.php:
|
699 |
-
msgid "and delete them"
|
700 |
-
msgstr ""
|
701 |
-
|
702 |
-
#: widgets/image-accordion.php:
|
703 |
-
msgid "with beautifull animation"
|
704 |
-
msgstr ""
|
705 |
-
|
706 |
-
#: widgets/image-accordion.php:
|
707 |
-
msgid "Caption"
|
708 |
-
msgstr ""
|
709 |
-
|
710 |
-
#: widgets/image-accordion.php:
|
711 |
-
msgid "Container"
|
712 |
-
msgstr ""
|
713 |
-
|
714 |
-
#: widgets/image-accordion.php:
|
715 |
-
msgid "Height"
|
716 |
-
msgstr ""
|
717 |
-
|
718 |
-
#: widgets/image-accordion.php:
|
719 |
-
msgid "Direction"
|
720 |
-
msgstr ""
|
721 |
-
|
722 |
-
#: widgets/image-accordion.php:
|
723 |
-
msgid "Right to Left"
|
724 |
-
msgstr ""
|
725 |
-
|
726 |
-
#: widgets/image-accordion.php:
|
727 |
-
msgid "Left to Right"
|
728 |
-
msgstr ""
|
729 |
-
|
730 |
-
#: widgets/image-accordion.php:
|
731 |
-
msgid "Image Alignment"
|
732 |
-
msgstr ""
|
733 |
-
|
734 |
-
#: widgets/image-accordion.php:
|
735 |
-
msgid "Transition Speed (ms)"
|
736 |
-
msgstr ""
|
737 |
-
|
738 |
-
#: widgets/image-accordion.php:
|
739 |
-
msgid "Opened Image Size (%)"
|
740 |
-
msgstr ""
|
741 |
-
|
742 |
-
#: widgets/image-accordion.php:
|
743 |
-
msgid "Vertical Alignment"
|
744 |
-
msgstr ""
|
745 |
-
|
746 |
-
#: widgets/image-accordion.php:
|
747 |
-
msgid "Top"
|
748 |
-
msgstr ""
|
749 |
-
|
750 |
-
#: widgets/image-accordion.php:
|
751 |
-
msgid "Middle"
|
752 |
-
msgstr ""
|
753 |
-
|
754 |
-
#: widgets/image-accordion.php:
|
755 |
-
msgid "Bottom"
|
756 |
-
msgstr ""
|
757 |
-
|
758 |
-
#: widgets/
|
759 |
-
msgid "
|
760 |
-
msgstr ""
|
761 |
-
|
762 |
-
#: widgets/notes.php:
|
763 |
-
msgid "
|
764 |
-
msgstr ""
|
765 |
-
|
766 |
-
#: widgets/notes.php:
|
767 |
-
msgid "Note"
|
768 |
-
msgstr ""
|
769 |
-
|
770 |
-
#: widgets/notes.php:
|
771 |
-
msgid "Note
|
772 |
-
msgstr ""
|
773 |
-
|
774 |
-
#: widgets/notes.php:
|
775 |
-
msgid "
|
776 |
-
msgstr ""
|
777 |
-
|
778 |
-
#: widgets/notes.php:
|
779 |
-
msgid "
|
780 |
-
msgstr ""
|
781 |
-
|
782 |
-
#: widgets/notes.php:
|
783 |
-
msgid "
|
784 |
-
msgstr ""
|
785 |
-
|
786 |
-
#: widgets/
|
787 |
-
msgid "
|
788 |
-
msgstr ""
|
789 |
-
|
790 |
-
#: widgets/pinterest.php:
|
791 |
-
msgid "Pinterest"
|
792 |
-
msgstr ""
|
793 |
-
|
794 |
-
#: widgets/pinterest.php:
|
795 |
-
msgid "
|
796 |
-
msgstr ""
|
797 |
-
|
798 |
-
#: widgets/pinterest.php:
|
799 |
-
msgid "pinterest"
|
800 |
-
msgstr ""
|
801 |
-
|
802 |
-
#: widgets/
|
803 |
-
msgid "
|
804 |
-
msgstr ""
|
805 |
-
|
806 |
-
#: widgets/post-author.php:
|
807 |
-
msgid "
|
808 |
-
msgstr ""
|
809 |
-
|
810 |
-
#: widgets/post-author.php:
|
811 |
-
msgid "
|
812 |
-
msgstr ""
|
813 |
-
|
814 |
-
#: widgets/post-author.php:
|
815 |
-
msgid "
|
816 |
-
msgstr ""
|
817 |
-
|
818 |
-
#: widgets/post-author.php:
|
819 |
-
msgid "
|
820 |
-
msgstr ""
|
821 |
-
|
822 |
-
#: widgets/post-author.php:
|
823 |
-
msgid "
|
824 |
-
msgstr ""
|
825 |
-
|
826 |
-
#: widgets/post-author.php:
|
827 |
-
msgid "Last Name"
|
828 |
-
msgstr ""
|
829 |
-
|
830 |
-
#: widgets/post-author.php:
|
831 |
-
msgid "
|
832 |
-
msgstr ""
|
833 |
-
|
834 |
-
#: widgets/post-author.php:
|
835 |
-
msgid "
|
836 |
-
msgstr ""
|
837 |
-
|
838 |
-
#: widgets/post-author.php:
|
839 |
-
msgid "
|
840 |
-
msgstr ""
|
841 |
-
|
842 |
-
#: widgets/post-author.php:
|
843 |
-
msgid "
|
844 |
-
msgstr ""
|
845 |
-
|
846 |
-
#: widgets/post-author.php:
|
847 |
-
msgid "User
|
848 |
-
msgstr ""
|
849 |
-
|
850 |
-
#: widgets/post-author.php:
|
851 |
-
msgid "User
|
852 |
-
msgstr ""
|
853 |
-
|
854 |
-
#: widgets/post-
|
855 |
-
msgid "
|
856 |
-
msgstr ""
|
857 |
-
|
858 |
-
#: widgets/post-comments.php:
|
859 |
-
msgid "
|
860 |
-
msgstr ""
|
861 |
-
|
862 |
-
#: widgets/post-comments.php:
|
863 |
-
msgid "
|
864 |
-
msgstr ""
|
865 |
-
|
866 |
-
#: widgets/post-
|
867 |
-
msgid "
|
868 |
-
msgstr ""
|
869 |
-
|
870 |
-
#: widgets/post-custom-field.php:
|
871 |
-
msgid "
|
872 |
-
msgstr ""
|
873 |
-
|
874 |
-
#: widgets/post-custom-field.php:
|
875 |
-
msgid "Custom Field"
|
876 |
-
msgstr ""
|
877 |
-
|
878 |
-
#: widgets/post-custom-field.php:
|
879 |
-
msgid "
|
880 |
-
msgstr ""
|
881 |
-
|
882 |
-
#: widgets/post-
|
883 |
-
msgid "
|
884 |
-
msgstr ""
|
885 |
-
|
886 |
-
#: widgets/post-date.php:
|
887 |
-
msgid "
|
888 |
-
msgstr ""
|
889 |
-
|
890 |
-
#: widgets/post-date.php:
|
891 |
-
msgid "Date
|
892 |
-
msgstr ""
|
893 |
-
|
894 |
-
#: widgets/post-date.php:
|
895 |
-
msgid "
|
896 |
-
msgstr ""
|
897 |
-
|
898 |
-
#: widgets/post-
|
899 |
-
msgid "
|
900 |
-
msgstr ""
|
901 |
-
|
902 |
-
#: widgets/post-
|
903 |
-
msgid "%s
|
904 |
-
msgstr ""
|
905 |
-
|
906 |
-
#: widgets/post-featured-image.php:
|
907 |
-
msgid "
|
908 |
-
msgstr ""
|
909 |
-
|
910 |
-
#: widgets/post-featured-image.php:
|
911 |
-
msgid "
|
912 |
-
msgstr ""
|
913 |
-
|
914 |
-
#: widgets/post-
|
915 |
-
msgid "
|
916 |
-
msgstr ""
|
917 |
-
|
918 |
-
#: widgets/post-terms.php:
|
919 |
-
msgid "
|
920 |
-
msgstr ""
|
921 |
-
|
922 |
-
#: widgets/post-terms.php:
|
923 |
-
msgid "
|
924 |
-
msgstr ""
|
925 |
-
|
926 |
-
#: widgets/post-
|
927 |
-
msgid "
|
928 |
-
msgstr ""
|
929 |
-
|
930 |
-
#: widgets/
|
931 |
-
msgid "
|
932 |
-
msgstr ""
|
933 |
-
|
934 |
-
#: widgets/site-counters.php:
|
935 |
-
msgid "
|
936 |
-
msgstr ""
|
937 |
-
|
938 |
-
#: widgets/site-counters.php:
|
939 |
-
msgid "
|
940 |
-
msgstr ""
|
941 |
-
|
942 |
-
#: widgets/site-counters.php:
|
943 |
-
msgid "
|
944 |
-
msgstr ""
|
945 |
-
|
946 |
-
#: widgets/site-counters.php:
|
947 |
-
msgid "
|
948 |
-
msgstr ""
|
949 |
-
|
950 |
-
#: widgets/site-counters.php:
|
951 |
-
msgid "
|
952 |
-
msgstr ""
|
953 |
-
|
954 |
-
#: widgets/site-counters.php:204
|
955 |
-
msgid "Label"
|
956 |
-
msgstr ""
|
1 |
+
# Copyright (C) 2017 Press Elements
|
2 |
+
# This file is distributed under the same license as the Press Elements package.
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: Press Elements\n"
|
6 |
+
"MIME-Version: 1.0\n"
|
7 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
8 |
+
"Content-Transfer-Encoding: 8bit\n"
|
9 |
+
"PO-Revision-Date: 2017-MO-DA HO:MI+ZONE\n"
|
10 |
+
"Language-Team: Rami Yushuvaev <r_a_m_i@hotmail.com>\n"
|
11 |
+
"X-Poedit-Basepath: ..\n"
|
12 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
13 |
+
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
|
14 |
+
"X-Poedit-SearchPath-0: .\n"
|
15 |
+
"X-Poedit-SearchPathExcluded-0: *.js\n"
|
16 |
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
17 |
+
|
18 |
+
#: press-elements-admin.php:119, press-elements-admin.php:261, press-elements-freemius.php:79
|
19 |
+
msgid "Press Elements - Widgets for Elementor"
|
20 |
+
msgstr ""
|
21 |
+
|
22 |
+
#: press-elements-admin.php:121, press-elements.php:167, press-elements.php:221
|
23 |
+
msgid "Press Elements"
|
24 |
+
msgstr ""
|
25 |
+
|
26 |
+
#: press-elements-admin.php:163
|
27 |
+
msgid "About"
|
28 |
+
msgstr ""
|
29 |
+
|
30 |
+
#: press-elements-admin.php:165, press-elements-admin.php:689
|
31 |
+
msgid "Getting Started"
|
32 |
+
msgstr ""
|
33 |
+
|
34 |
+
#: press-elements-admin.php:167, press-elements-admin.php:843
|
35 |
+
msgid "Changelog"
|
36 |
+
msgstr ""
|
37 |
+
|
38 |
+
#: press-elements-admin.php:169
|
39 |
+
msgid "Pricing"
|
40 |
+
msgstr ""
|
41 |
+
|
42 |
+
#: press-elements-admin.php:171
|
43 |
+
msgid "Account"
|
44 |
+
msgstr ""
|
45 |
+
|
46 |
+
#: press-elements-admin.php:173
|
47 |
+
msgid "Support Forum"
|
48 |
+
msgstr ""
|
49 |
+
|
50 |
+
#: press-elements-admin.php:265
|
51 |
+
msgid "Easy-to-use widgets that help you display and design your content using Elementor page builder."
|
52 |
+
msgstr ""
|
53 |
+
|
54 |
+
#: press-elements-admin.php:273
|
55 |
+
msgid "Press Elements combines the simplicity of Elementor with the efficiency of the built-in WordPress theme components."
|
56 |
+
msgstr ""
|
57 |
+
|
58 |
+
#: press-elements-admin.php:285
|
59 |
+
msgid "WordPress Elements"
|
60 |
+
msgstr ""
|
61 |
+
|
62 |
+
#: press-elements-admin.php:289
|
63 |
+
msgid "When you create a new post (or a page) on WordPress, you choose a title, write an excerpt, select a publish date, add an author, choose featured image, select several taxonomies and maybe you define some custom fields."
|
64 |
+
msgstr ""
|
65 |
+
|
66 |
+
#: press-elements-admin.php:293
|
67 |
+
msgid "In the Elementor page builder you can't display and style those components. You need to repeat the process and manually add a title, write the excerpt and add images."
|
68 |
+
msgstr ""
|
69 |
+
|
70 |
+
#: press-elements-admin.php:297
|
71 |
+
msgid "That's where Press Elements comes in handy. The plugin adds smart widgets that let you display those post components. Now you can drag a \"Post Title\" widget and style it your way. The widget will automatically insert the title used as the post title. Same applies for all the other post components."
|
72 |
+
msgstr ""
|
73 |
+
|
74 |
+
#: press-elements-admin.php:301
|
75 |
+
msgid "Dynamic Content"
|
76 |
+
msgstr ""
|
77 |
+
|
78 |
+
#: press-elements-admin.php:305
|
79 |
+
msgid "Regular Elementor widgets save the data as hard-coded content in the database. To change something you need to open the page builder and manually change the element inside the builder. Updating post titles, excerpts, authors and other WordPress Element won't affect the builder."
|
80 |
+
msgstr ""
|
81 |
+
|
82 |
+
#: press-elements-admin.php:309
|
83 |
+
msgid "Press Elements uses dynamic content architecture. It doesn't save the title and other element as hard-coded content. It generates them on-the-fly. Just like the WordPress theme system."
|
84 |
+
msgstr ""
|
85 |
+
|
86 |
+
#: press-elements-admin.php:313
|
87 |
+
msgid "When you change post titles and other post elements from your WordPress dashboard (outside of Elementor), they will be automatically updated in the content area and in the page builder."
|
88 |
+
msgstr ""
|
89 |
+
|
90 |
+
#: press-elements-admin.php:317
|
91 |
+
msgid "For example, you can bulk edit several posts from your sites dashboard to change the author, post that use \"Post Author\" widget will be automatically updates with the new data."
|
92 |
+
msgstr ""
|
93 |
+
|
94 |
+
#: press-elements-admin.php:321
|
95 |
+
msgid "Template Design"
|
96 |
+
msgstr ""
|
97 |
+
|
98 |
+
#: press-elements-admin.php:325
|
99 |
+
msgid "When using page builders, you need to create all the page element for each page over and over again. Currently you can't design single page templates and apply the design on the post. When you use the template system you need to manually change titles and images for each post/page."
|
100 |
+
msgstr ""
|
101 |
+
|
102 |
+
#: press-elements-admin.php:329
|
103 |
+
msgid "With Press Elements you can create custom designs with post elements and save them as template. When you apply the template on other posts, it will inherit the data from the new post. No more manual updates!"
|
104 |
+
msgstr ""
|
105 |
+
|
106 |
+
#: press-elements-admin.php:333
|
107 |
+
msgid "You don't need to hire developers to generate custom page templates - with Press Elements you can do it using a simple drag & drop interface! Now you can design different templates for different blog posts, pages and other Post Types. When creating new posts, load your predefined templates from your template library."
|
108 |
+
msgstr ""
|
109 |
+
|
110 |
+
#: press-elements-admin.php:337
|
111 |
+
msgid "With Press Elements you can use Elementor widgets to display and design your post elements! Just like developers use theme-functions to generate themes. How cool is that?!"
|
112 |
+
msgstr ""
|
113 |
+
|
114 |
+
#: press-elements-admin.php:341
|
115 |
+
msgid "Included Widgets"
|
116 |
+
msgstr ""
|
117 |
+
|
118 |
+
#: press-elements-admin.php:345, press-elements-admin.php:413
|
119 |
+
msgid "Site Elements:"
|
120 |
+
msgstr ""
|
121 |
+
|
122 |
+
#: press-elements-admin.php:349, widgets/site-title.php:65, widgets/site-title.php:97, widgets/site-title.php:275
|
123 |
+
msgid "Site Title"
|
124 |
+
msgstr ""
|
125 |
+
|
126 |
+
#: press-elements-admin.php:351, widgets/site-description.php:65, widgets/site-description.php:97, widgets/site-description.php:275
|
127 |
+
msgid "Site Description"
|
128 |
+
msgstr ""
|
129 |
+
|
130 |
+
#: press-elements-admin.php:353, widgets/site-logo.php:63, widgets/site-logo.php:95, widgets/site-logo.php:289
|
131 |
+
msgid "Site Logo"
|
132 |
+
msgstr ""
|
133 |
+
|
134 |
+
#: press-elements-admin.php:355, widgets/site-counters.php:65, widgets/site-counters.php:123
|
135 |
+
msgid "Site Counters"
|
136 |
+
msgstr ""
|
137 |
+
|
138 |
+
#: press-elements-admin.php:359
|
139 |
+
msgid "Post Elements:"
|
140 |
+
msgstr ""
|
141 |
+
|
142 |
+
#: press-elements-admin.php:363
|
143 |
+
msgid "Post Title"
|
144 |
+
msgstr ""
|
145 |
+
|
146 |
+
#: press-elements-admin.php:365
|
147 |
+
msgid "Post Excerpt"
|
148 |
+
msgstr ""
|
149 |
+
|
150 |
+
#: press-elements-admin.php:367
|
151 |
+
msgid "Post Date"
|
152 |
+
msgstr ""
|
153 |
+
|
154 |
+
#: press-elements-admin.php:369
|
155 |
+
msgid "Post Author"
|
156 |
+
msgstr ""
|
157 |
+
|
158 |
+
#: press-elements-admin.php:371
|
159 |
+
msgid "Post Terms"
|
160 |
+
msgstr ""
|
161 |
+
|
162 |
+
#: press-elements-admin.php:373
|
163 |
+
msgid "Post Featured Image (Pro)"
|
164 |
+
msgstr ""
|
165 |
+
|
166 |
+
#: press-elements-admin.php:375
|
167 |
+
msgid "Post Custom Field (Pro)"
|
168 |
+
msgstr ""
|
169 |
+
|
170 |
+
#: press-elements-admin.php:377
|
171 |
+
msgid "Post Comments"
|
172 |
+
msgstr ""
|
173 |
+
|
174 |
+
#: press-elements-admin.php:381, press-elements-admin.php:435
|
175 |
+
msgid "Effects:"
|
176 |
+
msgstr ""
|
177 |
+
|
178 |
+
#: press-elements-admin.php:385
|
179 |
+
msgid "Image Accordion (Pro)"
|
180 |
+
msgstr ""
|
181 |
+
|
182 |
+
#: press-elements-admin.php:387
|
183 |
+
msgid "Before After Effect (Pro)"
|
184 |
+
msgstr ""
|
185 |
+
|
186 |
+
#: press-elements-admin.php:389
|
187 |
+
msgid "Notes (Pro)"
|
188 |
+
msgstr ""
|
189 |
+
|
190 |
+
#: press-elements-admin.php:393
|
191 |
+
msgid "Integrations:"
|
192 |
+
msgstr ""
|
193 |
+
|
194 |
+
#: press-elements-admin.php:397
|
195 |
+
msgid "Advanced Custom Fields (Pro)"
|
196 |
+
msgstr ""
|
197 |
+
|
198 |
+
#: press-elements-admin.php:399
|
199 |
+
msgid "Gravatar (Pro)"
|
200 |
+
msgstr ""
|
201 |
+
|
202 |
+
#: press-elements-admin.php:401
|
203 |
+
msgid "Flickr (Pro)"
|
204 |
+
msgstr ""
|
205 |
+
|
206 |
+
#: press-elements-admin.php:403
|
207 |
+
msgid "Pinterest (Pro)"
|
208 |
+
msgstr ""
|
209 |
+
|
210 |
+
#: press-elements-admin.php:409
|
211 |
+
msgid "Coming Soon"
|
212 |
+
msgstr ""
|
213 |
+
|
214 |
+
#: press-elements-admin.php:417
|
215 |
+
msgid "Login Form"
|
216 |
+
msgstr ""
|
217 |
+
|
218 |
+
#: press-elements-admin.php:419
|
219 |
+
msgid "Search Form"
|
220 |
+
msgstr ""
|
221 |
+
|
222 |
+
#: press-elements-admin.php:423
|
223 |
+
msgid "Comments Elements:"
|
224 |
+
msgstr ""
|
225 |
+
|
226 |
+
#: press-elements-admin.php:427
|
227 |
+
msgid "Comments Form"
|
228 |
+
msgstr ""
|
229 |
+
|
230 |
+
#: press-elements-admin.php:429
|
231 |
+
msgid "Comments List"
|
232 |
+
msgstr ""
|
233 |
+
|
234 |
+
#: press-elements-admin.php:431
|
235 |
+
msgid "Comments Pagination"
|
236 |
+
msgstr ""
|
237 |
+
|
238 |
+
#: press-elements-admin.php:439
|
239 |
+
msgid "Typing Effect (Pro)"
|
240 |
+
msgstr ""
|
241 |
+
|
242 |
+
#: press-elements-admin.php:457, press-elements-admin.php:461
|
243 |
+
msgid "Post edit screen with WordPress elements."
|
244 |
+
msgstr ""
|
245 |
+
|
246 |
+
#: press-elements-admin.php:475, press-elements-admin.php:479
|
247 |
+
msgid "Elementor widgets for each site and post element."
|
248 |
+
msgstr ""
|
249 |
+
|
250 |
+
#: press-elements-admin.php:493, press-elements-admin.php:497
|
251 |
+
msgid "Styling post title with a dedicated Elementor widget."
|
252 |
+
msgstr ""
|
253 |
+
|
254 |
+
#: press-elements-admin.php:511, press-elements-admin.php:515
|
255 |
+
msgid "Display post custom fields."
|
256 |
+
msgstr ""
|
257 |
+
|
258 |
+
#: press-elements-admin.php:529, press-elements-admin.php:533
|
259 |
+
msgid "Create your own author bio section."
|
260 |
+
msgstr ""
|
261 |
+
|
262 |
+
#: press-elements-admin.php:547, press-elements-admin.php:551
|
263 |
+
msgid "Widgets for your site logo, site name and site description."
|
264 |
+
msgstr ""
|
265 |
+
|
266 |
+
#: press-elements-admin.php:565, press-elements-admin.php:569
|
267 |
+
msgid "Site counters for Post Types, Taxonomies, Comments and Users."
|
268 |
+
msgstr ""
|
269 |
+
|
270 |
+
#: press-elements-admin.php:583, press-elements-admin.php:587
|
271 |
+
msgid "Custom fields as text fields and images, and linking to other custom fields."
|
272 |
+
msgstr ""
|
273 |
+
|
274 |
+
#: press-elements-admin.php:601, press-elements-admin.php:605
|
275 |
+
msgid "Display Gravatars based on an email address."
|
276 |
+
msgstr ""
|
277 |
+
|
278 |
+
#: press-elements-admin.php:619, press-elements-admin.php:623
|
279 |
+
msgid "Display Flickr photostream based on Flickr User ID."
|
280 |
+
msgstr ""
|
281 |
+
|
282 |
+
#: press-elements-admin.php:637, press-elements-admin.php:641
|
283 |
+
msgid "Display Pinterest pins based on Pinterest username."
|
284 |
+
msgstr ""
|
285 |
+
|
286 |
+
#: press-elements-admin.php:693
|
287 |
+
msgid "Welcome to Press Elements getting started guide."
|
288 |
+
msgstr ""
|
289 |
+
|
290 |
+
#: press-elements-admin.php:701
|
291 |
+
msgid "Getting started with Press Elements is easy! We put together this quick start guide to help first time users of the plugin. Our goal is to get you up and running in no time. Let's begin!"
|
292 |
+
msgstr ""
|
293 |
+
|
294 |
+
#: press-elements-admin.php:713
|
295 |
+
msgid "STEP 1: Create a new post"
|
296 |
+
msgstr ""
|
297 |
+
|
298 |
+
#: press-elements-admin.php:717
|
299 |
+
msgid "Navigate to \"Posts\" > \"Add New\" to create a new post. Enter a post title, write an excerpt, select a featured image, set an author, select a publish date and publish the post."
|
300 |
+
msgstr ""
|
301 |
+
|
302 |
+
#: press-elements-admin.php:737
|
303 |
+
msgid "STEP 2: Design your own template"
|
304 |
+
msgstr ""
|
305 |
+
|
306 |
+
#: press-elements-admin.php:741
|
307 |
+
msgid "Click the \"Edit with Elementor\" button and start designing the page layout. Design a page header, footer, and the content area."
|
308 |
+
msgstr ""
|
309 |
+
|
310 |
+
#: press-elements-admin.php:745
|
311 |
+
msgid "Use \"Press Elements\" widgets to display the post title, post excerpt, post date and the other fields used by WordPress. Don't forget to style those elements!"
|
312 |
+
msgstr ""
|
313 |
+
|
314 |
+
#: press-elements-admin.php:765
|
315 |
+
msgid "STEP 3: Save the template"
|
316 |
+
msgstr ""
|
317 |
+
|
318 |
+
#: press-elements-admin.php:769
|
319 |
+
msgid "Click on the \"Add Template\" button located at the bottom, and save the design. You will see the newly created template at the \"My Templates\" tab."
|
320 |
+
msgstr ""
|
321 |
+
|
322 |
+
#: press-elements-admin.php:773
|
323 |
+
msgid "You can save several templates for blogs posts, pages, and other post types. Or even several templates for a particular post type."
|
324 |
+
msgstr ""
|
325 |
+
|
326 |
+
#: press-elements-admin.php:793
|
327 |
+
msgid "STEP 4: Apply the design to new posts"
|
328 |
+
msgstr ""
|
329 |
+
|
330 |
+
#: press-elements-admin.php:797
|
331 |
+
msgid "For each new post you create, load the desired template and apply it to the post. The post will enherite the design but the elements will be updated with the current post data."
|
332 |
+
msgstr ""
|
333 |
+
|
334 |
+
#: press-elements-admin.php:847
|
335 |
+
msgid "Press Elements changelog."
|
336 |
+
msgstr ""
|
337 |
+
|
338 |
+
#: press-elements-admin.php:855
|
339 |
+
msgid "The Press Elements plugin is developed continuasly, this is the full changelog."
|
340 |
+
msgstr ""
|
341 |
+
|
342 |
+
#: press-elements-admin.php:897
|
343 |
+
msgid "No valid changelog was found."
|
344 |
+
msgstr ""
|
345 |
+
|
346 |
+
#: press-elements-plugin.php:117
|
347 |
+
msgid "Site Elements"
|
348 |
+
msgstr ""
|
349 |
+
|
350 |
+
#: press-elements-plugin.php:127
|
351 |
+
msgid "Post Elements"
|
352 |
+
msgstr ""
|
353 |
+
|
354 |
+
#: press-elements-plugin.php:137
|
355 |
+
msgid "Press Elements Pro Effects"
|
356 |
+
msgstr ""
|
357 |
+
|
358 |
+
#: press-elements-plugin.php:147
|
359 |
+
msgid "Press Elements Pro Integrations"
|
360 |
+
msgstr ""
|
361 |
+
|
362 |
+
#: press-elements.php:165
|
363 |
+
msgid "\"%1$s\" requires \"%2$s\" to be installed and activated."
|
364 |
+
msgstr ""
|
365 |
+
|
366 |
+
#: press-elements.php:169, press-elements.php:223
|
367 |
+
msgid "Elementor"
|
368 |
+
msgstr ""
|
369 |
+
|
370 |
+
#: press-elements.php:219
|
371 |
+
msgid "\"%1$s\" requires \"%2$s\" version %3$s or greater."
|
372 |
+
msgstr ""
|
373 |
+
|
374 |
+
#: widgets/advanced-custom-fields.php:69, widgets/advanced-custom-fields.php:105, widgets/advanced-custom-fields.php:141, widgets/advanced-custom-fields.php:177, widgets/advanced-custom-fields.php:277, widgets/advanced-custom-fields.php:527
|
375 |
+
msgid "Advanced Custom Fields"
|
376 |
+
msgstr ""
|
377 |
+
|
378 |
+
#: widgets/advanced-custom-fields.php:129
|
379 |
+
msgid "Pugin is Missing"
|
380 |
+
msgstr ""
|
381 |
+
|
382 |
+
#: widgets/advanced-custom-fields.php:139
|
383 |
+
msgid "This feature requires \"%s\" plugin to be installed and active."
|
384 |
+
msgstr ""
|
385 |
+
|
386 |
+
#: widgets/advanced-custom-fields.php:201, widgets/before-after-effect.php:137, widgets/flickr.php:119, widgets/gravatar.php:123, widgets/image-accordion.php:133, widgets/notes.php:127, widgets/pinterest.php:119, widgets/post-custom-field.php:153
|
387 |
+
msgid "Premium Feature"
|
388 |
+
msgstr ""
|
389 |
+
|
390 |
+
#: widgets/advanced-custom-fields.php:211, widgets/before-after-effect.php:147, widgets/flickr.php:129, widgets/gravatar.php:133, widgets/image-accordion.php:143, widgets/notes.php:137, widgets/pinterest.php:129, widgets/post-custom-field.php:163
|
391 |
+
msgid "This feature is only available on \"%s\"."
|
392 |
+
msgstr ""
|
393 |
+
|
394 |
+
#: widgets/advanced-custom-fields.php:213, widgets/before-after-effect.php:149, widgets/flickr.php:131, widgets/gravatar.php:135, widgets/image-accordion.php:145, widgets/notes.php:139, widgets/pinterest.php:131, widgets/post-custom-field.php:165
|
395 |
+
msgid "Press Elements Pro"
|
396 |
+
msgstr ""
|
397 |
+
|
398 |
+
#: widgets/advanced-custom-fields.php:221, widgets/before-after-effect.php:157, widgets/flickr.php:139, widgets/gravatar.php:143, widgets/image-accordion.php:153, widgets/notes.php:147, widgets/pinterest.php:139, widgets/post-custom-field.php:173
|
399 |
+
msgid "Upgrade Now!"
|
400 |
+
msgstr ""
|
401 |
+
|
402 |
+
#: widgets/advanced-custom-fields.php:291
|
403 |
+
msgid "Field"
|
404 |
+
msgstr ""
|
405 |
+
|
406 |
+
#: widgets/advanced-custom-fields.php:309, widgets/post-custom-field.php:259
|
407 |
+
msgid "Display As"
|
408 |
+
msgstr ""
|
409 |
+
|
410 |
+
#: widgets/advanced-custom-fields.php:315, widgets/before-after-effect.php:221, widgets/before-after-effect.php:295, widgets/post-custom-field.php:265
|
411 |
+
msgid "Text"
|
412 |
+
msgstr ""
|
413 |
+
|
414 |
+
#: widgets/advanced-custom-fields.php:317, widgets/before-after-effect.php:251, widgets/before-after-effect.php:325, widgets/image-accordion.php:231, widgets/image-accordion.php:433, widgets/post-custom-field.php:267
|
415 |
+
msgid "Image"
|
416 |
+
msgstr ""
|
417 |
+
|
418 |
+
#: widgets/advanced-custom-fields.php:335, widgets/gravatar.php:207, widgets/image-accordion.php:829, widgets/notes.php:487, widgets/post-author.php:159, widgets/post-custom-field.php:285, widgets/post-date.php:161, widgets/post-excerpt.php:135, widgets/post-terms.php:157, widgets/post-title.php:135, widgets/site-counters.php:219, widgets/site-description.php:111, widgets/site-logo.php:125, widgets/site-title.php:111
|
419 |
+
msgid "HTML Tag"
|
420 |
+
msgstr ""
|
421 |
+
|
422 |
+
#: widgets/advanced-custom-fields.php:341, widgets/gravatar.php:213, widgets/image-accordion.php:835, widgets/notes.php:493, widgets/post-author.php:165, widgets/post-custom-field.php:291, widgets/post-date.php:167, widgets/post-excerpt.php:141, widgets/post-terms.php:163, widgets/post-title.php:141, widgets/site-counters.php:225, widgets/site-description.php:117, widgets/site-logo.php:131, widgets/site-title.php:117
|
423 |
+
msgid "H1"
|
424 |
+
msgstr ""
|
425 |
+
|
426 |
+
#: widgets/advanced-custom-fields.php:343, widgets/gravatar.php:215, widgets/image-accordion.php:837, widgets/notes.php:495, widgets/post-author.php:167, widgets/post-custom-field.php:293, widgets/post-date.php:169, widgets/post-excerpt.php:143, widgets/post-terms.php:165, widgets/post-title.php:143, widgets/site-counters.php:227, widgets/site-description.php:119, widgets/site-logo.php:133, widgets/site-title.php:119
|
427 |
+
msgid "H2"
|
428 |
+
msgstr ""
|
429 |
+
|
430 |
+
#: widgets/advanced-custom-fields.php:345, widgets/gravatar.php:217, widgets/image-accordion.php:839, widgets/notes.php:497, widgets/post-author.php:169, widgets/post-custom-field.php:295, widgets/post-date.php:171, widgets/post-excerpt.php:145, widgets/post-terms.php:167, widgets/post-title.php:145, widgets/site-counters.php:229, widgets/site-description.php:121, widgets/site-logo.php:135, widgets/site-title.php:121
|
431 |
+
msgid "H3"
|
432 |
+
msgstr ""
|
433 |
+
|
434 |
+
#: widgets/advanced-custom-fields.php:347, widgets/gravatar.php:219, widgets/image-accordion.php:841, widgets/notes.php:499, widgets/post-author.php:171, widgets/post-custom-field.php:297, widgets/post-date.php:173, widgets/post-excerpt.php:147, widgets/post-terms.php:169, widgets/post-title.php:147, widgets/site-counters.php:231, widgets/site-description.php:123, widgets/site-logo.php:137, widgets/site-title.php:123
|
435 |
+
msgid "H4"
|
436 |
+
msgstr ""
|
437 |
+
|
438 |
+
#: widgets/advanced-custom-fields.php:349, widgets/gravatar.php:221, widgets/image-accordion.php:843, widgets/notes.php:501, widgets/post-author.php:173, widgets/post-custom-field.php:299, widgets/post-date.php:175, widgets/post-excerpt.php:149, widgets/post-terms.php:171, widgets/post-title.php:149, widgets/site-counters.php:233, widgets/site-description.php:125, widgets/site-logo.php:139, widgets/site-title.php:125
|
439 |
+
msgid "H5"
|
440 |
+
msgstr ""
|
441 |
+
|
442 |
+
#: widgets/advanced-custom-fields.php:351, widgets/gravatar.php:223, widgets/image-accordion.php:845, widgets/notes.php:503, widgets/post-author.php:175, widgets/post-custom-field.php:301, widgets/post-date.php:177, widgets/post-excerpt.php:151, widgets/post-terms.php:173, widgets/post-title.php:151, widgets/site-counters.php:235, widgets/site-description.php:127, widgets/site-logo.php:141, widgets/site-title.php:127
|
443 |
+
msgid "H6"
|
444 |
+
msgstr ""
|
445 |
+
|
446 |
+
#: widgets/advanced-custom-fields.php:353, widgets/gravatar.php:225, widgets/image-accordion.php:847, widgets/notes.php:505, widgets/post-author.php:177, widgets/post-custom-field.php:303, widgets/post-date.php:179, widgets/post-excerpt.php:153, widgets/post-terms.php:175, widgets/post-title.php:153, widgets/site-counters.php:237, widgets/site-description.php:129, widgets/site-logo.php:143, widgets/site-title.php:129
|
447 |
+
msgid "p"
|
448 |
+
msgstr ""
|
449 |
+
|
450 |
+
#: widgets/advanced-custom-fields.php:355, widgets/gravatar.php:227, widgets/image-accordion.php:849, widgets/notes.php:507, widgets/post-author.php:179, widgets/post-custom-field.php:305, widgets/post-date.php:181, widgets/post-excerpt.php:155, widgets/post-terms.php:177, widgets/post-title.php:155, widgets/site-counters.php:239, widgets/site-description.php:131, widgets/site-logo.php:145, widgets/site-title.php:131
|
451 |
+
msgid "div"
|
452 |
+
msgstr ""
|
453 |
+
|
454 |
+
#: widgets/advanced-custom-fields.php:357, widgets/gravatar.php:229, widgets/image-accordion.php:851, widgets/notes.php:509, widgets/post-author.php:181, widgets/post-custom-field.php:307, widgets/post-date.php:183, widgets/post-excerpt.php:157, widgets/post-terms.php:179, widgets/post-title.php:157, widgets/site-counters.php:241, widgets/site-description.php:133, widgets/site-logo.php:147, widgets/site-title.php:133
|
455 |
+
msgid "span"
|
456 |
+
msgstr ""
|
457 |
+
|
458 |
+
#: widgets/advanced-custom-fields.php:375, widgets/gravatar.php:247, widgets/image-accordion.php:637, widgets/notes.php:527, widgets/notes.php:655, widgets/post-author.php:199, widgets/post-custom-field.php:325, widgets/post-date.php:201, widgets/post-excerpt.php:175, widgets/post-featured-image.php:173, widgets/post-terms.php:197, widgets/post-title.php:175, widgets/site-counters.php:259, widgets/site-description.php:151, widgets/site-logo.php:165, widgets/site-title.php:151
|
459 |
+
msgid "Alignment"
|
460 |
+
msgstr ""
|
461 |
+
|
462 |
+
#: widgets/advanced-custom-fields.php:383, widgets/gravatar.php:255, widgets/image-accordion.php:459, widgets/image-accordion.php:647, widgets/notes.php:535, widgets/notes.php:663, widgets/post-author.php:207, widgets/post-custom-field.php:333, widgets/post-date.php:209, widgets/post-excerpt.php:183, widgets/post-featured-image.php:181, widgets/post-terms.php:205, widgets/post-title.php:183, widgets/site-counters.php:267, widgets/site-description.php:159, widgets/site-logo.php:173, widgets/site-title.php:159
|
463 |
+
msgid "Left"
|
464 |
+
msgstr ""
|
465 |
+
|
466 |
+
#: widgets/advanced-custom-fields.php:391, widgets/gravatar.php:263, widgets/image-accordion.php:467, widgets/image-accordion.php:655, widgets/notes.php:543, widgets/notes.php:671, widgets/post-author.php:215, widgets/post-custom-field.php:341, widgets/post-date.php:217, widgets/post-excerpt.php:191, widgets/post-featured-image.php:189, widgets/post-terms.php:213, widgets/post-title.php:191, widgets/site-counters.php:275, widgets/site-description.php:167, widgets/site-logo.php:181, widgets/site-title.php:167
|
467 |
+
msgid "Center"
|
468 |
+
msgstr ""
|
469 |
+
|
470 |
+
#: widgets/advanced-custom-fields.php:399, widgets/gravatar.php:271, widgets/image-accordion.php:475, widgets/image-accordion.php:663, widgets/notes.php:551, widgets/notes.php:679, widgets/post-author.php:223, widgets/post-custom-field.php:349, widgets/post-date.php:225, widgets/post-excerpt.php:199, widgets/post-featured-image.php:197, widgets/post-terms.php:221, widgets/post-title.php:199, widgets/site-counters.php:283, widgets/site-description.php:175, widgets/site-logo.php:189, widgets/site-title.php:175
|
471 |
+
msgid "Right"
|
472 |
+
msgstr ""
|
473 |
+
|
474 |
+
#: widgets/advanced-custom-fields.php:407, widgets/gravatar.php:279, widgets/notes.php:559, widgets/notes.php:687, widgets/post-author.php:231, widgets/post-custom-field.php:357, widgets/post-date.php:233, widgets/post-excerpt.php:207, widgets/post-featured-image.php:205, widgets/post-terms.php:229, widgets/post-title.php:207, widgets/site-counters.php:291, widgets/site-description.php:183, widgets/site-logo.php:197, widgets/site-title.php:183
|
475 |
+
msgid "Justified"
|
476 |
+
msgstr ""
|
477 |
+
|
478 |
+
#: widgets/advanced-custom-fields.php:435, widgets/flickr.php:221, widgets/gravatar.php:307, widgets/pinterest.php:221, widgets/post-author.php:259, widgets/post-custom-field.php:385, widgets/post-date.php:261, widgets/post-excerpt.php:235, widgets/post-featured-image.php:233, widgets/post-featured-image.php:273, widgets/post-terms.php:257, widgets/post-title.php:235, widgets/site-description.php:211, widgets/site-logo.php:225, widgets/site-title.php:211
|
479 |
+
msgid "Link to"
|
480 |
+
msgstr ""
|
481 |
+
|
482 |
+
#: widgets/advanced-custom-fields.php:443, widgets/flickr.php:229, widgets/gravatar.php:315, widgets/pinterest.php:229, widgets/post-author.php:267, widgets/post-custom-field.php:393, widgets/post-date.php:269, widgets/post-excerpt.php:243, widgets/post-featured-image.php:241, widgets/post-terms.php:265, widgets/post-title.php:243, widgets/site-description.php:219, widgets/site-logo.php:233, widgets/site-title.php:219
|
483 |
+
msgid "None"
|
484 |
+
msgstr ""
|
485 |
+
|
486 |
+
#: widgets/advanced-custom-fields.php:445, widgets/gravatar.php:317, widgets/post-author.php:269, widgets/post-custom-field.php:395, widgets/post-date.php:271, widgets/post-excerpt.php:245, widgets/post-featured-image.php:243, widgets/post-title.php:245, widgets/site-description.php:221, widgets/site-logo.php:235, widgets/site-title.php:221
|
487 |
+
msgid "Home URL"
|
488 |
+
msgstr ""
|
489 |
+
|
490 |
+
#: widgets/advanced-custom-fields.php:447, widgets/gravatar.php:319
|
491 |
+
msgid "Post URL"
|
492 |
+
msgstr ""
|
493 |
+
|
494 |
+
#: widgets/advanced-custom-fields.php:449
|
495 |
+
msgid "Other ACF Field"
|
496 |
+
msgstr ""
|
497 |
+
|
498 |
+
#: widgets/advanced-custom-fields.php:451, widgets/gravatar.php:321, widgets/post-author.php:283, widgets/post-custom-field.php:409, widgets/post-date.php:283, widgets/post-excerpt.php:257, widgets/post-featured-image.php:257, widgets/post-title.php:257, widgets/site-description.php:223, widgets/site-logo.php:237, widgets/site-title.php:223
|
499 |
+
msgid "Custom URL"
|
500 |
+
msgstr ""
|
501 |
+
|
502 |
+
#: widgets/advanced-custom-fields.php:467, widgets/gravatar.php:337, widgets/image-accordion.php:261, widgets/post-author.php:299, widgets/post-custom-field.php:425, widgets/post-date.php:299, widgets/post-excerpt.php:273, widgets/post-title.php:273, widgets/site-description.php:239, widgets/site-logo.php:253, widgets/site-title.php:239
|
503 |
+
msgid "Link"
|
504 |
+
msgstr ""
|
505 |
+
|
506 |
+
#: widgets/advanced-custom-fields.php:471, widgets/gravatar.php:341, widgets/image-accordion.php:265, widgets/post-author.php:303, widgets/post-custom-field.php:429, widgets/post-date.php:303, widgets/post-excerpt.php:277, widgets/post-featured-image.php:277, widgets/post-title.php:277, widgets/site-description.php:243, widgets/site-logo.php:257, widgets/site-title.php:243
|
507 |
+
msgid "http://your-link.com"
|
508 |
+
msgstr ""
|
509 |
+
|
510 |
+
#: widgets/advanced-custom-fields.php:499
|
511 |
+
msgid "Link to ACF Field"
|
512 |
+
msgstr ""
|
513 |
+
|
514 |
+
#: widgets/advanced-custom-fields.php:543, widgets/before-after-effect.php:711, widgets/image-accordion.php:745, widgets/notes.php:585, widgets/notes.php:713, widgets/post-author.php:359, widgets/post-custom-field.php:509, widgets/post-date.php:359, widgets/post-excerpt.php:333, widgets/post-terms.php:311, widgets/post-title.php:333, widgets/site-counters.php:339, widgets/site-counters.php:423, widgets/site-description.php:291, widgets/site-title.php:291
|
515 |
+
msgid "Text Color"
|
516 |
+
msgstr ""
|
517 |
+
|
518 |
+
#: widgets/advanced-custom-fields.php:605, widgets/gravatar.php:389, widgets/post-author.php:421, widgets/post-custom-field.php:571, widgets/post-featured-image.php:327, widgets/site-logo.php:305
|
519 |
+
msgid "Size (%)"
|
520 |
+
msgstr ""
|
521 |
+
|
522 |
+
#: widgets/advanced-custom-fields.php:655, widgets/flickr.php:405, widgets/gravatar.php:433, widgets/notes.php:309, widgets/pinterest.php:379, widgets/post-author.php:471, widgets/post-custom-field.php:621, widgets/post-featured-image.php:371, widgets/site-logo.php:349
|
523 |
+
msgid "Opacity (%)"
|
524 |
+
msgstr ""
|
525 |
+
|
526 |
+
#: widgets/advanced-custom-fields.php:703, widgets/gravatar.php:475, widgets/notes.php:351, widgets/post-author.php:519, widgets/post-custom-field.php:669, widgets/post-featured-image.php:413, widgets/site-logo.php:391
|
527 |
+
msgid "Angle (deg)"
|
528 |
+
msgstr ""
|
529 |
+
|
530 |
+
#: widgets/advanced-custom-fields.php:755, widgets/flickr.php:441, widgets/gravatar.php:521, widgets/notes.php:397, widgets/pinterest.php:415, widgets/post-author.php:571, widgets/post-custom-field.php:721, widgets/post-date.php:409, widgets/post-excerpt.php:383, widgets/post-featured-image.php:459, widgets/post-terms.php:361, widgets/post-title.php:383, widgets/site-counters.php:387, widgets/site-counters.php:471, widgets/site-description.php:341, widgets/site-logo.php:437, widgets/site-title.php:341
|
531 |
+
msgid "Hover Animation"
|
532 |
+
msgstr ""
|
533 |
+
|
534 |
+
#: widgets/advanced-custom-fields.php:773, widgets/gravatar.php:539, widgets/post-author.php:589, widgets/post-custom-field.php:739, widgets/post-featured-image.php:477, widgets/site-logo.php:455
|
535 |
+
msgid "Image Border"
|
536 |
+
msgstr ""
|
537 |
+
|
538 |
+
#: widgets/advanced-custom-fields.php:795, widgets/before-after-effect.php:1105, widgets/gravatar.php:555, widgets/image-accordion.php:961, widgets/post-author.php:611, widgets/post-custom-field.php:761, widgets/post-featured-image.php:493, widgets/site-logo.php:471
|
539 |
+
msgid "Border Radius"
|
540 |
+
msgstr ""
|
541 |
+
|
542 |
+
#: widgets/before-after-effect.php:69, widgets/before-after-effect.php:113, widgets/before-after-effect.php:189
|
543 |
+
msgid "Before After Effect"
|
544 |
+
msgstr ""
|
545 |
+
|
546 |
+
#: widgets/before-after-effect.php:203, widgets/before-after-effect.php:277
|
547 |
+
msgid "Title & Image"
|
548 |
+
msgstr ""
|
549 |
+
|
550 |
+
#: widgets/before-after-effect.php:225
|
551 |
+
msgid "Before"
|
552 |
+
msgstr ""
|
553 |
+
|
554 |
+
#: widgets/before-after-effect.php:299
|
555 |
+
msgid "After"
|
556 |
+
msgstr ""
|
557 |
+
|
558 |
+
#: widgets/before-after-effect.php:351
|
559 |
+
msgid "Settings"
|
560 |
+
msgstr ""
|
561 |
+
|
562 |
+
#: widgets/before-after-effect.php:369
|
563 |
+
msgid "Orientation"
|
564 |
+
msgstr ""
|
565 |
+
|
566 |
+
#: widgets/before-after-effect.php:375
|
567 |
+
msgid "Horizontal"
|
568 |
+
msgstr ""
|
569 |
+
|
570 |
+
#: widgets/before-after-effect.php:377
|
571 |
+
msgid "Vertical"
|
572 |
+
msgstr ""
|
573 |
+
|
574 |
+
#: widgets/before-after-effect.php:397
|
575 |
+
msgid "Starting Position (%)"
|
576 |
+
msgstr ""
|
577 |
+
|
578 |
+
#: widgets/before-after-effect.php:441
|
579 |
+
msgid "Overlay"
|
580 |
+
msgstr ""
|
581 |
+
|
582 |
+
#: widgets/before-after-effect.php:457
|
583 |
+
msgid "Overlay Color"
|
584 |
+
msgstr ""
|
585 |
+
|
586 |
+
#: widgets/before-after-effect.php:503
|
587 |
+
msgid "Separetor"
|
588 |
+
msgstr ""
|
589 |
+
|
590 |
+
#: widgets/before-after-effect.php:519
|
591 |
+
msgid "Separetor Color"
|
592 |
+
msgstr ""
|
593 |
+
|
594 |
+
#: widgets/before-after-effect.php:567
|
595 |
+
msgid "Separetor Width (px)"
|
596 |
+
msgstr ""
|
597 |
+
|
598 |
+
#: widgets/before-after-effect.php:619
|
599 |
+
msgid "Separetor Radius"
|
600 |
+
msgstr ""
|
601 |
+
|
602 |
+
#: widgets/before-after-effect.php:695, widgets/notes.php:471
|
603 |
+
msgid "Title"
|
604 |
+
msgstr ""
|
605 |
+
|
606 |
+
#: widgets/before-after-effect.php:745, widgets/image-accordion.php:779
|
607 |
+
msgid "Background Color"
|
608 |
+
msgstr ""
|
609 |
+
|
610 |
+
#: widgets/before-after-effect.php:803, widgets/before-after-effect.php:905
|
611 |
+
msgid "1st Title Position (%)"
|
612 |
+
msgstr ""
|
613 |
+
|
614 |
+
#: widgets/before-after-effect.php:855, widgets/before-after-effect.php:957
|
615 |
+
msgid "2nd Title Position (%)"
|
616 |
+
msgstr ""
|
617 |
+
|
618 |
+
#: widgets/before-after-effect.php:1007, widgets/image-accordion.php:869
|
619 |
+
msgid "Margin"
|
620 |
+
msgstr ""
|
621 |
+
|
622 |
+
#: widgets/before-after-effect.php:1049, widgets/flickr.php:457, widgets/image-accordion.php:907, widgets/notes.php:413, widgets/pinterest.php:431
|
623 |
+
msgid "Padding"
|
624 |
+
msgstr ""
|
625 |
+
|
626 |
+
#: widgets/flickr.php:59, widgets/flickr.php:95, widgets/flickr.php:171, widgets/flickr.php:283
|
627 |
+
msgid "Flickr"
|
628 |
+
msgstr ""
|
629 |
+
|
630 |
+
#: widgets/flickr.php:185
|
631 |
+
msgid "Flickr ID"
|
632 |
+
msgstr ""
|
633 |
+
|
634 |
+
#: widgets/flickr.php:203, widgets/pinterest.php:203
|
635 |
+
msgid "Links"
|
636 |
+
msgstr ""
|
637 |
+
|
638 |
+
#: widgets/flickr.php:231
|
639 |
+
msgid "Image page on Flickr"
|
640 |
+
msgstr ""
|
641 |
+
|
642 |
+
#: widgets/flickr.php:247, widgets/pinterest.php:247
|
643 |
+
msgid "Open links in"
|
644 |
+
msgstr ""
|
645 |
+
|
646 |
+
#: widgets/flickr.php:255, widgets/pinterest.php:255
|
647 |
+
msgid "Same window"
|
648 |
+
msgstr ""
|
649 |
+
|
650 |
+
#: widgets/flickr.php:257, widgets/pinterest.php:257
|
651 |
+
msgid "New window"
|
652 |
+
msgstr ""
|
653 |
+
|
654 |
+
#: widgets/flickr.php:299
|
655 |
+
msgid "Size"
|
656 |
+
msgstr ""
|
657 |
+
|
658 |
+
#: widgets/flickr.php:307
|
659 |
+
msgid "Thumbnails Grid"
|
660 |
+
msgstr ""
|
661 |
+
|
662 |
+
#: widgets/flickr.php:309
|
663 |
+
msgid "Full Images Grid"
|
664 |
+
msgstr ""
|
665 |
+
|
666 |
+
#: widgets/flickr.php:325, widgets/pinterest.php:299
|
667 |
+
msgid "Colomns Per Row"
|
668 |
+
msgstr ""
|
669 |
+
|
670 |
+
#: widgets/flickr.php:365, widgets/pinterest.php:339
|
671 |
+
msgid "Number of Rows"
|
672 |
+
msgstr ""
|
673 |
+
|
674 |
+
#: widgets/gravatar.php:63, widgets/gravatar.php:99, widgets/gravatar.php:175, widgets/gravatar.php:373
|
675 |
+
msgid "Gravatar"
|
676 |
+
msgstr ""
|
677 |
+
|
678 |
+
#: widgets/gravatar.php:189
|
679 |
+
msgid "Email"
|
680 |
+
msgstr ""
|
681 |
+
|
682 |
+
#: widgets/gravatar.php:193
|
683 |
+
msgid "your@email.com"
|
684 |
+
msgstr ""
|
685 |
+
|
686 |
+
#: widgets/image-accordion.php:73, widgets/image-accordion.php:109, widgets/image-accordion.php:185
|
687 |
+
msgid "Image Accordion"
|
688 |
+
msgstr ""
|
689 |
+
|
690 |
+
#: widgets/image-accordion.php:199
|
691 |
+
msgid "Images"
|
692 |
+
msgstr ""
|
693 |
+
|
694 |
+
#: widgets/image-accordion.php:207
|
695 |
+
msgid "Type out sentence"
|
696 |
+
msgstr ""
|
697 |
+
|
698 |
+
#: widgets/image-accordion.php:213
|
699 |
+
msgid "and delete them"
|
700 |
+
msgstr ""
|
701 |
+
|
702 |
+
#: widgets/image-accordion.php:219
|
703 |
+
msgid "with beautifull animation"
|
704 |
+
msgstr ""
|
705 |
+
|
706 |
+
#: widgets/image-accordion.php:247, widgets/image-accordion.php:251, widgets/image-accordion.php:621
|
707 |
+
msgid "Caption"
|
708 |
+
msgstr ""
|
709 |
+
|
710 |
+
#: widgets/image-accordion.php:289
|
711 |
+
msgid "Container"
|
712 |
+
msgstr ""
|
713 |
+
|
714 |
+
#: widgets/image-accordion.php:305
|
715 |
+
msgid "Height"
|
716 |
+
msgstr ""
|
717 |
+
|
718 |
+
#: widgets/image-accordion.php:351
|
719 |
+
msgid "Direction"
|
720 |
+
msgstr ""
|
721 |
+
|
722 |
+
#: widgets/image-accordion.php:361
|
723 |
+
msgid "Right to Left"
|
724 |
+
msgstr ""
|
725 |
+
|
726 |
+
#: widgets/image-accordion.php:369
|
727 |
+
msgid "Left to Right"
|
728 |
+
msgstr ""
|
729 |
+
|
730 |
+
#: widgets/image-accordion.php:449
|
731 |
+
msgid "Image Alignment"
|
732 |
+
msgstr ""
|
733 |
+
|
734 |
+
#: widgets/image-accordion.php:503
|
735 |
+
msgid "Transition Speed (ms)"
|
736 |
+
msgstr ""
|
737 |
+
|
738 |
+
#: widgets/image-accordion.php:557
|
739 |
+
msgid "Opened Image Size (%)"
|
740 |
+
msgstr ""
|
741 |
+
|
742 |
+
#: widgets/image-accordion.php:691
|
743 |
+
msgid "Vertical Alignment"
|
744 |
+
msgstr ""
|
745 |
+
|
746 |
+
#: widgets/image-accordion.php:701
|
747 |
+
msgid "Top"
|
748 |
+
msgstr ""
|
749 |
+
|
750 |
+
#: widgets/image-accordion.php:709
|
751 |
+
msgid "Middle"
|
752 |
+
msgstr ""
|
753 |
+
|
754 |
+
#: widgets/image-accordion.php:717
|
755 |
+
msgid "Bottom"
|
756 |
+
msgstr ""
|
757 |
+
|
758 |
+
#: widgets/notes.php:67, widgets/notes.php:103
|
759 |
+
msgid "Notes"
|
760 |
+
msgstr ""
|
761 |
+
|
762 |
+
#: widgets/notes.php:179, widgets/notes.php:229
|
763 |
+
msgid "Note"
|
764 |
+
msgstr ""
|
765 |
+
|
766 |
+
#: widgets/notes.php:193
|
767 |
+
msgid "Note Title"
|
768 |
+
msgstr ""
|
769 |
+
|
770 |
+
#: widgets/notes.php:209
|
771 |
+
msgid "Note Content"
|
772 |
+
msgstr ""
|
773 |
+
|
774 |
+
#: widgets/notes.php:245
|
775 |
+
msgid "Background"
|
776 |
+
msgstr ""
|
777 |
+
|
778 |
+
#: widgets/notes.php:277
|
779 |
+
msgid "Sticker Color"
|
780 |
+
msgstr ""
|
781 |
+
|
782 |
+
#: widgets/notes.php:639
|
783 |
+
msgid "Content"
|
784 |
+
msgstr ""
|
785 |
+
|
786 |
+
#: widgets/pinterest.php:59, widgets/pinterest.php:95, widgets/pinterest.php:171, widgets/pinterest.php:283
|
787 |
+
msgid "Pinterest"
|
788 |
+
msgstr ""
|
789 |
+
|
790 |
+
#: widgets/pinterest.php:185
|
791 |
+
msgid "Pinterest Username"
|
792 |
+
msgstr ""
|
793 |
+
|
794 |
+
#: widgets/pinterest.php:189
|
795 |
+
msgid "pinterest"
|
796 |
+
msgstr ""
|
797 |
+
|
798 |
+
#: widgets/pinterest.php:231
|
799 |
+
msgid "Image page on pinterest"
|
800 |
+
msgstr ""
|
801 |
+
|
802 |
+
#: widgets/post-author.php:77, widgets/post-author.php:121, widgets/post-author.php:339
|
803 |
+
msgid "%s Author"
|
804 |
+
msgstr ""
|
805 |
+
|
806 |
+
#: widgets/post-author.php:139
|
807 |
+
msgid "Author"
|
808 |
+
msgstr ""
|
809 |
+
|
810 |
+
#: widgets/post-author.php:275, widgets/post-custom-field.php:401, widgets/post-date.php:277, widgets/post-excerpt.php:251, widgets/post-featured-image.php:249, widgets/post-title.php:251
|
811 |
+
msgid "%s URL"
|
812 |
+
msgstr ""
|
813 |
+
|
814 |
+
#: widgets/post-author.php:281
|
815 |
+
msgid "Author URL"
|
816 |
+
msgstr ""
|
817 |
+
|
818 |
+
#: widgets/post-author.php:867
|
819 |
+
msgid "First Name"
|
820 |
+
msgstr ""
|
821 |
+
|
822 |
+
#: widgets/post-author.php:869
|
823 |
+
msgid "Last Name"
|
824 |
+
msgstr ""
|
825 |
+
|
826 |
+
#: widgets/post-author.php:871
|
827 |
+
msgid "First Name + Last Name"
|
828 |
+
msgstr ""
|
829 |
+
|
830 |
+
#: widgets/post-author.php:873
|
831 |
+
msgid "Last Name + First Name"
|
832 |
+
msgstr ""
|
833 |
+
|
834 |
+
#: widgets/post-author.php:875
|
835 |
+
msgid "Nick Name"
|
836 |
+
msgstr ""
|
837 |
+
|
838 |
+
#: widgets/post-author.php:877
|
839 |
+
msgid "Display Name"
|
840 |
+
msgstr ""
|
841 |
+
|
842 |
+
#: widgets/post-author.php:879
|
843 |
+
msgid "User Name"
|
844 |
+
msgstr ""
|
845 |
+
|
846 |
+
#: widgets/post-author.php:881
|
847 |
+
msgid "User Bio"
|
848 |
+
msgstr ""
|
849 |
+
|
850 |
+
#: widgets/post-author.php:883
|
851 |
+
msgid "User Image"
|
852 |
+
msgstr ""
|
853 |
+
|
854 |
+
#: widgets/post-comments.php:67, widgets/post-comments.php:111
|
855 |
+
msgid "%s Comments"
|
856 |
+
msgstr ""
|
857 |
+
|
858 |
+
#: widgets/post-comments.php:131
|
859 |
+
msgid "This widget displays the default Comments Template included in the current Theme."
|
860 |
+
msgstr ""
|
861 |
+
|
862 |
+
#: widgets/post-comments.php:135
|
863 |
+
msgid "No custom styling can be applied as each theme uses it's own CSS classes and IDs."
|
864 |
+
msgstr ""
|
865 |
+
|
866 |
+
#: widgets/post-custom-field.php:77, widgets/post-custom-field.php:125, widgets/post-custom-field.php:209, widgets/post-custom-field.php:489
|
867 |
+
msgid "%s Custom Field"
|
868 |
+
msgstr ""
|
869 |
+
|
870 |
+
#: widgets/post-custom-field.php:241
|
871 |
+
msgid "Custom Field"
|
872 |
+
msgstr ""
|
873 |
+
|
874 |
+
#: widgets/post-custom-field.php:407
|
875 |
+
msgid "Other Custom Field"
|
876 |
+
msgstr ""
|
877 |
+
|
878 |
+
#: widgets/post-custom-field.php:457
|
879 |
+
msgid "Custom Field Link"
|
880 |
+
msgstr ""
|
881 |
+
|
882 |
+
#: widgets/post-date.php:73, widgets/post-date.php:117, widgets/post-date.php:339
|
883 |
+
msgid "%s Date"
|
884 |
+
msgstr ""
|
885 |
+
|
886 |
+
#: widgets/post-date.php:135
|
887 |
+
msgid "Date Type"
|
888 |
+
msgstr ""
|
889 |
+
|
890 |
+
#: widgets/post-date.php:141
|
891 |
+
msgid "Publish Date"
|
892 |
+
msgstr ""
|
893 |
+
|
894 |
+
#: widgets/post-date.php:143
|
895 |
+
msgid "Last Modified Date"
|
896 |
+
msgstr ""
|
897 |
+
|
898 |
+
#: widgets/post-excerpt.php:73, widgets/post-excerpt.php:117, widgets/post-excerpt.php:313
|
899 |
+
msgid "%s Excerpt"
|
900 |
+
msgstr ""
|
901 |
+
|
902 |
+
#: widgets/post-featured-image.php:75, widgets/post-featured-image.php:119, widgets/post-featured-image.php:307
|
903 |
+
msgid "%s Featured Image"
|
904 |
+
msgstr ""
|
905 |
+
|
906 |
+
#: widgets/post-featured-image.php:157
|
907 |
+
msgid "Image Size"
|
908 |
+
msgstr ""
|
909 |
+
|
910 |
+
#: widgets/post-featured-image.php:255
|
911 |
+
msgid "Media File URL"
|
912 |
+
msgstr ""
|
913 |
+
|
914 |
+
#: widgets/post-terms.php:73, widgets/post-terms.php:117, widgets/post-terms.php:291
|
915 |
+
msgid "%s Terms"
|
916 |
+
msgstr ""
|
917 |
+
|
918 |
+
#: widgets/post-terms.php:135, widgets/site-counters.php:147, widgets/site-counters.php:193
|
919 |
+
msgid "Taxonomy"
|
920 |
+
msgstr ""
|
921 |
+
|
922 |
+
#: widgets/post-terms.php:267
|
923 |
+
msgid "Term"
|
924 |
+
msgstr ""
|
925 |
+
|
926 |
+
#: widgets/post-title.php:73, widgets/post-title.php:117, widgets/post-title.php:313
|
927 |
+
msgid "%s Title"
|
928 |
+
msgstr ""
|
929 |
+
|
930 |
+
#: widgets/site-counters.php:137
|
931 |
+
msgid "Display"
|
932 |
+
msgstr ""
|
933 |
+
|
934 |
+
#: widgets/site-counters.php:145, widgets/site-counters.php:167
|
935 |
+
msgid "Post Type"
|
936 |
+
msgstr ""
|
937 |
+
|
938 |
+
#: widgets/site-counters.php:149, widgets/site-counters.php:521, widgets/site-counters.php:617
|
939 |
+
msgid "Comments"
|
940 |
+
msgstr ""
|
941 |
+
|
942 |
+
#: widgets/site-counters.php:151, widgets/site-counters.php:509, widgets/site-counters.php:605
|
943 |
+
msgid "Users"
|
944 |
+
msgstr ""
|
945 |
+
|
946 |
+
#: widgets/site-counters.php:323
|
947 |
+
msgid "Number"
|
948 |
+
msgstr ""
|
949 |
+
|
950 |
+
#: widgets/site-counters.php:407
|
951 |
+
msgid "Label"
|
952 |
+
msgstr ""
|
|
|
|
|
|
|
|
press-elements-admin.php
CHANGED
@@ -17,7 +17,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
17 |
*
|
18 |
* @since 1.0.0
|
19 |
*/
|
20 |
-
class
|
21 |
|
22 |
/**
|
23 |
* Constructor
|
@@ -464,5 +464,3 @@ class Press_Elements_Admin {
|
|
464 |
}
|
465 |
|
466 |
}
|
467 |
-
|
468 |
-
new Press_Elements_Admin();
|
17 |
*
|
18 |
* @since 1.0.0
|
19 |
*/
|
20 |
+
class Admin {
|
21 |
|
22 |
/**
|
23 |
* Constructor
|
464 |
}
|
465 |
|
466 |
}
|
|
|
|
press-elements-freemius.php
CHANGED
@@ -4,56 +4,67 @@
|
|
4 |
if ( !defined( 'ABSPATH' ) ) {
|
5 |
die;
|
6 |
}
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
|
|
|
|
|
|
|
|
|
|
40 |
}
|
41 |
-
|
42 |
-
return $press_elements_freemius;
|
43 |
-
}
|
44 |
|
45 |
-
/**
|
46 |
-
* Add header title
|
47 |
-
*
|
48 |
-
* Insets H1 title to the freemius templates.
|
49 |
-
*
|
50 |
-
* @since 1.6.0
|
51 |
-
*/
|
52 |
-
function press_elements_freemius_header( $html )
|
53 |
-
{
|
54 |
-
return sprintf( '<h1>%1$s</h1>%2$s', esc_html_e( 'Press Elements - Widgets for Elementor', 'press-elements' ), $html );
|
55 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
|
|
|
57 |
// Init Freemius
|
58 |
press_elements_freemius();
|
59 |
press_elements_freemius()->add_filter( 'templates/account.php', 'press_elements_freemius_header' );
|
4 |
if ( !defined( 'ABSPATH' ) ) {
|
5 |
die;
|
6 |
}
|
7 |
+
// Make sure the same methods/classes aren’t loaded twice for free/premium versions
|
8 |
+
if ( !function_exists( 'press_elements_freemius' ) ) {
|
9 |
+
/**
|
10 |
+
* Load Freemius SDK
|
11 |
+
*
|
12 |
+
* Load and init Freemius SDK for this plugin.
|
13 |
+
*
|
14 |
+
* @since 1.0.0
|
15 |
+
*/
|
16 |
+
function press_elements_freemius()
|
17 |
+
{
|
18 |
+
global $press_elements_freemius ;
|
19 |
+
|
20 |
+
if ( !isset( $press_elements_freemius ) ) {
|
21 |
+
// Include Freemius SDK.
|
22 |
+
require_once dirname( __FILE__ ) . '/libs/freemius/start.php';
|
23 |
+
$press_elements_freemius = fs_dynamic_init( array(
|
24 |
+
'id' => '761',
|
25 |
+
'slug' => 'press-elements',
|
26 |
+
'type' => 'plugin',
|
27 |
+
'public_key' => 'pk_fe2850d57f7d4f206aefaa106b91f',
|
28 |
+
'is_premium' => false,
|
29 |
+
'has_addons' => false,
|
30 |
+
'has_paid_plans' => true,
|
31 |
+
'menu' => array(
|
32 |
+
'slug' => 'press-elements',
|
33 |
+
'contact' => false,
|
34 |
+
'support' => false,
|
35 |
+
'pricing' => false,
|
36 |
+
'parent' => array(
|
37 |
+
'slug' => 'options-general.php',
|
38 |
+
),
|
39 |
+
),
|
40 |
+
'is_live' => true,
|
41 |
+
) );
|
42 |
+
}
|
43 |
+
|
44 |
+
return $press_elements_freemius;
|
45 |
}
|
|
|
|
|
|
|
46 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
}
|
48 |
+
// Make sure the same methods/classes aren’t loaded twice for free/premium versions
|
49 |
+
if ( !function_exists( 'press_elements_freemius_header' ) ) {
|
50 |
+
/**
|
51 |
+
* Add header title
|
52 |
+
*
|
53 |
+
* Insets H1 title to the freemius templates.
|
54 |
+
*
|
55 |
+
* @since 1.6.0
|
56 |
+
*
|
57 |
+
* @param string Template html.
|
58 |
+
*
|
59 |
+
* @return string Updated template html.
|
60 |
+
*/
|
61 |
+
function press_elements_freemius_header( $html )
|
62 |
+
{
|
63 |
+
$title = sprintf( '<h1>%1$s</h1><p>%2$s</p>', esc_html__( 'Press Elements - Widgets for Elementor', 'press-elements' ), esc_html__( 'Easy-to-use widgets that help you display and design your content using Elementor page builder.', 'press-elements' ) );
|
64 |
+
return $title . $html;
|
65 |
+
}
|
66 |
|
67 |
+
}
|
68 |
// Init Freemius
|
69 |
press_elements_freemius();
|
70 |
press_elements_freemius()->add_filter( 'templates/account.php', 'press_elements_freemius_header' );
|
press-elements-plugin.php
CHANGED
@@ -2,25 +2,6 @@
|
|
2 |
|
3 |
namespace PressElements;
|
4 |
|
5 |
-
use PressElements\Widgets\Press_Elements_Site_Title ;
|
6 |
-
use PressElements\Widgets\Press_Elements_Site_Description ;
|
7 |
-
use PressElements\Widgets\Press_Elements_Site_Logo ;
|
8 |
-
use PressElements\Widgets\Press_Elements_Site_Counters ;
|
9 |
-
use PressElements\Widgets\Press_Elements_Post_Title ;
|
10 |
-
use PressElements\Widgets\Press_Elements_Post_Excerpt ;
|
11 |
-
use PressElements\Widgets\Press_Elements_Post_Author ;
|
12 |
-
use PressElements\Widgets\Press_Elements_Post_Date ;
|
13 |
-
use PressElements\Widgets\Press_Elements_Post_Terms ;
|
14 |
-
use PressElements\Widgets\Press_Elements_Post_Featured_Image ;
|
15 |
-
use PressElements\Widgets\Press_Elements_Post_Custom_Field ;
|
16 |
-
use PressElements\Widgets\Press_Elements_Post_Comments ;
|
17 |
-
use PressElements\Widgets\Press_Elements_Image_Accordion ;
|
18 |
-
use PressElements\Widgets\Press_Elements_Before_After_Effect ;
|
19 |
-
use PressElements\Widgets\Press_Elements_Notes ;
|
20 |
-
use PressElements\Widgets\Press_Elements_Advanced_Custom_Fields ;
|
21 |
-
use PressElements\Widgets\Press_Elements_Gravatar ;
|
22 |
-
use PressElements\Widgets\Press_Elements_Flickr ;
|
23 |
-
use PressElements\Widgets\Press_Elements_Pinterest ;
|
24 |
// Exit if accessed directly
|
25 |
if ( !defined( 'ABSPATH' ) ) {
|
26 |
die;
|
@@ -32,7 +13,7 @@ if ( !defined( 'ABSPATH' ) ) {
|
|
32 |
*
|
33 |
* @since 1.0.0
|
34 |
*/
|
35 |
-
class
|
36 |
{
|
37 |
/**
|
38 |
* Constructor
|
@@ -151,29 +132,28 @@ class Press_Elements_Plugin
|
|
151 |
private function register_widget()
|
152 |
{
|
153 |
// Site Elements
|
154 |
-
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Press_Elements_Site_Title() );
|
155 |
-
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Press_Elements_Site_Description() );
|
156 |
-
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Press_Elements_Site_Logo() );
|
157 |
-
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Press_Elements_Site_Counters() );
|
158 |
// Post Elements
|
159 |
-
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Press_Elements_Post_Title() );
|
160 |
-
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Press_Elements_Post_Excerpt() );
|
161 |
-
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Press_Elements_Post_Date() );
|
162 |
-
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Press_Elements_Post_Author() );
|
163 |
-
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Press_Elements_Post_Terms() );
|
164 |
-
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Press_Elements_Post_Featured_Image() );
|
165 |
-
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Press_Elements_Post_Custom_Field() );
|
166 |
-
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Press_Elements_Post_Comments() );
|
167 |
// Effects
|
168 |
-
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Press_Elements_Image_Accordion() );
|
169 |
-
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Press_Elements_Before_After_Effect() );
|
170 |
-
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Press_Elements_Notes() );
|
171 |
// Integrations
|
172 |
-
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Press_Elements_Advanced_Custom_Fields() );
|
173 |
-
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Press_Elements_Gravatar() );
|
174 |
-
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Press_Elements_Flickr() );
|
175 |
-
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Press_Elements_Pinterest() );
|
176 |
}
|
177 |
|
178 |
-
}
|
179 |
-
new Press_Elements_Plugin();
|
2 |
|
3 |
namespace PressElements;
|
4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
// Exit if accessed directly
|
6 |
if ( !defined( 'ABSPATH' ) ) {
|
7 |
die;
|
13 |
*
|
14 |
* @since 1.0.0
|
15 |
*/
|
16 |
+
class Plugin
|
17 |
{
|
18 |
/**
|
19 |
* Constructor
|
132 |
private function register_widget()
|
133 |
{
|
134 |
// Site Elements
|
135 |
+
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new \PressElements\Widgets\Press_Elements_Site_Title() );
|
136 |
+
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new \PressElements\Widgets\Press_Elements_Site_Description() );
|
137 |
+
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new \PressElements\Widgets\Press_Elements_Site_Logo() );
|
138 |
+
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new \PressElements\Widgets\Press_Elements_Site_Counters() );
|
139 |
// Post Elements
|
140 |
+
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new \PressElements\Widgets\Press_Elements_Post_Title() );
|
141 |
+
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new \PressElements\Widgets\Press_Elements_Post_Excerpt() );
|
142 |
+
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new \PressElements\Widgets\Press_Elements_Post_Date() );
|
143 |
+
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new \PressElements\Widgets\Press_Elements_Post_Author() );
|
144 |
+
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new \PressElements\Widgets\Press_Elements_Post_Terms() );
|
145 |
+
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new \PressElements\Widgets\Press_Elements_Post_Featured_Image() );
|
146 |
+
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new \PressElements\Widgets\Press_Elements_Post_Custom_Field() );
|
147 |
+
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new \PressElements\Widgets\Press_Elements_Post_Comments() );
|
148 |
// Effects
|
149 |
+
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new \PressElements\Widgets\Press_Elements_Image_Accordion() );
|
150 |
+
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new \PressElements\Widgets\Press_Elements_Before_After_Effect() );
|
151 |
+
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new \PressElements\Widgets\Press_Elements_Notes() );
|
152 |
// Integrations
|
153 |
+
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new \PressElements\Widgets\Press_Elements_Advanced_Custom_Fields() );
|
154 |
+
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new \PressElements\Widgets\Press_Elements_Gravatar() );
|
155 |
+
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new \PressElements\Widgets\Press_Elements_Flickr() );
|
156 |
+
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new \PressElements\Widgets\Press_Elements_Pinterest() );
|
157 |
}
|
158 |
|
159 |
+
}
|
|
press-elements.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Press Elements - Widgets for Elementor
|
4 |
* Description: Easy-to-use widgets that help you display and design your content using Elementor page builder.
|
5 |
* Plugin URI: https://wordpress.org/plugins/press-elements/
|
6 |
-
* Version: 1.6.
|
7 |
* Author: Press Elements
|
8 |
* Author URI: https://press-elements.com/
|
9 |
* Text Domain: press-elements
|
@@ -18,8 +18,10 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
18 |
|
19 |
|
20 |
|
21 |
-
// Load
|
22 |
require( __DIR__ . '/press-elements-freemius.php' );
|
|
|
|
|
23 |
|
24 |
|
25 |
|
@@ -38,8 +40,8 @@ if ( ! function_exists( 'press_elements_load' ) ) {
|
|
38 |
// Load localization file
|
39 |
load_plugin_textdomain( 'press-elements' );
|
40 |
|
41 |
-
//
|
42 |
-
|
43 |
|
44 |
// Notice if the Elementor is not active
|
45 |
if ( ! did_action( 'elementor/loaded' ) ) {
|
@@ -54,8 +56,8 @@ if ( ! function_exists( 'press_elements_load' ) ) {
|
|
54 |
return;
|
55 |
}
|
56 |
|
57 |
-
//
|
58 |
-
|
59 |
|
60 |
}
|
61 |
add_action( 'plugins_loaded', 'press_elements_load' );
|
3 |
* Plugin Name: Press Elements - Widgets for Elementor
|
4 |
* Description: Easy-to-use widgets that help you display and design your content using Elementor page builder.
|
5 |
* Plugin URI: https://wordpress.org/plugins/press-elements/
|
6 |
+
* Version: 1.6.1
|
7 |
* Author: Press Elements
|
8 |
* Author URI: https://press-elements.com/
|
9 |
* Text Domain: press-elements
|
18 |
|
19 |
|
20 |
|
21 |
+
// Load required files
|
22 |
require( __DIR__ . '/press-elements-freemius.php' );
|
23 |
+
require( __DIR__ . '/press-elements-admin.php' );
|
24 |
+
require( __DIR__ . '/press-elements-plugin.php' );
|
25 |
|
26 |
|
27 |
|
40 |
// Load localization file
|
41 |
load_plugin_textdomain( 'press-elements' );
|
42 |
|
43 |
+
// Press Elements Admin - displays even if Elementor is not active
|
44 |
+
new \PressElements\Admin();
|
45 |
|
46 |
// Notice if the Elementor is not active
|
47 |
if ( ! did_action( 'elementor/loaded' ) ) {
|
56 |
return;
|
57 |
}
|
58 |
|
59 |
+
// Press Elements Plugin
|
60 |
+
new \PressElements\Plugin();
|
61 |
|
62 |
}
|
63 |
add_action( 'plugins_loaded', 'press_elements_load' );
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: ramiy
|
|
3 |
Tags: elementor, press elements, elements, widgets, page builder, builder, visual editor,
|
4 |
Requires at least: 4.7
|
5 |
Tested up to: 4.7
|
6 |
-
Stable tag: 1.6.
|
7 |
License: GPLv3
|
8 |
License URI: https://opensource.org/licenses/GPL-3.0
|
9 |
|
@@ -45,14 +45,18 @@ With Press Elements you can use Elementor widgets to display and design your pos
|
|
45 |
|
46 |
Press Elements comes with 19 useful Elementor widgets, 11 of them are free of charge!
|
47 |
|
48 |
-
Site Elements
|
|
|
|
|
49 |
|
50 |
- **Site Title** - The name of the site (set in Settings > General).
|
51 |
- **Site Description** - The tagline (set in Settings > General).
|
52 |
- **Site Logo** - Custom site logo (set in the Customizer).
|
53 |
- **Site Counters** - General site stats for Post Types, Taxonomies, Comments and Users.
|
54 |
|
55 |
-
Post Elements
|
|
|
|
|
56 |
|
57 |
- **Post Title** - The title of the post.
|
58 |
- **Post Excerpt** - A short description.
|
@@ -63,19 +67,27 @@ Post Elements:
|
|
63 |
- **Post Custom Field (Pro)** - Extra information saved as WordPress meta-data.
|
64 |
- **Post Comments** - The default Comments Template included in the theme.
|
65 |
|
66 |
-
Effects
|
|
|
|
|
67 |
|
68 |
-
-
|
69 |
-
-
|
70 |
-
-
|
71 |
|
72 |
-
Integrations
|
|
|
|
|
73 |
|
74 |
- **Advanced Custom Fields (Pro)** - Fields added by [Advanced Custom Fields](https://wordpress.org/plugins/advanced-custom-fields/) plugin.
|
75 |
-
-
|
76 |
- **Flickr (Pro)** - Display Flickr photostream based on Flickr User ID.
|
77 |
- **Pinterest (Pro)** - Display Pinterest pins based on Pinterest username.
|
78 |
|
|
|
|
|
|
|
|
|
79 |
== Screenshots ==
|
80 |
1. Post edit screen with WordPress elements.
|
81 |
2. Elementor widgets for each site and post element.
|
@@ -90,7 +102,7 @@ Integrations:
|
|
90 |
11. Display Pinterest pins based on Pinterest username.
|
91 |
12. Display images in a beautiful accordion effect.
|
92 |
13. Display visual differences between two images.
|
93 |
-
14. Display sticky notes
|
94 |
|
95 |
== Frequently Asked Questions ==
|
96 |
|
@@ -150,6 +162,14 @@ For more advanced uses, please contact us in our [wp.org support forum](https://
|
|
150 |
|
151 |
== Changelog ==
|
152 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
153 |
= 1.6.0 =
|
154 |
|
155 |
**General**
|
3 |
Tags: elementor, press elements, elements, widgets, page builder, builder, visual editor,
|
4 |
Requires at least: 4.7
|
5 |
Tested up to: 4.7
|
6 |
+
Stable tag: 1.6.1
|
7 |
License: GPLv3
|
8 |
License URI: https://opensource.org/licenses/GPL-3.0
|
9 |
|
45 |
|
46 |
Press Elements comes with 19 useful Elementor widgets, 11 of them are free of charge!
|
47 |
|
48 |
+
**Site Elements**
|
49 |
+
|
50 |
+
General site related components integrated in WordPress.
|
51 |
|
52 |
- **Site Title** - The name of the site (set in Settings > General).
|
53 |
- **Site Description** - The tagline (set in Settings > General).
|
54 |
- **Site Logo** - Custom site logo (set in the Customizer).
|
55 |
- **Site Counters** - General site stats for Post Types, Taxonomies, Comments and Users.
|
56 |
|
57 |
+
**Post Elements**
|
58 |
+
|
59 |
+
Post related components based on WordPress theme architecture.
|
60 |
|
61 |
- **Post Title** - The title of the post.
|
62 |
- **Post Excerpt** - A short description.
|
67 |
- **Post Custom Field (Pro)** - Extra information saved as WordPress meta-data.
|
68 |
- **Post Comments** - The default Comments Template included in the theme.
|
69 |
|
70 |
+
**Effects**
|
71 |
+
|
72 |
+
Special text effects and advanced image effects.
|
73 |
|
74 |
+
- [__Image Accordion (Pro)__](https://press-elements.com/widgets/image-accordion/) - Display images in a beautiful accordion effect.
|
75 |
+
- [__Before After Effect (Pro)__](https://press-elements.com/widgets/before-after-effect/) - Visual differences between two images.
|
76 |
+
- [__Notes (Pro)__](https://press-elements.com/widgets/notes/) - Display your ordinary lists as styled sticky notes.
|
77 |
|
78 |
+
**Integrations**
|
79 |
+
|
80 |
+
WordPress plugins and 3rd party services integrated into Elementor.
|
81 |
|
82 |
- **Advanced Custom Fields (Pro)** - Fields added by [Advanced Custom Fields](https://wordpress.org/plugins/advanced-custom-fields/) plugin.
|
83 |
+
- [__Gravatar (Pro)__](https://press-elements.com/widgets/gravatar/) - Display single [Gravatars](https://gravatar.com/) based on an email address.
|
84 |
- **Flickr (Pro)** - Display Flickr photostream based on Flickr User ID.
|
85 |
- **Pinterest (Pro)** - Display Pinterest pins based on Pinterest username.
|
86 |
|
87 |
+
= Translations =
|
88 |
+
|
89 |
+
You can help translating the plugin to your language from [__translate.wordpress.org__](https://translate.wordpress.org/projects/wp-plugins/press-elements).
|
90 |
+
|
91 |
== Screenshots ==
|
92 |
1. Post edit screen with WordPress elements.
|
93 |
2. Elementor widgets for each site and post element.
|
102 |
11. Display Pinterest pins based on Pinterest username.
|
103 |
12. Display images in a beautiful accordion effect.
|
104 |
13. Display visual differences between two images.
|
105 |
+
14. Display your ordinary lists as styled sticky notes.
|
106 |
|
107 |
== Frequently Asked Questions ==
|
108 |
|
162 |
|
163 |
== Changelog ==
|
164 |
|
165 |
+
= 1.6.1 =
|
166 |
+
|
167 |
+
**General**
|
168 |
+
|
169 |
+
* Enhance "Image Accordion" widget with new image border controller.
|
170 |
+
* Fix "Site Logo" link issue by changing the way the logo is loaded.
|
171 |
+
* Update plugin setup process.
|
172 |
+
|
173 |
= 1.6.0 =
|
174 |
|
175 |
**General**
|
widgets/advanced-custom-fields.php
CHANGED
@@ -13,12 +13,12 @@ use Elementor\Group_Control_Box_Shadow ;
|
|
13 |
if ( !defined( 'ABSPATH' ) ) {
|
14 |
die;
|
15 |
}
|
16 |
-
/**
|
17 |
-
* Press Elements Advanced Custom Fields
|
18 |
-
*
|
19 |
-
* Advanced Custom Fields element for elementor.
|
20 |
-
*
|
21 |
-
* @since 1.4.0
|
22 |
*/
|
23 |
class Press_Elements_Advanced_Custom_Fields extends Widget_Base
|
24 |
{
|
@@ -51,10 +51,10 @@ class Press_Elements_Advanced_Custom_Fields extends Widget_Base
|
|
51 |
) );
|
52 |
$this->add_control( 'missing_plugin', array(
|
53 |
'type' => Controls_Manager::RAW_HTML,
|
54 |
-
'raw' => '<div class="elementor-panel-nerd-box">
|
55 |
-
<i class="elementor-panel-nerd-box-icon fa fa-lock"></i>
|
56 |
-
<div class="elementor-panel-nerd-box-title">' . __( 'Pugin is Missing', 'press-elements' ) . '</div>
|
57 |
-
<div class="elementor-panel-nerd-box-message">' . sprintf( __( 'This feature requires "%s" plugin to be installed and active.', 'press-elements' ), '<strong>' . __( 'Advanced Custom Fields', 'press-elements' ) . '</strong>' ) . '</div>
|
58 |
</div>',
|
59 |
'separator' => 'none',
|
60 |
) );
|
@@ -67,11 +67,11 @@ class Press_Elements_Advanced_Custom_Fields extends Widget_Base
|
|
67 |
) );
|
68 |
$this->add_control( 'pro_feature', array(
|
69 |
'type' => Controls_Manager::RAW_HTML,
|
70 |
-
'raw' => '<div class="elementor-panel-nerd-box">
|
71 |
-
<i class="elementor-panel-nerd-box-icon fa fa-lock"></i>
|
72 |
-
<div class="elementor-panel-nerd-box-title">' . __( 'Premium Feature', 'press-elements' ) . '</div>
|
73 |
-
<div class="elementor-panel-nerd-box-message">' . sprintf( __( 'This feature is only available on "%s".', 'press-elements' ), '<strong>' . __( 'Press Elements Pro', 'press-elements' ) . '</strong>' ) . '</div>
|
74 |
-
<a class="elementor-panel-nerd-box-link elementor-button elementor-button-default elementor-go-pro" href="' . press_elements_freemius()->get_upgrade_url() . '" target="_blank">' . __( 'Upgrade Now!', 'press-elements' ) . '</a>
|
75 |
</div>',
|
76 |
'separator' => 'none',
|
77 |
) );
|
13 |
if ( !defined( 'ABSPATH' ) ) {
|
14 |
die;
|
15 |
}
|
16 |
+
/**
|
17 |
+
* Press Elements Advanced Custom Fields
|
18 |
+
*
|
19 |
+
* Advanced Custom Fields element for elementor.
|
20 |
+
*
|
21 |
+
* @since 1.4.0
|
22 |
*/
|
23 |
class Press_Elements_Advanced_Custom_Fields extends Widget_Base
|
24 |
{
|
51 |
) );
|
52 |
$this->add_control( 'missing_plugin', array(
|
53 |
'type' => Controls_Manager::RAW_HTML,
|
54 |
+
'raw' => '<div class="elementor-panel-nerd-box">
|
55 |
+
<i class="elementor-panel-nerd-box-icon fa fa-lock"></i>
|
56 |
+
<div class="elementor-panel-nerd-box-title">' . __( 'Pugin is Missing', 'press-elements' ) . '</div>
|
57 |
+
<div class="elementor-panel-nerd-box-message">' . sprintf( __( 'This feature requires "%s" plugin to be installed and active.', 'press-elements' ), '<strong>' . __( 'Advanced Custom Fields', 'press-elements' ) . '</strong>' ) . '</div>
|
58 |
</div>',
|
59 |
'separator' => 'none',
|
60 |
) );
|
67 |
) );
|
68 |
$this->add_control( 'pro_feature', array(
|
69 |
'type' => Controls_Manager::RAW_HTML,
|
70 |
+
'raw' => '<div class="elementor-panel-nerd-box">
|
71 |
+
<i class="elementor-panel-nerd-box-icon fa fa-lock"></i>
|
72 |
+
<div class="elementor-panel-nerd-box-title">' . __( 'Premium Feature', 'press-elements' ) . '</div>
|
73 |
+
<div class="elementor-panel-nerd-box-message">' . sprintf( __( 'This feature is only available on "%s".', 'press-elements' ), '<strong>' . __( 'Press Elements Pro', 'press-elements' ) . '</strong>' ) . '</div>
|
74 |
+
<a class="elementor-panel-nerd-box-link elementor-button elementor-button-default elementor-go-pro" href="' . press_elements_freemius()->get_upgrade_url() . '" target="_blank">' . __( 'Upgrade Now!', 'press-elements' ) . '</a>
|
75 |
</div>',
|
76 |
'separator' => 'none',
|
77 |
) );
|
widgets/before-after-effect.php
CHANGED
@@ -14,12 +14,12 @@ use Elementor\Group_Control_Border ;
|
|
14 |
if ( !defined( 'ABSPATH' ) ) {
|
15 |
die;
|
16 |
}
|
17 |
-
/**
|
18 |
-
* Before After Effect
|
19 |
-
*
|
20 |
-
* Elementor widget for before after effect.
|
21 |
-
*
|
22 |
-
* @since 1.6.0
|
23 |
*/
|
24 |
class Press_Elements_Before_After_Effect extends Widget_Base
|
25 |
{
|
@@ -55,11 +55,11 @@ class Press_Elements_Before_After_Effect extends Widget_Base
|
|
55 |
) );
|
56 |
$this->add_control( 'pro_feature', array(
|
57 |
'type' => Controls_Manager::RAW_HTML,
|
58 |
-
'raw' => '<div class="elementor-panel-nerd-box">
|
59 |
-
<i class="elementor-panel-nerd-box-icon fa fa-lock"></i>
|
60 |
-
<div class="elementor-panel-nerd-box-title">' . __( 'Premium Feature', 'press-elements' ) . '</div>
|
61 |
-
<div class="elementor-panel-nerd-box-message">' . sprintf( __( 'This feature is only available on "%s".', 'press-elements' ), '<strong>' . __( 'Press Elements Pro', 'press-elements' ) . '</strong>' ) . '</div>
|
62 |
-
<a class="elementor-panel-nerd-box-link elementor-button elementor-button-default elementor-go-pro" href="' . press_elements_freemius()->get_upgrade_url() . '" target="_blank">' . __( 'Upgrade Now!', 'press-elements' ) . '</a>
|
63 |
</div>',
|
64 |
'separator' => 'none',
|
65 |
) );
|
14 |
if ( !defined( 'ABSPATH' ) ) {
|
15 |
die;
|
16 |
}
|
17 |
+
/**
|
18 |
+
* Before After Effect
|
19 |
+
*
|
20 |
+
* Elementor widget for before after effect.
|
21 |
+
*
|
22 |
+
* @since 1.6.0
|
23 |
*/
|
24 |
class Press_Elements_Before_After_Effect extends Widget_Base
|
25 |
{
|
55 |
) );
|
56 |
$this->add_control( 'pro_feature', array(
|
57 |
'type' => Controls_Manager::RAW_HTML,
|
58 |
+
'raw' => '<div class="elementor-panel-nerd-box">
|
59 |
+
<i class="elementor-panel-nerd-box-icon fa fa-lock"></i>
|
60 |
+
<div class="elementor-panel-nerd-box-title">' . __( 'Premium Feature', 'press-elements' ) . '</div>
|
61 |
+
<div class="elementor-panel-nerd-box-message">' . sprintf( __( 'This feature is only available on "%s".', 'press-elements' ), '<strong>' . __( 'Press Elements Pro', 'press-elements' ) . '</strong>' ) . '</div>
|
62 |
+
<a class="elementor-panel-nerd-box-link elementor-button elementor-button-default elementor-go-pro" href="' . press_elements_freemius()->get_upgrade_url() . '" target="_blank">' . __( 'Upgrade Now!', 'press-elements' ) . '</a>
|
63 |
</div>',
|
64 |
'separator' => 'none',
|
65 |
) );
|
widgets/flickr.php
CHANGED
@@ -8,12 +8,12 @@ use Elementor\Controls_Manager ;
|
|
8 |
if ( !defined( 'ABSPATH' ) ) {
|
9 |
die;
|
10 |
}
|
11 |
-
/**
|
12 |
-
* Press Elements Flickr
|
13 |
-
*
|
14 |
-
* Flickr element for elementor.
|
15 |
-
*
|
16 |
-
* @since 1.5.0
|
17 |
*/
|
18 |
class Press_Elements_Flickr extends Widget_Base
|
19 |
{
|
@@ -44,11 +44,11 @@ class Press_Elements_Flickr extends Widget_Base
|
|
44 |
) );
|
45 |
$this->add_control( 'pro_feature', array(
|
46 |
'type' => Controls_Manager::RAW_HTML,
|
47 |
-
'raw' => '<div class="elementor-panel-nerd-box">
|
48 |
-
<i class="elementor-panel-nerd-box-icon fa fa-lock"></i>
|
49 |
-
<div class="elementor-panel-nerd-box-title">' . __( 'Premium Feature', 'press-elements' ) . '</div>
|
50 |
-
<div class="elementor-panel-nerd-box-message">' . sprintf( __( 'This feature is only available on "%s".', 'press-elements' ), '<strong>' . __( 'Press Elements Pro', 'press-elements' ) . '</strong>' ) . '</div>
|
51 |
-
<a class="elementor-panel-nerd-box-link elementor-button elementor-button-default elementor-go-pro" href="' . press_elements_freemius()->get_upgrade_url() . '" target="_blank">' . __( 'Upgrade Now!', 'press-elements' ) . '</a>
|
52 |
</div>',
|
53 |
'separator' => 'none',
|
54 |
) );
|
8 |
if ( !defined( 'ABSPATH' ) ) {
|
9 |
die;
|
10 |
}
|
11 |
+
/**
|
12 |
+
* Press Elements Flickr
|
13 |
+
*
|
14 |
+
* Flickr element for elementor.
|
15 |
+
*
|
16 |
+
* @since 1.5.0
|
17 |
*/
|
18 |
class Press_Elements_Flickr extends Widget_Base
|
19 |
{
|
44 |
) );
|
45 |
$this->add_control( 'pro_feature', array(
|
46 |
'type' => Controls_Manager::RAW_HTML,
|
47 |
+
'raw' => '<div class="elementor-panel-nerd-box">
|
48 |
+
<i class="elementor-panel-nerd-box-icon fa fa-lock"></i>
|
49 |
+
<div class="elementor-panel-nerd-box-title">' . __( 'Premium Feature', 'press-elements' ) . '</div>
|
50 |
+
<div class="elementor-panel-nerd-box-message">' . sprintf( __( 'This feature is only available on "%s".', 'press-elements' ), '<strong>' . __( 'Press Elements Pro', 'press-elements' ) . '</strong>' ) . '</div>
|
51 |
+
<a class="elementor-panel-nerd-box-link elementor-button elementor-button-default elementor-go-pro" href="' . press_elements_freemius()->get_upgrade_url() . '" target="_blank">' . __( 'Upgrade Now!', 'press-elements' ) . '</a>
|
52 |
</div>',
|
53 |
'separator' => 'none',
|
54 |
) );
|
widgets/gravatar.php
CHANGED
@@ -10,12 +10,12 @@ use Elementor\Group_Control_Box_Shadow ;
|
|
10 |
if ( !defined( 'ABSPATH' ) ) {
|
11 |
die;
|
12 |
}
|
13 |
-
/**
|
14 |
-
* Press Elements Gravatar
|
15 |
-
*
|
16 |
-
* Gravatar element for elementor.
|
17 |
-
*
|
18 |
-
* @since 1.4.0
|
19 |
*/
|
20 |
class Press_Elements_Gravatar extends Widget_Base
|
21 |
{
|
@@ -46,11 +46,11 @@ class Press_Elements_Gravatar extends Widget_Base
|
|
46 |
) );
|
47 |
$this->add_control( 'pro_feature', array(
|
48 |
'type' => Controls_Manager::RAW_HTML,
|
49 |
-
'raw' => '<div class="elementor-panel-nerd-box">
|
50 |
-
<i class="elementor-panel-nerd-box-icon fa fa-lock"></i>
|
51 |
-
<div class="elementor-panel-nerd-box-title">' . __( 'Premium Feature', 'press-elements' ) . '</div>
|
52 |
-
<div class="elementor-panel-nerd-box-message">' . sprintf( __( 'This feature is only available on "%s".', 'press-elements' ), '<strong>' . __( 'Press Elements Pro', 'press-elements' ) . '</strong>' ) . '</div>
|
53 |
-
<a class="elementor-panel-nerd-box-link elementor-button elementor-button-default elementor-go-pro" href="' . press_elements_freemius()->get_upgrade_url() . '" target="_blank">' . __( 'Upgrade Now!', 'press-elements' ) . '</a>
|
54 |
</div>',
|
55 |
'separator' => 'none',
|
56 |
) );
|
10 |
if ( !defined( 'ABSPATH' ) ) {
|
11 |
die;
|
12 |
}
|
13 |
+
/**
|
14 |
+
* Press Elements Gravatar
|
15 |
+
*
|
16 |
+
* Gravatar element for elementor.
|
17 |
+
*
|
18 |
+
* @since 1.4.0
|
19 |
*/
|
20 |
class Press_Elements_Gravatar extends Widget_Base
|
21 |
{
|
46 |
) );
|
47 |
$this->add_control( 'pro_feature', array(
|
48 |
'type' => Controls_Manager::RAW_HTML,
|
49 |
+
'raw' => '<div class="elementor-panel-nerd-box">
|
50 |
+
<i class="elementor-panel-nerd-box-icon fa fa-lock"></i>
|
51 |
+
<div class="elementor-panel-nerd-box-title">' . __( 'Premium Feature', 'press-elements' ) . '</div>
|
52 |
+
<div class="elementor-panel-nerd-box-message">' . sprintf( __( 'This feature is only available on "%s".', 'press-elements' ), '<strong>' . __( 'Press Elements Pro', 'press-elements' ) . '</strong>' ) . '</div>
|
53 |
+
<a class="elementor-panel-nerd-box-link elementor-button elementor-button-default elementor-go-pro" href="' . press_elements_freemius()->get_upgrade_url() . '" target="_blank">' . __( 'Upgrade Now!', 'press-elements' ) . '</a>
|
54 |
</div>',
|
55 |
'separator' => 'none',
|
56 |
) );
|
widgets/image-accordion.php
CHANGED
@@ -15,12 +15,12 @@ use Elementor\Group_Control_Typography ;
|
|
15 |
if ( !defined( 'ABSPATH' ) ) {
|
16 |
die;
|
17 |
}
|
18 |
-
/**
|
19 |
-
* Image Accordion Effect
|
20 |
-
*
|
21 |
-
* Elementor widget for image accordion.
|
22 |
-
*
|
23 |
-
* @since 1.6.0
|
24 |
*/
|
25 |
class Press_Elements_Image_Accordion extends Widget_Base
|
26 |
{
|
@@ -51,11 +51,11 @@ class Press_Elements_Image_Accordion extends Widget_Base
|
|
51 |
) );
|
52 |
$this->add_control( 'pro_feature', array(
|
53 |
'type' => Controls_Manager::RAW_HTML,
|
54 |
-
'raw' => '<div class="elementor-panel-nerd-box">
|
55 |
-
<i class="elementor-panel-nerd-box-icon fa fa-lock"></i>
|
56 |
-
<div class="elementor-panel-nerd-box-title">' . __( 'Premium Feature', 'press-elements' ) . '</div>
|
57 |
-
<div class="elementor-panel-nerd-box-message">' . sprintf( __( 'This feature is only available on "%s".', 'press-elements' ), '<strong>' . __( 'Press Elements Pro', 'press-elements' ) . '</strong>' ) . '</div>
|
58 |
-
<a class="elementor-panel-nerd-box-link elementor-button elementor-button-default elementor-go-pro" href="' . press_elements_freemius()->get_upgrade_url() . '" target="_blank">' . __( 'Upgrade Now!', 'press-elements' ) . '</a>
|
59 |
</div>',
|
60 |
'separator' => 'none',
|
61 |
) );
|
15 |
if ( !defined( 'ABSPATH' ) ) {
|
16 |
die;
|
17 |
}
|
18 |
+
/**
|
19 |
+
* Image Accordion Effect
|
20 |
+
*
|
21 |
+
* Elementor widget for image accordion.
|
22 |
+
*
|
23 |
+
* @since 1.6.0
|
24 |
*/
|
25 |
class Press_Elements_Image_Accordion extends Widget_Base
|
26 |
{
|
51 |
) );
|
52 |
$this->add_control( 'pro_feature', array(
|
53 |
'type' => Controls_Manager::RAW_HTML,
|
54 |
+
'raw' => '<div class="elementor-panel-nerd-box">
|
55 |
+
<i class="elementor-panel-nerd-box-icon fa fa-lock"></i>
|
56 |
+
<div class="elementor-panel-nerd-box-title">' . __( 'Premium Feature', 'press-elements' ) . '</div>
|
57 |
+
<div class="elementor-panel-nerd-box-message">' . sprintf( __( 'This feature is only available on "%s".', 'press-elements' ), '<strong>' . __( 'Press Elements Pro', 'press-elements' ) . '</strong>' ) . '</div>
|
58 |
+
<a class="elementor-panel-nerd-box-link elementor-button elementor-button-default elementor-go-pro" href="' . press_elements_freemius()->get_upgrade_url() . '" target="_blank">' . __( 'Upgrade Now!', 'press-elements' ) . '</a>
|
59 |
</div>',
|
60 |
'separator' => 'none',
|
61 |
) );
|
widgets/notes.php
CHANGED
@@ -12,12 +12,12 @@ use Elementor\Group_Control_Box_Shadow ;
|
|
12 |
if ( !defined( 'ABSPATH' ) ) {
|
13 |
die;
|
14 |
}
|
15 |
-
/**
|
16 |
-
* Notes
|
17 |
-
*
|
18 |
-
* Elementor widget for notes.
|
19 |
-
*
|
20 |
-
* @since 1.6.0
|
21 |
*/
|
22 |
class Press_Elements_Notes extends Widget_Base
|
23 |
{
|
@@ -48,11 +48,11 @@ class Press_Elements_Notes extends Widget_Base
|
|
48 |
) );
|
49 |
$this->add_control( 'pro_feature', array(
|
50 |
'type' => Controls_Manager::RAW_HTML,
|
51 |
-
'raw' => '<div class="elementor-panel-nerd-box">
|
52 |
-
<i class="elementor-panel-nerd-box-icon fa fa-lock"></i>
|
53 |
-
<div class="elementor-panel-nerd-box-title">' . __( 'Premium Feature', 'press-elements' ) . '</div>
|
54 |
-
<div class="elementor-panel-nerd-box-message">' . sprintf( __( 'This feature is only available on "%s".', 'press-elements' ), '<strong>' . __( 'Press Elements Pro', 'press-elements' ) . '</strong>' ) . '</div>
|
55 |
-
<a class="elementor-panel-nerd-box-link elementor-button elementor-button-default elementor-go-pro" href="' . press_elements_freemius()->get_upgrade_url() . '" target="_blank">' . __( 'Upgrade Now!', 'press-elements' ) . '</a>
|
56 |
</div>',
|
57 |
'separator' => 'none',
|
58 |
) );
|
12 |
if ( !defined( 'ABSPATH' ) ) {
|
13 |
die;
|
14 |
}
|
15 |
+
/**
|
16 |
+
* Notes
|
17 |
+
*
|
18 |
+
* Elementor widget for notes.
|
19 |
+
*
|
20 |
+
* @since 1.6.0
|
21 |
*/
|
22 |
class Press_Elements_Notes extends Widget_Base
|
23 |
{
|
48 |
) );
|
49 |
$this->add_control( 'pro_feature', array(
|
50 |
'type' => Controls_Manager::RAW_HTML,
|
51 |
+
'raw' => '<div class="elementor-panel-nerd-box">
|
52 |
+
<i class="elementor-panel-nerd-box-icon fa fa-lock"></i>
|
53 |
+
<div class="elementor-panel-nerd-box-title">' . __( 'Premium Feature', 'press-elements' ) . '</div>
|
54 |
+
<div class="elementor-panel-nerd-box-message">' . sprintf( __( 'This feature is only available on "%s".', 'press-elements' ), '<strong>' . __( 'Press Elements Pro', 'press-elements' ) . '</strong>' ) . '</div>
|
55 |
+
<a class="elementor-panel-nerd-box-link elementor-button elementor-button-default elementor-go-pro" href="' . press_elements_freemius()->get_upgrade_url() . '" target="_blank">' . __( 'Upgrade Now!', 'press-elements' ) . '</a>
|
56 |
</div>',
|
57 |
'separator' => 'none',
|
58 |
) );
|
widgets/pinterest.php
CHANGED
@@ -8,12 +8,12 @@ use Elementor\Controls_Manager ;
|
|
8 |
if ( !defined( 'ABSPATH' ) ) {
|
9 |
die;
|
10 |
}
|
11 |
-
/**
|
12 |
-
* Press Elements Pinterest
|
13 |
-
*
|
14 |
-
* Pinterest element for elementor.
|
15 |
-
*
|
16 |
-
* @since 1.5.0
|
17 |
*/
|
18 |
class Press_Elements_Pinterest extends Widget_Base
|
19 |
{
|
@@ -44,11 +44,11 @@ class Press_Elements_Pinterest extends Widget_Base
|
|
44 |
) );
|
45 |
$this->add_control( 'pro_feature', array(
|
46 |
'type' => Controls_Manager::RAW_HTML,
|
47 |
-
'raw' => '<div class="elementor-panel-nerd-box">
|
48 |
-
<i class="elementor-panel-nerd-box-icon fa fa-lock"></i>
|
49 |
-
<div class="elementor-panel-nerd-box-title">' . __( 'Premium Feature', 'press-elements' ) . '</div>
|
50 |
-
<div class="elementor-panel-nerd-box-message">' . sprintf( __( 'This feature is only available on "%s".', 'press-elements' ), '<strong>' . __( 'Press Elements Pro', 'press-elements' ) . '</strong>' ) . '</div>
|
51 |
-
<a class="elementor-panel-nerd-box-link elementor-button elementor-button-default elementor-go-pro" href="' . press_elements_freemius()->get_upgrade_url() . '" target="_blank">' . __( 'Upgrade Now!', 'press-elements' ) . '</a>
|
52 |
</div>',
|
53 |
'separator' => 'none',
|
54 |
) );
|
8 |
if ( !defined( 'ABSPATH' ) ) {
|
9 |
die;
|
10 |
}
|
11 |
+
/**
|
12 |
+
* Press Elements Pinterest
|
13 |
+
*
|
14 |
+
* Pinterest element for elementor.
|
15 |
+
*
|
16 |
+
* @since 1.5.0
|
17 |
*/
|
18 |
class Press_Elements_Pinterest extends Widget_Base
|
19 |
{
|
44 |
) );
|
45 |
$this->add_control( 'pro_feature', array(
|
46 |
'type' => Controls_Manager::RAW_HTML,
|
47 |
+
'raw' => '<div class="elementor-panel-nerd-box">
|
48 |
+
<i class="elementor-panel-nerd-box-icon fa fa-lock"></i>
|
49 |
+
<div class="elementor-panel-nerd-box-title">' . __( 'Premium Feature', 'press-elements' ) . '</div>
|
50 |
+
<div class="elementor-panel-nerd-box-message">' . sprintf( __( 'This feature is only available on "%s".', 'press-elements' ), '<strong>' . __( 'Press Elements Pro', 'press-elements' ) . '</strong>' ) . '</div>
|
51 |
+
<a class="elementor-panel-nerd-box-link elementor-button elementor-button-default elementor-go-pro" href="' . press_elements_freemius()->get_upgrade_url() . '" target="_blank">' . __( 'Upgrade Now!', 'press-elements' ) . '</a>
|
52 |
</div>',
|
53 |
'separator' => 'none',
|
54 |
) );
|
widgets/post-author.php
CHANGED
@@ -1,477 +1,477 @@
|
|
1 |
-
<?php
|
2 |
-
namespace PressElements\Widgets;
|
3 |
-
|
4 |
-
use Elementor\Widget_Base;
|
5 |
-
use Elementor\Controls_Manager;
|
6 |
-
use Elementor\Scheme_Color;
|
7 |
-
use Elementor\Scheme_Typography;
|
8 |
-
use Elementor\Group_Control_Typography;
|
9 |
-
use Elementor\Group_Control_Border;
|
10 |
-
use Elementor\Group_Control_Box_Shadow;
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
// Exit if accessed directly
|
15 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
16 |
-
exit;
|
17 |
-
}
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
/**
|
22 |
-
* Press Elements Post Author
|
23 |
-
*
|
24 |
-
* Single post/page author element for elementor.
|
25 |
-
*
|
26 |
-
* @since 1.0.0
|
27 |
-
*/
|
28 |
-
class Press_Elements_Post_Author extends Widget_Base {
|
29 |
-
|
30 |
-
public function get_name() {
|
31 |
-
return 'post-author';
|
32 |
-
}
|
33 |
-
|
34 |
-
public function get_title() {
|
35 |
-
$post_type_object = get_post_type_object( get_post_type() );
|
36 |
-
|
37 |
-
return sprintf(
|
38 |
-
/* translators: %s: Post type singular name (e.g. Post or Page) */
|
39 |
-
__( '%s Author', 'press-elements' ),
|
40 |
-
$post_type_object->labels->singular_name
|
41 |
-
);
|
42 |
-
}
|
43 |
-
|
44 |
-
public function get_icon() {
|
45 |
-
return 'fa fa-user-circle-o';
|
46 |
-
}
|
47 |
-
|
48 |
-
public function get_categories() {
|
49 |
-
return [ 'press-elements-post-elements' ];
|
50 |
-
}
|
51 |
-
|
52 |
-
protected function _register_controls() {
|
53 |
-
|
54 |
-
$post_type_object = get_post_type_object( get_post_type() );
|
55 |
-
|
56 |
-
$this->start_controls_section(
|
57 |
-
'section_content',
|
58 |
-
[
|
59 |
-
'label' => sprintf(
|
60 |
-
/* translators: %s: Post type singular name (e.g. Post or Page) */
|
61 |
-
__( '%s Author', 'press-elements' ),
|
62 |
-
$post_type_object->labels->singular_name
|
63 |
-
),
|
64 |
-
]
|
65 |
-
);
|
66 |
-
|
67 |
-
$this->add_control(
|
68 |
-
'author',
|
69 |
-
[
|
70 |
-
'label' => __( 'Author', 'press-elements' ),
|
71 |
-
'type' => Controls_Manager::SELECT,
|
72 |
-
'options' => $this->user_fields_labels(),
|
73 |
-
'default' => 'display_name',
|
74 |
-
]
|
75 |
-
);
|
76 |
-
|
77 |
-
$this->add_control(
|
78 |
-
'html_tag',
|
79 |
-
[
|
80 |
-
'label' => __( 'HTML Tag', 'press-elements' ),
|
81 |
-
'type' => Controls_Manager::SELECT,
|
82 |
-
'options' => [
|
83 |
-
'h1' => __( 'H1', 'press-elements' ),
|
84 |
-
'h2' => __( 'H2', 'press-elements' ),
|
85 |
-
'h3' => __( 'H3', 'press-elements' ),
|
86 |
-
'h4' => __( 'H4', 'press-elements' ),
|
87 |
-
'h5' => __( 'H5', 'press-elements' ),
|
88 |
-
'h6' => __( 'H6', 'press-elements' ),
|
89 |
-
'p' => __( 'p', 'press-elements' ),
|
90 |
-
'div' => __( 'div', 'press-elements' ),
|
91 |
-
'span' => __( 'span', 'press-elements' ),
|
92 |
-
],
|
93 |
-
'default' => 'p',
|
94 |
-
]
|
95 |
-
);
|
96 |
-
|
97 |
-
$this->add_responsive_control(
|
98 |
-
'align',
|
99 |
-
[
|
100 |
-
'label' => __( 'Alignment', 'press-elements' ),
|
101 |
-
'type' => Controls_Manager::CHOOSE,
|
102 |
-
'options' => [
|
103 |
-
'left' => [
|
104 |
-
'title' => __( 'Left', 'press-elements' ),
|
105 |
-
'icon' => 'fa fa-align-left',
|
106 |
-
],
|
107 |
-
'center' => [
|
108 |
-
'title' => __( 'Center', 'press-elements' ),
|
109 |
-
'icon' => 'fa fa-align-center',
|
110 |
-
],
|
111 |
-
'right' => [
|
112 |
-
'title' => __( 'Right', 'press-elements' ),
|
113 |
-
'icon' => 'fa fa-align-right',
|
114 |
-
],
|
115 |
-
'justify' => [
|
116 |
-
'title' => __( 'Justified', 'press-elements' ),
|
117 |
-
'icon' => 'fa fa-align-justify',
|
118 |
-
],
|
119 |
-
],
|
120 |
-
'default' => '',
|
121 |
-
'selectors' => [
|
122 |
-
'{{WRAPPER}}' => 'text-align: {{VALUE}};',
|
123 |
-
],
|
124 |
-
]
|
125 |
-
);
|
126 |
-
|
127 |
-
$this->add_control(
|
128 |
-
'link_to',
|
129 |
-
[
|
130 |
-
'label' => __( 'Link to', 'press-elements' ),
|
131 |
-
'type' => Controls_Manager::SELECT,
|
132 |
-
'default' => 'none',
|
133 |
-
'options' => [
|
134 |
-
'none' => __( 'None', 'press-elements' ),
|
135 |
-
'home' => __( 'Home URL', 'press-elements' ),
|
136 |
-
'post' => sprintf(
|
137 |
-
/* translators: %s: Post type singular name (e.g. Post or Page) */
|
138 |
-
__( '%s URL', 'press-elements' ),
|
139 |
-
$post_type_object->labels->singular_name
|
140 |
-
),
|
141 |
-
'author' => __( 'Author URL', 'press-elements' ),
|
142 |
-
'custom' => __( 'Custom URL', 'press-elements' ),
|
143 |
-
],
|
144 |
-
]
|
145 |
-
);
|
146 |
-
|
147 |
-
$this->add_control(
|
148 |
-
'link',
|
149 |
-
[
|
150 |
-
'label' => __( 'Link', 'press-elements' ),
|
151 |
-
'type' => Controls_Manager::URL,
|
152 |
-
'placeholder' => __( 'http://your-link.com', 'press-elements' ),
|
153 |
-
'condition' => [
|
154 |
-
'link_to' => 'custom',
|
155 |
-
],
|
156 |
-
'default' => [
|
157 |
-
'url' => '',
|
158 |
-
],
|
159 |
-
'show_label' => false,
|
160 |
-
]
|
161 |
-
);
|
162 |
-
|
163 |
-
$this->end_controls_section();
|
164 |
-
|
165 |
-
$this->start_controls_section(
|
166 |
-
'section_style',
|
167 |
-
[
|
168 |
-
'label' => sprintf(
|
169 |
-
/* translators: %s: Post type singular name (e.g. Post or Page) */
|
170 |
-
__( '%s Author', 'press-elements' ),
|
171 |
-
$post_type_object->labels->singular_name
|
172 |
-
),
|
173 |
-
'tab' => Controls_Manager::TAB_STYLE,
|
174 |
-
]
|
175 |
-
);
|
176 |
-
|
177 |
-
$this->add_control(
|
178 |
-
'color',
|
179 |
-
[
|
180 |
-
'label' => __( 'Text Color', 'press-elements' ),
|
181 |
-
'type' => Controls_Manager::COLOR,
|
182 |
-
'scheme' => [
|
183 |
-
'type' => Scheme_Color::get_type(),
|
184 |
-
'value' => Scheme_Color::COLOR_1,
|
185 |
-
],
|
186 |
-
'selectors' => [
|
187 |
-
'{{WRAPPER}} .press-elements-author' => 'color: {{VALUE}};',
|
188 |
-
'{{WRAPPER}} .press-elements-author a' => 'color: {{VALUE}};',
|
189 |
-
],
|
190 |
-
'condition' => [
|
191 |
-
'author!' => 'image',
|
192 |
-
],
|
193 |
-
]
|
194 |
-
);
|
195 |
-
|
196 |
-
$this->add_group_control(
|
197 |
-
Group_Control_Typography::get_type(),
|
198 |
-
[
|
199 |
-
'name' => 'typography',
|
200 |
-
'scheme' => Scheme_Typography::TYPOGRAPHY_1,
|
201 |
-
'selector' => '{{WRAPPER}} .press-elements-author',
|
202 |
-
'condition' => [
|
203 |
-
'author!' => 'image',
|
204 |
-
],
|
205 |
-
]
|
206 |
-
);
|
207 |
-
|
208 |
-
$this->add_responsive_control(
|
209 |
-
'space',
|
210 |
-
[
|
211 |
-
'label' => __( 'Size (%)', 'press-elements' ),
|
212 |
-
'type' => Controls_Manager::SLIDER,
|
213 |
-
'default' => [
|
214 |
-
'size' => 100,
|
215 |
-
'unit' => '%',
|
216 |
-
],
|
217 |
-
'size_units' => [ '%' ],
|
218 |
-
'range' => [
|
219 |
-
'%' => [
|
220 |
-
'min' => 1,
|
221 |
-
'max' => 100,
|
222 |
-
],
|
223 |
-
],
|
224 |
-
'selectors' => [
|
225 |
-
'{{WRAPPER}} .press-elements-author img' => 'max-width: {{SIZE}}{{UNIT}};',
|
226 |
-
],
|
227 |
-
'condition' => [
|
228 |
-
'author' => 'image',
|
229 |
-
],
|
230 |
-
]
|
231 |
-
);
|
232 |
-
|
233 |
-
$this->add_responsive_control(
|
234 |
-
'opacity',
|
235 |
-
[
|
236 |
-
'label' => __( 'Opacity (%)', 'press-elements' ),
|
237 |
-
'type' => Controls_Manager::SLIDER,
|
238 |
-
'default' => [
|
239 |
-
'size' => 1,
|
240 |
-
],
|
241 |
-
'range' => [
|
242 |
-
'px' => [
|
243 |
-
'max' => 1,
|
244 |
-
'min' => 0.10,
|
245 |
-
'step' => 0.01,
|
246 |
-
],
|
247 |
-
],
|
248 |
-
'selectors' => [
|
249 |
-
'{{WRAPPER}} .press-elements-author img' => 'opacity: {{SIZE}};',
|
250 |
-
],
|
251 |
-
'condition' => [
|
252 |
-
'author' => 'image',
|
253 |
-
],
|
254 |
-
]
|
255 |
-
);
|
256 |
-
|
257 |
-
$this->add_control(
|
258 |
-
'angle',
|
259 |
-
[
|
260 |
-
'label' => __( 'Angle (deg)', 'press-elements' ),
|
261 |
-
'type' => Controls_Manager::SLIDER,
|
262 |
-
'size_units' => [ 'deg' ],
|
263 |
-
'default' => [
|
264 |
-
'unit' => 'deg',
|
265 |
-
'size' => 0,
|
266 |
-
],
|
267 |
-
'range' => [
|
268 |
-
'deg' => [
|
269 |
-
'max' => 360,
|
270 |
-
'min' => -360,
|
271 |
-
'step' => 1,
|
272 |
-
],
|
273 |
-
],
|
274 |
-
'selectors' => [
|
275 |
-
'{{WRAPPER}} .press-elements-author img' => '-webkit-transform: rotate({{SIZE}}deg); -moz-transform: rotate({{SIZE}}deg); -ms-transform: rotate({{SIZE}}deg); -o-transform: rotate({{SIZE}}deg); transform: rotate({{SIZE}}deg);',
|
276 |
-
],
|
277 |
-
'condition' => [
|
278 |
-
'author' => 'image',
|
279 |
-
],
|
280 |
-
]
|
281 |
-
);
|
282 |
-
|
283 |
-
$this->add_control(
|
284 |
-
'hover_animation',
|
285 |
-
[
|
286 |
-
'label' => __( 'Hover Animation', 'press-elements' ),
|
287 |
-
'type' => Controls_Manager::HOVER_ANIMATION,
|
288 |
-
]
|
289 |
-
);
|
290 |
-
|
291 |
-
$this->add_group_control(
|
292 |
-
Group_Control_Border::get_type(),
|
293 |
-
[
|
294 |
-
'name' => 'image_border',
|
295 |
-
'label' => __( 'Image Border', 'press-elements' ),
|
296 |
-
'selector' => '{{WRAPPER}} .press-elements-author img',
|
297 |
-
'condition' => [
|
298 |
-
'author' => 'image',
|
299 |
-
],
|
300 |
-
]
|
301 |
-
);
|
302 |
-
|
303 |
-
$this->add_control(
|
304 |
-
'image_border_radius',
|
305 |
-
[
|
306 |
-
'label' => __( 'Border Radius', 'press-elements' ),
|
307 |
-
'type' => Controls_Manager::DIMENSIONS,
|
308 |
-
'size_units' => [ 'px', '%' ],
|
309 |
-
'selectors' => [
|
310 |
-
'{{WRAPPER}} .press-elements-author img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
311 |
-
],
|
312 |
-
'condition' => [
|
313 |
-
'author' => 'image',
|
314 |
-
],
|
315 |
-
]
|
316 |
-
);
|
317 |
-
|
318 |
-
$this->add_group_control(
|
319 |
-
Group_Control_Box_Shadow::get_type(),
|
320 |
-
[
|
321 |
-
'name' => 'image_box_shadow',
|
322 |
-
'selector' => '{{WRAPPER}} .press-elements-author img',
|
323 |
-
'condition' => [
|
324 |
-
'author' => 'image',
|
325 |
-
],
|
326 |
-
]
|
327 |
-
);
|
328 |
-
|
329 |
-
$this->end_controls_section();
|
330 |
-
|
331 |
-
}
|
332 |
-
|
333 |
-
protected function render() {
|
334 |
-
$settings = $this->get_settings();
|
335 |
-
|
336 |
-
if ( empty( $settings['author'] ) )
|
337 |
-
return;
|
338 |
-
|
339 |
-
$author = $this->user_data( $settings['author'] );
|
340 |
-
|
341 |
-
switch ( $settings['link_to'] ) {
|
342 |
-
case 'custom' :
|
343 |
-
if ( ! empty( $settings['link']['url'] ) ) {
|
344 |
-
$link = esc_url( $settings['link']['url'] );
|
345 |
-
} else {
|
346 |
-
$link = false;
|
347 |
-
}
|
348 |
-
break;
|
349 |
-
|
350 |
-
case 'author' :
|
351 |
-
$link = esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) );
|
352 |
-
break;
|
353 |
-
|
354 |
-
case 'post' :
|
355 |
-
$link = esc_url( get_the_permalink() );
|
356 |
-
break;
|
357 |
-
|
358 |
-
case 'home' :
|
359 |
-
$link = esc_url( get_home_url() );
|
360 |
-
break;
|
361 |
-
|
362 |
-
case 'none' :
|
363 |
-
default:
|
364 |
-
$link = false;
|
365 |
-
break;
|
366 |
-
}
|
367 |
-
$target = $settings['link']['is_external'] ? 'target="_blank"' : '';
|
368 |
-
|
369 |
-
$animation_class = ! empty( $settings['hover_animation'] ) ? 'elementor-animation-' . $settings['hover_animation'] : '';
|
370 |
-
|
371 |
-
$html = sprintf( '<%1$s class="press-elements-author %2$s">', $settings['html_tag'], $animation_class );
|
372 |
-
if ( $link ) {
|
373 |
-
$html .= sprintf( '<a href="%1$s" %2$s>%3$s</a>', $link, $target, $author );
|
374 |
-
} else {
|
375 |
-
$html .= $author;
|
376 |
-
}
|
377 |
-
$html .= sprintf( '</%s>', $settings['html_tag'] );
|
378 |
-
|
379 |
-
echo $html;
|
380 |
-
}
|
381 |
-
|
382 |
-
protected function _content_template() {
|
383 |
-
?>
|
384 |
-
<#
|
385 |
-
var author_data = [];
|
386 |
-
<?php
|
387 |
-
foreach ( $this->user_data() as $key => $value ) {
|
388 |
-
printf( 'author_data[ "%1$s" ] = "%2$s";', $key, $value );
|
389 |
-
}
|
390 |
-
?>
|
391 |
-
var author = author_data[ settings.author ];
|
392 |
-
|
393 |
-
var link_url;
|
394 |
-
switch( settings.link_to ) {
|
395 |
-
case 'custom':
|
396 |
-
link_url = settings.link.url;
|
397 |
-
break;
|
398 |
-
case 'author':
|
399 |
-
link_url = '<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>';
|
400 |
-
break;
|
401 |
-
case 'post':
|
402 |
-
link_url = '<?php echo esc_url( get_the_permalink() ); ?>';
|
403 |
-
break;
|
404 |
-
case 'home':
|
405 |
-
link_url = '<?php echo esc_url( get_home_url() ); ?>';
|
406 |
-
break;
|
407 |
-
case 'none':
|
408 |
-
default:
|
409 |
-
link_url = false;
|
410 |
-
}
|
411 |
-
var target = settings.link.is_external ? 'target="_blank"' : '';
|
412 |
-
|
413 |
-
var animation_class = '';
|
414 |
-
if ( '' !== settings.hover_animation ) {
|
415 |
-
animation_class = 'elementor-animation-' + settings.hover_animation;
|
416 |
-
}
|
417 |
-
|
418 |
-
var html = '<' + settings.html_tag + ' class="press-elements-author ' + animation_class + '">';
|
419 |
-
if ( link_url ) {
|
420 |
-
html += '<a href="' + link_url + '" ' + target + '>' + author + '</a>';
|
421 |
-
} else {
|
422 |
-
html += author;
|
423 |
-
}
|
424 |
-
html += '</' + settings.html_tag + '>';
|
425 |
-
|
426 |
-
print( html );
|
427 |
-
#>
|
428 |
-
<?php
|
429 |
-
}
|
430 |
-
|
431 |
-
protected function user_fields_labels() {
|
432 |
-
|
433 |
-
$fields = [
|
434 |
-
'first_name' => __( 'First Name', 'press-elements' ),
|
435 |
-
'last_name' => __( 'Last Name', 'press-elements' ),
|
436 |
-
'first_last' => __( 'First Name + Last Name', 'press-elements' ),
|
437 |
-
'last_first' => __( 'Last Name + First Name', 'press-elements' ),
|
438 |
-
'nickname' => __( 'Nick Name', 'press-elements' ),
|
439 |
-
'display_name' => __( 'Display Name', 'press-elements' ),
|
440 |
-
'user_login' => __( 'User Name', 'press-elements' ),
|
441 |
-
'description' => __( 'User Bio', 'press-elements' ),
|
442 |
-
'image' => __( 'User Image', 'press-elements' ),
|
443 |
-
];
|
444 |
-
|
445 |
-
return $fields;
|
446 |
-
|
447 |
-
}
|
448 |
-
|
449 |
-
protected function user_data( $selected = '' ) {
|
450 |
-
|
451 |
-
global $post;
|
452 |
-
|
453 |
-
$author_id = $post->post_author;
|
454 |
-
|
455 |
-
$fields = [
|
456 |
-
'first_name' => get_the_author_meta( 'first_name', $author_id ),
|
457 |
-
'last_name' => get_the_author_meta( 'last_name', $author_id ),
|
458 |
-
'first_last' => sprintf( '%s %s', get_the_author_meta( 'first_name', $author_id ), get_the_author_meta( 'last_name', $author_id ) ),
|
459 |
-
'last_first' => sprintf( '%s %s', get_the_author_meta( 'last_name', $author_id ), get_the_author_meta( 'first_name', $author_id ) ),
|
460 |
-
'nickname' => get_the_author_meta( 'nickname', $author_id ),
|
461 |
-
'display_name' => get_the_author_meta( 'display_name', $author_id ),
|
462 |
-
'user_login' => get_the_author_meta( 'user_login', $author_id ),
|
463 |
-
'description' => get_the_author_meta( 'description', $author_id ),
|
464 |
-
'image' => get_avatar( get_the_author_meta( 'email', $author_id ), 256 ),
|
465 |
-
];
|
466 |
-
|
467 |
-
if ( empty( $selected ) ) {
|
468 |
-
// Return the entire array
|
469 |
-
return $fields;
|
470 |
-
} else {
|
471 |
-
// Return only the selected field
|
472 |
-
return $fields[ $selected ];
|
473 |
-
}
|
474 |
-
|
475 |
-
}
|
476 |
-
|
477 |
-
}
|
1 |
+
<?php
|
2 |
+
namespace PressElements\Widgets;
|
3 |
+
|
4 |
+
use Elementor\Widget_Base;
|
5 |
+
use Elementor\Controls_Manager;
|
6 |
+
use Elementor\Scheme_Color;
|
7 |
+
use Elementor\Scheme_Typography;
|
8 |
+
use Elementor\Group_Control_Typography;
|
9 |
+
use Elementor\Group_Control_Border;
|
10 |
+
use Elementor\Group_Control_Box_Shadow;
|
11 |
+
|
12 |
+
|
13 |
+
|
14 |
+
// Exit if accessed directly
|
15 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
16 |
+
exit;
|
17 |
+
}
|
18 |
+
|
19 |
+
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Press Elements Post Author
|
23 |
+
*
|
24 |
+
* Single post/page author element for elementor.
|
25 |
+
*
|
26 |
+
* @since 1.0.0
|
27 |
+
*/
|
28 |
+
class Press_Elements_Post_Author extends Widget_Base {
|
29 |
+
|
30 |
+
public function get_name() {
|
31 |
+
return 'post-author';
|
32 |
+
}
|
33 |
+
|
34 |
+
public function get_title() {
|
35 |
+
$post_type_object = get_post_type_object( get_post_type() );
|
36 |
+
|
37 |
+
return sprintf(
|
38 |
+
/* translators: %s: Post type singular name (e.g. Post or Page) */
|
39 |
+
__( '%s Author', 'press-elements' ),
|
40 |
+
$post_type_object->labels->singular_name
|
41 |
+
);
|
42 |
+
}
|
43 |
+
|
44 |
+
public function get_icon() {
|
45 |
+
return 'fa fa-user-circle-o';
|
46 |
+
}
|
47 |
+
|
48 |
+
public function get_categories() {
|
49 |
+
return [ 'press-elements-post-elements' ];
|
50 |
+
}
|
51 |
+
|
52 |
+
protected function _register_controls() {
|
53 |
+
|
54 |
+
$post_type_object = get_post_type_object( get_post_type() );
|
55 |
+
|
56 |
+
$this->start_controls_section(
|
57 |
+
'section_content',
|
58 |
+
[
|
59 |
+
'label' => sprintf(
|
60 |
+
/* translators: %s: Post type singular name (e.g. Post or Page) */
|
61 |
+
__( '%s Author', 'press-elements' ),
|
62 |
+
$post_type_object->labels->singular_name
|
63 |
+
),
|
64 |
+
]
|
65 |
+
);
|
66 |
+
|
67 |
+
$this->add_control(
|
68 |
+
'author',
|
69 |
+
[
|
70 |
+
'label' => __( 'Author', 'press-elements' ),
|
71 |
+
'type' => Controls_Manager::SELECT,
|
72 |
+
'options' => $this->user_fields_labels(),
|
73 |
+
'default' => 'display_name',
|
74 |
+
]
|
75 |
+
);
|
76 |
+
|
77 |
+
$this->add_control(
|
78 |
+
'html_tag',
|
79 |
+
[
|
80 |
+
'label' => __( 'HTML Tag', 'press-elements' ),
|
81 |
+
'type' => Controls_Manager::SELECT,
|
82 |
+
'options' => [
|
83 |
+
'h1' => __( 'H1', 'press-elements' ),
|
84 |
+
'h2' => __( 'H2', 'press-elements' ),
|
85 |
+
'h3' => __( 'H3', 'press-elements' ),
|
86 |
+
'h4' => __( 'H4', 'press-elements' ),
|
87 |
+
'h5' => __( 'H5', 'press-elements' ),
|
88 |
+
'h6' => __( 'H6', 'press-elements' ),
|
89 |
+
'p' => __( 'p', 'press-elements' ),
|
90 |
+
'div' => __( 'div', 'press-elements' ),
|
91 |
+
'span' => __( 'span', 'press-elements' ),
|
92 |
+
],
|
93 |
+
'default' => 'p',
|
94 |
+
]
|
95 |
+
);
|
96 |
+
|
97 |
+
$this->add_responsive_control(
|
98 |
+
'align',
|
99 |
+
[
|
100 |
+
'label' => __( 'Alignment', 'press-elements' ),
|
101 |
+
'type' => Controls_Manager::CHOOSE,
|
102 |
+
'options' => [
|
103 |
+
'left' => [
|
104 |
+
'title' => __( 'Left', 'press-elements' ),
|
105 |
+
'icon' => 'fa fa-align-left',
|
106 |
+
],
|
107 |
+
'center' => [
|
108 |
+
'title' => __( 'Center', 'press-elements' ),
|
109 |
+
'icon' => 'fa fa-align-center',
|
110 |
+
],
|
111 |
+
'right' => [
|
112 |
+
'title' => __( 'Right', 'press-elements' ),
|
113 |
+
'icon' => 'fa fa-align-right',
|
114 |
+
],
|
115 |
+
'justify' => [
|
116 |
+
'title' => __( 'Justified', 'press-elements' ),
|
117 |
+
'icon' => 'fa fa-align-justify',
|
118 |
+
],
|
119 |
+
],
|
120 |
+
'default' => '',
|
121 |
+
'selectors' => [
|
122 |
+
'{{WRAPPER}}' => 'text-align: {{VALUE}};',
|
123 |
+
],
|
124 |
+
]
|
125 |
+
);
|
126 |
+
|
127 |
+
$this->add_control(
|
128 |
+
'link_to',
|
129 |
+
[
|
130 |
+
'label' => __( 'Link to', 'press-elements' ),
|
131 |
+
'type' => Controls_Manager::SELECT,
|
132 |
+
'default' => 'none',
|
133 |
+
'options' => [
|
134 |
+
'none' => __( 'None', 'press-elements' ),
|
135 |
+
'home' => __( 'Home URL', 'press-elements' ),
|
136 |
+
'post' => sprintf(
|
137 |
+
/* translators: %s: Post type singular name (e.g. Post or Page) */
|
138 |
+
__( '%s URL', 'press-elements' ),
|
139 |
+
$post_type_object->labels->singular_name
|
140 |
+
),
|
141 |
+
'author' => __( 'Author URL', 'press-elements' ),
|
142 |
+
'custom' => __( 'Custom URL', 'press-elements' ),
|
143 |
+
],
|
144 |
+
]
|
145 |
+
);
|
146 |
+
|
147 |
+
$this->add_control(
|
148 |
+
'link',
|
149 |
+
[
|
150 |
+
'label' => __( 'Link', 'press-elements' ),
|
151 |
+
'type' => Controls_Manager::URL,
|
152 |
+
'placeholder' => __( 'http://your-link.com', 'press-elements' ),
|
153 |
+
'condition' => [
|
154 |
+
'link_to' => 'custom',
|
155 |
+
],
|
156 |
+
'default' => [
|
157 |
+
'url' => '',
|
158 |
+
],
|
159 |
+
'show_label' => false,
|
160 |
+
]
|
161 |
+
);
|
162 |
+
|
163 |
+
$this->end_controls_section();
|
164 |
+
|
165 |
+
$this->start_controls_section(
|
166 |
+
'section_style',
|
167 |
+
[
|
168 |
+
'label' => sprintf(
|
169 |
+
/* translators: %s: Post type singular name (e.g. Post or Page) */
|
170 |
+
__( '%s Author', 'press-elements' ),
|
171 |
+
$post_type_object->labels->singular_name
|
172 |
+
),
|
173 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
174 |
+
]
|
175 |
+
);
|
176 |
+
|
177 |
+
$this->add_control(
|
178 |
+
'color',
|
179 |
+
[
|
180 |
+
'label' => __( 'Text Color', 'press-elements' ),
|
181 |
+
'type' => Controls_Manager::COLOR,
|
182 |
+
'scheme' => [
|
183 |
+
'type' => Scheme_Color::get_type(),
|
184 |
+
'value' => Scheme_Color::COLOR_1,
|
185 |
+
],
|
186 |
+
'selectors' => [
|
187 |
+
'{{WRAPPER}} .press-elements-author' => 'color: {{VALUE}};',
|
188 |
+
'{{WRAPPER}} .press-elements-author a' => 'color: {{VALUE}};',
|
189 |
+
],
|
190 |
+
'condition' => [
|
191 |
+
'author!' => 'image',
|
192 |
+
],
|
193 |
+
]
|
194 |
+
);
|
195 |
+
|
196 |
+
$this->add_group_control(
|
197 |
+
Group_Control_Typography::get_type(),
|
198 |
+
[
|
199 |
+
'name' => 'typography',
|
200 |
+
'scheme' => Scheme_Typography::TYPOGRAPHY_1,
|
201 |
+
'selector' => '{{WRAPPER}} .press-elements-author',
|
202 |
+
'condition' => [
|
203 |
+
'author!' => 'image',
|
204 |
+
],
|
205 |
+
]
|
206 |
+
);
|
207 |
+
|
208 |
+
$this->add_responsive_control(
|
209 |
+
'space',
|
210 |
+
[
|
211 |
+
'label' => __( 'Size (%)', 'press-elements' ),
|
212 |
+
'type' => Controls_Manager::SLIDER,
|
213 |
+
'default' => [
|
214 |
+
'size' => 100,
|
215 |
+
'unit' => '%',
|
216 |
+
],
|
217 |
+
'size_units' => [ '%' ],
|
218 |
+
'range' => [
|
219 |
+
'%' => [
|
220 |
+
'min' => 1,
|
221 |
+
'max' => 100,
|
222 |
+
],
|
223 |
+
],
|
224 |
+
'selectors' => [
|
225 |
+
'{{WRAPPER}} .press-elements-author img' => 'max-width: {{SIZE}}{{UNIT}};',
|
226 |
+
],
|
227 |
+
'condition' => [
|
228 |
+
'author' => 'image',
|
229 |
+
],
|
230 |
+
]
|
231 |
+
);
|
232 |
+
|
233 |
+
$this->add_responsive_control(
|
234 |
+
'opacity',
|
235 |
+
[
|
236 |
+
'label' => __( 'Opacity (%)', 'press-elements' ),
|
237 |
+
'type' => Controls_Manager::SLIDER,
|
238 |
+
'default' => [
|
239 |
+
'size' => 1,
|
240 |
+
],
|
241 |
+
'range' => [
|
242 |
+
'px' => [
|
243 |
+
'max' => 1,
|
244 |
+
'min' => 0.10,
|
245 |
+
'step' => 0.01,
|
246 |
+
],
|
247 |
+
],
|
248 |
+
'selectors' => [
|
249 |
+
'{{WRAPPER}} .press-elements-author img' => 'opacity: {{SIZE}};',
|
250 |
+
],
|
251 |
+
'condition' => [
|
252 |
+
'author' => 'image',
|
253 |
+
],
|
254 |
+
]
|
255 |
+
);
|
256 |
+
|
257 |
+
$this->add_control(
|
258 |
+
'angle',
|
259 |
+
[
|
260 |
+
'label' => __( 'Angle (deg)', 'press-elements' ),
|
261 |
+
'type' => Controls_Manager::SLIDER,
|
262 |
+
'size_units' => [ 'deg' ],
|
263 |
+
'default' => [
|
264 |
+
'unit' => 'deg',
|
265 |
+
'size' => 0,
|
266 |
+
],
|
267 |
+
'range' => [
|
268 |
+
'deg' => [
|
269 |
+
'max' => 360,
|
270 |
+
'min' => -360,
|
271 |
+
'step' => 1,
|
272 |
+
],
|
273 |
+
],
|
274 |
+
'selectors' => [
|
275 |
+
'{{WRAPPER}} .press-elements-author img' => '-webkit-transform: rotate({{SIZE}}deg); -moz-transform: rotate({{SIZE}}deg); -ms-transform: rotate({{SIZE}}deg); -o-transform: rotate({{SIZE}}deg); transform: rotate({{SIZE}}deg);',
|
276 |
+
],
|
277 |
+
'condition' => [
|
278 |
+
'author' => 'image',
|
279 |
+
],
|
280 |
+
]
|
281 |
+
);
|
282 |
+
|
283 |
+
$this->add_control(
|
284 |
+
'hover_animation',
|
285 |
+
[
|
286 |
+
'label' => __( 'Hover Animation', 'press-elements' ),
|
287 |
+
'type' => Controls_Manager::HOVER_ANIMATION,
|
288 |
+
]
|
289 |
+
);
|
290 |
+
|
291 |
+
$this->add_group_control(
|
292 |
+
Group_Control_Border::get_type(),
|
293 |
+
[
|
294 |
+
'name' => 'image_border',
|
295 |
+
'label' => __( 'Image Border', 'press-elements' ),
|
296 |
+
'selector' => '{{WRAPPER}} .press-elements-author img',
|
297 |
+
'condition' => [
|
298 |
+
'author' => 'image',
|
299 |
+
],
|
300 |
+
]
|
301 |
+
);
|
302 |
+
|
303 |
+
$this->add_control(
|
304 |
+
'image_border_radius',
|
305 |
+
[
|
306 |
+
'label' => __( 'Border Radius', 'press-elements' ),
|
307 |
+
'type' => Controls_Manager::DIMENSIONS,
|
308 |
+
'size_units' => [ 'px', '%' ],
|
309 |
+
'selectors' => [
|
310 |
+
'{{WRAPPER}} .press-elements-author img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
311 |
+
],
|
312 |
+
'condition' => [
|
313 |
+
'author' => 'image',
|
314 |
+
],
|
315 |
+
]
|
316 |
+
);
|
317 |
+
|
318 |
+
$this->add_group_control(
|
319 |
+
Group_Control_Box_Shadow::get_type(),
|
320 |
+
[
|
321 |
+
'name' => 'image_box_shadow',
|
322 |
+
'selector' => '{{WRAPPER}} .press-elements-author img',
|
323 |
+
'condition' => [
|
324 |
+
'author' => 'image',
|
325 |
+
],
|
326 |
+
]
|
327 |
+
);
|
328 |
+
|
329 |
+
$this->end_controls_section();
|
330 |
+
|
331 |
+
}
|
332 |
+
|
333 |
+
protected function render() {
|
334 |
+
$settings = $this->get_settings();
|
335 |
+
|
336 |
+
if ( empty( $settings['author'] ) )
|
337 |
+
return;
|
338 |
+
|
339 |
+
$author = $this->user_data( $settings['author'] );
|
340 |
+
|
341 |
+
switch ( $settings['link_to'] ) {
|
342 |
+
case 'custom' :
|
343 |
+
if ( ! empty( $settings['link']['url'] ) ) {
|
344 |
+
$link = esc_url( $settings['link']['url'] );
|
345 |
+
} else {
|
346 |
+
$link = false;
|
347 |
+
}
|
348 |
+
break;
|
349 |
+
|
350 |
+
case 'author' :
|
351 |
+
$link = esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) );
|
352 |
+
break;
|
353 |
+
|
354 |
+
case 'post' :
|
355 |
+
$link = esc_url( get_the_permalink() );
|
356 |
+
break;
|
357 |
+
|
358 |
+
case 'home' :
|
359 |
+
$link = esc_url( get_home_url() );
|
360 |
+
break;
|
361 |
+
|
362 |
+
case 'none' :
|
363 |
+
default:
|
364 |
+
$link = false;
|
365 |
+
break;
|
366 |
+
}
|
367 |
+
$target = $settings['link']['is_external'] ? 'target="_blank"' : '';
|
368 |
+
|
369 |
+
$animation_class = ! empty( $settings['hover_animation'] ) ? 'elementor-animation-' . $settings['hover_animation'] : '';
|
370 |
+
|
371 |
+
$html = sprintf( '<%1$s class="press-elements-author %2$s">', $settings['html_tag'], $animation_class );
|
372 |
+
if ( $link ) {
|
373 |
+
$html .= sprintf( '<a href="%1$s" %2$s>%3$s</a>', $link, $target, $author );
|
374 |
+
} else {
|
375 |
+
$html .= $author;
|
376 |
+
}
|
377 |
+
$html .= sprintf( '</%s>', $settings['html_tag'] );
|
378 |
+
|
379 |
+
echo $html;
|
380 |
+
}
|
381 |
+
|
382 |
+
protected function _content_template() {
|
383 |
+
?>
|
384 |
+
<#
|
385 |
+
var author_data = [];
|
386 |
+
<?php
|
387 |
+
foreach ( $this->user_data() as $key => $value ) {
|
388 |
+
printf( 'author_data[ "%1$s" ] = "%2$s";', $key, $value );
|
389 |
+
}
|
390 |
+
?>
|
391 |
+
var author = author_data[ settings.author ];
|
392 |
+
|
393 |
+
var link_url;
|
394 |
+
switch( settings.link_to ) {
|
395 |
+
case 'custom':
|
396 |
+
link_url = settings.link.url;
|
397 |
+
break;
|
398 |
+
case 'author':
|
399 |
+
link_url = '<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>';
|
400 |
+
break;
|
401 |
+
case 'post':
|
402 |
+
link_url = '<?php echo esc_url( get_the_permalink() ); ?>';
|
403 |
+
break;
|
404 |
+
case 'home':
|
405 |
+
link_url = '<?php echo esc_url( get_home_url() ); ?>';
|
406 |
+
break;
|
407 |
+
case 'none':
|
408 |
+
default:
|
409 |
+
link_url = false;
|
410 |
+
}
|
411 |
+
var target = settings.link.is_external ? 'target="_blank"' : '';
|
412 |
+
|
413 |
+
var animation_class = '';
|
414 |
+
if ( '' !== settings.hover_animation ) {
|
415 |
+
animation_class = 'elementor-animation-' + settings.hover_animation;
|
416 |
+
}
|
417 |
+
|
418 |
+
var html = '<' + settings.html_tag + ' class="press-elements-author ' + animation_class + '">';
|
419 |
+
if ( link_url ) {
|
420 |
+
html += '<a href="' + link_url + '" ' + target + '>' + author + '</a>';
|
421 |
+
} else {
|
422 |
+
html += author;
|
423 |
+
}
|
424 |
+
html += '</' + settings.html_tag + '>';
|
425 |
+
|
426 |
+
print( html );
|
427 |
+
#>
|
428 |
+
<?php
|
429 |
+
}
|
430 |
+
|
431 |
+
protected function user_fields_labels() {
|
432 |
+
|
433 |
+
$fields = [
|
434 |
+
'first_name' => __( 'First Name', 'press-elements' ),
|
435 |
+
'last_name' => __( 'Last Name', 'press-elements' ),
|
436 |
+
'first_last' => __( 'First Name + Last Name', 'press-elements' ),
|
437 |
+
'last_first' => __( 'Last Name + First Name', 'press-elements' ),
|
438 |
+
'nickname' => __( 'Nick Name', 'press-elements' ),
|
439 |
+
'display_name' => __( 'Display Name', 'press-elements' ),
|
440 |
+
'user_login' => __( 'User Name', 'press-elements' ),
|
441 |
+
'description' => __( 'User Bio', 'press-elements' ),
|
442 |
+
'image' => __( 'User Image', 'press-elements' ),
|
443 |
+
];
|
444 |
+
|
445 |
+
return $fields;
|
446 |
+
|
447 |
+
}
|
448 |
+
|
449 |
+
protected function user_data( $selected = '' ) {
|
450 |
+
|
451 |
+
global $post;
|
452 |
+
|
453 |
+
$author_id = $post->post_author;
|
454 |
+
|
455 |
+
$fields = [
|
456 |
+
'first_name' => get_the_author_meta( 'first_name', $author_id ),
|
457 |
+
'last_name' => get_the_author_meta( 'last_name', $author_id ),
|
458 |
+
'first_last' => sprintf( '%s %s', get_the_author_meta( 'first_name', $author_id ), get_the_author_meta( 'last_name', $author_id ) ),
|
459 |
+
'last_first' => sprintf( '%s %s', get_the_author_meta( 'last_name', $author_id ), get_the_author_meta( 'first_name', $author_id ) ),
|
460 |
+
'nickname' => get_the_author_meta( 'nickname', $author_id ),
|
461 |
+
'display_name' => get_the_author_meta( 'display_name', $author_id ),
|
462 |
+
'user_login' => get_the_author_meta( 'user_login', $author_id ),
|
463 |
+
'description' => get_the_author_meta( 'description', $author_id ),
|
464 |
+
'image' => get_avatar( get_the_author_meta( 'email', $author_id ), 256 ),
|
465 |
+
];
|
466 |
+
|
467 |
+
if ( empty( $selected ) ) {
|
468 |
+
// Return the entire array
|
469 |
+
return $fields;
|
470 |
+
} else {
|
471 |
+
// Return only the selected field
|
472 |
+
return $fields[ $selected ];
|
473 |
+
}
|
474 |
+
|
475 |
+
}
|
476 |
+
|
477 |
+
}
|
widgets/post-comments.php
CHANGED
@@ -1,84 +1,84 @@
|
|
1 |
-
<?php
|
2 |
-
namespace PressElements\Widgets;
|
3 |
-
|
4 |
-
use Elementor\Widget_Base;
|
5 |
-
use Elementor\Controls_Manager;
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
// Exit if accessed directly
|
10 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
11 |
-
exit;
|
12 |
-
}
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
/**
|
17 |
-
* Press Elements Post Comments
|
18 |
-
*
|
19 |
-
* Single post/page comments element for elementor.
|
20 |
-
*
|
21 |
-
* @since 1.1.0
|
22 |
-
*/
|
23 |
-
class Press_Elements_Post_Comments extends Widget_Base {
|
24 |
-
|
25 |
-
public function get_name() {
|
26 |
-
return 'post-comments';
|
27 |
-
}
|
28 |
-
|
29 |
-
public function get_title() {
|
30 |
-
$post_type_object = get_post_type_object( get_post_type() );
|
31 |
-
|
32 |
-
return sprintf(
|
33 |
-
/* translators: %s: Post type singular name (e.g. Post or Page) */
|
34 |
-
__( '%s Comments', 'press-elements' ),
|
35 |
-
$post_type_object->labels->singular_name
|
36 |
-
);
|
37 |
-
}
|
38 |
-
|
39 |
-
public function get_icon() {
|
40 |
-
return 'fa fa-comment-o';
|
41 |
-
}
|
42 |
-
|
43 |
-
public function get_categories() {
|
44 |
-
return [ 'press-elements-post-elements' ];
|
45 |
-
}
|
46 |
-
|
47 |
-
protected function _register_controls() {
|
48 |
-
|
49 |
-
$post_type_object = get_post_type_object( get_post_type() );
|
50 |
-
|
51 |
-
$this->start_controls_section(
|
52 |
-
'section_content',
|
53 |
-
[
|
54 |
-
'label' => sprintf(
|
55 |
-
/* translators: %s: Post type singular name (e.g. Post or Page) */
|
56 |
-
__( '%s Comments', 'press-elements' ),
|
57 |
-
$post_type_object->labels->singular_name
|
58 |
-
),
|
59 |
-
]
|
60 |
-
);
|
61 |
-
|
62 |
-
$this->add_control(
|
63 |
-
'info',
|
64 |
-
[
|
65 |
-
'type' => Controls_Manager::RAW_HTML,
|
66 |
-
'raw' => __( 'This widget displays the default Comments Template included in the current Theme.', 'press-elements' ) .
|
67 |
-
'<br><br>' .
|
68 |
-
__( 'No custom styling can be applied as each theme uses it\'s own CSS classes and IDs.', 'press-elements' ),
|
69 |
-
'content_classes' => 'elementor-descriptor',
|
70 |
-
]
|
71 |
-
);
|
72 |
-
|
73 |
-
$this->end_controls_section();
|
74 |
-
|
75 |
-
}
|
76 |
-
|
77 |
-
protected function render() {
|
78 |
-
comments_template();
|
79 |
-
}
|
80 |
-
|
81 |
-
protected function _content_template() {
|
82 |
-
comments_template();
|
83 |
-
}
|
84 |
-
}
|
1 |
+
<?php
|
2 |
+
namespace PressElements\Widgets;
|
3 |
+
|
4 |
+
use Elementor\Widget_Base;
|
5 |
+
use Elementor\Controls_Manager;
|
6 |
+
|
7 |
+
|
8 |
+
|
9 |
+
// Exit if accessed directly
|
10 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
11 |
+
exit;
|
12 |
+
}
|
13 |
+
|
14 |
+
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Press Elements Post Comments
|
18 |
+
*
|
19 |
+
* Single post/page comments element for elementor.
|
20 |
+
*
|
21 |
+
* @since 1.1.0
|
22 |
+
*/
|
23 |
+
class Press_Elements_Post_Comments extends Widget_Base {
|
24 |
+
|
25 |
+
public function get_name() {
|
26 |
+
return 'post-comments';
|
27 |
+
}
|
28 |
+
|
29 |
+
public function get_title() {
|
30 |
+
$post_type_object = get_post_type_object( get_post_type() );
|
31 |
+
|
32 |
+
return sprintf(
|
33 |
+
/* translators: %s: Post type singular name (e.g. Post or Page) */
|
34 |
+
__( '%s Comments', 'press-elements' ),
|
35 |
+
$post_type_object->labels->singular_name
|
36 |
+
);
|
37 |
+
}
|
38 |
+
|
39 |
+
public function get_icon() {
|
40 |
+
return 'fa fa-comment-o';
|
41 |
+
}
|
42 |
+
|
43 |
+
public function get_categories() {
|
44 |
+
return [ 'press-elements-post-elements' ];
|
45 |
+
}
|
46 |
+
|
47 |
+
protected function _register_controls() {
|
48 |
+
|
49 |
+
$post_type_object = get_post_type_object( get_post_type() );
|
50 |
+
|
51 |
+
$this->start_controls_section(
|
52 |
+
'section_content',
|
53 |
+
[
|
54 |
+
'label' => sprintf(
|
55 |
+
/* translators: %s: Post type singular name (e.g. Post or Page) */
|
56 |
+
__( '%s Comments', 'press-elements' ),
|
57 |
+
$post_type_object->labels->singular_name
|
58 |
+
),
|
59 |
+
]
|
60 |
+
);
|
61 |
+
|
62 |
+
$this->add_control(
|
63 |
+
'info',
|
64 |
+
[
|
65 |
+
'type' => Controls_Manager::RAW_HTML,
|
66 |
+
'raw' => __( 'This widget displays the default Comments Template included in the current Theme.', 'press-elements' ) .
|
67 |
+
'<br><br>' .
|
68 |
+
__( 'No custom styling can be applied as each theme uses it\'s own CSS classes and IDs.', 'press-elements' ),
|
69 |
+
'content_classes' => 'elementor-descriptor',
|
70 |
+
]
|
71 |
+
);
|
72 |
+
|
73 |
+
$this->end_controls_section();
|
74 |
+
|
75 |
+
}
|
76 |
+
|
77 |
+
protected function render() {
|
78 |
+
comments_template();
|
79 |
+
}
|
80 |
+
|
81 |
+
protected function _content_template() {
|
82 |
+
comments_template();
|
83 |
+
}
|
84 |
+
}
|
widgets/post-custom-field.php
CHANGED
@@ -13,12 +13,12 @@ use Elementor\Group_Control_Box_Shadow ;
|
|
13 |
if ( !defined( 'ABSPATH' ) ) {
|
14 |
die;
|
15 |
}
|
16 |
-
/**
|
17 |
-
* Press Elements Post Custom Field
|
18 |
-
*
|
19 |
-
* Single post/page custom field element for elementor.
|
20 |
-
*
|
21 |
-
* @since 1.0.0
|
22 |
*/
|
23 |
class Press_Elements_Post_Custom_Field extends Widget_Base
|
24 |
{
|
@@ -51,11 +51,11 @@ class Press_Elements_Post_Custom_Field extends Widget_Base
|
|
51 |
) );
|
52 |
$this->add_control( 'pro_feature', array(
|
53 |
'type' => Controls_Manager::RAW_HTML,
|
54 |
-
'raw' => '<div class="elementor-panel-nerd-box">
|
55 |
-
<i class="elementor-panel-nerd-box-icon fa fa-lock"></i>
|
56 |
-
<div class="elementor-panel-nerd-box-title">' . __( 'Premium Feature', 'press-elements' ) . '</div>
|
57 |
-
<div class="elementor-panel-nerd-box-message">' . sprintf( __( 'This feature is only available on "%s".', 'press-elements' ), '<strong>' . __( 'Press Elements Pro', 'press-elements' ) . '</strong>' ) . '</div>
|
58 |
-
<a class="elementor-panel-nerd-box-link elementor-button elementor-button-default elementor-go-pro" href="' . press_elements_freemius()->get_upgrade_url() . '" target="_blank">' . __( 'Upgrade Now!', 'press-elements' ) . '</a>
|
59 |
</div>',
|
60 |
'separator' => 'none',
|
61 |
) );
|
13 |
if ( !defined( 'ABSPATH' ) ) {
|
14 |
die;
|
15 |
}
|
16 |
+
/**
|
17 |
+
* Press Elements Post Custom Field
|
18 |
+
*
|
19 |
+
* Single post/page custom field element for elementor.
|
20 |
+
*
|
21 |
+
* @since 1.0.0
|
22 |
*/
|
23 |
class Press_Elements_Post_Custom_Field extends Widget_Base
|
24 |
{
|
51 |
) );
|
52 |
$this->add_control( 'pro_feature', array(
|
53 |
'type' => Controls_Manager::RAW_HTML,
|
54 |
+
'raw' => '<div class="elementor-panel-nerd-box">
|
55 |
+
<i class="elementor-panel-nerd-box-icon fa fa-lock"></i>
|
56 |
+
<div class="elementor-panel-nerd-box-title">' . __( 'Premium Feature', 'press-elements' ) . '</div>
|
57 |
+
<div class="elementor-panel-nerd-box-message">' . sprintf( __( 'This feature is only available on "%s".', 'press-elements' ), '<strong>' . __( 'Press Elements Pro', 'press-elements' ) . '</strong>' ) . '</div>
|
58 |
+
<a class="elementor-panel-nerd-box-link elementor-button elementor-button-default elementor-go-pro" href="' . press_elements_freemius()->get_upgrade_url() . '" target="_blank">' . __( 'Upgrade Now!', 'press-elements' ) . '</a>
|
59 |
</div>',
|
60 |
'separator' => 'none',
|
61 |
) );
|
widgets/post-date.php
CHANGED
@@ -1,326 +1,326 @@
|
|
1 |
-
<?php
|
2 |
-
namespace PressElements\Widgets;
|
3 |
-
|
4 |
-
use Elementor\Widget_Base;
|
5 |
-
use Elementor\Controls_Manager;
|
6 |
-
use Elementor\Scheme_Color;
|
7 |
-
use Elementor\Scheme_Typography;
|
8 |
-
use Elementor\Group_Control_Typography;
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
// Exit if accessed directly
|
13 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
14 |
-
exit;
|
15 |
-
}
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Press Elements Post Date
|
21 |
-
*
|
22 |
-
* Single post/page date element for elementor.
|
23 |
-
*
|
24 |
-
* @since 1.0.0
|
25 |
-
*/
|
26 |
-
class Press_Elements_Post_Date extends Widget_Base {
|
27 |
-
|
28 |
-
public function get_name() {
|
29 |
-
return 'post-date';
|
30 |
-
}
|
31 |
-
|
32 |
-
public function get_title() {
|
33 |
-
$post_type_object = get_post_type_object( get_post_type() );
|
34 |
-
|
35 |
-
return sprintf(
|
36 |
-
/* translators: %s: Post type singular name (e.g. Post or Page) */
|
37 |
-
__( '%s Date', 'press-elements' ),
|
38 |
-
$post_type_object->labels->singular_name
|
39 |
-
);
|
40 |
-
}
|
41 |
-
|
42 |
-
public function get_icon() {
|
43 |
-
return 'fa fa-clock-o';
|
44 |
-
}
|
45 |
-
|
46 |
-
public function get_categories() {
|
47 |
-
return [ 'press-elements-post-elements' ];
|
48 |
-
}
|
49 |
-
|
50 |
-
protected function _register_controls() {
|
51 |
-
|
52 |
-
$post_type_object = get_post_type_object( get_post_type() );
|
53 |
-
|
54 |
-
$this->start_controls_section(
|
55 |
-
'section_content',
|
56 |
-
[
|
57 |
-
'label' => sprintf(
|
58 |
-
/* translators: %s: Post type singular name (e.g. Post or Page) */
|
59 |
-
__( '%s Date', 'press-elements' ),
|
60 |
-
$post_type_object->labels->singular_name
|
61 |
-
),
|
62 |
-
]
|
63 |
-
);
|
64 |
-
|
65 |
-
$this->add_control(
|
66 |
-
'date_type',
|
67 |
-
[
|
68 |
-
'label' => __( 'Date Type', 'press-elements' ),
|
69 |
-
'type' => Controls_Manager::SELECT,
|
70 |
-
'options' => [
|
71 |
-
'publish' => __( 'Publish Date', 'press-elements' ),
|
72 |
-
'modified' => __( 'Last Modified Date', 'press-elements' ),
|
73 |
-
],
|
74 |
-
'default' => 'publish',
|
75 |
-
]
|
76 |
-
);
|
77 |
-
|
78 |
-
$this->add_control(
|
79 |
-
'html_tag',
|
80 |
-
[
|
81 |
-
'label' => __( 'HTML Tag', 'press-elements' ),
|
82 |
-
'type' => Controls_Manager::SELECT,
|
83 |
-
'options' => [
|
84 |
-
'h1' => __( 'H1', 'press-elements' ),
|
85 |
-
'h2' => __( 'H2', 'press-elements' ),
|
86 |
-
'h3' => __( 'H3', 'press-elements' ),
|
87 |
-
'h4' => __( 'H4', 'press-elements' ),
|
88 |
-
'h5' => __( 'H5', 'press-elements' ),
|
89 |
-
'h6' => __( 'H6', 'press-elements' ),
|
90 |
-
'p' => __( 'p', 'press-elements' ),
|
91 |
-
'div' => __( 'div', 'press-elements' ),
|
92 |
-
'span' => __( 'span', 'press-elements' ),
|
93 |
-
],
|
94 |
-
'default' => 'p',
|
95 |
-
]
|
96 |
-
);
|
97 |
-
|
98 |
-
$this->add_responsive_control(
|
99 |
-
'align',
|
100 |
-
[
|
101 |
-
'label' => __( 'Alignment', 'press-elements' ),
|
102 |
-
'type' => Controls_Manager::CHOOSE,
|
103 |
-
'options' => [
|
104 |
-
'left' => [
|
105 |
-
'title' => __( 'Left', 'press-elements' ),
|
106 |
-
'icon' => 'fa fa-align-left',
|
107 |
-
],
|
108 |
-
'center' => [
|
109 |
-
'title' => __( 'Center', 'press-elements' ),
|
110 |
-
'icon' => 'fa fa-align-center',
|
111 |
-
],
|
112 |
-
'right' => [
|
113 |
-
'title' => __( 'Right', 'press-elements' ),
|
114 |
-
'icon' => 'fa fa-align-right',
|
115 |
-
],
|
116 |
-
'justify' => [
|
117 |
-
'title' => __( 'Justified', 'press-elements' ),
|
118 |
-
'icon' => 'fa fa-align-justify',
|
119 |
-
],
|
120 |
-
],
|
121 |
-
'default' => '',
|
122 |
-
'selectors' => [
|
123 |
-
'{{WRAPPER}}' => 'text-align: {{VALUE}};',
|
124 |
-
],
|
125 |
-
]
|
126 |
-
);
|
127 |
-
|
128 |
-
$this->add_control(
|
129 |
-
'link_to',
|
130 |
-
[
|
131 |
-
'label' => __( 'Link to', 'press-elements' ),
|
132 |
-
'type' => Controls_Manager::SELECT,
|
133 |
-
'default' => 'none',
|
134 |
-
'options' => [
|
135 |
-
'none' => __( 'None', 'press-elements' ),
|
136 |
-
'home' => __( 'Home URL', 'press-elements' ),
|
137 |
-
'post' => sprintf(
|
138 |
-
/* translators: %s: Post type singular name (e.g. Post or Page) */
|
139 |
-
__( '%s URL', 'press-elements' ),
|
140 |
-
$post_type_object->labels->singular_name
|
141 |
-
),
|
142 |
-
'custom' => __( 'Custom URL', 'press-elements' ),
|
143 |
-
],
|
144 |
-
]
|
145 |
-
);
|
146 |
-
|
147 |
-
$this->add_control(
|
148 |
-
'link',
|
149 |
-
[
|
150 |
-
'label' => __( 'Link', 'press-elements' ),
|
151 |
-
'type' => Controls_Manager::URL,
|
152 |
-
'placeholder' => __( 'http://your-link.com', 'press-elements' ),
|
153 |
-
'condition' => [
|
154 |
-
'link_to' => 'custom',
|
155 |
-
],
|
156 |
-
'default' => [
|
157 |
-
'url' => '',
|
158 |
-
],
|
159 |
-
'show_label' => false,
|
160 |
-
]
|
161 |
-
);
|
162 |
-
|
163 |
-
$this->end_controls_section();
|
164 |
-
|
165 |
-
$this->start_controls_section(
|
166 |
-
'section_style',
|
167 |
-
[
|
168 |
-
'label' => sprintf(
|
169 |
-
/* translators: %s: Post type singular name (e.g. Post or Page) */
|
170 |
-
__( '%s Date', 'press-elements' ),
|
171 |
-
$post_type_object->labels->singular_name
|
172 |
-
),
|
173 |
-
'tab' => Controls_Manager::TAB_STYLE,
|
174 |
-
]
|
175 |
-
);
|
176 |
-
|
177 |
-
$this->add_control(
|
178 |
-
'color',
|
179 |
-
[
|
180 |
-
'label' => __( 'Text Color', 'press-elements' ),
|
181 |
-
'type' => Controls_Manager::COLOR,
|
182 |
-
'scheme' => [
|
183 |
-
'type' => Scheme_Color::get_type(),
|
184 |
-
'value' => Scheme_Color::COLOR_1,
|
185 |
-
],
|
186 |
-
'selectors' => [
|
187 |
-
'{{WRAPPER}} .press-elements-date' => 'color: {{VALUE}};',
|
188 |
-
'{{WRAPPER}} .press-elements-date a' => 'color: {{VALUE}};',
|
189 |
-
],
|
190 |
-
]
|
191 |
-
);
|
192 |
-
|
193 |
-
$this->add_group_control(
|
194 |
-
Group_Control_Typography::get_type(),
|
195 |
-
[
|
196 |
-
'name' => 'typography',
|
197 |
-
'scheme' => Scheme_Typography::TYPOGRAPHY_1,
|
198 |
-
'selector' => '{{WRAPPER}} .press-elements-date',
|
199 |
-
]
|
200 |
-
);
|
201 |
-
|
202 |
-
$this->add_control(
|
203 |
-
'hover_animation',
|
204 |
-
[
|
205 |
-
'label' => __( 'Hover Animation', 'press-elements' ),
|
206 |
-
'type' => Controls_Manager::HOVER_ANIMATION,
|
207 |
-
]
|
208 |
-
);
|
209 |
-
|
210 |
-
$this->end_controls_section();
|
211 |
-
|
212 |
-
}
|
213 |
-
|
214 |
-
protected function render() {
|
215 |
-
|
216 |
-
$settings = $this->get_settings();
|
217 |
-
|
218 |
-
// Backwards compitability check
|
219 |
-
if ( $settings['date_type'] )
|
220 |
-
$date_type = $settings['date_type'];
|
221 |
-
else
|
222 |
-
$date_type = 'publish';
|
223 |
-
|
224 |
-
switch ( $date_type ) {
|
225 |
-
case 'modified' :
|
226 |
-
$date = get_the_modified_date();
|
227 |
-
break;
|
228 |
-
|
229 |
-
case 'publish' :
|
230 |
-
default:
|
231 |
-
$date = get_the_date();
|
232 |
-
break;
|
233 |
-
}
|
234 |
-
|
235 |
-
if ( empty( $date ) )
|
236 |
-
return;
|
237 |
-
|
238 |
-
switch ( $settings['link_to'] ) {
|
239 |
-
case 'custom' :
|
240 |
-
if ( ! empty( $settings['link']['url'] ) ) {
|
241 |
-
$link = esc_url( $settings['link']['url'] );
|
242 |
-
} else {
|
243 |
-
$link = false;
|
244 |
-
}
|
245 |
-
break;
|
246 |
-
|
247 |
-
case 'post' :
|
248 |
-
$link = esc_url( get_the_permalink() );
|
249 |
-
break;
|
250 |
-
|
251 |
-
case 'home' :
|
252 |
-
$link = esc_url( get_home_url() );
|
253 |
-
break;
|
254 |
-
|
255 |
-
case 'none' :
|
256 |
-
default:
|
257 |
-
$link = false;
|
258 |
-
break;
|
259 |
-
}
|
260 |
-
$target = $settings['link']['is_external'] ? 'target="_blank"' : '';
|
261 |
-
|
262 |
-
$animation_class = ! empty( $settings['hover_animation'] ) ? 'elementor-animation-' . $settings['hover_animation'] : '';
|
263 |
-
|
264 |
-
$html = sprintf( '<%1$s class="press-elements-date %2$s">', $settings['html_tag'], $animation_class );
|
265 |
-
if ( $link ) {
|
266 |
-
$html .= sprintf( '<a href="%1$s" %2$s>%3$s</a>', $link, $target, $date );
|
267 |
-
} else {
|
268 |
-
$html .= $date;
|
269 |
-
}
|
270 |
-
$html .= sprintf( '</%s>', $settings['html_tag'] );
|
271 |
-
|
272 |
-
echo $html;
|
273 |
-
}
|
274 |
-
|
275 |
-
protected function _content_template() {
|
276 |
-
?>
|
277 |
-
<#
|
278 |
-
// Backwards compitability check
|
279 |
-
var datetype;
|
280 |
-
if (settings.date_type) {
|
281 |
-
datetype = settings.date_type;
|
282 |
-
} else {
|
283 |
-
datetype = "publish";
|
284 |
-
}
|
285 |
-
|
286 |
-
var data_fields = [];
|
287 |
-
data_fields[ "modified" ] = "<?php echo get_the_modified_date(); ?>";
|
288 |
-
data_fields[ "publish" ] = "<?php echo get_the_date(); ?>";
|
289 |
-
|
290 |
-
var date = data_fields[ datetype ];
|
291 |
-
|
292 |
-
var link_url;
|
293 |
-
switch( settings.link_to ) {
|
294 |
-
case 'custom':
|
295 |
-
link_url = settings.link.url;
|
296 |
-
break;
|
297 |
-
case 'post':
|
298 |
-
link_url = '<?php echo esc_url( get_the_permalink() ); ?>';
|
299 |
-
break;
|
300 |
-
case 'home':
|
301 |
-
link_url = '<?php echo esc_url( get_home_url() ); ?>';
|
302 |
-
break;
|
303 |
-
case 'none':
|
304 |
-
default:
|
305 |
-
link_url = false;
|
306 |
-
}
|
307 |
-
var target = settings.link.is_external ? 'target="_blank"' : '';
|
308 |
-
|
309 |
-
var animation_class = '';
|
310 |
-
if ( '' !== settings.hover_animation ) {
|
311 |
-
animation_class = 'elementor-animation-' + settings.hover_animation;
|
312 |
-
}
|
313 |
-
|
314 |
-
var html = '<' + settings.html_tag + ' class="press-elements-date ' + animation_class + '">';
|
315 |
-
if ( link_url ) {
|
316 |
-
html += '<a href="' + link_url + '" ' + target + '>' + date + '</a>';
|
317 |
-
} else {
|
318 |
-
html += date;
|
319 |
-
}
|
320 |
-
html += '</' + settings.html_tag + '>';
|
321 |
-
|
322 |
-
print( html );
|
323 |
-
#>
|
324 |
-
<?php
|
325 |
-
}
|
326 |
-
}
|
1 |
+
<?php
|
2 |
+
namespace PressElements\Widgets;
|
3 |
+
|
4 |
+
use Elementor\Widget_Base;
|
5 |
+
use Elementor\Controls_Manager;
|
6 |
+
use Elementor\Scheme_Color;
|
7 |
+
use Elementor\Scheme_Typography;
|
8 |
+
use Elementor\Group_Control_Typography;
|
9 |
+
|
10 |
+
|
11 |
+
|
12 |
+
// Exit if accessed directly
|
13 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
14 |
+
exit;
|
15 |
+
}
|
16 |
+
|
17 |
+
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Press Elements Post Date
|
21 |
+
*
|
22 |
+
* Single post/page date element for elementor.
|
23 |
+
*
|
24 |
+
* @since 1.0.0
|
25 |
+
*/
|
26 |
+
class Press_Elements_Post_Date extends Widget_Base {
|
27 |
+
|
28 |
+
public function get_name() {
|
29 |
+
return 'post-date';
|
30 |
+
}
|
31 |
+
|
32 |
+
public function get_title() {
|
33 |
+
$post_type_object = get_post_type_object( get_post_type() );
|
34 |
+
|
35 |
+
return sprintf(
|
36 |
+
/* translators: %s: Post type singular name (e.g. Post or Page) */
|
37 |
+
__( '%s Date', 'press-elements' ),
|
38 |
+
$post_type_object->labels->singular_name
|
39 |
+
);
|
40 |
+
}
|
41 |
+
|
42 |
+
public function get_icon() {
|
43 |
+
return 'fa fa-clock-o';
|
44 |
+
}
|
45 |
+
|
46 |
+
public function get_categories() {
|
47 |
+
return [ 'press-elements-post-elements' ];
|
48 |
+
}
|
49 |
+
|
50 |
+
protected function _register_controls() {
|
51 |
+
|
52 |
+
$post_type_object = get_post_type_object( get_post_type() );
|
53 |
+
|
54 |
+
$this->start_controls_section(
|
55 |
+
'section_content',
|
56 |
+
[
|
57 |
+
'label' => sprintf(
|
58 |
+
/* translators: %s: Post type singular name (e.g. Post or Page) */
|
59 |
+
__( '%s Date', 'press-elements' ),
|
60 |
+
$post_type_object->labels->singular_name
|
61 |
+
),
|
62 |
+
]
|
63 |
+
);
|
64 |
+
|
65 |
+
$this->add_control(
|
66 |
+
'date_type',
|
67 |
+
[
|
68 |
+
'label' => __( 'Date Type', 'press-elements' ),
|
69 |
+
'type' => Controls_Manager::SELECT,
|
70 |
+
'options' => [
|
71 |
+
'publish' => __( 'Publish Date', 'press-elements' ),
|
72 |
+
'modified' => __( 'Last Modified Date', 'press-elements' ),
|
73 |
+
],
|
74 |
+
'default' => 'publish',
|
75 |
+
]
|
76 |
+
);
|
77 |
+
|
78 |
+
$this->add_control(
|
79 |
+
'html_tag',
|
80 |
+
[
|
81 |
+
'label' => __( 'HTML Tag', 'press-elements' ),
|
82 |
+
'type' => Controls_Manager::SELECT,
|
83 |
+
'options' => [
|
84 |
+
'h1' => __( 'H1', 'press-elements' ),
|
85 |
+
'h2' => __( 'H2', 'press-elements' ),
|
86 |
+
'h3' => __( 'H3', 'press-elements' ),
|
87 |
+
'h4' => __( 'H4', 'press-elements' ),
|
88 |
+
'h5' => __( 'H5', 'press-elements' ),
|
89 |
+
'h6' => __( 'H6', 'press-elements' ),
|
90 |
+
'p' => __( 'p', 'press-elements' ),
|
91 |
+
'div' => __( 'div', 'press-elements' ),
|
92 |
+
'span' => __( 'span', 'press-elements' ),
|
93 |
+
],
|
94 |
+
'default' => 'p',
|
95 |
+
]
|
96 |
+
);
|
97 |
+
|
98 |
+
$this->add_responsive_control(
|
99 |
+
'align',
|
100 |
+
[
|
101 |
+
'label' => __( 'Alignment', 'press-elements' ),
|
102 |
+
'type' => Controls_Manager::CHOOSE,
|
103 |
+
'options' => [
|
104 |
+
'left' => [
|
105 |
+
'title' => __( 'Left', 'press-elements' ),
|
106 |
+
'icon' => 'fa fa-align-left',
|
107 |
+
],
|
108 |
+
'center' => [
|
109 |
+
'title' => __( 'Center', 'press-elements' ),
|
110 |
+
'icon' => 'fa fa-align-center',
|
111 |
+
],
|
112 |
+
'right' => [
|
113 |
+
'title' => __( 'Right', 'press-elements' ),
|
114 |
+
'icon' => 'fa fa-align-right',
|
115 |
+
],
|
116 |
+
'justify' => [
|
117 |
+
'title' => __( 'Justified', 'press-elements' ),
|
118 |
+
'icon' => 'fa fa-align-justify',
|
119 |
+
],
|
120 |
+
],
|
121 |
+
'default' => '',
|
122 |
+
'selectors' => [
|
123 |
+
'{{WRAPPER}}' => 'text-align: {{VALUE}};',
|
124 |
+
],
|
125 |
+
]
|
126 |
+
);
|
127 |
+
|
128 |
+
$this->add_control(
|
129 |
+
'link_to',
|
130 |
+
[
|
131 |
+
'label' => __( 'Link to', 'press-elements' ),
|
132 |
+
'type' => Controls_Manager::SELECT,
|
133 |
+
'default' => 'none',
|
134 |
+
'options' => [
|
135 |
+
'none' => __( 'None', 'press-elements' ),
|
136 |
+
'home' => __( 'Home URL', 'press-elements' ),
|
137 |
+
'post' => sprintf(
|
138 |
+
/* translators: %s: Post type singular name (e.g. Post or Page) */
|
139 |
+
__( '%s URL', 'press-elements' ),
|
140 |
+
$post_type_object->labels->singular_name
|
141 |
+
),
|
142 |
+
'custom' => __( 'Custom URL', 'press-elements' ),
|
143 |
+
],
|
144 |
+
]
|
145 |
+
);
|
146 |
+
|
147 |
+
$this->add_control(
|
148 |
+
'link',
|
149 |
+
[
|
150 |
+
'label' => __( 'Link', 'press-elements' ),
|
151 |
+
'type' => Controls_Manager::URL,
|
152 |
+
'placeholder' => __( 'http://your-link.com', 'press-elements' ),
|
153 |
+
'condition' => [
|
154 |
+
'link_to' => 'custom',
|
155 |
+
],
|
156 |
+
'default' => [
|
157 |
+
'url' => '',
|
158 |
+
],
|
159 |
+
'show_label' => false,
|
160 |
+
]
|
161 |
+
);
|
162 |
+
|
163 |
+
$this->end_controls_section();
|
164 |
+
|
165 |
+
$this->start_controls_section(
|
166 |
+
'section_style',
|
167 |
+
[
|
168 |
+
'label' => sprintf(
|
169 |
+
/* translators: %s: Post type singular name (e.g. Post or Page) */
|
170 |
+
__( '%s Date', 'press-elements' ),
|
171 |
+
$post_type_object->labels->singular_name
|
172 |
+
),
|
173 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
174 |
+
]
|
175 |
+
);
|
176 |
+
|
177 |
+
$this->add_control(
|
178 |
+
'color',
|
179 |
+
[
|
180 |
+
'label' => __( 'Text Color', 'press-elements' ),
|
181 |
+
'type' => Controls_Manager::COLOR,
|
182 |
+
'scheme' => [
|
183 |
+
'type' => Scheme_Color::get_type(),
|
184 |
+
'value' => Scheme_Color::COLOR_1,
|
185 |
+
],
|
186 |
+
'selectors' => [
|
187 |
+
'{{WRAPPER}} .press-elements-date' => 'color: {{VALUE}};',
|
188 |
+
'{{WRAPPER}} .press-elements-date a' => 'color: {{VALUE}};',
|
189 |
+
],
|
190 |
+
]
|
191 |
+
);
|
192 |
+
|
193 |
+
$this->add_group_control(
|
194 |
+
Group_Control_Typography::get_type(),
|
195 |
+
[
|
196 |
+
'name' => 'typography',
|
197 |
+
'scheme' => Scheme_Typography::TYPOGRAPHY_1,
|
198 |
+
'selector' => '{{WRAPPER}} .press-elements-date',
|
199 |
+
]
|
200 |
+
);
|
201 |
+
|
202 |
+
$this->add_control(
|
203 |
+
'hover_animation',
|
204 |
+
[
|
205 |
+
'label' => __( 'Hover Animation', 'press-elements' ),
|
206 |
+
'type' => Controls_Manager::HOVER_ANIMATION,
|
207 |
+
]
|
208 |
+
);
|
209 |
+
|
210 |
+
$this->end_controls_section();
|
211 |
+
|
212 |
+
}
|
213 |
+
|
214 |
+
protected function render() {
|
215 |
+
|
216 |
+
$settings = $this->get_settings();
|
217 |
+
|
218 |
+
// Backwards compitability check
|
219 |
+
if ( $settings['date_type'] )
|
220 |
+
$date_type = $settings['date_type'];
|
221 |
+
else
|
222 |
+
$date_type = 'publish';
|
223 |
+
|
224 |
+
switch ( $date_type ) {
|
225 |
+
case 'modified' :
|
226 |
+
$date = get_the_modified_date();
|
227 |
+
break;
|
228 |
+
|
229 |
+
case 'publish' :
|
230 |
+
default:
|
231 |
+
$date = get_the_date();
|
232 |
+
break;
|
233 |
+
}
|
234 |
+
|
235 |
+
if ( empty( $date ) )
|
236 |
+
return;
|
237 |
+
|
238 |
+
switch ( $settings['link_to'] ) {
|
239 |
+
case 'custom' :
|
240 |
+
if ( ! empty( $settings['link']['url'] ) ) {
|
241 |
+
$link = esc_url( $settings['link']['url'] );
|
242 |
+
} else {
|
243 |
+
$link = false;
|
244 |
+
}
|
245 |
+
break;
|
246 |
+
|
247 |
+
case 'post' :
|
248 |
+
$link = esc_url( get_the_permalink() );
|
249 |
+
break;
|
250 |
+
|
251 |
+
case 'home' :
|
252 |
+
$link = esc_url( get_home_url() );
|
253 |
+
break;
|
254 |
+
|
255 |
+
case 'none' :
|
256 |
+
default:
|
257 |
+
$link = false;
|
258 |
+
break;
|
259 |
+
}
|
260 |
+
$target = $settings['link']['is_external'] ? 'target="_blank"' : '';
|
261 |
+
|
262 |
+
$animation_class = ! empty( $settings['hover_animation'] ) ? 'elementor-animation-' . $settings['hover_animation'] : '';
|
263 |
+
|
264 |
+
$html = sprintf( '<%1$s class="press-elements-date %2$s">', $settings['html_tag'], $animation_class );
|
265 |
+
if ( $link ) {
|
266 |
+
$html .= sprintf( '<a href="%1$s" %2$s>%3$s</a>', $link, $target, $date );
|
267 |
+
} else {
|
268 |
+
$html .= $date;
|
269 |
+
}
|
270 |
+
$html .= sprintf( '</%s>', $settings['html_tag'] );
|
271 |
+
|
272 |
+
echo $html;
|
273 |
+
}
|
274 |
+
|
275 |
+
protected function _content_template() {
|
276 |
+
?>
|
277 |
+
<#
|
278 |
+
// Backwards compitability check
|
279 |
+
var datetype;
|
280 |
+
if (settings.date_type) {
|
281 |
+
datetype = settings.date_type;
|
282 |
+
} else {
|
283 |
+
datetype = "publish";
|
284 |
+
}
|
285 |
+
|
286 |
+
var data_fields = [];
|
287 |
+
data_fields[ "modified" ] = "<?php echo get_the_modified_date(); ?>";
|
288 |
+
data_fields[ "publish" ] = "<?php echo get_the_date(); ?>";
|
289 |
+
|
290 |
+
var date = data_fields[ datetype ];
|
291 |
+
|
292 |
+
var link_url;
|
293 |
+
switch( settings.link_to ) {
|
294 |
+
case 'custom':
|
295 |
+
link_url = settings.link.url;
|
296 |
+
break;
|
297 |
+
case 'post':
|
298 |
+
link_url = '<?php echo esc_url( get_the_permalink() ); ?>';
|
299 |
+
break;
|
300 |
+
case 'home':
|
301 |
+
link_url = '<?php echo esc_url( get_home_url() ); ?>';
|
302 |
+
break;
|
303 |
+
case 'none':
|
304 |
+
default:
|
305 |
+
link_url = false;
|
306 |
+
}
|
307 |
+
var target = settings.link.is_external ? 'target="_blank"' : '';
|
308 |
+
|
309 |
+
var animation_class = '';
|
310 |
+
if ( '' !== settings.hover_animation ) {
|
311 |
+
animation_class = 'elementor-animation-' + settings.hover_animation;
|
312 |
+
}
|
313 |
+
|
314 |
+
var html = '<' + settings.html_tag + ' class="press-elements-date ' + animation_class + '">';
|
315 |
+
if ( link_url ) {
|
316 |
+
html += '<a href="' + link_url + '" ' + target + '>' + date + '</a>';
|
317 |
+
} else {
|
318 |
+
html += date;
|
319 |
+
}
|
320 |
+
html += '</' + settings.html_tag + '>';
|
321 |
+
|
322 |
+
print( html );
|
323 |
+
#>
|
324 |
+
<?php
|
325 |
+
}
|
326 |
+
}
|
widgets/post-featured-image.php
CHANGED
@@ -1,374 +1,374 @@
|
|
1 |
-
<?php
|
2 |
-
namespace PressElements\Widgets;
|
3 |
-
|
4 |
-
use Elementor\Widget_Base;
|
5 |
-
use Elementor\Controls_Manager;
|
6 |
-
use Elementor\Group_Control_Image_Size;
|
7 |
-
use Elementor\Group_Control_Border;
|
8 |
-
use Elementor\Group_Control_Box_Shadow;
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
// Exit if accessed directly
|
13 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
14 |
-
exit;
|
15 |
-
}
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Press Elements Post Featured Image
|
21 |
-
*
|
22 |
-
* Single post/page featured image element for elementor.
|
23 |
-
*
|
24 |
-
* @since 1.0.0
|
25 |
-
* @since 1.6.0 Not longer a Pro widget
|
26 |
-
*/
|
27 |
-
class Press_Elements_Post_Featured_Image extends Widget_Base {
|
28 |
-
|
29 |
-
public function get_name() {
|
30 |
-
return 'post-featured-image';
|
31 |
-
}
|
32 |
-
|
33 |
-
public function get_title() {
|
34 |
-
$post_type_object = get_post_type_object( get_post_type() );
|
35 |
-
|
36 |
-
return sprintf(
|
37 |
-
/* translators: %s: Post type singular name (e.g. Post or Page) */
|
38 |
-
__( '%s Featured Image', 'press-elements' ),
|
39 |
-
$post_type_object->labels->singular_name
|
40 |
-
);
|
41 |
-
}
|
42 |
-
|
43 |
-
public function get_icon() {
|
44 |
-
return 'fa fa-picture-o';
|
45 |
-
}
|
46 |
-
|
47 |
-
public function get_categories() {
|
48 |
-
return [ 'press-elements-post-elements' ];
|
49 |
-
}
|
50 |
-
|
51 |
-
protected function _register_controls() {
|
52 |
-
|
53 |
-
$post_type_object = get_post_type_object( get_post_type() );
|
54 |
-
|
55 |
-
$this->start_controls_section(
|
56 |
-
'section_content',
|
57 |
-
[
|
58 |
-
'label' => sprintf(
|
59 |
-
/* translators: %s: Post type singular name (e.g. Post or Page) */
|
60 |
-
__( '%s Featured Image', 'press-elements' ),
|
61 |
-
$post_type_object->labels->singular_name
|
62 |
-
),
|
63 |
-
]
|
64 |
-
);
|
65 |
-
|
66 |
-
$this->add_control(
|
67 |
-
'preview',
|
68 |
-
[
|
69 |
-
'type' => Controls_Manager::RAW_HTML,
|
70 |
-
'raw' => get_the_post_thumbnail(),
|
71 |
-
'separator' => 'none',
|
72 |
-
]
|
73 |
-
);
|
74 |
-
|
75 |
-
$this->add_group_control(
|
76 |
-
Group_Control_Image_Size::get_type(),
|
77 |
-
[
|
78 |
-
'name' => 'size',
|
79 |
-
'label' => __( 'Image Size', 'press-elements' ),
|
80 |
-
'default' => 'large',
|
81 |
-
]
|
82 |
-
);
|
83 |
-
|
84 |
-
$this->add_responsive_control(
|
85 |
-
'align',
|
86 |
-
[
|
87 |
-
'label' => __( 'Alignment', 'press-elements' ),
|
88 |
-
'type' => Controls_Manager::CHOOSE,
|
89 |
-
'options' => [
|
90 |
-
'left' => [
|
91 |
-
'title' => __( 'Left', 'press-elements' ),
|
92 |
-
'icon' => 'fa fa-align-left',
|
93 |
-
],
|
94 |
-
'center' => [
|
95 |
-
'title' => __( 'Center', 'press-elements' ),
|
96 |
-
'icon' => 'fa fa-align-center',
|
97 |
-
],
|
98 |
-
'right' => [
|
99 |
-
'title' => __( 'Right', 'press-elements' ),
|
100 |
-
'icon' => 'fa fa-align-right',
|
101 |
-
],
|
102 |
-
'justify' => [
|
103 |
-
'title' => __( 'Justified', 'press-elements' ),
|
104 |
-
'icon' => 'fa fa-align-justify',
|
105 |
-
],
|
106 |
-
],
|
107 |
-
'default' => '',
|
108 |
-
'selectors' => [
|
109 |
-
'{{WRAPPER}}' => 'text-align: {{VALUE}};',
|
110 |
-
],
|
111 |
-
]
|
112 |
-
);
|
113 |
-
|
114 |
-
$this->add_control(
|
115 |
-
'link_to',
|
116 |
-
[
|
117 |
-
'label' => __( 'Link to', 'press-elements' ),
|
118 |
-
'type' => Controls_Manager::SELECT,
|
119 |
-
'default' => 'none',
|
120 |
-
'options' => [
|
121 |
-
'none' => __( 'None', 'press-elements' ),
|
122 |
-
'home' => __( 'Home URL', 'press-elements' ),
|
123 |
-
'post' => sprintf(
|
124 |
-
/* translators: %s: Post type singular name (e.g. Post or Page) */
|
125 |
-
__( '%s URL', 'press-elements' ),
|
126 |
-
$post_type_object->labels->singular_name
|
127 |
-
),
|
128 |
-
'file' => __( 'Media File URL', 'press-elements' ),
|
129 |
-
'custom' => __( 'Custom URL', 'press-elements' ),
|
130 |
-
],
|
131 |
-
]
|
132 |
-
);
|
133 |
-
|
134 |
-
$this->add_control(
|
135 |
-
'link',
|
136 |
-
[
|
137 |
-
'label' => __( 'Link to', 'press-elements' ),
|
138 |
-
'type' => Controls_Manager::URL,
|
139 |
-
'placeholder' => __( 'http://your-link.com', 'press-elements' ),
|
140 |
-
'condition' => [
|
141 |
-
'link_to' => 'custom',
|
142 |
-
],
|
143 |
-
'show_label' => false,
|
144 |
-
]
|
145 |
-
);
|
146 |
-
|
147 |
-
$this->end_controls_section();
|
148 |
-
|
149 |
-
$this->start_controls_section(
|
150 |
-
'section_style',
|
151 |
-
[
|
152 |
-
'label' => sprintf(
|
153 |
-
/* translators: %s: Post type singular name (e.g. Post or Page) */
|
154 |
-
__( '%s Featured Image', 'press-elements' ),
|
155 |
-
$post_type_object->labels->singular_name
|
156 |
-
),
|
157 |
-
'tab' => Controls_Manager::TAB_STYLE,
|
158 |
-
]
|
159 |
-
);
|
160 |
-
|
161 |
-
$this->add_responsive_control(
|
162 |
-
'space',
|
163 |
-
[
|
164 |
-
'label' => __( 'Size (%)', 'press-elements' ),
|
165 |
-
'type' => Controls_Manager::SLIDER,
|
166 |
-
'default' => [
|
167 |
-
'size' => 100,
|
168 |
-
'unit' => '%',
|
169 |
-
],
|
170 |
-
'size_units' => [ '%' ],
|
171 |
-
'range' => [
|
172 |
-
'%' => [
|
173 |
-
'min' => 1,
|
174 |
-
'max' => 100,
|
175 |
-
],
|
176 |
-
],
|
177 |
-
'selectors' => [
|
178 |
-
'{{WRAPPER}} .press-elements-featured-image img' => 'max-width: {{SIZE}}{{UNIT}};',
|
179 |
-
],
|
180 |
-
]
|
181 |
-
);
|
182 |
-
|
183 |
-
$this->add_responsive_control(
|
184 |
-
'opacity',
|
185 |
-
[
|
186 |
-
'label' => __( 'Opacity (%)', 'press-elements' ),
|
187 |
-
'type' => Controls_Manager::SLIDER,
|
188 |
-
'default' => [
|
189 |
-
'size' => 1,
|
190 |
-
],
|
191 |
-
'range' => [
|
192 |
-
'px' => [
|
193 |
-
'max' => 1,
|
194 |
-
'min' => 0.10,
|
195 |
-
'step' => 0.01,
|
196 |
-
],
|
197 |
-
],
|
198 |
-
'selectors' => [
|
199 |
-
'{{WRAPPER}} .press-elements-featured-image img' => 'opacity: {{SIZE}};',
|
200 |
-
],
|
201 |
-
]
|
202 |
-
);
|
203 |
-
|
204 |
-
$this->add_control(
|
205 |
-
'angle',
|
206 |
-
[
|
207 |
-
'label' => __( 'Angle (deg)', 'press-elements' ),
|
208 |
-
'type' => Controls_Manager::SLIDER,
|
209 |
-
'size_units' => [ 'deg' ],
|
210 |
-
'default' => [
|
211 |
-
'unit' => 'deg',
|
212 |
-
'size' => 0,
|
213 |
-
],
|
214 |
-
'range' => [
|
215 |
-
'deg' => [
|
216 |
-
'max' => 360,
|
217 |
-
'min' => -360,
|
218 |
-
'step' => 1,
|
219 |
-
],
|
220 |
-
],
|
221 |
-
'selectors' => [
|
222 |
-
'{{WRAPPER}} .press-elements-featured-image img' => '-webkit-transform: rotate({{SIZE}}deg); -moz-transform: rotate({{SIZE}}deg); -ms-transform: rotate({{SIZE}}deg); -o-transform: rotate({{SIZE}}deg); transform: rotate({{SIZE}}deg);',
|
223 |
-
],
|
224 |
-
]
|
225 |
-
);
|
226 |
-
|
227 |
-
$this->add_control(
|
228 |
-
'hover_animation',
|
229 |
-
[
|
230 |
-
'label' => __( 'Hover Animation', 'press-elements' ),
|
231 |
-
'type' => Controls_Manager::HOVER_ANIMATION,
|
232 |
-
]
|
233 |
-
);
|
234 |
-
|
235 |
-
$this->add_group_control(
|
236 |
-
Group_Control_Border::get_type(),
|
237 |
-
[
|
238 |
-
'name' => 'image_border',
|
239 |
-
'label' => __( 'Image Border', 'press-elements' ),
|
240 |
-
'selector' => '{{WRAPPER}} .press-elements-featured-image img',
|
241 |
-
]
|
242 |
-
);
|
243 |
-
|
244 |
-
$this->add_control(
|
245 |
-
'image_border_radius',
|
246 |
-
[
|
247 |
-
'label' => __( 'Border Radius', 'press-elements' ),
|
248 |
-
'type' => Controls_Manager::DIMENSIONS,
|
249 |
-
'size_units' => [ 'px', '%' ],
|
250 |
-
'selectors' => [
|
251 |
-
'{{WRAPPER}} .press-elements-featured-image img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
252 |
-
],
|
253 |
-
]
|
254 |
-
);
|
255 |
-
|
256 |
-
$this->add_group_control(
|
257 |
-
Group_Control_Box_Shadow::get_type(),
|
258 |
-
[
|
259 |
-
'name' => 'image_box_shadow',
|
260 |
-
'selector' => '{{WRAPPER}} .press-elements-featured-image img',
|
261 |
-
]
|
262 |
-
);
|
263 |
-
|
264 |
-
$this->end_controls_section();
|
265 |
-
|
266 |
-
}
|
267 |
-
|
268 |
-
protected function render() {
|
269 |
-
|
270 |
-
$settings = $this->get_settings();
|
271 |
-
|
272 |
-
$image_size = $settings['size_size'];
|
273 |
-
$featured_image = get_the_post_thumbnail( null, $image_size );
|
274 |
-
|
275 |
-
if ( empty( $featured_image ) )
|
276 |
-
return;
|
277 |
-
|
278 |
-
switch ( $settings['link_to'] ) {
|
279 |
-
case 'custom' :
|
280 |
-
if ( ! empty( $settings['link']['url'] ) ) {
|
281 |
-
$link = esc_url( $settings['link']['url'] );
|
282 |
-
} else {
|
283 |
-
$link = false;
|
284 |
-
}
|
285 |
-
break;
|
286 |
-
|
287 |
-
case 'file' :
|
288 |
-
$image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), $image_size );
|
289 |
-
$link = esc_url( $image_url[0] );
|
290 |
-
break;
|
291 |
-
|
292 |
-
case 'post' :
|
293 |
-
$link = esc_url( get_the_permalink() );
|
294 |
-
break;
|
295 |
-
|
296 |
-
case 'home' :
|
297 |
-
$link = esc_url( get_home_url() );
|
298 |
-
break;
|
299 |
-
|
300 |
-
case 'none' :
|
301 |
-
default:
|
302 |
-
$link = false;
|
303 |
-
break;
|
304 |
-
}
|
305 |
-
$target = $settings['link']['is_external'] ? 'target="_blank"' : '';
|
306 |
-
|
307 |
-
$animation_class = ! empty( $settings['hover_animation'] ) ? 'elementor-animation-' . $settings['hover_animation'] : '';
|
308 |
-
|
309 |
-
$html = '<div class="press-elements-featured-image ' . $animation_class . '">';
|
310 |
-
if ( $link ) {
|
311 |
-
$html .= sprintf( '<a href="%1$s" %2$s>%3$s</a>', $link, $target, $featured_image );
|
312 |
-
} else {
|
313 |
-
$html .= $featured_image;
|
314 |
-
}
|
315 |
-
$html .= '</div>';
|
316 |
-
|
317 |
-
echo $html;
|
318 |
-
|
319 |
-
}
|
320 |
-
|
321 |
-
protected function _content_template() {
|
322 |
-
|
323 |
-
$image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'large' );
|
324 |
-
?>
|
325 |
-
<#
|
326 |
-
var featured_images = [];
|
327 |
-
<?php
|
328 |
-
$all_image_sizes = Group_Control_Image_Size::get_all_image_sizes();
|
329 |
-
foreach ( $all_image_sizes as $key => $value ) {
|
330 |
-
printf( 'featured_images[ "%1$s" ] = \'%2$s\';', $key, get_the_post_thumbnail( null, $key ) );
|
331 |
-
}
|
332 |
-
printf( 'featured_images[ "full" ] = \'%2$s\';', $key, get_the_post_thumbnail( null, 'full' ) );
|
333 |
-
?>
|
334 |
-
var featured_image = featured_images[ settings.size_size ];
|
335 |
-
|
336 |
-
var link_url;
|
337 |
-
switch( settings.link_to ) {
|
338 |
-
case 'custom':
|
339 |
-
link_url = settings.link.url;
|
340 |
-
break;
|
341 |
-
case 'file':
|
342 |
-
link_url = '<?php echo esc_url( $image_url[0] ); ?>';
|
343 |
-
break;
|
344 |
-
case 'post':
|
345 |
-
link_url = '<?php echo esc_url( get_the_permalink() ); ?>';
|
346 |
-
break;
|
347 |
-
case 'home':
|
348 |
-
link_url = '<?php echo esc_url( get_home_url() ); ?>';
|
349 |
-
break;
|
350 |
-
case 'none':
|
351 |
-
default:
|
352 |
-
link_url = false;
|
353 |
-
}
|
354 |
-
|
355 |
-
var animation_class = '';
|
356 |
-
if ( '' !== settings.hover_animation ) {
|
357 |
-
animation_class = 'elementor-animation-' + settings.hover_animation;
|
358 |
-
}
|
359 |
-
|
360 |
-
var html = '<div class="press-elements-featured-image ' + animation_class + '">';
|
361 |
-
if ( link_url ) {
|
362 |
-
html += '<a href="' + link_url + '">' + featured_image + '</a>';
|
363 |
-
} else {
|
364 |
-
html += featured_image;
|
365 |
-
}
|
366 |
-
html += '</div>';
|
367 |
-
|
368 |
-
print( html );
|
369 |
-
#>
|
370 |
-
<?php
|
371 |
-
|
372 |
-
}
|
373 |
-
|
374 |
-
}
|
1 |
+
<?php
|
2 |
+
namespace PressElements\Widgets;
|
3 |
+
|
4 |
+
use Elementor\Widget_Base;
|
5 |
+
use Elementor\Controls_Manager;
|
6 |
+
use Elementor\Group_Control_Image_Size;
|
7 |
+
use Elementor\Group_Control_Border;
|
8 |
+
use Elementor\Group_Control_Box_Shadow;
|
9 |
+
|
10 |
+
|
11 |
+
|
12 |
+
// Exit if accessed directly
|
13 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
14 |
+
exit;
|
15 |
+
}
|
16 |
+
|
17 |
+
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Press Elements Post Featured Image
|
21 |
+
*
|
22 |
+
* Single post/page featured image element for elementor.
|
23 |
+
*
|
24 |
+
* @since 1.0.0
|
25 |
+
* @since 1.6.0 Not longer a Pro widget
|
26 |
+
*/
|
27 |
+
class Press_Elements_Post_Featured_Image extends Widget_Base {
|
28 |
+
|
29 |
+
public function get_name() {
|
30 |
+
return 'post-featured-image';
|
31 |
+
}
|
32 |
+
|
33 |
+
public function get_title() {
|
34 |
+
$post_type_object = get_post_type_object( get_post_type() );
|
35 |
+
|
36 |
+
return sprintf(
|
37 |
+
/* translators: %s: Post type singular name (e.g. Post or Page) */
|
38 |
+
__( '%s Featured Image', 'press-elements' ),
|
39 |
+
$post_type_object->labels->singular_name
|
40 |
+
);
|
41 |
+
}
|
42 |
+
|
43 |
+
public function get_icon() {
|
44 |
+
return 'fa fa-picture-o';
|
45 |
+
}
|
46 |
+
|
47 |
+
public function get_categories() {
|
48 |
+
return [ 'press-elements-post-elements' ];
|
49 |
+
}
|
50 |
+
|
51 |
+
protected function _register_controls() {
|
52 |
+
|
53 |
+
$post_type_object = get_post_type_object( get_post_type() );
|
54 |
+
|
55 |
+
$this->start_controls_section(
|
56 |
+
'section_content',
|
57 |
+
[
|
58 |
+
'label' => sprintf(
|
59 |
+
/* translators: %s: Post type singular name (e.g. Post or Page) */
|
60 |
+
__( '%s Featured Image', 'press-elements' ),
|
61 |
+
$post_type_object->labels->singular_name
|
62 |
+
),
|
63 |
+
]
|
64 |
+
);
|
65 |
+
|
66 |
+
$this->add_control(
|
67 |
+
'preview',
|
68 |
+
[
|
69 |
+
'type' => Controls_Manager::RAW_HTML,
|
70 |
+
'raw' => get_the_post_thumbnail(),
|
71 |
+
'separator' => 'none',
|
72 |
+
]
|
73 |
+
);
|
74 |
+
|
75 |
+
$this->add_group_control(
|
76 |
+
Group_Control_Image_Size::get_type(),
|
77 |
+
[
|
78 |
+
'name' => 'size',
|
79 |
+
'label' => __( 'Image Size', 'press-elements' ),
|
80 |
+
'default' => 'large',
|
81 |
+
]
|
82 |
+
);
|
83 |
+
|
84 |
+
$this->add_responsive_control(
|
85 |
+
'align',
|
86 |
+
[
|
87 |
+
'label' => __( 'Alignment', 'press-elements' ),
|
88 |
+
'type' => Controls_Manager::CHOOSE,
|
89 |
+
'options' => [
|
90 |
+
'left' => [
|
91 |
+
'title' => __( 'Left', 'press-elements' ),
|
92 |
+
'icon' => 'fa fa-align-left',
|
93 |
+
],
|
94 |
+
'center' => [
|
95 |
+
'title' => __( 'Center', 'press-elements' ),
|
96 |
+
'icon' => 'fa fa-align-center',
|
97 |
+
],
|
98 |
+
'right' => [
|
99 |
+
'title' => __( 'Right', 'press-elements' ),
|
100 |
+
'icon' => 'fa fa-align-right',
|
101 |
+
],
|
102 |
+
'justify' => [
|
103 |
+
'title' => __( 'Justified', 'press-elements' ),
|
104 |
+
'icon' => 'fa fa-align-justify',
|
105 |
+
],
|
106 |
+
],
|
107 |
+
'default' => '',
|
108 |
+
'selectors' => [
|
109 |
+
'{{WRAPPER}}' => 'text-align: {{VALUE}};',
|
110 |
+
],
|
111 |
+
]
|
112 |
+
);
|
113 |
+
|
114 |
+
$this->add_control(
|
115 |
+
'link_to',
|
116 |
+
[
|
117 |
+
'label' => __( 'Link to', 'press-elements' ),
|
118 |
+
'type' => Controls_Manager::SELECT,
|
119 |
+
'default' => 'none',
|
120 |
+
'options' => [
|
121 |
+
'none' => __( 'None', 'press-elements' ),
|
122 |
+
'home' => __( 'Home URL', 'press-elements' ),
|
123 |
+
'post' => sprintf(
|
124 |
+
/* translators: %s: Post type singular name (e.g. Post or Page) */
|
125 |
+
__( '%s URL', 'press-elements' ),
|
126 |
+
$post_type_object->labels->singular_name
|
127 |
+
),
|
128 |
+
'file' => __( 'Media File URL', 'press-elements' ),
|
129 |
+
'custom' => __( 'Custom URL', 'press-elements' ),
|
130 |
+
],
|
131 |
+
]
|
132 |
+
);
|
133 |
+
|
134 |
+
$this->add_control(
|
135 |
+
'link',
|
136 |
+
[
|
137 |
+
'label' => __( 'Link to', 'press-elements' ),
|
138 |
+
'type' => Controls_Manager::URL,
|
139 |
+
'placeholder' => __( 'http://your-link.com', 'press-elements' ),
|
140 |
+
'condition' => [
|
141 |
+
'link_to' => 'custom',
|
142 |
+
],
|
143 |
+
'show_label' => false,
|
144 |
+
]
|
145 |
+
);
|
146 |
+
|
147 |
+
$this->end_controls_section();
|
148 |
+
|
149 |
+
$this->start_controls_section(
|
150 |
+
'section_style',
|
151 |
+
[
|
152 |
+
'label' => sprintf(
|
153 |
+
/* translators: %s: Post type singular name (e.g. Post or Page) */
|
154 |
+
__( '%s Featured Image', 'press-elements' ),
|
155 |
+
$post_type_object->labels->singular_name
|
156 |
+
),
|
157 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
158 |
+
]
|
159 |
+
);
|
160 |
+
|
161 |
+
$this->add_responsive_control(
|
162 |
+
'space',
|
163 |
+
[
|
164 |
+
'label' => __( 'Size (%)', 'press-elements' ),
|
165 |
+
'type' => Controls_Manager::SLIDER,
|
166 |
+
'default' => [
|
167 |
+
'size' => 100,
|
168 |
+
'unit' => '%',
|
169 |
+
],
|
170 |
+
'size_units' => [ '%' ],
|
171 |
+
'range' => [
|
172 |
+
'%' => [
|
173 |
+
'min' => 1,
|
174 |
+
'max' => 100,
|
175 |
+
],
|
176 |
+
],
|
177 |
+
'selectors' => [
|
178 |
+
'{{WRAPPER}} .press-elements-featured-image img' => 'max-width: {{SIZE}}{{UNIT}};',
|
179 |
+
],
|
180 |
+
]
|
181 |
+
);
|
182 |
+
|
183 |
+
$this->add_responsive_control(
|
184 |
+
'opacity',
|
185 |
+
[
|
186 |
+
'label' => __( 'Opacity (%)', 'press-elements' ),
|
187 |
+
'type' => Controls_Manager::SLIDER,
|
188 |
+
'default' => [
|
189 |
+
'size' => 1,
|
190 |
+
],
|
191 |
+
'range' => [
|
192 |
+
'px' => [
|
193 |
+
'max' => 1,
|
194 |
+
'min' => 0.10,
|
195 |
+
'step' => 0.01,
|
196 |
+
],
|
197 |
+
],
|
198 |
+
'selectors' => [
|
199 |
+
'{{WRAPPER}} .press-elements-featured-image img' => 'opacity: {{SIZE}};',
|
200 |
+
],
|
201 |
+
]
|
202 |
+
);
|
203 |
+
|
204 |
+
$this->add_control(
|
205 |
+
'angle',
|
206 |
+
[
|
207 |
+
'label' => __( 'Angle (deg)', 'press-elements' ),
|
208 |
+
'type' => Controls_Manager::SLIDER,
|
209 |
+
'size_units' => [ 'deg' ],
|
210 |
+
'default' => [
|
211 |
+
'unit' => 'deg',
|
212 |
+
'size' => 0,
|
213 |
+
],
|
214 |
+
'range' => [
|
215 |
+
'deg' => [
|
216 |
+
'max' => 360,
|
217 |
+
'min' => -360,
|
218 |
+
'step' => 1,
|
219 |
+
],
|
220 |
+
],
|
221 |
+
'selectors' => [
|
222 |
+
'{{WRAPPER}} .press-elements-featured-image img' => '-webkit-transform: rotate({{SIZE}}deg); -moz-transform: rotate({{SIZE}}deg); -ms-transform: rotate({{SIZE}}deg); -o-transform: rotate({{SIZE}}deg); transform: rotate({{SIZE}}deg);',
|
223 |
+
],
|
224 |
+
]
|
225 |
+
);
|
226 |
+
|
227 |
+
$this->add_control(
|
228 |
+
'hover_animation',
|
229 |
+
[
|
230 |
+
'label' => __( 'Hover Animation', 'press-elements' ),
|
231 |
+
'type' => Controls_Manager::HOVER_ANIMATION,
|
232 |
+
]
|
233 |
+
);
|
234 |
+
|
235 |
+
$this->add_group_control(
|
236 |
+
Group_Control_Border::get_type(),
|
237 |
+
[
|
238 |
+
'name' => 'image_border',
|
239 |
+
'label' => __( 'Image Border', 'press-elements' ),
|
240 |
+
'selector' => '{{WRAPPER}} .press-elements-featured-image img',
|
241 |
+
]
|
242 |
+
);
|
243 |
+
|
244 |
+
$this->add_control(
|
245 |
+
'image_border_radius',
|
246 |
+
[
|
247 |
+
'label' => __( 'Border Radius', 'press-elements' ),
|
248 |
+
'type' => Controls_Manager::DIMENSIONS,
|
249 |
+
'size_units' => [ 'px', '%' ],
|
250 |
+
'selectors' => [
|
251 |
+
'{{WRAPPER}} .press-elements-featured-image img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
252 |
+
],
|
253 |
+
]
|
254 |
+
);
|
255 |
+
|
256 |
+
$this->add_group_control(
|
257 |
+
Group_Control_Box_Shadow::get_type(),
|
258 |
+
[
|
259 |
+
'name' => 'image_box_shadow',
|
260 |
+
'selector' => '{{WRAPPER}} .press-elements-featured-image img',
|
261 |
+
]
|
262 |
+
);
|
263 |
+
|
264 |
+
$this->end_controls_section();
|
265 |
+
|
266 |
+
}
|
267 |
+
|
268 |
+
protected function render() {
|
269 |
+
|
270 |
+
$settings = $this->get_settings();
|
271 |
+
|
272 |
+
$image_size = $settings['size_size'];
|
273 |
+
$featured_image = get_the_post_thumbnail( null, $image_size );
|
274 |
+
|
275 |
+
if ( empty( $featured_image ) )
|
276 |
+
return;
|
277 |
+
|
278 |
+
switch ( $settings['link_to'] ) {
|
279 |
+
case 'custom' :
|
280 |
+
if ( ! empty( $settings['link']['url'] ) ) {
|
281 |
+
$link = esc_url( $settings['link']['url'] );
|
282 |
+
} else {
|
283 |
+
$link = false;
|
284 |
+
}
|
285 |
+
break;
|
286 |
+
|
287 |
+
case 'file' :
|
288 |
+
$image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), $image_size );
|
289 |
+
$link = esc_url( $image_url[0] );
|
290 |
+
break;
|
291 |
+
|
292 |
+
case 'post' :
|
293 |
+
$link = esc_url( get_the_permalink() );
|
294 |
+
break;
|
295 |
+
|
296 |
+
case 'home' :
|
297 |
+
$link = esc_url( get_home_url() );
|
298 |
+
break;
|
299 |
+
|
300 |
+
case 'none' :
|
301 |
+
default:
|
302 |
+
$link = false;
|
303 |
+
break;
|
304 |
+
}
|
305 |
+
$target = $settings['link']['is_external'] ? 'target="_blank"' : '';
|
306 |
+
|
307 |
+
$animation_class = ! empty( $settings['hover_animation'] ) ? 'elementor-animation-' . $settings['hover_animation'] : '';
|
308 |
+
|
309 |
+
$html = '<div class="press-elements-featured-image ' . $animation_class . '">';
|
310 |
+
if ( $link ) {
|
311 |
+
$html .= sprintf( '<a href="%1$s" %2$s>%3$s</a>', $link, $target, $featured_image );
|
312 |
+
} else {
|
313 |
+
$html .= $featured_image;
|
314 |
+
}
|
315 |
+
$html .= '</div>';
|
316 |
+
|
317 |
+
echo $html;
|
318 |
+
|
319 |
+
}
|
320 |
+
|
321 |
+
protected function _content_template() {
|
322 |
+
|
323 |
+
$image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'large' );
|
324 |
+
?>
|
325 |
+
<#
|
326 |
+
var featured_images = [];
|
327 |
+
<?php
|
328 |
+
$all_image_sizes = Group_Control_Image_Size::get_all_image_sizes();
|
329 |
+
foreach ( $all_image_sizes as $key => $value ) {
|
330 |
+
printf( 'featured_images[ "%1$s" ] = \'%2$s\';', $key, get_the_post_thumbnail( null, $key ) );
|
331 |
+
}
|
332 |
+
printf( 'featured_images[ "full" ] = \'%2$s\';', $key, get_the_post_thumbnail( null, 'full' ) );
|
333 |
+
?>
|
334 |
+
var featured_image = featured_images[ settings.size_size ];
|
335 |
+
|
336 |
+
var link_url;
|
337 |
+
switch( settings.link_to ) {
|
338 |
+
case 'custom':
|
339 |
+
link_url = settings.link.url;
|
340 |
+
break;
|
341 |
+
case 'file':
|
342 |
+
link_url = '<?php echo esc_url( $image_url[0] ); ?>';
|
343 |
+
break;
|
344 |
+
case 'post':
|
345 |
+
link_url = '<?php echo esc_url( get_the_permalink() ); ?>';
|
346 |
+
break;
|
347 |
+
case 'home':
|
348 |
+
link_url = '<?php echo esc_url( get_home_url() ); ?>';
|
349 |
+
break;
|
350 |
+
case 'none':
|
351 |
+
default:
|
352 |
+
link_url = false;
|
353 |
+
}
|
354 |
+
|
355 |
+
var animation_class = '';
|
356 |
+
if ( '' !== settings.hover_animation ) {
|
357 |
+
animation_class = 'elementor-animation-' + settings.hover_animation;
|
358 |
+
}
|
359 |
+
|
360 |
+
var html = '<div class="press-elements-featured-image ' + animation_class + '">';
|
361 |
+
if ( link_url ) {
|
362 |
+
html += '<a href="' + link_url + '">' + featured_image + '</a>';
|
363 |
+
} else {
|
364 |
+
html += featured_image;
|
365 |
+
}
|
366 |
+
html += '</div>';
|
367 |
+
|
368 |
+
print( html );
|
369 |
+
#>
|
370 |
+
<?php
|
371 |
+
|
372 |
+
}
|
373 |
+
|
374 |
+
}
|
widgets/post-terms.php
CHANGED
@@ -1,282 +1,282 @@
|
|
1 |
-
<?php
|
2 |
-
namespace PressElements\Widgets;
|
3 |
-
|
4 |
-
use Elementor\Widget_Base;
|
5 |
-
use Elementor\Controls_Manager;
|
6 |
-
use Elementor\Scheme_Color;
|
7 |
-
use Elementor\Scheme_Typography;
|
8 |
-
use Elementor\Group_Control_Typography;
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
// Exit if accessed directly
|
13 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
14 |
-
exit;
|
15 |
-
}
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Press Elements Post Terms
|
21 |
-
*
|
22 |
-
* Single post/page terms element for elementor.
|
23 |
-
*
|
24 |
-
* @since 1.1.0
|
25 |
-
*/
|
26 |
-
class Press_Elements_Post_Terms extends Widget_Base {
|
27 |
-
|
28 |
-
public function get_name() {
|
29 |
-
return 'post-terms';
|
30 |
-
}
|
31 |
-
|
32 |
-
public function get_title() {
|
33 |
-
$post_type_object = get_post_type_object( get_post_type() );
|
34 |
-
|
35 |
-
return sprintf(
|
36 |
-
/* translators: %s: Post type singular name (e.g. Post or Page) */
|
37 |
-
__( '%s Terms', 'press-elements' ),
|
38 |
-
$post_type_object->labels->singular_name
|
39 |
-
);
|
40 |
-
}
|
41 |
-
|
42 |
-
public function get_icon() {
|
43 |
-
return 'fa fa-sitemap';
|
44 |
-
}
|
45 |
-
|
46 |
-
public function get_categories() {
|
47 |
-
return [ 'press-elements-post-elements' ];
|
48 |
-
}
|
49 |
-
|
50 |
-
protected function _register_controls() {
|
51 |
-
|
52 |
-
$post_type_object = get_post_type_object( get_post_type() );
|
53 |
-
|
54 |
-
$this->start_controls_section(
|
55 |
-
'section_content',
|
56 |
-
[
|
57 |
-
'label' => sprintf(
|
58 |
-
/* translators: %s: Post type singular name (e.g. Post or Page) */
|
59 |
-
__( '%s Terms', 'press-elements' ),
|
60 |
-
$post_type_object->labels->singular_name
|
61 |
-
),
|
62 |
-
]
|
63 |
-
);
|
64 |
-
|
65 |
-
$this->add_control(
|
66 |
-
'taxonomy',
|
67 |
-
[
|
68 |
-
'label' => __( 'Taxonomy', 'press-elements' ),
|
69 |
-
'type' => Controls_Manager::SELECT,
|
70 |
-
//'options' => get_post_taxonomies( $post->ID ),
|
71 |
-
'options' => get_taxonomies( array( 'public' => true ) ),
|
72 |
-
'default' => 'category',
|
73 |
-
]
|
74 |
-
);
|
75 |
-
|
76 |
-
$this->add_control(
|
77 |
-
'html_tag',
|
78 |
-
[
|
79 |
-
'label' => __( 'HTML Tag', 'press-elements' ),
|
80 |
-
'type' => Controls_Manager::SELECT,
|
81 |
-
'options' => [
|
82 |
-
'h1' => __( 'H1', 'press-elements' ),
|
83 |
-
'h2' => __( 'H2', 'press-elements' ),
|
84 |
-
'h3' => __( 'H3', 'press-elements' ),
|
85 |
-
'h4' => __( 'H4', 'press-elements' ),
|
86 |
-
'h5' => __( 'H5', 'press-elements' ),
|
87 |
-
'h6' => __( 'H6', 'press-elements' ),
|
88 |
-
'p' => __( 'p', 'press-elements' ),
|
89 |
-
'div' => __( 'div', 'press-elements' ),
|
90 |
-
'span' => __( 'span', 'press-elements' ),
|
91 |
-
],
|
92 |
-
'default' => 'p',
|
93 |
-
]
|
94 |
-
);
|
95 |
-
|
96 |
-
$this->add_responsive_control(
|
97 |
-
'align',
|
98 |
-
[
|
99 |
-
'label' => __( 'Alignment', 'press-elements' ),
|
100 |
-
'type' => Controls_Manager::CHOOSE,
|
101 |
-
'options' => [
|
102 |
-
'left' => [
|
103 |
-
'title' => __( 'Left', 'press-elements' ),
|
104 |
-
'icon' => 'fa fa-align-left',
|
105 |
-
],
|
106 |
-
'center' => [
|
107 |
-
'title' => __( 'Center', 'press-elements' ),
|
108 |
-
'icon' => 'fa fa-align-center',
|
109 |
-
],
|
110 |
-
'right' => [
|
111 |
-
'title' => __( 'Right', 'press-elements' ),
|
112 |
-
'icon' => 'fa fa-align-right',
|
113 |
-
],
|
114 |
-
'justify' => [
|
115 |
-
'title' => __( 'Justified', 'press-elements' ),
|
116 |
-
'icon' => 'fa fa-align-justify',
|
117 |
-
],
|
118 |
-
],
|
119 |
-
'default' => '',
|
120 |
-
'selectors' => [
|
121 |
-
'{{WRAPPER}}' => 'text-align: {{VALUE}};',
|
122 |
-
],
|
123 |
-
]
|
124 |
-
);
|
125 |
-
|
126 |
-
$this->add_control(
|
127 |
-
'link_to',
|
128 |
-
[
|
129 |
-
'label' => __( 'Link to', 'press-elements' ),
|
130 |
-
'type' => Controls_Manager::SELECT,
|
131 |
-
'default' => 'none',
|
132 |
-
'options' => [
|
133 |
-
'none' => __( 'None', 'press-elements' ),
|
134 |
-
'term' => __( 'Term', 'press-elements' ),
|
135 |
-
],
|
136 |
-
]
|
137 |
-
);
|
138 |
-
|
139 |
-
$this->end_controls_section();
|
140 |
-
|
141 |
-
$this->start_controls_section(
|
142 |
-
'section_style',
|
143 |
-
[
|
144 |
-
'label' => sprintf(
|
145 |
-
/* translators: %s: Post type singular name (e.g. Post or Page) */
|
146 |
-
__( '%s Terms', 'press-elements' ),
|
147 |
-
$post_type_object->labels->singular_name
|
148 |
-
),
|
149 |
-
'tab' => Controls_Manager::TAB_STYLE,
|
150 |
-
]
|
151 |
-
);
|
152 |
-
|
153 |
-
$this->add_control(
|
154 |
-
'color',
|
155 |
-
[
|
156 |
-
'label' => __( 'Text Color', 'press-elements' ),
|
157 |
-
'type' => Controls_Manager::COLOR,
|
158 |
-
'scheme' => [
|
159 |
-
'type' => Scheme_Color::get_type(),
|
160 |
-
'value' => Scheme_Color::COLOR_1,
|
161 |
-
],
|
162 |
-
'selectors' => [
|
163 |
-
'{{WRAPPER}} .press-elements-terms' => 'color: {{VALUE}};',
|
164 |
-
'{{WRAPPER}} .press-elements-terms a' => 'color: {{VALUE}};',
|
165 |
-
],
|
166 |
-
]
|
167 |
-
);
|
168 |
-
|
169 |
-
$this->add_group_control(
|
170 |
-
Group_Control_Typography::get_type(),
|
171 |
-
[
|
172 |
-
'name' => 'typography',
|
173 |
-
'scheme' => Scheme_Typography::TYPOGRAPHY_1,
|
174 |
-
'selector' => '{{WRAPPER}} .press-elements-terms',
|
175 |
-
]
|
176 |
-
);
|
177 |
-
|
178 |
-
$this->add_control(
|
179 |
-
'hover_animation',
|
180 |
-
[
|
181 |
-
'label' => __( 'Hover Animation', 'press-elements' ),
|
182 |
-
'type' => Controls_Manager::HOVER_ANIMATION,
|
183 |
-
]
|
184 |
-
);
|
185 |
-
|
186 |
-
$this->end_controls_section();
|
187 |
-
|
188 |
-
}
|
189 |
-
|
190 |
-
protected function render() {
|
191 |
-
global $post;
|
192 |
-
$settings = $this->get_settings();
|
193 |
-
|
194 |
-
$taxonomy = $settings['taxonomy'];
|
195 |
-
if ( empty( $taxonomy ) )
|
196 |
-
return;
|
197 |
-
|
198 |
-
$term_list = get_the_terms( $post->ID, $taxonomy );
|
199 |
-
if ( empty( $term_list ) || is_wp_error( $term_list ) )
|
200 |
-
return;
|
201 |
-
|
202 |
-
$animation_class = ! empty( $settings['hover_animation'] ) ? 'elementor-animation-' . $settings['hover_animation'] : '';
|
203 |
-
|
204 |
-
$html = sprintf( '<%1$s class="press-elements-terms %2$s">', $settings['html_tag'], $animation_class );
|
205 |
-
switch ( $settings['link_to'] ) {
|
206 |
-
case 'term' :
|
207 |
-
foreach ( $term_list as $term ) {
|
208 |
-
$html .= sprintf( '<a href="%1$s">%2$s</a>, ', esc_url( get_term_link( $term ) ), $term->name );
|
209 |
-
}
|
210 |
-
break;
|
211 |
-
|
212 |
-
case 'none' :
|
213 |
-
default:
|
214 |
-
foreach ( $term_list as $term ) {
|
215 |
-
$html .= $term->name . ', ';
|
216 |
-
}
|
217 |
-
break;
|
218 |
-
}
|
219 |
-
$html = substr( $html, 0, -2);
|
220 |
-
$html .= sprintf( '</%s>', $settings['html_tag'] );
|
221 |
-
|
222 |
-
echo $html;
|
223 |
-
}
|
224 |
-
|
225 |
-
protected function _content_template() {
|
226 |
-
global $post;
|
227 |
-
?>
|
228 |
-
<#
|
229 |
-
var taxonomy = settings.taxonomy;
|
230 |
-
|
231 |
-
var all_terms = [];
|
232 |
-
<?php
|
233 |
-
$taxonomies = get_taxonomies( array( 'public' => true ) );
|
234 |
-
foreach ( $taxonomies as $taxonomy ) {
|
235 |
-
printf( 'all_terms["%1$s"] = [];', $taxonomy );
|
236 |
-
$terms = get_the_terms( $post->ID, $taxonomy );
|
237 |
-
if ( $terms ) {
|
238 |
-
$i = 0;
|
239 |
-
foreach ( $terms as $term ) {
|
240 |
-
printf( 'all_terms["%1$s"][%2$s] = [];', $taxonomy, $i );
|
241 |
-
printf( 'all_terms["%1$s"][%2$s] = { slug: "%3$s", name: "%4$s", url: "%5$s" };', $taxonomy, $i, $term->slug, $term->name, esc_url( get_term_link( $term ) ) );
|
242 |
-
$i++;
|
243 |
-
}
|
244 |
-
}
|
245 |
-
}
|
246 |
-
?>
|
247 |
-
var post_terms = all_terms[ settings.taxonomy ];
|
248 |
-
|
249 |
-
var terms = '';
|
250 |
-
var i = 0;
|
251 |
-
|
252 |
-
switch( settings.link_to ) {
|
253 |
-
case 'term':
|
254 |
-
while ( all_terms[ settings.taxonomy ][i] ) {
|
255 |
-
terms += "<a href='" + all_terms[ settings.taxonomy ][i].url + "'>" + all_terms[ settings.taxonomy ][i].name + "</a>, ";
|
256 |
-
i++;
|
257 |
-
}
|
258 |
-
break;
|
259 |
-
case 'none':
|
260 |
-
default:
|
261 |
-
while ( all_terms[ settings.taxonomy ][i] ) {
|
262 |
-
terms += all_terms[ settings.taxonomy ][i].name + ", ";
|
263 |
-
i++;
|
264 |
-
}
|
265 |
-
break;
|
266 |
-
}
|
267 |
-
terms = terms.slice(0, terms.length-2);
|
268 |
-
|
269 |
-
var animation_class = '';
|
270 |
-
if ( '' !== settings.hover_animation ) {
|
271 |
-
animation_class = 'elementor-animation-' + settings.hover_animation;
|
272 |
-
}
|
273 |
-
|
274 |
-
var html = '<' + settings.html_tag + ' class="press-elements-terms ' + animation_class + '">';
|
275 |
-
html += terms;
|
276 |
-
html += '</' + settings.html_tag + '>';
|
277 |
-
|
278 |
-
print( html );
|
279 |
-
#>
|
280 |
-
<?php
|
281 |
-
}
|
282 |
-
}
|
1 |
+
<?php
|
2 |
+
namespace PressElements\Widgets;
|
3 |
+
|
4 |
+
use Elementor\Widget_Base;
|
5 |
+
use Elementor\Controls_Manager;
|
6 |
+
use Elementor\Scheme_Color;
|
7 |
+
use Elementor\Scheme_Typography;
|
8 |
+
use Elementor\Group_Control_Typography;
|
9 |
+
|
10 |
+
|
11 |
+
|
12 |
+
// Exit if accessed directly
|
13 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
14 |
+
exit;
|
15 |
+
}
|
16 |
+
|
17 |
+
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Press Elements Post Terms
|
21 |
+
*
|
22 |
+
* Single post/page terms element for elementor.
|
23 |
+
*
|
24 |
+
* @since 1.1.0
|
25 |
+
*/
|
26 |
+
class Press_Elements_Post_Terms extends Widget_Base {
|
27 |
+
|
28 |
+
public function get_name() {
|
29 |
+
return 'post-terms';
|
30 |
+
}
|
31 |
+
|
32 |
+
public function get_title() {
|
33 |
+
$post_type_object = get_post_type_object( get_post_type() );
|
34 |
+
|
35 |
+
return sprintf(
|
36 |
+
/* translators: %s: Post type singular name (e.g. Post or Page) */
|
37 |
+
__( '%s Terms', 'press-elements' ),
|
38 |
+
$post_type_object->labels->singular_name
|
39 |
+
);
|
40 |
+
}
|
41 |
+
|
42 |
+
public function get_icon() {
|
43 |
+
return 'fa fa-sitemap';
|
44 |
+
}
|
45 |
+
|
46 |
+
public function get_categories() {
|
47 |
+
return [ 'press-elements-post-elements' ];
|
48 |
+
}
|
49 |
+
|
50 |
+
protected function _register_controls() {
|
51 |
+
|
52 |
+
$post_type_object = get_post_type_object( get_post_type() );
|
53 |
+
|
54 |
+
$this->start_controls_section(
|
55 |
+
'section_content',
|
56 |
+
[
|
57 |
+
'label' => sprintf(
|
58 |
+
/* translators: %s: Post type singular name (e.g. Post or Page) */
|
59 |
+
__( '%s Terms', 'press-elements' ),
|
60 |
+
$post_type_object->labels->singular_name
|
61 |
+
),
|
62 |
+
]
|
63 |
+
);
|
64 |
+
|
65 |
+
$this->add_control(
|
66 |
+
'taxonomy',
|
67 |
+
[
|
68 |
+
'label' => __( 'Taxonomy', 'press-elements' ),
|
69 |
+
'type' => Controls_Manager::SELECT,
|
70 |
+
//'options' => get_post_taxonomies( $post->ID ),
|
71 |
+
'options' => get_taxonomies( array( 'public' => true ) ),
|
72 |
+
'default' => 'category',
|
73 |
+
]
|
74 |
+
);
|
75 |
+
|
76 |
+
$this->add_control(
|
77 |
+
'html_tag',
|
78 |
+
[
|
79 |
+
'label' => __( 'HTML Tag', 'press-elements' ),
|
80 |
+
'type' => Controls_Manager::SELECT,
|
81 |
+
'options' => [
|
82 |
+
'h1' => __( 'H1', 'press-elements' ),
|
83 |
+
'h2' => __( 'H2', 'press-elements' ),
|
84 |
+
'h3' => __( 'H3', 'press-elements' ),
|
85 |
+
'h4' => __( 'H4', 'press-elements' ),
|
86 |
+
'h5' => __( 'H5', 'press-elements' ),
|
87 |
+
'h6' => __( 'H6', 'press-elements' ),
|
88 |
+
'p' => __( 'p', 'press-elements' ),
|
89 |
+
'div' => __( 'div', 'press-elements' ),
|
90 |
+
'span' => __( 'span', 'press-elements' ),
|
91 |
+
],
|
92 |
+
'default' => 'p',
|
93 |
+
]
|
94 |
+
);
|
95 |
+
|
96 |
+
$this->add_responsive_control(
|
97 |
+
'align',
|
98 |
+
[
|
99 |
+
'label' => __( 'Alignment', 'press-elements' ),
|
100 |
+
'type' => Controls_Manager::CHOOSE,
|
101 |
+
'options' => [
|
102 |
+
'left' => [
|
103 |
+
'title' => __( 'Left', 'press-elements' ),
|
104 |
+
'icon' => 'fa fa-align-left',
|
105 |
+
],
|
106 |
+
'center' => [
|
107 |
+
'title' => __( 'Center', 'press-elements' ),
|
108 |
+
'icon' => 'fa fa-align-center',
|
109 |
+
],
|
110 |
+
'right' => [
|
111 |
+
'title' => __( 'Right', 'press-elements' ),
|
112 |
+
'icon' => 'fa fa-align-right',
|
113 |
+
],
|
114 |
+
'justify' => [
|
115 |
+
'title' => __( 'Justified', 'press-elements' ),
|
116 |
+
'icon' => 'fa fa-align-justify',
|
117 |
+
],
|
118 |
+
],
|
119 |
+
'default' => '',
|
120 |
+
'selectors' => [
|
121 |
+
'{{WRAPPER}}' => 'text-align: {{VALUE}};',
|
122 |
+
],
|
123 |
+
]
|
124 |
+
);
|
125 |
+
|
126 |
+
$this->add_control(
|
127 |
+
'link_to',
|
128 |
+
[
|
129 |
+
'label' => __( 'Link to', 'press-elements' ),
|
130 |
+
'type' => Controls_Manager::SELECT,
|
131 |
+
'default' => 'none',
|
132 |
+
'options' => [
|
133 |
+
'none' => __( 'None', 'press-elements' ),
|
134 |
+
'term' => __( 'Term', 'press-elements' ),
|
135 |
+
],
|
136 |
+
]
|
137 |
+
);
|
138 |
+
|
139 |
+
$this->end_controls_section();
|
140 |
+
|
141 |
+
$this->start_controls_section(
|
142 |
+
'section_style',
|
143 |
+
[
|
144 |
+
'label' => sprintf(
|
145 |
+
/* translators: %s: Post type singular name (e.g. Post or Page) */
|
146 |
+
__( '%s Terms', 'press-elements' ),
|
147 |
+
$post_type_object->labels->singular_name
|
148 |
+
),
|
149 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
150 |
+
]
|
151 |
+
);
|
152 |
+
|
153 |
+
$this->add_control(
|
154 |
+
'color',
|
155 |
+
[
|
156 |
+
'label' => __( 'Text Color', 'press-elements' ),
|
157 |
+
'type' => Controls_Manager::COLOR,
|
158 |
+
'scheme' => [
|
159 |
+
'type' => Scheme_Color::get_type(),
|
160 |
+
'value' => Scheme_Color::COLOR_1,
|
161 |
+
],
|
162 |
+
'selectors' => [
|
163 |
+
'{{WRAPPER}} .press-elements-terms' => 'color: {{VALUE}};',
|
164 |
+
'{{WRAPPER}} .press-elements-terms a' => 'color: {{VALUE}};',
|
165 |
+
],
|
166 |
+
]
|
167 |
+
);
|
168 |
+
|
169 |
+
$this->add_group_control(
|
170 |
+
Group_Control_Typography::get_type(),
|
171 |
+
[
|
172 |
+
'name' => 'typography',
|
173 |
+
'scheme' => Scheme_Typography::TYPOGRAPHY_1,
|
174 |
+
'selector' => '{{WRAPPER}} .press-elements-terms',
|
175 |
+
]
|
176 |
+
);
|
177 |
+
|
178 |
+
$this->add_control(
|
179 |
+
'hover_animation',
|
180 |
+
[
|
181 |
+
'label' => __( 'Hover Animation', 'press-elements' ),
|
182 |
+
'type' => Controls_Manager::HOVER_ANIMATION,
|
183 |
+
]
|
184 |
+
);
|
185 |
+
|
186 |
+
$this->end_controls_section();
|
187 |
+
|
188 |
+
}
|
189 |
+
|
190 |
+
protected function render() {
|
191 |
+
global $post;
|
192 |
+
$settings = $this->get_settings();
|
193 |
+
|
194 |
+
$taxonomy = $settings['taxonomy'];
|
195 |
+
if ( empty( $taxonomy ) )
|
196 |
+
return;
|
197 |
+
|
198 |
+
$term_list = get_the_terms( $post->ID, $taxonomy );
|
199 |
+
if ( empty( $term_list ) || is_wp_error( $term_list ) )
|
200 |
+
return;
|
201 |
+
|
202 |
+
$animation_class = ! empty( $settings['hover_animation'] ) ? 'elementor-animation-' . $settings['hover_animation'] : '';
|
203 |
+
|
204 |
+
$html = sprintf( '<%1$s class="press-elements-terms %2$s">', $settings['html_tag'], $animation_class );
|
205 |
+
switch ( $settings['link_to'] ) {
|
206 |
+
case 'term' :
|
207 |
+
foreach ( $term_list as $term ) {
|
208 |
+
$html .= sprintf( '<a href="%1$s">%2$s</a>, ', esc_url( get_term_link( $term ) ), $term->name );
|
209 |
+
}
|
210 |
+
break;
|
211 |
+
|
212 |
+
case 'none' :
|
213 |
+
default:
|
214 |
+
foreach ( $term_list as $term ) {
|
215 |
+
$html .= $term->name . ', ';
|
216 |
+
}
|
217 |
+
break;
|
218 |
+
}
|
219 |
+
$html = substr( $html, 0, -2);
|
220 |
+
$html .= sprintf( '</%s>', $settings['html_tag'] );
|
221 |
+
|
222 |
+
echo $html;
|
223 |
+
}
|
224 |
+
|
225 |
+
protected function _content_template() {
|
226 |
+
global $post;
|
227 |
+
?>
|
228 |
+
<#
|
229 |
+
var taxonomy = settings.taxonomy;
|
230 |
+
|
231 |
+
var all_terms = [];
|
232 |
+
<?php
|
233 |
+
$taxonomies = get_taxonomies( array( 'public' => true ) );
|
234 |
+
foreach ( $taxonomies as $taxonomy ) {
|
235 |
+
printf( 'all_terms["%1$s"] = [];', $taxonomy );
|
236 |
+
$terms = get_the_terms( $post->ID, $taxonomy );
|
237 |
+
if ( $terms ) {
|
238 |
+
$i = 0;
|
239 |
+
foreach ( $terms as $term ) {
|
240 |
+
printf( 'all_terms["%1$s"][%2$s] = [];', $taxonomy, $i );
|
241 |
+
printf( 'all_terms["%1$s"][%2$s] = { slug: "%3$s", name: "%4$s", url: "%5$s" };', $taxonomy, $i, $term->slug, $term->name, esc_url( get_term_link( $term ) ) );
|
242 |
+
$i++;
|
243 |
+
}
|
244 |
+
}
|
245 |
+
}
|
246 |
+
?>
|
247 |
+
var post_terms = all_terms[ settings.taxonomy ];
|
248 |
+
|
249 |
+
var terms = '';
|
250 |
+
var i = 0;
|
251 |
+
|
252 |
+
switch( settings.link_to ) {
|
253 |
+
case 'term':
|
254 |
+
while ( all_terms[ settings.taxonomy ][i] ) {
|
255 |
+
terms += "<a href='" + all_terms[ settings.taxonomy ][i].url + "'>" + all_terms[ settings.taxonomy ][i].name + "</a>, ";
|
256 |
+
i++;
|
257 |
+
}
|
258 |
+
break;
|
259 |
+
case 'none':
|
260 |
+
default:
|
261 |
+
while ( all_terms[ settings.taxonomy ][i] ) {
|
262 |
+
terms += all_terms[ settings.taxonomy ][i].name + ", ";
|
263 |
+
i++;
|
264 |
+
}
|
265 |
+
break;
|
266 |
+
}
|
267 |
+
terms = terms.slice(0, terms.length-2);
|
268 |
+
|
269 |
+
var animation_class = '';
|
270 |
+
if ( '' !== settings.hover_animation ) {
|
271 |
+
animation_class = 'elementor-animation-' + settings.hover_animation;
|
272 |
+
}
|
273 |
+
|
274 |
+
var html = '<' + settings.html_tag + ' class="press-elements-terms ' + animation_class + '">';
|
275 |
+
html += terms;
|
276 |
+
html += '</' + settings.html_tag + '>';
|
277 |
+
|
278 |
+
print( html );
|
279 |
+
#>
|
280 |
+
<?php
|
281 |
+
}
|
282 |
+
}
|
widgets/post-title.php
CHANGED
@@ -1,285 +1,285 @@
|
|
1 |
-
<?php
|
2 |
-
namespace PressElements\Widgets;
|
3 |
-
|
4 |
-
use Elementor\Widget_Base;
|
5 |
-
use Elementor\Controls_Manager;
|
6 |
-
use Elementor\Scheme_Color;
|
7 |
-
use Elementor\Scheme_Typography;
|
8 |
-
use Elementor\Group_Control_Typography;
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
// Exit if accessed directly
|
13 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
14 |
-
exit;
|
15 |
-
}
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Press Elements Post Title
|
21 |
-
*
|
22 |
-
* Single post/page title element for elementor.
|
23 |
-
*
|
24 |
-
* @since 1.0.0
|
25 |
-
*/
|
26 |
-
class Press_Elements_Post_Title extends Widget_Base {
|
27 |
-
|
28 |
-
public function get_name() {
|
29 |
-
return 'post-title';
|
30 |
-
}
|
31 |
-
|
32 |
-
public function get_title() {
|
33 |
-
$post_type_object = get_post_type_object( get_post_type() );
|
34 |
-
|
35 |
-
return sprintf(
|
36 |
-
/* translators: %s: Post type singular name (e.g. Post or Page) */
|
37 |
-
__( '%s Title', 'press-elements' ),
|
38 |
-
$post_type_object->labels->singular_name
|
39 |
-
);
|
40 |
-
}
|
41 |
-
|
42 |
-
public function get_icon() {
|
43 |
-
return 'eicon-type-tool';
|
44 |
-
}
|
45 |
-
|
46 |
-
public function get_categories() {
|
47 |
-
return [ 'press-elements-post-elements' ];
|
48 |
-
}
|
49 |
-
|
50 |
-
protected function _register_controls() {
|
51 |
-
|
52 |
-
$post_type_object = get_post_type_object( get_post_type() );
|
53 |
-
|
54 |
-
$this->start_controls_section(
|
55 |
-
'section_content',
|
56 |
-
[
|
57 |
-
'label' => sprintf(
|
58 |
-
/* translators: %s: Post type singular name (e.g. Post or Page) */
|
59 |
-
__( '%s Title', 'press-elements' ),
|
60 |
-
$post_type_object->labels->singular_name
|
61 |
-
),
|
62 |
-
]
|
63 |
-
);
|
64 |
-
|
65 |
-
$this->add_control(
|
66 |
-
'html_tag',
|
67 |
-
[
|
68 |
-
'label' => __( 'HTML Tag', 'press-elements' ),
|
69 |
-
'type' => Controls_Manager::SELECT,
|
70 |
-
'options' => [
|
71 |
-
'h1' => __( 'H1', 'press-elements' ),
|
72 |
-
'h2' => __( 'H2', 'press-elements' ),
|
73 |
-
'h3' => __( 'H3', 'press-elements' ),
|
74 |
-
'h4' => __( 'H4', 'press-elements' ),
|
75 |
-
'h5' => __( 'H5', 'press-elements' ),
|
76 |
-
'h6' => __( 'H6', 'press-elements' ),
|
77 |
-
'p' => __( 'p', 'press-elements' ),
|
78 |
-
'div' => __( 'div', 'press-elements' ),
|
79 |
-
'span' => __( 'span', 'press-elements' ),
|
80 |
-
],
|
81 |
-
'default' => 'h2',
|
82 |
-
]
|
83 |
-
);
|
84 |
-
|
85 |
-
$this->add_responsive_control(
|
86 |
-
'align',
|
87 |
-
[
|
88 |
-
'label' => __( 'Alignment', 'press-elements' ),
|
89 |
-
'type' => Controls_Manager::CHOOSE,
|
90 |
-
'options' => [
|
91 |
-
'left' => [
|
92 |
-
'title' => __( 'Left', 'press-elements' ),
|
93 |
-
'icon' => 'fa fa-align-left',
|
94 |
-
],
|
95 |
-
'center' => [
|
96 |
-
'title' => __( 'Center', 'press-elements' ),
|
97 |
-
'icon' => 'fa fa-align-center',
|
98 |
-
],
|
99 |
-
'right' => [
|
100 |
-
'title' => __( 'Right', 'press-elements' ),
|
101 |
-
'icon' => 'fa fa-align-right',
|
102 |
-
],
|
103 |
-
'justify' => [
|
104 |
-
'title' => __( 'Justified', 'press-elements' ),
|
105 |
-
'icon' => 'fa fa-align-justify',
|
106 |
-
],
|
107 |
-
],
|
108 |
-
'default' => '',
|
109 |
-
'selectors' => [
|
110 |
-
'{{WRAPPER}}' => 'text-align: {{VALUE}};',
|
111 |
-
],
|
112 |
-
]
|
113 |
-
);
|
114 |
-
|
115 |
-
$this->add_control(
|
116 |
-
'link_to',
|
117 |
-
[
|
118 |
-
'label' => __( 'Link to', 'press-elements' ),
|
119 |
-
'type' => Controls_Manager::SELECT,
|
120 |
-
'default' => 'none',
|
121 |
-
'options' => [
|
122 |
-
'none' => __( 'None', 'press-elements' ),
|
123 |
-
'home' => __( 'Home URL', 'press-elements' ),
|
124 |
-
'post' => sprintf(
|
125 |
-
/* translators: %s: Post type singular name (e.g. Post or Page) */
|
126 |
-
__( '%s URL', 'press-elements' ),
|
127 |
-
$post_type_object->labels->singular_name
|
128 |
-
),
|
129 |
-
'custom' => __( 'Custom URL', 'press-elements' ),
|
130 |
-
],
|
131 |
-
]
|
132 |
-
);
|
133 |
-
|
134 |
-
$this->add_control(
|
135 |
-
'link',
|
136 |
-
[
|
137 |
-
'label' => __( 'Link', 'press-elements' ),
|
138 |
-
'type' => Controls_Manager::URL,
|
139 |
-
'placeholder' => __( 'http://your-link.com', 'press-elements' ),
|
140 |
-
'condition' => [
|
141 |
-
'link_to' => 'custom',
|
142 |
-
],
|
143 |
-
'default' => [
|
144 |
-
'url' => '',
|
145 |
-
],
|
146 |
-
'show_label' => false,
|
147 |
-
]
|
148 |
-
);
|
149 |
-
|
150 |
-
$this->end_controls_section();
|
151 |
-
|
152 |
-
$this->start_controls_section(
|
153 |
-
'section_style',
|
154 |
-
[
|
155 |
-
'label' => sprintf(
|
156 |
-
/* translators: %s: Post type singular name (e.g. Post or Page) */
|
157 |
-
__( '%s Title', 'press-elements' ),
|
158 |
-
$post_type_object->labels->singular_name
|
159 |
-
),
|
160 |
-
'tab' => Controls_Manager::TAB_STYLE,
|
161 |
-
]
|
162 |
-
);
|
163 |
-
|
164 |
-
$this->add_control(
|
165 |
-
'color',
|
166 |
-
[
|
167 |
-
'label' => __( 'Text Color', 'press-elements' ),
|
168 |
-
'type' => Controls_Manager::COLOR,
|
169 |
-
'scheme' => [
|
170 |
-
'type' => Scheme_Color::get_type(),
|
171 |
-
'value' => Scheme_Color::COLOR_1,
|
172 |
-
],
|
173 |
-
'selectors' => [
|
174 |
-
'{{WRAPPER}} .press-elements-title' => 'color: {{VALUE}};',
|
175 |
-
'{{WRAPPER}} .press-elements-title a' => 'color: {{VALUE}};',
|
176 |
-
],
|
177 |
-
]
|
178 |
-
);
|
179 |
-
|
180 |
-
$this->add_group_control(
|
181 |
-
Group_Control_Typography::get_type(),
|
182 |
-
[
|
183 |
-
'name' => 'typography',
|
184 |
-
'scheme' => Scheme_Typography::TYPOGRAPHY_1,
|
185 |
-
'selector' => '{{WRAPPER}} .press-elements-title',
|
186 |
-
]
|
187 |
-
);
|
188 |
-
|
189 |
-
$this->add_control(
|
190 |
-
'hover_animation',
|
191 |
-
[
|
192 |
-
'label' => __( 'Hover Animation', 'press-elements' ),
|
193 |
-
'type' => Controls_Manager::HOVER_ANIMATION,
|
194 |
-
]
|
195 |
-
);
|
196 |
-
|
197 |
-
$this->end_controls_section();
|
198 |
-
|
199 |
-
}
|
200 |
-
|
201 |
-
protected function render() {
|
202 |
-
$title = get_the_title();
|
203 |
-
|
204 |
-
if ( empty( $title ) )
|
205 |
-
return;
|
206 |
-
|
207 |
-
$settings = $this->get_settings();
|
208 |
-
|
209 |
-
switch ( $settings['link_to'] ) {
|
210 |
-
case 'custom' :
|
211 |
-
if ( ! empty( $settings['link']['url'] ) ) {
|
212 |
-
$link = esc_url( $settings['link']['url'] );
|
213 |
-
} else {
|
214 |
-
$link = false;
|
215 |
-
}
|
216 |
-
break;
|
217 |
-
|
218 |
-
case 'post' :
|
219 |
-
$link = esc_url( get_the_permalink() );
|
220 |
-
break;
|
221 |
-
|
222 |
-
case 'home' :
|
223 |
-
$link = esc_url( get_home_url() );
|
224 |
-
break;
|
225 |
-
|
226 |
-
case 'none' :
|
227 |
-
default:
|
228 |
-
$link = false;
|
229 |
-
break;
|
230 |
-
}
|
231 |
-
$target = $settings['link']['is_external'] ? 'target="_blank"' : '';
|
232 |
-
|
233 |
-
$animation_class = ! empty( $settings['hover_animation'] ) ? 'elementor-animation-' . $settings['hover_animation'] : '';
|
234 |
-
|
235 |
-
$html = sprintf( '<%1$s class="press-elements-title %2$s">', $settings['html_tag'], $animation_class );
|
236 |
-
if ( $link ) {
|
237 |
-
$html .= sprintf( '<a href="%1$s" %2$s>%3$s</a>', $link, $target, $title );
|
238 |
-
} else {
|
239 |
-
$html .= $title;
|
240 |
-
}
|
241 |
-
$html .= sprintf( '</%s>', $settings['html_tag'] );
|
242 |
-
|
243 |
-
echo $html;
|
244 |
-
}
|
245 |
-
|
246 |
-
protected function _content_template() {
|
247 |
-
?>
|
248 |
-
<#
|
249 |
-
var title = "<?php echo get_the_title(); ?>";
|
250 |
-
|
251 |
-
var link_url;
|
252 |
-
switch( settings.link_to ) {
|
253 |
-
case 'custom':
|
254 |
-
link_url = settings.link.url;
|
255 |
-
break;
|
256 |
-
case 'post':
|
257 |
-
link_url = '<?php echo esc_url( get_the_permalink() ); ?>';
|
258 |
-
break;
|
259 |
-
case 'home':
|
260 |
-
link_url = '<?php echo esc_url( get_home_url() ); ?>';
|
261 |
-
break;
|
262 |
-
case 'none':
|
263 |
-
default:
|
264 |
-
link_url = false;
|
265 |
-
}
|
266 |
-
var target = settings.link.is_external ? 'target="_blank"' : '';
|
267 |
-
|
268 |
-
var animation_class = '';
|
269 |
-
if ( '' !== settings.hover_animation ) {
|
270 |
-
animation_class = 'elementor-animation-' + settings.hover_animation;
|
271 |
-
}
|
272 |
-
|
273 |
-
var html = '<' + settings.html_tag + ' class="press-elements-title ' + animation_class + '">';
|
274 |
-
if ( link_url ) {
|
275 |
-
html += '<a href="' + link_url + '" ' + target + '>' + title + '</a>';
|
276 |
-
} else {
|
277 |
-
html += title;
|
278 |
-
}
|
279 |
-
html += '</' + settings.html_tag + '>';
|
280 |
-
|
281 |
-
print( html );
|
282 |
-
#>
|
283 |
-
<?php
|
284 |
-
}
|
285 |
-
}
|
1 |
+
<?php
|
2 |
+
namespace PressElements\Widgets;
|
3 |
+
|
4 |
+
use Elementor\Widget_Base;
|
5 |
+
use Elementor\Controls_Manager;
|
6 |
+
use Elementor\Scheme_Color;
|
7 |
+
use Elementor\Scheme_Typography;
|
8 |
+
use Elementor\Group_Control_Typography;
|
9 |
+
|
10 |
+
|
11 |
+
|
12 |
+
// Exit if accessed directly
|
13 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
14 |
+
exit;
|
15 |
+
}
|
16 |
+
|
17 |
+
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Press Elements Post Title
|
21 |
+
*
|
22 |
+
* Single post/page title element for elementor.
|
23 |
+
*
|
24 |
+
* @since 1.0.0
|
25 |
+
*/
|
26 |
+
class Press_Elements_Post_Title extends Widget_Base {
|
27 |
+
|
28 |
+
public function get_name() {
|
29 |
+
return 'post-title';
|
30 |
+
}
|
31 |
+
|
32 |
+
public function get_title() {
|
33 |
+
$post_type_object = get_post_type_object( get_post_type() );
|
34 |
+
|
35 |
+
return sprintf(
|
36 |
+
/* translators: %s: Post type singular name (e.g. Post or Page) */
|
37 |
+
__( '%s Title', 'press-elements' ),
|
38 |
+
$post_type_object->labels->singular_name
|
39 |
+
);
|
40 |
+
}
|
41 |
+
|
42 |
+
public function get_icon() {
|
43 |
+
return 'eicon-type-tool';
|
44 |
+
}
|
45 |
+
|
46 |
+
public function get_categories() {
|
47 |
+
return [ 'press-elements-post-elements' ];
|
48 |
+
}
|
49 |
+
|
50 |
+
protected function _register_controls() {
|
51 |
+
|
52 |
+
$post_type_object = get_post_type_object( get_post_type() );
|
53 |
+
|
54 |
+
$this->start_controls_section(
|
55 |
+
'section_content',
|
56 |
+
[
|
57 |
+
'label' => sprintf(
|
58 |
+
/* translators: %s: Post type singular name (e.g. Post or Page) */
|
59 |
+
__( '%s Title', 'press-elements' ),
|
60 |
+
$post_type_object->labels->singular_name
|
61 |
+
),
|
62 |
+
]
|
63 |
+
);
|
64 |
+
|
65 |
+
$this->add_control(
|
66 |
+
'html_tag',
|
67 |
+
[
|
68 |
+
'label' => __( 'HTML Tag', 'press-elements' ),
|
69 |
+
'type' => Controls_Manager::SELECT,
|
70 |
+
'options' => [
|
71 |
+
'h1' => __( 'H1', 'press-elements' ),
|
72 |
+
'h2' => __( 'H2', 'press-elements' ),
|
73 |
+
'h3' => __( 'H3', 'press-elements' ),
|
74 |
+
'h4' => __( 'H4', 'press-elements' ),
|
75 |
+
'h5' => __( 'H5', 'press-elements' ),
|
76 |
+
'h6' => __( 'H6', 'press-elements' ),
|
77 |
+
'p' => __( 'p', 'press-elements' ),
|
78 |
+
'div' => __( 'div', 'press-elements' ),
|
79 |
+
'span' => __( 'span', 'press-elements' ),
|
80 |
+
],
|
81 |
+
'default' => 'h2',
|
82 |
+
]
|
83 |
+
);
|
84 |
+
|
85 |
+
$this->add_responsive_control(
|
86 |
+
'align',
|
87 |
+
[
|
88 |
+
'label' => __( 'Alignment', 'press-elements' ),
|
89 |
+
'type' => Controls_Manager::CHOOSE,
|
90 |
+
'options' => [
|
91 |
+
'left' => [
|
92 |
+
'title' => __( 'Left', 'press-elements' ),
|
93 |
+
'icon' => 'fa fa-align-left',
|
94 |
+
],
|
95 |
+
'center' => [
|
96 |
+
'title' => __( 'Center', 'press-elements' ),
|
97 |
+
'icon' => 'fa fa-align-center',
|
98 |
+
],
|
99 |
+
'right' => [
|
100 |
+
'title' => __( 'Right', 'press-elements' ),
|
101 |
+
'icon' => 'fa fa-align-right',
|
102 |
+
],
|
103 |
+
'justify' => [
|
104 |
+
'title' => __( 'Justified', 'press-elements' ),
|
105 |
+
'icon' => 'fa fa-align-justify',
|
106 |
+
],
|
107 |
+
],
|
108 |
+
'default' => '',
|
109 |
+
'selectors' => [
|
110 |
+
'{{WRAPPER}}' => 'text-align: {{VALUE}};',
|
111 |
+
],
|
112 |
+
]
|
113 |
+
);
|
114 |
+
|
115 |
+
$this->add_control(
|
116 |
+
'link_to',
|
117 |
+
[
|
118 |
+
'label' => __( 'Link to', 'press-elements' ),
|
119 |
+
'type' => Controls_Manager::SELECT,
|
120 |
+
'default' => 'none',
|
121 |
+
'options' => [
|
122 |
+
'none' => __( 'None', 'press-elements' ),
|
123 |
+
'home' => __( 'Home URL', 'press-elements' ),
|
124 |
+
'post' => sprintf(
|
125 |
+
/* translators: %s: Post type singular name (e.g. Post or Page) */
|
126 |
+
__( '%s URL', 'press-elements' ),
|
127 |
+
$post_type_object->labels->singular_name
|
128 |
+
),
|
129 |
+
'custom' => __( 'Custom URL', 'press-elements' ),
|
130 |
+
],
|
131 |
+
]
|
132 |
+
);
|
133 |
+
|
134 |
+
$this->add_control(
|
135 |
+
'link',
|
136 |
+
[
|
137 |
+
'label' => __( 'Link', 'press-elements' ),
|
138 |
+
'type' => Controls_Manager::URL,
|
139 |
+
'placeholder' => __( 'http://your-link.com', 'press-elements' ),
|
140 |
+
'condition' => [
|
141 |
+
'link_to' => 'custom',
|
142 |
+
],
|
143 |
+
'default' => [
|
144 |
+
'url' => '',
|
145 |
+
],
|
146 |
+
'show_label' => false,
|
147 |
+
]
|
148 |
+
);
|
149 |
+
|
150 |
+
$this->end_controls_section();
|
151 |
+
|
152 |
+
$this->start_controls_section(
|
153 |
+
'section_style',
|
154 |
+
[
|
155 |
+
'label' => sprintf(
|
156 |
+
/* translators: %s: Post type singular name (e.g. Post or Page) */
|
157 |
+
__( '%s Title', 'press-elements' ),
|
158 |
+
$post_type_object->labels->singular_name
|
159 |
+
),
|
160 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
161 |
+
]
|
162 |
+
);
|
163 |
+
|
164 |
+
$this->add_control(
|
165 |
+
'color',
|
166 |
+
[
|
167 |
+
'label' => __( 'Text Color', 'press-elements' ),
|
168 |
+
'type' => Controls_Manager::COLOR,
|
169 |
+
'scheme' => [
|
170 |
+
'type' => Scheme_Color::get_type(),
|
171 |
+
'value' => Scheme_Color::COLOR_1,
|
172 |
+
],
|
173 |
+
'selectors' => [
|
174 |
+
'{{WRAPPER}} .press-elements-title' => 'color: {{VALUE}};',
|
175 |
+
'{{WRAPPER}} .press-elements-title a' => 'color: {{VALUE}};',
|
176 |
+
],
|
177 |
+
]
|
178 |
+
);
|
179 |
+
|
180 |
+
$this->add_group_control(
|
181 |
+
Group_Control_Typography::get_type(),
|
182 |
+
[
|
183 |
+
'name' => 'typography',
|
184 |
+
'scheme' => Scheme_Typography::TYPOGRAPHY_1,
|
185 |
+
'selector' => '{{WRAPPER}} .press-elements-title',
|
186 |
+
]
|
187 |
+
);
|
188 |
+
|
189 |
+
$this->add_control(
|
190 |
+
'hover_animation',
|
191 |
+
[
|
192 |
+
'label' => __( 'Hover Animation', 'press-elements' ),
|
193 |
+
'type' => Controls_Manager::HOVER_ANIMATION,
|
194 |
+
]
|
195 |
+
);
|
196 |
+
|
197 |
+
$this->end_controls_section();
|
198 |
+
|
199 |
+
}
|
200 |
+
|
201 |
+
protected function render() {
|
202 |
+
$title = get_the_title();
|
203 |
+
|
204 |
+
if ( empty( $title ) )
|
205 |
+
return;
|
206 |
+
|
207 |
+
$settings = $this->get_settings();
|
208 |
+
|
209 |
+
switch ( $settings['link_to'] ) {
|
210 |
+
case 'custom' :
|
211 |
+
if ( ! empty( $settings['link']['url'] ) ) {
|
212 |
+
$link = esc_url( $settings['link']['url'] );
|
213 |
+
} else {
|
214 |
+
$link = false;
|
215 |
+
}
|
216 |
+
break;
|
217 |
+
|
218 |
+
case 'post' :
|
219 |
+
$link = esc_url( get_the_permalink() );
|
220 |
+
break;
|
221 |
+
|
222 |
+
case 'home' :
|
223 |
+
$link = esc_url( get_home_url() );
|
224 |
+
break;
|
225 |
+
|
226 |
+
case 'none' :
|
227 |
+
default:
|
228 |
+
$link = false;
|
229 |
+
break;
|
230 |
+
}
|
231 |
+
$target = $settings['link']['is_external'] ? 'target="_blank"' : '';
|
232 |
+
|
233 |
+
$animation_class = ! empty( $settings['hover_animation'] ) ? 'elementor-animation-' . $settings['hover_animation'] : '';
|
234 |
+
|
235 |
+
$html = sprintf( '<%1$s class="press-elements-title %2$s">', $settings['html_tag'], $animation_class );
|
236 |
+
if ( $link ) {
|
237 |
+
$html .= sprintf( '<a href="%1$s" %2$s>%3$s</a>', $link, $target, $title );
|
238 |
+
} else {
|
239 |
+
$html .= $title;
|
240 |
+
}
|
241 |
+
$html .= sprintf( '</%s>', $settings['html_tag'] );
|
242 |
+
|
243 |
+
echo $html;
|
244 |
+
}
|
245 |
+
|
246 |
+
protected function _content_template() {
|
247 |
+
?>
|
248 |
+
<#
|
249 |
+
var title = "<?php echo get_the_title(); ?>";
|
250 |
+
|
251 |
+
var link_url;
|
252 |
+
switch( settings.link_to ) {
|
253 |
+
case 'custom':
|
254 |
+
link_url = settings.link.url;
|
255 |
+
break;
|
256 |
+
case 'post':
|
257 |
+
link_url = '<?php echo esc_url( get_the_permalink() ); ?>';
|
258 |
+
break;
|
259 |
+
case 'home':
|
260 |
+
link_url = '<?php echo esc_url( get_home_url() ); ?>';
|
261 |
+
break;
|
262 |
+
case 'none':
|
263 |
+
default:
|
264 |
+
link_url = false;
|
265 |
+
}
|
266 |
+
var target = settings.link.is_external ? 'target="_blank"' : '';
|
267 |
+
|
268 |
+
var animation_class = '';
|
269 |
+
if ( '' !== settings.hover_animation ) {
|
270 |
+
animation_class = 'elementor-animation-' + settings.hover_animation;
|
271 |
+
}
|
272 |
+
|
273 |
+
var html = '<' + settings.html_tag + ' class="press-elements-title ' + animation_class + '">';
|
274 |
+
if ( link_url ) {
|
275 |
+
html += '<a href="' + link_url + '" ' + target + '>' + title + '</a>';
|
276 |
+
} else {
|
277 |
+
html += title;
|
278 |
+
}
|
279 |
+
html += '</' + settings.html_tag + '>';
|
280 |
+
|
281 |
+
print( html );
|
282 |
+
#>
|
283 |
+
<?php
|
284 |
+
}
|
285 |
+
}
|
widgets/site-counters.php
CHANGED
@@ -1,363 +1,363 @@
|
|
1 |
-
<?php
|
2 |
-
namespace PressElements\Widgets;
|
3 |
-
|
4 |
-
use Elementor\Widget_Base;
|
5 |
-
use Elementor\Controls_Manager;
|
6 |
-
use Elementor\Scheme_Color;
|
7 |
-
use Elementor\Scheme_Typography;
|
8 |
-
use Elementor\Group_Control_Typography;
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
// Exit if accessed directly
|
13 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
14 |
-
exit;
|
15 |
-
}
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Press Elements Site Counters
|
21 |
-
*
|
22 |
-
* Site counters element for elementor.
|
23 |
-
*
|
24 |
-
* @since 1.2.0
|
25 |
-
*/
|
26 |
-
class Press_Elements_Site_Counters extends Widget_Base {
|
27 |
-
|
28 |
-
public function get_name() {
|
29 |
-
return 'site-counters';
|
30 |
-
}
|
31 |
-
|
32 |
-
public function get_title() {
|
33 |
-
return __( 'Site Counters', 'press-elements' );
|
34 |
-
}
|
35 |
-
|
36 |
-
public function get_icon() {
|
37 |
-
return 'eicon-counter';
|
38 |
-
}
|
39 |
-
|
40 |
-
public function get_categories() {
|
41 |
-
return [ 'press-elements-site-elements' ];
|
42 |
-
}
|
43 |
-
|
44 |
-
protected function _register_controls() {
|
45 |
-
|
46 |
-
$post_types = array();
|
47 |
-
$all_post_types = get_post_types( $args = array( 'public' => true ), 'objects' );
|
48 |
-
foreach ( $all_post_types as $post_type ) {
|
49 |
-
$post_types[ $post_type->name ] = $post_type->labels->name;
|
50 |
-
}
|
51 |
-
unset( $post_types['attachment'] );
|
52 |
-
|
53 |
-
$taxonomies = array();
|
54 |
-
$all_taxonomies = get_taxonomies( array( 'public' => true ), 'objects' );
|
55 |
-
foreach ( $all_taxonomies as $taxonomy ) {
|
56 |
-
$taxonomies[ $taxonomy->name ] = $taxonomy->labels->name;
|
57 |
-
}
|
58 |
-
|
59 |
-
$this->start_controls_section(
|
60 |
-
'section_content',
|
61 |
-
[
|
62 |
-
'label' => __( 'Site Counters', 'press-elements' ),
|
63 |
-
]
|
64 |
-
);
|
65 |
-
|
66 |
-
$this->add_control(
|
67 |
-
'display',
|
68 |
-
[
|
69 |
-
'label' => __( 'Display', 'press-elements' ),
|
70 |
-
'type' => Controls_Manager::SELECT,
|
71 |
-
'default' => 'post_type',
|
72 |
-
'options' => [
|
73 |
-
'post_type' => __( 'Post Type', 'press-elements' ),
|
74 |
-
'taxonomy' => __( 'Taxonomy', 'press-elements' ),
|
75 |
-
'comments' => __( 'Comments', 'press-elements' ),
|
76 |
-
'users' => __( 'Users', 'press-elements' ),
|
77 |
-
],
|
78 |
-
]
|
79 |
-
);
|
80 |
-
|
81 |
-
$this->add_control(
|
82 |
-
'post_type',
|
83 |
-
[
|
84 |
-
'label' => __( 'Post Type', 'press-elements' ),
|
85 |
-
'type' => Controls_Manager::SELECT,
|
86 |
-
'options' => $post_types,
|
87 |
-
'default' => 'post',
|
88 |
-
'condition' => [
|
89 |
-
'display' => 'post_type',
|
90 |
-
],
|
91 |
-
]
|
92 |
-
);
|
93 |
-
|
94 |
-
$this->add_control(
|
95 |
-
'taxonomy',
|
96 |
-
[
|
97 |
-
'label' => __( 'Taxonomy', 'press-elements' ),
|
98 |
-
'type' => Controls_Manager::SELECT,
|
99 |
-
'options' => $taxonomies,
|
100 |
-
'default' => 'category',
|
101 |
-
'condition' => [
|
102 |
-
'display' => 'taxonomy',
|
103 |
-
],
|
104 |
-
]
|
105 |
-
);
|
106 |
-
|
107 |
-
$this->add_control(
|
108 |
-
'html_tag',
|
109 |
-
[
|
110 |
-
'label' => __( 'HTML Tag', 'press-elements' ),
|
111 |
-
'type' => Controls_Manager::SELECT,
|
112 |
-
'options' => [
|
113 |
-
'h1' => __( 'H1', 'press-elements' ),
|
114 |
-
'h2' => __( 'H2', 'press-elements' ),
|
115 |
-
'h3' => __( 'H3', 'press-elements' ),
|
116 |
-
'h4' => __( 'H4', 'press-elements' ),
|
117 |
-
'h5' => __( 'H5', 'press-elements' ),
|
118 |
-
'h6' => __( 'H6', 'press-elements' ),
|
119 |
-
'p' => __( 'p', 'press-elements' ),
|
120 |
-
'div' => __( 'div', 'press-elements' ),
|
121 |
-
'span' => __( 'span', 'press-elements' ),
|
122 |
-
],
|
123 |
-
'default' => 'p',
|
124 |
-
]
|
125 |
-
);
|
126 |
-
|
127 |
-
$this->add_responsive_control(
|
128 |
-
'align',
|
129 |
-
[
|
130 |
-
'label' => __( 'Alignment', 'press-elements' ),
|
131 |
-
'type' => Controls_Manager::CHOOSE,
|
132 |
-
'options' => [
|
133 |
-
'left' => [
|
134 |
-
'title' => __( 'Left', 'press-elements' ),
|
135 |
-
'icon' => 'fa fa-align-left',
|
136 |
-
],
|
137 |
-
'center' => [
|
138 |
-
'title' => __( 'Center', 'press-elements' ),
|
139 |
-
'icon' => 'fa fa-align-center',
|
140 |
-
],
|
141 |
-
'right' => [
|
142 |
-
'title' => __( 'Right', 'press-elements' ),
|
143 |
-
'icon' => 'fa fa-align-right',
|
144 |
-
],
|
145 |
-
'justify' => [
|
146 |
-
'title' => __( 'Justified', 'press-elements' ),
|
147 |
-
'icon' => 'fa fa-align-justify',
|
148 |
-
],
|
149 |
-
],
|
150 |
-
'default' => '',
|
151 |
-
'selectors' => [
|
152 |
-
'{{WRAPPER}}' => 'text-align: {{VALUE}};',
|
153 |
-
],
|
154 |
-
]
|
155 |
-
);
|
156 |
-
|
157 |
-
$this->end_controls_section();
|
158 |
-
|
159 |
-
$this->start_controls_section(
|
160 |
-
'section_number',
|
161 |
-
[
|
162 |
-
'label' => __( 'Number', 'press-elements' ),
|
163 |
-
'tab' => Controls_Manager::TAB_STYLE,
|
164 |
-
]
|
165 |
-
);
|
166 |
-
|
167 |
-
$this->add_control(
|
168 |
-
'number_color',
|
169 |
-
[
|
170 |
-
'label' => __( 'Text Color', 'press-elements' ),
|
171 |
-
'type' => Controls_Manager::COLOR,
|
172 |
-
'scheme' => [
|
173 |
-
'type' => Scheme_Color::get_type(),
|
174 |
-
'value' => Scheme_Color::COLOR_1,
|
175 |
-
],
|
176 |
-
'selectors' => [
|
177 |
-
'{{WRAPPER}} .press-elements-site-counters .press-elements-total' => 'color: {{VALUE}};',
|
178 |
-
],
|
179 |
-
]
|
180 |
-
);
|
181 |
-
|
182 |
-
$this->add_group_control(
|
183 |
-
Group_Control_Typography::get_type(),
|
184 |
-
[
|
185 |
-
'name' => 'number_typography',
|
186 |
-
'scheme' => Scheme_Typography::TYPOGRAPHY_1,
|
187 |
-
'selector' => '{{WRAPPER}} .press-elements-site-counters .press-elements-total',
|
188 |
-
]
|
189 |
-
);
|
190 |
-
|
191 |
-
$this->add_control(
|
192 |
-
'number_hover_animation',
|
193 |
-
[
|
194 |
-
'label' => __( 'Hover Animation', 'press-elements' ),
|
195 |
-
'type' => Controls_Manager::HOVER_ANIMATION,
|
196 |
-
]
|
197 |
-
);
|
198 |
-
|
199 |
-
$this->end_controls_section();
|
200 |
-
|
201 |
-
$this->start_controls_section(
|
202 |
-
'section_label',
|
203 |
-
[
|
204 |
-
'label' => __( 'Label', 'press-elements' ),
|
205 |
-
'tab' => Controls_Manager::TAB_STYLE,
|
206 |
-
]
|
207 |
-
);
|
208 |
-
|
209 |
-
$this->add_control(
|
210 |
-
'label_color',
|
211 |
-
[
|
212 |
-
'label' => __( 'Text Color', 'press-elements' ),
|
213 |
-
'type' => Controls_Manager::COLOR,
|
214 |
-
'scheme' => [
|
215 |
-
'type' => Scheme_Color::get_type(),
|
216 |
-
'value' => Scheme_Color::COLOR_2,
|
217 |
-
],
|
218 |
-
'selectors' => [
|
219 |
-
'{{WRAPPER}} .press-elements-site-counters .press-elements-label' => 'color: {{VALUE}};',
|
220 |
-
],
|
221 |
-
]
|
222 |
-
);
|
223 |
-
|
224 |
-
$this->add_group_control(
|
225 |
-
Group_Control_Typography::get_type(),
|
226 |
-
[
|
227 |
-
'name' => 'label_typography',
|
228 |
-
'scheme' => Scheme_Typography::TYPOGRAPHY_2,
|
229 |
-
'selector' => '{{WRAPPER}} .press-elements-site-counters .press-elements-label',
|
230 |
-
]
|
231 |
-
);
|
232 |
-
|
233 |
-
$this->add_control(
|
234 |
-
'label_hover_animation',
|
235 |
-
[
|
236 |
-
'label' => __( 'Hover Animation', 'press-elements' ),
|
237 |
-
'type' => Controls_Manager::HOVER_ANIMATION,
|
238 |
-
]
|
239 |
-
);
|
240 |
-
|
241 |
-
$this->end_controls_section();
|
242 |
-
|
243 |
-
}
|
244 |
-
|
245 |
-
protected function render() {
|
246 |
-
|
247 |
-
$settings = $this->get_settings();
|
248 |
-
$total = 0;
|
249 |
-
$label = '';
|
250 |
-
|
251 |
-
switch ( $settings['display'] ) {
|
252 |
-
case 'users' :
|
253 |
-
$users_count = count_users();
|
254 |
-
$total = $users_count['total_users'];
|
255 |
-
$label = __( 'Users', 'press-elements' );
|
256 |
-
break;
|
257 |
-
|
258 |
-
case 'comments' :
|
259 |
-
$count_comments = wp_count_comments();
|
260 |
-
$total = $count_comments->approved;
|
261 |
-
$label = __( 'Comments', 'press-elements' );
|
262 |
-
break;
|
263 |
-
|
264 |
-
case 'taxonomy' :
|
265 |
-
$total = wp_count_terms( $settings['taxonomy'] );
|
266 |
-
$taxonomy = get_taxonomy( $settings['taxonomy'] );
|
267 |
-
$label = $taxonomy->labels->name;
|
268 |
-
break;
|
269 |
-
|
270 |
-
case 'post_type' :
|
271 |
-
default:
|
272 |
-
$query = new \WP_Query( array( 'post_type' => $settings['post_type'] ) );
|
273 |
-
$total = $query->found_posts;
|
274 |
-
wp_reset_postdata();
|
275 |
-
$post_type_object = get_post_type_object( $settings['post_type'] );
|
276 |
-
$label = $post_type_object->labels->name;
|
277 |
-
break;
|
278 |
-
}
|
279 |
-
|
280 |
-
$number_hover_animation = ! empty( $settings['number_hover_animation'] ) ? 'elementor-animation-' . $settings['number_hover_animation'] : '';
|
281 |
-
$label_hover_animation = ! empty( $settings['label_hover_animation'] ) ? 'elementor-animation-' . $settings['label_hover_animation'] : '';
|
282 |
-
|
283 |
-
$html = '<div class="press-elements-site-counters">';
|
284 |
-
$html .= sprintf( '<%1$s class="press-elements-total %2$s">%3$s</%1$s>', $settings['html_tag'], $number_hover_animation, $total );
|
285 |
-
$html .= sprintf( '<%1$s class="press-elements-label %2$s">%3$s</%1$s>', $settings['html_tag'], $label_hover_animation, $label );
|
286 |
-
$html .= '</div>';
|
287 |
-
|
288 |
-
echo $html;
|
289 |
-
|
290 |
-
}
|
291 |
-
|
292 |
-
protected function _content_template() {
|
293 |
-
/*
|
294 |
-
?>
|
295 |
-
<#
|
296 |
-
var total = 0;
|
297 |
-
var label = '';
|
298 |
-
|
299 |
-
switch( settings.display ) {
|
300 |
-
case 'users':
|
301 |
-
<?php $count_users = count_users(); ?>
|
302 |
-
total = <?php echo (int) $count_users['total_users']; ?>;
|
303 |
-
label = '<?php echo __( 'Users', 'press-elements' ); ?>';
|
304 |
-
break;
|
305 |
-
|
306 |
-
case 'comments':
|
307 |
-
<?php $count_comments = wp_count_comments(); ?>
|
308 |
-
total = <?php echo (int) $count_comments->approved; ?>;
|
309 |
-
label = '<?php echo __( 'Comments', 'press-elements' ); ?>';
|
310 |
-
break;
|
311 |
-
|
312 |
-
case 'taxonomy':
|
313 |
-
var taxonomy_total = [];
|
314 |
-
var taxonomy_labels = [];
|
315 |
-
<?php
|
316 |
-
$taxonomies = get_taxonomies( array( 'public' => true ), 'objects' );
|
317 |
-
foreach ( $taxonomies as $taxonomy ) {
|
318 |
-
printf( 'taxonomy_total[ "%1$s" ] = \'%2$s\';', $taxonomy->name, wp_count_terms( $taxonomy->name ) );
|
319 |
-
printf( 'taxonomy_labels[ "%1$s" ] = \'%2$s\';', $taxonomy->name, $taxonomy->labels->name );
|
320 |
-
}
|
321 |
-
?>
|
322 |
-
total = taxonomy_total[ settings.taxonomy ];
|
323 |
-
label = taxonomy_labels[ settings.taxonomy ];
|
324 |
-
break;
|
325 |
-
|
326 |
-
case 'post_type':
|
327 |
-
default:
|
328 |
-
var post_type_count = [];
|
329 |
-
var post_type_labels = [];
|
330 |
-
<?php
|
331 |
-
$post_types = get_post_types( $args = array( 'public' => true ), 'objects' );
|
332 |
-
foreach ( $post_types as $post_type ) {
|
333 |
-
$query = new \WP_Query( array( 'post_type' => $post_type ) );
|
334 |
-
printf( 'post_type_count[ "%1$s" ] = \'%2$s\';', $post_type->name, $query->found_posts );
|
335 |
-
printf( 'post_type_labels[ "%1$s" ] = \'%2$s\';', $post_type->name, $post_type->labels->name );
|
336 |
-
wp_reset_postdata();
|
337 |
-
}
|
338 |
-
?>
|
339 |
-
total = post_type_count[ settings.post_type ];
|
340 |
-
label = post_type_labels[ settings.post_type ];
|
341 |
-
break;
|
342 |
-
}
|
343 |
-
|
344 |
-
var number_animation_class = '';
|
345 |
-
if ( '' !== settings.number_hover_animation ) {
|
346 |
-
number_animation_class = 'elementor-animation-' + settings.number_hover_animation;
|
347 |
-
}
|
348 |
-
var label_animation_class = '';
|
349 |
-
if ( '' !== settings.label_hover_animation ) {
|
350 |
-
label_animation_class = 'elementor-animation-' + settings.label_hover_animation;
|
351 |
-
}
|
352 |
-
|
353 |
-
var html = '<div class="press-elements-site-counters">';
|
354 |
-
html += '<' + settings.html_tag + ' class="press-elements-total ' + number_animation_class + '">' + total + '</' + settings.html_tag + '>';
|
355 |
-
html += '<' + settings.html_tag + ' class="press-elements-label ' + label_animation_class + '">' + label + '</' + settings.html_tag + '>';
|
356 |
-
html += '</div>';
|
357 |
-
|
358 |
-
print( html );
|
359 |
-
#>
|
360 |
-
<?php
|
361 |
-
*/
|
362 |
-
}
|
363 |
-
}
|
1 |
+
<?php
|
2 |
+
namespace PressElements\Widgets;
|
3 |
+
|
4 |
+
use Elementor\Widget_Base;
|
5 |
+
use Elementor\Controls_Manager;
|
6 |
+
use Elementor\Scheme_Color;
|
7 |
+
use Elementor\Scheme_Typography;
|
8 |
+
use Elementor\Group_Control_Typography;
|
9 |
+
|
10 |
+
|
11 |
+
|
12 |
+
// Exit if accessed directly
|
13 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
14 |
+
exit;
|
15 |
+
}
|
16 |
+
|
17 |
+
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Press Elements Site Counters
|
21 |
+
*
|
22 |
+
* Site counters element for elementor.
|
23 |
+
*
|
24 |
+
* @since 1.2.0
|
25 |
+
*/
|
26 |
+
class Press_Elements_Site_Counters extends Widget_Base {
|
27 |
+
|
28 |
+
public function get_name() {
|
29 |
+
return 'site-counters';
|
30 |
+
}
|
31 |
+
|
32 |
+
public function get_title() {
|
33 |
+
return __( 'Site Counters', 'press-elements' );
|
34 |
+
}
|
35 |
+
|
36 |
+
public function get_icon() {
|
37 |
+
return 'eicon-counter';
|
38 |
+
}
|
39 |
+
|
40 |
+
public function get_categories() {
|
41 |
+
return [ 'press-elements-site-elements' ];
|
42 |
+
}
|
43 |
+
|
44 |
+
protected function _register_controls() {
|
45 |
+
|
46 |
+
$post_types = array();
|
47 |
+
$all_post_types = get_post_types( $args = array( 'public' => true ), 'objects' );
|
48 |
+
foreach ( $all_post_types as $post_type ) {
|
49 |
+
$post_types[ $post_type->name ] = $post_type->labels->name;
|
50 |
+
}
|
51 |
+
unset( $post_types['attachment'] );
|
52 |
+
|
53 |
+
$taxonomies = array();
|
54 |
+
$all_taxonomies = get_taxonomies( array( 'public' => true ), 'objects' );
|
55 |
+
foreach ( $all_taxonomies as $taxonomy ) {
|
56 |
+
$taxonomies[ $taxonomy->name ] = $taxonomy->labels->name;
|
57 |
+
}
|
58 |
+
|
59 |
+
$this->start_controls_section(
|
60 |
+
'section_content',
|
61 |
+
[
|
62 |
+
'label' => __( 'Site Counters', 'press-elements' ),
|
63 |
+
]
|
64 |
+
);
|
65 |
+
|
66 |
+
$this->add_control(
|
67 |
+
'display',
|
68 |
+
[
|
69 |
+
'label' => __( 'Display', 'press-elements' ),
|
70 |
+
'type' => Controls_Manager::SELECT,
|
71 |
+
'default' => 'post_type',
|
72 |
+
'options' => [
|
73 |
+
'post_type' => __( 'Post Type', 'press-elements' ),
|
74 |
+
'taxonomy' => __( 'Taxonomy', 'press-elements' ),
|
75 |
+
'comments' => __( 'Comments', 'press-elements' ),
|
76 |
+
'users' => __( 'Users', 'press-elements' ),
|
77 |
+
],
|
78 |
+
]
|
79 |
+
);
|
80 |
+
|
81 |
+
$this->add_control(
|
82 |
+
'post_type',
|
83 |
+
[
|
84 |
+
'label' => __( 'Post Type', 'press-elements' ),
|
85 |
+
'type' => Controls_Manager::SELECT,
|
86 |
+
'options' => $post_types,
|
87 |
+
'default' => 'post',
|
88 |
+
'condition' => [
|
89 |
+
'display' => 'post_type',
|
90 |
+
],
|
91 |
+
]
|
92 |
+
);
|
93 |
+
|
94 |
+
$this->add_control(
|
95 |
+
'taxonomy',
|
96 |
+
[
|
97 |
+
'label' => __( 'Taxonomy', 'press-elements' ),
|
98 |
+
'type' => Controls_Manager::SELECT,
|
99 |
+
'options' => $taxonomies,
|
100 |
+
'default' => 'category',
|
101 |
+
'condition' => [
|
102 |
+
'display' => 'taxonomy',
|
103 |
+
],
|
104 |
+
]
|
105 |
+
);
|
106 |
+
|
107 |
+
$this->add_control(
|
108 |
+
'html_tag',
|
109 |
+
[
|
110 |
+
'label' => __( 'HTML Tag', 'press-elements' ),
|
111 |
+
'type' => Controls_Manager::SELECT,
|
112 |
+
'options' => [
|
113 |
+
'h1' => __( 'H1', 'press-elements' ),
|
114 |
+
'h2' => __( 'H2', 'press-elements' ),
|
115 |
+
'h3' => __( 'H3', 'press-elements' ),
|
116 |
+
'h4' => __( 'H4', 'press-elements' ),
|
117 |
+
'h5' => __( 'H5', 'press-elements' ),
|
118 |
+
'h6' => __( 'H6', 'press-elements' ),
|
119 |
+
'p' => __( 'p', 'press-elements' ),
|
120 |
+
'div' => __( 'div', 'press-elements' ),
|
121 |
+
'span' => __( 'span', 'press-elements' ),
|
122 |
+
],
|
123 |
+
'default' => 'p',
|
124 |
+
]
|
125 |
+
);
|
126 |
+
|
127 |
+
$this->add_responsive_control(
|
128 |
+
'align',
|
129 |
+
[
|
130 |
+
'label' => __( 'Alignment', 'press-elements' ),
|
131 |
+
'type' => Controls_Manager::CHOOSE,
|
132 |
+
'options' => [
|
133 |
+
'left' => [
|
134 |
+
'title' => __( 'Left', 'press-elements' ),
|
135 |
+
'icon' => 'fa fa-align-left',
|
136 |
+
],
|
137 |
+
'center' => [
|
138 |
+
'title' => __( 'Center', 'press-elements' ),
|
139 |
+
'icon' => 'fa fa-align-center',
|
140 |
+
],
|
141 |
+
'right' => [
|
142 |
+
'title' => __( 'Right', 'press-elements' ),
|
143 |
+
'icon' => 'fa fa-align-right',
|
144 |
+
],
|
145 |
+
'justify' => [
|
146 |
+
'title' => __( 'Justified', 'press-elements' ),
|
147 |
+
'icon' => 'fa fa-align-justify',
|
148 |
+
],
|
149 |
+
],
|
150 |
+
'default' => '',
|
151 |
+
'selectors' => [
|
152 |
+
'{{WRAPPER}}' => 'text-align: {{VALUE}};',
|
153 |
+
],
|
154 |
+
]
|
155 |
+
);
|
156 |
+
|
157 |
+
$this->end_controls_section();
|
158 |
+
|
159 |
+
$this->start_controls_section(
|
160 |
+
'section_number',
|
161 |
+
[
|
162 |
+
'label' => __( 'Number', 'press-elements' ),
|
163 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
164 |
+
]
|
165 |
+
);
|
166 |
+
|
167 |
+
$this->add_control(
|
168 |
+
'number_color',
|
169 |
+
[
|
170 |
+
'label' => __( 'Text Color', 'press-elements' ),
|
171 |
+
'type' => Controls_Manager::COLOR,
|
172 |
+
'scheme' => [
|
173 |
+
'type' => Scheme_Color::get_type(),
|
174 |
+
'value' => Scheme_Color::COLOR_1,
|
175 |
+
],
|
176 |
+
'selectors' => [
|
177 |
+
'{{WRAPPER}} .press-elements-site-counters .press-elements-total' => 'color: {{VALUE}};',
|
178 |
+
],
|
179 |
+
]
|
180 |
+
);
|
181 |
+
|
182 |
+
$this->add_group_control(
|
183 |
+
Group_Control_Typography::get_type(),
|
184 |
+
[
|
185 |
+
'name' => 'number_typography',
|
186 |
+
'scheme' => Scheme_Typography::TYPOGRAPHY_1,
|
187 |
+
'selector' => '{{WRAPPER}} .press-elements-site-counters .press-elements-total',
|
188 |
+
]
|
189 |
+
);
|
190 |
+
|
191 |
+
$this->add_control(
|
192 |
+
'number_hover_animation',
|
193 |
+
[
|
194 |
+
'label' => __( 'Hover Animation', 'press-elements' ),
|
195 |
+
'type' => Controls_Manager::HOVER_ANIMATION,
|
196 |
+
]
|
197 |
+
);
|
198 |
+
|
199 |
+
$this->end_controls_section();
|
200 |
+
|
201 |
+
$this->start_controls_section(
|
202 |
+
'section_label',
|
203 |
+
[
|
204 |
+
'label' => __( 'Label', 'press-elements' ),
|
205 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
206 |
+
]
|
207 |
+
);
|
208 |
+
|
209 |
+
$this->add_control(
|
210 |
+
'label_color',
|
211 |
+
[
|
212 |
+
'label' => __( 'Text Color', 'press-elements' ),
|
213 |
+
'type' => Controls_Manager::COLOR,
|
214 |
+
'scheme' => [
|
215 |
+
'type' => Scheme_Color::get_type(),
|
216 |
+
'value' => Scheme_Color::COLOR_2,
|
217 |
+
],
|
218 |
+
'selectors' => [
|
219 |
+
'{{WRAPPER}} .press-elements-site-counters .press-elements-label' => 'color: {{VALUE}};',
|
220 |
+
],
|
221 |
+
]
|
222 |
+
);
|
223 |
+
|
224 |
+
$this->add_group_control(
|
225 |
+
Group_Control_Typography::get_type(),
|
226 |
+
[
|
227 |
+
'name' => 'label_typography',
|
228 |
+
'scheme' => Scheme_Typography::TYPOGRAPHY_2,
|
229 |
+
'selector' => '{{WRAPPER}} .press-elements-site-counters .press-elements-label',
|
230 |
+
]
|
231 |
+
);
|
232 |
+
|
233 |
+
$this->add_control(
|
234 |
+
'label_hover_animation',
|
235 |
+
[
|
236 |
+
'label' => __( 'Hover Animation', 'press-elements' ),
|
237 |
+
'type' => Controls_Manager::HOVER_ANIMATION,
|
238 |
+
]
|
239 |
+
);
|
240 |
+
|
241 |
+
$this->end_controls_section();
|
242 |
+
|
243 |
+
}
|
244 |
+
|
245 |
+
protected function render() {
|
246 |
+
|
247 |
+
$settings = $this->get_settings();
|
248 |
+
$total = 0;
|
249 |
+
$label = '';
|
250 |
+
|
251 |
+
switch ( $settings['display'] ) {
|
252 |
+
case 'users' :
|
253 |
+
$users_count = count_users();
|
254 |
+
$total = $users_count['total_users'];
|
255 |
+
$label = __( 'Users', 'press-elements' );
|
256 |
+
break;
|
257 |
+
|
258 |
+
case 'comments' :
|
259 |
+
$count_comments = wp_count_comments();
|
260 |
+
$total = $count_comments->approved;
|
261 |
+
$label = __( 'Comments', 'press-elements' );
|
262 |
+
break;
|
263 |
+
|
264 |
+
case 'taxonomy' :
|
265 |
+
$total = wp_count_terms( $settings['taxonomy'] );
|
266 |
+
$taxonomy = get_taxonomy( $settings['taxonomy'] );
|
267 |
+
$label = $taxonomy->labels->name;
|
268 |
+
break;
|
269 |
+
|
270 |
+
case 'post_type' :
|
271 |
+
default:
|
272 |
+
$query = new \WP_Query( array( 'post_type' => $settings['post_type'] ) );
|
273 |
+
$total = $query->found_posts;
|
274 |
+
wp_reset_postdata();
|
275 |
+
$post_type_object = get_post_type_object( $settings['post_type'] );
|
276 |
+
$label = $post_type_object->labels->name;
|
277 |
+
break;
|
278 |
+
}
|
279 |
+
|
280 |
+
$number_hover_animation = ! empty( $settings['number_hover_animation'] ) ? 'elementor-animation-' . $settings['number_hover_animation'] : '';
|
281 |
+
$label_hover_animation = ! empty( $settings['label_hover_animation'] ) ? 'elementor-animation-' . $settings['label_hover_animation'] : '';
|
282 |
+
|
283 |
+
$html = '<div class="press-elements-site-counters">';
|
284 |
+
$html .= sprintf( '<%1$s class="press-elements-total %2$s">%3$s</%1$s>', $settings['html_tag'], $number_hover_animation, $total );
|
285 |
+
$html .= sprintf( '<%1$s class="press-elements-label %2$s">%3$s</%1$s>', $settings['html_tag'], $label_hover_animation, $label );
|
286 |
+
$html .= '</div>';
|
287 |
+
|
288 |
+
echo $html;
|
289 |
+
|
290 |
+
}
|
291 |
+
|
292 |
+
protected function _content_template() {
|
293 |
+
/*
|
294 |
+
?>
|
295 |
+
<#
|
296 |
+
var total = 0;
|
297 |
+
var label = '';
|
298 |
+
|
299 |
+
switch( settings.display ) {
|
300 |
+
case 'users':
|
301 |
+
<?php $count_users = count_users(); ?>
|
302 |
+
total = <?php echo (int) $count_users['total_users']; ?>;
|
303 |
+
label = '<?php echo __( 'Users', 'press-elements' ); ?>';
|
304 |
+
break;
|
305 |
+
|
306 |
+
case 'comments':
|
307 |
+
<?php $count_comments = wp_count_comments(); ?>
|
308 |
+
total = <?php echo (int) $count_comments->approved; ?>;
|
309 |
+
label = '<?php echo __( 'Comments', 'press-elements' ); ?>';
|
310 |
+
break;
|
311 |
+
|
312 |
+
case 'taxonomy':
|
313 |
+
var taxonomy_total = [];
|
314 |
+
var taxonomy_labels = [];
|
315 |
+
<?php
|
316 |
+
$taxonomies = get_taxonomies( array( 'public' => true ), 'objects' );
|
317 |
+
foreach ( $taxonomies as $taxonomy ) {
|
318 |
+
printf( 'taxonomy_total[ "%1$s" ] = \'%2$s\';', $taxonomy->name, wp_count_terms( $taxonomy->name ) );
|
319 |
+
printf( 'taxonomy_labels[ "%1$s" ] = \'%2$s\';', $taxonomy->name, $taxonomy->labels->name );
|
320 |
+
}
|
321 |
+
?>
|
322 |
+
total = taxonomy_total[ settings.taxonomy ];
|
323 |
+
label = taxonomy_labels[ settings.taxonomy ];
|
324 |
+
break;
|
325 |
+
|
326 |
+
case 'post_type':
|
327 |
+
default:
|
328 |
+
var post_type_count = [];
|
329 |
+
var post_type_labels = [];
|
330 |
+
<?php
|
331 |
+
$post_types = get_post_types( $args = array( 'public' => true ), 'objects' );
|
332 |
+
foreach ( $post_types as $post_type ) {
|
333 |
+
$query = new \WP_Query( array( 'post_type' => $post_type ) );
|
334 |
+
printf( 'post_type_count[ "%1$s" ] = \'%2$s\';', $post_type->name, $query->found_posts );
|
335 |
+
printf( 'post_type_labels[ "%1$s" ] = \'%2$s\';', $post_type->name, $post_type->labels->name );
|
336 |
+
wp_reset_postdata();
|
337 |
+
}
|
338 |
+
?>
|
339 |
+
total = post_type_count[ settings.post_type ];
|
340 |
+
label = post_type_labels[ settings.post_type ];
|
341 |
+
break;
|
342 |
+
}
|
343 |
+
|
344 |
+
var number_animation_class = '';
|
345 |
+
if ( '' !== settings.number_hover_animation ) {
|
346 |
+
number_animation_class = 'elementor-animation-' + settings.number_hover_animation;
|
347 |
+
}
|
348 |
+
var label_animation_class = '';
|
349 |
+
if ( '' !== settings.label_hover_animation ) {
|
350 |
+
label_animation_class = 'elementor-animation-' + settings.label_hover_animation;
|
351 |
+
}
|
352 |
+
|
353 |
+
var html = '<div class="press-elements-site-counters">';
|
354 |
+
html += '<' + settings.html_tag + ' class="press-elements-total ' + number_animation_class + '">' + total + '</' + settings.html_tag + '>';
|
355 |
+
html += '<' + settings.html_tag + ' class="press-elements-label ' + label_animation_class + '">' + label + '</' + settings.html_tag + '>';
|
356 |
+
html += '</div>';
|
357 |
+
|
358 |
+
print( html );
|
359 |
+
#>
|
360 |
+
<?php
|
361 |
+
*/
|
362 |
+
}
|
363 |
+
}
|
widgets/site-description.php
CHANGED
@@ -1,257 +1,257 @@
|
|
1 |
-
<?php
|
2 |
-
namespace PressElements\Widgets;
|
3 |
-
|
4 |
-
use Elementor\Widget_Base;
|
5 |
-
use Elementor\Controls_Manager;
|
6 |
-
use Elementor\Scheme_Color;
|
7 |
-
use Elementor\Scheme_Typography;
|
8 |
-
use Elementor\Group_Control_Typography;
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
// Exit if accessed directly
|
13 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
14 |
-
exit;
|
15 |
-
}
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Press Elements Site Description
|
21 |
-
*
|
22 |
-
* Site description element for elementor.
|
23 |
-
*
|
24 |
-
* @since 1.0.0
|
25 |
-
*/
|
26 |
-
class Press_Elements_Site_Description extends Widget_Base {
|
27 |
-
|
28 |
-
public function get_name() {
|
29 |
-
return 'site-description';
|
30 |
-
}
|
31 |
-
|
32 |
-
public function get_title() {
|
33 |
-
return __( 'Site Description', 'press-elements' );
|
34 |
-
}
|
35 |
-
|
36 |
-
public function get_icon() {
|
37 |
-
return 'fa fa-file-text-o';
|
38 |
-
}
|
39 |
-
|
40 |
-
public function get_categories() {
|
41 |
-
return [ 'press-elements-site-elements' ];
|
42 |
-
}
|
43 |
-
|
44 |
-
protected function _register_controls() {
|
45 |
-
|
46 |
-
$this->start_controls_section(
|
47 |
-
'section_content',
|
48 |
-
[
|
49 |
-
'label' => __( 'Site Description', 'press-elements' ),
|
50 |
-
]
|
51 |
-
);
|
52 |
-
|
53 |
-
$this->add_control(
|
54 |
-
'html_tag',
|
55 |
-
[
|
56 |
-
'label' => __( 'HTML Tag', 'press-elements' ),
|
57 |
-
'type' => Controls_Manager::SELECT,
|
58 |
-
'options' => [
|
59 |
-
'h1' => __( 'H1', 'press-elements' ),
|
60 |
-
'h2' => __( 'H2', 'press-elements' ),
|
61 |
-
'h3' => __( 'H3', 'press-elements' ),
|
62 |
-
'h4' => __( 'H4', 'press-elements' ),
|
63 |
-
'h5' => __( 'H5', 'press-elements' ),
|
64 |
-
'h6' => __( 'H6', 'press-elements' ),
|
65 |
-
'p' => __( 'p', 'press-elements' ),
|
66 |
-
'div' => __( 'div', 'press-elements' ),
|
67 |
-
'span' => __( 'span', 'press-elements' ),
|
68 |
-
],
|
69 |
-
'default' => 'p',
|
70 |
-
]
|
71 |
-
);
|
72 |
-
|
73 |
-
$this->add_responsive_control(
|
74 |
-
'align',
|
75 |
-
[
|
76 |
-
'label' => __( 'Alignment', 'press-elements' ),
|
77 |
-
'type' => Controls_Manager::CHOOSE,
|
78 |
-
'options' => [
|
79 |
-
'left' => [
|
80 |
-
'title' => __( 'Left', 'press-elements' ),
|
81 |
-
'icon' => 'fa fa-align-left',
|
82 |
-
],
|
83 |
-
'center' => [
|
84 |
-
'title' => __( 'Center', 'press-elements' ),
|
85 |
-
'icon' => 'fa fa-align-center',
|
86 |
-
],
|
87 |
-
'right' => [
|
88 |
-
'title' => __( 'Right', 'press-elements' ),
|
89 |
-
'icon' => 'fa fa-align-right',
|
90 |
-
],
|
91 |
-
'justify' => [
|
92 |
-
'title' => __( 'Justified', 'press-elements' ),
|
93 |
-
'icon' => 'fa fa-align-justify',
|
94 |
-
],
|
95 |
-
],
|
96 |
-
'default' => '',
|
97 |
-
'selectors' => [
|
98 |
-
'{{WRAPPER}}' => 'text-align: {{VALUE}};',
|
99 |
-
],
|
100 |
-
]
|
101 |
-
);
|
102 |
-
|
103 |
-
$this->add_control(
|
104 |
-
'link_to',
|
105 |
-
[
|
106 |
-
'label' => __( 'Link to', 'press-elements' ),
|
107 |
-
'type' => Controls_Manager::SELECT,
|
108 |
-
'default' => 'none',
|
109 |
-
'options' => [
|
110 |
-
'none' => __( 'None', 'press-elements' ),
|
111 |
-
'home' => __( 'Home URL', 'press-elements' ),
|
112 |
-
'custom' => __( 'Custom URL', 'press-elements' ),
|
113 |
-
],
|
114 |
-
]
|
115 |
-
);
|
116 |
-
|
117 |
-
$this->add_control(
|
118 |
-
'link',
|
119 |
-
[
|
120 |
-
'label' => __( 'Link', 'press-elements' ),
|
121 |
-
'type' => Controls_Manager::URL,
|
122 |
-
'placeholder' => __( 'http://your-link.com', 'press-elements' ),
|
123 |
-
'condition' => [
|
124 |
-
'link_to' => 'custom',
|
125 |
-
],
|
126 |
-
'default' => [
|
127 |
-
'url' => '',
|
128 |
-
],
|
129 |
-
'show_label' => false,
|
130 |
-
]
|
131 |
-
);
|
132 |
-
|
133 |
-
$this->end_controls_section();
|
134 |
-
|
135 |
-
$this->start_controls_section(
|
136 |
-
'section_style',
|
137 |
-
[
|
138 |
-
'label' => __( 'Site Description', 'press-elements' ),
|
139 |
-
'tab' => Controls_Manager::TAB_STYLE,
|
140 |
-
]
|
141 |
-
);
|
142 |
-
|
143 |
-
$this->add_control(
|
144 |
-
'color',
|
145 |
-
[
|
146 |
-
'label' => __( 'Text Color', 'press-elements' ),
|
147 |
-
'type' => Controls_Manager::COLOR,
|
148 |
-
'scheme' => [
|
149 |
-
'type' => Scheme_Color::get_type(),
|
150 |
-
'value' => Scheme_Color::COLOR_1,
|
151 |
-
],
|
152 |
-
'selectors' => [
|
153 |
-
'{{WRAPPER}} .press-elements-site-description' => 'color: {{VALUE}};',
|
154 |
-
'{{WRAPPER}} .press-elements-site-description a' => 'color: {{VALUE}};',
|
155 |
-
],
|
156 |
-
]
|
157 |
-
);
|
158 |
-
|
159 |
-
$this->add_group_control(
|
160 |
-
Group_Control_Typography::get_type(),
|
161 |
-
[
|
162 |
-
'name' => 'typography',
|
163 |
-
'scheme' => Scheme_Typography::TYPOGRAPHY_1,
|
164 |
-
'selector' => '{{WRAPPER}} .press-elements-site-description',
|
165 |
-
]
|
166 |
-
);
|
167 |
-
|
168 |
-
$this->add_control(
|
169 |
-
'hover_animation',
|
170 |
-
[
|
171 |
-
'label' => __( 'Hover Animation', 'press-elements' ),
|
172 |
-
'type' => Controls_Manager::HOVER_ANIMATION,
|
173 |
-
]
|
174 |
-
);
|
175 |
-
|
176 |
-
$this->end_controls_section();
|
177 |
-
|
178 |
-
}
|
179 |
-
|
180 |
-
protected function render() {
|
181 |
-
$description = get_bloginfo( 'description' );
|
182 |
-
|
183 |
-
if ( empty( $description ) )
|
184 |
-
return;
|
185 |
-
|
186 |
-
$settings = $this->get_settings();
|
187 |
-
|
188 |
-
switch ( $settings['link_to'] ) {
|
189 |
-
case 'custom' :
|
190 |
-
if ( ! empty( $settings['link']['url'] ) ) {
|
191 |
-
$link = esc_url( $settings['link']['url'] );
|
192 |
-
} else {
|
193 |
-
$link = false;
|
194 |
-
}
|
195 |
-
break;
|
196 |
-
|
197 |
-
case 'home' :
|
198 |
-
$link = esc_url( get_home_url() );
|
199 |
-
break;
|
200 |
-
|
201 |
-
case 'none' :
|
202 |
-
default:
|
203 |
-
$link = false;
|
204 |
-
break;
|
205 |
-
}
|
206 |
-
$target = $settings['link']['is_external'] ? 'target="_blank"' : '';
|
207 |
-
|
208 |
-
$animation_class = ! empty( $settings['hover_animation'] ) ? 'elementor-animation-' . $settings['hover_animation'] : '';
|
209 |
-
|
210 |
-
$html = sprintf( '<%1$s class="press-elements-site-description %2$s">', $settings['html_tag'], $animation_class );
|
211 |
-
if ( $link ) {
|
212 |
-
$html .= sprintf( '<a href="%1$s" %2$s>%3$s</a>', $link, $target, $description );
|
213 |
-
} else {
|
214 |
-
$html .= $description;
|
215 |
-
}
|
216 |
-
$html .= sprintf( '</%s>', $settings['html_tag'] );
|
217 |
-
|
218 |
-
echo $html;
|
219 |
-
}
|
220 |
-
|
221 |
-
protected function _content_template() {
|
222 |
-
?>
|
223 |
-
<#
|
224 |
-
var description = '<?php echo get_bloginfo( 'description' ); ?>';
|
225 |
-
|
226 |
-
var link_url;
|
227 |
-
switch( settings.link_to ) {
|
228 |
-
case 'custom':
|
229 |
-
link_url = settings.link.url;
|
230 |
-
break;
|
231 |
-
case 'home':
|
232 |
-
link_url = '<?php echo esc_url( get_home_url() ); ?>';
|
233 |
-
break;
|
234 |
-
case 'none':
|
235 |
-
default:
|
236 |
-
link_url = false;
|
237 |
-
}
|
238 |
-
var target = settings.link.is_external ? 'target="_blank"' : '';
|
239 |
-
|
240 |
-
var animation_class = '';
|
241 |
-
if ( '' !== settings.hover_animation ) {
|
242 |
-
animation_class = 'elementor-animation-' + settings.hover_animation;
|
243 |
-
}
|
244 |
-
|
245 |
-
var html = '<' + settings.html_tag + ' class="press-elements-site-description ' + animation_class + '">';
|
246 |
-
if ( link_url ) {
|
247 |
-
html += '<a href="' + link_url + '" ' + target + '>' + description + '</a>';
|
248 |
-
} else {
|
249 |
-
html += description;
|
250 |
-
}
|
251 |
-
html += '</' + settings.html_tag + '>';
|
252 |
-
|
253 |
-
print( html );
|
254 |
-
#>
|
255 |
-
<?php
|
256 |
-
}
|
257 |
-
}
|
1 |
+
<?php
|
2 |
+
namespace PressElements\Widgets;
|
3 |
+
|
4 |
+
use Elementor\Widget_Base;
|
5 |
+
use Elementor\Controls_Manager;
|
6 |
+
use Elementor\Scheme_Color;
|
7 |
+
use Elementor\Scheme_Typography;
|
8 |
+
use Elementor\Group_Control_Typography;
|
9 |
+
|
10 |
+
|
11 |
+
|
12 |
+
// Exit if accessed directly
|
13 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
14 |
+
exit;
|
15 |
+
}
|
16 |
+
|
17 |
+
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Press Elements Site Description
|
21 |
+
*
|
22 |
+
* Site description element for elementor.
|
23 |
+
*
|
24 |
+
* @since 1.0.0
|
25 |
+
*/
|
26 |
+
class Press_Elements_Site_Description extends Widget_Base {
|
27 |
+
|
28 |
+
public function get_name() {
|
29 |
+
return 'site-description';
|
30 |
+
}
|
31 |
+
|
32 |
+
public function get_title() {
|
33 |
+
return __( 'Site Description', 'press-elements' );
|
34 |
+
}
|
35 |
+
|
36 |
+
public function get_icon() {
|
37 |
+
return 'fa fa-file-text-o';
|
38 |
+
}
|
39 |
+
|
40 |
+
public function get_categories() {
|
41 |
+
return [ 'press-elements-site-elements' ];
|
42 |
+
}
|
43 |
+
|
44 |
+
protected function _register_controls() {
|
45 |
+
|
46 |
+
$this->start_controls_section(
|
47 |
+
'section_content',
|
48 |
+
[
|
49 |
+
'label' => __( 'Site Description', 'press-elements' ),
|
50 |
+
]
|
51 |
+
);
|
52 |
+
|
53 |
+
$this->add_control(
|
54 |
+
'html_tag',
|
55 |
+
[
|
56 |
+
'label' => __( 'HTML Tag', 'press-elements' ),
|
57 |
+
'type' => Controls_Manager::SELECT,
|
58 |
+
'options' => [
|
59 |
+
'h1' => __( 'H1', 'press-elements' ),
|
60 |
+
'h2' => __( 'H2', 'press-elements' ),
|
61 |
+
'h3' => __( 'H3', 'press-elements' ),
|
62 |
+
'h4' => __( 'H4', 'press-elements' ),
|
63 |
+
'h5' => __( 'H5', 'press-elements' ),
|
64 |
+
'h6' => __( 'H6', 'press-elements' ),
|
65 |
+
'p' => __( 'p', 'press-elements' ),
|
66 |
+
'div' => __( 'div', 'press-elements' ),
|
67 |
+
'span' => __( 'span', 'press-elements' ),
|
68 |
+
],
|
69 |
+
'default' => 'p',
|
70 |
+
]
|
71 |
+
);
|
72 |
+
|
73 |
+
$this->add_responsive_control(
|
74 |
+
'align',
|
75 |
+
[
|
76 |
+
'label' => __( 'Alignment', 'press-elements' ),
|
77 |
+
'type' => Controls_Manager::CHOOSE,
|
78 |
+
'options' => [
|
79 |
+
'left' => [
|
80 |
+
'title' => __( 'Left', 'press-elements' ),
|
81 |
+
'icon' => 'fa fa-align-left',
|
82 |
+
],
|
83 |
+
'center' => [
|
84 |
+
'title' => __( 'Center', 'press-elements' ),
|
85 |
+
'icon' => 'fa fa-align-center',
|
86 |
+
],
|
87 |
+
'right' => [
|
88 |
+
'title' => __( 'Right', 'press-elements' ),
|
89 |
+
'icon' => 'fa fa-align-right',
|
90 |
+
],
|
91 |
+
'justify' => [
|
92 |
+
'title' => __( 'Justified', 'press-elements' ),
|
93 |
+
'icon' => 'fa fa-align-justify',
|
94 |
+
],
|
95 |
+
],
|
96 |
+
'default' => '',
|
97 |
+
'selectors' => [
|
98 |
+
'{{WRAPPER}}' => 'text-align: {{VALUE}};',
|
99 |
+
],
|
100 |
+
]
|
101 |
+
);
|
102 |
+
|
103 |
+
$this->add_control(
|
104 |
+
'link_to',
|
105 |
+
[
|
106 |
+
'label' => __( 'Link to', 'press-elements' ),
|
107 |
+
'type' => Controls_Manager::SELECT,
|
108 |
+
'default' => 'none',
|
109 |
+
'options' => [
|
110 |
+
'none' => __( 'None', 'press-elements' ),
|
111 |
+
'home' => __( 'Home URL', 'press-elements' ),
|
112 |
+
'custom' => __( 'Custom URL', 'press-elements' ),
|
113 |
+
],
|
114 |
+
]
|
115 |
+
);
|
116 |
+
|
117 |
+
$this->add_control(
|
118 |
+
'link',
|
119 |
+
[
|
120 |
+
'label' => __( 'Link', 'press-elements' ),
|
121 |
+
'type' => Controls_Manager::URL,
|
122 |
+
'placeholder' => __( 'http://your-link.com', 'press-elements' ),
|
123 |
+
'condition' => [
|
124 |
+
'link_to' => 'custom',
|
125 |
+
],
|
126 |
+
'default' => [
|
127 |
+
'url' => '',
|
128 |
+
],
|
129 |
+
'show_label' => false,
|
130 |
+
]
|
131 |
+
);
|
132 |
+
|
133 |
+
$this->end_controls_section();
|
134 |
+
|
135 |
+
$this->start_controls_section(
|
136 |
+
'section_style',
|
137 |
+
[
|
138 |
+
'label' => __( 'Site Description', 'press-elements' ),
|
139 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
140 |
+
]
|
141 |
+
);
|
142 |
+
|
143 |
+
$this->add_control(
|
144 |
+
'color',
|
145 |
+
[
|
146 |
+
'label' => __( 'Text Color', 'press-elements' ),
|
147 |
+
'type' => Controls_Manager::COLOR,
|
148 |
+
'scheme' => [
|
149 |
+
'type' => Scheme_Color::get_type(),
|
150 |
+
'value' => Scheme_Color::COLOR_1,
|
151 |
+
],
|
152 |
+
'selectors' => [
|
153 |
+
'{{WRAPPER}} .press-elements-site-description' => 'color: {{VALUE}};',
|
154 |
+
'{{WRAPPER}} .press-elements-site-description a' => 'color: {{VALUE}};',
|
155 |
+
],
|
156 |
+
]
|
157 |
+
);
|
158 |
+
|
159 |
+
$this->add_group_control(
|
160 |
+
Group_Control_Typography::get_type(),
|
161 |
+
[
|
162 |
+
'name' => 'typography',
|
163 |
+
'scheme' => Scheme_Typography::TYPOGRAPHY_1,
|
164 |
+
'selector' => '{{WRAPPER}} .press-elements-site-description',
|
165 |
+
]
|
166 |
+
);
|
167 |
+
|
168 |
+
$this->add_control(
|
169 |
+
'hover_animation',
|
170 |
+
[
|
171 |
+
'label' => __( 'Hover Animation', 'press-elements' ),
|
172 |
+
'type' => Controls_Manager::HOVER_ANIMATION,
|
173 |
+
]
|
174 |
+
);
|
175 |
+
|
176 |
+
$this->end_controls_section();
|
177 |
+
|
178 |
+
}
|
179 |
+
|
180 |
+
protected function render() {
|
181 |
+
$description = get_bloginfo( 'description' );
|
182 |
+
|
183 |
+
if ( empty( $description ) )
|
184 |
+
return;
|
185 |
+
|
186 |
+
$settings = $this->get_settings();
|
187 |
+
|
188 |
+
switch ( $settings['link_to'] ) {
|
189 |
+
case 'custom' :
|
190 |
+
if ( ! empty( $settings['link']['url'] ) ) {
|
191 |
+
$link = esc_url( $settings['link']['url'] );
|
192 |
+
} else {
|
193 |
+
$link = false;
|
194 |
+
}
|
195 |
+
break;
|
196 |
+
|
197 |
+
case 'home' :
|
198 |
+
$link = esc_url( get_home_url() );
|
199 |
+
break;
|
200 |
+
|
201 |
+
case 'none' :
|
202 |
+
default:
|
203 |
+
$link = false;
|
204 |
+
break;
|
205 |
+
}
|
206 |
+
$target = $settings['link']['is_external'] ? 'target="_blank"' : '';
|
207 |
+
|
208 |
+
$animation_class = ! empty( $settings['hover_animation'] ) ? 'elementor-animation-' . $settings['hover_animation'] : '';
|
209 |
+
|
210 |
+
$html = sprintf( '<%1$s class="press-elements-site-description %2$s">', $settings['html_tag'], $animation_class );
|
211 |
+
if ( $link ) {
|
212 |
+
$html .= sprintf( '<a href="%1$s" %2$s>%3$s</a>', $link, $target, $description );
|
213 |
+
} else {
|
214 |
+
$html .= $description;
|
215 |
+
}
|
216 |
+
$html .= sprintf( '</%s>', $settings['html_tag'] );
|
217 |
+
|
218 |
+
echo $html;
|
219 |
+
}
|
220 |
+
|
221 |
+
protected function _content_template() {
|
222 |
+
?>
|
223 |
+
<#
|
224 |
+
var description = '<?php echo get_bloginfo( 'description' ); ?>';
|
225 |
+
|
226 |
+
var link_url;
|
227 |
+
switch( settings.link_to ) {
|
228 |
+
case 'custom':
|
229 |
+
link_url = settings.link.url;
|
230 |
+
break;
|
231 |
+
case 'home':
|
232 |
+
link_url = '<?php echo esc_url( get_home_url() ); ?>';
|
233 |
+
break;
|
234 |
+
case 'none':
|
235 |
+
default:
|
236 |
+
link_url = false;
|
237 |
+
}
|
238 |
+
var target = settings.link.is_external ? 'target="_blank"' : '';
|
239 |
+
|
240 |
+
var animation_class = '';
|
241 |
+
if ( '' !== settings.hover_animation ) {
|
242 |
+
animation_class = 'elementor-animation-' + settings.hover_animation;
|
243 |
+
}
|
244 |
+
|
245 |
+
var html = '<' + settings.html_tag + ' class="press-elements-site-description ' + animation_class + '">';
|
246 |
+
if ( link_url ) {
|
247 |
+
html += '<a href="' + link_url + '" ' + target + '>' + description + '</a>';
|
248 |
+
} else {
|
249 |
+
html += description;
|
250 |
+
}
|
251 |
+
html += '</' + settings.html_tag + '>';
|
252 |
+
|
253 |
+
print( html );
|
254 |
+
#>
|
255 |
+
<?php
|
256 |
+
}
|
257 |
+
}
|
widgets/site-logo.php
CHANGED
@@ -1,337 +1,341 @@
|
|
1 |
-
<?php
|
2 |
-
namespace PressElements\Widgets;
|
3 |
-
|
4 |
-
use Elementor\Widget_Base;
|
5 |
-
use Elementor\Controls_Manager;
|
6 |
-
use Elementor\Group_Control_Border;
|
7 |
-
use Elementor\Group_Control_Box_Shadow;
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
// Exit if accessed directly
|
12 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
13 |
-
exit;
|
14 |
-
}
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
/**
|
19 |
-
* Press Elements Site Logo
|
20 |
-
*
|
21 |
-
* Site logo element for elementor.
|
22 |
-
*
|
23 |
-
* @since 1.2.0
|
24 |
-
*/
|
25 |
-
class Press_Elements_Site_logo extends Widget_Base {
|
26 |
-
|
27 |
-
public function get_name() {
|
28 |
-
return 'site-logo';
|
29 |
-
}
|
30 |
-
|
31 |
-
public function get_title() {
|
32 |
-
return __( 'Site Logo', 'press-elements' );
|
33 |
-
}
|
34 |
-
|
35 |
-
public function get_icon() {
|
36 |
-
return 'fa fa-crosshairs';
|
37 |
-
}
|
38 |
-
|
39 |
-
public function get_categories() {
|
40 |
-
return [ 'press-elements-site-elements' ];
|
41 |
-
}
|
42 |
-
|
43 |
-
protected function _register_controls() {
|
44 |
-
|
45 |
-
$this->start_controls_section(
|
46 |
-
'section_content',
|
47 |
-
[
|
48 |
-
'label' => __( 'Site Logo', 'press-elements' ),
|
49 |
-
]
|
50 |
-
);
|
51 |
-
|
52 |
-
$this->add_control(
|
53 |
-
'preview',
|
54 |
-
[
|
55 |
-
'type' => Controls_Manager::RAW_HTML,
|
56 |
-
'raw' => '<center>' . get_custom_logo() . '</center>',
|
57 |
-
]
|
58 |
-
);
|
59 |
-
|
60 |
-
$this->add_control(
|
61 |
-
'html_tag',
|
62 |
-
[
|
63 |
-
'label' => __( 'HTML Tag', 'press-elements' ),
|
64 |
-
'type' => Controls_Manager::SELECT,
|
65 |
-
'options' => [
|
66 |
-
'h1' => __( 'H1', 'press-elements' ),
|
67 |
-
'h2' => __( 'H2', 'press-elements' ),
|
68 |
-
'h3' => __( 'H3', 'press-elements' ),
|
69 |
-
'h4' => __( 'H4', 'press-elements' ),
|
70 |
-
'h5' => __( 'H5', 'press-elements' ),
|
71 |
-
'h6' => __( 'H6', 'press-elements' ),
|
72 |
-
'p' => __( 'p', 'press-elements' ),
|
73 |
-
'div' => __( 'div', 'press-elements' ),
|
74 |
-
'span' => __( 'span', 'press-elements' ),
|
75 |
-
],
|
76 |
-
'default' => 'div',
|
77 |
-
]
|
78 |
-
);
|
79 |
-
|
80 |
-
$this->add_responsive_control(
|
81 |
-
'align',
|
82 |
-
[
|
83 |
-
'label' => __( 'Alignment', 'press-elements' ),
|
84 |
-
'type' => Controls_Manager::CHOOSE,
|
85 |
-
'options' => [
|
86 |
-
'left' => [
|
87 |
-
'title' => __( 'Left', 'press-elements' ),
|
88 |
-
'icon' => 'fa fa-align-left',
|
89 |
-
],
|
90 |
-
'center' => [
|
91 |
-
'title' => __( 'Center', 'press-elements' ),
|
92 |
-
'icon' => 'fa fa-align-center',
|
93 |
-
],
|
94 |
-
'right' => [
|
95 |
-
'title' => __( 'Right', 'press-elements' ),
|
96 |
-
'icon' => 'fa fa-align-right',
|
97 |
-
],
|
98 |
-
'justify' => [
|
99 |
-
'title' => __( 'Justified', 'press-elements' ),
|
100 |
-
'icon' => 'fa fa-align-justify',
|
101 |
-
],
|
102 |
-
],
|
103 |
-
'default' => '',
|
104 |
-
'selectors' => [
|
105 |
-
'{{WRAPPER}}' => 'text-align: {{VALUE}};',
|
106 |
-
],
|
107 |
-
]
|
108 |
-
);
|
109 |
-
|
110 |
-
$this->add_control(
|
111 |
-
'link_to',
|
112 |
-
[
|
113 |
-
'label' => __( 'Link to', 'press-elements' ),
|
114 |
-
'type' => Controls_Manager::SELECT,
|
115 |
-
'default' => 'none',
|
116 |
-
'options' => [
|
117 |
-
'none' => __( 'None', 'press-elements' ),
|
118 |
-
'home' => __( 'Home URL', 'press-elements' ),
|
119 |
-
'custom' => __( 'Custom URL', 'press-elements' ),
|
120 |
-
],
|
121 |
-
]
|
122 |
-
);
|
123 |
-
|
124 |
-
$this->add_control(
|
125 |
-
'link',
|
126 |
-
[
|
127 |
-
'label' => __( 'Link', 'press-elements' ),
|
128 |
-
'type' => Controls_Manager::URL,
|
129 |
-
'placeholder' => __( 'http://your-link.com', 'press-elements' ),
|
130 |
-
'condition' => [
|
131 |
-
'link_to' => 'custom',
|
132 |
-
],
|
133 |
-
'default' => [
|
134 |
-
'url' => '',
|
135 |
-
],
|
136 |
-
'show_label' => false,
|
137 |
-
]
|
138 |
-
);
|
139 |
-
|
140 |
-
$this->end_controls_section();
|
141 |
-
|
142 |
-
$this->start_controls_section(
|
143 |
-
'section_style',
|
144 |
-
[
|
145 |
-
'label' => __( 'Site Logo', 'press-elements' ),
|
146 |
-
'tab' => Controls_Manager::TAB_STYLE,
|
147 |
-
]
|
148 |
-
);
|
149 |
-
|
150 |
-
$this->add_control(
|
151 |
-
'space',
|
152 |
-
[
|
153 |
-
'label' => __( 'Size (%)', 'press-elements' ),
|
154 |
-
'type' => Controls_Manager::SLIDER,
|
155 |
-
'default' => [
|
156 |
-
'size' => 100,
|
157 |
-
'unit' => '%',
|
158 |
-
],
|
159 |
-
'size_units' => [ '%' ],
|
160 |
-
'range' => [
|
161 |
-
'%' => [
|
162 |
-
'min' => 1,
|
163 |
-
'max' => 100,
|
164 |
-
],
|
165 |
-
],
|
166 |
-
'selectors' => [
|
167 |
-
'{{WRAPPER}} .press-elements-site-logo img' => 'max-width: {{SIZE}}{{UNIT}};',
|
168 |
-
],
|
169 |
-
]
|
170 |
-
);
|
171 |
-
|
172 |
-
$this->add_control(
|
173 |
-
'opacity',
|
174 |
-
[
|
175 |
-
'label' => __( 'Opacity (%)', 'press-elements' ),
|
176 |
-
'type' => Controls_Manager::SLIDER,
|
177 |
-
'default' => [
|
178 |
-
'size' => 1,
|
179 |
-
],
|
180 |
-
'range' => [
|
181 |
-
'px' => [
|
182 |
-
'max' => 1,
|
183 |
-
'min' => 0.10,
|
184 |
-
'step' => 0.01,
|
185 |
-
],
|
186 |
-
],
|
187 |
-
'selectors' => [
|
188 |
-
'{{WRAPPER}} .press-elements-site-logo img' => 'opacity: {{SIZE}};',
|
189 |
-
],
|
190 |
-
]
|
191 |
-
);
|
192 |
-
|
193 |
-
$this->add_control(
|
194 |
-
'angle',
|
195 |
-
[
|
196 |
-
'label' => __( 'Angle (deg)', 'press-elements' ),
|
197 |
-
'type' => Controls_Manager::SLIDER,
|
198 |
-
'size_units' => [ 'deg' ],
|
199 |
-
'default' => [
|
200 |
-
'unit' => 'deg',
|
201 |
-
'size' => 0,
|
202 |
-
],
|
203 |
-
'range' => [
|
204 |
-
'deg' => [
|
205 |
-
'max' => 360,
|
206 |
-
'min' => -360,
|
207 |
-
'step' => 1,
|
208 |
-
],
|
209 |
-
],
|
210 |
-
'selectors' => [
|
211 |
-
'{{WRAPPER}} .press-elements-site-logo img' => '-webkit-transform: rotate({{SIZE}}deg); -moz-transform: rotate({{SIZE}}deg); -ms-transform: rotate({{SIZE}}deg); -o-transform: rotate({{SIZE}}deg); transform: rotate({{SIZE}}deg);',
|
212 |
-
],
|
213 |
-
]
|
214 |
-
);
|
215 |
-
|
216 |
-
$this->add_control(
|
217 |
-
'hover_animation',
|
218 |
-
[
|
219 |
-
'label' => __( 'Hover Animation', 'press-elements' ),
|
220 |
-
'type' => Controls_Manager::HOVER_ANIMATION,
|
221 |
-
]
|
222 |
-
);
|
223 |
-
|
224 |
-
$this->add_group_control(
|
225 |
-
Group_Control_Border::get_type(),
|
226 |
-
[
|
227 |
-
'name' => 'image_border',
|
228 |
-
'label' => __( 'Image Border', 'press-elements' ),
|
229 |
-
'selector' => '{{WRAPPER}} .press-elements-site-logo img',
|
230 |
-
]
|
231 |
-
);
|
232 |
-
|
233 |
-
$this->add_control(
|
234 |
-
'image_border_radius',
|
235 |
-
[
|
236 |
-
'label' => __( 'Border Radius', 'press-elements' ),
|
237 |
-
'type' => Controls_Manager::DIMENSIONS,
|
238 |
-
'size_units' => [ 'px', '%' ],
|
239 |
-
'selectors' => [
|
240 |
-
'{{WRAPPER}} .press-elements-site-logo img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
241 |
-
],
|
242 |
-
]
|
243 |
-
);
|
244 |
-
|
245 |
-
$this->add_group_control(
|
246 |
-
Group_Control_Box_Shadow::get_type(),
|
247 |
-
[
|
248 |
-
'name' => 'image_box_shadow',
|
249 |
-
'selector' => '{{WRAPPER}} .press-elements-site-logo img',
|
250 |
-
]
|
251 |
-
);
|
252 |
-
|
253 |
-
$this->end_controls_section();
|
254 |
-
|
255 |
-
}
|
256 |
-
|
257 |
-
protected function render() {
|
258 |
-
|
259 |
-
$settings = $this->get_settings();
|
260 |
-
|
261 |
-
$
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
$link =
|
272 |
-
}
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
$
|
287 |
-
|
288 |
-
$
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
$html .= $logo;
|
293 |
-
}
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
link_url =
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace PressElements\Widgets;
|
3 |
+
|
4 |
+
use Elementor\Widget_Base;
|
5 |
+
use Elementor\Controls_Manager;
|
6 |
+
use Elementor\Group_Control_Border;
|
7 |
+
use Elementor\Group_Control_Box_Shadow;
|
8 |
+
|
9 |
+
|
10 |
+
|
11 |
+
// Exit if accessed directly
|
12 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
13 |
+
exit;
|
14 |
+
}
|
15 |
+
|
16 |
+
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Press Elements Site Logo
|
20 |
+
*
|
21 |
+
* Site logo element for elementor.
|
22 |
+
*
|
23 |
+
* @since 1.2.0
|
24 |
+
*/
|
25 |
+
class Press_Elements_Site_logo extends Widget_Base {
|
26 |
+
|
27 |
+
public function get_name() {
|
28 |
+
return 'site-logo';
|
29 |
+
}
|
30 |
+
|
31 |
+
public function get_title() {
|
32 |
+
return __( 'Site Logo', 'press-elements' );
|
33 |
+
}
|
34 |
+
|
35 |
+
public function get_icon() {
|
36 |
+
return 'fa fa-crosshairs';
|
37 |
+
}
|
38 |
+
|
39 |
+
public function get_categories() {
|
40 |
+
return [ 'press-elements-site-elements' ];
|
41 |
+
}
|
42 |
+
|
43 |
+
protected function _register_controls() {
|
44 |
+
|
45 |
+
$this->start_controls_section(
|
46 |
+
'section_content',
|
47 |
+
[
|
48 |
+
'label' => __( 'Site Logo', 'press-elements' ),
|
49 |
+
]
|
50 |
+
);
|
51 |
+
|
52 |
+
$this->add_control(
|
53 |
+
'preview',
|
54 |
+
[
|
55 |
+
'type' => Controls_Manager::RAW_HTML,
|
56 |
+
'raw' => '<center>' . get_custom_logo() . '</center>',
|
57 |
+
]
|
58 |
+
);
|
59 |
+
|
60 |
+
$this->add_control(
|
61 |
+
'html_tag',
|
62 |
+
[
|
63 |
+
'label' => __( 'HTML Tag', 'press-elements' ),
|
64 |
+
'type' => Controls_Manager::SELECT,
|
65 |
+
'options' => [
|
66 |
+
'h1' => __( 'H1', 'press-elements' ),
|
67 |
+
'h2' => __( 'H2', 'press-elements' ),
|
68 |
+
'h3' => __( 'H3', 'press-elements' ),
|
69 |
+
'h4' => __( 'H4', 'press-elements' ),
|
70 |
+
'h5' => __( 'H5', 'press-elements' ),
|
71 |
+
'h6' => __( 'H6', 'press-elements' ),
|
72 |
+
'p' => __( 'p', 'press-elements' ),
|
73 |
+
'div' => __( 'div', 'press-elements' ),
|
74 |
+
'span' => __( 'span', 'press-elements' ),
|
75 |
+
],
|
76 |
+
'default' => 'div',
|
77 |
+
]
|
78 |
+
);
|
79 |
+
|
80 |
+
$this->add_responsive_control(
|
81 |
+
'align',
|
82 |
+
[
|
83 |
+
'label' => __( 'Alignment', 'press-elements' ),
|
84 |
+
'type' => Controls_Manager::CHOOSE,
|
85 |
+
'options' => [
|
86 |
+
'left' => [
|
87 |
+
'title' => __( 'Left', 'press-elements' ),
|
88 |
+
'icon' => 'fa fa-align-left',
|
89 |
+
],
|
90 |
+
'center' => [
|
91 |
+
'title' => __( 'Center', 'press-elements' ),
|
92 |
+
'icon' => 'fa fa-align-center',
|
93 |
+
],
|
94 |
+
'right' => [
|
95 |
+
'title' => __( 'Right', 'press-elements' ),
|
96 |
+
'icon' => 'fa fa-align-right',
|
97 |
+
],
|
98 |
+
'justify' => [
|
99 |
+
'title' => __( 'Justified', 'press-elements' ),
|
100 |
+
'icon' => 'fa fa-align-justify',
|
101 |
+
],
|
102 |
+
],
|
103 |
+
'default' => '',
|
104 |
+
'selectors' => [
|
105 |
+
'{{WRAPPER}}' => 'text-align: {{VALUE}};',
|
106 |
+
],
|
107 |
+
]
|
108 |
+
);
|
109 |
+
|
110 |
+
$this->add_control(
|
111 |
+
'link_to',
|
112 |
+
[
|
113 |
+
'label' => __( 'Link to', 'press-elements' ),
|
114 |
+
'type' => Controls_Manager::SELECT,
|
115 |
+
'default' => 'none',
|
116 |
+
'options' => [
|
117 |
+
'none' => __( 'None', 'press-elements' ),
|
118 |
+
'home' => __( 'Home URL', 'press-elements' ),
|
119 |
+
'custom' => __( 'Custom URL', 'press-elements' ),
|
120 |
+
],
|
121 |
+
]
|
122 |
+
);
|
123 |
+
|
124 |
+
$this->add_control(
|
125 |
+
'link',
|
126 |
+
[
|
127 |
+
'label' => __( 'Link', 'press-elements' ),
|
128 |
+
'type' => Controls_Manager::URL,
|
129 |
+
'placeholder' => __( 'http://your-link.com', 'press-elements' ),
|
130 |
+
'condition' => [
|
131 |
+
'link_to' => 'custom',
|
132 |
+
],
|
133 |
+
'default' => [
|
134 |
+
'url' => '',
|
135 |
+
],
|
136 |
+
'show_label' => false,
|
137 |
+
]
|
138 |
+
);
|
139 |
+
|
140 |
+
$this->end_controls_section();
|
141 |
+
|
142 |
+
$this->start_controls_section(
|
143 |
+
'section_style',
|
144 |
+
[
|
145 |
+
'label' => __( 'Site Logo', 'press-elements' ),
|
146 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
147 |
+
]
|
148 |
+
);
|
149 |
+
|
150 |
+
$this->add_control(
|
151 |
+
'space',
|
152 |
+
[
|
153 |
+
'label' => __( 'Size (%)', 'press-elements' ),
|
154 |
+
'type' => Controls_Manager::SLIDER,
|
155 |
+
'default' => [
|
156 |
+
'size' => 100,
|
157 |
+
'unit' => '%',
|
158 |
+
],
|
159 |
+
'size_units' => [ '%' ],
|
160 |
+
'range' => [
|
161 |
+
'%' => [
|
162 |
+
'min' => 1,
|
163 |
+
'max' => 100,
|
164 |
+
],
|
165 |
+
],
|
166 |
+
'selectors' => [
|
167 |
+
'{{WRAPPER}} .press-elements-site-logo img' => 'max-width: {{SIZE}}{{UNIT}};',
|
168 |
+
],
|
169 |
+
]
|
170 |
+
);
|
171 |
+
|
172 |
+
$this->add_control(
|
173 |
+
'opacity',
|
174 |
+
[
|
175 |
+
'label' => __( 'Opacity (%)', 'press-elements' ),
|
176 |
+
'type' => Controls_Manager::SLIDER,
|
177 |
+
'default' => [
|
178 |
+
'size' => 1,
|
179 |
+
],
|
180 |
+
'range' => [
|
181 |
+
'px' => [
|
182 |
+
'max' => 1,
|
183 |
+
'min' => 0.10,
|
184 |
+
'step' => 0.01,
|
185 |
+
],
|
186 |
+
],
|
187 |
+
'selectors' => [
|
188 |
+
'{{WRAPPER}} .press-elements-site-logo img' => 'opacity: {{SIZE}};',
|
189 |
+
],
|
190 |
+
]
|
191 |
+
);
|
192 |
+
|
193 |
+
$this->add_control(
|
194 |
+
'angle',
|
195 |
+
[
|
196 |
+
'label' => __( 'Angle (deg)', 'press-elements' ),
|
197 |
+
'type' => Controls_Manager::SLIDER,
|
198 |
+
'size_units' => [ 'deg' ],
|
199 |
+
'default' => [
|
200 |
+
'unit' => 'deg',
|
201 |
+
'size' => 0,
|
202 |
+
],
|
203 |
+
'range' => [
|
204 |
+
'deg' => [
|
205 |
+
'max' => 360,
|
206 |
+
'min' => -360,
|
207 |
+
'step' => 1,
|
208 |
+
],
|
209 |
+
],
|
210 |
+
'selectors' => [
|
211 |
+
'{{WRAPPER}} .press-elements-site-logo img' => '-webkit-transform: rotate({{SIZE}}deg); -moz-transform: rotate({{SIZE}}deg); -ms-transform: rotate({{SIZE}}deg); -o-transform: rotate({{SIZE}}deg); transform: rotate({{SIZE}}deg);',
|
212 |
+
],
|
213 |
+
]
|
214 |
+
);
|
215 |
+
|
216 |
+
$this->add_control(
|
217 |
+
'hover_animation',
|
218 |
+
[
|
219 |
+
'label' => __( 'Hover Animation', 'press-elements' ),
|
220 |
+
'type' => Controls_Manager::HOVER_ANIMATION,
|
221 |
+
]
|
222 |
+
);
|
223 |
+
|
224 |
+
$this->add_group_control(
|
225 |
+
Group_Control_Border::get_type(),
|
226 |
+
[
|
227 |
+
'name' => 'image_border',
|
228 |
+
'label' => __( 'Image Border', 'press-elements' ),
|
229 |
+
'selector' => '{{WRAPPER}} .press-elements-site-logo img',
|
230 |
+
]
|
231 |
+
);
|
232 |
+
|
233 |
+
$this->add_control(
|
234 |
+
'image_border_radius',
|
235 |
+
[
|
236 |
+
'label' => __( 'Border Radius', 'press-elements' ),
|
237 |
+
'type' => Controls_Manager::DIMENSIONS,
|
238 |
+
'size_units' => [ 'px', '%' ],
|
239 |
+
'selectors' => [
|
240 |
+
'{{WRAPPER}} .press-elements-site-logo img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
241 |
+
],
|
242 |
+
]
|
243 |
+
);
|
244 |
+
|
245 |
+
$this->add_group_control(
|
246 |
+
Group_Control_Box_Shadow::get_type(),
|
247 |
+
[
|
248 |
+
'name' => 'image_box_shadow',
|
249 |
+
'selector' => '{{WRAPPER}} .press-elements-site-logo img',
|
250 |
+
]
|
251 |
+
);
|
252 |
+
|
253 |
+
$this->end_controls_section();
|
254 |
+
|
255 |
+
}
|
256 |
+
|
257 |
+
protected function render() {
|
258 |
+
|
259 |
+
$settings = $this->get_settings();
|
260 |
+
|
261 |
+
$custom_logo_id = get_theme_mod( 'custom_logo' );
|
262 |
+
$image = $custom_logo_id ? wp_get_attachment_image( $custom_logo_id , 'full' ) : '';
|
263 |
+
$logo = has_custom_logo() ? $image : '';
|
264 |
+
|
265 |
+
if ( empty( $logo ) )
|
266 |
+
return;
|
267 |
+
|
268 |
+
switch ( $settings['link_to'] ) {
|
269 |
+
case 'custom' :
|
270 |
+
if ( ! empty( $settings['link']['url'] ) ) {
|
271 |
+
$link = esc_url( $settings['link']['url'] );
|
272 |
+
} else {
|
273 |
+
$link = false;
|
274 |
+
}
|
275 |
+
break;
|
276 |
+
|
277 |
+
case 'home' :
|
278 |
+
$link = esc_url( get_home_url() );
|
279 |
+
break;
|
280 |
+
|
281 |
+
case 'none' :
|
282 |
+
default:
|
283 |
+
$link = false;
|
284 |
+
break;
|
285 |
+
}
|
286 |
+
$target = $settings['link']['is_external'] ? 'target="_blank"' : '';
|
287 |
+
|
288 |
+
$animation_class = ! empty( $settings['hover_animation'] ) ? 'elementor-animation-' . $settings['hover_animation'] : '';
|
289 |
+
|
290 |
+
$html = sprintf( '<%1$s class="press-elements-site-logo %2$s">', $settings['html_tag'], $animation_class );
|
291 |
+
if ( $link ) {
|
292 |
+
$html .= sprintf( '<a href="%1$s" %2$s>%3$s</a>', $link, $target, $logo );
|
293 |
+
} else {
|
294 |
+
$html .= $logo;
|
295 |
+
}
|
296 |
+
$html .= sprintf( '</%s>', $settings['html_tag'] );
|
297 |
+
|
298 |
+
echo $html;
|
299 |
+
}
|
300 |
+
|
301 |
+
protected function _content_template() {
|
302 |
+
$custom_logo_id = get_theme_mod( 'custom_logo' );
|
303 |
+
$image = $custom_logo_id ? wp_get_attachment_image( $custom_logo_id , 'full' ) : '';
|
304 |
+
?>
|
305 |
+
<#
|
306 |
+
var logo = '<?php echo has_custom_logo() ? $image : ''; ?>';
|
307 |
+
|
308 |
+
var link_url;
|
309 |
+
switch( settings.link_to ) {
|
310 |
+
case 'custom':
|
311 |
+
link_url = settings.link.url;
|
312 |
+
break;
|
313 |
+
case 'home':
|
314 |
+
link_url = '<?php echo esc_url( get_home_url() ); ?>';
|
315 |
+
break;
|
316 |
+
case 'none':
|
317 |
+
default:
|
318 |
+
link_url = false;
|
319 |
+
}
|
320 |
+
var target = settings.link.is_external ? 'target="_blank"' : '';
|
321 |
+
|
322 |
+
var animation_class = '';
|
323 |
+
if ( '' !== settings.hover_animation ) {
|
324 |
+
animation_class = 'elementor-animation-' + settings.hover_animation;
|
325 |
+
}
|
326 |
+
|
327 |
+
var html = '<' + settings.html_tag + ' class="press-elements-site-logo ' + animation_class + '">';
|
328 |
+
if ( link_url ) {
|
329 |
+
html += '<a href="' + link_url + '" ' + target + '>' + logo + '</a>';
|
330 |
+
} else {
|
331 |
+
html += logo;
|
332 |
+
}
|
333 |
+
html += '</' + settings.html_tag + '>';
|
334 |
+
|
335 |
+
print( html );
|
336 |
+
|
337 |
+
#>
|
338 |
+
<?php
|
339 |
+
}
|
340 |
+
|
341 |
+
}
|
widgets/site-title.php
CHANGED
@@ -1,257 +1,257 @@
|
|
1 |
-
<?php
|
2 |
-
namespace PressElements\Widgets;
|
3 |
-
|
4 |
-
use Elementor\Widget_Base;
|
5 |
-
use Elementor\Controls_Manager;
|
6 |
-
use Elementor\Scheme_Color;
|
7 |
-
use Elementor\Scheme_Typography;
|
8 |
-
use Elementor\Group_Control_Typography;
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
// Exit if accessed directly
|
13 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
14 |
-
exit;
|
15 |
-
}
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Press Elements Site Title
|
21 |
-
*
|
22 |
-
* Site title element for elementor.
|
23 |
-
*
|
24 |
-
* @since 1.0.0
|
25 |
-
*/
|
26 |
-
class Press_Elements_Site_Title extends Widget_Base {
|
27 |
-
|
28 |
-
public function get_name() {
|
29 |
-
return 'site-title';
|
30 |
-
}
|
31 |
-
|
32 |
-
public function get_title() {
|
33 |
-
return __( 'Site Title', 'press-elements' );
|
34 |
-
}
|
35 |
-
|
36 |
-
public function get_icon() {
|
37 |
-
return 'fa fa-home';
|
38 |
-
}
|
39 |
-
|
40 |
-
public function get_categories() {
|
41 |
-
return [ 'press-elements-site-elements' ];
|
42 |
-
}
|
43 |
-
|
44 |
-
protected function _register_controls() {
|
45 |
-
|
46 |
-
$this->start_controls_section(
|
47 |
-
'section_content',
|
48 |
-
[
|
49 |
-
'label' => __( 'Site Title', 'press-elements' ),
|
50 |
-
]
|
51 |
-
);
|
52 |
-
|
53 |
-
$this->add_control(
|
54 |
-
'html_tag',
|
55 |
-
[
|
56 |
-
'label' => __( 'HTML Tag', 'press-elements' ),
|
57 |
-
'type' => Controls_Manager::SELECT,
|
58 |
-
'options' => [
|
59 |
-
'h1' => __( 'H1', 'press-elements' ),
|
60 |
-
'h2' => __( 'H2', 'press-elements' ),
|
61 |
-
'h3' => __( 'H3', 'press-elements' ),
|
62 |
-
'h4' => __( 'H4', 'press-elements' ),
|
63 |
-
'h5' => __( 'H5', 'press-elements' ),
|
64 |
-
'h6' => __( 'H6', 'press-elements' ),
|
65 |
-
'p' => __( 'p', 'press-elements' ),
|
66 |
-
'div' => __( 'div', 'press-elements' ),
|
67 |
-
'span' => __( 'span', 'press-elements' ),
|
68 |
-
],
|
69 |
-
'default' => 'h1',
|
70 |
-
]
|
71 |
-
);
|
72 |
-
|
73 |
-
$this->add_responsive_control(
|
74 |
-
'align',
|
75 |
-
[
|
76 |
-
'label' => __( 'Alignment', 'press-elements' ),
|
77 |
-
'type' => Controls_Manager::CHOOSE,
|
78 |
-
'options' => [
|
79 |
-
'left' => [
|
80 |
-
'title' => __( 'Left', 'press-elements' ),
|
81 |
-
'icon' => 'fa fa-align-left',
|
82 |
-
],
|
83 |
-
'center' => [
|
84 |
-
'title' => __( 'Center', 'press-elements' ),
|
85 |
-
'icon' => 'fa fa-align-center',
|
86 |
-
],
|
87 |
-
'right' => [
|
88 |
-
'title' => __( 'Right', 'press-elements' ),
|
89 |
-
'icon' => 'fa fa-align-right',
|
90 |
-
],
|
91 |
-
'justify' => [
|
92 |
-
'title' => __( 'Justified', 'press-elements' ),
|
93 |
-
'icon' => 'fa fa-align-justify',
|
94 |
-
],
|
95 |
-
],
|
96 |
-
'default' => '',
|
97 |
-
'selectors' => [
|
98 |
-
'{{WRAPPER}}' => 'text-align: {{VALUE}};',
|
99 |
-
],
|
100 |
-
]
|
101 |
-
);
|
102 |
-
|
103 |
-
$this->add_control(
|
104 |
-
'link_to',
|
105 |
-
[
|
106 |
-
'label' => __( 'Link to', 'press-elements' ),
|
107 |
-
'type' => Controls_Manager::SELECT,
|
108 |
-
'default' => 'none',
|
109 |
-
'options' => [
|
110 |
-
'none' => __( 'None', 'press-elements' ),
|
111 |
-
'home' => __( 'Home URL', 'press-elements' ),
|
112 |
-
'custom' => __( 'Custom URL', 'press-elements' ),
|
113 |
-
],
|
114 |
-
]
|
115 |
-
);
|
116 |
-
|
117 |
-
$this->add_control(
|
118 |
-
'link',
|
119 |
-
[
|
120 |
-
'label' => __( 'Link', 'press-elements' ),
|
121 |
-
'type' => Controls_Manager::URL,
|
122 |
-
'placeholder' => __( 'http://your-link.com', 'press-elements' ),
|
123 |
-
'condition' => [
|
124 |
-
'link_to' => 'custom',
|
125 |
-
],
|
126 |
-
'default' => [
|
127 |
-
'url' => '',
|
128 |
-
],
|
129 |
-
'show_label' => false,
|
130 |
-
]
|
131 |
-
);
|
132 |
-
|
133 |
-
$this->end_controls_section();
|
134 |
-
|
135 |
-
$this->start_controls_section(
|
136 |
-
'section_style',
|
137 |
-
[
|
138 |
-
'label' => __( 'Site Title', 'press-elements' ),
|
139 |
-
'tab' => Controls_Manager::TAB_STYLE,
|
140 |
-
]
|
141 |
-
);
|
142 |
-
|
143 |
-
$this->add_control(
|
144 |
-
'color',
|
145 |
-
[
|
146 |
-
'label' => __( 'Text Color', 'press-elements' ),
|
147 |
-
'type' => Controls_Manager::COLOR,
|
148 |
-
'scheme' => [
|
149 |
-
'type' => Scheme_Color::get_type(),
|
150 |
-
'value' => Scheme_Color::COLOR_1,
|
151 |
-
],
|
152 |
-
'selectors' => [
|
153 |
-
'{{WRAPPER}} .press-elements-site-title' => 'color: {{VALUE}};',
|
154 |
-
'{{WRAPPER}} .press-elements-site-title a' => 'color: {{VALUE}};',
|
155 |
-
],
|
156 |
-
]
|
157 |
-
);
|
158 |
-
|
159 |
-
$this->add_group_control(
|
160 |
-
Group_Control_Typography::get_type(),
|
161 |
-
[
|
162 |
-
'name' => 'typography',
|
163 |
-
'scheme' => Scheme_Typography::TYPOGRAPHY_1,
|
164 |
-
'selector' => '{{WRAPPER}} .press-elements-site-title',
|
165 |
-
]
|
166 |
-
);
|
167 |
-
|
168 |
-
$this->add_control(
|
169 |
-
'hover_animation',
|
170 |
-
[
|
171 |
-
'label' => __( 'Hover Animation', 'press-elements' ),
|
172 |
-
'type' => Controls_Manager::HOVER_ANIMATION,
|
173 |
-
]
|
174 |
-
);
|
175 |
-
|
176 |
-
$this->end_controls_section();
|
177 |
-
|
178 |
-
}
|
179 |
-
|
180 |
-
protected function render() {
|
181 |
-
$title = get_bloginfo( 'name' );
|
182 |
-
|
183 |
-
if ( empty( $title ) )
|
184 |
-
return;
|
185 |
-
|
186 |
-
$settings = $this->get_settings();
|
187 |
-
|
188 |
-
switch ( $settings['link_to'] ) {
|
189 |
-
case 'custom' :
|
190 |
-
if ( ! empty( $settings['link']['url'] ) ) {
|
191 |
-
$link = esc_url( $settings['link']['url'] );
|
192 |
-
} else {
|
193 |
-
$link = false;
|
194 |
-
}
|
195 |
-
break;
|
196 |
-
|
197 |
-
case 'home' :
|
198 |
-
$link = esc_url( get_home_url() );
|
199 |
-
break;
|
200 |
-
|
201 |
-
case 'none' :
|
202 |
-
default:
|
203 |
-
$link = false;
|
204 |
-
break;
|
205 |
-
}
|
206 |
-
$target = $settings['link']['is_external'] ? 'target="_blank"' : '';
|
207 |
-
|
208 |
-
$animation_class = ! empty( $settings['hover_animation'] ) ? 'elementor-animation-' . $settings['hover_animation'] : '';
|
209 |
-
|
210 |
-
$html = sprintf( '<%1$s class="press-elements-site-title %2$s">', $settings['html_tag'], $animation_class );
|
211 |
-
if ( $link ) {
|
212 |
-
$html .= sprintf( '<a href="%1$s" %2$s>%3$s</a>', $link, $target, $title );
|
213 |
-
} else {
|
214 |
-
$html .= $title;
|
215 |
-
}
|
216 |
-
$html .= sprintf( '</%s>', $settings['html_tag'] );
|
217 |
-
|
218 |
-
echo $html;
|
219 |
-
}
|
220 |
-
|
221 |
-
protected function _content_template() {
|
222 |
-
?>
|
223 |
-
<#
|
224 |
-
var title = '<?php echo get_bloginfo( 'name' ); ?>';
|
225 |
-
|
226 |
-
var link_url;
|
227 |
-
switch( settings.link_to ) {
|
228 |
-
case 'custom':
|
229 |
-
link_url = settings.link.url;
|
230 |
-
break;
|
231 |
-
case 'home':
|
232 |
-
link_url = '<?php echo esc_url( get_home_url() ); ?>';
|
233 |
-
break;
|
234 |
-
case 'none':
|
235 |
-
default:
|
236 |
-
link_url = false;
|
237 |
-
}
|
238 |
-
var target = settings.link.is_external ? 'target="_blank"' : '';
|
239 |
-
|
240 |
-
var animation_class = '';
|
241 |
-
if ( '' !== settings.hover_animation ) {
|
242 |
-
animation_class = 'elementor-animation-' + settings.hover_animation;
|
243 |
-
}
|
244 |
-
|
245 |
-
var html = '<' + settings.html_tag + ' class="press-elements-site-title ' + animation_class + '">';
|
246 |
-
if ( link_url ) {
|
247 |
-
html += '<a href="' + link_url + '" ' + target + '>' + title + '</a>';
|
248 |
-
} else {
|
249 |
-
html += title;
|
250 |
-
}
|
251 |
-
html += '</' + settings.html_tag + '>';
|
252 |
-
|
253 |
-
print( html );
|
254 |
-
#>
|
255 |
-
<?php
|
256 |
-
}
|
257 |
-
}
|
1 |
+
<?php
|
2 |
+
namespace PressElements\Widgets;
|
3 |
+
|
4 |
+
use Elementor\Widget_Base;
|
5 |
+
use Elementor\Controls_Manager;
|
6 |
+
use Elementor\Scheme_Color;
|
7 |
+
use Elementor\Scheme_Typography;
|
8 |
+
use Elementor\Group_Control_Typography;
|
9 |
+
|
10 |
+
|
11 |
+
|
12 |
+
// Exit if accessed directly
|
13 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
14 |
+
exit;
|
15 |
+
}
|
16 |
+
|
17 |
+
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Press Elements Site Title
|
21 |
+
*
|
22 |
+
* Site title element for elementor.
|
23 |
+
*
|
24 |
+
* @since 1.0.0
|
25 |
+
*/
|
26 |
+
class Press_Elements_Site_Title extends Widget_Base {
|
27 |
+
|
28 |
+
public function get_name() {
|
29 |
+
return 'site-title';
|
30 |
+
}
|
31 |
+
|
32 |
+
public function get_title() {
|
33 |
+
return __( 'Site Title', 'press-elements' );
|
34 |
+
}
|
35 |
+
|
36 |
+
public function get_icon() {
|
37 |
+
return 'fa fa-home';
|
38 |
+
}
|
39 |
+
|
40 |
+
public function get_categories() {
|
41 |
+
return [ 'press-elements-site-elements' ];
|
42 |
+
}
|
43 |
+
|
44 |
+
protected function _register_controls() {
|
45 |
+
|
46 |
+
$this->start_controls_section(
|
47 |
+
'section_content',
|
48 |
+
[
|
49 |
+
'label' => __( 'Site Title', 'press-elements' ),
|
50 |
+
]
|
51 |
+
);
|
52 |
+
|
53 |
+
$this->add_control(
|
54 |
+
'html_tag',
|
55 |
+
[
|
56 |
+
'label' => __( 'HTML Tag', 'press-elements' ),
|
57 |
+
'type' => Controls_Manager::SELECT,
|
58 |
+
'options' => [
|
59 |
+
'h1' => __( 'H1', 'press-elements' ),
|
60 |
+
'h2' => __( 'H2', 'press-elements' ),
|
61 |
+
'h3' => __( 'H3', 'press-elements' ),
|
62 |
+
'h4' => __( 'H4', 'press-elements' ),
|
63 |
+
'h5' => __( 'H5', 'press-elements' ),
|
64 |
+
'h6' => __( 'H6', 'press-elements' ),
|
65 |
+
'p' => __( 'p', 'press-elements' ),
|
66 |
+
'div' => __( 'div', 'press-elements' ),
|
67 |
+
'span' => __( 'span', 'press-elements' ),
|
68 |
+
],
|
69 |
+
'default' => 'h1',
|
70 |
+
]
|
71 |
+
);
|
72 |
+
|
73 |
+
$this->add_responsive_control(
|
74 |
+
'align',
|
75 |
+
[
|
76 |
+
'label' => __( 'Alignment', 'press-elements' ),
|
77 |
+
'type' => Controls_Manager::CHOOSE,
|
78 |
+
'options' => [
|
79 |
+
'left' => [
|
80 |
+
'title' => __( 'Left', 'press-elements' ),
|
81 |
+
'icon' => 'fa fa-align-left',
|
82 |
+
],
|
83 |
+
'center' => [
|
84 |
+
'title' => __( 'Center', 'press-elements' ),
|
85 |
+
'icon' => 'fa fa-align-center',
|
86 |
+
],
|
87 |
+
'right' => [
|
88 |
+
'title' => __( 'Right', 'press-elements' ),
|
89 |
+
'icon' => 'fa fa-align-right',
|
90 |
+
],
|
91 |
+
'justify' => [
|
92 |
+
'title' => __( 'Justified', 'press-elements' ),
|
93 |
+
'icon' => 'fa fa-align-justify',
|
94 |
+
],
|
95 |
+
],
|
96 |
+
'default' => '',
|
97 |
+
'selectors' => [
|
98 |
+
'{{WRAPPER}}' => 'text-align: {{VALUE}};',
|
99 |
+
],
|
100 |
+
]
|
101 |
+
);
|
102 |
+
|
103 |
+
$this->add_control(
|
104 |
+
'link_to',
|
105 |
+
[
|
106 |
+
'label' => __( 'Link to', 'press-elements' ),
|
107 |
+
'type' => Controls_Manager::SELECT,
|
108 |
+
'default' => 'none',
|
109 |
+
'options' => [
|
110 |
+
'none' => __( 'None', 'press-elements' ),
|
111 |
+
'home' => __( 'Home URL', 'press-elements' ),
|
112 |
+
'custom' => __( 'Custom URL', 'press-elements' ),
|
113 |
+
],
|
114 |
+
]
|
115 |
+
);
|
116 |
+
|
117 |
+
$this->add_control(
|
118 |
+
'link',
|
119 |
+
[
|
120 |
+
'label' => __( 'Link', 'press-elements' ),
|
121 |
+
'type' => Controls_Manager::URL,
|
122 |
+
'placeholder' => __( 'http://your-link.com', 'press-elements' ),
|
123 |
+
'condition' => [
|
124 |
+
'link_to' => 'custom',
|
125 |
+
],
|
126 |
+
'default' => [
|
127 |
+
'url' => '',
|
128 |
+
],
|
129 |
+
'show_label' => false,
|
130 |
+
]
|
131 |
+
);
|
132 |
+
|
133 |
+
$this->end_controls_section();
|
134 |
+
|
135 |
+
$this->start_controls_section(
|
136 |
+
'section_style',
|
137 |
+
[
|
138 |
+
'label' => __( 'Site Title', 'press-elements' ),
|
139 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
140 |
+
]
|
141 |
+
);
|
142 |
+
|
143 |
+
$this->add_control(
|
144 |
+
'color',
|
145 |
+
[
|
146 |
+
'label' => __( 'Text Color', 'press-elements' ),
|
147 |
+
'type' => Controls_Manager::COLOR,
|
148 |
+
'scheme' => [
|
149 |
+
'type' => Scheme_Color::get_type(),
|
150 |
+
'value' => Scheme_Color::COLOR_1,
|
151 |
+
],
|
152 |
+
'selectors' => [
|
153 |
+
'{{WRAPPER}} .press-elements-site-title' => 'color: {{VALUE}};',
|
154 |
+
'{{WRAPPER}} .press-elements-site-title a' => 'color: {{VALUE}};',
|
155 |
+
],
|
156 |
+
]
|
157 |
+
);
|
158 |
+
|
159 |
+
$this->add_group_control(
|
160 |
+
Group_Control_Typography::get_type(),
|
161 |
+
[
|
162 |
+
'name' => 'typography',
|
163 |
+
'scheme' => Scheme_Typography::TYPOGRAPHY_1,
|
164 |
+
'selector' => '{{WRAPPER}} .press-elements-site-title',
|
165 |
+
]
|
166 |
+
);
|
167 |
+
|
168 |
+
$this->add_control(
|
169 |
+
'hover_animation',
|
170 |
+
[
|
171 |
+
'label' => __( 'Hover Animation', 'press-elements' ),
|
172 |
+
'type' => Controls_Manager::HOVER_ANIMATION,
|
173 |
+
]
|
174 |
+
);
|
175 |
+
|
176 |
+
$this->end_controls_section();
|
177 |
+
|
178 |
+
}
|
179 |
+
|
180 |
+
protected function render() {
|
181 |
+
$title = get_bloginfo( 'name' );
|
182 |
+
|
183 |
+
if ( empty( $title ) )
|
184 |
+
return;
|
185 |
+
|
186 |
+
$settings = $this->get_settings();
|
187 |
+
|
188 |
+
switch ( $settings['link_to'] ) {
|
189 |
+
case 'custom' :
|
190 |
+
if ( ! empty( $settings['link']['url'] ) ) {
|
191 |
+
$link = esc_url( $settings['link']['url'] );
|
192 |
+
} else {
|
193 |
+
$link = false;
|
194 |
+
}
|
195 |
+
break;
|
196 |
+
|
197 |
+
case 'home' :
|
198 |
+
$link = esc_url( get_home_url() );
|
199 |
+
break;
|
200 |
+
|
201 |
+
case 'none' :
|
202 |
+
default:
|
203 |
+
$link = false;
|
204 |
+
break;
|
205 |
+
}
|
206 |
+
$target = $settings['link']['is_external'] ? 'target="_blank"' : '';
|
207 |
+
|
208 |
+
$animation_class = ! empty( $settings['hover_animation'] ) ? 'elementor-animation-' . $settings['hover_animation'] : '';
|
209 |
+
|
210 |
+
$html = sprintf( '<%1$s class="press-elements-site-title %2$s">', $settings['html_tag'], $animation_class );
|
211 |
+
if ( $link ) {
|
212 |
+
$html .= sprintf( '<a href="%1$s" %2$s>%3$s</a>', $link, $target, $title );
|
213 |
+
} else {
|
214 |
+
$html .= $title;
|
215 |
+
}
|
216 |
+
$html .= sprintf( '</%s>', $settings['html_tag'] );
|
217 |
+
|
218 |
+
echo $html;
|
219 |
+
}
|
220 |
+
|
221 |
+
protected function _content_template() {
|
222 |
+
?>
|
223 |
+
<#
|
224 |
+
var title = '<?php echo get_bloginfo( 'name' ); ?>';
|
225 |
+
|
226 |
+
var link_url;
|
227 |
+
switch( settings.link_to ) {
|
228 |
+
case 'custom':
|
229 |
+
link_url = settings.link.url;
|
230 |
+
break;
|
231 |
+
case 'home':
|
232 |
+
link_url = '<?php echo esc_url( get_home_url() ); ?>';
|
233 |
+
break;
|
234 |
+
case 'none':
|
235 |
+
default:
|
236 |
+
link_url = false;
|
237 |
+
}
|
238 |
+
var target = settings.link.is_external ? 'target="_blank"' : '';
|
239 |
+
|
240 |
+
var animation_class = '';
|
241 |
+
if ( '' !== settings.hover_animation ) {
|
242 |
+
animation_class = 'elementor-animation-' + settings.hover_animation;
|
243 |
+
}
|
244 |
+
|
245 |
+
var html = '<' + settings.html_tag + ' class="press-elements-site-title ' + animation_class + '">';
|
246 |
+
if ( link_url ) {
|
247 |
+
html += '<a href="' + link_url + '" ' + target + '>' + title + '</a>';
|
248 |
+
} else {
|
249 |
+
html += title;
|
250 |
+
}
|
251 |
+
html += '</' + settings.html_tag + '>';
|
252 |
+
|
253 |
+
print( html );
|
254 |
+
#>
|
255 |
+
<?php
|
256 |
+
}
|
257 |
+
}
|