Opened 9 years ago
Closed 8 years ago
#33219 closed enhancement (maybelater)
Press This: Allow custom metadata?
Reported by: | kraftbj | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.2 |
Component: | Press This | Keywords: | has-patch |
Focuses: | Cc: |
Description
Currently, PT is not allowing custom meta boxes within the PT Editor. What about a hook to allow custom metadata saved?
The use case is a plugin that allows the user to add an external link via /wp-admin/ to direct folks who click through to the post permalink (Page Links To, various SEO plugins, etc).
Such a plugin could add to a non-existent PT hook to automatically fill in that bit of metadata with the source URL.
Originally requested in https://github.com/kraftbj/press-this-extended/issues/22
Attachments (1)
Change History (4)
#2
follow-up:
↓ 3
@
8 years ago
Sounds good but feeling a bit uneasy about it. Adding a new hook right next to an existing hook seems a bit too much? I know the press_this_save_redirect
filter wasn't meant for this but can also be used as an "action".
#3
in reply to:
↑ 2
@
8 years ago
- Milestone Awaiting Review deleted
- Resolution set to maybelater
- Status changed from new to closed
Replying to azaozz:
Sounds good but feeling a bit uneasy about it. Adding a new hook right next to an existing hook seems a bit too much? I know the
press_this_save_redirect
filter wasn't meant for this but can also be used as an "action".
My hesitation is if press_this_save_redirect
changes over time to make the two uses incompatible. I'm biased toward monofunctional hooks and can get away with myself a bit. :)
I'll maybelater
this.
Idea: Add an action hook after everything has been saved before the redirect, passing the
$post
array. A plugin could use that data to fire any custom meta data they'd like based on whatever criteria.