Property | Type | Description | |
---|---|---|---|
$config_vars | |||
$context | |||
$name | |||
$template_engine | |||
$theme_dir | |||
$valid_filters | We build the Post filters by analyzing the handler_var data which is assigned to the handler ( by the Controller and also, optionally, by the Theme ) | ||
$version |
Method | Description | |
---|---|---|
__call ( string $function, array $params ) | Handle methods called on this class or its descendants that are not defined by this class. | |
__construct ( $themedata ) | Constructor for theme | |
__get ( string $key ) : mixed | Get a template variable value | |
__isset ( string $key ) : boolean | Detects if a variable is assigned to the template engine for use in constructing the template's output. | |
__set ( string $key, mixed $value ) | Set a template variable, a property alias for assign() This can only affect the current stack level! | |
__unset ( string $key ) | Remove a template variable value This can only affect the current stack level! | |
act_display ( $paramarray = ['user_filters' => []] ) | Grabs post data and inserts that data into the internal handler_vars array, which eventually gets extracted into the theme's ( and thereby the template_engine's ) local symbol table for use in the theme's templates | |
act_display_404 ( array $user_filters = [] ) | Helper function: Display a 404 template | |
act_display_date ( array $user_filters = [] ) | Helper function: Display the posts for a specific date | |
act_display_entries ( array $user_filters = [] ) | Helper function: Displays multiple entries | |
act_display_home ( array $user_filters = [] ) | Helper function: Displays the home page | |
act_display_post ( array $user_filters = [] ) | Helper function: Display a post | |
act_display_tag ( array $user_filters = [] ) | Helper function: Display the posts for a tag | |
act_search ( array $user_filters = [] ) | Helper function: Display the posts for a specific criteria | |
action_template_footer_9 ( ) | Load assets and add the javascript ones to the footer on the template_footer_javascript action hook. | |
action_template_header_9 ( ) | Load assets and add the CSS ones to the header on the template_stylesheet action hook. | |
add_script ( string $value, string $where = 'header', string $name = null, string | array $requires = null ) : boolean | Add javascript to the stack to be output in the theme. | |
add_style ( string $value, string $where = 'header', string $name = null, string | array $requires = null ) : boolean | Add a stylesheet to the stack to be output in the theme. | |
add_template ( string $name, string $file, boolean $replace = false ) | Add a template to the list of available templates | |
add_template_vars ( ) | Assign the default variables that would be used in every template | |
assign ( $key, $value ) | Helper function: Avoids having to call $theme->template_engine->key= 'value'; | |
check_scope_criteria ( array $criteria ) : boolean | Matches the scope criteria against the current request | |
dir_to_url ( string $dir ) : boolean | string | Convert a theme directory or resource into a URL | |
display ( string $template_name ) | Helper function: Avoids having to call $theme->template_engine->display( 'template_name' ); | |
display_fallback ( array $template_list, $display_function = 'display' ) | Find the first template that matches from the list provided and display it | |
end_buffer ( ) | End the current template variable buffer | |
fetch ( string $template_name, boolean $unstack = false ) : string | Helper function: Avoids having to call $theme->template_engine->fetch( 'template_name' ); | |
fetch_unassigned ( string $template_name ) : string | Calls the template engine's fetch() method without pre-assigning template variables. | |
filter_provided ( array $provided = [] ) : array | Provide default Habari features for curious plugins | |
get_blocks ( string $area, string $scope, |
Retrieve the block objects for the current scope and specified area Incomplete! | |
get_scopes ( string $area ) : array | Retrieve current scope data from the database based on the requested area | |
get_url ( boolean | string $resource = false, boolean $overrideok = true ) : string | Get the URL for a resource in one of the directories used by the active theme, child theme directory first | |
get_version ( ) : string | Provide a method to return the version number from the theme xml | |
info ( ) | Loads a theme's metadata from an XML file in theme's directory. | |
load_assets ( boolean $refresh = false ) : array | Load and return a list of all assets in the current theme chain's /assets/ directory | |
sort_scopes ( StdObject $scope1, StdObject $scope2 ) : integer | Sort function for ordering scope object rows by priority | |
start_buffer ( ) | Start a new template variable buffer | |
template_exists ( string $template_name ) : boolean | Determine if a template exists in the current theme | |
theme_area ( |
Displays blocks associated to the specified area and current scope. | |
theme_body_class ( |
A theme function for outputting CSS classes based on the requested content | |
theme_comment_author_link ( |
Returns a humane commenter's link for a comment if a URL is supplied, or just display the comment author's name | |
theme_comment_form_action ( |
Returns the feedback URL to which comments should be submitted for the indicated Post | |
theme_comments_count ( |
Returns a full qualified URL of the specified post based on the comments count. | |
theme_comments_link ( |
Returns a full qualified URL of the specified post based on the comments count, and links to the post. | |
theme_content ( |
Display an object using a template designed for the type of object it is The $object is assigned into the theme using the $content template variable | |
theme_feed_alternate ( |
Returns the appropriate alternate feed based on the currently matched rewrite rule. | |
theme_footer ( $theme ) | Aggregates and echos the additional footer code by combining Plugins and Stack calls. | |
theme_has_context ( $theme, string $context ) : boolean | Check to see if the theme is currently rendering a specific context | |
theme_header ( $theme ) | Aggregates and echos the additional header code by combining Plugins and Stack calls. | |
theme_next_page_link ( $theme, string $text = null, $classes = ['next-page'] ) | Provides a link to the next page | |
theme_page_selector ( $theme, $rr_name = null, $settings = [] ) : string | Build a collection of paginated URLs to be used for pagination. | |
theme_page_title ( |
A Theme function to provide a page title | |
theme_prev_page_link ( $theme, string $text = null, $classes = ['prev-page'] ) | Provides a link to the previous page | |
theme_query_count ( ) : integer | Returns the count of queries executed | |
theme_query_time ( ) : float | Returns total query execution time in seconds |
Method | Description | |
---|---|---|
play_var_stack ( ) | Play back the full stack of template variables to assign them into the template |
public __construct ( $themedata ) |
public act_display ( $paramarray = ['user_filters' => []] ) |
public act_display_404 ( array $user_filters = [] ) | ||
$user_filters | array | Additional arguments user to get the page content |
public act_display_date ( array $user_filters = [] ) | ||
$user_filters | array | Additional arguments used to get the page content |
public act_display_entries ( array $user_filters = [] ) | ||
$user_filters | array | Additional arguments used to get the page content |
public act_display_home ( array $user_filters = [] ) | ||
$user_filters | array | Additional arguments used to get the page content |
public act_display_post ( array $user_filters = [] ) | ||
$user_filters | array | Additional arguments used to get the page content |
public act_display_tag ( array $user_filters = [] ) | ||
$user_filters | array | Additional arguments used to get the page content |
public act_search ( array $user_filters = [] ) | ||
$user_filters | array | Additional arguments used to get the page content |
public action_template_header_9 ( ) |
public add_script ( string $value, string $where = 'header', string $name = null, string | array $requires = null ) : boolean | ||
$value | string | Either a URL or raw JS to be output inline. |
$where | string | Where should it be output? Options are header and footer. |
$name | string | A name to reference this script by. Used for removing or using in $requires by other scripts. |
$requires | string | array | Either a string or an array of strings of $name's for scripts this script requires. |
return | boolean | True if added successfully, false otherwise. |
public add_style ( string $value, string $where = 'header', string $name = null, string | array $requires = null ) : boolean | ||
$value | string | Either a URL or raw CSS to be output inline. |
$where | string | Where should it be output? Options are header and footer. |
$name | string | A name to reference this script by. Used for removing or using in $after by other scripts. |
$requires | string | array | Either a string or an array of strings of $name's for scripts this script requires. |
return | boolean | True if added successfully, false otherwise. |
public add_template_vars ( ) |
public assign ( $key, $value ) |
public check_scope_criteria ( array $criteria ) : boolean | ||
$criteria | array | An array of scope criteria data in RPN, where values are arrays and operators are strings |
return | boolean | True if the criteria matches the current request |
public display_fallback ( array $template_list, $display_function = 'display' ) | ||
$template_list | array | The list of templates to search for |
public fetch_unassigned ( string $template_name ) : string | ||
$template_name | string | The name of the template to display |
return | string | The content of the template |
public static filter_provided ( array $provided = [] ) : array | ||
$provided | array | Features already collected from interrogated plugins |
return | array | Plugin Features plus Habari Features |
public get_scopes ( string $area ) : array | ||
$area | string | The area for which a scope may be applied |
return | array | An array of scope data |
public get_version ( ) : string | ||
return | string | The theme version from XML |
public info ( ) |
public load_assets ( boolean $refresh = false ) : array | ||
$refresh | boolean | If True, clear and reload all assets |
return | array | An array of URLs of assets in the assets directories of the active theme chain |
protected play_var_stack ( ) |
public sort_scopes ( StdObject $scope1, StdObject $scope2 ) : integer | ||
$scope1 | StdObject | A scope to compare |
$scope2 | StdObject | A scope to compare |
return | integer | A sort return value, -1 to 1 |
public template_exists ( string $template_name ) : boolean | ||
$template_name | string | The name of the template to detect |
return | boolean | True if template exists |
public theme_area ( |
||
$theme | The theme with which this area will be output | |
$area | string | The area to which blocks will be output |
$context | string | The area of context within the theme that could adjust the template used |
$scope | string | Used to force a specific scope |
return | string | the output of all the blocks |
public theme_body_class ( |
||
$theme | A Theme object instance | |
$args | mixed | Additional classes that should be added to the ones generated |
return | string | The resultant classes |
public theme_comment_author_link ( |
||
$theme | The current theme | |
$comment | The comment object | |
return | string | A link to the comment author or the comment author's name with no link |
public theme_comment_form_action ( |
||
$theme | The current theme | |
$post | The post object to get the feedback URL for | |
return | string | The URL to the feedback entrypoint for this comment |
public theme_comments_count ( |
||
$theme | The current theme object | |
$post | Post object used to build the comments link | |
$zero | string | String to return when there are no comments |
$one | string | String to return when there is one comment |
$many | string | String to return when there are more than one comment |
return | string | String to display for comment count |
public theme_comments_link ( |
||
$theme | The current theme object | |
$post | Post object used to build the comments link | |
$zero | string | String to return when there are no comments |
$one | string | String to return when there is one comment |
$many | string | String to return when there are more than one comment |
$fragment | string | Fragment (bookmark) portion of the URL to append to the link |
return | string | Linked string to display for comment count |
public theme_content ( |
||
$theme | The theme used to display the object | |
$object | object | An object to display |
$context | string | The context in which the object will be displayed |
public theme_feed_alternate ( |
||
$theme | The current theme object | |
return | string | Link to the appropriate alternate Atom feed |
public theme_has_context ( $theme, string $context ) : boolean | ||
$context | string | The context to check for. |
return | boolean | True if the context is active. |
public theme_header ( $theme ) |
public theme_next_page_link ( $theme, string $text = null, $classes = ['next-page'] ) | ||
$text | string | text to display for link |
public static theme_page_selector ( $theme, $rr_name = null, $settings = [] ) : string | ||
return | string | Collection of paginated URLs built by the RewriteRule. |
public theme_page_title ( |
||
$theme | The current theme |
public theme_prev_page_link ( $theme, string $text = null, $classes = ['prev-page'] ) | ||
$text | string | text to display for link |
public theme_query_count ( ) : integer | ||
return | integer | The query count |
public theme_query_time ( ) : float | ||
return | float | Query execution time in seconds, with fractions. |
public TemplateEngine,habari $template_engine | ||
return |
public $valid_filters |