Yet Another Related Posts Plugin (YARPP) - Version 4.3.4

Version Description

  • Don't allow new YARPP Pro signups
  • Discontinuing the YARPP Pro service as of 01/31/2017
Download this release

Release Info

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

Code changes from version 4.3.3 to 4.3.4

classes/YARPP_Core.php CHANGED
@@ -1141,14 +1141,18 @@ class YARPP {
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;
1152
  $output .= "</div>\n";
1153
 
1154
  if ($echo) echo $output;
@@ -1320,7 +1324,7 @@ class YARPP {
1320
  "Related posts brought to you by <a href='%s'>Yet Another Related Posts Plugin</a>.",
1321
  'yarpp'
1322
  ),
1323
- 'http://www.yarpp.com'
1324
  ).
1325
  "</p>\n";
1326
  }
1141
  $this->restore_post_context();
1142
 
1143
  if ($related_count > 0 && $promote_yarpp && $domain != 'metabox') {
1144
+ $output .=
1145
+ '<p>'.
1146
+ sprintf(
1147
+ __(
1148
+ "Related posts brought to you by <a href='%s'>Yet Another Related Posts Plugin</a>.",
1149
+ 'yarpp'
1150
+ ),
1151
+ 'https://wordpress.org/plugins/yet-another-related-posts-plugin/'
1152
+ ).
1153
+ "</p>\n";
1154
  }
1155
 
 
1156
  $output .= "</div>\n";
1157
 
1158
  if ($echo) echo $output;
1324
  "Related posts brought to you by <a href='%s'>Yet Another Related Posts Plugin</a>.",
1325
  'yarpp'
1326
  ),
1327
+ 'https://wordpress.org/plugins/yet-another-related-posts-plugin/'
1328
  ).
1329
  "</p>\n";
1330
  }
classes/YARPP_Meta_Box_Contact.php CHANGED
@@ -23,11 +23,6 @@ class YARPP_Meta_Box_Contact extends YARPP_Meta_Box {
23
  '<span class="icon icon-facebook"></span> YARPP on Facebook'.
24
  '</a>'.
25
  '</li>'.
26
- '<li>'.
27
- '<a href="http://www.yarpp.com" target="_blank">'.
28
- '<span class="icon icon-pro"></span> Learn more about YARPP'.
29
- '</a>'.
30
- '</li>'.
31
  '<li>'.
32
  '<a href="http://wordpress.org/support/view/plugin-reviews/yet-another-related-posts-plugin" target="_blank">'.
33
  '<span class="icon icon-star '.$happy.'"></span> '.__('Review YARPP on WordPress.org', 'yarpp').
23
  '<span class="icon icon-facebook"></span> YARPP on Facebook'.
24
  '</a>'.
25
  '</li>'.
 
 
 
 
 
26
  '<li>'.
27
  '<a href="http://wordpress.org/support/view/plugin-reviews/yet-another-related-posts-plugin" target="_blank">'.
28
  '<span class="icon icon-star '.$happy.'"></span> '.__('Review YARPP on WordPress.org', 'yarpp').
classes/YARPP_Meta_Box_Display_Web.php CHANGED
@@ -65,13 +65,6 @@ class YARPP_Meta_Box_Display_Web extends YARPP_Meta_Box {
65
  echo "</div>";
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
  }
65
  echo "</div>";
66
 
67
  $this->displayorder( 'order' );
68
+ $this->checkbox( 'promote_yarpp', __( "Help promote Yet Another Related Posts Plugin?", 'yarpp' ) . " <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>", 'yarpp' );
 
 
 
 
 
 
 
69
  }
70
  }
includes/phtmls/yarpp_options.phtml CHANGED
@@ -6,31 +6,12 @@
6
  <li>
7
  <a href="options-general.php?page=yarpp&mode=basic">YARPP Basic</a>
8
  </li>
9
- <li class="disabled">
10
- <a href="options-general.php?page=yarpp&mode=pro">YARPP Pro</a>
11
- </li>
12
  </ul>
13
 
14
  <div class="yarpp_switch_content">
15
- <?php if ($yarpp->yarppPro['active']): ?>
16
- <p>
17
- The settings below allow you to configure the Basic version of Yet Another Related Plugin (YARPP).
18
- </p>
19
- <p>
20
- <strong>&ldquo;YARPP Pro&rdquo;</strong>&nbsp;&nbsp; is also active on this installation. Click on the
21
- &nbsp;&nbsp;<strong>&ldquo;YARPP Pro&rdquo;</strong>&nbsp;&nbsp; tab to access the enhanced features dashboard
22
- </p>
23
- <?php else: ?>
24
  <p>
25
  The settings bellow allow you to configure the Basic version of Yet Another Related Post Plugin (YARPP).
26
  </p>
27
- <p>
28
- Click on the <em>"YARPP Pro"</em> tab for additional enhancements: <strong>Earn money</strong> from sponsored ads,
29
- easily <strong>customize thumbnail layout</strong> and the <strong>new sidebar format</strong>, pull
30
- related posts from <strong>multiple sites</strong>, and get <strong>detailed reporting.</strong>
31
- &nbsp;&nbsp;<a href="http://www.yarpp.com" target="_blank">Learn more.</a>
32
- </p>
33
- <?php endif ?>
34
  </div>
35
  </div>
36
 
6
  <li>
7
  <a href="options-general.php?page=yarpp&mode=basic">YARPP Basic</a>
8
  </li>
 
 
 
9
  </ul>
10
 
11
  <div class="yarpp_switch_content">
 
 
 
 
 
 
 
 
 
12
  <p>
13
  The settings bellow allow you to configure the Basic version of Yet Another Related Post Plugin (YARPP).
14
  </p>
 
 
 
 
 
 
 
15
  </div>
16
  </div>
17
 
includes/phtmls/yarpp_settings_header.phtml CHANGED
@@ -5,10 +5,4 @@
5
  <?php echo apply_filters('yarpp_version_html', esc_html(get_option('yarpp_version'))) ?>
6
  </small>
7
  </h2>
8
- <p>
9
- <strong><em>NEW in YARPP 4.2!</em></strong> &nbsp;Now you can mix and match <strong>YARPP Basic</strong> and
10
- <strong>YARPP Pro</strong> to get the best of both features! Recommendations from both Basic and Pro can now
11
- display beneath your articles or in your sidebar (as a <a href="widgets.php">widget</a>) or in both locations.
12
- Use the combination that works best for you!
13
- </p>
14
  </div>
5
  <?php echo apply_filters('yarpp_version_html', esc_html(get_option('yarpp_version'))) ?>
6
  </small>
7
  </h2>
 
 
 
 
 
 
8
  </div>
includes/yarpp_force_basic.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ include_once(realpath('../../../../').'/wp-config.php');
3
+
4
+ $yarppPro = get_option('yarpp_pro');
5
+ $yarpp = get_option('yarpp');
6
+
7
+ if ($yarppPro['active']) {
8
+ $yarppPro['optin'] = 0;
9
+ $yarppPro['active'] = 0;
10
+ $yarpp['optin'] = 1;
11
+ update_option('yarpp',$yarpp);
12
+ update_option('yarpp_pro',$yarppPro);
13
+ }
includes/yarpp_meta_boxes_hooks.php CHANGED
@@ -54,20 +54,6 @@ add_meta_box(
54
  'core'
55
  );
56
 
57
- if (!$yarpp->yarppPro['active']) {
58
- add_meta_box(
59
- 'yarpp_display_optin',
60
- 'Get the Most Out of YARPP',
61
- array(
62
- new YARPP_Meta_Box_Optin,
63
- 'display'
64
- ),
65
- 'settings_page_yarpp',
66
- 'side',
67
- 'core'
68
- );
69
- }
70
-
71
  add_meta_box(
72
  'yarpp_display_contact',
73
  __('Contact YARPP', 'yarpp'),
54
  'core'
55
  );
56
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
  add_meta_box(
58
  'yarpp_display_contact',
59
  __('Contact YARPP', 'yarpp'),
readme.txt CHANGED
@@ -6,10 +6,10 @@ 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: 4.7
9
- Stable tag: 4.3.3
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!
13
 
14
  == Description ==
15
 
@@ -283,6 +283,10 @@ YARPP is currently localized in the following languages:
283
 
284
  == Changelog ==
285
 
 
 
 
 
286
  = 4.3.3 =
287
  * Fix 'Undefined index' in YARPP_Cache.php (credit to Derrick Hammer/@pcfreak30)
288
 
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: 4.7
9
+ Stable tag: 4.3.4
10
  License: GPLv2 or later
11
 
12
+ Display a list of related posts on your site based on a powerful unique algorithm.
13
 
14
  == Description ==
15
 
283
 
284
  == Changelog ==
285
 
286
+ = 4.3.4 =
287
+ * Don't allow new YARPP Pro signups
288
+ * Discontinuing the YARPP Pro service as of 01/31/2017
289
+
290
  = 4.3.3 =
291
  * Fix 'Undefined index' in YARPP_Cache.php (credit to Derrick Hammer/@pcfreak30)
292
 
yarpp.php CHANGED
@@ -1,62 +1,62 @@
1
- <?php
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.3.3
6
- Author: Adknowledge
7
- Author URI: http://www.yarpp.com/
8
- Plugin URI: http://www.yarpp.com/
9
- ----------------------------------------------------------------------------------------------------------------------*/
10
-
11
- if(!defined('WP_CONTENT_URL')) define('WP_CONTENT_URL', get_option('siteurl').'/wp-content');
12
- if(!defined('WP_CONTENT_DIR')){
13
- $tr = get_theme_root();
14
- define('WP_CONTENT_DIR', substr($tr,0,strrpos($tr,'/')));
15
- }
16
-
17
- define('YARPP_VERSION', '4.3.3');
18
- define('YARPP_DIR', dirname(__FILE__));
19
- define('YARPP_URL', plugins_url('',__FILE__));
20
- define('YARPP_NO_RELATED', ':(');
21
- define('YARPP_RELATED', ':)');
22
- define('YARPP_NOT_CACHED', ':/');
23
- define('YARPP_DONT_RUN', 'X(');
24
-
25
- /*----------------------------------------------------------------------------------------------------------------------
26
- Sice v3.2: YARPP uses it own cache engine, which uses custom db tables by default.
27
- Use postmeta instead to avoid custom tables by un-commenting postmeta line and comment out the tables one.
28
- ----------------------------------------------------------------------------------------------------------------------*/
29
- /* Enable postmeta cache: */
30
- //if(!defined('YARPP_CACHE_TYPE')) define('YARPP_CACHE_TYPE', 'postmeta');
31
-
32
- /* Enable Yarpp cache engine - Default: */
33
- if(!defined('YARPP_CACHE_TYPE')) define('YARPP_CACHE_TYPE', 'tables');
34
-
35
- /* Load proper cache constants */
36
- switch(YARPP_CACHE_TYPE){
37
- case 'tables':
38
- define('YARPP_TABLES_RELATED_TABLE', 'yarpp_related_cache');
39
- break;
40
- case 'postmeta':
41
- define('YARPP_POSTMETA_KEYWORDS_KEY', '_yarpp_keywords');
42
- define('YARPP_POSTMETA_RELATED_KEY', '_yarpp_related');
43
- break;
44
- }
45
-
46
- /* New in 3.5: Set YARPP extra weight multiplier */
47
- if(!defined('YARPP_EXTRA_WEIGHT')) define('YARPP_EXTRA_WEIGHT', 3);
48
-
49
- /* Includes ----------------------------------------------------------------------------------------------------------*/
50
- include_once(YARPP_DIR.'/includes/init_functions.php');
51
- include_once(YARPP_DIR.'/includes/related_functions.php');
52
- include_once(YARPP_DIR.'/includes/template_functions.php');
53
-
54
- include_once(YARPP_DIR.'/classes/YARPP_Core.php');
55
- include_once(YARPP_DIR.'/classes/YARPP_Widget.php');
56
- include_once(YARPP_DIR.'/classes/YARPP_Cache.php');
57
- include_once(YARPP_DIR.'/classes/YARPP_Cache_Bypass.php');
58
- include_once(YARPP_DIR.'/classes/YARPP_Cache_'.ucfirst(YARPP_CACHE_TYPE).'.php');
59
-
60
- /* WP hooks ----------------------------------------------------------------------------------------------------------*/
61
- add_action('init', 'yarpp_init');
62
- add_action('activate_'.plugin_basename(__FILE__), 'yarpp_plugin_activate', 10, 1);
1
+ <?php
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.
5
+ Version: 4.3.4
6
+ Author: Adknowledge
7
+ Author URI: http://www.yarpp.com/
8
+ Plugin URI: http://www.yarpp.com/
9
+ ----------------------------------------------------------------------------------------------------------------------*/
10
+
11
+ if(!defined('WP_CONTENT_URL')) define('WP_CONTENT_URL', get_option('siteurl').'/wp-content');
12
+ if(!defined('WP_CONTENT_DIR')){
13
+ $tr = get_theme_root();
14
+ define('WP_CONTENT_DIR', substr($tr,0,strrpos($tr,'/')));
15
+ }
16
+
17
+ define('YARPP_VERSION', '4.3.4');
18
+ define('YARPP_DIR', dirname(__FILE__));
19
+ define('YARPP_URL', plugins_url('',__FILE__));
20
+ define('YARPP_NO_RELATED', ':(');
21
+ define('YARPP_RELATED', ':)');
22
+ define('YARPP_NOT_CACHED', ':/');
23
+ define('YARPP_DONT_RUN', 'X(');
24
+
25
+ /*----------------------------------------------------------------------------------------------------------------------
26
+ Sice v3.2: YARPP uses it own cache engine, which uses custom db tables by default.
27
+ Use postmeta instead to avoid custom tables by un-commenting postmeta line and comment out the tables one.
28
+ ----------------------------------------------------------------------------------------------------------------------*/
29
+ /* Enable postmeta cache: */
30
+ //if(!defined('YARPP_CACHE_TYPE')) define('YARPP_CACHE_TYPE', 'postmeta');
31
+
32
+ /* Enable Yarpp cache engine - Default: */
33
+ if(!defined('YARPP_CACHE_TYPE')) define('YARPP_CACHE_TYPE', 'tables');
34
+
35
+ /* Load proper cache constants */
36
+ switch(YARPP_CACHE_TYPE){
37
+ case 'tables':
38
+ define('YARPP_TABLES_RELATED_TABLE', 'yarpp_related_cache');
39
+ break;
40
+ case 'postmeta':
41
+ define('YARPP_POSTMETA_KEYWORDS_KEY', '_yarpp_keywords');
42
+ define('YARPP_POSTMETA_RELATED_KEY', '_yarpp_related');
43
+ break;
44
+ }
45
+
46
+ /* New in 3.5: Set YARPP extra weight multiplier */
47
+ if(!defined('YARPP_EXTRA_WEIGHT')) define('YARPP_EXTRA_WEIGHT', 3);
48
+
49
+ /* Includes ----------------------------------------------------------------------------------------------------------*/
50
+ include_once(YARPP_DIR.'/includes/yarpp_force_basic.php');
51
+ include_once(YARPP_DIR.'/includes/init_functions.php');
52
+ include_once(YARPP_DIR.'/includes/related_functions.php');
53
+ include_once(YARPP_DIR.'/includes/template_functions.php');
54
+
55
+ include_once(YARPP_DIR.'/classes/YARPP_Core.php');
56
+ include_once(YARPP_DIR.'/classes/YARPP_Cache.php');
57
+ include_once(YARPP_DIR.'/classes/YARPP_Cache_Bypass.php');
58
+ include_once(YARPP_DIR.'/classes/YARPP_Cache_'.ucfirst(YARPP_CACHE_TYPE).'.php');
59
+
60
+ /* WP hooks ----------------------------------------------------------------------------------------------------------*/
61
+ add_action('init', 'yarpp_init');
62
+ add_action('activate_'.plugin_basename(__FILE__), 'yarpp_plugin_activate', 10, 1);