lib/utilities.php
- Package
- ncp\wp\themes\planet_foundation
- Since
- Planet Foundation 1.0.0
Functions
pf_add_orbit_css() : voidAdds css for orbit
pf_categories(string $prefix = "Posted in: ") : voidReturns HTML for categories styled using Zurb Foundation's button groups
| Name | Type | Description |
|---|---|---|
| $prefix | string | String to prefix to category list |
- Link
- Zurb's Foundation Button Groups
- Since
- Planet Foundation 1.0.0
pf_get_first_image() : voidGet first image in a post
- Returns
- string image enclosed in img tags
pf_get_header_url() : \UrlRetrieves the url for the header image if there is one specified
| Type | Description |
|---|---|
| \Url | of header image |
pf_get_the_author(string $prefix = 'Written by', string $format = 'short') : stringReturns HTML properly structured so it can be recognized as an author by Google
| Name | Type | Description |
|---|---|---|
| $prefix | string | String to prefix to author info, default is 'Written by' |
| $format | string | 'short' is abbreviated for excerpts, otherwise a long version with pic and bio |
| Type | Description |
|---|---|
| string | HTML |
- Since
- Planet Foundation 1.0.0
pf_get_the_date(string $prefix = 'Posted on', string $format = 'long') : stringReturns HTML properly structured so it can be recognized as a date by Google
| Name | Type | Description |
|---|---|---|
| $prefix | string | String to prefix to date, default is 'Posted on' |
| $format | string | 'long' is like Monday, Feburary 18, 2012, otherwise 2/18/12 |
| Type | Description |
|---|---|
| string | HTML |
- Since
- Planet Foundation 1.0.0
pf_get_the_header() : null | stringRetrieves html for header image
| Type | Description |
|---|---|
| null | string | Null if no header is found. html if header is found. |
- See
- wp_make_link_relative()
- See
- get_post()
- See
- get_post_meta()
- See
- get_header_image()
- Since
- Planet Foundation 1.0.0
- Uses
- To get the slideshow if configured
pf_get_the_slideshow() : null | stringRetrieves html for a slideshow designed to be used on a page header
| Type | Description |
|---|---|
| null | string | Null if slideshow not configured. html if slideshow is turned on and slides specified. |
- Link
- add_filter()
- See
- get_theme_mod()
- See
- apply_filters()
- Since
- Planet Foundation 1.0.0
pf_remove_hentry_class(array $post_classes, string $additional_classes) : StringRemoves hentry class from Wordpress default post classes
| Name | Type | Description |
|---|---|---|
| $post_classes | array | Array of classes |
| $additional_classes | string | Space separated string of addition classes to add |
| Type | Description |
|---|---|
| String | of classes |
- Since
- Planet Foundation 1.0.0
pf_show_author() : false | trueChecks if author wants the author displayed as part of the page or post
| Type | Description |
|---|---|
| false | true |
pf_show_tags() : false | trueChecks if author wants the tags displayed as part of the page or post
| Type | Description |
|---|---|
| false | true |
pf_show_title() : false | trueChecks if author wants the title displayed as part of the page or post
| Type | Description |
|---|---|
| false | true |
pf_tags(string $prefix = "Tags: ") : voidReturns HTML for tags styled using Zurb Foundation's button groups
| Name | Type | Description |
|---|---|---|
| $prefix | string | String to prefix to category list |
- Link
- Zurb's Foundation Button Groups
- Since
- Planet Foundation 1.0.0
pf_the_nav_menu() : stringReturns HTML for the main menu styled for Zurb Foundation's Top Bar module
| Type | Description |
|---|---|
| string | HTML ready for placement as is in your template file |
- Link
- Zurb's Foundation Top Bar
- Since
- Planet Foundation 1.0.0
pf_the_page_menu() : stringReturns HTML styled for Zurb Foundation's Off Canvas module.
| Type | Description |
|---|---|
| string | HTML ready for placement in template files |
- Link
- Zurb's Foundation Off Canvas
- See
- get_theme_mod()
- See
- get_sidebar()
- Since
- Planet Foundation 1.0.0