From 08119281d8a279d29224cd25bf93889735b8b599 Mon Sep 17 00:00:00 2001 From: aurovrata Date: Thu, 23 Feb 2023 20:46:58 +0530 Subject: [PATCH] v2.14.1 --- admin/class-reorder-post-within-categories-admin.php | 4 +++- reorder-post-within-categories.php | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/admin/class-reorder-post-within-categories-admin.php b/admin/class-reorder-post-within-categories-admin.php index 08ef868..a4c56a7 100755 --- a/admin/class-reorder-post-within-categories-admin.php +++ b/admin/class-reorder-post-within-categories-admin.php @@ -334,10 +334,12 @@ private function _get_ranked_posts($post_type, $term_id, $start, $offset){ 'ignore_sticky_posts'=>false, 'posts_per_page'=>-1 )); - $results = array_fill(0, count($ranking), ''); + /** @since 2.14.1 WPML */ + $results = [];//array_fill(0, count($ranking), ''); foreach($posts as $post) { $img = self::get_thumbnail_url($post); $rank = array_search($post->ID, $ranking); + if($rank === false) continue; $results[$rank]=array( 'id'=>$post->ID, 'link'=>admin_url('post.php?post='.$post->ID.'&action=edit'), diff --git a/reorder-post-within-categories.php b/reorder-post-within-categories.php index 925a4f1..6195f75 100755 --- a/reorder-post-within-categories.php +++ b/reorder-post-within-categories.php @@ -16,7 +16,7 @@ * Plugin Name: ReOrder Posts within Categories * Plugin URI: https://github.com/aurovrata/ReOrder-posts-within-categories * Description: This is a short description of what the plugin does. It's displayed in the WordPress admin area. - * Version: 2.14.0 + * Version: 2.14.1 * Author: Aurorata V. * Author URI: https://profiles.wordpress.org/aurovrata/ * License: GPL-2.0+ @@ -33,7 +33,7 @@ /** * Current plugin version. */ -define( 'REORDER_POST_WITHIN_CATEGORIES_VERSION', '2.14.0' ); +define( 'REORDER_POST_WITHIN_CATEGORIES_VERSION', '2.14.1' ); //options for plugin used in both public and admin classes. define('RPWC_OPTIONS', 'deefuse_ReOrderOrderedCategoriesOptions'); define('RPWC_OPTIONS_2', '_rpwc2_sort_options');