Yet Another Related Posts Plugin (YARPP) - Version 4.2.6

Version Description

  • After a bit of a hiatus, we're back!
Download this release

Release Info

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

Code changes from version 4.4 to 4.2.6

Files changed (2) hide show
  1. readme.txt +30 -43
  2. yarpp.php +63 -62
readme.txt CHANGED
@@ -1,21 +1,32 @@
1
  === Yet Another Related Posts Plugin (YARPP) ===
2
- Contributors: jeffparker
3
- Author: Adknowledge
4
- Author URI: http://www.yarpp.com/
5
- 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.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
 
16
  Yet Another Related Posts Plugin (YARPP) displays pages, posts, and custom post types related to the current entry, introducing your readers to other relevant content on your site.
 
17
 
18
- **YARPP Basic for Standard Features**
 
 
 
 
 
 
 
 
 
 
 
 
19
  -------------------------------------------
20
  * **Thumbnail or list view** of related content.
21
  * **Related posts, pages, and custom post types.**
@@ -39,9 +50,9 @@ Make sure the "display related posts in feeds" option is turned on if you would
39
 
40
  = Widget =
41
 
42
- Related posts can also be displayed as a widget. Go to the Appearance > Widgets options page and add the "Related Posts (YARPP)" widget. Choose to display content from YARPP Basic. The widget will only be displayed on single entry (permalink) pages.
43
 
44
- The YARPP Basic widget can be used even if the "auto display" option is turned off.
45
 
46
  = Custom display through templates =
47
 
@@ -51,9 +62,9 @@ YARPP allows the advanced user with knowledge of PHP to customize the display of
51
 
52
  **Common Questions about YARPP Basic**
53
 
54
- Below are Frequently Asked Questions about YARPP basic.
55
 
56
- If your question isn't here, ask your own question at [the WordPress.org forums](http://wordpress.org/support/plugin/yet-another-related-posts-plugin).
57
 
58
  = Many pages list "no related posts." =
59
 
@@ -61,7 +72,7 @@ Most likely you have "no related posts" right now because the default "match thr
61
 
62
  = How can I move the related posts display? =
63
 
64
- If you do not want to show the Related Posts display in its default position (right below the post content), first go to YARPP options and turn off the "automatically display" options in the "website" section. If you would like to instead display it in your sidebar and you have a widget-aware theme, YARPP provides a Related Posts widget which you can add under "Appearance" > "Widgets."
65
 
66
  If you would like to add the Related Posts display elsewhere, edit your relevant theme file (most likely something like `single.php`) and add the PHP code `related_posts();` within [The Loop](http://codex.wordpress.org/The_Loop) where you want to display the related posts. (Make sure you don't add `echo related_posts();` or you may end up with duplicates in your related posts section.)
67
 
@@ -110,6 +121,8 @@ The default YARPP thumbnail size is 120px by 120px. The thumbnail size can be sp
110
 
111
  Each time you change YARPP's thumbnail dimensions like this, you will probably want to have WordPress regenerate appropriate sized thumbnails for all of your images. I highly recommend the [Regenerate Thumbnails](http://wordpress.org/extend/plugins/regenerate-thumbnails/) plugin for this purpose.
112
 
 
 
113
  = I'm using the Thumbnails display. Why aren't the right size thumbnails being served? =
114
 
115
  By default, if an appropriately sized thumbnail is not available in WordPress, a larger image will be served and will be made to fit in the thumbnail space via CSS. Sometimes this means images will be scaled down in a weird way, so it is not ideal. What you really want is for YARPP to serve appropriately-sized thumbnails.
@@ -283,30 +296,8 @@ YARPP is currently localized in the following languages:
283
 
284
  == Changelog ==
285
 
286
- = 4.4 =
287
- * Discontinuing the YARPP Pro service
288
-
289
- = 4.3.6 =
290
- * Removed new file
291
-
292
- = 4.3.5 =
293
- * Fix 'unable to update'
294
-
295
- = 4.3.4 =
296
- * Don't allow new YARPP Pro signups
297
- * Discontinuing the YARPP Pro service as of 01/31/2017
298
-
299
- = 4.3.3 =
300
- * Fix 'Undefined index' in YARPP_Cache.php (credit to Derrick Hammer/@pcfreak30)
301
-
302
- = 4.3.2 =
303
- * Fix ksort error in YARPP_Cache.php (credit to Derrick Hammer/@pcfreak30)
304
- * Discontinuing the YARPP Pro service as of 12/31/2016
305
-
306
- = 4.3.1 =
307
- * Tested on WordPress 4.4.
308
- * Fix $lang missing error in YARPP_Cache.php
309
- * Fix WP_Widget deprecation PHP error
310
 
311
  = 4.2.5 =
312
  * Tested on WordPress 4.2.2.
@@ -910,10 +901,6 @@ YARPP is currently localized in the following languages:
910
  * Initial upload
911
 
912
  == Upgrade Notice ==
913
- = 3.3 =
914
- Some YARPP options are now hidden by default. You can show them again from the Screen Options tab.
915
-
916
- = 3.2.2 =
917
- Requires PHP 5.
918
-
919
 
1
  === Yet Another Related Posts Plugin (YARPP) ===
2
+ Contributors: jeffparker, shareaholic
 
 
 
3
  Tags: feeds, pages, posts, related, rss, yarpp, ads, multisite, multilingual, thumbnails, related posts, related content
4
  Requires at least: 3.3
5
+ Tested up to: 5.1
6
+ Requires PHP: 5.2
7
  License: GPLv2 or later
8
+ Stable tag: 4.2.6
9
 
10
+ Display a list of related posts on your site based on a powerful unique algorithm. Earn money by including sponsored content!
11
 
12
  == Description ==
13
 
14
  Yet Another Related Posts Plugin (YARPP) displays pages, posts, and custom post types related to the current entry, introducing your readers to other relevant content on your site.
15
+ [(See current offers and promotions for YARPP Pro users.)](http://www.yarpp.com/offers)
16
 
17
+ **NEW!** Now you can mix and match **YARPP Basic** and **YARPP Pro** to get the best of both features, beneath articles or in the sidebar! Use the combination that works best for you.
18
+
19
+ **Enable YARPP Pro for Powerful Enhancements**
20
+ -----------------------------------------
21
+ * **Customize thumbnail layout** through the user interface.
22
+ * **Pull related content from multiple sites**.
23
+ * **Make money by displaying sponsored content**, at the bottom of your posts, in the sidebar, or both.
24
+ * **Easily promote your product or service** on thousands of blogs and websites.
25
+ * **Get detailed reporting** about your related content list.
26
+
27
+ [Learn more about the new YARPP Pro enhancements!](http://www.yarpp.com)
28
+
29
+ **Keep YARPP Basic for Standard Features**
30
  -------------------------------------------
31
  * **Thumbnail or list view** of related content.
32
  * **Related posts, pages, and custom post types.**
50
 
51
  = Widget =
52
 
53
+ Related posts can also be displayed as a widget. Go to the Appearance > Widgets options page and add the "Related Posts (YARPP)" widget. Choose to display content from YARPP Basic or YARPP Pro. The widget will only be displayed on single entry (permalink) pages.
54
 
55
+ The YARPP Basic widget can be used even if the "auto display" option is turned off. The YARPP Pro sidebar widget can be used even if you choose YARPP Basic to display related content at the bottom of your posts.
56
 
57
  = Custom display through templates =
58
 
62
 
63
  **Common Questions about YARPP Basic**
64
 
65
+ Below are Frequently Asked Questions about YARPP basic. For questions about the new YARPP Pro enhancements, please visit the [YARPP Pro FAQ](http://www.yarpp.com/faq).
66
 
67
+ If your question isn't here, ask your own question at [the WordPress.org forums](http://wordpress.org/support/plugin/yet-another-related-posts-plugin). We'd also appreciate if you would help us improve YARPP by [answering a few survey questions](http://www.surveymonkey.com/s/Z278L88). Thanks for your feedback!
68
 
69
  = Many pages list "no related posts." =
70
 
72
 
73
  = How can I move the related posts display? =
74
 
75
+ If you do not want to show the Related Posts display in its default position (right below the post content), first go to YARPP options and turn off the "automatically display" options in the "website" section. If you would like to instead display it in your sidebar and you have a widget-aware theme, YARPP provides a Related Posts widget which you can add under "Appearance" > "Widgets." (You can choose to display sidebar content from either YARPP Basic or YARPP Pro.)
76
 
77
  If you would like to add the Related Posts display elsewhere, edit your relevant theme file (most likely something like `single.php`) and add the PHP code `related_posts();` within [The Loop](http://codex.wordpress.org/The_Loop) where you want to display the related posts. (Make sure you don't add `echo related_posts();` or you may end up with duplicates in your related posts section.)
78
 
121
 
122
  Each time you change YARPP's thumbnail dimensions like this, you will probably want to have WordPress regenerate appropriate sized thumbnails for all of your images. I highly recommend the [Regenerate Thumbnails](http://wordpress.org/extend/plugins/regenerate-thumbnails/) plugin for this purpose.
123
 
124
+ Please note that, by enabling the YARPP Pro enhancements, you can customize the thumbnail display using the admin interface instead of through PHP code.
125
+
126
  = I'm using the Thumbnails display. Why aren't the right size thumbnails being served? =
127
 
128
  By default, if an appropriately sized thumbnail is not available in WordPress, a larger image will be served and will be made to fit in the thumbnail space via CSS. Sometimes this means images will be scaled down in a weird way, so it is not ideal. What you really want is for YARPP to serve appropriately-sized thumbnails.
296
 
297
  == Changelog ==
298
 
299
+ = 4.2.6 =
300
+ * After a bit of a hiatus, we're back!
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
301
 
302
  = 4.2.5 =
303
  * Tested on WordPress 4.2.2.
901
  * Initial upload
902
 
903
  == Upgrade Notice ==
904
+ = 4.2.6 =
905
+ We update this plugin regularly so we can make it better for you. Update to the latest version for all of the available features and improvements. Thank you for using YARPP!
 
 
 
 
906
 
yarpp.php CHANGED
@@ -1,62 +1,63 @@
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.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.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/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. 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.6
6
+ Author: YARPP
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.2.6');
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
+ Since 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
+
30
+ /* Enable postmeta cache: */
31
+ //if(!defined('YARPP_CACHE_TYPE')) define('YARPP_CACHE_TYPE', 'postmeta');
32
+
33
+ /* Enable Yarpp cache engine - Default: */
34
+ if(!defined('YARPP_CACHE_TYPE')) define('YARPP_CACHE_TYPE', 'tables');
35
+
36
+ /* Load proper cache constants */
37
+ switch(YARPP_CACHE_TYPE){
38
+ case 'tables':
39
+ define('YARPP_TABLES_RELATED_TABLE', 'yarpp_related_cache');
40
+ break;
41
+ case 'postmeta':
42
+ define('YARPP_POSTMETA_KEYWORDS_KEY', '_yarpp_keywords');
43
+ define('YARPP_POSTMETA_RELATED_KEY', '_yarpp_related');
44
+ break;
45
+ }
46
+
47
+ /* New in 3.5: Set YARPP extra weight multiplier */
48
+ if(!defined('YARPP_EXTRA_WEIGHT')) define('YARPP_EXTRA_WEIGHT', 3);
49
+
50
+ /* Includes ----------------------------------------------------------------------------------------------------------*/
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_Widget.php');
57
+ include_once(YARPP_DIR.'/classes/YARPP_Cache.php');
58
+ include_once(YARPP_DIR.'/classes/YARPP_Cache_Bypass.php');
59
+ include_once(YARPP_DIR.'/classes/YARPP_Cache_'.ucfirst(YARPP_CACHE_TYPE).'.php');
60
+
61
+ /* WP hooks ----------------------------------------------------------------------------------------------------------*/
62
+ add_action('init', 'yarpp_init');
63
+ add_action('activate_'.plugin_basename(__FILE__), 'yarpp_plugin_activate', 10, 1);