You could hook pre_schedule_event to stop scheduling them, e.g.
function pre_schedule_event_no_publish_future_post( $result, $event, $wp_error ) {
if ( $event->hook === 'publish_future_post' ) {
// Don't schedule this event
return false;
}
return $result;
}
add_filter( 'pre_schedule_event', 'pre_schedule_event_no_publish_future_post', 10, 3 );
You could possibly remove the _future_post_hook call instead
remove_action( 'future_post', '_future_post_hook', 5, 2 );
but I think pre_schedule_event is safer.
However I’d guess there are better ways to set this up too.
Related Posts:
- Count & Display Database Queries
- Slow wp_term_relationships query
- Hook into $wpdb
- Hook to be used when creating a database table
- Block search SQL from happening
- Trigger Plugin database update after git pull
- In what part of the WordPress core does the users table and usermeta table get joined?
- Hook directly into query execution
- How to Access wp_usermeta Data Immediately After a New User is Created
- How to update the values when the featured image has changed?
- Why does wp_links still exist in the db schema?
- adding user_id and name to a separate table whenever a user register based on role
- About wp database hooks (error establishing connection)
- Attach posts based on category and position
- Is it fine to have foreign key as primary key?
- Detecting errors generated by $wpdb->get_results()
- wpdb update add current timestamp not working
- Custom form that store input in database
- Restoring WordPress posts from database only
- Displaying content from one WP site on separate WP site
- Lost the `wp_options` table: what’s the best way to restore the site?
- Performance Gains of Relational DB Setup
- How to move existing WordPress wp-content folder along with database to new server and new domain name?
- store simple data in get_option()
- How might I retrieve a featured post image from an external WP site and display it as a link back?
- What are conventions about the schema of the $table_prefix
- How to modify post content before writing to database?
- BuddyPress: What’s the use of wp_bp_xprofile_data table and how does it get updated? [closed]
- storing database in version control
- Is deleting orphaned wp_options entries safe?
- How to build a movie database with wordpress?
- What’s the most efficient database method to add and query usermeta?
- How to solve slow WordPress site caused by attachment_metadata
- Sub-domain or 2nd, temporary different domain?
- How do i get user data from a custom table in the wordpress database by user ID?
- Converting WordPress into Android or iPhone app
- Large database causes slow load
- Delete duplicate rows from wordpress database where a column is duplicate in phpmyadmin
- Database slowdown after update to 3.4.1
- WooCommerce sku location in DB
- How to insert data into MySQL database from the form created in WordPress site
- Emoji support and MariaDB 10.0.30-
- Can I have multiple database users within WordPress?
- How do I copy a wordpress database?
- Export all content from wordpress
- Modify Database in Multi-Site wp_usermeta table
- Form Data not getting stored in WordPress database
- $wpdb doesn’t like to store arrays
- Connect to a remote database for wordpress in my own hosting server
- WordPress ‘repairing database’ in a constant error loop?
- What Is the Proper Way to Merge Usermeta Table to a an existing WP Database?
- Importing CSV into database table not working?
- “Database Connection Error” upon install in Apache VirtualHost document root.. Why did this happen? [closed]
- Copy post to separate database with “add_action(….)”
- Can I hook into wp_update_core outside of the admin?
- Check if an option exists and get its value in one hit
- Change options table prefix only
- Problems with moving my WordPress site to another domain/server
- Is it important to have integers inserted using %d rather than %s?
- Export a custom Mysql database product catalog to WordPress
- Any risk to changing WP table col CHARACTER_MAXIMUM_LENGTH?
- Connect to database in the header of my WordPress website
- Should I store critical css in the database or in my theme’s filesystem?
- WordPress url transformation script
- Is it risky if I update all url in the database due to my site url changed?
- Just created a WordPress Table can’t get $wpdb get row to work – need help
- Need help fixing sql syntax error after WP 3.2 upgrade
- Need help with creating a searchable user data by name or specific number like ID
- $wpdb->insert not inserting all rows
- Intentionally corrupt WordPress database
- How to re-connect WP files in lampp/htdocs to new SQL database to recover site under development
- How would I see which wordpress posts have a revision history without opening each one?
- Creating a custom form with ability to query and submit to SQL
- Intermittent Yet Problematic Error – “Error Establishing A Database Connection”
- Can I use a wpdb object to connect to a non-WordPress Oracle database [duplicate]
- WordPress Database Query works in phpMyAdmin but not in the code
- Error: SHOW FULL COLUMNS FROM `pt_participant`
- update to a new template without loosing any data
- Do I need to be selective about where I search and replace when pointing a domain to a subfolder used for development?
- How to save dropdown slection by a user in the DB
- Form display in new page
- Connection of mysql DB with wordpress
- Locally installing wordpress. Database problem
- I have my full special database from xampp how can i use this on wordpress?
- Halting data inserts for future refresh of post?
- Possible to restore wordpress database from mysql56 and sqlite files?
- Correct permissions for SQLite database
- Processing a lot of $wpdb isn’t insert all the data
- Options table – where does my values go?
- How can I safely delete data related to wp_post table manually from the mysql database?
- WP Posts Not Adding Up
- Copy site on same server?
- Changing database links has no effect
- Update references to pictures on website after moving to new URL
- How to use remote db tables in current config? [duplicate]
- database search feature
- WordPress can’t fetch the posts from the database after moving to new server [closed]
- why you don’t Implement PDO for access every thing to database
- Restrict users viewing post using age on database [closed]
- Uploaded images not displaying full size preview or inserting into posts