get_option() filtering and getting out of recursion

Usually I remove the filter, then add it back on afterwards;

function _my_custom_option( $option )
{
    remove_filter( 'pre_option_name', '_my_custom_option' );

    // do what you like with $option

    add_filter( 'pre_option_name', '_my_custom_option' );
    return $option;
}
add_filter( 'pre_option_name', '_my_custom_option' );

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)