Difference between bloginfo(‘home’) and home_url() and site_url()

I have been reading through Codex and other SO and SE posts regarding this. But I am confused. I used home_url() and site_url() to linking the site’s home and it gave same results. As I was using qTranslate for bilingual implementation. And had its language switcher. Found later, when clicked on the home logo (used … Read more

bloginfo() vs get_option?

What’s the difference between: bloginfo(‘name’); vs get_option(‘blogname’); The parameter is just an example, but I see no differences in terms displaying what I want. Are there any particular differences? Or are they just for semantic reasons. Thanks in advance. 3 Answers 3 The two functions output exactly the same thing. From the Codex entry for … Read more

How do I change the login logo URL and hover title?

I am trying to change the login logo URL and hover title. I am using the code below but return bloginfo(‘url’); and return bloginfo(‘name’); aren’t outputting the desired href and title. I’m also using a child theme if that matters at all. What do I need to use instead of return bloginfo(‘url’); and return bloginfo(‘name’);? … Read more

From a security standpoint, should bloginfo() or get_bloginfo() be escaped?

I’ve been reviewing a lot of information about WP theme and plugin security and understand the concept that you should escape attributes and HTML values in themes and plugins. I’ve seen bloginfo() and echo get_bloginfo() used both standard and inside an esc_html() or esc_attr() function. Genesis and _s, Automattic’s base theme both escape these values … Read more

What is difference between get_bloginfo(‘url’) and get_site_url()?

I am developing a plugin. I want to know difference between get_bloginfo(‘url’); and get_site_url(); I got same output, then what’s the difference? 4 get_bloginfo(‘url’) calls home_url() calls get_home_url() reads option home get_bloginfo(‘wpurl’) calls site_url() calls get_site_url() reads option siteurl get_bloginfo(‘siteurl’) and get_bloginfo(‘home’) are deprecated arguments and return get_bloginfo(‘url’) (siteurl argument is documented wrong in Codex … Read more

get_template_directory() vs bloginfo( ‘template_directory’ ) vs TEMPLATEPATH

I was reading this article: Common WordPress Development Mistakes and How to Fix Them, and in it, they author says: Getting the theme location: If you are using TEMPLATEPATH or bloginfo( ‘template_directory’). Stop! You should be using the very useful get_template_directory() as seen in my examples above. But he doesn’t elaborate. What’s so bad about … Read more