Version Description
Download this release
Release Info
Developer | mitchoyoshitaka |
Plugin | Yet Another Related Posts Plugin (YARPP) |
Version | 4.0.6b4 |
Comparing to | |
See all releases |
Code changes from version 4.0.6b3 to 4.0.6b4
- class-core.php +20 -4
- readme.txt +4 -1
- template-thumbnails.php +3 -0
- yarpp.php +2 -2
class-core.php
CHANGED
@@ -43,9 +43,12 @@ class YARPP {
|
|
43 |
add_filter( 'the_excerpt_rss', array( $this, 'the_excerpt_rss' ), 600 );
|
44 |
add_action( 'wp_enqueue_scripts', array( $this, 'maybe_enqueue_thumbnails' ) );
|
45 |
|
46 |
-
// register yarpp-thumbnail size, if theme has not already
|
47 |
// @todo: make these UI-configurable?
|
48 |
-
if
|
|
|
|
|
|
|
49 |
$width = 120;
|
50 |
$height = 120;
|
51 |
$crop = true;
|
@@ -125,6 +128,7 @@ class YARPP {
|
|
125 |
'auto_display_archive' => false, // new in 4
|
126 |
'auto_display_post_types' => array( 'post' ), // new in 4, replacing auto_display
|
127 |
'pools' => array(), // new in 4
|
|
|
128 |
);
|
129 |
}
|
130 |
|
@@ -362,6 +366,17 @@ class YARPP {
|
|
362 |
'size' => '120x120',
|
363 |
'_default' => true
|
364 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
365 |
function thumbnail_dimensions() {
|
366 |
global $_wp_additional_image_sizes;
|
367 |
if ( !isset($_wp_additional_image_sizes['yarpp-thumbnail']) )
|
@@ -809,7 +824,8 @@ class YARPP {
|
|
809 |
'hidden_metaboxes' => $this->diagnostic_hidden_metaboxes(),
|
810 |
'post_thumbnails' => $this->diagnostic_post_thumbnails(),
|
811 |
'happy' => $this->diagnostic_happy(),
|
812 |
-
'
|
|
|
813 |
),
|
814 |
'stats' => array(
|
815 |
'counts' => array(),
|
@@ -1083,7 +1099,7 @@ class YARPP {
|
|
1083 |
if ( YARPP_NO_RELATED == $cache_status )
|
1084 |
return false;
|
1085 |
|
1086 |
-
$this->active_cache->begin_yarpp_time($reference_ID); // get ready for YARPP TIME!
|
1087 |
$related_query = new WP_Query();
|
1088 |
$related_query->query(array(
|
1089 |
'p' => $reference_ID,
|
43 |
add_filter( 'the_excerpt_rss', array( $this, 'the_excerpt_rss' ), 600 );
|
44 |
add_action( 'wp_enqueue_scripts', array( $this, 'maybe_enqueue_thumbnails' ) );
|
45 |
|
46 |
+
// if we're using thumbnails, register yarpp-thumbnail size, if theme has not already
|
47 |
// @todo: make these UI-configurable?
|
48 |
+
// Note: see FAQ in the readme if you would like to change the YARPP thumbnail size.
|
49 |
+
|
50 |
+
if ( $this->diagnostic_using_thumbnails() &&
|
51 |
+
( !($dimensions = $this->thumbnail_dimensions()) || isset($dimensions['_default']) ) ) {
|
52 |
$width = 120;
|
53 |
$height = 120;
|
54 |
$crop = true;
|
128 |
'auto_display_archive' => false, // new in 4
|
129 |
'auto_display_post_types' => array( 'post' ), // new in 4, replacing auto_display
|
130 |
'pools' => array(), // new in 4
|
131 |
+
'manually_using_thumbnails' => false, // new in 4.0.6
|
132 |
);
|
133 |
}
|
134 |
|
366 |
'size' => '120x120',
|
367 |
'_default' => true
|
368 |
);
|
369 |
+
|
370 |
+
function diagnostic_using_thumbnails() {
|
371 |
+
if ( $this->get_option( 'manually_using_thumbnails' ) )
|
372 |
+
return true;
|
373 |
+
if ( $this->get_option( 'template' ) == 'thumbnails' )
|
374 |
+
return true;
|
375 |
+
if ( $this->get_option( 'rss_template' ) == 'thumbnails' && $this->get_option( 'rss_display' ) )
|
376 |
+
return true;
|
377 |
+
return false;
|
378 |
+
}
|
379 |
+
|
380 |
function thumbnail_dimensions() {
|
381 |
global $_wp_additional_image_sizes;
|
382 |
if ( !isset($_wp_additional_image_sizes['yarpp-thumbnail']) )
|
824 |
'hidden_metaboxes' => $this->diagnostic_hidden_metaboxes(),
|
825 |
'post_thumbnails' => $this->diagnostic_post_thumbnails(),
|
826 |
'happy' => $this->diagnostic_happy(),
|
827 |
+
'using_thumbnails' => $this->diagnostic_using_thumbnails(),
|
828 |
+
'generate_thumbnails' => $this->diagnostic_generate_thumbnails(),
|
829 |
),
|
830 |
'stats' => array(
|
831 |
'counts' => array(),
|
1099 |
if ( YARPP_NO_RELATED == $cache_status )
|
1100 |
return false;
|
1101 |
|
1102 |
+
$this->active_cache->begin_yarpp_time($reference_ID, $args); // get ready for YARPP TIME!
|
1103 |
$related_query = new WP_Query();
|
1104 |
$related_query->query(array(
|
1105 |
'p' => $reference_ID,
|
readme.txt
CHANGED
@@ -255,9 +255,12 @@ If you are a bilingual speaker of English and another language and an avid user
|
|
255 |
|
256 |
= 4.0.6 =
|
257 |
* YARPP's automatic display will not run on posts which include the HTML comment `<!--noyarpp-->` [by request](https://wordpress.org/support/topic/disabling-yarrp-on-specific-pages).
|
258 |
-
* Bundled `yarpp-template-wpml.php` is now called `yarpp-template-multilingual.php`, following [discussion with the author of the Polylang plugin](https://wordpress.org/support/topic/better-integration-of-yarpp-and-polylang).
|
259 |
* More robust activation handling, particularly when network-activated.
|
260 |
* Improved handling of exceptions, for example when fulltext indexes cannot be created or non-MyISAM tables are used.
|
|
|
|
|
|
|
|
|
261 |
* Localizations
|
262 |
* Added Estonian (`est_EST`) by [JOURNAL](http://journal24.info/)
|
263 |
* Added Gujrati (`gu_IN`) by [Vikas Arora](http://www.wiznicworld.com/)
|
255 |
|
256 |
= 4.0.6 =
|
257 |
* YARPP's automatic display will not run on posts which include the HTML comment `<!--noyarpp-->` [by request](https://wordpress.org/support/topic/disabling-yarrp-on-specific-pages).
|
|
|
258 |
* More robust activation handling, particularly when network-activated.
|
259 |
* Improved handling of exceptions, for example when fulltext indexes cannot be created or non-MyISAM tables are used.
|
260 |
+
* YARPP no longer triggers the generation of YARPP-thumbnail-sized images (120x120) when YARPP thumbnails are not used.
|
261 |
+
* If you are using YARPP programmatically and using the thumbnails view and having troubles with YARPP's thumbnail size being registered, a manual control to force image size registration has been added to the [YARPP Experiments](http://wordpress.org/extend/plugins/yarpp-experiments/) plugin.
|
262 |
+
* [Bugfix](https://wordpress.org/support/topic/yarpp_related_exist-and-begin_yarpp_time-error): calls to `yarpp_related_exist()` type functions were causing errors.
|
263 |
+
* Bundled `yarpp-template-wpml.php` is now called `yarpp-template-multilingual.php`, following [discussion with the author of the Polylang plugin](https://wordpress.org/support/topic/better-integration-of-yarpp-and-polylang).
|
264 |
* Localizations
|
265 |
* Added Estonian (`est_EST`) by [JOURNAL](http://journal24.info/)
|
266 |
* Added Gujrati (`gu_IN`) by [Vikas Arora](http://www.wiznicworld.com/)
|
template-thumbnails.php
CHANGED
@@ -8,6 +8,9 @@
|
|
8 |
* More information on the custom templates is available at http://mitcho.com/blog/projects/yarpp-3-templates/
|
9 |
*/
|
10 |
|
|
|
|
|
|
|
11 |
$options = array( 'thumbnails_heading', 'thumbnails_default', 'no_results' );
|
12 |
extract( $this->parse_args( $args, $options ) );
|
13 |
|
8 |
* More information on the custom templates is available at http://mitcho.com/blog/projects/yarpp-3-templates/
|
9 |
*/
|
10 |
|
11 |
+
if ( !$this->diagnostic_using_thumbnails() )
|
12 |
+
$this->set_option( 'manually_using_thumbnails', true );
|
13 |
+
|
14 |
$options = array( 'thumbnails_heading', 'thumbnails_default', 'no_results' );
|
15 |
extract( $this->parse_args( $args, $options ) );
|
16 |
|
yarpp.php
CHANGED
@@ -3,13 +3,13 @@
|
|
3 |
Plugin Name: Yet Another Related Posts Plugin
|
4 |
Plugin URI: http://yarpp.org/
|
5 |
Description: Returns a list of related entries based on a unique algorithm for display on your blog and RSS feeds. Now with Now with thumbnail support built-in!
|
6 |
-
Version: 4.0.
|
7 |
Author: mitcho (Michael Yoshitaka Erlewine)
|
8 |
Author URI: http://mitcho.com/
|
9 |
Donate link: http://tinyurl.com/donatetomitcho
|
10 |
*/
|
11 |
|
12 |
-
define('YARPP_VERSION', '4.0.
|
13 |
define('YARPP_DIR', dirname(__FILE__));
|
14 |
define('YARPP_NO_RELATED', ':(');
|
15 |
define('YARPP_RELATED', ':)');
|
3 |
Plugin Name: Yet Another Related Posts Plugin
|
4 |
Plugin URI: http://yarpp.org/
|
5 |
Description: Returns a list of related entries based on a unique algorithm for display on your blog and RSS feeds. Now with Now with thumbnail support built-in!
|
6 |
+
Version: 4.0.6b4
|
7 |
Author: mitcho (Michael Yoshitaka Erlewine)
|
8 |
Author URI: http://mitcho.com/
|
9 |
Donate link: http://tinyurl.com/donatetomitcho
|
10 |
*/
|
11 |
|
12 |
+
define('YARPP_VERSION', '4.0.6b4');
|
13 |
define('YARPP_DIR', dirname(__FILE__));
|
14 |
define('YARPP_NO_RELATED', ':(');
|
15 |
define('YARPP_RELATED', ':)');
|