Version Description
[11-12-2020] * Minor Fix. * Tested Upto WP 5.6.
Download this release
Release Info
Developer | weblizar |
Plugin | Weblizar Twitter Widget |
Version | 1.9.7 |
Comparing to | |
See all releases |
Code changes from version 1.9.6 to 1.9.7
- readme.txt +6 -2
- twiiter_help.php +536 -587
- twitter-tweets.php +1 -1
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: weblizar
|
|
3 |
Donate link: https://www.weblizar.com/
|
4 |
Tags: twitter, tweets, twitter tweets, twitter widget, twitter wordPress plugin, twitter feed
|
5 |
Requires at least: 3.8
|
6 |
-
Tested up to: 5.
|
7 |
-
Stable tag: 1.9.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -114,6 +114,10 @@ Please use WordPress support forum to ask any query regarding any issue.
|
|
114 |
For more information, see Weblizar(https://weblizar.com/)
|
115 |
|
116 |
|
|
|
|
|
|
|
|
|
117 |
= 1.9.6 =[18-11-2020]
|
118 |
* Bootstrap library update.
|
119 |
* updated: some minor issues fixed.
|
3 |
Donate link: https://www.weblizar.com/
|
4 |
Tags: twitter, tweets, twitter tweets, twitter widget, twitter wordPress plugin, twitter feed
|
5 |
Requires at least: 3.8
|
6 |
+
Tested up to: 5.6
|
7 |
+
Stable tag: 1.9.7
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
114 |
For more information, see Weblizar(https://weblizar.com/)
|
115 |
|
116 |
|
117 |
+
= 1.9.7 =[11-12-2020]
|
118 |
+
* Minor Fix.
|
119 |
+
* Tested Upto WP 5.6.
|
120 |
+
|
121 |
= 1.9.6 =[18-11-2020]
|
122 |
* Bootstrap library update.
|
123 |
* updated: some minor issues fixed.
|
twiiter_help.php
CHANGED
@@ -1,63 +1,63 @@
|
|
1 |
<?php if (!defined('ABSPATH')) {
|
2 |
-
|
3 |
} ?>
|
4 |
<?php
|
5 |
wp_enqueue_style('font-awesome', WEBLIZAR_TWITTER_PLUGIN_URL . 'css/all.min.css');
|
6 |
wp_enqueue_style('wl_bootstrap', WEBLIZAR_TWITTER_PLUGIN_URL . 'css/bootstrap.min.css');
|
7 |
|
8 |
if (isset($_REQUEST['twitter-page-user_name'])) {
|
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 |
/* Twitter api key save */
|
36 |
|
37 |
if (isset($_REQUEST['wl_twitter_consumer_key']) && isset($_REQUEST['twitter_api_nonce'])) {
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
|
47 |
-
|
48 |
|
49 |
-
|
50 |
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
|
60 |
-
|
61 |
}
|
62 |
?>
|
63 |
<div class="block ui-tabs-panel active" id="option-general">
|
@@ -68,323 +68,309 @@ if (isset($_REQUEST['wl_twitter_consumer_key']) && isset($_REQUEST['twitter_api_
|
|
68 |
<hr>
|
69 |
<form name='fb-form' id='fb-form'>
|
70 |
<?php
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
<p>
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
placeholder="<?php esc_attr_e('Enter Your Twitter Account Username', 'twitter-tweets'); ?>">
|
118 |
</div>
|
119 |
</div>
|
120 |
-
</div>
|
121 |
</p>
|
122 |
<br>
|
123 |
<p>
|
124 |
-
<input class="widefat" id="twitter-page-id-fetch" name="twitter-page-id-fetch" type="hidden"
|
125 |
-
value="<?php echo esc_attr($TwitterWidgetId); ?>"
|
126 |
-
placeholder="<?php esc_html_e('Enter Your Twitter Widget ID', 'twitter-tweets'); ?>">
|
127 |
</p>
|
128 |
<p>
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
|
|
145 |
</div>
|
146 |
</div>
|
147 |
-
</div>
|
148 |
</p>
|
149 |
<br>
|
150 |
|
151 |
<p>
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
<p><b><?php esc_html_e('Set your desire height px (Use Arrow Keys For Exact Numbers)', 'twitter-tweets'); ?></b>
|
163 |
-
<span id="twitter-range-val"></span>
|
164 |
-
</p>
|
165 |
|
|
|
166 |
</div>
|
167 |
</div>
|
168 |
-
</div>
|
169 |
-
|
170 |
-
|
171 |
</p>
|
172 |
-
<!-- <br> -->
|
173 |
-
|
174 |
<br>
|
175 |
-
|
176 |
<p>
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
|
|
193 |
</div>
|
194 |
</div>
|
195 |
-
</div>
|
196 |
|
197 |
|
198 |
</p>
|
199 |
<br>
|
200 |
<p>
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
|
|
217 |
</div>
|
218 |
</div>
|
219 |
-
</div>
|
220 |
|
221 |
|
222 |
</p>
|
223 |
<br>
|
224 |
<p>
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
|
|
374 |
</div>
|
375 |
</div>
|
376 |
-
</div>
|
377 |
|
378 |
|
379 |
</p>
|
380 |
<br>
|
381 |
|
382 |
-
<input onclick="return SaveSettings();" type="button" class="twt_save_btn" id="fb-save-settings"
|
383 |
-
name="fb-save-settings" value="SAVE">
|
384 |
|
385 |
<div id="fb-img" style="display: none;">
|
386 |
-
<img
|
387 |
-
src="<?php echo esc_url(WEBLIZAR_TWITTER_PLUGIN_URL . 'images/loading.gif'); ?>" />
|
388 |
</div>
|
389 |
<div id="fb-msg" style="display: none;" class="alert">
|
390 |
<?php esc_html_e('Settings successfully saved. Reloading page for generating preview right side of setting.', 'twitter-tweets'); ?>
|
@@ -395,21 +381,16 @@ if (isset($_REQUEST['wl_twitter_consumer_key']) && isset($_REQUEST['twitter_api_
|
|
395 |
<!-- Preview Part-->
|
396 |
<div class="col-md-6">
|
397 |
<?php if ($TwitterWidgetId) { ?>
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
<div class="twt_help">
|
409 |
-
<?php esc_html_e('Please copy the twitter shortcode', 'twitter-tweets'); ?>
|
410 |
-
<span style="color:#000;"><b>[TWTR]</b> </span> <?php esc_html_e('and paste it to on the Page/Post', 'twitter-tweets'); ?></span>
|
411 |
-
</div>
|
412 |
-
</p>
|
413 |
<?php } ?>
|
414 |
</div>
|
415 |
</div>
|
@@ -431,23 +412,20 @@ include_once('load-tweets.php');
|
|
431 |
<form name='api-form' id='api-form'>
|
432 |
<br>
|
433 |
<p>
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
target="_bank"><?php esc_html_e("Generate Twitter API key", 'twitter-tweets'); ?></a></span>
|
447 |
-
<br>
|
448 |
</div>
|
449 |
</div>
|
450 |
-
</div>
|
451 |
|
452 |
|
453 |
</p>
|
@@ -455,19 +433,18 @@ include_once('load-tweets.php');
|
|
455 |
|
456 |
<br>
|
457 |
<p>
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
</div>
|
469 |
</div>
|
470 |
-
</div>
|
471 |
|
472 |
|
473 |
</p>
|
@@ -475,19 +452,18 @@ include_once('load-tweets.php');
|
|
475 |
|
476 |
<br>
|
477 |
<p>
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
</div>
|
489 |
</div>
|
490 |
-
</div>
|
491 |
|
492 |
|
493 |
</p>
|
@@ -495,92 +471,81 @@ include_once('load-tweets.php');
|
|
495 |
|
496 |
<br>
|
497 |
<p>
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
</div>
|
509 |
</div>
|
510 |
-
</div>
|
511 |
|
512 |
|
513 |
</p>
|
514 |
|
515 |
<br>
|
516 |
<p>
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
</
|
531 |
</div>
|
532 |
</div>
|
533 |
-
</div>
|
534 |
|
535 |
|
536 |
</p>
|
537 |
|
538 |
<br>
|
539 |
<p>
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
<option
|
568 |
-
<?php if (strval($wl_twitter_layout) == "3") {
|
569 |
-
echo esc_attr('selected');
|
570 |
-
}?>
|
571 |
-
value="3"><?php esc_html_e('4', 'twitter-tweets'); ?>
|
572 |
-
</option>
|
573 |
-
</select>
|
574 |
</div>
|
575 |
</div>
|
576 |
-
</div>
|
577 |
</p>
|
578 |
<br>
|
579 |
<?php
|
580 |
-
|
581 |
-
|
582 |
-
<input onclick="return SaveApiSettings();" type="button" class="twt_save_btn"
|
583 |
-
id="fb-api-save-settings" name="fb-api-save-settings" value="SAVE">
|
584 |
<br><br><br>
|
585 |
<div class="twt_help">
|
586 |
<?php esc_html_e('Please copy the twitter shortcode', 'twitter-tweets'); ?>
|
@@ -589,8 +554,7 @@ include_once('load-tweets.php');
|
|
589 |
<?php esc_html_e('and paste it to on the Page/Post', 'twitter-tweets'); ?></span>
|
590 |
</div>
|
591 |
<div id="twitter-img" style="display: none;">
|
592 |
-
<img
|
593 |
-
src="<?php echo esc_url(WEBLIZAR_TWITTER_PLUGIN_URL . 'images/loading.gif'); ?>" />
|
594 |
</div>
|
595 |
<div id="wl_twitter_preview" style="display: none;" class="alert">
|
596 |
<?php esc_html_e('Settings successfully saved. Reloading page for generating preview right side of setting.', 'twitter-tweets'); ?>
|
@@ -604,153 +568,142 @@ include_once('load-tweets.php');
|
|
604 |
<div class="container-fluid">
|
605 |
<div class="row">
|
606 |
<div class="col-md-<?php if (isset($wl_twitter_layout)) {
|
607 |
-
|
608 |
-
|
609 |
<?php
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
<?php
|
658 |
-
// $entities = $status->entities;
|
659 |
-
if (isset($status->extended_entities)) {
|
660 |
-
$extended_entities_array = $status->extended_entities->media;
|
661 |
-
$extended_entities = $extended_entities_array[0];
|
662 |
-
$display_url = $extended_entities->display_url;
|
663 |
-
$media_expanded_url = $extended_entities->expanded_url;
|
664 |
-
$media_type = $extended_entities->type;
|
665 |
-
$media_url = $extended_entities->media_url;
|
666 |
-
if ($media_type == "photo") {
|
667 |
-
?>
|
668 |
-
<img src="<?php echo esc_url($media_url); ?>"
|
669 |
-
class="img-fluid" />
|
670 |
-
<?php
|
671 |
-
} elseif ($media_type == "video") {
|
672 |
-
$video_info = $extended_entities->video_info->variants[2];
|
673 |
-
$content_type = $video_info->content_type;
|
674 |
-
$url = $video_info->url;
|
675 |
-
$new_url = str_replace("?tag=8", "", $url);
|
676 |
-
|
677 |
-
if (isset($enable_extended_entitie) && $enable_extended_entitie == "enable") {
|
678 |
-
?>
|
679 |
-
<a href="#" data-toggle="modal" data-target="#myModal">
|
680 |
-
<img src="<?php echo esc_url($media_url); ?>"
|
681 |
-
class="img-fluid" />
|
682 |
-
</a>
|
683 |
-
<?php
|
684 |
-
} else {
|
685 |
-
?>
|
686 |
-
<a href="#">
|
687 |
-
<img src="<?php echo esc_url($media_url); ?>"
|
688 |
-
class="img-fluid" />
|
689 |
-
</a>
|
690 |
-
<?php
|
691 |
-
}
|
692 |
-
}
|
693 |
-
} /* extended enntities */ elseif (!empty($entities->media) && is_array($entities->media)) {
|
694 |
-
$media = $entities->media;
|
695 |
-
foreach ($media as $media_key => $media_value) {
|
696 |
-
$media_url = $media_value->media_url;
|
697 |
-
$media_url_https = $media_value->media_url_https;
|
698 |
-
$media_detail_url = $media_value->url;
|
699 |
-
$media_display_url = $media_value->display_url;
|
700 |
-
$media_expanded_url = $media_value->expanded_url;
|
701 |
-
$media_type = $media_value->type;
|
702 |
-
$media_sizes = $media_value->sizes; ?>
|
703 |
-
<a
|
704 |
-
href="<?php echo esc_url($media_expanded_url); ?>">
|
705 |
-
<img src="<?php echo esc_url($media_url_https); ?>"
|
706 |
-
class="img-fluid" />
|
707 |
-
</a>
|
708 |
-
<?php
|
709 |
-
}
|
710 |
-
} ?>
|
711 |
-
<p class="wl_tweet_desc">
|
712 |
-
<?php
|
713 |
-
if (isset($status->text)) {
|
714 |
-
echo esc_html(makeLinks($status->text));
|
715 |
-
} ?>
|
716 |
-
</p>
|
717 |
-
<p class="wl_tweet_action_buttons">
|
718 |
-
<a href="https://twitter.com/intent/retweet?tweet_id=<?php echo esc_attr($id_str); ?>&related=<?php echo esc_attr($screen_name); ?> retweet"
|
719 |
-
target="_blank"
|
720 |
-
onclick="window.open('https://twitter.com/intent/retweet?tweet_id=<?php echo esc_attr($id_str); ?>&related=<?php echo esc_attr($screen_name); ?> retweet', 'newwindow', 'width=600,height=450'); return false;">
|
721 |
<?php
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
731 |
<?php
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
751 |
<?php
|
752 |
-
|
753 |
-
|
754 |
</div>
|
755 |
</div>
|
756 |
</div>
|
@@ -775,8 +728,7 @@ include_once('load-tweets.php');
|
|
775 |
<li><?php esc_html_e('Customize feeds Shortcode', 'twitter-tweets'); ?><?php esc_html_e('[TWTR]', 'twitter-tweets'); ?>
|
776 |
</li>
|
777 |
<li><?php esc_html_e('Note: Protected tweets will not view', 'twitter-tweets'); ?>
|
778 |
-
<a href="https://help.twitter.com/en/safety-and-security/public-and-protected-tweets"
|
779 |
-
target="_blank"><?php esc_html_e('Help', 'twitter-tweets'); ?></a>
|
780 |
</li>
|
781 |
</ol>
|
782 |
<br>
|
@@ -786,8 +738,7 @@ include_once('load-tweets.php');
|
|
786 |
<ol>
|
787 |
<li><?php esc_html_e('You can use the widget to display your Twitter Tweets in any theme Widget Sections.', 'twitter-tweets'); ?>
|
788 |
</li>
|
789 |
-
<li><?php esc_html_e('Simple go to your', 'twitter-tweets'); ?><a
|
790 |
-
href="<?php echo get_site_url(); ?>/wp-admin/widgets.php"><strong><?php esc_html_e('Widgets', 'twitter-tweets'); ?></strong></a><?php esc_html_e(' section and activate available', 'twitter-tweets'); ?>
|
791 |
<strong><?php esc_html_e('Twitter By Weblizar', 'twitter-tweets'); ?></strong>
|
792 |
<?php esc_html_e('widget in any sidebar section, like in left sidebar, right sidebar or footer sidebar.', 'twitter-tweets'); ?>
|
793 |
</li>
|
@@ -818,8 +769,7 @@ include_once('load-tweets.php');
|
|
818 |
<p class="well"><strong><?php esc_html_e('How to generate Twitter API Key', 'twitter-tweets'); ?></strong>
|
819 |
</p>
|
820 |
<p><?php esc_html_e('We have created a blog post on this topic. It is very easy to understand.', 'twitter-tweets'); ?>
|
821 |
-
<span class="helptopic"><a href="https://weblizar.com/blog/generate-twitter-api-key/"
|
822 |
-
target="_blank"><?php esc_html_e('Click here', 'twitter-tweets'); ?></a></span><?php esc_html_e(' to visit the blog.', 'twitter-tweets'); ?>
|
823 |
</p>
|
824 |
|
825 |
<br>
|
@@ -840,8 +790,7 @@ include_once('load-tweets.php');
|
|
840 |
<b><?php esc_html_e('Customize Feeds for Twitter Widget', 'twitter-tweets'); ?></b><?php esc_html_e('plugin and find it useful, then please consider writing a positive feedback. Your feedback will help us to encourage and support the plugin continued development and better user support.', 'twitter-tweets'); ?>
|
841 |
</p>
|
842 |
<div class="twt_star">
|
843 |
-
<a class="acl-rate-us" style="text-align:center; text-decoration: none;font:normal 30px/l;"
|
844 |
-
href="https://wordpress.org/plugins/twitter-tweets/#reviews" target="_blank">
|
845 |
<span class="dashicons dashicons-star-filled"></span>
|
846 |
<span class="dashicons dashicons-star-filled"></span>
|
847 |
<span class="dashicons dashicons-star-filled"></span>
|
1 |
<?php if (!defined('ABSPATH')) {
|
2 |
+
exit;
|
3 |
} ?>
|
4 |
<?php
|
5 |
wp_enqueue_style('font-awesome', WEBLIZAR_TWITTER_PLUGIN_URL . 'css/all.min.css');
|
6 |
wp_enqueue_style('wl_bootstrap', WEBLIZAR_TWITTER_PLUGIN_URL . 'css/bootstrap.min.css');
|
7 |
|
8 |
if (isset($_REQUEST['twitter-page-user_name'])) {
|
9 |
+
if (!current_user_can('manage_options') || !wp_verify_nonce($_POST['feeds-widget'], 'save-feeds-widget')) {
|
10 |
+
die;
|
11 |
+
}
|
12 |
+
|
13 |
+
$TwitterUserName = sanitize_text_field($_REQUEST['twitter-page-user_name']);
|
14 |
+
$Theme = sanitize_text_field($_REQUEST['show-theme-background']);
|
15 |
+
$Height = sanitize_text_field($_REQUEST['twitter-page-url-Height']);
|
16 |
+
$TwitterWidgetId = sanitize_text_field($_REQUEST['twitter-page-id-fetch']);
|
17 |
+
$ExcludeReplies = sanitize_text_field($_REQUEST['exclude_replies_23']);
|
18 |
+
$AutoExpandPhotos = sanitize_text_field($_REQUEST['photo_1234']);
|
19 |
+
$tw_language = sanitize_text_field($_REQUEST['tw_language']);
|
20 |
+
|
21 |
+
$TwitterSettingsArray = serialize(
|
22 |
+
array(
|
23 |
+
'TwitterUserName' => $TwitterUserName,
|
24 |
+
'Theme' => $Theme,
|
25 |
+
'Height' => $Height,
|
26 |
+
'TwitterWidgetId' => $TwitterWidgetId,
|
27 |
+
'ExcludeReplies' => $ExcludeReplies,
|
28 |
+
'AutoExpandPhotos' => $AutoExpandPhotos,
|
29 |
+
'tw_language' => $tw_language,
|
30 |
+
)
|
31 |
+
);
|
32 |
+
update_option("ali_twitter_shortcode", $TwitterSettingsArray);
|
33 |
}
|
34 |
|
35 |
/* Twitter api key save */
|
36 |
|
37 |
if (isset($_REQUEST['wl_twitter_consumer_key']) && isset($_REQUEST['twitter_api_nonce'])) {
|
38 |
+
if (!current_user_can('manage_options') || !wp_verify_nonce($_POST['twitter_api_nonce'], 'twitter_api_nonce')) {
|
39 |
+
die;
|
40 |
+
}
|
41 |
|
42 |
+
$wl_twitter_consumer_key = sanitize_text_field($_REQUEST['wl_twitter_consumer_key']);
|
43 |
+
$wl_twitter_consumer_secret = sanitize_text_field($_REQUEST['wl_twitter_consumer_secret']);
|
44 |
+
$wl_twitter_access_token = sanitize_text_field($_REQUEST['wl_twitter_access_token']);
|
45 |
+
$wl_twitter_token_secret = sanitize_text_field($_REQUEST['wl_twitter_token_secret']);
|
46 |
|
47 |
+
$wl_twitter_tweets = (isset($_REQUEST['wl_twitter_tweets'])) ? sanitize_text_field($_REQUEST['wl_twitter_tweets']) : '4';
|
48 |
|
49 |
+
$wl_twitter_layout = (isset($_REQUEST['wl_twitter_layout'])) ? sanitize_text_field($_REQUEST['wl_twitter_layout']) : '3';
|
50 |
|
51 |
+
$twitter_api_settings = array(
|
52 |
+
'wl_twitter_consumer_key' => $wl_twitter_consumer_key,
|
53 |
+
'wl_twitter_consumer_secret' => $wl_twitter_consumer_secret,
|
54 |
+
'wl_twitter_access_token' => $wl_twitter_access_token,
|
55 |
+
'wl_twitter_token_secret' => $wl_twitter_token_secret,
|
56 |
+
'wl_twitter_tweets' => $wl_twitter_tweets,
|
57 |
+
'wl_twitter_layout' => $wl_twitter_layout
|
58 |
+
);
|
59 |
|
60 |
+
update_option('wl_twitter_api_settings', $twitter_api_settings);
|
61 |
}
|
62 |
?>
|
63 |
<div class="block ui-tabs-panel active" id="option-general">
|
68 |
<hr>
|
69 |
<form name='fb-form' id='fb-form'>
|
70 |
<?php
|
71 |
+
$twitterSettings = unserialize(get_option("ali_twitter_shortcode"));
|
72 |
+
$TwitterUserName = "weblizar";
|
73 |
+
if (isset($twitterSettings['TwitterUserName'])) {
|
74 |
+
$TwitterUserName = $twitterSettings['TwitterUserName'];
|
75 |
+
}
|
76 |
+
$TwitterWidgetId = "123";
|
77 |
+
if (isset($twitterSettings['TwitterWidgetId'])) {
|
78 |
+
$TwitterWidgetId = $twitterSettings['TwitterWidgetId'];
|
79 |
+
}
|
80 |
+
$Theme = "light";
|
81 |
+
if (isset($twitterSettings['Theme'])) {
|
82 |
+
$Theme = $twitterSettings['Theme'];
|
83 |
+
}
|
84 |
+
$Height = "450";
|
85 |
+
if (isset($twitterSettings['Height'])) {
|
86 |
+
$Height = $twitterSettings['Height'];
|
87 |
+
}
|
88 |
+
$Width = "";
|
89 |
+
if (isset($twitterSettings['Width'])) {
|
90 |
+
$Width = $twitterSettings['Width'];
|
91 |
+
}
|
92 |
+
|
93 |
+
$ExcludeReplies = "yes";
|
94 |
+
if (isset($twitterSettings['ExcludeReplies'])) {
|
95 |
+
$ExcludeReplies = $twitterSettings['ExcludeReplies'];
|
96 |
+
}
|
97 |
+
$AutoExpandPhotos = "yes";
|
98 |
+
if (isset($twitterSettings['AutoExpandPhotos'])) {
|
99 |
+
$AutoExpandPhotos = $twitterSettings['AutoExpandPhotos'];
|
100 |
+
}
|
101 |
+
$tw_language = "";
|
102 |
+
if (isset($twitterSettings['tw_language'])) {
|
103 |
+
$tw_language = $twitterSettings['tw_language'];
|
104 |
+
}
|
105 |
+
|
106 |
+
wp_nonce_field('save-feeds-widget', 'feeds-widget');
|
107 |
+
?>
|
108 |
<p>
|
109 |
+
<div class="container">
|
110 |
+
<div class="row">
|
111 |
+
<div class="col-sm">
|
112 |
+
<label><?php esc_html_e('Twitter Account Username', 'twitter-tweets'); ?></label>
|
113 |
+
</div>
|
114 |
+
<div class="col-sm">
|
115 |
+
<input class="widefat" id="twitter-page-user-name" name="twitter-page-user_name" type="text" value="<?php echo esc_attr($TwitterUserName); ?>" placeholder="<?php esc_attr_e('Enter Your Twitter Account Username', 'twitter-tweets'); ?>">
|
116 |
+
</div>
|
|
|
117 |
</div>
|
118 |
</div>
|
|
|
119 |
</p>
|
120 |
<br>
|
121 |
<p>
|
122 |
+
<input class="widefat" id="twitter-page-id-fetch" name="twitter-page-id-fetch" type="hidden" value="<?php echo esc_attr($TwitterWidgetId); ?>" placeholder="<?php esc_html_e('Enter Your Twitter Widget ID', 'twitter-tweets'); ?>">
|
|
|
|
|
123 |
</p>
|
124 |
<p>
|
125 |
+
<div class="container">
|
126 |
+
<div class="row">
|
127 |
+
<div class="col-sm">
|
128 |
+
<label><?php esc_html_e('Theme', 'twitter-tweets'); ?></label>
|
129 |
+
</div>
|
130 |
+
<div class="col-sm">
|
131 |
+
<select id="show-theme-background" name="show-theme-background">
|
132 |
+
<option value="light" <?php if ($Theme == "light") {
|
133 |
+
echo esc_attr("selected=selected");
|
134 |
+
} ?>><?php esc_html_e('Light', 'twitter-tweets'); ?>
|
135 |
+
</option>
|
136 |
+
<option value="dark" <?php if ($Theme == "dark") {
|
137 |
+
echo esc_attr("selected=selected");
|
138 |
+
} ?>><?php esc_html_e('Dark', 'twitter-tweets'); ?>
|
139 |
+
</option>
|
140 |
+
</select>
|
141 |
+
</div>
|
142 |
</div>
|
143 |
</div>
|
|
|
144 |
</p>
|
145 |
<br>
|
146 |
|
147 |
<p>
|
148 |
+
<div class="container">
|
149 |
+
<div class="row">
|
150 |
+
<div class="col-sm">
|
151 |
+
<label><?php esc_html_e('Height', 'twitter-tweets'); ?></label>
|
152 |
+
</div>
|
153 |
+
<div class="col-sm">
|
154 |
+
<input class="widefat wltt-slider" id="twitter-page-url-Height" name="twitter-page-url-Height" type="range" value="<?php echo esc_attr($Height); ?>" min="0" max="1500" data-rangeSlider>
|
155 |
+
<p><b><?php esc_html_e('Set your desire height px (Use Arrow Keys For Exact Numbers)', 'twitter-tweets'); ?></b>
|
156 |
+
<span id="twitter-range-val"></span>
|
157 |
+
</p>
|
|
|
|
|
|
|
158 |
|
159 |
+
</div>
|
160 |
</div>
|
161 |
</div>
|
|
|
|
|
|
|
162 |
</p>
|
|
|
|
|
163 |
<br>
|
|
|
164 |
<p>
|
165 |
+
<div class="container">
|
166 |
+
<div class="row">
|
167 |
+
<div class="col-sm">
|
168 |
+
<label><?php esc_html_e('Exclude Replies on Tweets', 'twitter-tweets'); ?></label>
|
169 |
+
</div>
|
170 |
+
<div class="col-sm">
|
171 |
+
<select id="exclude_replies_23" name="exclude_replies_23">
|
172 |
+
<option value="yes" <?php if ($ExcludeReplies == "yes") {
|
173 |
+
echo esc_attr("selected=selected");
|
174 |
+
} ?>><?php esc_html_e('Yes', 'twitter-tweets'); ?>
|
175 |
+
</option>
|
176 |
+
<option value="no" <?php if ($ExcludeReplies == "no") {
|
177 |
+
echo esc_attr("selected=selected");
|
178 |
+
} ?>><?php esc_html_e('No', 'twitter-tweets'); ?>
|
179 |
+
</option>
|
180 |
+
</select>
|
181 |
+
</div>
|
182 |
</div>
|
183 |
</div>
|
|
|
184 |
|
185 |
|
186 |
</p>
|
187 |
<br>
|
188 |
<p>
|
189 |
+
<div class="container">
|
190 |
+
<div class="row">
|
191 |
+
<div class="col-sm">
|
192 |
+
<label><?php esc_html_e('Auto Expand Photos in Tweets', 'twitter-tweets'); ?></label>
|
193 |
+
</div>
|
194 |
+
<div class="col-sm">
|
195 |
+
<select id="photo_1234" name="photo_1234">
|
196 |
+
<option value="yes" <?php if ($AutoExpandPhotos == "yes") {
|
197 |
+
echo esc_attr("selected=selected");
|
198 |
+
} ?>><?php esc_html_e('Yes', 'twitter-tweets'); ?>
|
199 |
+
</option>
|
200 |
+
<option value="no" <?php if ($AutoExpandPhotos == "no") {
|
201 |
+
echo esc_attr("selected=selected");
|
202 |
+
} ?>><?php esc_html_e('No', 'twitter-tweets'); ?>
|
203 |
+
</option>
|
204 |
+
</select>
|
205 |
+
</div>
|
206 |
</div>
|
207 |
</div>
|
|
|
208 |
|
209 |
|
210 |
</p>
|
211 |
<br>
|
212 |
<p>
|
213 |
+
<div class="container">
|
214 |
+
<div class="row">
|
215 |
+
<div class="col-sm">
|
216 |
+
<label><?php esc_html_e('Select Language', 'twitter-tweets'); ?></label>
|
217 |
+
</div>
|
218 |
+
<div class="col-sm">
|
219 |
+
<select id="tw_language" name="tw_language">
|
220 |
+
<option value="" <?php if ($tw_language == "") {
|
221 |
+
echo esc_attr("selected=selected");
|
222 |
+
} ?>><?php esc_html_e('Automatic', 'twitter-tweets'); ?>
|
223 |
+
</option>
|
224 |
+
<option value="en" <?php if ($tw_language == "en") {
|
225 |
+
echo esc_attr("selected=selected");
|
226 |
+
} ?>><?php esc_html_e('English (default)', 'twitter-tweets'); ?>
|
227 |
+
</option>
|
228 |
+
<option value="ar" <?php if ($tw_language == "ar") {
|
229 |
+
echo esc_attr("selected=selected");
|
230 |
+
} ?>><?php esc_html_e('Arabic', 'twitter-tweets'); ?>
|
231 |
+
</option>
|
232 |
+
<option value="bn" <?php if ($tw_language == "bn") {
|
233 |
+
echo esc_attr("selected=selected");
|
234 |
+
} ?>><?php esc_html_e('Bengali', 'twitter-tweets'); ?>
|
235 |
+
</option>
|
236 |
+
<option value="cs" <?php if ($tw_language == "cs") {
|
237 |
+
echo esc_attr("selected=selected");
|
238 |
+
} ?>><?php esc_html_e('Czech', 'twitter-tweets'); ?>
|
239 |
+
</option>
|
240 |
+
<option value="da" <?php if ($tw_language == "da") {
|
241 |
+
echo esc_attr("selected=selected");
|
242 |
+
} ?>><?php esc_html_e('Danish', 'twitter-tweets'); ?>
|
243 |
+
</option>
|
244 |
+
<option value="de" <?php if ($tw_language == "de") {
|
245 |
+
echo esc_attr("selected=selected");
|
246 |
+
} ?>><?php esc_html_e('German', 'twitter-tweets'); ?>
|
247 |
+
</option>
|
248 |
+
<option value="el" <?php if ($tw_language == "el") {
|
249 |
+
echo esc_attr("selected=selected");
|
250 |
+
} ?>><?php esc_html_e('Greek', 'twitter-tweets'); ?>
|
251 |
+
</option>
|
252 |
+
<option value="es" <?php if ($tw_language == "es") {
|
253 |
+
echo esc_attr("selected=selected");
|
254 |
+
} ?>><?php esc_html_e('Spanish', 'twitter-tweets'); ?>
|
255 |
+
</option>
|
256 |
+
<option value="fa" <?php if ($tw_language == "fa") {
|
257 |
+
echo esc_attr("selected=selected");
|
258 |
+
} ?>><?php esc_html_e('Persian', 'twitter-tweets'); ?>
|
259 |
+
</option>
|
260 |
+
<option value="fi" <?php if ($tw_language == "fi") {
|
261 |
+
echo esc_attr("selected=selected");
|
262 |
+
} ?>><?php esc_html_e('Finnish', 'twitter-tweets'); ?>
|
263 |
+
</option>
|
264 |
+
<option value="fil" <?php if ($tw_language == "fil") {
|
265 |
+
echo esc_attr("selected=selected");
|
266 |
+
} ?>><?php esc_html_e('Filipino', 'twitter-tweets'); ?>
|
267 |
+
</option>
|
268 |
+
<option value="fr" <?php if ($tw_language == "fr") {
|
269 |
+
echo esc_attr("selected=selected");
|
270 |
+
} ?>><?php esc_html_e('French', 'twitter-tweets'); ?>
|
271 |
+
</option>
|
272 |
+
<option value="he" <?php if ($tw_language == "he") {
|
273 |
+
echo esc_attr("selected=selected");
|
274 |
+
} ?>><?php esc_html_e('Hebrew', 'twitter-tweets'); ?>
|
275 |
+
</option>
|
276 |
+
<option value="hi" <?php if ($tw_language == "hi") {
|
277 |
+
echo esc_attr("selected=selected");
|
278 |
+
} ?>><?php esc_html_e('Hindi', 'twitter-tweets'); ?>
|
279 |
+
</option>
|
280 |
+
<option value="hu" <?php if ($tw_language == "hu") {
|
281 |
+
echo esc_attr("selected=selected");
|
282 |
+
} ?>><?php esc_html_e('EHungarian', 'twitter-tweets'); ?>
|
283 |
+
</option>
|
284 |
+
<option value="id" <?php if ($tw_language == "id") {
|
285 |
+
echo esc_attr("selected=selected");
|
286 |
+
} ?>><?php esc_html_e('Indonesian', 'twitter-tweets'); ?>
|
287 |
+
</option>
|
288 |
+
<option value="it" <?php if ($tw_language == "it") {
|
289 |
+
echo esc_attr("selected=selected");
|
290 |
+
} ?>><?php esc_html_e('Italian', 'twitter-tweets'); ?>
|
291 |
+
</option>
|
292 |
+
<option value="ja" <?php if ($tw_language == "ja") {
|
293 |
+
echo esc_attr("selected=selected");
|
294 |
+
} ?>><?php esc_html_e('Japanese', 'twitter-tweets'); ?>
|
295 |
+
</option>
|
296 |
+
<option value="ko" <?php if ($tw_language == "ko") {
|
297 |
+
echo esc_attr("selected=selected");
|
298 |
+
} ?>><?php esc_html_e('Korean', 'twitter-tweets'); ?>
|
299 |
+
</option>
|
300 |
+
<option value="msa" <?php if ($tw_language == "msa") {
|
301 |
+
echo esc_attr("selected=selected");
|
302 |
+
} ?>><?php esc_html_e('Malay', 'twitter-tweets'); ?>
|
303 |
+
</option>
|
304 |
+
<option value="nl" <?php if ($tw_language == "nl") {
|
305 |
+
echo esc_attr("selected=selected");
|
306 |
+
} ?>><?php esc_html_e('Dutch)', 'twitter-tweets'); ?>
|
307 |
+
</option>
|
308 |
+
<option value="no" <?php if ($tw_language == "no") {
|
309 |
+
echo esc_attr("selected=selected");
|
310 |
+
} ?>><?php esc_html_e('Norwegian', 'twitter-tweets'); ?>
|
311 |
+
</option>
|
312 |
+
<option value="pl" <?php if ($tw_language == "pl") {
|
313 |
+
echo esc_attr("selected=selected");
|
314 |
+
} ?>><?php esc_html_e('Polish', 'twitter-tweets'); ?>
|
315 |
+
</option>
|
316 |
+
<option value="pt" <?php if ($tw_language == "pt") {
|
317 |
+
echo esc_attr("selected=selected");
|
318 |
+
} ?>><?php esc_html_e('Portuguese', 'twitter-tweets'); ?>
|
319 |
+
</option>
|
320 |
+
<option value="ro" <?php if ($tw_language == "ro") {
|
321 |
+
echo esc_attr("selected=selected");
|
322 |
+
} ?>><?php esc_html_e('Romanian', 'twitter-tweets'); ?>
|
323 |
+
</option>
|
324 |
+
<option value="ru" <?php if ($tw_language == "ru") {
|
325 |
+
echo esc_attr("selected=selected");
|
326 |
+
} ?>><?php esc_html_e('Russian', 'twitter-tweets'); ?>
|
327 |
+
</option>
|
328 |
+
<option value="sv" <?php if ($tw_language == "sv") {
|
329 |
+
echo esc_attr("selected=selected");
|
330 |
+
} ?>><?php esc_html_e('Swedish', 'twitter-tweets'); ?>
|
331 |
+
</option>
|
332 |
+
<option value="th" <?php if ($tw_language == "th") {
|
333 |
+
echo esc_attr("selected=selected");
|
334 |
+
} ?>><?php esc_html_e('Thai', 'twitter-tweets'); ?>
|
335 |
+
</option>
|
336 |
+
<option value="tr" <?php if ($tw_language == "tr") {
|
337 |
+
echo esc_attr("selected=selected");
|
338 |
+
} ?>><?php esc_html_e('Turkish', 'twitter-tweets'); ?>
|
339 |
+
</option>
|
340 |
+
<option value="uk" <?php if ($tw_language == "uk") {
|
341 |
+
echo esc_attr("selected=selected");
|
342 |
+
} ?>><?php esc_html_e('Ukrainian', 'twitter-tweets'); ?>
|
343 |
+
</option>
|
344 |
+
<option value="ur" <?php if ($tw_language == "ur") {
|
345 |
+
echo esc_attr("selected=selected");
|
346 |
+
} ?>><?php esc_html_e('Urdu', 'twitter-tweets'); ?>
|
347 |
+
</option>
|
348 |
+
<option value="vi" <?php if ($tw_language == "vi") {
|
349 |
+
echo esc_attr("selected=selected");
|
350 |
+
} ?>><?php esc_html_e('Vietnamese', 'twitter-tweets'); ?>
|
351 |
+
</option>
|
352 |
+
<option value="zh-cn" <?php if ($tw_language == "zh-cn") {
|
353 |
+
echo esc_attr("selected=selected");
|
354 |
+
} ?>><?php esc_html_e('Chinese (Simplified)', 'twitter-tweets'); ?>
|
355 |
+
</option>
|
356 |
+
<option value="zh-tw" <?php if ($tw_language == "zh-tw") {
|
357 |
+
echo esc_attr("selected=selected");
|
358 |
+
} ?>><?php esc_html_e('Chinese', 'twitter-tweets'); ?>
|
359 |
+
(Traditional)
|
360 |
+
</option>
|
361 |
+
</select>
|
362 |
+
</div>
|
363 |
</div>
|
364 |
</div>
|
|
|
365 |
|
366 |
|
367 |
</p>
|
368 |
<br>
|
369 |
|
370 |
+
<input onclick="return SaveSettings();" type="button" class="twt_save_btn" id="fb-save-settings" name="fb-save-settings" value="SAVE">
|
|
|
371 |
|
372 |
<div id="fb-img" style="display: none;">
|
373 |
+
<img src="<?php echo esc_url(WEBLIZAR_TWITTER_PLUGIN_URL . 'images/loading.gif'); ?>" />
|
|
|
374 |
</div>
|
375 |
<div id="fb-msg" style="display: none;" class="alert">
|
376 |
<?php esc_html_e('Settings successfully saved. Reloading page for generating preview right side of setting.', 'twitter-tweets'); ?>
|
381 |
<!-- Preview Part-->
|
382 |
<div class="col-md-6">
|
383 |
<?php if ($TwitterWidgetId) { ?>
|
384 |
+
<h2 class="well"><?php esc_html_e('Feeds Shortcode Preview', 'twitter-tweets'); ?>
|
385 |
+
</h2>
|
386 |
+
<hr>
|
387 |
+
<p>
|
388 |
+
<a class="twitter-timeline" data-dnt="true" href="https://twitter.com/<?php echo esc_attr($TwitterUserName); ?>" min-width="<?php echo esc_attr($Width); ?>" height="<?php echo esc_attr($Height); ?>" data-theme="<?php echo esc_attr($Theme); ?>" data-lang="<?php echo esc_attr($tw_language); ?>"></a>
|
389 |
+
<div class="twt_help">
|
390 |
+
<?php esc_html_e('Please copy the twitter shortcode', 'twitter-tweets'); ?>
|
391 |
+
<span style="color:#000;"><b>[TWTR]</b> </span> <?php esc_html_e('and paste it to on the Page/Post', 'twitter-tweets'); ?></span>
|
392 |
+
</div>
|
393 |
+
</p>
|
|
|
|
|
|
|
|
|
|
|
394 |
<?php } ?>
|
395 |
</div>
|
396 |
</div>
|
412 |
<form name='api-form' id='api-form'>
|
413 |
<br>
|
414 |
<p>
|
415 |
+
<div class="container">
|
416 |
+
<div class="row">
|
417 |
+
<div class="col-sm">
|
418 |
+
<label><?php esc_html_e('Consumer Key', 'twitter-tweets'); ?> *</label>
|
419 |
+
</div>
|
420 |
+
<div class="col-sm">
|
421 |
+
<input class="widefat" id="wl_twitter_consumer_key" name="wl_twitter_consumer_key" type="text" value="<?php if (isset($wl_twitter_consumer_key)) {
|
422 |
+
echo esc_attr($wl_twitter_consumer_key);
|
423 |
+
} ?>" placeholder="<?php esc_attr_e('Enter Your Twitter Consumer Key', 'twitter-tweets'); ?>">
|
424 |
+
<span class="helplink"><?php esc_html_e("Visit this link to ", 'twitter-tweets'); ?><a href="https://weblizar.com/blog/generate-twitter-api-key/" target="_bank"><?php esc_html_e("Generate Twitter API key", 'twitter-tweets'); ?></a></span>
|
425 |
+
<br>
|
426 |
+
</div>
|
|
|
|
|
427 |
</div>
|
428 |
</div>
|
|
|
429 |
|
430 |
|
431 |
</p>
|
433 |
|
434 |
<br>
|
435 |
<p>
|
436 |
+
<div class="container">
|
437 |
+
<div class="row">
|
438 |
+
<div class="col-sm">
|
439 |
+
<label><?php esc_html_e('Consumer Secret', 'twitter-tweets'); ?> *</label>
|
440 |
+
</div>
|
441 |
+
<div class="col-sm">
|
442 |
+
<input class="widefat" id="wl_twitter_consumer_secret" name="wl_twitter_consumer_secret" type="text" value="<?php if (isset($wl_twitter_consumer_secret)) {
|
443 |
+
echo esc_attr($wl_twitter_consumer_secret);
|
444 |
+
} ?>" placeholder="<?php esc_attr_e('Enter Your Twitter Consumer Secret', 'twitter-tweets'); ?>">
|
445 |
+
</div>
|
446 |
</div>
|
447 |
</div>
|
|
|
448 |
|
449 |
|
450 |
</p>
|
452 |
|
453 |
<br>
|
454 |
<p>
|
455 |
+
<div class="container">
|
456 |
+
<div class="row">
|
457 |
+
<div class="col-sm">
|
458 |
+
<label><?php esc_html_e('Access Token', 'twitter-tweets'); ?> *</label>
|
459 |
+
</div>
|
460 |
+
<div class="col-sm">
|
461 |
+
<input class="widefat" id="wl_twitter_access_token" name="wl_twitter_access_token" type="text" value="<?php if (isset($wl_twitter_access_token)) {
|
462 |
+
echo esc_attr($wl_twitter_access_token);
|
463 |
+
} ?>" placeholder="<?php esc_attr_e('Enter Your Twitter Access Token', 'twitter-tweets'); ?>">
|
464 |
+
</div>
|
465 |
</div>
|
466 |
</div>
|
|
|
467 |
|
468 |
|
469 |
</p>
|
471 |
|
472 |
<br>
|
473 |
<p>
|
474 |
+
<div class="container">
|
475 |
+
<div class="row">
|
476 |
+
<div class="col-sm">
|
477 |
+
<label><?php esc_html_e('Access Token Secret', 'twitter-tweets'); ?> *</label>
|
478 |
+
</div>
|
479 |
+
<div class="col-sm">
|
480 |
+
<input class="widefat" id="wl_twitter_token_secret" name="wl_twitter_token_secret" type="text" value="<?php if (isset($wl_twitter_token_secret)) {
|
481 |
+
echo esc_attr($wl_twitter_token_secret);
|
482 |
+
} ?>" placeholder="<?php esc_attr_e('Enter Your Twitter Token Secret', 'twitter-tweets'); ?>">
|
483 |
+
</div>
|
484 |
</div>
|
485 |
</div>
|
|
|
486 |
|
487 |
|
488 |
</p>
|
489 |
|
490 |
<br>
|
491 |
<p>
|
492 |
+
<div class="container">
|
493 |
+
<div class="row">
|
494 |
+
<div class="col-sm">
|
495 |
+
<label><?php esc_html_e('No. Of tweets Show', 'twitter-tweets'); ?></label>
|
496 |
+
</div>
|
497 |
+
<div class="col-sm">
|
498 |
+
<input class="widefat wltt-slider" id="wl_twitter_tweets" name="wl_twitter_tweets" type="range" value="<?php if (isset($wl_twitter_tweets)) {
|
499 |
+
echo esc_attr($wl_twitter_tweets);
|
500 |
+
} ?>" min="1" max="14" data-rangeSlider>
|
501 |
+
<p>
|
502 |
+
<b><?php esc_html_e('Set no of tweets you want to show (Use Arrow Keys)', 'twitter-tweets'); ?></b>
|
503 |
+
<span id="wl_twitter_range_show"></span>
|
504 |
+
</p>
|
505 |
+
</div>
|
506 |
</div>
|
507 |
</div>
|
|
|
508 |
|
509 |
|
510 |
</p>
|
511 |
|
512 |
<br>
|
513 |
<p>
|
514 |
+
<div class="container">
|
515 |
+
<div class="row">
|
516 |
+
<div class="col-sm">
|
517 |
+
<label><?php esc_html_e('Layout', 'twitter-tweets'); ?></label>
|
518 |
+
</div>
|
519 |
+
<div class="col-sm">
|
520 |
+
<select class="widefat" name="wl_twitter_layout" id="wl_twitter_layout">
|
521 |
+
<option value=""><?php esc_html_e('Select', 'twitter-tweets'); ?>
|
522 |
+
</option>
|
523 |
+
<option <?php if (strval($wl_twitter_layout) == "12") {
|
524 |
+
echo esc_attr('selected');
|
525 |
+
} ?> value="12"><?php esc_html_e('1', 'twitter-tweets'); ?>
|
526 |
+
</option>
|
527 |
+
<option <?php if (strval($wl_twitter_layout) == "6") {
|
528 |
+
echo esc_attr('selected');
|
529 |
+
} ?> value="6"><?php esc_html_e('2', 'twitter-tweets'); ?>
|
530 |
+
</option>
|
531 |
+
<option <?php if (strval($wl_twitter_layout) == "4") {
|
532 |
+
echo esc_attr('selected');
|
533 |
+
} ?> value="4"><?php esc_html_e('3', 'twitter-tweets'); ?>
|
534 |
+
</option>
|
535 |
+
<option <?php if (strval($wl_twitter_layout) == "3") {
|
536 |
+
echo esc_attr('selected');
|
537 |
+
} ?> value="3"><?php esc_html_e('4', 'twitter-tweets'); ?>
|
538 |
+
</option>
|
539 |
+
</select>
|
540 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
541 |
</div>
|
542 |
</div>
|
|
|
543 |
</p>
|
544 |
<br>
|
545 |
<?php
|
546 |
+
wp_nonce_field('twitter_api_nonce', 'twitter_api_nonce');
|
547 |
+
?>
|
548 |
+
<input onclick="return SaveApiSettings();" type="button" class="twt_save_btn" id="fb-api-save-settings" name="fb-api-save-settings" value="SAVE">
|
|
|
549 |
<br><br><br>
|
550 |
<div class="twt_help">
|
551 |
<?php esc_html_e('Please copy the twitter shortcode', 'twitter-tweets'); ?>
|
554 |
<?php esc_html_e('and paste it to on the Page/Post', 'twitter-tweets'); ?></span>
|
555 |
</div>
|
556 |
<div id="twitter-img" style="display: none;">
|
557 |
+
<img src="<?php echo esc_url(WEBLIZAR_TWITTER_PLUGIN_URL . 'images/loading.gif'); ?>" />
|
|
|
558 |
</div>
|
559 |
<div id="wl_twitter_preview" style="display: none;" class="alert">
|
560 |
<?php esc_html_e('Settings successfully saved. Reloading page for generating preview right side of setting.', 'twitter-tweets'); ?>
|
568 |
<div class="container-fluid">
|
569 |
<div class="row">
|
570 |
<div class="col-md-<?php if (isset($wl_twitter_layout)) {
|
571 |
+
echo esc_attr($wl_twitter_layout);
|
572 |
+
} ?>">
|
573 |
<?php
|
574 |
+
if (isset($statuses) && is_array($statuses)) {
|
575 |
+
foreach ($statuses as $status) {
|
576 |
+
/* user info */
|
577 |
+
if (isset($status->user)) {
|
578 |
+
$user = $status->user;
|
579 |
+
}
|
580 |
+
if (isset($user->name)) {
|
581 |
+
$name = $user->name;
|
582 |
+
}
|
583 |
+
if (isset($user->screen_name)) {
|
584 |
+
$screen_name = $user->screen_name;
|
585 |
+
}
|
586 |
+
if (isset($user->location)) {
|
587 |
+
$location = $user->location;
|
588 |
+
}
|
589 |
+
if (isset($user->description)) {
|
590 |
+
$description = $user->description;
|
591 |
+
}
|
592 |
+
if (isset($user->url)) {
|
593 |
+
$url = $user->url;
|
594 |
+
}
|
595 |
+
if (isset($status->id_str)) {
|
596 |
+
$id_str = $status->id_str; /* use it to make link of post */
|
597 |
+
}
|
598 |
+
if (isset($status->created_at)) {
|
599 |
+
$created_at = $status->created_at; /* time when tweet was created */
|
600 |
+
}
|
601 |
+
/* profile_image_url */
|
602 |
+
if (isset($user->profile_image_url)) {
|
603 |
+
$profile_image_url = $user->profile_image_url;
|
604 |
+
}
|
605 |
+
if (isset($user->profile_image_url_https)) {
|
606 |
+
$profile_image_url_https = $user->profile_image_url_https;
|
607 |
+
} ?>
|
608 |
+
<div class="wl_tweet_box">
|
609 |
+
<p class="wl_tweet">
|
610 |
+
<img class="align-self-start mr-3" src="<?php if (isset($user->profile_image_url_https)) {
|
611 |
+
echo esc_url($profile_image_url_https);
|
612 |
+
} ?>" alt="">
|
613 |
+
<a href="https://twitter.com/<?php if (isset($user->screen_name)) {
|
614 |
+
echo esc_attr($screen_name);
|
615 |
+
} ?>">
|
616 |
+
<?php if (isset($user->screen_name)) {
|
617 |
+
echo esc_html("@" . $screen_name);
|
618 |
+
} ?>
|
619 |
+
</a>
|
620 |
+
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
621 |
<?php
|
622 |
+
// $entities = $status->entities;
|
623 |
+
if (isset($status->extended_entities)) {
|
624 |
+
$extended_entities_array = $status->extended_entities->media;
|
625 |
+
$extended_entities = $extended_entities_array[0];
|
626 |
+
$display_url = $extended_entities->display_url;
|
627 |
+
$media_expanded_url = $extended_entities->expanded_url;
|
628 |
+
$media_type = $extended_entities->type;
|
629 |
+
$media_url = $extended_entities->media_url;
|
630 |
+
if ($media_type == "photo") {
|
631 |
+
?>
|
632 |
+
<img src="<?php echo esc_url($media_url); ?>" class="img-fluid" />
|
633 |
+
<?php
|
634 |
+
} elseif ($media_type == "video") {
|
635 |
+
$video_info = $extended_entities->video_info->variants[2];
|
636 |
+
$content_type = $video_info->content_type;
|
637 |
+
$url = $video_info->url;
|
638 |
+
$new_url = str_replace("?tag=8", "", $url);
|
639 |
+
|
640 |
+
if (isset($enable_extended_entitie) && $enable_extended_entitie == "enable") {
|
641 |
+
?>
|
642 |
+
<a href="#" data-toggle="modal" data-target="#myModal">
|
643 |
+
<img src="<?php echo esc_url($media_url); ?>" class="img-fluid" />
|
644 |
+
</a>
|
645 |
+
<?php
|
646 |
+
} else {
|
647 |
+
?>
|
648 |
+
<a href="#">
|
649 |
+
<img src="<?php echo esc_url($media_url); ?>" class="img-fluid" />
|
650 |
+
</a>
|
651 |
+
<?php
|
652 |
+
}
|
653 |
+
}
|
654 |
+
} /* extended enntities */ elseif (!empty($entities->media) && is_array($entities->media)) {
|
655 |
+
$media = $entities->media;
|
656 |
+
foreach ($media as $media_key => $media_value) {
|
657 |
+
$media_url = $media_value->media_url;
|
658 |
+
$media_url_https = $media_value->media_url_https;
|
659 |
+
$media_detail_url = $media_value->url;
|
660 |
+
$media_display_url = $media_value->display_url;
|
661 |
+
$media_expanded_url = $media_value->expanded_url;
|
662 |
+
$media_type = $media_value->type;
|
663 |
+
$media_sizes = $media_value->sizes; ?>
|
664 |
+
<a href="<?php echo esc_url($media_expanded_url); ?>">
|
665 |
+
<img src="<?php echo esc_url($media_url_https); ?>" class="img-fluid" />
|
666 |
+
</a>
|
667 |
<?php
|
668 |
+
}
|
669 |
+
} ?>
|
670 |
+
<p class="wl_tweet_desc">
|
671 |
+
<?php
|
672 |
+
if (isset($status->text)) {
|
673 |
+
echo esc_html(makeLinks($status->text));
|
674 |
+
} ?>
|
675 |
+
</p>
|
676 |
+
<p class="wl_tweet_action_buttons">
|
677 |
+
<a href="https://twitter.com/intent/retweet?tweet_id=<?php echo esc_attr($id_str); ?>&related=<?php echo esc_attr($screen_name); ?> retweet" target="_blank" onclick="window.open('https://twitter.com/intent/retweet?tweet_id=<?php echo esc_attr($id_str); ?>&related=<?php echo esc_attr($screen_name); ?> retweet', 'newwindow', 'width=600,height=450'); return false;">
|
678 |
+
<?php
|
679 |
+
if (isset($status->retweet_count)) {
|
680 |
+
esc_html_e('Retweet', 'twitter-tweets');
|
681 |
+
echo esc_html("($status->retweet_count)");
|
682 |
+
} ?>
|
683 |
+
</a>
|
684 |
+
|
685 |
+
<a href="https://twitter.com/intent/like?tweet_id=<?php echo esc_html($id_str); ?>&related=<?php echo esc_attr($screen_name); ?>" target="_blank" onclick="window.open('https://twitter.com/intent/like?tweet_id=<?php echo esc_attr($id_str); ?>&related=<?php echo esc_attr($screen_name); ?> retweet', 'newwindow', 'width=600,height=450'); return false;">
|
686 |
+
<?php
|
687 |
+
if (isset($status->favorite_count)) {
|
688 |
+
esc_html_e('Like', 'twitter-tweets');
|
689 |
+
echo esc_html("($status->favorite_count)");
|
690 |
+
} ?>
|
691 |
+
</a>
|
692 |
+
|
693 |
+
<a href="https://twitter.com/intent/tweet?in_reply_to=<?php echo esc_attr($id_str); ?>&related=<?php echo esc_html($screen_name); ?>" target="_blank" onclick="window.open('https://twitter.com/intent/tweet?in_reply_to=<?php echo esc_attr($id_str); ?>&related=<?php echo esc_attr($screen_name); ?> retweet', 'newwindow', 'width=600,height=450'); return false;"><?php esc_html_e('Reply', 'twitter-tweets'); ?>
|
694 |
+
</a>
|
695 |
+
</p>
|
696 |
+
<span class="wl-wtp-date-font-size"><?php if (isset($status->created_at)) {
|
697 |
+
echo esc_html(tweet_time_calculate($created_at));
|
698 |
+
} ?>
|
699 |
+
<?php if (isset($status->created_at)) {
|
700 |
+
esc_html_e('ago', 'twitter-tweets');
|
701 |
+
} ?>
|
702 |
+
</span>
|
703 |
+
</div> <!-- Tweet box -->
|
704 |
<?php
|
705 |
+
}
|
706 |
+
} ?>
|
707 |
</div>
|
708 |
</div>
|
709 |
</div>
|
728 |
<li><?php esc_html_e('Customize feeds Shortcode', 'twitter-tweets'); ?><?php esc_html_e('[TWTR]', 'twitter-tweets'); ?>
|
729 |
</li>
|
730 |
<li><?php esc_html_e('Note: Protected tweets will not view', 'twitter-tweets'); ?>
|
731 |
+
<a href="https://help.twitter.com/en/safety-and-security/public-and-protected-tweets" target="_blank"><?php esc_html_e('Help', 'twitter-tweets'); ?></a>
|
|
|
732 |
</li>
|
733 |
</ol>
|
734 |
<br>
|
738 |
<ol>
|
739 |
<li><?php esc_html_e('You can use the widget to display your Twitter Tweets in any theme Widget Sections.', 'twitter-tweets'); ?>
|
740 |
</li>
|
741 |
+
<li><?php esc_html_e('Simple go to your', 'twitter-tweets'); ?><a href="<?php echo get_site_url(); ?>/wp-admin/widgets.php"><strong><?php esc_html_e('Widgets', 'twitter-tweets'); ?></strong></a><?php esc_html_e(' section and activate available', 'twitter-tweets'); ?>
|
|
|
742 |
<strong><?php esc_html_e('Twitter By Weblizar', 'twitter-tweets'); ?></strong>
|
743 |
<?php esc_html_e('widget in any sidebar section, like in left sidebar, right sidebar or footer sidebar.', 'twitter-tweets'); ?>
|
744 |
</li>
|
769 |
<p class="well"><strong><?php esc_html_e('How to generate Twitter API Key', 'twitter-tweets'); ?></strong>
|
770 |
</p>
|
771 |
<p><?php esc_html_e('We have created a blog post on this topic. It is very easy to understand.', 'twitter-tweets'); ?>
|
772 |
+
<span class="helptopic"><a href="https://weblizar.com/blog/generate-twitter-api-key/" target="_blank"><?php esc_html_e('Click here', 'twitter-tweets'); ?></a></span><?php esc_html_e(' to visit the blog.', 'twitter-tweets'); ?>
|
|
|
773 |
</p>
|
774 |
|
775 |
<br>
|
790 |
<b><?php esc_html_e('Customize Feeds for Twitter Widget', 'twitter-tweets'); ?></b><?php esc_html_e('plugin and find it useful, then please consider writing a positive feedback. Your feedback will help us to encourage and support the plugin continued development and better user support.', 'twitter-tweets'); ?>
|
791 |
</p>
|
792 |
<div class="twt_star">
|
793 |
+
<a class="acl-rate-us" style="text-align:center; text-decoration: none;font:normal 30px/l;" href="https://wordpress.org/plugins/twitter-tweets/#reviews" target="_blank">
|
|
|
794 |
<span class="dashicons dashicons-star-filled"></span>
|
795 |
<span class="dashicons dashicons-star-filled"></span>
|
796 |
<span class="dashicons dashicons-star-filled"></span>
|
twitter-tweets.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
* Plugin Name: Customize Feeds for Twitter
|
4 |
-
* Version: 1.9.
|
5 |
* Description: Customize Feeds for Twitter plugin for WordPress. You can use this to display real time Twitter feeds on any where on your webiste by using shortcode or widgets
|
6 |
* Author: Weblizar
|
7 |
* Author URI: https://www.weblizar.com/
|
1 |
<?php
|
2 |
/*
|
3 |
* Plugin Name: Customize Feeds for Twitter
|
4 |
+
* Version: 1.9.7
|
5 |
* Description: Customize Feeds for Twitter plugin for WordPress. You can use this to display real time Twitter feeds on any where on your webiste by using shortcode or widgets
|
6 |
* Author: Weblizar
|
7 |
* Author URI: https://www.weblizar.com/
|