Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
[WordPress] Direct Database Queries in WordPress
private function set_all_scheduled_events_as_public() {
global $wpdb;
// @codingStandardsIgnoreStart
UPDATE $wpdb->posts
SET post_status = '%s'
WHERE post_type = '%s'
AND post_status = '%s'
// @codingStandardsIgnoreEnd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment