[wp-trac] [WordPress Trac] #55942: Add a "value type" parameter to get_option() and get_metadata()

WordPress Trac noreply at wordpress.org
Fri Apr 28 03:52:30 UTC 2023


#55942: Add a "value type" parameter to get_option() and get_metadata()
-------------------------------------------------+-------------------------
 Reporter:  azaozz                               |       Owner:  (none)
     Type:  enhancement                          |      Status:  new
 Priority:  normal                               |   Milestone:  6.3
Component:  Options, Meta APIs                   |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests needs-      |     Focuses:
  testing                                        |  performance
-------------------------------------------------+-------------------------

Comment (by azaozz):

 Replying to [comment:45 spacedmonkey]:

 Ummm, did you revert the updated title and description incidentally?

 > I would strongly recommend using register_meta/register_setting here.

 Unfortunately both register_meta() and register_setting() are targeting
 only the REST API and aren't particularly useful outside of it. Both
 require a lot of data/code/settings that don't make sense in most cases.

 > Changing the database schema for...

 The database is not changed. Please see the updated title and description.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/55942#comment:47>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list