0

Default customizer is saving the options inside

theme_mods_themename

but my I am using Unyson options framework and my options reside here

fw_theme_settings_options:themename

I am able to use this to control the view change

$wp_customize->add_setting(
 fw_get_db_settings_option('footer_branding'),
  array(
    'default'   => fw_get_db_settings_option('footer_branding'),
  )
);
$wp_customize->add_control(  
  'footer_branding',
  array(  
    'section'   => 'site_tab',  
    'label'     => 'Branding',  
    'type'      => 'textarea',  
    'settings'  => fw_get_db_settings_option('footer_branding')
  )
);  

the change and option work visually but customizer is saving it in its own table and on reload it is reading it from that table again.

Any help is appreciated.

As requested more info ,

Unyson is saving options in serialized array inside the db , and extracting them like this

fw_get_db_settings_option('footer_branding')

which is replacement for

get_option('footer_branding')

setting option goes like this

 fw_set_db_settings_option('footer_branding')

here is detail info about it

http://manual.unyson.io/en/latest/helpers/php.html#database

  • That's a very custom problem you are facing (due to the framework). Can you update your question with the code necessary to understand what's going on under the hood? – kaiser Apr 19 '15 at 11:15
  • @kaiser, thnx for reply , I updated the info with unyson db settings – Benn Apr 19 '15 at 11:23
  • Benn, this only shows the function name. No one can know whats going on behind that. – kaiser Apr 19 '15 at 11:48
  • @Benn you probably have to use https://codex.wordpress.org/Plugin_API/Filter_Reference/pre_update_option_%28option_name%29 – brownian Apr 19 '15 at 16:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.