astra_detach_option_filters()
Detach all pre_option_ / option_ filters registered for astra-settings.
Description
Return
(array) Detached hooks, keyed by hook name. Pass to astra_restore_option_filters().
Source
File: classes/astra-common-functions.php
function astra_detach_option_filters() {
global $wp_filter;
$hooks = array( 'pre_option_' . ASTRA_THEME_SETTINGS, 'option_' . ASTRA_THEME_SETTINGS );
$detached = array();
foreach ( $hooks as $hook ) {
if ( isset( $wp_filter[ $hook ] ) ) {
$detached[ $hook ] = $wp_filter[ $hook ];
unset( $wp_filter[ $hook ] );
}
}
return $detached;
}
Expand full source code Collapse full source code View on Trac
Changelog
| Version | Description |
|---|---|
| 4.13.7 | Introduced. |