mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-18 06:03:38 +09:00
Mobile work and profile settings
This commit is contained in:
@@ -14,9 +14,9 @@ class UM_Uninstall {
|
||||
|
||||
foreach( wp_load_alloptions() as $k => $v ) {
|
||||
|
||||
if ( substr( $k, 0, 3 ) == 'um_' || substr( $k, 0, 3 ) == 'UM_' ) {
|
||||
if ( substr( $k, 0, 3 ) == 'um_' ) {
|
||||
|
||||
if ( $k == 'um_core_forms' || $k == 'um_core_pages' || $k == 'um_core_directories' ) {
|
||||
if ( $k == 'um_core_pages' ) {
|
||||
$v = unserialize( $v );
|
||||
foreach( $v as $post_id ) {
|
||||
wp_delete_post( $post_id, 1 );
|
||||
@@ -29,10 +29,14 @@ class UM_Uninstall {
|
||||
|
||||
}
|
||||
|
||||
$forms = get_posts( array( 'post_type' => 'um_form', 'numberposts' => -1 ) );
|
||||
foreach( $forms as $form ) {wp_delete_post( $form->ID, 1 );}
|
||||
|
||||
$directories = get_posts( array( 'post_type' => 'um_directory', 'numberposts' => -1 ) );
|
||||
foreach( $directories as $directory ) {wp_delete_post( $directory->ID, 1 );}
|
||||
|
||||
$roles = get_posts( array( 'post_type' => 'um_role', 'numberposts' => -1 ) );
|
||||
foreach( $roles as $role ) {
|
||||
wp_delete_post( $role->ID, 1 );
|
||||
}
|
||||
foreach( $roles as $role ) {wp_delete_post( $role->ID, 1 );}
|
||||
|
||||
if ( is_plugin_active( um_plugin ) ) {
|
||||
deactivate_plugins( um_plugin );
|
||||
|
||||
Reference in New Issue
Block a user