diff --git a/includes/admin/settings/class-geodir-settings-cpt-cf.php b/includes/admin/settings/class-geodir-settings-cpt-cf.php index 54fe6584..5d7551e5 100644 --- a/includes/admin/settings/class-geodir-settings-cpt-cf.php +++ b/includes/admin/settings/class-geodir-settings-cpt-cf.php @@ -2500,6 +2500,7 @@ public static function system_fields( $post_type ) { */ public static function reserved_fields( $post_type ) { $fields = array( + 'id', 'post_id', '_search_title', 'post_status', diff --git a/includes/widgets/class-geodir-widget-post-images.php b/includes/widgets/class-geodir-widget-post-images.php index 734e57a7..bab67716 100644 --- a/includes/widgets/class-geodir-widget-post-images.php +++ b/includes/widgets/class-geodir-widget-post-images.php @@ -323,14 +323,14 @@ public function output( $args = array(), $widget_args = array(), $content = '' ) } /** - * Output the imae slider. + * Output the image slider. * * @global bool $geodir_carousel_open Check whether carousel already open. * * @param $options */ public function output_images( $options ) { - global $post, $gd_post, $geodir_carousel_open; + global $post, $gd_post, $geodir_carousel_open, $aui_bs5; // options $defaults = array( @@ -462,9 +462,24 @@ public function output_images( $options ) { $lightbox_image_size = apply_filters( 'geodir_post_images_lightbox_image_size', $lightbox_image_size ); $main_wrapper_class .= " geodir-image-sizes-" . $image_size; - if ( !empty( $options ) ) { + if ( ! empty( $options ) ) { + // rounded & rounded_size don't work together. + if ( ! empty( $options['rounded_size'] ) && in_array( $options['rounded_size'], array( 'sm', 'lg' ) ) ) { + if ( $aui_bs5 ) { + if ( $options['rounded_size'] == 'sm' ) { + $options['rounded_size'] = '1'; + } elseif ( $options['rounded_size'] == 'lg' ) { + $options['rounded_size'] = '3'; + } + } + + if ( ! empty( $options['rounded'] ) && in_array( $options['rounded'], array( 'rounded', 'rounded-top', 'rounded-right', 'rounded-bottom', 'rounded-left', 'rounded-circle', 'rounded-pill', 'rounded-0' ) ) ) { + $options['rounded_size'] = ''; + } + } + // Wrap class - $main_wrapper_class .= " overflow-hidden " . sd_build_aui_class( $options ); + $main_wrapper_class .= " " . sd_build_aui_class( $options ); } if ( $options['type'] == 'slider' ) { diff --git a/readme.txt b/readme.txt index 0ad8a515..97d7999c 100644 --- a/readme.txt +++ b/readme.txt @@ -309,6 +309,7 @@ __WARNING: GDv2 is a significant update over GDv1 and may require manual work, s = GeoDirectory v2.3.52 - TBD = * AUI radio set should skip showing optgroup from option values - FIXED * PHP Warning: Undefined array key "heading_tag" - FIXED +* Add "id" as reserved field to prevent custom field with id key - CHANGED = GeoDirectory v2.3.51 - 2024-05-02 = * Switching the package looses login user name & email - CHANGED