astra_get_option( string $option, mixed $default = '', string $deprecated = '' )
Return Theme options.
Description
Parameters
- $option
-
(string) (Required) Option key.
- $default
-
(mixed) (Optional) Option default value.
Default value: ''
- $deprecated
-
(string) (Optional) Option default value.
Default value: ''
Return
(mixed) Return option value.
Source
File: inc/core/common-functions.php
function astra_get_option( $option, $default = '', $deprecated = '' ) {
if ( '' != $deprecated ) {
$default = $deprecated;
}
$theme_options = Astra_Theme_Options::get_options();
/**
* Filter the options array for Astra Settings.
*
* @since 1.0.20
* @var Array
*/
$theme_options = apply_filters( 'astra_get_option_array', $theme_options, $option, $default );
$value = ( isset( $theme_options[ $option ] ) && '' !== $theme_options[ $option ] ) ? $theme_options[ $option ] : $default;
/**
* Dynamic filter astra_get_option_$option.
* $option is the name of the Astra Setting, Refer Astra_Theme_Options::defaults() for option names from the theme.
*
* @since 1.0.20
* @var Mixed.
*/
return apply_filters( "astra_get_option_{$option}", $value, $option, $default );
}
Expand full source code Collapse full source code View on Trac