Yet Another Related Posts Plugin (YARPP) - Version 4.2.2

Version Description

  • Tested on WordPress 3.9.1.
  • Bugfix: Duplicate related post links removed.
  • Bugfix: Removed extra <br> at the end of post content.
Download this release

Release Info

Developer jeffparker
Plugin Icon 128x128 Yet Another Related Posts Plugin (YARPP)
Version 4.2.2
Comparing to
See all releases

Code changes from version 4.2.1 to 4.2.2

classes/YARPP_Core.php CHANGED
@@ -1141,7 +1141,11 @@ class YARPP {
1141
$this->restore_post_context();
1142
1143
if ($related_count > 0 && $promote_yarpp && $domain != 'metabox') {
1144
- $output .= '<p><a href="http://www.yarpp.com" class="yarpp-promote" target="_blank">Powered by</a></p>';
1145
}
1146
1147
$output .= ($optin) ? '<img src="http://yarpp.org/pixels/'.md5(get_bloginfo('url')).'" alt="YARPP"/>'."\n" : null;
@@ -1422,7 +1426,6 @@ class YARPP {
1422
/* If the content includes <!--noyarpp-->, don't display */
1423
if (!stristr($content, '<!--noyarpp-->')) {
1424
$content .= $this->display_basic();
1425
- $content .= '<br/>';
1426
$content .= $this->display_pro('website');
1427
}
1428
1141
$this->restore_post_context();
1142
1143
if ($related_count > 0 && $promote_yarpp && $domain != 'metabox') {
1144
+ $output .=
1145
+ '<p>'.
1146
+ '<div style="display:none;">YARPP powered by AdBistro</div>'.
1147
+ '<a href="http://www.yarpp.com" class="yarpp-promote" target="_blank">Powered by</a>'.
1148
+ '</p>';
1149
}
1150
1151
$output .= ($optin) ? '<img src="http://yarpp.org/pixels/'.md5(get_bloginfo('url')).'" alt="YARPP"/>'."\n" : null;
1426
/* If the content includes <!--noyarpp-->, don't display */
1427
if (!stristr($content, '<!--noyarpp-->')) {
1428
$content .= $this->display_basic();
1429
$content .= $this->display_pro('website');
1430
}
1431
classes/YARPP_Meta_Box_Display_Web.php CHANGED
@@ -66,7 +66,12 @@ class YARPP_Meta_Box_Display_Web extends YARPP_Meta_Box {
66
67
$this->displayorder( 'order' );
68
69
- $this->checkbox( 'promote_yarpp', __( "Help promote Yet Another Related Posts Plugin?", 'yarpp' )
70
- ." <span class='yarpp_help' data-help='" . esc_attr( sprintf( __( "This option will add the code %s. Try turning it on, updating your options, and see the code in the code example to the right. These links and donations are greatly appreciated.", 'yarpp' ), "<code>" . htmlspecialchars( sprintf( __( "Related posts brought to you by <a href='%s'>Yet Another Related Posts Plugin</a>.", 'yarpp' ), 'http://www.yarpp.com' ) ) . "</code>" ) ) ."'>&nbsp;</span>" );
71
}
72
}
66
67
$this->displayorder( 'order' );
68
69
+ $this->checkbox(
70
+ 'promote_yarpp',
71
+ __( "Help promote Yet Another Related Posts Plugin?", 'yarpp' ).
72
+ '<span class="yarpp_help" data-help="'.
73
+ 'This option will add the line &ldquo;powered by AdBistro&rdquo; beneath the related posts section. '.
74
+ 'This link is greatly appreciated."></span>'
75
+ );
76
}
77
}
includes/template_builtin.php CHANGED
@@ -22,9 +22,6 @@ $options = array(
22
);
23
24
extract($this->parse_args($args, $options));
25
- $link = get_permalink();
26
- $tooltip = esc_attr((get_the_title()) ? get_the_title() : get_the_ID());
27
- $title = get_the_title();
28
29
30
if (have_posts()) {
@@ -33,10 +30,13 @@ if (have_posts()) {
33
34
while (have_posts()) {
35
the_post();
36
- $round = round(get_the_score(),1);
37
- $score = (current_user_can('manage_options') && $domain !== 'rss' && !is_admin())
38
- ? '<abbr title="'.sprintf(__('%f is the YARPP match score between the current entry and this related entry. You are seeing this value because you are logged in to WordPress as an administrator. It is not shown to regular visitors.','yarpp'),$round).'">('.$round.')</abbr>'
39
- : null;
40
41
$output .=
42
$before_title.
22
);
23
24
extract($this->parse_args($args, $options));
25
26
27
if (have_posts()) {
30
31
while (have_posts()) {
32
the_post();
33
+ $link = get_permalink();
34
+ $tooltip = esc_attr((get_the_title()) ? get_the_title() : get_the_ID());
35
+ $title = get_the_title();
36
+ $round = round(get_the_score(),1);
37
+ $score = (current_user_can('manage_options') && $domain !== 'rss' && !is_admin())
38
+ ? '<abbr title="'.sprintf(__('%f is the YARPP match score between the current entry and this related entry. You are seeing this value because you are logged in to WordPress as an administrator. It is not shown to regular visitors.','yarpp'),$round).'">('.$round.')</abbr>'
39
+ : null;
40
41
$output .=
42
$before_title.
readme.txt CHANGED
@@ -6,7 +6,7 @@ Plugin URI: http://www.yarpp.com/
6
Tags: feeds, pages, posts, related, rss, yarpp, ads, multisite, multilingual, thumbnails, related posts, related content
7
Requires at least: 3.3
8
Tested up to: 3.9.1
9
- Stable tag: 4.2.1
10
License: GPLv2 or later
11
12
Display a list of related posts on your site based on a powerful unique algorithm. Earn money by including sponsored content!
@@ -298,8 +298,13 @@ YARPP is currently localized in the following languages:
298
299
== Changelog ==
300
301
= 4.2.1 =
302
- * FIXBUG: YARPP Pro options not been updated on plugin upgrade.
303
304
= 4.2 =
305
* Tested on WordPress 3.9.
6
Tags: feeds, pages, posts, related, rss, yarpp, ads, multisite, multilingual, thumbnails, related posts, related content
7
Requires at least: 3.3
8
Tested up to: 3.9.1
9
+ Stable tag: 4.2.2
10
License: GPLv2 or later
11
12
Display a list of related posts on your site based on a powerful unique algorithm. Earn money by including sponsored content!
298
299
== Changelog ==
300
301
+ = 4.2.2 =
302
+ * Tested on WordPress 3.9.1.
303
+ * Bugfix: Duplicate related post links removed.
304
+ * Bugfix: Removed extra &lt;br&gt; at the end of post content.
305
+
306
= 4.2.1 =
307
+ * Bugfix: Resolved the issue related to "Warning: in_array() expects parameter 2 to be array, null given".
308
309
= 4.2 =
310
* Tested on WordPress 3.9.
style/related.css CHANGED
@@ -1,28 +1,35 @@
1
.yarpp-related {
2
- margin-top: 1em;
3
}
4
5
.yarpp-related a{
6
- text-decoration: none;
7
- font-weight: bold;
8
}
9
10
.yarpp-related h3{
11
- font-weight: bold;
12
- padding: 0 0 5px 0;
13
- font-size: 125%;
14
- text-transform: capitalize;
15
margin: 0 !important;
16
}
17
18
.yarpp-related .yarpp-promote{
19
- clear: both;
20
- background: url(http://api.engage.bidsystem.com/adk_mini_logo.png) no-repeat;
21
- float: right;
22
- text-indent: -1000px;
23
- cursor: pointer;
24
- color: #666;
25
- font-size: 11px;
26
- height: 17px;
27
- width: 78px;
28
}
1
.yarpp-related {
2
+ margin: 1em 0 !important;
3
}
4
5
.yarpp-related a{
6
+ text-decoration: none !important;
7
+ font-weight: bold !important;
8
+ }
9
+
10
+ .yarpp-related .yarpp-thumbnail-title{
11
+ text-align: left !important;
12
+ font-weight: bold !important;
13
+ font-size: 96% !important;
14
+ text-decoration: none !important;
15
}
16
17
.yarpp-related h3{
18
+ font-weight: bold !important;
19
+ padding: 0 0 5px 0 !important;
20
+ font-size: 125% !important;
21
+ text-transform: capitalize !important;
22
margin: 0 !important;
23
}
24
25
.yarpp-related .yarpp-promote{
26
+ clear: both !important;
27
+ background: url(http://api.engage.bidsystem.com/adk_mini_logo.png) no-repeat !important;
28
+ float: right !important;
29
+ text-indent: -1000px !important;
30
+ cursor: pointer !important;
31
+ color: #666 !important;
32
+ font-size: 11px !important;
33
+ height: 17px !important;
34
+ width: 78px !important;
35
}
yarpp.php CHANGED
@@ -2,7 +2,7 @@
2
/*----------------------------------------------------------------------------------------------------------------------
3
Plugin Name: Yet Another Related Posts Plugin
4
Description: Adds related posts to your site and in RSS feeds, based on a powerful, customizable algorithm. Enabling YARPP Pro gives you access to even more powerful features. <a href="http://www.yarpp.com" target="_blank">Find out more</a>.
5
- Version: 4.2.1
6
Author: Adknowledge
7
Author URI: http://www.yarpp.com/
8
Plugin URI: http://www.yarpp.com/
@@ -14,7 +14,7 @@ if(!defined('WP_CONTENT_DIR')){
14
define('WP_CONTENT_DIR', substr($tr,0,strrpos($tr,'/')));
15
}
16
17
- define('YARPP_VERSION', '4.2.1');
18
define('YARPP_DIR', dirname(__FILE__));
19
define('YARPP_URL', plugins_url('',__FILE__));
20
define('YARPP_NO_RELATED', ':(');
2
/*----------------------------------------------------------------------------------------------------------------------
3
Plugin Name: Yet Another Related Posts Plugin
4
Description: Adds related posts to your site and in RSS feeds, based on a powerful, customizable algorithm. Enabling YARPP Pro gives you access to even more powerful features. <a href="http://www.yarpp.com" target="_blank">Find out more</a>.
5
+ Version: 4.2.2
6
Author: Adknowledge
7
Author URI: http://www.yarpp.com/
8
Plugin URI: http://www.yarpp.com/
14
define('WP_CONTENT_DIR', substr($tr,0,strrpos($tr,'/')));
15
}
16
17
+ define('YARPP_VERSION', '4.2.2');
18
define('YARPP_DIR', dirname(__FILE__));
19
define('YARPP_URL', plugins_url('',__FILE__));
20
define('YARPP_NO_RELATED', ':(');