[wp-trac] [WordPress Trac] #32605: Add short-circuit filters to `*_metadata_by_mid()` functions
WordPress Trac
noreply at wordpress.org
Fri Jul 31 17:34:29 UTC 2015
#32605: Add short-circuit filters to `*_metadata_by_mid()` functions
-----------------------------------------+------------------------------
Reporter: dlh | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Options, Meta APIs | Version:
Severity: normal | Resolution:
Keywords: has-patch reporter-feedback | Focuses:
-----------------------------------------+------------------------------
Comment (by sc0ttkclark):
@Er_eri you'll want to just use `update_metadata_by_mid( 'post', absint(
$_POST['post_id'] ), 'my_meta_key', sanitize_text_field(
$_POST['my_meta_key'] ) );` instead here, it's already there for you to
use it.
https://core.trac.wordpress.org/browser/trunk/src/wp-
includes/meta.php#L596
You don't need new functions for `update_post_meta_by_mid` etc, this is
definitely an edge case.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/32605#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list