Make WordPress Core

Ticket #24378: 24378.2.patch

File 24378.2.patch, 1.2 KB (added by DrewAPicture, 12 years ago)

Boolean filter with docs

  • src/wp-admin/includes/class-wp-posts-list-table.php

     
    561561                                if ( $format = get_post_format( $post->ID ) ) {
    562562                                        $label = get_post_format_string( $format );
    563563
    564                                         echo '<a href="' . esc_url( add_query_arg( array( 'post_format' => $format, 'post_type' => $post->post_type ), 'edit.php' ) ) . '" class="post-state-format post-format-icon post-format-' . $format . '" title="' . $label . '">' . $label . ":</a> ";
     564                                        /**
     565                                         * Filter whether to display a post format icon for the post.
     566                                         *
     567                                         * @since 3.9.0
     568                                         *
     569                                         * @param bool $show Whether to display the post format icon. Default true.
     570                                         */
     571                                        if ( apply_filters( 'post_row_format_enabled', true ) ) {
     572                                                echo '<a href="' . esc_url( add_query_arg( array( 'post_format' => $format, 'post_type' => $post->post_type ), 'edit.php' ) ) . '" class="post-state-format post-format-icon post-format-' . $format . '" title="' . $label . '">' . $label . ":</a> ";
     573                                        }
    565574                                }
    566575
    567576                                if ( $can_edit_post && $post->post_status != 'trash' ) {