The All In One SEO Pack aiosp_opengraph_meta hook.


$filtered_value = apply_filters( ‘aiosp_opengraph_meta’, $filtered_value, $t, $k, $v, $extra_params );

Parameters (5)

0.$filtered_value (string)
the value of the meta tag.
1.$t (string)
the name of the social network.
2.$k (string)
the meta tag without the network name prefixed.
3.$v (string)
the meta tag with the network name prefixed.
4.$extra_params (array)
extra parameters that might be required to process the meta tag.


Here’s an example of how the code can be used:
add_filter('aiosp_opengraph_meta','aioseop_change_my_og_url', 10, 5);
function aioseop_change_my_og_url ( $value, $type, $field, $v, $extra_params ){
     /**this will allow you to change your OG URL
     *this is only an example, in real life you'd likely want to check for
     *more things, such as the post ID to only run the code where you want it
    if( $field == 'url' ) $value = '';
        return $value;

Defined (1)

The filter is defined in the following location(s).


This hook was added in version 3.0 of All in One SEO Pack.