redux-framework icon indicating copy to clipboard operation
redux-framework copied to clipboard

function to return option value

Open krishna19 opened this issue 11 years ago • 3 comments

is there any function to return option value ? example : redux_option( 'option_id', 'param' );

krishna19 avatar Jan 05 '15 18:01 krishna19

This? http://docs.reduxframework.com/core/advanced/update-an-option-outside-the-options-panel/ Only instead of set, use get. That's about as close to it as we have.

kprovance avatar Jan 05 '15 18:01 kprovance

i check a theme, the developer use a function like this. is it works or not ?

    function redux_options($id, $fallback = false, $param = false ) {
        global $redux_options;
        if ( $fallback == false ) $fallback = '';
        $output = ( isset($redux_options[$id]) && $redux_options[$id] !== '' ) ? $redux_options[$id] : $fallback;
        if ( !empty($redux_options[$id]) && $param ) {
            $output = $redux_options[$id][$param];
        }
        return $output;
    }

krishna19 avatar Jan 05 '15 18:01 krishna19

I don't know. If you want me to debug your code, you'll need to purchase premium support from us.

kprovance avatar Jan 05 '15 18:01 kprovance