Helpers

Helpers

Helpers that come with LaraOne can be found under app\Helpers folder. Two helper files can be found under that folder

  • helpers.php - basic general helpers
  • theme_helpers.php - helpers mostly used by themes

List of theme helpers

has_excerpt - Checks if post has excerpt.

get_excerpt - Returns excerpt for the post.

has_text_block - Checks to see if post has text block.

get_text_block - Returns text block for the post.

get_seo_image - Returns Featured Image for the post.

get_seo_description - Returns Seo Meta Description.

is_widget_group_visible - Checks if specific widget group is visible on this page.

get_widget_group - Returns first widget group that belongs to an area.

get_widgets - Returns all widgets that are attached to particular widget group.

process_widgets - Sorts widgets correctly to prepare them for rendering.

get_menu - Returns menu created in Admin Panel, menu is returned by location.

get_menu_by_id - Returns menu by ID.

get_theme_folder - Returns folder for a particular theme.

get_theme_setting - Returns all the settings for the theme.

get_theme_timestamp - Returns theme last update timestamp.

get_website_setting - Returns particular website setting, needed by the theme.

get_gravatar - Returns gravatar based on the email.