diff --git a/src/wp-includes/default-filters.php b/src/wp-includes/default-filters.php
index 9315d39..e782869 100644
|
a
|
b
|
foreach ( array( 'single_post_title', 'single_cat_title', 'single_tag_title', 's |
| 114 | 114 | } |
| 115 | 115 | |
| 116 | 116 | // Format text area for display. |
| 117 | | foreach ( array( 'term_description', 'get_the_author_description', 'get_the_post_type_description' ) as $filter ) { |
| | 117 | foreach ( array( 'term_description', 'get_the_author_description' ) as $filter ) { |
| 118 | 118 | add_filter( $filter, 'wptexturize' ); |
| 119 | 119 | add_filter( $filter, 'convert_chars' ); |
| 120 | 120 | add_filter( $filter, 'wpautop' ); |
diff --git a/src/wp-includes/general-template.php b/src/wp-includes/general-template.php
index 55db605..0a4ae5a 100644
|
a
|
b
|
function get_the_archive_description() { |
| 1554 | 1554 | if ( is_author() ) { |
| 1555 | 1555 | $description = get_the_author_meta( 'description' ); |
| 1556 | 1556 | } elseif ( is_post_type_archive() ) { |
| 1557 | | $description = get_the_post_type_description(); |
| | 1557 | $post_type = get_query_var( 'post_type' ); |
| | 1558 | |
| | 1559 | if ( is_array( $post_type ) ) { |
| | 1560 | $post_type = reset( $post_type ); |
| | 1561 | } |
| | 1562 | |
| | 1563 | $post_type_obj = get_post_type_object( $post_type ); |
| | 1564 | |
| | 1565 | // Check if a description is set. |
| | 1566 | if ( isset( $post_type_obj->description ) ) { |
| | 1567 | $description = $post_type_obj->description; |
| | 1568 | } else { |
| | 1569 | $description = ''; |
| | 1570 | } |
| 1558 | 1571 | } else { |
| 1559 | 1572 | $description = term_description(); |
| 1560 | 1573 | } |
| … |
… |
function get_the_archive_description() { |
| 1570 | 1583 | } |
| 1571 | 1584 | |
| 1572 | 1585 | /** |
| 1573 | | * Retrieves the description for a post type archive. |
| 1574 | | * |
| 1575 | | * @since 4.9.0 |
| 1576 | | * |
| 1577 | | * @return string The post type description. |
| 1578 | | */ |
| 1579 | | function get_the_post_type_description() { |
| 1580 | | $post_type = get_query_var( 'post_type' ); |
| 1581 | | |
| 1582 | | if ( is_array( $post_type ) ) { |
| 1583 | | $post_type = reset( $post_type ); |
| 1584 | | } |
| 1585 | | |
| 1586 | | $post_type_obj = get_post_type_object( $post_type ); |
| 1587 | | |
| 1588 | | // Check if a description is set. |
| 1589 | | if ( isset( $post_type_obj->description ) ) { |
| 1590 | | $description = $post_type_obj->description; |
| 1591 | | } else { |
| 1592 | | $description = ''; |
| 1593 | | } |
| 1594 | | |
| 1595 | | /** |
| 1596 | | * Filters the description for a post type archive. |
| 1597 | | * |
| 1598 | | * @since 4.9.0 |
| 1599 | | * |
| 1600 | | * @param string $description The post type description. |
| 1601 | | * @param WP_Post_Type $post_type_obj The post type object. |
| 1602 | | */ |
| 1603 | | return apply_filters( 'get_the_post_type_description', $description, $post_type_obj ); |
| 1604 | | } |
| 1605 | | |
| 1606 | | /** |
| 1607 | 1586 | * Retrieve archive link content based on predefined or custom code. |
| 1608 | 1587 | * |
| 1609 | 1588 | * The format can be one of four styles. The 'link' for head element, 'option' |