<?php $options = get_option('kittens_options'); if ($options['copyright']!="") echo $options['copyright']; else echo '© '.date('Y').' '.bloginfo('name').'. All Rights Reserved.'; ?>
Works perfectly except '.bloginfo('name').' although properly showing what it’s suppose to, falls out of sequence in the sentence structure.
So what should show as:
© 2012 Testing. All Rights Reserved.
shows as:
Testing© 2012. All Rights Reserved.
Since '.bloginfo('name').' isn’t a native PHP function does it need to be filtered or escaped or something?
That’s becauase
bloginfoCodex is an output function. It does output but not return the string. You need a return function, try with addingget_in front:get_bloginfoCodex.Function with
get_at the beginning of their name often return strings instead of outputting them in wordpress, like theget_optionfunction you already use.Code-Example: