[wp-trac] [WordPress Trac] #34617: Add filter for shiny updates
WordPress Trac
noreply at wordpress.org
Mon Nov 9 05:54:48 UTC 2015
#34617: Add filter for shiny updates
-----------------------------+------------------------------
Reporter: afragen | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Upgrade/Install | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch close | Focuses:
-----------------------------+------------------------------
Comment (by afragen):
Replying to [comment:17 dd32]:
> > An $upgrader_instance isn't passed to this filter.
>
> My proposal was to add it, however that can't be done until #27365 is
resolved.
>
> I still think your approach is wrong, I don't think there's really much
that we should do to support it. Another way could be to extend
`Plugin_Upgrader` and do it that way, but that'd also require you to jump
through hoops.
>
> `WP_Upgrader` really doesn't like packages that aren't in it's expected
format..
I'm not clear on what the expected format is.
I guess what I expected in my approach was to use a filter that passed
variables that allowed for an simpler renaming of the destination.
Unfortunately, it appears that the `upgrader_post_install` filter really
doesn't return anything. It returns an array or an error and it seems
whatever the array is doesn't matter as nothing is really done with it.
Maybe I should be asking for an `upgrader_modify_destination` filter that
fires just after the line
{{{
$this->result = compact( 'source', 'source_files', 'destination',
'destination_name', 'local_destination', 'remote_destination',
'clear_destination' );
}}}
something like
{{{
$this->result = apply_filters( 'upgrader_modify_destination',
$this->result, $args['extra_hook'] );
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34617#comment:18>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list