[wp-trac] [WordPress Trac] #55799: Exclude PHP polyfill functions from code reference.

WordPress Trac noreply at wordpress.org
Tue May 24 07:36:33 UTC 2022

#55799: Exclude PHP polyfill functions from code reference.
 Reporter:  dd32         |      Owner:  (none)
     Type:  enhancement  |     Status:  new
 Priority:  low          |  Milestone:  Awaiting Review
Component:  General      |    Version:
 Severity:  minor        |   Keywords:  has-patch
  Focuses:  docs         |
 `wp-includes/compat.php` contains a number of PHP functions which may be
 'missing' from installations, due to either being introduced in a later
 PHP version or being dependant upon extensions.

 The following functions are `@ignore`'d which prevents them showing up on
  - `mb_substr()`
  - `mb_strlen()`
  - `hash_hmac()`
  - prefixed private variants of those functions

 The following functions have compat methods defined, but do not include
 `@ignore` and appear on the above page as a result:
  - `hash_equals()`
  - `is_countable()`
  - `is_iterable()`
  - `array_key_first()`
  - `array_key_last()`
  - `str_contains()`
  - `str_starts_with()`
  - `str_ends_with()`
  - `_()` (single underscore, used by some external libraries)

 Aside from the last one, `_()`, I don't see any reason for these to be
 included in the WordPress documentation reference.

 These functions were added in WordPress 3.9.2, 4.9.6, and 5.9.0.

Ticket URL: <https://core.trac.wordpress.org/ticket/55799>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list