Single_Content implements Registerable, Service

Filter the single template to output document details

Tags
author

Barn2 Plugins support@barn2.com

license

GPL-3.0

copyright

Barn2 Media Ltd

Interfaces, Classes and Traits

Registerable
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
Tags
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.

Tags
Return values
string

The excerpt.

register()

{@inheritdoc}

public register() : mixed
Tags
Return values
mixed

Removes the featured image from other areas so we can display in the sidebar.

public remove_featured_image(string $html) : string
Parameters
$html : string
Tags
Return values
string

$html

get_document_details_html()

Gets the documents details HTML

private get_document_details_html() : string
Tags
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
Tags
Return values
string

$main_content

Search results