- Timestamp:
- 04/05/2024 08:55:29 AM (13 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
wp-carousel-free/trunk/includes/class-wp-carousel-free-import-export.php
r2981138 r3065296 47 47 ); 48 48 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 ); 53 53 if ( 'image-carousel' === $data['wpcp_carousel_type'] ) { 54 54 $image_gallery = explode( ',', $data['wpcp_gallery'] ); … … 207 207 } 208 208 $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; 212 212 } 213 213 if ( is_wp_error( $new_shortcode_id ) ) { … … 220 220 $new_shortcode_id, 221 221 $key, 222 maybe_unserialize( str_replace( '{#ID#}', $new_shortcode_id, $value ) )222 $value 223 223 ); 224 224 }
Note: See TracChangeset
for help on using the changeset viewer.