Presswell Publication Schedule

By Presswell

10+ active installationsVersion 1.2.1

Simple and precise post publishing control for WordPress based on day of the week and time of day.

Description

Presswell Publication Schedule adds precise, automated control over how often new posts are published, and is the perfect solution for ensuring a consistent editorial calendar. Configure the days and times when posts should be published, and new posts will be automatically scheduled for the next available time slot.

Features

  • Automatically schedule posts based on simple day and time rules
  • Works with posts, pages, and custom post types; each post type fills its own time slots
  • Shows the next open time in the block editor, and confirms the slot a post was given
  • Ability to override scheduled date for Admins and Editors
  • ‘Publish Now’ actions for Admins and Editors, in the post list, both editors, and Presswell Site Structure’s page tree

Documentation

Filters

  • pwps_manage_caps – Filter the capability list used to determine who can use schedule override and “Publish now” actions.
  • pwps_schedule – Filter the weekly schedule used to find slots: an array keyed by day of the week (0 for Sunday to 6 for Saturday), each holding a list of 24-hour times such as 14:30. A value that isn’t an array is ignored.
  • pwps_filter_settings – Filter settings from the settings page before they are saved. A value that isn’t an array is ignored, and the unfiltered settings are saved.
  • pwps_next_slot – Change the slot a post is given: receives the next open slot (Y-m-d H:i:s in the site’s timezone, or empty when none is open), the post type, and the post ID (0 for the next open time shown in the editor). Return a future date and time, or an empty string for no slot, which is handled as when every slot is taken; other values are ignored.
  • pwps_slot_lock_wait – Seconds a publish waits for another in-progress publish before choosing a slot (default 5).
  • pwps_debug_log_filename – Filename of the private debug log.
  • pwps_debug_log_max_bytes – Size at which the debug log rotates (default 5 MB).
  • pwps_status_rows – Add or change rows in the Debug tab’s status table. Each row is an array with label, value, and status (ok, warning, or empty); rows without a string label and value are skipped.
  • pwps_should_schedule – Return true to schedule posts published by other sources. By default only posts published by a person in wp-admin (the block and classic editors, Quick Edit and Bulk Edit) are scheduled; imports, WP-CLI, REST clients using application passwords, and other plugins keep the date they set.

Actions

  • pwps_settings_before_fields – Fires before the fields on the Settings tab, inside its form table; output table rows.
  • pwps_settings_after_fields – Fires after the fields on the Settings tab, inside its form table; output table rows.
  • pwps_post_scheduled – Fires after a post is given a slot, once it’s saved with its date. Receives the post ID, the slot (Y-m-d H:i:s in the site’s timezone), and the post type.
  • pwps_published_now – Fires after “Publish now” publishes a post. Receives the post ID.
  • pwps_missed_published – Fires after the Missed Schedules check publishes overdue posts, once per check. Receives an array of post IDs.

Functions

  • pwps_get_next_slot( $post_type ) – The next open slot for a scheduled post type (Y-m-d H:i:s in the site’s timezone), or an empty string. Looking it up doesn’t reserve it.
  • pwps_get_schedule() – The weekly schedule the plugin uses, after the pwps_schedule filter.

    pwps_manage_caps receives an array of capabilities. Access is granted when the current user has at least one capability in the array.

Example:

add_filter( 'pwps_manage_caps', function( $caps ) {
  $caps[] = 'manage_publication_schedule';
  return array_unique( $caps );
} );

Installation

Install via the WordPress plugin installer, or manually upload the plugin directory to wp-content/plugins/.

Configuration

  1. Activate the plugin.
  2. Navigate to Settings -> Publication Schedule.
  3. Choose the post types to schedule.
  4. Configure the active days and times for publication. Times use the site’s timezone, set in Settings -> General.

FAQ

Why do I need to schedule my posts?

You may want to avoid having new content publish during times of low user engagement, such as overnight or weekends. The plugin will ensure your editorial calendar is consistent and predictable.

How are publish dates and times determined?

When someone publishes a post in wp-admin, the plugin checks all previously scheduled posts against the publication schedule and sets the post’s publish date to the next available time slot. Posts that are already published, private posts, and posts created by imports or other plugins are not changed.

Each post type has its own slots, so a post and a page can both be scheduled for the same time.

What happens when every slot is taken, or no times are enabled?

The post is published immediately rather than held back (or, if the save already gave it a future date, keeps that date), and the person who saved it sees a notice explaining what happened.

Can I set a specific publish date and time?

Yes. Admins and Editors can use “Publish now” to publish a post immediately, or choose their own date: in the block editor by changing the publish date, and in the classic editor and Quick Edit with the “Override Publication Schedule” checkbox. When Authors publish, the post always takes the next open slot, even if they picked a date.

Who counts as an Editor here can be changed with the pwps_manage_caps filter.

What happens to a time slot if I manually publish (or override) a scheduled post?

The time slot that the post was originally scheduled for is freed and becomes available for the next new post. Posts already scheduled will not be modified.

Why did a scheduled post miss its time?

WordPress publishes scheduled posts with WP-Cron, which only runs when someone visits the site and the server can reach itself. With Missed Schedules on (the default), the plugin checks for overdue posts as people visit the site, at most every five minutes, and publishes up to ten posts that are more than a minute late each time. For exact timing on quiet sites, set up a server cron job for wp-cron.php.

The Debug tab under Settings -> Publication Schedule shows whether WP-Cron is running, scheduled posts that are overdue, the next scheduled post and whether WordPress has queued it, and the site timezone. It also lists the next open and taken times for each post type, and has the private debug log.

Does the plugin change anything when it’s deleted?

Scheduled posts keep their dates. Settings and the per-post schedule records are removed only when Remove Data is on; notices, locks, and debug logs are always removed.

Screenshots

Changelog

1.2.1

  • Now requires PHP 8.2 and WordPress 6.9.
  • Added public functions and developer hooks.
  • Fixed issue with available date slots.

1.2.0

  • Fixed various performance and security issues.
  • Added debug functionality and improved logging.

1.1.0

  • Refactored with block editor support.

1.0.2

  • Admin settings link and style tweaks.

1.0.1

  • UI bug fixes.

1.0.0

  • First public release.