diff --git a/readme.txt b/readme.txt index f8dadc4..918b439 100644 --- a/readme.txt +++ b/readme.txt @@ -3,8 +3,8 @@ Contributors: cadeyrn Donate link: https://paypal.me/petermolnar/3 Tags: RSS, feed, featured image, attachment Requires at least: 3.0 -Tested up to: 4.4 -Stable tag: 0.1 +Tested up to: 4.4.2 +Stable tag: 0.1.1 License: GPLv3 License URI: http://www.gnu.org/licenses/gpl-3.0.html Required minimum PHP version: 5.3 @@ -32,6 +32,11 @@ Version numbering logic: * every .B version indicates new features. * every ..C indicates bugfixes for A.B version. += 0.1.1 = +*2016-03-08* + +* better debugging + = 0.1 = *2015-12-14* diff --git a/wp-featured2rss.php b/wp-featured2rss.php index f9d995c..afbb850 100644 --- a/wp-featured2rss.php +++ b/wp-featured2rss.php @@ -3,7 +3,7 @@ Plugin Name: wp-featured2rss Plugin URI: https://github.com/petermolnar/wp-featured2rss Description: WordPress plugin to add featured image to RSS feed as attachment (which WordPress doesn't do by default) -Version: 0.1 +Version: 0.1.1 Author: Peter Molnar Author URI: http://petermolnar.eu/ License: GPLv3 @@ -52,7 +52,7 @@ class WP_FEATURED2RSS { $post = static::fix_post(); - //static::debug('insterting featured image to rss'); + static::debug('insterting featured image to rss',7); if ($post === false ) return false; @@ -79,10 +79,10 @@ class WP_FEATURED2RSS { arsort($candidates); foreach ($candidates as $potential => $maxsize ) { - //static::debug('checking size ' . $potential . ': ' . $meta['sizes'][$potential]['file'] . ' vs ' .$meta['file'] ); + static::debug('checking size ' . $potential . ': ' . $meta['sizes'][$potential]['file'] . ' vs ' .$meta['file'], 7 ); if (isset($meta['sizes'][$potential]) && isset($meta['sizes'][$potential]['file']) && $meta['sizes'][$potential]['file'] != $meta['file']) { - //static::debug( $meta['sizes'][$potential]['file'] . ' look like a resized file, using it'); + static::debug( $meta['sizes'][$potential]['file'] . ' look like a resized file, using it', 7); $asize = $potential; $img = wp_get_attachment_image_src( $thid, $potential ); break; @@ -172,7 +172,7 @@ class WP_FEATURED2RSS { // in case WordPress debug log has a minimum level if ( defined ( 'WP_DEBUG_LEVEL' ) ) { $wp_level = $levels [ WP_DEBUG_LEVEL ]; - if ( $level_ < $wp_level ) { + if ( $level_ > $wp_level ) { return false; } } @@ -213,4 +213,4 @@ class WP_FEATURED2RSS { $WP_FEATURED2RSS = new WP_FEATURED2RSS(); -endif; \ No newline at end of file +endif;