Plugin Directory

Changeset 3300310


Ignore:
Timestamp:
05/25/2025 08:25:00 PM (10 months ago)
Author:
wpscholar
Message:

Update to version 1.2.2 from GitHub

Location:
random-post-on-refresh
Files:
28 added
2 deleted
8 edited
1 copied

Legend:

Unmodified
Added
Removed
  • random-post-on-refresh/tags/1.2.2/.nvmrc

    r3200361 r3300310  
    1 v20
     1v22
  • random-post-on-refresh/tags/1.2.2/RandomPostOnRefresh.php

    r3200361 r3300310  
    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.1
     6 * Version: 1.2.2
    77 * Author: Micah Wood
    88 * Author URI: https://wpscholar.com
    9  * Requires at least: 4.5
    10  * Requires PHP: 5.4
     9 * Requires at least: 6.4
     10 * Requires PHP: 7.4
    1111 * Text Domain: random-post-on-refresh
    1212 * Domain Path: /languages
     
    1414 * License URI: http://www.gnu.org/licenses/gpl-3.0.html
    1515 *
    16  * Copyright 2018-2024 by Micah Wood - All rights reserved.
     16 * Copyright 2018-2025 by Micah Wood - All rights reserved.
    1717 *
    1818 * @package RandomPostOnRefresh
     
    2828        const SHORTCODE = 'random_post_on_refresh';
    2929
     30        const DEFAULT_ATTRIBUTES = array(
     31            'author'         => '',
     32            'class'          => '',
     33            'ids'            => '',
     34            'image_required' => 'true',
     35            'not'            => '',
     36            'post_type'      => 'post',
     37            'posts_per_page' => 100,
     38            'search'         => '',
     39            'show'           => 'title, image, excerpt',
     40            'size'           => 'large',
     41            'taxonomy'       => '',
     42            'terms'          => '',
     43        );
     44
    3045        /**
    3146         * Initialize the plugin.
    3247         */
    3348        public static function initialize() {
    34             load_plugin_textdomain( 'random-post-on-refresh', false, __DIR__ . '/languages' );
     49            add_action( 'init', array( __CLASS__, 'load_textdomain' ) );
    3550            add_filter( 'widget_text', 'do_shortcode' );
    3651            add_action( 'wp_enqueue_scripts', array( __CLASS__, 'wp_enqueue_scripts' ) );
     
    3954
    4055        /**
     56         * Load the textdomain.
     57         */
     58        public static function load_textdomain() {
     59            load_plugin_textdomain( 'random-post-on-refresh', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
     60        }
     61
     62        /**
    4163         * Enqueue style.
    4264         */
     
    5880
    5981            $atts = shortcode_atts(
    60                 array(
    61                     'author'         => '',
    62                     'class'          => '',
    63                     'ids'            => '',
    64                     'image_required' => 'true',
    65                     'not'            => '',
    66                     'post_type'      => 'post',
    67                     'search'         => '',
    68                     'show'           => 'title, image, excerpt',
    69                     'size'           => 'large',
    70                     'taxonomy'       => '',
    71                     'terms'          => '',
    72                 ),
     82                self::DEFAULT_ATTRIBUTES,
    7383                array_change_key_case( array_filter( (array) $atts ), CASE_LOWER ),
    7484                self::SHORTCODE
     
    149159            }
    150160
    151             $query_args = array(
    152                 'post_type'      => $post_types,
    153                 'posts_per_page' => 100,
    154             );
    155 
    156             if ( ! empty( $atts['author'] ) ) {
    157                 $query_args['author__in'] = self::parse_id_list( $atts['author'] );
    158             }
    159 
    160             if ( ! empty( $atts['ids'] ) ) {
    161                 $query_args['post__in'] = self::parse_id_list( $atts['ids'] );
    162             }
    163 
    164             if ( ! empty( $atts['not'] ) ) {
    165                 $query_args['post__not_in'] = self::parse_id_list( $atts['not'] );
    166             }
    167 
    168             if ( ! empty( $atts['search'] ) ) {
    169                 $query_args['s'] = self::parse_id_list( $atts['search'] );
    170             }
    171 
    172             if ( ! empty( $atts['taxonomy'] ) && ! empty( $atts['terms'] ) ) {
    173                 $terms = self::parse_id_list( $atts['terms'] );
    174                 if ( 'category' === $atts['taxonomy'] ) {
    175                     $query_args['category__in'] = $terms;
    176                 } elseif ( 'post_tag' === $atts['taxonomy'] ) {
    177                     $query_args['tag__in'] = $terms;
    178                 } else {
    179                     $query_args['tax_query'] = array(
    180                         'taxonomy' => $atts['taxonomy'],
    181                         'terms'    => self::parse_id_list( $atts['terms'] ),
    182                     );
    183                 }
    184             }
    185 
    186             // Only fetch posts with images?
    187             if ( $show_image && $image_required ) {
    188                 $query_args['meta_query'] = array( array( 'key' => '_thumbnail_id' ) );
    189             }
    190 
    191             // Never load the current post.
    192             $query_args['post__not_in'][] = get_the_ID();
    193 
    194             $query_args = apply_filters( 'random_post_on_refresh_query_args', $query_args, $atts );
     161            // Build query args using the new method
     162            $query_args = self::build_query_args( $atts );
    195163
    196164            $query = new WP_Query( $query_args );
     
    265233
    266234        /**
     235         * Build WP_Query arguments from shortcode attributes.
     236         *
     237         * @param array $atts Shortcode attributes
     238         * @return array Query arguments for WP_Query
     239         */
     240        public static function build_query_args( $atts ) {
     241            $post_types = array_filter( array_map( 'trim', explode( ',', $atts['post_type'] ) ) );
     242
     243            $query_args = array(
     244                'post_type'      => $post_types,
     245                'posts_per_page' => absint( $atts['posts_per_page'] ),
     246            );
     247
     248            if ( ! empty( $atts['author'] ) ) {
     249                $query_args['author__in'] = self::parse_id_list( $atts['author'] );
     250            }
     251
     252            if ( ! empty( $atts['ids'] ) ) {
     253                $query_args['post__in'] = self::parse_id_list( $atts['ids'] );
     254            }
     255
     256            if ( ! empty( $atts['not'] ) ) {
     257                $query_args['post__not_in'] = self::parse_id_list( $atts['not'] );
     258            }
     259
     260            if ( ! empty( $atts['search'] ) ) {
     261                $query_args['s'] = $atts['search'];
     262            }
     263
     264            if ( ! empty( $atts['taxonomy'] ) && ! empty( $atts['terms'] ) ) {
     265                $terms = self::parse_id_list( $atts['terms'] );
     266                if ( 'category' === $atts['taxonomy'] ) {
     267                    $query_args['category__in'] = $terms;
     268                } elseif ( 'post_tag' === $atts['taxonomy'] ) {
     269                    $query_args['tag__in'] = $terms;
     270                } else {
     271                    $query_args['tax_query'] = array(
     272                        'taxonomy' => $atts['taxonomy'],
     273                        'terms'    => $terms,
     274                    );
     275                }
     276            }
     277
     278            // Only fetch posts with images?
     279            if ( ! empty( $atts['show'] ) && strpos( $atts['show'], 'image' ) !== false && wp_validate_boolean( $atts['image_required'] ) ) {
     280                $query_args['meta_query'] = array( array( 'key' => '_thumbnail_id' ) );
     281            }
     282
     283            // Never load the current post.
     284            $query_args['post__not_in'][] = get_the_ID();
     285
     286            $query_args = apply_filters( 'random_post_on_refresh_query_args', $query_args, $atts );
     287
     288            return $query_args;
     289        }
     290
     291        /**
    267292         * Parse an ID list into an array.
    268293         *
     
    274299            $ids = array();
    275300            if ( ! empty( $id_list ) ) {
    276                 $ids = array_filter( array_map( 'absint', explode( ',', preg_replace( '#[^0-9,]#', '', $id_list ) ) ) );
     301                $ids = array_values( array_filter( array_map( 'absint', explode( ',', preg_replace( '#[^0-9,]#', '', $id_list ) ) ) ) );
    277302            }
    278303
     
    334359    }
    335360
    336     RandomPostOnRefresh::initialize();
     361    add_action( 'plugins_loaded', array( 'RandomPostOnRefresh', 'initialize' ) );
    337362
    338363}
  • random-post-on-refresh/tags/1.2.2/languages/random-post-on-refresh.pot

    r3200361 r3300310  
    1 # Copyright (C) 2024 Micah Wood
     1# Copyright (C) 2025 Micah Wood
    22# This file is distributed under the GPL3.
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Random Post on Refresh 1.2.1\n"
     5"Project-Id-Version: Random Post on Refresh 1.2.2\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/random-post-on-refresh\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1212"POT-Creation-Date: \n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    14 "X-Generator: WP-CLI 2.11.0\n"
     14"X-Generator: WP-CLI 2.12.0\n"
    1515"X-Domain: random-post-on-refresh\n"
    1616
     
    4040msgstr ""
    4141
    42 #: RandomPostOnRefresh.php:101
     42#: RandomPostOnRefresh.php:102
    4343msgid "Sorry, your theme does not support featured images. Update the \"show\" attribute to exclude the \"image\" option."
    4444msgstr ""
    4545
    4646#. Translators: %1$s is replaced with taxonomy shortcode argument and %2$s is replaced with a comma-separated list of available taxonomies.
    47 #: RandomPostOnRefresh.php:111
     47#: RandomPostOnRefresh.php:112
     48#, php-format
    4849msgid "Sorry, taxonomy \"%1$s\" is invalid. Valid options are: %2$s. Please check your shortcode implementation."
    4950msgstr ""
    5051
    51 #: RandomPostOnRefresh.php:122
     52#: RandomPostOnRefresh.php:123
    5253msgid "Sorry, you cannot use the terms attribute without the taxonomy attribute. Please check your shortcode implementation."
    5354msgstr ""
    5455
    55 #: RandomPostOnRefresh.php:129
     56#: RandomPostOnRefresh.php:130
    5657msgid "Sorry, you cannot use the taxonomy attribute without the terms attribute. Please check your shortcode implementation."
    5758msgstr ""
    5859
    5960#. Translators: %1$s is replaced with post_type shortcode argument and %2$s is replaced with a comma-separated list of available post types.
    60 #: RandomPostOnRefresh.php:142
     61#: RandomPostOnRefresh.php:143
     62#, php-format
    6163msgid "Sorry, post type \"%1$s\" is invalid. Valid options are: %2$s. Please check your shortcode implementation."
    6264msgstr ""
    6365
    64 #: RandomPostOnRefresh.php:200
     66#: RandomPostOnRefresh.php:159
    6567msgid "Sorry, no matching posts were found. Your query may be too restrictive. Please check your shortcode implementation."
    6668msgstr ""
    6769
    68 #: RandomPostOnRefresh.php:201
     70#: RandomPostOnRefresh.php:160
    6971msgid "Currently, only posts with featured images will be shown. Perhaps try setting the \"image_required\" property to \"false\"?"
    7072msgstr ""
    7173
    72 #: RandomPostOnRefresh.php:216
     74#: RandomPostOnRefresh.php:175
    7375msgid "Sorry, the selected post does not have a featured image."
    7476msgstr ""
    7577
    76 #: RandomPostOnRefresh.php:325
     78#: RandomPostOnRefresh.php:341
    7779msgid "Consult the documentation"
    7880msgstr ""
    7981
    80 #: RandomPostOnRefresh.php:327
     82#: RandomPostOnRefresh.php:343
    8183msgid "Note: This helpful notification is only visible to logged in users who can edit this shortcode."
    8284msgstr ""
  • random-post-on-refresh/tags/1.2.2/readme.txt

    r3300287 r3300310  
    66Requires PHP: 7.4
    77Tested up to: 6.8
    8 Stable tag: 1.2.1
     8Stable tag: 1.2.2
    99License: GPLv3
    1010License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    3535that supports a more recent version of PHP.
    3636
    37 * Requires WordPress version 3.2 or greater
    38 * Requires PHP version 5 or greater ( PHP version 5.2.4 is required to run WordPress version 3.2 )
     37* Requires WordPress version 6.4 or greater
     38* Requires PHP version 7.4 or greater
    3939
    4040= The Easy Way =
     
    6565* **post_type** - Provide a post type or a comma-separated list of post types to pull from. You must use the internal post type name. Default is `post`. Example: `[random_post_on_refresh post_type="page"]`
    6666
     67* **posts_per_page** - Provide the number of posts to fetch. Defaults to 100. Posts are randomly selected from the posts fetched.
     68
    6769* **search** - Provide a custom search term to limit the random posts returned.  Example: `[random_post_on_refresh search="relativity"]`
    6870
     
    8082
    8183== Changelog ==
     84
     85= 1.2.2 =
     86
     87* General maintenance
     88* Allow customization of posts_per_page query arg
    8289
    8390= 1.2.1 =
     
    120127* Minor bug fixes and improvements.
    121128
     129= 1.2.1 =
     130
     131* Allow filtering of query args.
     132
     133= 1.2.2 =
     134
     135* Allow customization of posts_per_page query arg.
     136
  • random-post-on-refresh/trunk/.nvmrc

    r3200361 r3300310  
    1 v20
     1v22
  • random-post-on-refresh/trunk/RandomPostOnRefresh.php

    r3200361 r3300310  
    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.1
     6 * Version: 1.2.2
    77 * Author: Micah Wood
    88 * Author URI: https://wpscholar.com
    9  * Requires at least: 4.5
    10  * Requires PHP: 5.4
     9 * Requires at least: 6.4
     10 * Requires PHP: 7.4
    1111 * Text Domain: random-post-on-refresh
    1212 * Domain Path: /languages
     
    1414 * License URI: http://www.gnu.org/licenses/gpl-3.0.html
    1515 *
    16  * Copyright 2018-2024 by Micah Wood - All rights reserved.
     16 * Copyright 2018-2025 by Micah Wood - All rights reserved.
    1717 *
    1818 * @package RandomPostOnRefresh
     
    2828        const SHORTCODE = 'random_post_on_refresh';
    2929
     30        const DEFAULT_ATTRIBUTES = array(
     31            'author'         => '',
     32            'class'          => '',
     33            'ids'            => '',
     34            'image_required' => 'true',
     35            'not'            => '',
     36            'post_type'      => 'post',
     37            'posts_per_page' => 100,
     38            'search'         => '',
     39            'show'           => 'title, image, excerpt',
     40            'size'           => 'large',
     41            'taxonomy'       => '',
     42            'terms'          => '',
     43        );
     44
    3045        /**
    3146         * Initialize the plugin.
    3247         */
    3348        public static function initialize() {
    34             load_plugin_textdomain( 'random-post-on-refresh', false, __DIR__ . '/languages' );
     49            add_action( 'init', array( __CLASS__, 'load_textdomain' ) );
    3550            add_filter( 'widget_text', 'do_shortcode' );
    3651            add_action( 'wp_enqueue_scripts', array( __CLASS__, 'wp_enqueue_scripts' ) );
     
    3954
    4055        /**
     56         * Load the textdomain.
     57         */
     58        public static function load_textdomain() {
     59            load_plugin_textdomain( 'random-post-on-refresh', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
     60        }
     61
     62        /**
    4163         * Enqueue style.
    4264         */
     
    5880
    5981            $atts = shortcode_atts(
    60                 array(
    61                     'author'         => '',
    62                     'class'          => '',
    63                     'ids'            => '',
    64                     'image_required' => 'true',
    65                     'not'            => '',
    66                     'post_type'      => 'post',
    67                     'search'         => '',
    68                     'show'           => 'title, image, excerpt',
    69                     'size'           => 'large',
    70                     'taxonomy'       => '',
    71                     'terms'          => '',
    72                 ),
     82                self::DEFAULT_ATTRIBUTES,
    7383                array_change_key_case( array_filter( (array) $atts ), CASE_LOWER ),
    7484                self::SHORTCODE
     
    149159            }
    150160
    151             $query_args = array(
    152                 'post_type'      => $post_types,
    153                 'posts_per_page' => 100,
    154             );
    155 
    156             if ( ! empty( $atts['author'] ) ) {
    157                 $query_args['author__in'] = self::parse_id_list( $atts['author'] );
    158             }
    159 
    160             if ( ! empty( $atts['ids'] ) ) {
    161                 $query_args['post__in'] = self::parse_id_list( $atts['ids'] );
    162             }
    163 
    164             if ( ! empty( $atts['not'] ) ) {
    165                 $query_args['post__not_in'] = self::parse_id_list( $atts['not'] );
    166             }
    167 
    168             if ( ! empty( $atts['search'] ) ) {
    169                 $query_args['s'] = self::parse_id_list( $atts['search'] );
    170             }
    171 
    172             if ( ! empty( $atts['taxonomy'] ) && ! empty( $atts['terms'] ) ) {
    173                 $terms = self::parse_id_list( $atts['terms'] );
    174                 if ( 'category' === $atts['taxonomy'] ) {
    175                     $query_args['category__in'] = $terms;
    176                 } elseif ( 'post_tag' === $atts['taxonomy'] ) {
    177                     $query_args['tag__in'] = $terms;
    178                 } else {
    179                     $query_args['tax_query'] = array(
    180                         'taxonomy' => $atts['taxonomy'],
    181                         'terms'    => self::parse_id_list( $atts['terms'] ),
    182                     );
    183                 }
    184             }
    185 
    186             // Only fetch posts with images?
    187             if ( $show_image && $image_required ) {
    188                 $query_args['meta_query'] = array( array( 'key' => '_thumbnail_id' ) );
    189             }
    190 
    191             // Never load the current post.
    192             $query_args['post__not_in'][] = get_the_ID();
    193 
    194             $query_args = apply_filters( 'random_post_on_refresh_query_args', $query_args, $atts );
     161            // Build query args using the new method
     162            $query_args = self::build_query_args( $atts );
    195163
    196164            $query = new WP_Query( $query_args );
     
    265233
    266234        /**
     235         * Build WP_Query arguments from shortcode attributes.
     236         *
     237         * @param array $atts Shortcode attributes
     238         * @return array Query arguments for WP_Query
     239         */
     240        public static function build_query_args( $atts ) {
     241            $post_types = array_filter( array_map( 'trim', explode( ',', $atts['post_type'] ) ) );
     242
     243            $query_args = array(
     244                'post_type'      => $post_types,
     245                'posts_per_page' => absint( $atts['posts_per_page'] ),
     246            );
     247
     248            if ( ! empty( $atts['author'] ) ) {
     249                $query_args['author__in'] = self::parse_id_list( $atts['author'] );
     250            }
     251
     252            if ( ! empty( $atts['ids'] ) ) {
     253                $query_args['post__in'] = self::parse_id_list( $atts['ids'] );
     254            }
     255
     256            if ( ! empty( $atts['not'] ) ) {
     257                $query_args['post__not_in'] = self::parse_id_list( $atts['not'] );
     258            }
     259
     260            if ( ! empty( $atts['search'] ) ) {
     261                $query_args['s'] = $atts['search'];
     262            }
     263
     264            if ( ! empty( $atts['taxonomy'] ) && ! empty( $atts['terms'] ) ) {
     265                $terms = self::parse_id_list( $atts['terms'] );
     266                if ( 'category' === $atts['taxonomy'] ) {
     267                    $query_args['category__in'] = $terms;
     268                } elseif ( 'post_tag' === $atts['taxonomy'] ) {
     269                    $query_args['tag__in'] = $terms;
     270                } else {
     271                    $query_args['tax_query'] = array(
     272                        'taxonomy' => $atts['taxonomy'],
     273                        'terms'    => $terms,
     274                    );
     275                }
     276            }
     277
     278            // Only fetch posts with images?
     279            if ( ! empty( $atts['show'] ) && strpos( $atts['show'], 'image' ) !== false && wp_validate_boolean( $atts['image_required'] ) ) {
     280                $query_args['meta_query'] = array( array( 'key' => '_thumbnail_id' ) );
     281            }
     282
     283            // Never load the current post.
     284            $query_args['post__not_in'][] = get_the_ID();
     285
     286            $query_args = apply_filters( 'random_post_on_refresh_query_args', $query_args, $atts );
     287
     288            return $query_args;
     289        }
     290
     291        /**
    267292         * Parse an ID list into an array.
    268293         *
     
    274299            $ids = array();
    275300            if ( ! empty( $id_list ) ) {
    276                 $ids = array_filter( array_map( 'absint', explode( ',', preg_replace( '#[^0-9,]#', '', $id_list ) ) ) );
     301                $ids = array_values( array_filter( array_map( 'absint', explode( ',', preg_replace( '#[^0-9,]#', '', $id_list ) ) ) ) );
    277302            }
    278303
     
    334359    }
    335360
    336     RandomPostOnRefresh::initialize();
     361    add_action( 'plugins_loaded', array( 'RandomPostOnRefresh', 'initialize' ) );
    337362
    338363}
  • random-post-on-refresh/trunk/languages/random-post-on-refresh.pot

    r3200361 r3300310  
    1 # Copyright (C) 2024 Micah Wood
     1# Copyright (C) 2025 Micah Wood
    22# This file is distributed under the GPL3.
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Random Post on Refresh 1.2.1\n"
     5"Project-Id-Version: Random Post on Refresh 1.2.2\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/random-post-on-refresh\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1212"POT-Creation-Date: \n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    14 "X-Generator: WP-CLI 2.11.0\n"
     14"X-Generator: WP-CLI 2.12.0\n"
    1515"X-Domain: random-post-on-refresh\n"
    1616
     
    4040msgstr ""
    4141
    42 #: RandomPostOnRefresh.php:101
     42#: RandomPostOnRefresh.php:102
    4343msgid "Sorry, your theme does not support featured images. Update the \"show\" attribute to exclude the \"image\" option."
    4444msgstr ""
    4545
    4646#. Translators: %1$s is replaced with taxonomy shortcode argument and %2$s is replaced with a comma-separated list of available taxonomies.
    47 #: RandomPostOnRefresh.php:111
     47#: RandomPostOnRefresh.php:112
     48#, php-format
    4849msgid "Sorry, taxonomy \"%1$s\" is invalid. Valid options are: %2$s. Please check your shortcode implementation."
    4950msgstr ""
    5051
    51 #: RandomPostOnRefresh.php:122
     52#: RandomPostOnRefresh.php:123
    5253msgid "Sorry, you cannot use the terms attribute without the taxonomy attribute. Please check your shortcode implementation."
    5354msgstr ""
    5455
    55 #: RandomPostOnRefresh.php:129
     56#: RandomPostOnRefresh.php:130
    5657msgid "Sorry, you cannot use the taxonomy attribute without the terms attribute. Please check your shortcode implementation."
    5758msgstr ""
    5859
    5960#. Translators: %1$s is replaced with post_type shortcode argument and %2$s is replaced with a comma-separated list of available post types.
    60 #: RandomPostOnRefresh.php:142
     61#: RandomPostOnRefresh.php:143
     62#, php-format
    6163msgid "Sorry, post type \"%1$s\" is invalid. Valid options are: %2$s. Please check your shortcode implementation."
    6264msgstr ""
    6365
    64 #: RandomPostOnRefresh.php:200
     66#: RandomPostOnRefresh.php:159
    6567msgid "Sorry, no matching posts were found. Your query may be too restrictive. Please check your shortcode implementation."
    6668msgstr ""
    6769
    68 #: RandomPostOnRefresh.php:201
     70#: RandomPostOnRefresh.php:160
    6971msgid "Currently, only posts with featured images will be shown. Perhaps try setting the \"image_required\" property to \"false\"?"
    7072msgstr ""
    7173
    72 #: RandomPostOnRefresh.php:216
     74#: RandomPostOnRefresh.php:175
    7375msgid "Sorry, the selected post does not have a featured image."
    7476msgstr ""
    7577
    76 #: RandomPostOnRefresh.php:325
     78#: RandomPostOnRefresh.php:341
    7779msgid "Consult the documentation"
    7880msgstr ""
    7981
    80 #: RandomPostOnRefresh.php:327
     82#: RandomPostOnRefresh.php:343
    8183msgid "Note: This helpful notification is only visible to logged in users who can edit this shortcode."
    8284msgstr ""
  • random-post-on-refresh/trunk/readme.txt

    r3300287 r3300310  
    66Requires PHP: 7.4
    77Tested up to: 6.8
    8 Stable tag: 1.2.1
     8Stable tag: 1.2.2
    99License: GPLv3
    1010License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    3535that supports a more recent version of PHP.
    3636
    37 * Requires WordPress version 3.2 or greater
    38 * Requires PHP version 5 or greater ( PHP version 5.2.4 is required to run WordPress version 3.2 )
     37* Requires WordPress version 6.4 or greater
     38* Requires PHP version 7.4 or greater
    3939
    4040= The Easy Way =
     
    6565* **post_type** - Provide a post type or a comma-separated list of post types to pull from. You must use the internal post type name. Default is `post`. Example: `[random_post_on_refresh post_type="page"]`
    6666
     67* **posts_per_page** - Provide the number of posts to fetch. Defaults to 100. Posts are randomly selected from the posts fetched.
     68
    6769* **search** - Provide a custom search term to limit the random posts returned.  Example: `[random_post_on_refresh search="relativity"]`
    6870
     
    8082
    8183== Changelog ==
     84
     85= 1.2.2 =
     86
     87* General maintenance
     88* Allow customization of posts_per_page query arg
    8289
    8390= 1.2.1 =
     
    120127* Minor bug fixes and improvements.
    121128
     129= 1.2.1 =
     130
     131* Allow filtering of query args.
     132
     133= 1.2.2 =
     134
     135* Allow customization of posts_per_page query arg.
     136
Note: See TracChangeset for help on using the changeset viewer.