IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
|
| 505 | 505 | // hentry for hAtom compliance |
| 506 | 506 | $classes[] = 'hentry'; |
| 507 | 507 | |
| 508 | | // All public taxonomies |
| 509 | | $taxonomies = get_taxonomies( array( 'public' => true ) ); |
| 510 | | foreach ( (array) $taxonomies as $taxonomy ) { |
| 511 | | if ( is_object_in_taxonomy( $post->post_type, $taxonomy ) ) { |
| 512 | | foreach ( (array) get_the_terms( $post->ID, $taxonomy ) as $term ) { |
| 513 | | if ( empty( $term->slug ) ) { |
| 514 | | continue; |
| 515 | | } |
| | 508 | /** |
| | 509 | * Filters the status of get the taxonomies. |
| | 510 | * |
| | 511 | * @since 4.6.0 |
| | 512 | * |
| | 513 | * @param bool $status Status get of taxonomies. |
| | 514 | * @param WP_Post $post Post Object. |
| | 515 | */ |
| | 516 | if ( apply_filters( 'get_post_class_taxonomy', true, $post ) ) { |
| | 517 | //All public taxonomies |
| | 518 | $taxonomies = get_taxonomies( array( 'public' => true ) ); |
| | 519 | foreach ( (array) $taxonomies as $taxonomy ) { |
| | 520 | if ( is_object_in_taxonomy( $post->post_type, $taxonomy ) ) { |
| | 521 | foreach ( (array) get_the_terms( $post->ID, $taxonomy ) as $term ) { |
| | 522 | if ( empty( $term->slug ) ) { |
| | 523 | continue; |
| | 524 | } |
| 516 | 525 | |
| 517 | | $term_class = sanitize_html_class( $term->slug, $term->term_id ); |
| 518 | | if ( is_numeric( $term_class ) || ! trim( $term_class, '-' ) ) { |
| 519 | | $term_class = $term->term_id; |
| 520 | | } |
| | 526 | $term_class = sanitize_html_class( $term->slug, $term->term_id ); |
| | 527 | if ( is_numeric( $term_class ) || ! trim( $term_class, '-' ) ) { |
| | 528 | $term_class = $term->term_id; |
| | 529 | } |
| 521 | 530 | |
| 522 | | // 'post_tag' uses the 'tag' prefix for backward compatibility. |
| 523 | | if ( 'post_tag' == $taxonomy ) { |
| 524 | | $classes[] = 'tag-' . $term_class; |
| 525 | | } else { |
| 526 | | $classes[] = sanitize_html_class( $taxonomy . '-' . $term_class, $taxonomy . '-' . $term->term_id ); |
| | 531 | // 'post_tag' uses the 'tag' prefix for backward compatibility. |
| | 532 | if ( 'post_tag' == $taxonomy ) { |
| | 533 | $classes[] = 'tag-' . $term_class; |
| | 534 | } else { |
| | 535 | $classes[] = sanitize_html_class( $taxonomy . '-' . $term_class, |
| | 536 | $taxonomy . '-' . $term->term_id ); |
| | 537 | } |
| 527 | 538 | } |
| 528 | 539 | } |
| 529 | 540 | } |