Version Description
- Fixed small bug for link contained in the tweet text
Download this release
Release Info
Developer | Access Keys |
Plugin | AccessPress Twitter Feed – Twitter Feed for WordPress |
Version | 1.4.0 |
Comparing to | |
See all releases |
Code changes from version 1.3.9 to 1.4.0
- accesspress-twitter-feed.php +6 -2
- inc/frontend/templates/default/template-1.php +4 -3
- inc/frontend/templates/default/template-2.php +5 -2
- inc/frontend/templates/default/template-3.php +3 -3
- inc/frontend/templates/slider/template-1.php +3 -2
- inc/frontend/templates/slider/template-2.php +3 -2
- inc/frontend/templates/slider/template-3.php +3 -1
- readme.txt +4 -1
accesspress-twitter-feed.php
CHANGED
@@ -4,7 +4,7 @@ defined('ABSPATH') or die('No script kiddies please!');
|
|
4 |
* Plugin Name: AccessPress Twitter Feed
|
5 |
* Plugin URI: https://accesspressthemes.com/wordpress-plugins/accesspress-twitter-feed/
|
6 |
* Description: A plugin to show your twitter feed in your site with various configurable settings
|
7 |
-
* Version: 1.
|
8 |
* Author: AccessPress Themes
|
9 |
* Author URI: http://accesspressthemes.com
|
10 |
* Text Domain: accesspress-twitter-feed
|
@@ -24,7 +24,7 @@ if (!defined('APTF_CSS_DIR')) {
|
|
24 |
define('APTF_CSS_DIR', plugin_dir_url(__FILE__) . 'css');
|
25 |
}
|
26 |
if (!defined('APTF_VERSION')) {
|
27 |
-
define('APTF_VERSION', '1.
|
28 |
}
|
29 |
|
30 |
if (!defined('APTF_TD')) {
|
@@ -320,6 +320,10 @@ if (!class_exists('APTF_Class')) {
|
|
320 |
return $tweets;
|
321 |
}
|
322 |
|
|
|
|
|
|
|
|
|
323 |
|
324 |
|
325 |
|
4 |
* Plugin Name: AccessPress Twitter Feed
|
5 |
* Plugin URI: https://accesspressthemes.com/wordpress-plugins/accesspress-twitter-feed/
|
6 |
* Description: A plugin to show your twitter feed in your site with various configurable settings
|
7 |
+
* Version: 1.4.0
|
8 |
* Author: AccessPress Themes
|
9 |
* Author URI: http://accesspressthemes.com
|
10 |
* Text Domain: accesspress-twitter-feed
|
24 |
define('APTF_CSS_DIR', plugin_dir_url(__FILE__) . 'css');
|
25 |
}
|
26 |
if (!defined('APTF_VERSION')) {
|
27 |
+
define('APTF_VERSION', '1.4.0');
|
28 |
}
|
29 |
|
30 |
if (!defined('APTF_TD')) {
|
320 |
return $tweets;
|
321 |
}
|
322 |
|
323 |
+
function makeClickableLinks($s) {
|
324 |
+
return preg_replace('@(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.-]*(\?\S+)?)?)?)@', '<a href="$1" target="_blank">$1</a>', $s);
|
325 |
+
}
|
326 |
+
|
327 |
|
328 |
|
329 |
|
inc/frontend/templates/default/template-1.php
CHANGED
@@ -15,6 +15,7 @@
|
|
15 |
<?php
|
16 |
if ($tweet->text) {
|
17 |
$the_tweet = ' '.$tweet->text . ' '; //adding an extra space to convert hast tag into links
|
|
|
18 |
|
19 |
// i. User_mentions must link to the mentioned user's profile.
|
20 |
if (is_array($tweet->entities->user_mentions)) {
|
@@ -33,14 +34,14 @@
|
|
33 |
|
34 |
// iii. Links in Tweet text must be displayed using the display_url
|
35 |
// field in the URL entities API response, and link to the original t.co url field.
|
36 |
-
|
37 |
foreach ($tweet->entities->urls as $key => $link) {
|
38 |
$the_tweet = preg_replace(
|
39 |
'`' . $link->url . '`', '<a href="' . $link->url . '" target="_blank">' . $link->url . '</a>', $the_tweet);
|
40 |
}
|
41 |
}
|
42 |
-
|
43 |
-
|
44 |
?>
|
45 |
</div><!--tweet content-->
|
46 |
<?php if (isset($aptf_settings['display_twitter_actions']) && $aptf_settings['display_twitter_actions'] == 1) { ?>
|
15 |
<?php
|
16 |
if ($tweet->text) {
|
17 |
$the_tweet = ' '.$tweet->text . ' '; //adding an extra space to convert hast tag into links
|
18 |
+
$the_tweet = $this->makeClickableLinks($the_tweet);
|
19 |
|
20 |
// i. User_mentions must link to the mentioned user's profile.
|
21 |
if (is_array($tweet->entities->user_mentions)) {
|
34 |
|
35 |
// iii. Links in Tweet text must be displayed using the display_url
|
36 |
// field in the URL entities API response, and link to the original t.co url field.
|
37 |
+
/* if (is_array($tweet->entities->urls)) {
|
38 |
foreach ($tweet->entities->urls as $key => $link) {
|
39 |
$the_tweet = preg_replace(
|
40 |
'`' . $link->url . '`', '<a href="' . $link->url . '" target="_blank">' . $link->url . '</a>', $the_tweet);
|
41 |
}
|
42 |
}
|
43 |
+
*/
|
44 |
+
echo $the_tweet . ' ';
|
45 |
?>
|
46 |
</div><!--tweet content-->
|
47 |
<?php if (isset($aptf_settings['display_twitter_actions']) && $aptf_settings['display_twitter_actions'] == 1) { ?>
|
inc/frontend/templates/default/template-2.php
CHANGED
@@ -15,7 +15,9 @@
|
|
15 |
<?php
|
16 |
if ($tweet->text) {
|
17 |
$the_tweet = ' '.$tweet->text . ' '; //adding an extra space to convert hast tag into links
|
18 |
-
|
|
|
|
|
19 |
// i. User_mentions must link to the mentioned user's profile.
|
20 |
if (is_array($tweet->entities->user_mentions)) {
|
21 |
foreach ($tweet->entities->user_mentions as $key => $user_mention) {
|
@@ -33,12 +35,13 @@
|
|
33 |
|
34 |
// iii. Links in Tweet text must be displayed using the display_url
|
35 |
// field in the URL entities API response, and link to the original t.co url field.
|
36 |
-
|
37 |
foreach ($tweet->entities->urls as $key => $link) {
|
38 |
$the_tweet = preg_replace(
|
39 |
'`' . $link->url . '`', '<a href="' . $link->url . '" target="_blank">' . $link->url . '</a>', $the_tweet);
|
40 |
}
|
41 |
}
|
|
|
42 |
|
43 |
echo $the_tweet . ' ';
|
44 |
?>
|
15 |
<?php
|
16 |
if ($tweet->text) {
|
17 |
$the_tweet = ' '.$tweet->text . ' '; //adding an extra space to convert hast tag into links
|
18 |
+
$the_tweet = $this->makeClickableLinks($the_tweet);
|
19 |
+
|
20 |
+
|
21 |
// i. User_mentions must link to the mentioned user's profile.
|
22 |
if (is_array($tweet->entities->user_mentions)) {
|
23 |
foreach ($tweet->entities->user_mentions as $key => $user_mention) {
|
35 |
|
36 |
// iii. Links in Tweet text must be displayed using the display_url
|
37 |
// field in the URL entities API response, and link to the original t.co url field.
|
38 |
+
/* if (is_array($tweet->entities->urls)) {
|
39 |
foreach ($tweet->entities->urls as $key => $link) {
|
40 |
$the_tweet = preg_replace(
|
41 |
'`' . $link->url . '`', '<a href="' . $link->url . '" target="_blank">' . $link->url . '</a>', $the_tweet);
|
42 |
}
|
43 |
}
|
44 |
+
*/
|
45 |
|
46 |
echo $the_tweet . ' ';
|
47 |
?>
|
inc/frontend/templates/default/template-3.php
CHANGED
@@ -21,7 +21,7 @@
|
|
21 |
<?php
|
22 |
if ($tweet->text) {
|
23 |
$the_tweet = ' '.$tweet->text . ' '; //adding an extra space to convert hast tag into links
|
24 |
-
|
25 |
// i. User_mentions must link to the mentioned user's profile.
|
26 |
if (is_array($tweet->entities->user_mentions)) {
|
27 |
foreach ($tweet->entities->user_mentions as $key => $user_mention) {
|
@@ -39,12 +39,12 @@
|
|
39 |
|
40 |
// iii. Links in Tweet text must be displayed using the display_url
|
41 |
// field in the URL entities API response, and link to the original t.co url field.
|
42 |
-
|
43 |
foreach ($tweet->entities->urls as $key => $link) {
|
44 |
$the_tweet = preg_replace(
|
45 |
'`' . $link->url . '`', '<a href="' . $link->url . '" target="_blank">' . $link->url . '</a>', $the_tweet);
|
46 |
}
|
47 |
-
}
|
48 |
|
49 |
echo $the_tweet . ' ';
|
50 |
?>
|
21 |
<?php
|
22 |
if ($tweet->text) {
|
23 |
$the_tweet = ' '.$tweet->text . ' '; //adding an extra space to convert hast tag into links
|
24 |
+
$the_tweet = $this->makeClickableLinks($the_tweet);
|
25 |
// i. User_mentions must link to the mentioned user's profile.
|
26 |
if (is_array($tweet->entities->user_mentions)) {
|
27 |
foreach ($tweet->entities->user_mentions as $key => $user_mention) {
|
39 |
|
40 |
// iii. Links in Tweet text must be displayed using the display_url
|
41 |
// field in the URL entities API response, and link to the original t.co url field.
|
42 |
+
/* if (is_array($tweet->entities->urls)) {
|
43 |
foreach ($tweet->entities->urls as $key => $link) {
|
44 |
$the_tweet = preg_replace(
|
45 |
'`' . $link->url . '`', '<a href="' . $link->url . '" target="_blank">' . $link->url . '</a>', $the_tweet);
|
46 |
}
|
47 |
+
} */
|
48 |
|
49 |
echo $the_tweet . ' ';
|
50 |
?>
|
inc/frontend/templates/slider/template-1.php
CHANGED
@@ -21,6 +21,7 @@
|
|
21 |
<?php
|
22 |
if ($tweet->text) {
|
23 |
$the_tweet = ' '.$tweet->text . ' '; //adding an extra space to convert hast tag into links
|
|
|
24 |
/*
|
25 |
Twitter Developer Display Requirements
|
26 |
https://dev.twitter.com/terms/display-requirements
|
@@ -49,12 +50,12 @@
|
|
49 |
|
50 |
// iii. Links in Tweet text must be displayed using the display_url
|
51 |
// field in the URL entities API response, and link to the original t.co url field.
|
52 |
-
|
53 |
foreach ($tweet->entities->urls as $key => $link) {
|
54 |
$the_tweet = preg_replace(
|
55 |
'`' . $link->url . '`', '<a href="' . $link->url . '" target="_blank">' . $link->url . '</a>', $the_tweet);
|
56 |
}
|
57 |
-
}
|
58 |
|
59 |
echo $the_tweet . ' ';
|
60 |
?>
|
21 |
<?php
|
22 |
if ($tweet->text) {
|
23 |
$the_tweet = ' '.$tweet->text . ' '; //adding an extra space to convert hast tag into links
|
24 |
+
$the_tweet = $this->makeClickableLinks($the_tweet);
|
25 |
/*
|
26 |
Twitter Developer Display Requirements
|
27 |
https://dev.twitter.com/terms/display-requirements
|
50 |
|
51 |
// iii. Links in Tweet text must be displayed using the display_url
|
52 |
// field in the URL entities API response, and link to the original t.co url field.
|
53 |
+
/* if (is_array($tweet->entities->urls)) {
|
54 |
foreach ($tweet->entities->urls as $key => $link) {
|
55 |
$the_tweet = preg_replace(
|
56 |
'`' . $link->url . '`', '<a href="' . $link->url . '" target="_blank">' . $link->url . '</a>', $the_tweet);
|
57 |
}
|
58 |
+
} */
|
59 |
|
60 |
echo $the_tweet . ' ';
|
61 |
?>
|
inc/frontend/templates/slider/template-2.php
CHANGED
@@ -21,6 +21,7 @@
|
|
21 |
<?php
|
22 |
if ($tweet->text) {
|
23 |
$the_tweet = ' '.$tweet->text . ' '; //adding an extra space to convert hast tag into links
|
|
|
24 |
/*
|
25 |
Twitter Developer Display Requirements
|
26 |
https://dev.twitter.com/terms/display-requirements
|
@@ -49,12 +50,12 @@
|
|
49 |
|
50 |
// iii. Links in Tweet text must be displayed using the display_url
|
51 |
// field in the URL entities API response, and link to the original t.co url field.
|
52 |
-
|
53 |
foreach ($tweet->entities->urls as $key => $link) {
|
54 |
$the_tweet = preg_replace(
|
55 |
'`' . $link->url . '`', '<a href="' . $link->url . '" target="_blank">' . $link->url . '</a>', $the_tweet);
|
56 |
}
|
57 |
-
}
|
58 |
|
59 |
echo $the_tweet . ' ';
|
60 |
?>
|
21 |
<?php
|
22 |
if ($tweet->text) {
|
23 |
$the_tweet = ' '.$tweet->text . ' '; //adding an extra space to convert hast tag into links
|
24 |
+
$the_tweet = $this->makeClickableLinks($the_tweet);
|
25 |
/*
|
26 |
Twitter Developer Display Requirements
|
27 |
https://dev.twitter.com/terms/display-requirements
|
50 |
|
51 |
// iii. Links in Tweet text must be displayed using the display_url
|
52 |
// field in the URL entities API response, and link to the original t.co url field.
|
53 |
+
/* if (is_array($tweet->entities->urls)) {
|
54 |
foreach ($tweet->entities->urls as $key => $link) {
|
55 |
$the_tweet = preg_replace(
|
56 |
'`' . $link->url . '`', '<a href="' . $link->url . '" target="_blank">' . $link->url . '</a>', $the_tweet);
|
57 |
}
|
58 |
+
} */
|
59 |
|
60 |
echo $the_tweet . ' ';
|
61 |
?>
|
inc/frontend/templates/slider/template-3.php
CHANGED
@@ -15,6 +15,7 @@
|
|
15 |
<?php
|
16 |
if ($tweet->text) {
|
17 |
$the_tweet = ' '.$tweet->text . ' '; //adding an extra space to convert hast tag into links
|
|
|
18 |
/*
|
19 |
Twitter Developer Display Requirements
|
20 |
https://dev.twitter.com/terms/display-requirements
|
@@ -43,12 +44,13 @@
|
|
43 |
|
44 |
// iii. Links in Tweet text must be displayed using the display_url
|
45 |
// field in the URL entities API response, and link to the original t.co url field.
|
46 |
-
|
47 |
foreach ($tweet->entities->urls as $key => $link) {
|
48 |
$the_tweet = preg_replace(
|
49 |
'`' . $link->url . '`', '<a href="' . $link->url . '" target="_blank">' . $link->url . '</a>', $the_tweet);
|
50 |
}
|
51 |
}
|
|
|
52 |
|
53 |
echo $the_tweet . ' ';
|
54 |
?>
|
15 |
<?php
|
16 |
if ($tweet->text) {
|
17 |
$the_tweet = ' '.$tweet->text . ' '; //adding an extra space to convert hast tag into links
|
18 |
+
$the_tweet = $this->makeClickableLinks($the_tweet);
|
19 |
/*
|
20 |
Twitter Developer Display Requirements
|
21 |
https://dev.twitter.com/terms/display-requirements
|
44 |
|
45 |
// iii. Links in Tweet text must be displayed using the display_url
|
46 |
// field in the URL entities API response, and link to the original t.co url field.
|
47 |
+
/* if (is_array($tweet->entities->urls)) {
|
48 |
foreach ($tweet->entities->urls as $key => $link) {
|
49 |
$the_tweet = preg_replace(
|
50 |
'`' . $link->url . '`', '<a href="' . $link->url . '" target="_blank">' . $link->url . '</a>', $the_tweet);
|
51 |
}
|
52 |
}
|
53 |
+
*/
|
54 |
|
55 |
echo $the_tweet . ' ';
|
56 |
?>
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: twitter, twitter feeds, twitter slider, twitter feeds slider, twitter plug
|
|
4 |
Donate link: http://accesspressthemes.com/donation/
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 4.4
|
7 |
-
Stable tag: 1.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -107,6 +107,9 @@ Once you install the plugin , you can check some general documentation about how
|
|
107 |
|
108 |
|
109 |
== Changelog ==
|
|
|
|
|
|
|
110 |
= 1.3.9 =
|
111 |
* Done some modifications for WordPress 4.4 compatibility
|
112 |
|
4 |
Donate link: http://accesspressthemes.com/donation/
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 4.4
|
7 |
+
Stable tag: 1.4.0
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
107 |
|
108 |
|
109 |
== Changelog ==
|
110 |
+
= 1.4.0 =
|
111 |
+
* Fixed small bug for link contained in the tweet text
|
112 |
+
|
113 |
= 1.3.9 =
|
114 |
* Done some modifications for WordPress 4.4 compatibility
|
115 |
|