I think you should be using something like this.
set_theme_mod
. This will save the value to the database.
set_theme_mod('facebooklink_edit','aaabbbccc');
echo get_theme_mod('facebooklink_edit', 'default');
Also, toTo keep the theme setting only for your theme use type'type' => 'theme_mod'
.
$wp_customize->add_setting( 'facebooklink_edit' , array(
'type' => 'theme_mod', // only for this theme
'transport' => 'refresh',
'default' => 'aaabbbccc'
//'sanitize_callback' => 'someething...',
) );
The save()
method exists inside class-wp-customize-manager()
but it looks like not meant for using with JavaScript only.
You theme settings, in general, can be either 'theme_mod'
or 'option'
.
My proposal for you was to use theme_mod
in this case.