lib/utilities.php
- Package
- ncp\wp\themes\planet_foundation
- Since
- Planet Foundation 1.0.0
Functions

pf_add_orbit_css() : void
Adds css for orbit

pf_categories(string $prefix = "Posted in: ") : void
Returns 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() : void
Get first image in a post
- Returns
- string image enclosed in img tags

pf_get_header_url() : \Url
Retrieves 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') : string
Returns 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') : string
Returns 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 | string
Retrieves 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 | string
Retrieves 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) : String
Removes 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 | true
Checks if author wants the author displayed as part of the page or post
Type | Description |
---|---|
false | true |

pf_show_tags() : false | true
Checks if author wants the tags displayed as part of the page or post
Type | Description |
---|---|
false | true |

pf_show_title() : false | true
Checks if author wants the title displayed as part of the page or post
Type | Description |
---|---|
false | true |

pf_tags(string $prefix = "Tags: ") : void
Returns 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() : string
Returns 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() : string
Returns 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