# lib/customizer.php

Theme Customization
Sets up what you see under Appearance->Customize

Package
  ncp\wp\themes\planet_foundation
Since
  Planet Foundation 1.0

## Functions

`pf_sanitize_checkbox_cb(int $input) : int`

Callback to sanitize checkboxes

Parameters

Name | Type | Description
--- | --- | ---
$input | int | Should be 1 or 0 for a checkbox

Returns

Type | Description
--- | ---
int | 1 or 0

Details

Link
  Tutorial on Customization and Sanitation
Since
  Planet Foundation 1.0.0

`pf_sanitize_radio_cb(array $input) : array | null`

Callback to sanitize all radio button settings before entry into the database

Parameters

Name | Type | Description
--- | --- | ---
$input | array | An array representing a radio control setting

Returns

Type | Description
--- | ---
array | null | If valid array is found, $input is returned

Details

Link
  Tutorial on Customization and Sanitation
Since
  Planet Foundation 1.0.0

`pf_sanitize_text_cb(string $input) : string`

Callback to use to ensure a field is purely text with no html or evil scripts.

Parameters

Name | Type | Description
--- | --- | ---
$input | string | String in a text field of the customizer

Returns

Type | Description
--- | ---
string | Text field stripped of html and evil things

Details

Since
  Planet Foundation 1.0.0

`pf_sanitize_url_cb(string $url) : void`

Callback to that sanitizes a field containing a URL

Filters out any evil scripts
Parameters

Name | Type | Description
--- | --- | ---
$url | string | The url to santize

Details

Since
  Planet Foundation 1.0.0

`pf_theme_customizer(\WP_Customize_Manager $wp_customize) : void`

A big honk'n function to add new menu items to Appearance->Customize

Child themes can add more customization options using the pf_extend_customizer hook, which is called at the end of this function
Parameters

Name | Type | Description
--- | --- | ---
$wp_customize | \WP_Customize_Manager | Instance of WP_Customize_Manager

Details

Link
  Theme Customization API

Documentation was generated by phpDocumentor 2.3.0 .