How to filter whole meta tag?


Use auto filters. If you have value like this:

<meta property="og:title" content="WordPress Trunk" />

Then auto filter is created like this:

og_ + (word before “:”) + _ + (word after “:”) + _meta

In this case:

og_og_title_meta

add_filter('og_og_title_meta', 'my_og_og_title_meta');
function my_og_og_title_meta($title)
{
    if ( is_home() ) {
        return '<meta property="og:title" content="WordPress Title" />';
    }
    return $title;
}