From 4e1aad52dda9adff4665a20c0cd9131f46a0b4a1 Mon Sep 17 00:00:00 2001 From: aurovrata Date: Tue, 26 Dec 2023 14:26:41 +0530 Subject: [PATCH] v2.15.0rc1 --- README.txt | 6 ++++-- .../class-reorder-post-within-categories-admin.php | 13 ++++++++----- reorder-post-within-categories.php | 4 ++-- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/README.txt b/README.txt index 8e62989..5078e5b 100755 --- a/README.txt +++ b/README.txt @@ -3,9 +3,9 @@ Contributors: aurovrata, aurelien, pondermatic, robrecord Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=36PNU5KYMP738 Tags: order, reorder, re-order, order by category,order custom post type, order by categories, order category, order categories, order by taxonomy, order by taxonomies, manual order, order posts Requires at least: 4.4 -Tested up to: 6.3.0 +Tested up to: 6.4.2 Requires PHP: 5.6 -Stable tag: 2.14.5 +Stable tag: 2.15.0 License: GPLv2 License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -383,6 +383,8 @@ define('WPGURUS_DEBUG', true); the plugin will printout debug messages, along with the final SQL query for your manually ranked posts. This is useful in order to determine if another plugin is also filtering your posts queries and overriding the ranking of the resuls. == Changelog == += 2.15.0 = +* added admin filter rpwc2_get_thumbnail_url to customise post thumbnail = 2.14.5 = * fix term validation issue on admin reorder page. = 2.14.4 = diff --git a/admin/class-reorder-post-within-categories-admin.php b/admin/class-reorder-post-within-categories-admin.php index e2eb109..f6dbd5f 100755 --- a/admin/class-reorder-post-within-categories-admin.php +++ b/admin/class-reorder-post-within-categories-admin.php @@ -334,21 +334,24 @@ public function load_posts() { wp_die(); } /** - * get thumbnail image for dashboard post reorder list. + * Get thumbnail image for dashboard post reorder list. * * @since 2.13.0 + * @param WP_Post $post post object. + * @param String $size thumbnail size handle. + * @return String image url. */ - // public static function get_thumbnail_url(\WP_Post $post, $size = 'thumbnail'): string php 8 public static function get_thumbnail_url( $post, $size = 'thumbnail' ) { + // public static function get_thumbnail_url(\WP_Post $post, $size = 'thumbnail'): string php 8. $img = get_the_post_thumbnail_url( $post, $size ); - // support attachments with/without featured images - if ( ! $img && $post->post_type === 'attachment' ) { + // support attachments with/without featured images. + if ( ! $img && 'attachment' === $post->post_type ) { $img = wp_get_attachment_url( $post->ID, $size ); } if ( ! $img ) { $img = plugin_dir_url( __DIR__ ) . 'assets/logo.png'; } - return $img; + return apply_filters( 'rpwc2_get_thumbnail_url', $img, $post->ID ); } /** * function to get ranked posts details for ajax call. diff --git a/reorder-post-within-categories.php b/reorder-post-within-categories.php index 6a84ca0..21a5217 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.5 + * Version: 2.15.0rc1 * 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.5' ); +define( 'REORDER_POST_WITHIN_CATEGORIES_VERSION', '2.15.0rc1' ); // options for plugin used in both public and admin classes. define( 'RPWC_OPTIONS', 'deefuse_ReOrderOrderedCategoriesOptions' ); define( 'RPWC_OPTIONS_2', '_rpwc2_sort_options' );