💥 TRENDING: Changeset/ - HD Photos!

Changeset 3300317


Ignore:
Timestamp:
05/25/2025 09:19:17 PM (7 months ago)
Author:
wpscholar
Message:

Update to version 1.2.3 from GitHub

Location:
random-post-on-refresh
Files:
4 deleted
6 edited
1 copied

Legend:

Unmodified
Added
Removed
  • random-post-on-refresh/assets/icon-128x128.png

    • Property svn:mime-type changed from application/octet-stream to image/png
  • random-post-on-refresh/assets/icon-256x256.png

    • Property svn:mime-type changed from application/octet-stream to image/png
  • random-post-on-refresh/tags/1.2.3/RandomPostOnRefresh.php

    r3300310 r3300317  
    44 * Description: Show a random post on every page load.
    55 * Plugin URI: http://wpscholar.com/wordpress-plugins/random-post-on-refresh/
    6  * Version: 1.2.2
     6 * Version: 1.2.3
    77 * Author: Micah Wood
    88 * Author URI: https://wpscholar.com
     
    3434            'image_required' => 'true',
    3535            'not'            => '',
     36            'orderby'        => 'date',
     37            'order'          => 'DESC',
    3638            'post_type'      => 'post',
    3739            'posts_per_page' => 100,
     
    241243            $post_types = array_filter( array_map( 'trim', explode( ',', $atts['post_type'] ) ) );
    242244
     245            $orderby = $atts['orderby'];
     246
     247            // Just in case someone uses "random" instead of "rand".
     248            if ( 'random' === $orderby ) {
     249                $orderby = 'rand';
     250            }
     251
    243252            $query_args = array(
    244253                'post_type'      => $post_types,
    245254                'posts_per_page' => absint( $atts['posts_per_page'] ),
     255                'orderby'        => $orderby,
     256                'order'          => strtoupper( $atts['order'] ) === 'ASC' ? 'ASC' : 'DESC',
    246257            );
    247258
  • random-post-on-refresh/tags/1.2.3/readme.txt

    r3300310 r3300317  
    66Requires PHP: 7.4
    77Tested up to: 6.8
    8 Stable tag: 1.2.2
     8Stable tag: 1.2.3
    99License: GPLv3
    1010License URI: http://www.gnu.org/licenses/gpl-3.0.html