Make WordPress Core


Ignore:
Timestamp:
10/17/2015 12:43:54 AM (9 years ago)
Author:
jorbin
Message:

Improve get_post_permalink compatibility with non standard post status

This adds a new filter named get_post_status to the function named get_post_status which can be used to make additional post types behave like unpublished post status in get_post_permalink.

Props misterbisson, antpb, iamfriendly
Fixes #23458

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/post-functions.php

    r35170 r35233  
    574574    }
    575575
    576     return $post->post_status;
     576    /**
     577     * Filters the post status.
     578     *
     579     * @since 4.4.0
     580     *
     581     * @param string  $post->post_status The status of the post.
     582     */
     583    return apply_filters( 'get_post_status', $post->post_status, $post );
    577584}
    578585
Note: See TracChangeset for help on using the changeset viewer.