[wp-trac] [WordPress Trac] #46044: Add `wp_get_update_php_annotation()` to return the Update PHP annotation
WordPress Trac
noreply at wordpress.org
Mon Mar 18 19:03:57 UTC 2019
#46044: Add `wp_get_update_php_annotation()` to return the Update PHP annotation
-----------------------------------------------+---------------------
Reporter: afragen | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 5.2
Component: Plugins | Version: 5.1
Severity: normal | Resolution:
Keywords: has-patch servehappy dev-feedback | Focuses:
-----------------------------------------------+---------------------
Comment (by desrosj):
Was there a specific reason for choosing to pass the `$before` and
`$after` variables to `wp_get_update_php_annotation()`? I don't hate it,
but I don't love it.
Instead, I'd prefer to only pass and handle the markup in
`wp_update_php_annotation()` to keep retrieving the annotation and
displaying the annotation separate.
I see the patch on #46269. With my suggested change, the line in `wp-admin
/update-core.php` would go from
{{{
$compat .= wp_get_update_php_annotation( '<br><span class="description">',
'</span>' );
}}}
to
{{{
$compat .= '<br><span class="description">' .
wp_get_update_php_annotation() . '</span>';
}}}
[attachment:"46044.7.diff"] contains that change and a few others:
- Added the missing `@since` tag detailing the added parameters for
`wp_update_php_annotation()`.
- As a tie-breaker vote, I prefer for `wp_get_update_php_annotation()` to
return an empty string. :)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/46044#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list