Make WordPress Core

Ticket #37114: 37114.2.patch

File 37114.2.patch, 976 bytes (added by desrosj, 8 years ago)

Fixing malformed patch. Improved documentation wording.

  • src/wp-includes/post-template.php

     
    507507
    508508        // All public taxonomies
    509509        $taxonomies = get_taxonomies( array( 'public' => true ) );
     510
     511        /**
     512     * Filters taxonomies that receive classes for individual terms.
     513     *
     514     * Default is all public taxonomies.
     515     *
     516     * @since 4.8.0
     517     *
     518     * @param array   $taxonomies List of all public taxonomy names.
     519     * @param WP_Post $post       Current post object.
     520     * @param array   $classes    Classes generated to this point.
     521     */
     522    $taxonomies = apply_filters( 'post_class_taxonomies', $taxonomies, $post, $classes );
     523
    510524        foreach ( (array) $taxonomies as $taxonomy ) {
    511525                if ( is_object_in_taxonomy( $post->post_type, $taxonomy ) ) {
    512526                        foreach ( (array) get_the_terms( $post->ID, $taxonomy ) as $term ) {