Skip to content

Commit

Permalink
Merge pull request #353 from Codeinwp/development
Browse files Browse the repository at this point in the history
fix Gutenberg bug that limits max items per feed
  • Loading branch information
contactashish13 authored Jan 1, 2020
2 parents 151f1c5 + 836ad0a commit f5bf1cb
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion css/feedzy-rss-feeds.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* feedzy-rss-feeds.css
* Feedzy RSS Feed
* Copyright: (c) 2016 Themeisle, themeisle.com
* Version: 3.3.14
* Version: 3.3.15
* Plugin Name: FEEDZY RSS Feeds
* Plugin URI: http://themeisle.com/plugins/feedzy-rss-feeds/
* Author: Themeisle
Expand Down
2 changes: 1 addition & 1 deletion feedzy-rss-feed.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* Plugin Name: Feedzy RSS Feeds Lite
* Plugin URI: https://themeisle.com/plugins/feedzy-rss-feeds-lite/
* Description: A small and lightweight RSS aggregator plugin. Fast and very easy to use, it allows you to aggregate multiple RSS feeds into your WordPress site through fully customizable shortcodes & widgets.
* Version: 3.3.14
* Version: 3.3.15
* Author: Themeisle
* Author URI: http://themeisle.com
* License: GPL-2.0+
Expand Down
9 changes: 7 additions & 2 deletions includes/abstract/feedzy-rss-feeds-admin-abstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -711,9 +711,14 @@ public function sanitize_attr( $sc, $feed_url ) {
// phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison
if ( $sc['max'] == '0' ) {
$sc['max'] = '999';
} elseif ( empty( $sc['max'] ) || ! ctype_digit( $sc['max'] ) ) {
} elseif ( empty( $sc['max'] ) || ! is_numeric( $sc['max'] ) ) {
$sc['max'] = '5';
}

if ( empty( $sc['offset'] ) || ! is_numeric( $sc['offset'] ) ) {
$sc['offset'] = '0';
}

if ( empty( $sc['size'] ) || ! ctype_digit( $sc['size'] ) ) {
$sc['size'] = '150';
}
Expand All @@ -725,7 +730,7 @@ public function sanitize_attr( $sc, $feed_url ) {
$sc['keywords_ban'] = rtrim( $sc['keywords_ban'], ',' );
$sc['keywords_ban'] = array_map( 'trim', explode( ',', $sc['keywords_ban'] ) );
}
if ( ! empty( $sc['summarylength'] ) && ( ! ctype_digit( $sc['summarylength'] ) && ! is_numeric( $sc['summarylength'] ) ) ) {
if ( empty( $sc['summarylength'] ) || ! is_numeric( $sc['summarylength'] ) ) {
$sc['summarylength'] = '';
}
if ( empty( $sc['default'] ) ) {
Expand Down
2 changes: 1 addition & 1 deletion includes/feedzy-rss-feeds.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public static function instance() {
*/
public function init() {
self::$plugin_name = 'feedzy-rss-feeds';
self::$version = '3.3.14';
self::$version = '3.3.15';
self::$instance->load_dependencies();
self::$instance->set_locale();
self::$instance->define_admin_hooks();
Expand Down
2 changes: 1 addition & 1 deletion includes/gutenberg/feedzy-rss-feeds-gutenberg-block.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public function feedzy_register_block_type() {
'type' => 'string',
),
'max' => array(
'type' => 'string',
'type' => 'number',
'default' => '5',
),
'offset' => array(
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "feedzy-rss-feeds",
"version": "3.3.14",
"version": "3.3.15",
"description": "Feedzy RSS Feeds - lite version",
"repository": {
"type": "git",
Expand Down

0 comments on commit f5bf1cb

Please sign in to comment.