@@ -71,7 +71,7 @@ function get_category_parents( $category_id, $link = false, $separator = '/', $n
7171 *
7272 * @since 0.71
7373 *
74- * @param int $post_id Optional. The post ID. Defaults to current post ID.
74+ * @param int|false $post_id Optional. The post ID. Defaults to current post ID.
7575 * @return WP_Term[] Array of WP_Term objects, one for each category assigned to the post.
7676 */
7777function get_the_category ( $ post_id = false ) {
@@ -131,11 +131,11 @@ function get_the_category_by_ID( $cat_id ) { // phpcs:ignore WordPress.NamingCon
131131 *
132132 * @global WP_Rewrite $wp_rewrite WordPress rewrite component.
133133 *
134- * @param string $separator Optional. Separator between the categories. By default, the links are placed
135- * in an unordered list. An empty string will result in the default behavior.
136- * @param string $parents Optional. How to display the parents. Accepts 'multiple', 'single', or empty.
137- * Default empty string.
138- * @param int $post_id Optional. ID of the post to retrieve categories for. Defaults to the current post.
134+ * @param string $separator Optional. Separator between the categories. By default, the links are placed
135+ * in an unordered list. An empty string will result in the default behavior.
136+ * @param string $parents Optional. How to display the parents. Accepts 'multiple', 'single', or empty.
137+ * Default empty string.
138+ * @param int|false $post_id Optional. ID of the post to retrieve categories for. Defaults to the current post.
139139 * @return string Category list for a post.
140140 */
141141function get_the_category_list ( $ separator = '' , $ parents = '' , $ post_id = false ) {
@@ -251,7 +251,7 @@ function get_the_category_list( $separator = '', $parents = '', $post_id = false
251251 *
252252 * @param int|string|int[]|string[] $category Category ID, name, slug, or array of such
253253 * to check against.
254- * @param int|WP_Post $post Optional. Post to check. Defaults to the current post.
254+ * @param int|null| WP_Post $post Optional. Post to check. Defaults to the current post.
255255 * @return bool True if the current post is in any of the given categories.
256256 */
257257function in_category ( $ category , $ post = null ) {
@@ -267,11 +267,11 @@ function in_category( $category, $post = null ) {
267267 *
268268 * @since 0.71
269269 *
270- * @param string $separator Optional. Separator between the categories. By default, the links are placed
271- * in an unordered list. An empty string will result in the default behavior.
272- * @param string $parents Optional. How to display the parents. Accepts 'multiple', 'single', or empty.
273- * Default empty string.
274- * @param int $post_id Optional. ID of the post to retrieve categories for. Defaults to the current post.
270+ * @param string $separator Optional. Separator between the categories. By default, the links are placed
271+ * in an unordered list. An empty string will result in the default behavior.
272+ * @param string $parents Optional. How to display the parents. Accepts 'multiple', 'single', or empty.
273+ * Default empty string.
274+ * @param int|false $post_id Optional. ID of the post to retrieve categories for. Defaults to the current post.
275275 */
276276function the_category ( $ separator = '' , $ parents = '' , $ post_id = false ) {
277277 echo get_the_category_list ( $ separator , $ parents , $ post_id );
0 commit comments