[wp-trac] [WordPress Trac] #53076: Press This: Add filters to allow custom Press This plugins
WordPress Trac
noreply at wordpress.org
Tue Mar 18 19:18:38 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 |
-------------------------------------------------+-------------------------
Comment (by SirLouen):
Replying to [comment:10 azaozz]:
> 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' );
> }}}
>
> (This idea is untested. Seems to be working at first look but there may
be something that is expected to run before `plugins_loaded`.)
The reality is that the plugin is almost abandoned but had a minor version
update 4 months ago.
https://github.com/WordPress/press-this/issues and one issue some months
ago
Not the most sexy plugin in 2025, not gonna lie :)
This said, I think that the original idea of @kraftbj was simply a copy-
paste of the initilization code as a filter. A simply posted a PR with the
adapted original code from him
If anyone wants to provide a new PR, I could try to test it. This
action/filter hook-based reports are pretty weird to test though (hence
most of the stalled reports with patches are mostly of this type)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/53076#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list