humanmade / humanmade/repeatable-posts
Suggestion: Add unpublish option
- 主要言語
- PHP
- スター
- 48
- フォーク
- 12
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
This may seem like a strange suggestion when reading only the title, but please hear me out :)
For a website i'm (heavily) working on, I have a lot of seasonal relevant posts. Preferably, I would like these posts to only appear when they are in season.
## An example for repeating + unpublishing
Let's say that we have a generic post about Christmas. The post should become visible every year in December (thus repeatable). Since the post isn't relevant the rest of the year it should be unpublished on the first of January (either change from 'published' to 'draft' or 'remove' altogether. Perhaps this implementation can possibly be combined with #5 ?).
I'm curious to hear what others think of this idea (interesting, useless?)
## How could this 'unpublishing' be achieved?
An idea for implementation is as follows:
1. option to set an _unpublish date_ from the admin interface
2. when saving the post, either save OR remove the _unpublish date_ from the post's meta info. Which of these actions is executed is dependent of user input.
3. when the meta info changes, set a [scheduled event](https://codex.wordpress.org/Function_Reference/wp_schedule_event) to unpublish the post, or remove an earlier set scheduled event (if any).
_Extra:
4. upon post delete / restore, trigger action nr. 3._
## ...and repeatable unpublishing?
For repeatable posts, one could hook into the scheduling of the next post, and correct the _unpublish date_ in the meta info with the repeat interval.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
まず、管理インターフェース、投稿メタデータの処理、および wp_schedule_event 周辺のスケジュール済みイベントのフローを確認します。投稿の削除と復元のアクションがどのように処理されているかを確認し、issue #5 との関係を検討します。合意された設計によって、古くなったスケジュール済みイベントを残さずに、1回限りの非公開化と繰り返し可能な非公開化の両方をサポートできれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- php, wordpress
- 領域
- backend
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100