Making WordPress.org

Changeset 14186


Ignore:
Timestamp:
11/20/2024 10:38:10 PM (2 months ago)
Author:
coffee2code
Message:

Photo Directory, Admin: Allow should_include_photo_column() to conditionally include the rejection post status.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/photo-directory/inc/admin.php

    r14184 r14186  
    295295     * Determines if the 'Photo' column should be added to a post listing table.
    296296     *
     297     * @param bool $include_rejected Optional. Include the 'reject' post status? Default false.
    297298     * @return bool True if the 'Photo' column should be added; else false.
    298299     */
    299     public static function should_include_photo_column() {
     300    public static function should_include_photo_column( $include_rejected = false ) {
    300301        $screen = get_current_screen();
    301302        $post_type = Registrations::get_post_type();
     
    308309
    309310        $post_statuses = Photo::get_post_statuses_with_photo();
     311        if ( $include_rejected ) {
     312            $post_statuses[] = Rejection::get_post_status();
     313        }
    310314
    311315        return (
Note: See TracChangeset for help on using the changeset viewer.