Skip to content

Commit

Permalink
v2.15.0rc1
Browse files Browse the repository at this point in the history
  • Loading branch information
aurovrata committed Dec 26, 2023
1 parent 129cd35 commit 4e1aad5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
6 changes: 4 additions & 2 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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 =
Expand Down
13 changes: 8 additions & 5 deletions admin/class-reorder-post-within-categories-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions reorder-post-within-categories.php
Original file line number Diff line number Diff line change
Expand Up @@ -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+
Expand All @@ -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' );
Expand Down

0 comments on commit 4e1aad5

Please sign in to comment.