Unyson icon indicating copy to clipboard operation
Unyson copied to clipboard

Call to undefined function fw_get_db_customizer_option()

Open GreenLightSM opened this issue 8 years ago • 2 comments

Hi, i've created "style.php" file and trying to get colors from customizer like this: "$first_color = fw_get_db_customizer_option('bg-color-1');", but i have an error: "Call to undefined function fw_get_db_customizer_option()". What should i do? Thank you!

GreenLightSM avatar Jun 11 '18 12:06 GreenLightSM

Where do you include style.php? if directly in functions.php you can't because of unyson is available to hook after_setup_theme.

function _action_theme_after_setup_theme() {
	// include here your file.

}
add_action( 'after_setup_theme', '_action_theme_after_setup_theme', 11 );

ViorelEremia avatar Jun 11 '18 14:06 ViorelEremia

Oh, thanks! Gonna try it:)

пн, 11 июн. 2018 г. в 17:13, ViorelEremia [email protected]:

Where do you include style.php? if directly in functions.php you can't because of unyson is available to hook after_setup_theme.

function _action_theme_after_setup_theme() { // include here your file.

} add_action( 'after_setup_theme', '_action_theme_after_setup_theme', 11 );

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ThemeFuse/Unyson/issues/3443#issuecomment-396258025, or mute the thread https://github.com/notifications/unsubscribe-auth/AhKDao5Z_OggFUMdQs6kapCeJ8j-g6TAks5t7nshgaJpZM4UikyS .

GreenLightSM avatar Jun 11 '18 14:06 GreenLightSM