Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
[WordPress] Direct Database Queries in WordPress
<?php
private function set_all_scheduled_events_as_public() {
global $wpdb;
// @codingStandardsIgnoreStart
$wpdb->query(
$wpdb->prepare(
"
UPDATE $wpdb->posts
SET post_status = '%s'
WHERE post_type = '%s'
AND post_status = '%s'
",
'publish',
'tribe_events',
'future'
)
);
// @codingStandardsIgnoreEnd
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.