humanmade / humanmade/repeatable-posts
Suggestion: Add unpublish option
- Langage dominant
- PHP
- Étoiles
- 48
- Forks
- 12
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
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.
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
Commencez par examiner l’interface d’administration, la gestion des métadonnées des articles et le flux des événements planifiés autour de wp_schedule_event. Vérifiez comment sont gérées les actions de suppression et de restauration des articles, et prenez en compte la relation avec l’issue #5. Le travail sera considéré comme terminé lorsqu’une conception approuvée prendra en charge la dépublication unique et répétable sans laisser d’événements planifiés obsolètes.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- php, wordpress
- Domaine
- backend
- Type d'issue
- Fonctionnalité
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100