'sendtim_form', 'post_status' => 'any', 'fields' => 'ids', 'numberposts' => -1 ) ); foreach ( $ids as $id ) { wp_delete_post( $id, true ); } $names = $wpdb->get_col( $wpdb->prepare( "SELECT option_name FROM {$wpdb->options} WHERE option_name LIKE %s", $wpdb->esc_like( '_transient_sendtim_forms_' ) . '%' ) ); foreach ( $names as $name ) { delete_transient( substr( $name, strlen( '_transient_' ) ) ); } } if ( is_multisite() ) { foreach ( get_sites( array( 'fields' => 'ids', 'number' => 0 ) ) as $site_id ) { switch_to_blog( $site_id ); sendtim_signup_remove_site_data(); restore_current_blog(); } } else { sendtim_signup_remove_site_data(); }