bloginfo() vs get_option?

The two functions output exactly the same thing.

From the Codex entry for get_bloginfo():

‘name’ – Returns the “Site Title” set in Settings > General. This data is retrieved from the “blogname” record in the wp_options table.

From source:

case 'name':
default:
    $output = get_option('blogname');

Neither get_bloginfo() nor bloginfo() do any sort of sanitization or escaping; so both get_bloginfo( 'name' ) and get_option( 'blogname' ) return exactly the same value.

Leave a Comment