[wp-trac] [WordPress Trac] #47678: Modernize/simplify current_user_can()
WordPress Trac
noreply at wordpress.org
Mon Sep 16 14:33:01 UTC 2019
#47678: Modernize/simplify current_user_can()
-------------------------------------+-------------------------------------
Reporter: jrf | Owner: pento
Type: enhancement | Status: assigned
Priority: normal | Milestone: 5.3
Component: Role/Capability | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch has-unit- | Focuses: performance, coding-
tests commit needs-dev-note | standards
-------------------------------------+-------------------------------------
Comment (by SergeyBiryukov):
Replying to [comment:59 jrf]:
> I agree, though to be honest, this would indicate that the PHP version
check is done too late in the process flow, rather than that this patch is
invalid.
>
> All the same, let's leave that for later.
Right. We could potentially run `wp_check_php_mysql_versions()` earlier,
but `wp-includes/plugin.php` is also included in
`wp_load_translations_early()` before displaying the error message,
apparently for `do_action()` and `apply_filters()`.
I would be up for exploring ways to remove that dependency in a new
ticket. Since plugins cannot be loaded at that point, we could stub those
functions in a way similar to `wp-admin/includes/noop.php`, or just
display the message in English.
>
> Would you mind explaining why this should be moved to a new ticket ?
>
> I'd personally rather we keep it in this ticket as comments 23 up to 29
contain a detailed analysis of the impact, which would otherwise need to
be re-iterated completely in a new ticket.
>
> It has already been established that the changes made via this ticket
need a dev-note, as the function signature of a number of methods has
changed, `Walker:walk()` is just one of those methods and should IMO not
have special status just because the VIP platform overloads the method.
Fair enough :) Let's handle it here, comment:23 to comment:29 do indeed
provide valuable context.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/47678#comment:60>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list