' . __( 'Click the image to edit or update', 'alanah-free' ) . '

' : ''; ?> ' . __( 'Remove hover image', 'alanah-free' ) . '

' : ''; ?>

/>


ID, 'size_guide_img', __( 'Upload image: png, jpg or gif file', 'alanah-free' ) ); ?> ( )

/>

ID; // don't try to save the data under autosave, ajax, or future post. if ( defined( 'DOING_AUTOSAVE') && DOING_AUTOSAVE ) return; if ( defined( 'DOING_AJAX') && DOING_AJAX ) return; if ( defined( 'DOING_CRON') && DOING_CRON ) return; // is the user allowed to edit the post or page? if ( ( 'page' == $_POST['post_type'] && !current_user_can( 'edit_page', $post->ID ) ) || !current_user_can( 'edit_post', $post->ID ) ) return $post->ID; $produal_defaults = array( '_size_guide' => '', '_size_guide_img' => '', '_hover' => '', '_hover_id' => '', '_new_label' => '' ); //$product = wp_parse_args( $_POST['alanah_product'], $produal_defaults ); // store the custom fields foreach ( $produal_defaults as $key => $value ) { if ( $post->post_type == 'revision' ) return; // don't try to store data during revision save // sanitize the url before storage $value = $_POST['alanah_product' . $key]; if ( $key == '_hover' && $value ) $value = esc_url( $value ); if ( $value ) : update_post_meta( $post->ID, $key, $value ); else : delete_post_meta( $post->ID, $key ); endif; } }