Changeset 3300310
- Timestamp:
- 05/25/2025 08:25:00 PM (10 months ago)
- Location:
- random-post-on-refresh
- Files:
-
- 28 added
- 2 deleted
- 8 edited
- 1 copied
-
tags/1.2.2 (copied) (copied from random-post-on-refresh/trunk)
-
tags/1.2.2/.distinclude (added)
-
tags/1.2.2/.nvmrc (modified) (1 diff)
-
tags/1.2.2/.wp-env.json (added)
-
tags/1.2.2/RandomPostOnRefresh.php (modified) (9 diffs)
-
tags/1.2.2/languages/random-post-on-refresh-de_DE.mo (added)
-
tags/1.2.2/languages/random-post-on-refresh-de_DE.po (added)
-
tags/1.2.2/languages/random-post-on-refresh-es_ES.mo (added)
-
tags/1.2.2/languages/random-post-on-refresh-es_ES.po (added)
-
tags/1.2.2/languages/random-post-on-refresh-fr_FR.mo (added)
-
tags/1.2.2/languages/random-post-on-refresh-fr_FR.po (added)
-
tags/1.2.2/languages/random-post-on-refresh-it_IT.mo (added)
-
tags/1.2.2/languages/random-post-on-refresh-it_IT.po (added)
-
tags/1.2.2/languages/random-post-on-refresh-nl_NL.mo (added)
-
tags/1.2.2/languages/random-post-on-refresh-nl_NL.po (added)
-
tags/1.2.2/languages/random-post-on-refresh-pt_BR.mo (added)
-
tags/1.2.2/languages/random-post-on-refresh-pt_BR.po (added)
-
tags/1.2.2/languages/random-post-on-refresh.pot (modified) (3 diffs)
-
tags/1.2.2/readme.txt (modified) (5 diffs)
-
tags/1.2.2/vendor (deleted)
-
trunk/.distinclude (added)
-
trunk/.nvmrc (modified) (1 diff)
-
trunk/.wp-env.json (added)
-
trunk/RandomPostOnRefresh.php (modified) (9 diffs)
-
trunk/languages/random-post-on-refresh-de_DE.mo (added)
-
trunk/languages/random-post-on-refresh-de_DE.po (added)
-
trunk/languages/random-post-on-refresh-es_ES.mo (added)
-
trunk/languages/random-post-on-refresh-es_ES.po (added)
-
trunk/languages/random-post-on-refresh-fr_FR.mo (added)
-
trunk/languages/random-post-on-refresh-fr_FR.po (added)
-
trunk/languages/random-post-on-refresh-it_IT.mo (added)
-
trunk/languages/random-post-on-refresh-it_IT.po (added)
-
trunk/languages/random-post-on-refresh-nl_NL.mo (added)
-
trunk/languages/random-post-on-refresh-nl_NL.po (added)
-
trunk/languages/random-post-on-refresh-pt_BR.mo (added)
-
trunk/languages/random-post-on-refresh-pt_BR.po (added)
-
trunk/languages/random-post-on-refresh.pot (modified) (3 diffs)
-
trunk/readme.txt (modified) (5 diffs)
-
trunk/vendor (deleted)
Legend:
- Unmodified
- Added
- Removed
-
random-post-on-refresh/tags/1.2.2/.nvmrc
r3200361 r3300310 1 v2 01 v22 -
random-post-on-refresh/tags/1.2.2/RandomPostOnRefresh.php
r3200361 r3300310 4 4 * Description: Show a random post on every page load. 5 5 * Plugin URI: http://wpscholar.com/wordpress-plugins/random-post-on-refresh/ 6 * Version: 1.2. 16 * Version: 1.2.2 7 7 * Author: Micah Wood 8 8 * Author URI: https://wpscholar.com 9 * Requires at least: 4.510 * Requires PHP: 5.49 * Requires at least: 6.4 10 * Requires PHP: 7.4 11 11 * Text Domain: random-post-on-refresh 12 12 * Domain Path: /languages … … 14 14 * License URI: http://www.gnu.org/licenses/gpl-3.0.html 15 15 * 16 * Copyright 2018-202 4by Micah Wood - All rights reserved.16 * Copyright 2018-2025 by Micah Wood - All rights reserved. 17 17 * 18 18 * @package RandomPostOnRefresh … … 28 28 const SHORTCODE = 'random_post_on_refresh'; 29 29 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 30 45 /** 31 46 * Initialize the plugin. 32 47 */ 33 48 public static function initialize() { 34 load_plugin_textdomain( 'random-post-on-refresh', false, __DIR__ . '/languages');49 add_action( 'init', array( __CLASS__, 'load_textdomain' ) ); 35 50 add_filter( 'widget_text', 'do_shortcode' ); 36 51 add_action( 'wp_enqueue_scripts', array( __CLASS__, 'wp_enqueue_scripts' ) ); … … 39 54 40 55 /** 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 /** 41 63 * Enqueue style. 42 64 */ … … 58 80 59 81 $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, 73 83 array_change_key_case( array_filter( (array) $atts ), CASE_LOWER ), 74 84 self::SHORTCODE … … 149 159 } 150 160 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 ); 195 163 196 164 $query = new WP_Query( $query_args ); … … 265 233 266 234 /** 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 /** 267 292 * Parse an ID list into an array. 268 293 * … … 274 299 $ids = array(); 275 300 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 ) ) ) ) ); 277 302 } 278 303 … … 334 359 } 335 360 336 RandomPostOnRefresh::initialize();361 add_action( 'plugins_loaded', array( 'RandomPostOnRefresh', 'initialize' ) ); 337 362 338 363 } -
random-post-on-refresh/tags/1.2.2/languages/random-post-on-refresh.pot
r3200361 r3300310 1 # Copyright (C) 202 4Micah Wood1 # Copyright (C) 2025 Micah Wood 2 2 # This file is distributed under the GPL3. 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Random Post on Refresh 1.2. 1\n"5 "Project-Id-Version: Random Post on Refresh 1.2.2\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/random-post-on-refresh\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 12 12 "POT-Creation-Date: \n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 "X-Generator: WP-CLI 2.1 1.0\n"14 "X-Generator: WP-CLI 2.12.0\n" 15 15 "X-Domain: random-post-on-refresh\n" 16 16 … … 40 40 msgstr "" 41 41 42 #: RandomPostOnRefresh.php:10 142 #: RandomPostOnRefresh.php:102 43 43 msgid "Sorry, your theme does not support featured images. Update the \"show\" attribute to exclude the \"image\" option." 44 44 msgstr "" 45 45 46 46 #. 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 48 49 msgid "Sorry, taxonomy \"%1$s\" is invalid. Valid options are: %2$s. Please check your shortcode implementation." 49 50 msgstr "" 50 51 51 #: RandomPostOnRefresh.php:12 252 #: RandomPostOnRefresh.php:123 52 53 msgid "Sorry, you cannot use the terms attribute without the taxonomy attribute. Please check your shortcode implementation." 53 54 msgstr "" 54 55 55 #: RandomPostOnRefresh.php:1 2956 #: RandomPostOnRefresh.php:130 56 57 msgid "Sorry, you cannot use the taxonomy attribute without the terms attribute. Please check your shortcode implementation." 57 58 msgstr "" 58 59 59 60 #. 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 61 63 msgid "Sorry, post type \"%1$s\" is invalid. Valid options are: %2$s. Please check your shortcode implementation." 62 64 msgstr "" 63 65 64 #: RandomPostOnRefresh.php: 20066 #: RandomPostOnRefresh.php:159 65 67 msgid "Sorry, no matching posts were found. Your query may be too restrictive. Please check your shortcode implementation." 66 68 msgstr "" 67 69 68 #: RandomPostOnRefresh.php: 20170 #: RandomPostOnRefresh.php:160 69 71 msgid "Currently, only posts with featured images will be shown. Perhaps try setting the \"image_required\" property to \"false\"?" 70 72 msgstr "" 71 73 72 #: RandomPostOnRefresh.php: 21674 #: RandomPostOnRefresh.php:175 73 75 msgid "Sorry, the selected post does not have a featured image." 74 76 msgstr "" 75 77 76 #: RandomPostOnRefresh.php:3 2578 #: RandomPostOnRefresh.php:341 77 79 msgid "Consult the documentation" 78 80 msgstr "" 79 81 80 #: RandomPostOnRefresh.php:3 2782 #: RandomPostOnRefresh.php:343 81 83 msgid "Note: This helpful notification is only visible to logged in users who can edit this shortcode." 82 84 msgstr "" -
random-post-on-refresh/tags/1.2.2/readme.txt
r3300287 r3300310 6 6 Requires PHP: 7.4 7 7 Tested up to: 6.8 8 Stable tag: 1.2. 18 Stable tag: 1.2.2 9 9 License: GPLv3 10 10 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 35 35 that supports a more recent version of PHP. 36 36 37 * Requires WordPress version 3.2or greater38 * 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 39 39 40 40 = The Easy Way = … … 65 65 * **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"]` 66 66 67 * **posts_per_page** - Provide the number of posts to fetch. Defaults to 100. Posts are randomly selected from the posts fetched. 68 67 69 * **search** - Provide a custom search term to limit the random posts returned. Example: `[random_post_on_refresh search="relativity"]` 68 70 … … 80 82 81 83 == Changelog == 84 85 = 1.2.2 = 86 87 * General maintenance 88 * Allow customization of posts_per_page query arg 82 89 83 90 = 1.2.1 = … … 120 127 * Minor bug fixes and improvements. 121 128 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 v2 01 v22 -
random-post-on-refresh/trunk/RandomPostOnRefresh.php
r3200361 r3300310 4 4 * Description: Show a random post on every page load. 5 5 * Plugin URI: http://wpscholar.com/wordpress-plugins/random-post-on-refresh/ 6 * Version: 1.2. 16 * Version: 1.2.2 7 7 * Author: Micah Wood 8 8 * Author URI: https://wpscholar.com 9 * Requires at least: 4.510 * Requires PHP: 5.49 * Requires at least: 6.4 10 * Requires PHP: 7.4 11 11 * Text Domain: random-post-on-refresh 12 12 * Domain Path: /languages … … 14 14 * License URI: http://www.gnu.org/licenses/gpl-3.0.html 15 15 * 16 * Copyright 2018-202 4by Micah Wood - All rights reserved.16 * Copyright 2018-2025 by Micah Wood - All rights reserved. 17 17 * 18 18 * @package RandomPostOnRefresh … … 28 28 const SHORTCODE = 'random_post_on_refresh'; 29 29 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 30 45 /** 31 46 * Initialize the plugin. 32 47 */ 33 48 public static function initialize() { 34 load_plugin_textdomain( 'random-post-on-refresh', false, __DIR__ . '/languages');49 add_action( 'init', array( __CLASS__, 'load_textdomain' ) ); 35 50 add_filter( 'widget_text', 'do_shortcode' ); 36 51 add_action( 'wp_enqueue_scripts', array( __CLASS__, 'wp_enqueue_scripts' ) ); … … 39 54 40 55 /** 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 /** 41 63 * Enqueue style. 42 64 */ … … 58 80 59 81 $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, 73 83 array_change_key_case( array_filter( (array) $atts ), CASE_LOWER ), 74 84 self::SHORTCODE … … 149 159 } 150 160 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 ); 195 163 196 164 $query = new WP_Query( $query_args ); … … 265 233 266 234 /** 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 /** 267 292 * Parse an ID list into an array. 268 293 * … … 274 299 $ids = array(); 275 300 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 ) ) ) ) ); 277 302 } 278 303 … … 334 359 } 335 360 336 RandomPostOnRefresh::initialize();361 add_action( 'plugins_loaded', array( 'RandomPostOnRefresh', 'initialize' ) ); 337 362 338 363 } -
random-post-on-refresh/trunk/languages/random-post-on-refresh.pot
r3200361 r3300310 1 # Copyright (C) 202 4Micah Wood1 # Copyright (C) 2025 Micah Wood 2 2 # This file is distributed under the GPL3. 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Random Post on Refresh 1.2. 1\n"5 "Project-Id-Version: Random Post on Refresh 1.2.2\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/random-post-on-refresh\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 12 12 "POT-Creation-Date: \n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 "X-Generator: WP-CLI 2.1 1.0\n"14 "X-Generator: WP-CLI 2.12.0\n" 15 15 "X-Domain: random-post-on-refresh\n" 16 16 … … 40 40 msgstr "" 41 41 42 #: RandomPostOnRefresh.php:10 142 #: RandomPostOnRefresh.php:102 43 43 msgid "Sorry, your theme does not support featured images. Update the \"show\" attribute to exclude the \"image\" option." 44 44 msgstr "" 45 45 46 46 #. 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 48 49 msgid "Sorry, taxonomy \"%1$s\" is invalid. Valid options are: %2$s. Please check your shortcode implementation." 49 50 msgstr "" 50 51 51 #: RandomPostOnRefresh.php:12 252 #: RandomPostOnRefresh.php:123 52 53 msgid "Sorry, you cannot use the terms attribute without the taxonomy attribute. Please check your shortcode implementation." 53 54 msgstr "" 54 55 55 #: RandomPostOnRefresh.php:1 2956 #: RandomPostOnRefresh.php:130 56 57 msgid "Sorry, you cannot use the taxonomy attribute without the terms attribute. Please check your shortcode implementation." 57 58 msgstr "" 58 59 59 60 #. 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 61 63 msgid "Sorry, post type \"%1$s\" is invalid. Valid options are: %2$s. Please check your shortcode implementation." 62 64 msgstr "" 63 65 64 #: RandomPostOnRefresh.php: 20066 #: RandomPostOnRefresh.php:159 65 67 msgid "Sorry, no matching posts were found. Your query may be too restrictive. Please check your shortcode implementation." 66 68 msgstr "" 67 69 68 #: RandomPostOnRefresh.php: 20170 #: RandomPostOnRefresh.php:160 69 71 msgid "Currently, only posts with featured images will be shown. Perhaps try setting the \"image_required\" property to \"false\"?" 70 72 msgstr "" 71 73 72 #: RandomPostOnRefresh.php: 21674 #: RandomPostOnRefresh.php:175 73 75 msgid "Sorry, the selected post does not have a featured image." 74 76 msgstr "" 75 77 76 #: RandomPostOnRefresh.php:3 2578 #: RandomPostOnRefresh.php:341 77 79 msgid "Consult the documentation" 78 80 msgstr "" 79 81 80 #: RandomPostOnRefresh.php:3 2782 #: RandomPostOnRefresh.php:343 81 83 msgid "Note: This helpful notification is only visible to logged in users who can edit this shortcode." 82 84 msgstr "" -
random-post-on-refresh/trunk/readme.txt
r3300287 r3300310 6 6 Requires PHP: 7.4 7 7 Tested up to: 6.8 8 Stable tag: 1.2. 18 Stable tag: 1.2.2 9 9 License: GPLv3 10 10 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 35 35 that supports a more recent version of PHP. 36 36 37 * Requires WordPress version 3.2or greater38 * 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 39 39 40 40 = The Easy Way = … … 65 65 * **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"]` 66 66 67 * **posts_per_page** - Provide the number of posts to fetch. Defaults to 100. Posts are randomly selected from the posts fetched. 68 67 69 * **search** - Provide a custom search term to limit the random posts returned. Example: `[random_post_on_refresh search="relativity"]` 68 70 … … 80 82 81 83 == Changelog == 84 85 = 1.2.2 = 86 87 * General maintenance 88 * Allow customization of posts_per_page query arg 82 89 83 90 = 1.2.1 = … … 120 127 * Minor bug fixes and improvements. 121 128 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.