settings.php
Table of Contents
Functions
- buddyc_get_setting() : mixed
- Retrieves the value of plugin settings.
- buddyc_update_setting() : mixed
- Retrieves the value of plugin settings.
- buddyc_help_post_types() : mixed
- Retrieves an array of help post type slugs.
- buddyc_color() : mixed
- Retrieves colors from settings.
- buddyc_get_page_link() : int|string
- Retrieves the permalink to a page defined in the plugin settings.
Functions
buddyc_get_setting()
Retrieves the value of plugin settings.
buddyc_get_setting(string $settings_group[, string $settings_key = null ]) : mixed
Parameters
- $settings_group : string
-
The settings group to retrieve.
- $settings_key : string = null
-
Optional. The specific setting to retrieve.
Tags
buddyc_update_setting()
Retrieves the value of plugin settings.
buddyc_update_setting(string $settings_group, string $settings_key, mixed $value) : mixed
Parameters
- $settings_group : string
-
The settings group.
- $settings_key : string
-
The specific setting field.
- $value : mixed
-
The value to set.
Tags
buddyc_help_post_types()
Retrieves an array of help post type slugs.
buddyc_help_post_types() : mixed
Tags
buddyc_color()
Retrieves colors from settings.
buddyc_color(string $type) : mixed
Parameters
- $type : string
-
The color type to retrieve. Accepts 'primary', 'accent', and 'tertiary'.
Tags
buddyc_get_page_link()
Retrieves the permalink to a page defined in the plugin settings.
buddyc_get_page_link(string $page_key[, bool $return_link = true ]) : int|string
Parameters
- $page_key : string
-
The key of the page to retrieve.
- $return_link : bool = true
-
Optional. Whether to return the link or the page ID. Defaults to true and returns permalink.
Tags
Return values
int|string —The permalink or the page ID.