I´d like to override $title = get_bloginfo();
with –> $title = get_bloginfo('siteurl');
Some code from the plugin “Really simple Facebook Twitter share buttons“:
function really_simple_share ($content, $filter, $link='', $title='', $author='') {
static $last_execution = '';
...
$custom_field_disable = get_post_custom_values('really_simple_share_disable');
if ($custom_field_disable[0]=='yes' and $filter!='shortcode') {
return $content;
}
//GET ARRAY OF STORED VALUES
global $really_simple_share_option;
$option = $really_simple_share_option;
...
$first_shown = false; // NO PADDING FOR THE FIRST BUTTON
// IF LINK AND TITLE ARE NOT SET, USE DEFAULT FUNCTIONS
if ($link=='' and $title=='') {
$link = ($option['use_shortlink']) ? wp_get_shortlink() : get_permalink();
$title = get_bloginfo(); // OVERRIDE
$author = get_the_author_meta('nickname');
}
Can I do this in my functions.php because I´ll updating this plugin without changing this lines after every update.
Thanks
It is possible to filter the
get_bloginfo()
, but you’ll have to find a way to fine tune the conditional, because the override is global…Observation
get_bloginfo()
is the same asget_bloginfo('blogname')
.If the desired filter was
siteurl
, the filter would bepre_option_siteurl
.