Astra_Advanced_Headers_Subtitles::subtitle_compatibility( string $title )
Subtitle Plugin’s Compatibility
Description
Parameters
- $title
-
(string) (Required) Normal Post/Page Title.
Return
(string)
Source
File: addons/advanced-headers/compatibility/class-astra-advanced-headers-subtitles.php
public function subtitle_compatibility( $title ) {
$post_id = astra_get_post_id();
if ( function_exists( 'get_the_subtitle' ) && '' != get_the_subtitle( $post_id ) ) {
$output = '<span class="entry-title-primary">' . esc_html( $title ) . '</span>';
$output .= '<span class="entry-subtitle">' . esc_html( get_the_subtitle( $post_id ) ) . '</span>';
return $output;
}
return $title;
}
Expand full source code Collapse full source code View on Trac