Get in Touch

Edit Template

test3

Add Preview and Schedule actions to the frontend Add/Edit Article form.

Current form actions:
– Save Draft
– Publish

Goal:
Add two more article actions:
– Preview
– Schedule

Expected button layout:
At the bottom of the Add/Edit Article form show four actions:
1. Save Draft
2. Preview
3. Schedule
4. Publish

Behavior:

1. Save Draft
– Keep current behavior.
– Save the article as draft.
– Return to the form or dashboard using the existing flow.

2. Publish
– Keep current behavior.
– Publish the article immediately.

3. Preview
– If the article already exists:
– Save the latest form changes as draft if it is not published.
– If it is already published, save updates without changing published status.
– Open the article preview URL in a new browser tab.
– If this is a new unsaved article:
– First create it as a draft.
– Then open its preview URL in a new browser tab.
– Preview must not publish the article.
– Preview should include the latest title, content, featured image, category, SEO fields, and template-page rendering behavior.
– After preview, the user should remain in the editor.

4. Schedule
– Clicking Schedule should open a modal.
– Modal fields:
– Date
– Time
– Modal actions:
– Cancel
– Schedule Article
– When scheduled:
– Save the article with WordPress post status `future`.
– Save the selected date/time as the publish date.
– Use the site’s WordPress timezone, not the visitor browser timezone.
– If the selected date/time is in the past, show an inline error and do not schedule.
– After successful scheduling:
– Show a success message.
– Return to the dashboard or keep the existing success flow.
– The article should appear as Scheduled in the dashboard table and stats.

Dashboard/table behavior:
– Scheduled articles should show status “Scheduled”.
– Scheduled articles should appear when the Scheduled filter is selected.
– Actions for scheduled articles should include Edit and Preview.
– Do not show Publish action for scheduled articles unless that already exists intentionally.

Security/ownership:
– Keep existing nonce, capability, and ownership checks.
– Client users can only preview/schedule/edit their own articles.

Important:
– Do not change the login flow, user roles, updater, template page display mode, shortcode behavior, admin settings, or TinyMCE setup.
– Do not reintroduce sidebar navigation.
– Bump plugin version to 0.3.6.

Your Business Potential with Our Proven Strategies

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.
Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Company

About Us

Contact Us

Products

Services

Blog

Features

Analytics

Engagement

Builder

Publisher

Help

Privacy Policy

Terms

Conditions

Product

Lorem ipsum dolor sit amet, consectetur adipiscing elit.
You have been successfully Subscribed! Ops! Something went wrong, please try again.
© 2023 Created with Royal Elementor Addons