[wp-trac] [WordPress Trac] #45319: get_theme_mod() declaration of return type
WordPress Trac
noreply at wordpress.org
Fri Nov 9 16:14:25 UTC 2018
#45319: get_theme_mod() declaration of return type
--------------------------+-----------------------------
Reporter: mensmaximus | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 4.9.8
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
As of WP 4.9.8 `get_theme_mod()` declares `@return string`. If you query
for navigation menu locations using `get_theme_mod('nav_menu_locations')`
you get back an array. Modern IDEs (like PhpStorm) complain if you start
to modify this array because they expect a string. The return value should
be changed to `mixed`.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/45319>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list