diff --git src/wp-includes/meta.php src/wp-includes/meta.php
index 0942a5a0db..64a4b5ea90 100644
|
|
function is_protected_meta( $meta_key, $meta_type = null ) { |
1051 | 1051 | * |
1052 | 1052 | * @param string $meta_key Meta key. |
1053 | 1053 | * @param mixed $meta_value Meta value to sanitize. |
1054 | | * @param string $object_type Type of object the meta is registered to. |
| 1054 | * @param string $object_type Type of object this meta is registered to. Accepts any value with an associated meta table. |
| 1055 | * (e.g. comment, post, term, user, my_custom_meta) |
1055 | 1056 | * @param string $object_subtype Optional. The subtype of the object type. |
1056 | 1057 | * |
1057 | 1058 | * @return mixed Sanitized $meta_value. |
… |
… |
function sanitize_meta( $meta_key, $meta_value, $object_type, $object_subtype = |
1070 | 1071 | * |
1071 | 1072 | * @param mixed $meta_value Meta value to sanitize. |
1072 | 1073 | * @param string $meta_key Meta key. |
1073 | | * @param string $object_type Object type. |
| 1074 | * @param string $object_type Type of object this meta is registered to. Accepts any value with an associated meta table. |
| 1075 | * (e.g. comment, post, term, user, my_custom_meta) |
1074 | 1076 | * @param string $object_subtype Object subtype. |
1075 | 1077 | */ |
1076 | 1078 | return apply_filters( "sanitize_{$object_type}_meta_{$meta_key}_for_{$object_subtype}", $meta_value, $meta_key, $object_type, $object_subtype ); |
… |
… |
function sanitize_meta( $meta_key, $meta_value, $object_type, $object_subtype = |
1087 | 1089 | * |
1088 | 1090 | * @param mixed $meta_value Meta value to sanitize. |
1089 | 1091 | * @param string $meta_key Meta key. |
1090 | | * @param string $object_type Object type. |
| 1092 | * @param string $object_type Type of object this meta is registered to. Accepts any value with an associated meta table. |
| 1093 | * (e.g. comment, post, term, user, my_custom_meta) |
1091 | 1094 | */ |
1092 | 1095 | return apply_filters( "sanitize_{$object_type}_meta_{$meta_key}", $meta_value, $meta_key, $object_type ); |
1093 | 1096 | } |
… |
… |
function sanitize_meta( $meta_key, $meta_value, $object_type, $object_subtype = |
1108 | 1111 | * `$sanitize_callback` and `$auth_callback` have been folded into this array. |
1109 | 1112 | * @since 4.9.8 The `$object_subtype` argument was added to the arguments array. |
1110 | 1113 | * |
1111 | | * @param string $object_type Type of object this meta is registered to. |
| 1114 | * @param string $object_type Type of object this meta is registered to. Accepts any value with an associated meta table. |
| 1115 | * (e.g. comment, post, term, user, my_custom_meta) |
1112 | 1116 | * @param string $meta_key Meta key to register. |
1113 | 1117 | * @param array $args { |
1114 | 1118 | * Data used to describe the meta key when registered. |
… |
… |
function register_meta( $object_type, $meta_key, $args, $deprecated = null ) { |
1172 | 1176 | * |
1173 | 1177 | * @param array $args Array of meta registration arguments. |
1174 | 1178 | * @param array $defaults Array of default arguments. |
1175 | | * @param string $object_type Object type. |
| 1179 | * @param string $object_type Type of object this meta is registered to. Accepts any value with an associated meta table. |
| 1180 | * (e.g. comment, post, term, user, my_custom_meta) |
1176 | 1181 | * @param string $meta_key Meta key. |
1177 | 1182 | */ |
1178 | 1183 | $args = apply_filters( 'register_meta_args', $args, $defaults, $object_type, $meta_key ); |
… |
… |
function register_meta( $object_type, $meta_key, $args, $deprecated = null ) { |
1224 | 1229 | * @since 4.6.0 |
1225 | 1230 | * @since 4.9.8 The `$object_subtype` parameter was added. |
1226 | 1231 | * |
1227 | | * @param string $object_type The type of object. |
| 1232 | * @param string $object_type Type of object this meta is registered to. Accepts any value with an associated meta table. |
| 1233 | * (e.g. comment, post, term, user, my_custom_meta) |
1228 | 1234 | * @param string $meta_key The meta key. |
1229 | 1235 | * @param string $object_subtype Optional. The subtype of the object type. |
1230 | 1236 | * |
… |
… |
function registered_meta_key_exists( $object_type, $meta_key, $object_subtype = |
1243 | 1249 | * @since 4.6.0 |
1244 | 1250 | * @since 4.9.8 The `$object_subtype` parameter was added. |
1245 | 1251 | * |
1246 | | * @param string $object_type The type of object. |
| 1252 | * @param string $object_type Type of object this meta is registered to. Accepts any value with an associated meta table. |
| 1253 | * (e.g. comment, post, term, user, my_custom_meta) |
1247 | 1254 | * @param string $meta_key The meta key. |
1248 | 1255 | * @param string $object_subtype Optional. The subtype of the object type. |
1249 | 1256 | * @return bool True if successful. False if the meta key was not registered. |
… |
… |
function unregister_meta_key( $object_type, $meta_key, $object_subtype = '' ) { |
1292 | 1299 | * @since 4.6.0 |
1293 | 1300 | * @since 4.9.8 The `$object_subtype` parameter was added. |
1294 | 1301 | * |
1295 | | * @param string $object_type The type of object. Post, comment, user, term. |
| 1302 | * @param string $object_type Type of object this meta is registered to. Accepts any value with an associated meta table. |
| 1303 | * (e.g. comment, post, term, user, my_custom_meta) |
1296 | 1304 | * @param string $object_subtype Optional. The subtype of the object type. |
1297 | 1305 | * @return array List of registered meta keys. |
1298 | 1306 | */ |
… |
… |
function get_registered_meta_keys( $object_type, $object_subtype = '' ) { |
1314 | 1322 | * |
1315 | 1323 | * @since 4.6.0 |
1316 | 1324 | * |
1317 | | * @param string $object_type Type of object to request metadata for. (e.g. comment, post, term, user) |
| 1325 | * @param string $object_type Type of object this meta is registered to. Accepts any value with an associated meta table. |
| 1326 | * (e.g. comment, post, term, user, my_custom_meta) |
1318 | 1327 | * @param int $object_id ID of the object the metadata is for. |
1319 | 1328 | * @param string $meta_key Optional. Registered metadata key. If not specified, retrieve all registered |
1320 | 1329 | * metadata for the specified object. |
… |
… |
function _wp_register_meta_args_whitelist( $args, $default_args ) { |
1376 | 1385 | * |
1377 | 1386 | * @since 4.9.8 |
1378 | 1387 | * |
1379 | | * @param string $object_type Type of object to request metadata for. (e.g. comment, post, term, user) |
| 1388 | * @param string $object_type Type of object this meta is registered to. Accepts any value with an associated meta table. |
| 1389 | * (e.g. comment, post, term, user, my_custom_meta) |
1380 | 1390 | * @param int $object_id ID of the object to retrieve its subtype. |
1381 | 1391 | * @return string The object subtype or an empty string if unspecified subtype. |
1382 | 1392 | */ |