Single_Content implements Registerable, Premium_Service
Filter the single template to output document details
Tags
Interfaces, Classes and Traits
- Registerable
- Premium_Service
Table of Contents
- filter_single_document_content() : string
- Adds the sidebar and excerpt to the main content
- maybe_allow_shortcodes() : string
- Allow shortcodes in the excerpt if the option is set.
- register() : mixed
- {@inheritdoc}
- remove_featured_image() : string
- Removes the featured image from other areas so we can display in the sidebar.
- get_document_details_html() : string
- Gets the documents details HTML
- get_main_content_html() : string
- Gets the main content HTML
Methods
filter_single_document_content()
Adds the sidebar and excerpt to the main content
public
filter_single_document_content(string $content) : string
Parameters
- $content : string
Return values
string —$content
maybe_allow_shortcodes()
Allow shortcodes in the excerpt if the option is set.
public
maybe_allow_shortcodes(string $excerpt) : string
Parameters
- $excerpt : string
-
The excerpt.
Return values
string —The excerpt.
register()
{@inheritdoc}
public
register() : mixed
Return values
mixed —remove_featured_image()
Removes the featured image from other areas so we can display in the sidebar.
public
remove_featured_image(string $html) : string
Parameters
- $html : string
Return values
string —$html
get_document_details_html()
Gets the documents details HTML
private
get_document_details_html() : string
Return values
string —get_main_content_html()
Gets the main content HTML
private
get_main_content_html(string $post_content) : string
Parameters
- $post_content : string
Return values
string —$main_content