Changeset 3416964
- Timestamp:
- 12/11/2025 05:04:02 AM (3 months ago)
- Location:
- smart-custom-fields/trunk
- Files:
-
- 3 edited
-
classes/fields/class.field-related-posts.php (modified) (3 diffs)
-
readme.txt (modified) (2 diffs)
-
smart-custom-fields.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
smart-custom-fields/trunk/classes/fields/class.field-related-posts.php
r3398537 r3416964 35 35 protected function options() { 36 36 return array( 37 'post-type' => '',37 'post-type' => array(), 38 38 'limit' => 0, 39 39 'instruction' => '', … … 159 159 $post_type = $this->get( 'post-type' ); 160 160 $limit = $this->get( 'limit' ); 161 162 // Normalize post-type to array format for backward compatibility. 163 if ( ! is_array( $post_type ) ) { 164 if ( empty( $post_type ) ) { 165 // If post-type is not specified, default to 'post' (backward compatibility with 4.2.2). 166 $post_type = array( 'post' ); 167 } else { 168 // If post-type is a string, convert to array. 169 $post_type = array( $post_type ); 170 } 171 } 161 172 162 173 $choices_posts = array(); … … 266 277 <div class="clear"></div>', 267 278 SCF_Config::PREFIX . 'relation-left', 268 implode( ',', $post_type ?? array( 'post' )),279 implode( ',', $post_type ), 269 280 esc_attr( $limit ), 270 281 SCF_Config::PREFIX . 'search', -
smart-custom-fields/trunk/readme.txt
r3398537 r3416964 6 6 Requires PHP: 7.4 7 7 Tested up to: 6.8 8 Stable tag: 5.0. 58 Stable tag: 5.0.6 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 135 135 == Changelog == 136 136 137 = 5.0.6 = 138 * Fixed a bug that caused a fatal error if post-type was not specified in related posts. [inc2734/smart-custom-fields#110](https://github.com/inc2734/smart-custom-fields/issues/110) 139 137 140 = 5.0.5 = 138 141 * Fixed a bug that caused a fatal error if post-type was not specified in related posts. [inc2734/smart-custom-fields#110](https://github.com/inc2734/smart-custom-fields/issues/110) -
smart-custom-fields/trunk/smart-custom-fields.php
r3398537 r3416964 4 4 * Plugin URI: https://github.com/inc2734/smart-custom-fields/ 5 5 * Description: Smart Custom Fields is a simple plugin that management custom fields. 6 * Version: 5.0. 56 * Version: 5.0.6 7 7 * Author: inc2734 8 8 * Author URI: https://2inc.org
Note: See TracChangeset
for help on using the changeset viewer.