Plugin Directory

Changeset 1007396


Ignore:
Timestamp:
10/14/2014 03:39:07 PM (11 years ago)
Author:
jethin
Message:

correcting embed metadata save issue

Location:
gallery-slideshow
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • gallery-slideshow/tags/1.3.1/gallery-slideshow.php

    r890215 r1007396  
    5050    $pattern = get_shortcode_regex();
    5151    if ( preg_match_all( '/'. $pattern .'/s', $post_object->post_content, $matches )
    52         && array_key_exists( 2, $matches )
    53         && in_array( 'gss', $matches[2] ) ){
    54             foreach( $matches[3] as $atts_string ){
     52      && array_key_exists( 2, $matches )
     53      && in_array( 'gss', $matches[2] ) ){
     54        // print_r($matches);
     55        foreach( $matches[2] as $k => $sc_name ){
     56            if( $sc_name == 'gss' ){
     57                $atts_string =  $matches[3][$k];
    5558                $atts_string = trim( $atts_string );
    5659                $atts = shortcode_parse_atts( $atts_string );
     
    6063                update_post_meta($post_id, $name, $atts_string);
    6164            }
     65        }
    6266    }
    6367    // if( has_shortcode( $post_object->post_content, 'gss' ) ) { }
  • gallery-slideshow/trunk/gallery-slideshow.php

    r890215 r1007396  
    5050    $pattern = get_shortcode_regex();
    5151    if ( preg_match_all( '/'. $pattern .'/s', $post_object->post_content, $matches )
    52         && array_key_exists( 2, $matches )
    53         && in_array( 'gss', $matches[2] ) ){
    54             foreach( $matches[3] as $atts_string ){
     52      && array_key_exists( 2, $matches )
     53      && in_array( 'gss', $matches[2] ) ){
     54        // print_r($matches);
     55        foreach( $matches[2] as $k => $sc_name ){
     56            if( $sc_name == 'gss' ){
     57                $atts_string =  $matches[3][$k];
    5558                $atts_string = trim( $atts_string );
    5659                $atts = shortcode_parse_atts( $atts_string );
     
    6063                update_post_meta($post_id, $name, $atts_string);
    6164            }
     65        }
    6266    }
    6367    // if( has_shortcode( $post_object->post_content, 'gss' ) ) { }
Note: See TracChangeset for help on using the changeset viewer.