I am wondering if it is possible to directly interop with the wp.customize api to get a value of a theme customizer setting. The way I am doing it now is using ajax to get a response from a php function. I seem to be having alot of issues with it.
I know that you can bind to theme customizer controls using jquery with the wp.customize api, although I am wondering if I can directly access a setting from jquery?
EDIT: More information
I know that you can interact with controls directly through the API like this:
/** Site title and description. */
wp.customize( 'blogname', function( value ) {
value.bind( function( to ) {
$( '.site-title a' ).html( to );
} );
} );
I am wondering if it is possible using the same API to directly access theme setting values, using jquery alone?
If not I think it wouldn’t be hard and would be beneficial to extend the wp.customize api(and maybe all other wp functions for that matter) to do exactly what I am manually doing with ajax and php, so this way it would be possible for users to only use jquery themselves to interact with wp functions and have wordpress do the dirty work behind the scenes. This may be a good feature for a later version of WP.