[wp-trac] [WordPress Trac] #53076: Press This: Add filters to allow custom Press This plugins
WordPress Trac
noreply at wordpress.org
Tue Mar 18 18:31:47 UTC 2025
#53076: Press This: Add filters to allow custom Press This plugins
-------------------------------------------------+-------------------------
Reporter: kraftbj | Owner: kraftbj
Type: enhancement | Status: accepted
Priority: normal | Milestone: Future
| Release
Component: Editor | Version: 4.9
Severity: normal | Resolution:
Keywords: has-patch has-testing-info changes- | Focuses:
requested |
-------------------------------------------------+-------------------------
Changes (by azaozz):
* keywords: has-patch has-testing-info changes-requested dev-feedback =>
has-patch has-testing-info changes-requested
Comment:
Replying to [comment:9 SirLouen]:
Hi @SirLouen thanks for the ping here. Frankly I'm not so sure if it is a
good idea to still use bookmarklets (i.e. elevated JS code in a browser
bookmark). They were pretty popular 10-15 years ago, but have some
security problems and generally the way browsers work has changed a lot
since then.
Nevertheless, looking at the PR maybe it can be much simpler? Seems all it
needs is to allow plugins to replace the `wp_load_press_this()` function?
That can easily be done by running that function on an action, for example
on `plugins_loaded`. Then any plugin will be able to remove the default
core callback and add its own.
So generally the code to achieve this would be to replace the loose
`wp_load_press_this()` with something like:
{{{
add_action( 'plugins_loaded', 'wp_load_press_this' );
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/53076#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list