• Resolved madvic

    (@madvic)


    I see an other unimplemented featured ??

    In Média, it is a image featured : “unattached” in a select in grid mode or in the table in list mod.
    With your gallery, we don’t no if this image is attached or not.

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter madvic

    (@madvic)

    Just add post_id in post_parent field of the attached image. ??

    Thread Starter madvic

    (@madvic)

    Here the code :

    metabox.php line 79 :

    		$img_ids = explode(",", $value);
    		$value = implode( ',', (array)$value );
    
    		if ( get_post_meta( $post->ID, $key, FALSE ) ) {
    			update_post_meta( $post->ID, $key, $value );
    
    			foreach ( $img_ids as $id ) {
    				wp_update_post( array( 'ID' => $id,'post_parent'  => $post->ID ) );
    			}
    
    		} else {
    			add_post_meta( $post->ID, $key, $value );
    
    			foreach ( $img_ids as $id ) {
    				wp_update_post( array( 'ID' => $id,'post_parent'  => $post->ID ) );
    			}
    		}
    Plugin Author Andy Mercer

    (@kelderic)

    Hi madvic. Thanks for the suggestion and more importantly for actually writing some code. I’m sorry for not responding quickly. I don’t get notifications and it’s hard to remember to check frequently.

    I don’t have a lot of time right now, but I’ll try to make some time to read through your code in depth this week.

    Plugin Author Andy Mercer

    (@kelderic)

    I’m working on a redesign of the metabox from scratch to make it more similar to how the Media page itself works. This should be part of the redesign.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Attached image’ is closed to new replies.