Changing bloginfo description from a plugin

How can I change the site’s bloginfo description in runtime from a plugin?
I tried these, but none of them work:

add_filter('description', 'ab_arq_generate');
add_filter('blogdescription', 'ab_arq_generate');

My point would be to make a random quote in the place of the description regardless of the actual template.

1 Answer
1

You’re lookign for the bloginfo filter.

<?php
add_filter( 'bloginfo', 'wpse33522_change_bloginfo', 10, 2 );
function wpse33522_change_bloginfo( $text, $show )
{
    if ('description' == $show) {
        $text="Some New Description";
    }
    return $text;
}

Leave a Comment