get_results("SELECT blog_id FROM {$wpdb->blogs}", ARRAY_A); /** * In case of transient * delete_transient( 'italystrap_settings' ); */ delete_option('italystrap_settings'); delete_option('italystrap_widget_area'); if ($blogs) { foreach ($blogs as $blog) { switch_to_blog($blog['blog_id']); /** * In case of transient * delete_transient( 'italystrap_settings' ); * Delete all custom post type created by plugin */ delete_option('italystrap_settings'); delete_option('italystrap_widget_area'); // delete_post_meta_by_key( '_italystrap_layout_settings' ); restore_current_blog(); } } } else { /** * In case of transient * delete_transient( 'italystrap_settings' ); * Delete all custom post type created by plugin */ delete_option('italystrap_settings'); delete_option('italystrap_widget_area'); // delete_post_meta_by_key( '_italystrap_layout_settings' ); }