PHP Class Pods_Templates_Auto_Template_Front_End, pods

Replaces Pods_PFAT_Frontend
Show file Open project: pods-framework/pods

Public Methods

Method Description
__construct ( )
auto_pods ( ) : array Get all Pods with auto template enable and its settings
current_post_type ( ) : string Fetches the current post type.
front ( string $content ) : string Outputs templates after the content as needed.
hook_content ( ) Add hooks for output
load_template ( string $template_name, string $content, Pods $pods, boolean | string $append = true ) : string Attach Pods Template to $content
set_frontier_style_script ( ) Sets Styles and Scripts from the Frontier template addons.
the_pods ( ) : array Get all post type and taxonomy Pods

Method Details

__construct() public method

public __construct ( )

auto_pods() public method

Get all Pods with auto template enable and its settings
Since: 2.4.5
public auto_pods ( ) : array
return array With info about auto template settings per post type

current_post_type() public method

Fetches the current post type.
Since: 2.4.5
public current_post_type ( ) : string
return string current post type.

front() public method

Outputs templates after the content as needed.
Since: 2.4.5
public front ( string $content ) : string
$content string Post content
return string Post content with the template appended if appropriate.

hook_content() public method

Add hooks for output
Since: 2.6.6
public hook_content ( )

load_template() public method

Attach Pods Template to $content
Since: 2.4.5
public load_template ( string $template_name, string $content, Pods $pods, boolean | string $append = true ) : string
$template_name string The name of a Pods Template to load.
$content string Post content
$pods Pods Current Pods object.
$append boolean | string Optional. Whether to append, prepend or replace content. Defaults to true, which appends, if false, content is replaced, if 'prepend' content is prepended.
return string $content with Pods Template appended if template exists

set_frontier_style_script() public method

Sets Styles and Scripts from the Frontier template addons.
Since: 2.4.5

the_pods() public method

Get all post type and taxonomy Pods
Since: 2.4.5
public the_pods ( ) : array
return array Of Pod names.