Plugin Directory


Ignore:
Timestamp:
04/05/2024 08:55:29 AM (13 months ago)
Author:
rubel_miah
Message:

Release version 2.6.4

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-carousel-free/trunk/includes/class-wp-carousel-free-import-export.php

    r2981138 r3065296  
    4747                    );
    4848                    foreach ( get_post_meta( $shortcode->ID ) as $metakey => $value ) {
    49                         $shortcode_export['meta'][ $metakey ] = $value[0];
    50                     }
    51                     $str  = isset( $shortcode_export['meta']['sp_wpcp_upload_options'] ) ? $shortcode_export['meta']['sp_wpcp_upload_options'] : '';
    52                     $data = unserialize( $str );
     49                        $shortcode_export['meta'][ $metakey ] = maybe_unserialize( $value[0] );
     50                    }
     51                    $str  = isset( $shortcode_export['meta']['sp_wpcp_upload_options'] ) ? maybe_unserialize( $shortcode_export['meta']['sp_wpcp_upload_options'] ) : '';
     52                    $data = maybe_unserialize( $str );
    5353                    if ( 'image-carousel' === $data['wpcp_carousel_type'] ) {
    5454                        $image_gallery      = explode( ',', $data['wpcp_gallery'] );
     
    207207                    }
    208208                    $gallery_img_url_id                          = implode( ',', $gallery_id );
    209                     $data                                        = unserialize( $shortcode['meta']['sp_wpcp_upload_options'] );
    210                     $data['wpcp_gallery']                        = $gallery_img_url_id;
    211                     $shortcode['meta']['sp_wpcp_upload_options'] = serialize( $data );
     209                    $option_data                                 = $shortcode['meta']['sp_wpcp_upload_options'];
     210                    $option_data['wpcp_gallery']                 = $gallery_img_url_id;
     211                    $shortcode['meta']['sp_wpcp_upload_options'] = $option_data;
    212212                }
    213213                if ( is_wp_error( $new_shortcode_id ) ) {
     
    220220                            $new_shortcode_id,
    221221                            $key,
    222                             maybe_unserialize( str_replace( '{#ID#}', $new_shortcode_id, $value ) )
     222                            $value
    223223                        );
    224224                    }
Note: See TracChangeset for help on using the changeset viewer.