I have built a Wordpress plugin that requires to me to add CSS styles through the plugin's PHP file.
Is there a better way of doing this? I can see this getting out of hand if not done properly.
function flags() {
<style type="text/css">
<?php if(get_option('display')=='Vertical') { ?>
<?php if (get_option('language_option')=='specific') { ?>
#flags {display:none !important; }
<?php } ?>
p.hello { font-size:12px; color:darkgray; }
<?php } ?>
</style>
<?php }
}
echostatements, isn't it?div class="vertical-or-notsomewhere.echo? everything outside the<?php ?>is as if you wouldechoit at that place. That's why many libs leave out the last?>in the document and why php documents in utf-8 with BOM cause problems.