PHP Class Give_Plugin_Settings, Give

Register settings Include and setup custom metaboxes and fields.
Show file Open project: wordimpress/give

Protected Properties

Property Type Description
$option_metabox array Array of metaboxes/fields
$options_page string Options Page hook
$title string Options Page title

Public Methods

Method Description
__construct ( ) Give_Plugin_Settings constructor.
__get ( string $field ) : mixed Public getter method for retrieving protected/private variables
admin_page_display ( ) Admin page markup. Mostly handled by CMB2
give_get_settings_tabs ( ) : array Retrieve settings tabs
give_modify_cmb2_form_output ( $form_format, $object_id, $cmb ) : string Modify CMB2 Default Form Output
give_settings ( $active_tab ) : array Define General Settings Metabox and field configurations.
give_update_cmb_meta_box_url ( $url ) : mixed Filter CMB2 URL
init ( ) Register our setting to WP
settings_notices ( ) Show Settings Notices

Method Details

__construct() public method

Give_Plugin_Settings constructor.
public __construct ( )

__get() public method

Public getter method for retrieving protected/private variables
Since: 1.0
public __get ( string $field ) : mixed
$field string Field to retrieve
return mixed Field value or exception is thrown

admin_page_display() public method

Admin page markup. Mostly handled by CMB2
Since: 1.0
public admin_page_display ( )

give_get_settings_tabs() public method

Retrieve settings tabs
Since: 1.0
public give_get_settings_tabs ( ) : array
return array $tabs

give_modify_cmb2_form_output() public method

Modify CMB2 Default Form Output
Since: 1.0
public give_modify_cmb2_form_output ( $form_format, $object_id, $cmb ) : string
$form_format
$object_id
$cmb
return string

give_settings() public method

Filters are provided for each settings section to allow add-ons and other plugins to add their own settings
public give_settings ( $active_tab ) : array
$active_tab |string active tab settings; null returns full array
return array

give_update_cmb_meta_box_url() public method

Required for CMB2 to properly load CSS/JS.
public give_update_cmb_meta_box_url ( $url ) : mixed
$url
return mixed

init() public method

Register our setting to WP
Since: 1.0
public init ( )

settings_notices() public method

Show Settings Notices
public settings_notices ( )

Property Details

$option_metabox protected property

Array of metaboxes/fields
protected array $option_metabox
return array

$options_page protected property

Options Page hook
protected string $options_page
return string

$title protected property

Options Page title
protected string $title
return string