Changeset 60264
- Timestamp:
- 05/29/2025 11:07:35 PM (7 months ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 6 edited
-
comment.php (modified) (3 diffs)
-
meta.php (modified) (51 diffs)
-
ms-site.php (modified) (3 diffs)
-
post.php (modified) (3 diffs)
-
taxonomy.php (modified) (3 diffs)
-
user.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/comment.php
r60235 r60264 447 447 * Adds meta data field to a comment. 448 448 * 449 * For historical reasons both the meta key and the meta value are expected to be "slashed" (slashes escaped) on input. 450 * 449 451 * @since 2.9.0 450 452 * … … 474 476 * value, will keep from removing duplicate metadata with the same key. It also 475 477 * allows removing all metadata matching key, if needed. 478 * 479 * For historical reasons both the meta key and the meta value are expected to be "slashed" (slashes escaped) on input. 476 480 * 477 481 * @since 2.9.0 … … 540 544 * 541 545 * If the meta field for the comment does not exist, it will be added. 546 * 547 * For historical reasons both the meta key and the meta value are expected to be "slashed" (slashes escaped) on input. 542 548 * 543 549 * @since 2.9.0 -
trunk/src/wp-includes/meta.php
r59862 r60264 16 16 * Adds metadata for the specified object. 17 17 * 18 * For historical reasons both the meta key and the meta value are expected to be "slashed" (slashes escaped) on input. 19 * 18 20 * @since 2.9.0 19 21 * 20 22 * @global wpdb $wpdb WordPress database abstraction object. 21 23 * 22 * @param string $meta_type Type of object metadata is for. Accepts ' post', 'comment', 'term', 'user',23 * or any other object type with an associated meta table.24 * @param string $meta_type Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term', 25 * 'user', or any other object type with an associated meta table. 24 26 * @param int $object_id ID of the object metadata is for. 25 27 * @param string $meta_key Metadata key. … … 66 68 * 67 69 * The dynamic portion of the hook name, `$meta_type`, refers to the meta object type 68 * ( post, comment, term, user, or any other type with an associated meta table).70 * (blog, post, comment, term, user, or any other type with an associated meta table). 69 71 * Returning a non-null value will effectively short-circuit the function. 70 72 * 71 73 * Possible hook names include: 72 74 * 75 * - `add_blog_metadata` 73 76 * - `add_post_metadata` 74 77 * - `add_comment_metadata` … … 78 81 * @since 3.1.0 79 82 * 80 * @param null|bool $check Whether to allow adding metadata for the given type. 81 * @param int $object_id ID of the object metadata is for. 82 * @param string $meta_key Metadata key. 83 * @param mixed $meta_value Metadata value. Must be serializable if non-scalar. 84 * @param bool $unique Whether the specified meta key should be unique for the object. 83 * @param null|int|false $check Whether to allow adding metadata for the given type. Return false or a meta ID 84 * to short-circuit the function. Return null to continue with the default behavior. 85 * @param int $object_id ID of the object metadata is for. 86 * @param string $meta_key Metadata key. 87 * @param mixed $meta_value Metadata value. Must be serializable if non-scalar. 88 * @param bool $unique Whether the specified meta key should be unique for the object. 85 89 */ 86 90 $check = apply_filters( "add_{$meta_type}_metadata", null, $object_id, $meta_key, $meta_value, $unique ); … … 106 110 * 107 111 * The dynamic portion of the hook name, `$meta_type`, refers to the meta object type 108 * ( post, comment, term, user, or any other type with an associated meta table).112 * (blog, post, comment, term, user, or any other type with an associated meta table). 109 113 * 110 114 * Possible hook names include: 111 115 * 116 * - `add_blog_meta` 112 117 * - `add_post_meta` 113 118 * - `add_comment_meta` … … 144 149 * 145 150 * The dynamic portion of the hook name, `$meta_type`, refers to the meta object type 146 * ( post, comment, term, user, or any other type with an associated meta table).151 * (blog, post, comment, term, user, or any other type with an associated meta table). 147 152 * 148 153 * Possible hook names include: 149 154 * 155 * - `added_blog_meta` 150 156 * - `added_post_meta` 151 157 * - `added_comment_meta` … … 169 175 * ID and metadata key, the metadata will be added. 170 176 * 177 * For historical reasons both the meta key and the meta value are expected to be "slashed" (slashes escaped) on input. 178 * 171 179 * @since 2.9.0 172 180 * 173 181 * @global wpdb $wpdb WordPress database abstraction object. 174 182 * 175 * @param string $meta_type Type of object metadata is for. Accepts ' post', 'comment', 'term', 'user',176 * or any other object type with an associated meta table.183 * @param string $meta_type Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term', 184 * 'user', or any other object type with an associated meta table. 177 185 * @param int $object_id ID of the object metadata is for. 178 186 * @param string $meta_key Metadata key. … … 219 227 * 220 228 * The dynamic portion of the hook name, `$meta_type`, refers to the meta object type 221 * ( post, comment, term, user, or any other type with an associated meta table).229 * (blog, post, comment, term, user, or any other type with an associated meta table). 222 230 * Returning a non-null value will effectively short-circuit the function. 223 231 * 224 232 * Possible hook names include: 225 233 * 234 * - `update_blog_metadata` 226 235 * - `update_post_metadata` 227 236 * - `update_comment_metadata` … … 278 287 * 279 288 * The dynamic portion of the hook name, `$meta_type`, refers to the meta object type 280 * ( post, comment, term, user, or any other type with an associated meta table).289 * (blog, post, comment, term, user, or any other type with an associated meta table). 281 290 * 282 291 * Possible hook names include: 283 292 * 293 * - `update_blog_meta` 284 294 * - `update_post_meta` 285 295 * - `update_comment_meta` … … 324 334 * 325 335 * The dynamic portion of the hook name, `$meta_type`, refers to the meta object type 326 * ( post, comment, term, user, or any other type with an associated meta table).336 * (blog, post, comment, term, user, or any other type with an associated meta table). 327 337 * 328 338 * Possible hook names include: 329 339 * 340 * - `updated_blog_meta` 330 341 * - `updated_post_meta` 331 342 * - `updated_comment_meta` … … 364 375 * Deletes metadata for the specified object. 365 376 * 377 * For historical reasons both the meta key and the meta value are expected to be "slashed" (slashes escaped) on input. 378 * 366 379 * @since 2.9.0 367 380 * 368 381 * @global wpdb $wpdb WordPress database abstraction object. 369 382 * 370 * @param string $meta_type Type of object metadata is for. Accepts ' post', 'comment', 'term', 'user',371 * or any other object type with an associated meta table.383 * @param string $meta_type Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term', 384 * 'user', or any other object type with an associated meta table. 372 385 * @param int $object_id ID of the object metadata is for. 373 386 * @param string $meta_key Metadata key. … … 412 425 * 413 426 * The dynamic portion of the hook name, `$meta_type`, refers to the meta object type 414 * ( post, comment, term, user, or any other type with an associated meta table).427 * (blog, post, comment, term, user, or any other type with an associated meta table). 415 428 * Returning a non-null value will effectively short-circuit the function. 416 429 * 417 430 * Possible hook names include: 418 431 * 432 * - `delete_blog_metadata` 419 433 * - `delete_post_metadata` 420 434 * - `delete_comment_metadata` … … 467 481 * 468 482 * The dynamic portion of the hook name, `$meta_type`, refers to the meta object type 469 * ( post, comment, term, user, or any other type with an associated meta table).483 * (blog, post, comment, term, user, or any other type with an associated meta table). 470 484 * 471 485 * Possible hook names include: 472 486 * 487 * - `delete_blog_meta` 473 488 * - `delete_post_meta` 474 489 * - `delete_comment_meta` … … 516 531 * 517 532 * The dynamic portion of the hook name, `$meta_type`, refers to the meta object type 518 * ( post, comment, term, user, or any other type with an associated meta table).533 * (blog, post, comment, term, user, or any other type with an associated meta table). 519 534 * 520 535 * Possible hook names include: 521 536 * 537 * - `deleted_blog_meta` 522 538 * - `deleted_post_meta` 523 539 * - `deleted_comment_meta` … … 564 580 * @see get_metadata_default() 565 581 * 566 * @param string $meta_type Type of object metadata is for. Accepts ' post', 'comment', 'term', 'user',567 * or any other object type with an associated meta table.582 * @param string $meta_type Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term', 583 * 'user', or any other object type with an associated meta table. 568 584 * @param int $object_id ID of the object metadata is for. 569 585 * @param string $meta_key Optional. Metadata key. If not specified, retrieve all metadata for … … 597 613 * @since 5.5.0 598 614 * 599 * @param string $meta_type Type of object metadata is for. Accepts ' post', 'comment', 'term', 'user',600 * or any other object type with an associated meta table.615 * @param string $meta_type Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term', 616 * 'user', or any other object type with an associated meta table. 601 617 * @param int $object_id ID of the object metadata is for. 602 618 * @param string $meta_key Optional. Metadata key. If not specified, retrieve all metadata for … … 624 640 * 625 641 * The dynamic portion of the hook name, `$meta_type`, refers to the meta object type 626 * ( post, comment, term, user, or any other type with an associated meta table).642 * (blog, post, comment, term, user, or any other type with an associated meta table). 627 643 * Returning a non-null value will effectively short-circuit the function. 628 644 * 629 645 * Possible filter names include: 630 646 * 647 * - `get_blog_metadata` 631 648 * - `get_post_metadata` 632 649 * - `get_comment_metadata` … … 642 659 * @param string $meta_key Metadata key. 643 660 * @param bool $single Whether to return only the first value of the specified `$meta_key`. 644 * @param string $meta_type Type of object metadata is for. Accepts ' post', 'comment', 'term', 'user',645 * or any other object type with an associated meta table.661 * @param string $meta_type Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term', 662 * 'user', or any other object type with an associated meta table. 646 663 */ 647 664 $check = apply_filters( "get_{$meta_type}_metadata", null, $object_id, $meta_key, $single, $meta_type ); … … 688 705 * @since 5.5.0 689 706 * 690 * @param string $meta_type Type of object metadata is for. Accepts ' post', 'comment', 'term', 'user',691 * or any other object type with an associated meta table.707 * @param string $meta_type Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term', 708 * 'user', or any other object type with an associated meta table. 692 709 * @param int $object_id ID of the object metadata is for. 693 710 * @param string $meta_key Metadata key. … … 708 725 * 709 726 * The dynamic portion of the hook name, `$meta_type`, refers to the meta object type 710 * ( post, comment, term, user, or any other type with an associated meta table).727 * (blog, post, comment, term, user, or any other type with an associated meta table). 711 728 * 712 729 * Possible filter names include: 713 730 * 731 * - `default_blog_metadata` 714 732 * - `default_post_metadata` 715 733 * - `default_comment_metadata` … … 724 742 * @param string $meta_key Metadata key. 725 743 * @param bool $single Whether to return only the first value of the specified `$meta_key`. 726 * @param string $meta_type Type of object metadata is for. Accepts ' post', 'comment', 'term', 'user',727 * or any other object type with an associated meta table.744 * @param string $meta_type Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term', 745 * 'user', or any other object type with an associated meta table. 728 746 */ 729 747 $value = apply_filters( "default_{$meta_type}_metadata", $value, $object_id, $meta_key, $single, $meta_type ); … … 741 759 * @since 3.3.0 742 760 * 743 * @param string $meta_type Type of object metadata is for. Accepts ' post', 'comment', 'term', 'user',744 * or any other object type with an associated meta table.761 * @param string $meta_type Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term', 762 * 'user', or any other object type with an associated meta table. 745 763 * @param int $object_id ID of the object metadata is for. 746 764 * @param string $meta_key Metadata key. … … 784 802 * @global wpdb $wpdb WordPress database abstraction object. 785 803 * 786 * @param string $meta_type Type of object metadata is for. Accepts ' post', 'comment', 'term', 'user',787 * or any other object type with an associated meta table.804 * @param string $meta_type Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term', 805 * 'user', or any other object type with an associated meta table. 788 806 * @param int $meta_id ID for a specific meta row. 789 807 * @return stdClass|false { … … 794 812 * @type string $meta_id Optional. The meta ID when the meta type is any value except 'user'. 795 813 * @type string $umeta_id Optional. The meta ID when the meta type is 'user'. 814 * @type string $blog_id Optional. The object ID when the meta type is 'blog'. 796 815 * @type string $post_id Optional. The object ID when the meta type is 'post'. 797 816 * @type string $comment_id Optional. The object ID when the meta type is 'comment'. … … 821 840 * 822 841 * The dynamic portion of the hook name, `$meta_type`, refers to the meta object type 823 * ( post, comment, term, user, or any other type with an associated meta table).842 * (blog, post, comment, term, user, or any other type with an associated meta table). 824 843 * Returning a non-null value will effectively short-circuit the function. 825 844 * 826 845 * Possible hook names include: 827 846 * 847 * - `get_blog_metadata_by_mid` 828 848 * - `get_post_metadata_by_mid` 829 849 * - `get_comment_metadata_by_mid` … … 863 883 * @global wpdb $wpdb WordPress database abstraction object. 864 884 * 865 * @param string $meta_type Type of object metadata is for. Accepts ' post', 'comment', 'term', 'user',866 * or any other object type with an associated meta table.885 * @param string $meta_type Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term', 886 * 'user', or any other object type with an associated meta table. 867 887 * @param int $meta_id ID for a specific meta row. 868 888 * @param string $meta_value Metadata value. Must be serializable if non-scalar. … … 895 915 * 896 916 * The dynamic portion of the hook name, `$meta_type`, refers to the meta object type 897 * ( post, comment, term, user, or any other type with an associated meta table).917 * (blog, post, comment, term, user, or any other type with an associated meta table). 898 918 * Returning a non-null value will effectively short-circuit the function. 899 919 * 900 920 * Possible hook names include: 901 921 * 922 * - `update_blog_metadata_by_mid` 902 923 * - `update_post_metadata_by_mid` 903 924 * - `update_comment_metadata_by_mid` … … 989 1010 * @global wpdb $wpdb WordPress database abstraction object. 990 1011 * 991 * @param string $meta_type Type of object metadata is for. Accepts ' post', 'comment', 'term', 'user',992 * or any other object type with an associated meta table.1012 * @param string $meta_type Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term', 1013 * 'user', or any other object type with an associated meta table. 993 1014 * @param int $meta_id ID for a specific meta row. 994 1015 * @return bool True on successful delete, false on failure. … … 1020 1041 * 1021 1042 * The dynamic portion of the hook name, `$meta_type`, refers to the meta object type 1022 * ( post, comment, term, user, or any other type with an associated meta table).1043 * (blog, post, comment, term, user, or any other type with an associated meta table). 1023 1044 * Returning a non-null value will effectively short-circuit the function. 1024 1045 * 1025 1046 * Possible hook names include: 1026 1047 * 1048 * - `delete_blog_metadata_by_mid` 1027 1049 * - `delete_post_metadata_by_mid` 1028 1050 * - `delete_comment_metadata_by_mid` … … 1060 1082 * - `delete_postmeta` 1061 1083 * - `delete_commentmeta` 1062 * - `delete_termmeta`1063 * - `delete_usermeta`1064 1084 * 1065 1085 * @since 3.4.0 … … 1091 1111 * - `deleted_postmeta` 1092 1112 * - `deleted_commentmeta` 1093 * - `deleted_termmeta`1094 * - `deleted_usermeta`1095 1113 * 1096 1114 * @since 3.4.0 … … 1116 1134 * @global wpdb $wpdb WordPress database abstraction object. 1117 1135 * 1118 * @param string $meta_type Type of object metadata is for. Accepts ' post', 'comment', 'term', 'user',1119 * or any other object type with an associated meta table.1136 * @param string $meta_type Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term', 1137 * 'user', or any other object type with an associated meta table. 1120 1138 * @param string|int[] $object_ids Array or comma delimited list of object IDs to update cache for. 1121 1139 * @return array|false Metadata cache for the specified objects, or false on failure. … … 1146 1164 * 1147 1165 * The dynamic portion of the hook name, `$meta_type`, refers to the meta object type 1148 * ( post, comment, term, user, or any other type with an associated meta table).1166 * (blog, post, comment, term, user, or any other type with an associated meta table). 1149 1167 * Returning a non-null value will effectively short-circuit the function. 1150 1168 * 1151 1169 * Possible hook names include: 1152 1170 * 1171 * - `update_blog_metadata_cache` 1153 1172 * - `update_post_metadata_cache` 1154 1173 * - `update_comment_metadata_cache` … … 1269 1288 * @global wpdb $wpdb WordPress database abstraction object. 1270 1289 * 1271 * @param string $type Type of object metadata is for. Accepts ' post', 'comment', 'term', 'user',1272 * or any other object type with an associated meta table.1290 * @param string $type Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term', 1291 * 'user', or any other object type with an associated meta table. 1273 1292 * @return string|false Metadata table name, or false if no metadata table exists 1274 1293 */ … … 1291 1310 * 1292 1311 * @param string $meta_key Metadata key. 1293 * @param string $meta_type Optional. Type of object metadata is for. Accepts ' post', 'comment', 'term', 'user',1294 * or any other object type with an associated meta table. Default empty string.1312 * @param string $meta_type Optional. Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term', 1313 * 'user', or any other object type with an associated meta table. Default empty string. 1295 1314 * @return bool Whether the meta key is considered protected. 1296 1315 */ … … 1306 1325 * @param bool $protected Whether the key is considered protected. 1307 1326 * @param string $meta_key Metadata key. 1308 * @param string $meta_type Type of object metadata is for. Accepts ' post', 'comment', 'term', 'user',1309 * or any other object type with an associated meta table.1327 * @param string $meta_type Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term', 1328 * 'user', or any other object type with an associated meta table. 1310 1329 */ 1311 1330 return apply_filters( 'is_protected_meta', $protected, $meta_key, $meta_type ); … … 1320 1339 * @param string $meta_key Metadata key. 1321 1340 * @param mixed $meta_value Metadata value to sanitize. 1322 * @param string $object_type Type of object metadata is for. Accepts ' post', 'comment', 'term', 'user',1323 * or any other object type with an associated meta table.1341 * @param string $object_type Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term', 1342 * 'user', or any other object type with an associated meta table. 1324 1343 * @param string $object_subtype Optional. The subtype of the object type. Default empty string. 1325 1344 * @return mixed Sanitized $meta_value. … … 1332 1351 * 1333 1352 * The dynamic portions of the hook name, `$object_type`, `$meta_key`, 1334 * and `$object_subtype`, refer to the metadata object type ( comment, post, term, or user),1353 * and `$object_subtype`, refer to the metadata object type (blog, comment, post, term, or user), 1335 1354 * the meta key value, and the object subtype respectively. 1336 1355 * … … 1339 1358 * @param mixed $meta_value Metadata value to sanitize. 1340 1359 * @param string $meta_key Metadata key. 1341 * @param string $object_type Type of object metadata is for. Accepts ' post', 'comment', 'term', 'user',1342 * or any other object type with an associated meta table.1360 * @param string $object_type Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term', 1361 * 'user', or any other object type with an associated meta table. 1343 1362 * @param string $object_subtype Object subtype. 1344 1363 */ … … 1350 1369 * 1351 1370 * The dynamic portions of the hook name, `$meta_type`, and `$meta_key`, 1352 * refer to the metadata object type ( comment, post, term, or user) and the meta1371 * refer to the metadata object type (blog, comment, post, term, or user) and the meta 1353 1372 * key value, respectively. 1354 1373 * … … 1357 1376 * @param mixed $meta_value Metadata value to sanitize. 1358 1377 * @param string $meta_key Metadata key. 1359 * @param string $object_type Type of object metadata is for. Accepts ' post', 'comment', 'term', 'user',1360 * or any other object type with an associated meta table.1378 * @param string $object_type Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term', 1379 * 'user', or any other object type with an associated meta table. 1361 1380 */ 1362 1381 return apply_filters( "sanitize_{$object_type}_meta_{$meta_key}", $meta_value, $meta_key, $object_type ); … … 1370 1389 * overridden in case a more specific meta key of the same name exists for the same object type and a subtype. 1371 1390 * 1372 * If an object type does not support any subtypes, such as usersor comments, you should commonly call this function1391 * If an object type does not support any subtypes, such as blogs, users, or comments, you should commonly call this function 1373 1392 * without passing a subtype. 1374 1393 * … … 1383 1402 * @since 6.7.0 The `label` argument was added to the arguments array. 1384 1403 * 1385 * @param string $object_type Type of object metadata is for. Accepts ' post', 'comment', 'term', 'user',1386 * or any other object type with an associated meta table.1404 * @param string $object_type Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term', 1405 * 'user', or any other object type with an associated meta table. 1387 1406 * @param string $meta_key Meta key to register. 1388 1407 * @param array $args { … … 1462 1481 * @param array $args Array of meta registration arguments. 1463 1482 * @param array $defaults Array of default arguments. 1464 * @param string $object_type Type of object metadata is for. Accepts ' post', 'comment', 'term', 'user',1465 * or any other object type with an associated meta table.1483 * @param string $object_type Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term', 1484 * 'user', or any other object type with an associated meta table. 1466 1485 * @param string $meta_key Meta key. 1467 1486 */ … … 1558 1577 * @param bool $single If true, return only the first value of the specified `$meta_key`. 1559 1578 * This parameter has no effect if `$meta_key` is not specified. 1560 * @param string $meta_type Type of object metadata is for. Accepts ' post', 'comment', 'term', 'user',1561 * or any other object type with an associated meta table.1579 * @param string $meta_type Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term', 1580 * 'user', or any other object type with an associated meta table. 1562 1581 * @return mixed An array of default values if `$single` is false. 1563 1582 * The default value of the meta field if `$single` is true. … … 1613 1632 * @since 4.9.8 The `$object_subtype` parameter was added. 1614 1633 * 1615 * @param string $object_type Type of object metadata is for. Accepts ' post', 'comment', 'term', 'user',1616 * or any other object type with an associated meta table.1634 * @param string $object_type Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term', 1635 * 'user', or any other object type with an associated meta table. 1617 1636 * @param string $meta_key Metadata key. 1618 1637 * @param string $object_subtype Optional. The subtype of the object type. Default empty string. … … 1632 1651 * @since 4.9.8 The `$object_subtype` parameter was added. 1633 1652 * 1634 * @param string $object_type Type of object metadata is for. Accepts ' post', 'comment', 'term', 'user',1635 * or any other object type with an associated meta table.1653 * @param string $object_type Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term', 1654 * 'user', or any other object type with an associated meta table. 1636 1655 * @param string $meta_key Metadata key. 1637 1656 * @param string $object_subtype Optional. The subtype of the object type. Default empty string. … … 1682 1701 * @since 4.9.8 The `$object_subtype` parameter was added. 1683 1702 * 1684 * @param string $object_type Type of object metadata is for. Accepts ' post', 'comment', 'term', 'user',1685 * or any other object type with an associated meta table.1703 * @param string $object_type Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term', 1704 * 'user', or any other object type with an associated meta table. 1686 1705 * @param string $object_subtype Optional. The subtype of the object type. Default empty string. 1687 1706 * @return array[] List of registered metadata args, keyed by their meta keys. … … 1705 1724 * @since 4.6.0 1706 1725 * 1707 * @param string $object_type Type of object metadata is for. Accepts ' post', 'comment', 'term', 'user',1708 * or any other object type with an associated meta table.1726 * @param string $object_type Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term', 1727 * 'user', or any other object type with an associated meta table. 1709 1728 * @param int $object_id ID of the object the metadata is for. 1710 1729 * @param string $meta_key Optional. Registered metadata key. If not specified, retrieve all registered … … 1768 1787 * @since 4.9.8 1769 1788 * 1770 * @param string $object_type Type of object metadata is for. Accepts ' post', 'comment', 'term', 'user',1771 * or any other object type with an associated meta table.1789 * @param string $object_type Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term', 1790 * 'user', or any other object type with an associated meta table. 1772 1791 * @param int $object_id ID of the object to retrieve its subtype. 1773 1792 * @return string The object subtype or an empty string if unspecified subtype. … … 1815 1834 1816 1835 /** 1817 * Filters the object subtype identifier for a non-standard object type.1836 * Filters the object subtype identifier. 1818 1837 * 1819 1838 * The dynamic portion of the hook name, `$object_type`, refers to the meta object type 1820 * ( post, comment, term, user, or any other type with an associated meta table).1839 * (blog, post, comment, term, user, or any other type with an associated meta table). 1821 1840 * 1822 1841 * Possible hook names include: 1823 1842 * 1843 * - `get_object_subtype_blog` 1824 1844 * - `get_object_subtype_post` 1825 1845 * - `get_object_subtype_comment` … … 1829 1849 * @since 4.9.8 1830 1850 * 1831 * @param string $object_subtype Empty string to override.1851 * @param string $object_subtype Object subtype or empty string to override. 1832 1852 * @param int $object_id ID of the object to get the subtype for. 1833 1853 */ -
trunk/src/wp-includes/ms-site.php
r59657 r60264 1023 1023 * Adds metadata to a site. 1024 1024 * 1025 * For historical reasons both the meta key and the meta value are expected to be "slashed" (slashes escaped) on input. 1026 * 1025 1027 * @since 5.1.0 1026 1028 * … … 1048 1050 * value, will keep from removing duplicate metadata with the same key. It also 1049 1051 * allows removing all metadata matching key, if needed. 1052 * 1053 * For historical reasons both the meta key and the meta value are expected to be "slashed" (slashes escaped) on input. 1050 1054 * 1051 1055 * @since 5.1.0 … … 1091 1095 * Updates metadata for a site. 1092 1096 * 1093 * Use the $prev_valueparameter to differentiate between meta fields with the1097 * Use the `$prev_value` parameter to differentiate between meta fields with the 1094 1098 * same key and site ID. 1095 1099 * 1096 1100 * If the meta field for the site does not exist, it will be added. 1101 * 1102 * For historical reasons both the meta key and the meta value are expected to be "slashed" (slashes escaped) on input. 1097 1103 * 1098 1104 * @since 5.1.0 -
trunk/src/wp-includes/post.php
r60236 r60264 2609 2609 * Post meta data is called "Custom Fields" on the Administration Screen. 2610 2610 * 2611 * For historical reasons both the meta key and the meta value are expected to be "slashed" (slashes escaped) on input. 2612 * 2611 2613 * @since 1.5.0 2612 2614 * … … 2640 2642 * value, will keep from removing duplicate metadata with the same key. It also 2641 2643 * allows removing all metadata matching the key, if needed. 2644 * 2645 * For historical reasons both the meta key and the meta value are expected to be "slashed" (slashes escaped) on input. 2642 2646 * 2643 2647 * @since 1.5.0 … … 2695 2699 * 2696 2700 * Can be used in place of add_post_meta(). 2701 * 2702 * For historical reasons both the meta key and the meta value are expected to be "slashed" (slashes escaped) on input. 2697 2703 * 2698 2704 * @since 1.5.0 -
trunk/src/wp-includes/taxonomy.php
r60249 r60264 1383 1383 * Adds metadata to a term. 1384 1384 * 1385 * For historical reasons both the meta key and the meta value are expected to be "slashed" (slashes escaped) on input. 1386 * 1385 1387 * @since 4.4.0 1386 1388 * … … 1409 1411 /** 1410 1412 * Removes metadata matching criteria from a term. 1413 * 1414 * For historical reasons both the meta key and the meta value are expected to be "slashed" (slashes escaped) on input. 1411 1415 * 1412 1416 * @since 4.4.0 … … 1456 1460 * If the meta field for the term does not exist, it will be added. 1457 1461 * 1462 * For historical reasons both the meta key and the meta value are expected to be "slashed" (slashes escaped) on input. 1463 * 1458 1464 * @since 4.4.0 1459 1465 * -
trunk/src/wp-includes/user.php
r60240 r60264 1203 1203 * Adds meta data to a user. 1204 1204 * 1205 * For historical reasons both the meta key and the meta value are expected to be "slashed" (slashes escaped) on input. 1206 * 1205 1207 * @since 3.0.0 1206 1208 * … … 1228 1230 * value, will keep from removing duplicate metadata with the same key. It also 1229 1231 * allows removing all metadata matching key, if needed. 1232 * 1233 * For historical reasons both the meta key and the meta value are expected to be "slashed" (slashes escaped) on input. 1230 1234 * 1231 1235 * @since 3.0.0 … … 1279 1283 * 1280 1284 * If the meta field for the user does not exist, it will be added. 1285 * 1286 * For historical reasons both the meta key and the meta value are expected to be "slashed" (slashes escaped) on input. 1281 1287 * 1282 1288 * @since 3.0.0
Note: See TracChangeset
for help on using the changeset viewer.