Changeset 61649
- Timestamp:
- 02/15/2026 11:17:55 PM (3 weeks ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 9 edited
-
category-template.php (modified) (3 diffs)
-
comment-template.php (modified) (1 diff)
-
embed.php (modified) (2 diffs)
-
general-template.php (modified) (8 diffs)
-
link-template.php (modified) (1 diff)
-
ms-blogs.php (modified) (1 diff)
-
post-template.php (modified) (4 diffs)
-
post.php (modified) (1 diff)
-
widgets/class-wp-widget-media.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/category-template.php
r61454 r61649 1488 1488 * @param string|int|array $category Optional. The category name/term_id/slug, 1489 1489 * or an array of them to check for. Default empty. 1490 * @param int|WP_Post $post Optional. Post to check. Defaults to the current post.1490 * @param int|WP_Post|null $post Optional. Post to check. Defaults to the current post. 1491 1491 * @return bool True if the current post has any of the given categories 1492 1492 * (or any category, if no category specified). False otherwise. … … 1515 1515 * @param string|int|array $tag Optional. The tag name/term_id/slug, 1516 1516 * or an array of them to check for. Default empty. 1517 * @param int|WP_Post $post Optional. Post to check. Defaults to the current post.1517 * @param int|WP_Post|null $post Optional. Post to check. Defaults to the current post. 1518 1518 * @return bool True if the current post has any of the given tags 1519 1519 * (or any tag, if no tag specified). False otherwise. … … 1536 1536 * or an array of them to check for. Default empty. 1537 1537 * @param string $taxonomy Optional. Taxonomy name. Default empty. 1538 * @param int|WP_Post $post Optional. Post to check. Defaults to the current post.1538 * @param int|WP_Post|null $post Optional. Post to check. Defaults to the current post. 1539 1539 * @return bool True if the current post has any of the given terms 1540 1540 * (or any term, if no term specified). False otherwise. -
trunk/src/wp-includes/comment-template.php
r61034 r61649 2158 2158 * @access private 2159 2159 * 2160 * @param int|WP_Post $post The post the comment is being displayed for.2161 * Defaults to the current global post.2160 * @param int|WP_Post|null $post The post the comment is being displayed for. 2161 * Defaults to the current global post. 2162 2162 * @return int Comment's reply to ID. 2163 2163 */ -
trunk/src/wp-includes/embed.php
r61453 r61649 414 414 * @since 4.4.0 415 415 * 416 * @param int|WP_Post $post Optional. Post ID or object. Defaults to the current post.416 * @param int|WP_Post|null $post Optional. Post ID or object. Defaults to the current post. 417 417 * @return string|false The post embed URL on success, false if the post doesn't exist. 418 418 */ … … 483 483 * @since 4.4.0 484 484 * 485 * @param int $width The width for the response.486 * @param int $height The height for the response.487 * @param int|WP_Post $post Optional. Post ID or object. Default is global `$post`.485 * @param int $width The width for the response. 486 * @param int $height The height for the response. 487 * @param int|WP_Post|null $post Optional. Post ID or object. Default is global `$post`. 488 488 * @return string|false Embed code on success, false if post doesn't exist. 489 489 */ -
trunk/src/wp-includes/general-template.php
r61644 r61649 2717 2717 * @since 3.0.0 2718 2718 * 2719 * @param string $format Optional. PHP date format. Defaults to the 'date_format' option.2720 * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default current post.2719 * @param string $format Optional. PHP date format. Defaults to the 'date_format' option. 2720 * @param int|WP_Post|null $post Optional. Post ID or WP_Post object. Default current post. 2721 2721 * @return string|int|false Date the current post was written. False on failure. 2722 2722 */ … … 2783 2783 * @since 4.6.0 Added the `$post` parameter. 2784 2784 * 2785 * @param string $format Optional. PHP date format. Defaults to the 'date_format' option.2786 * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default current post.2785 * @param string $format Optional. PHP date format. Defaults to the 'date_format' option. 2786 * @param int|WP_Post|null $post Optional. Post ID or WP_Post object. Default current post. 2787 2787 * @return string|int|false Date the current post was modified. False on failure. 2788 2788 */ … … 2839 2839 * @since 1.5.0 2840 2840 * 2841 * @param string $format Optional. Format to use for retrieving the time the post2842 * was written. Accepts 'G', 'U', or PHP date format.2843 * Defaults to the 'time_format' option.2844 * @param int|WP_Post $post Post ID or post object. Default is global `$post` object.2841 * @param string $format Optional. Format to use for retrieving the time the post 2842 * was written. Accepts 'G', 'U', or PHP date format. 2843 * Defaults to the 'time_format' option. 2844 * @param int|WP_Post|null $post Post ID or post object. Default is global `$post` object. 2845 2845 * @return string|int|false Formatted date string or Unix timestamp if `$format` is 'U' or 'G'. 2846 2846 * False on failure. … … 2875 2875 * @since 2.0.0 2876 2876 * 2877 * @param string $format Optional. Format to use for retrieving the time the post2878 * was written. Accepts 'G', 'U', or PHP date format. Default 'U'.2879 * @param bool $gmt Optional. Whether to retrieve the GMT time. Default false.2880 * @param int|WP_Post $post Post ID or post object. Default is global `$post` object.2881 * @param bool $translate Whether to translate the time string. Default false.2877 * @param string $format Optional. Format to use for retrieving the time the post 2878 * was written. Accepts 'G', 'U', or PHP date format. Default 'U'. 2879 * @param bool $gmt Optional. Whether to retrieve the GMT time. Default false. 2880 * @param int|WP_Post|null $post Post ID or post object. Default is global `$post` object. 2881 * @param bool $translate Whether to translate the time string. Default false. 2882 2882 * @return string|int|false Formatted date string or Unix timestamp if `$format` is 'U' or 'G'. 2883 2883 * False on failure. … … 2939 2939 * @since 5.3.0 2940 2940 * 2941 * @param int|WP_Post $post Optional. Post ID or post object. Default is global `$post` object.2942 * @param string $field Optional. Published or modified time to use from database. Accepts 'date' or 'modified'.2943 * Default 'date'.2944 * @param string $source Optional. Local or UTC time to use from database. Accepts 'local' or 'gmt'.2945 * Default 'local'.2941 * @param int|WP_Post|null $post Optional. Post ID or post object. Default is global `$post` object. 2942 * @param string $field Optional. Published or modified time to use from database. Accepts 'date' or 'modified'. 2943 * Default 'date'. 2944 * @param string $source Optional. Local or UTC time to use from database. Accepts 'local' or 'gmt'. 2945 * Default 'local'. 2946 2946 * @return DateTimeImmutable|false Time object on success, false on failure. 2947 2947 */ … … 2984 2984 * @since 5.3.0 2985 2985 * 2986 * @param int|WP_Post $post Optional. Post ID or post object. Default is global `$post` object.2987 * @param string $field Optional. Published or modified time to use from database. Accepts 'date' or 'modified'.2988 * Default 'date'.2986 * @param int|WP_Post|null $post Optional. Post ID or post object. Default is global `$post` object. 2987 * @param string $field Optional. Published or modified time to use from database. Accepts 'date' or 'modified'. 2988 * Default 'date'. 2989 2989 * @return int|false Unix timestamp on success, false on failure. 2990 2990 */ … … 3027 3027 * @since 4.6.0 Added the `$post` parameter. 3028 3028 * 3029 * @param string $format Optional. Format to use for retrieving the time the post3030 * was modified. Accepts 'G', 'U', or PHP date format.3031 * Defaults to the 'time_format' option.3032 * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default current post.3029 * @param string $format Optional. Format to use for retrieving the time the post 3030 * was modified. Accepts 'G', 'U', or PHP date format. 3031 * Defaults to the 'time_format' option. 3032 * @param int|WP_Post|null $post Optional. Post ID or WP_Post object. Default current post. 3033 3033 * @return string|int|false Formatted date string or Unix timestamp. False on failure. 3034 3034 */ … … 3064 3064 * @since 2.0.0 3065 3065 * 3066 * @param string $format Optional. Format to use for retrieving the time the post3067 * was modified. Accepts 'G', 'U', or PHP date format. Default 'U'.3068 * @param bool $gmt Optional. Whether to retrieve the GMT time. Default false.3069 * @param int|WP_Post $post Post ID or post object. Default is global `$post` object.3070 * @param bool $translate Whether to translate the time string. Default false.3066 * @param string $format Optional. Format to use for retrieving the time the post 3067 * was modified. Accepts 'G', 'U', or PHP date format. Default 'U'. 3068 * @param bool $gmt Optional. Whether to retrieve the GMT time. Default false. 3069 * @param int|WP_Post|null $post Post ID or post object. Default is global `$post` object. 3070 * @param bool $translate Whether to translate the time string. Default false. 3071 3071 * @return string|int|false Formatted date string or Unix timestamp if `$format` is 'U' or 'G'. 3072 3072 * False on failure. -
trunk/src/wp-includes/link-template.php
r61637 r61649 95 95 * @since 5.7.0 96 96 * 97 * @param WP_Post|int|null $post Optional. Post ID or post object. Defaults to global $post.97 * @param int|WP_Post|null $post Optional. Post ID or post object. Defaults to global $post. 98 98 * @param bool|null $sample Optional. Whether to force consideration based on sample links. 99 99 * If omitted, a sample link is generated if a post object is passed -
trunk/src/wp-includes/ms-blogs.php
r59688 r61649 905 905 * @since 4.9.0 Added the `$post` parameter. 906 906 * 907 * @param string $new_status The status the post is changing to.908 * @param string $old_status The status the post is changing from.909 * @param WP_Post $post Post object907 * @param string $new_status The status the post is changing to. 908 * @param string $old_status The status the post is changing from. 909 * @param WP_Post|null $post Post object. 910 910 */ 911 911 function _update_posts_count_on_transition_post_status( $new_status, $old_status, $post = null ) { -
trunk/src/wp-includes/post-template.php
r61445 r61649 408 408 * @since 4.5.0 Introduced the `$post` parameter. 409 409 * 410 * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global $post.410 * @param int|WP_Post|null $post Optional. Post ID or WP_Post object. Default is global $post. 411 411 * @return string Post excerpt. 412 412 */ … … 459 459 * @since 2.7.0 460 460 * 461 * @param string|string[] $css_class Optional. One or more classes to add to the class list.462 * Default empty.463 * @param int|WP_Post $post Optional. Post ID or post object. Defaults to the global `$post`.461 * @param string|string[] $css_class Optional. One or more classes to add to the class list. 462 * Default empty. 463 * @param int|WP_Post|null $post Optional. Post ID or post object. Defaults to the global `$post`. 464 464 */ 465 465 function post_class( $css_class = '', $post = null ) { … … 487 487 * @since 4.2.0 Custom taxonomy class names were added. 488 488 * 489 * @param string|string[] $css_class Optional. Space-separated string or array of class names490 * to add to the class list. Default empty.491 * @param int|WP_Post $post Optional. Post ID or post object.489 * @param string|string[] $css_class Optional. Space-separated string or array of class names 490 * to add to the class list. Default empty. 491 * @param int|WP_Post|null $post Optional. Post ID or post object. 492 492 * @return string[] Array of class names. 493 493 */ … … 1884 1884 * @since 4.7.0 Now works with any post type, not just pages. 1885 1885 * 1886 * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global $post.1886 * @param int|WP_Post|null $post Optional. Post ID or WP_Post object. Default is global $post. 1887 1887 * @return string|false Page template filename. Returns an empty string when the default page template 1888 1888 * is in use. Returns false if the post does not exist. -
trunk/src/wp-includes/post.php
r61634 r61649 1224 1224 * @since 2.0.0 1225 1225 * 1226 * @param int|WP_Post $post Optional. Post ID or post object. Defaults to global $post.1226 * @param int|WP_Post|null $post Optional. Post ID or post object. Defaults to global $post. 1227 1227 * @return string|false The mime type on success, false on failure. 1228 1228 */ -
trunk/src/wp-includes/widgets/class-wp-widget-media.php
r56549 r61649 361 361 * @since 4.8.0 362 362 * 363 * @param array $states An array of media states.364 * @param WP_Post $post The current attachment object.363 * @param array $states An array of media states. 364 * @param WP_Post|null $post The current attachment object. 365 365 * @return array 366 366 */
Note: See TracChangeset
for help on using the changeset viewer.