astra_get_raw_options( mixed $default_value = array() )
Retrieve the astra-settings option value without pre_option_ / option_ filters applied.
Description
Plugins like WPML String Translation filter option_astra-settings to replace registered admin texts (header/footer HTML, button labels, etc.) with translations for the current language. Reading the option through that filter and writing the whole array back would permanently save translated strings into the database. Any read-modify-write of the full options array must read through this function instead of get_option().
Parameters
- $default_value
-
(mixed) (Optional) Value to return if the option does not exist.
Default value: array()
Return
(mixed) The stored theme options array, or $default_value if not set.
Source
File: classes/astra-common-functions.php
function astra_get_raw_options( $default_value = array() ) {
$detached = astra_detach_option_filters();
$theme_options = get_option( ASTRA_THEME_SETTINGS, $default_value );
astra_restore_option_filters( $detached );
return $theme_options;
}
Expand full source code Collapse full source code View on Trac
Changelog
| Version | Description |
|---|---|
| 4.13.7 | Introduced. |