I built a some function theme option wordpress.
But I am receiving the following error now, what am I doing wrong?
if(isset($thm_options['custom_font1_eot']))
$w_custom_font1_src[] = "url('{$thm_options['custom_font1_eot']['url']}?#iefix') format('embedded-opentype')";
if(isset($thm_options['custom_font1_woff']))
$w_custom_font1_src[] = "url('{$thm_options['custom_font1_woff']['url']}') format('woff')";
if(isset($thm_options['custom_font1_ttf']))
$w_custom_font1_src[] = "url('{$thm_options['custom_font1_ttf']['url']}') format('truetype')";
Fatal error: [] operator not supported for strings in
Anything I missed code?
You may have used this variable $w_custom_font1_src
as a string
somewhere else in the program.
So now reinitialize as an array
$w_custom_font1_src = array();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With