[wp-trac] [WordPress Trac] #22746: The metadata_exists() function should return the correct value if the get_$meta_type_metadata filter returns a non null value

WordPress Trac noreply at wordpress.org
Tue Mar 4 13:23:50 UTC 2014


#22746: The metadata_exists() function should return the correct value if the
get_$meta_type_metadata filter returns a non null value
---------------------------------------------------+------------------
 Reporter:  xknown                                 |       Owner:
     Type:  defect (bug)                           |      Status:  new
 Priority:  normal                                 |   Milestone:  3.9
Component:  Options, Meta APIs                     |     Version:
 Severity:  normal                                 |  Resolution:
 Keywords:  has-patch needs-unit-tests needs-docs  |     Focuses:
---------------------------------------------------+------------------
Changes (by DrewAPicture):

 * keywords:  has-patch commit needs-unit-tests => has-patch needs-unit-
     tests needs-docs


Comment:

 Replying to [comment:4 SergeyBiryukov]:
 > > Cast to bool to match the metadata_exists() documentation.
 >
 > I think the documentation should be changed to `@return mixed` instead,
 which would be consistent with `term_exists()`: [source:tags/3.8.1/src/wp-
 includes/taxonomy.php#L1561].

 +1 for using `mixed`, as long as you spell out the various return types
 and conditions.

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


More information about the wp-trac mailing list