Plugin Directory

Changeset 3416964


Ignore:
Timestamp:
12/11/2025 05:04:02 AM (3 months ago)
Author:
inc2734
Message:

Version up. v5.0.6

Location:
smart-custom-fields/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • smart-custom-fields/trunk/classes/fields/class.field-related-posts.php

    r3398537 r3416964  
    3535    protected function options() {
    3636        return array(
    37             'post-type'   => '',
     37            'post-type'   => array(),
    3838            'limit'       => 0,
    3939            'instruction' => '',
     
    159159        $post_type = $this->get( 'post-type' );
    160160        $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        }
    161172
    162173        $choices_posts  = array();
     
    266277            <div class="clear"></div>',
    267278            SCF_Config::PREFIX . 'relation-left',
    268             implode( ',', $post_type ?? array( 'post' ) ),
     279            implode( ',', $post_type ),
    269280            esc_attr( $limit ),
    270281            SCF_Config::PREFIX . 'search',
  • smart-custom-fields/trunk/readme.txt

    r3398537 r3416964  
    66Requires PHP: 7.4
    77Tested up to: 6.8
    8 Stable tag: 5.0.5
     8Stable tag: 5.0.6
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    135135== Changelog ==
    136136
     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
    137140= 5.0.5 =
    138141* 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  
    44 * Plugin URI: https://github.com/inc2734/smart-custom-fields/
    55 * Description: Smart Custom Fields is a simple plugin that management custom fields.
    6  * Version: 5.0.5
     6 * Version: 5.0.6
    77 * Author: inc2734
    88 * Author URI: https://2inc.org
Note: See TracChangeset for help on using the changeset viewer.