wordpress/wp-content/themes/basic/themify/megamenu/class-mega-menu.php
/**
	 * Helper method that performs proper action on a metadata based on user input
	 *
	 * @since 1.0
	 */
Helper method that performs proper action on a metadata based on user input
@since 1.0
Helper method that performs proper action on a metadata based on user input @since 1 . 0
public function save_meta( $meta_key, $new_meta_value, $post_id = null ) {
		global $post;
		if( ! $post_id )
			$post_id = $post->ID;
		$meta_value = get_post_meta( $post_id, $meta_key, true );
		if ( $new_meta_value && '' == $meta_value )
			add_post_meta( $post_id, $meta_key, $new_meta_value, true );
		elseif ( $new_meta_value && $new_meta_value != $meta_value )
			update_post_meta( $post_id, $meta_key, $new_meta_value );
		elseif ( '' == $new_meta_value && $meta_value )
			delete_post_meta( $post_id, $meta_key, $meta_value );
	}
public function save_meta ( $ meta_key , $ new_meta_value , $ post_id = null ) { global $ post ; if ( ! $ post_id ) $ post_id = $ post -> ID ; $ meta_value = get_post_meta ( $ post_id , $ meta_key , true ) ; if ( $ new_meta_value && '' == $ meta_value ) add_post_meta ( $ post_id , $ meta_key , $ new_meta_value , true ) ; elseif ( $ new_meta_value && $ new_meta_value != $ meta_value ) update_post_meta ( $ post_id , $ meta_key , $ new_meta_value ) ; elseif ( '' == $ new_meta_value && $ meta_value ) delete_post_meta ( $ post_id , $ meta_key , $ meta_value ) ; }
Helper method that performs proper action on a metadata based on user input
 @since 1.0
Helper method that performs proper action on a metadata based on user input @since 1 . 0