mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-16 05:03:33 +09:00
@@ -1043,7 +1043,7 @@ if ( ! class_exists( 'um\core\Access' ) ) {
|
||||
}
|
||||
return $content;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Turn on the content replacement on the filter 'the_content'
|
||||
@@ -1054,7 +1054,7 @@ if ( ! class_exists( 'um\core\Access' ) ) {
|
||||
public function replace_post_content_on() {
|
||||
add_filter( 'the_content', array( $this, 'replace_post_content' ), 9999, 1 );
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Turn off the content replacement on the filter 'the_content'
|
||||
|
||||
@@ -256,14 +256,14 @@ if ( ! class_exists( 'um\core\Fields' ) ) {
|
||||
do_action( 'um_delete_custom_field', $id, $args );
|
||||
|
||||
update_option( 'um_fields', $fields );
|
||||
}
|
||||
|
||||
global $wpdb;
|
||||
$forms = $wpdb->get_col("SELECT ID FROM {$wpdb->posts} WHERE post_type = 'um_form'");
|
||||
foreach ( $forms as $form_id ) {
|
||||
$form_fields = get_post_meta( $form_id, '_um_custom_fields', true );
|
||||
unset( $form_fields[ $id ] );
|
||||
update_post_meta( $form_id, '_um_custom_fields', $form_fields );
|
||||
global $wpdb;
|
||||
$forms = $wpdb->get_col( "SELECT ID FROM {$wpdb->posts} WHERE post_type = 'um_form'" );
|
||||
foreach ( $forms as $form_id ) {
|
||||
$form_fields = get_post_meta( $form_id, '_um_custom_fields', true );
|
||||
unset( $form_fields[ $id ] );
|
||||
update_post_meta( $form_id, '_um_custom_fields', $form_fields );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user