aiosp_opengraph_meta

Need help with this?
Purchase All in One SEO Pack Pro to get dedicated support from us.

Buy Now

The All In One SEO Pack aiosp_opengraph_meta hook.

Description

$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.

Usage

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 = 'http://mynewurl.com';
        return $value;
    }
}

Defined (1)

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

/aioseop_opengraph.php

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

For instructions on how to use this code, please refer to our FAQ here.

  • Was this helpful ?
  • YesNo
[i]
[i]
Skip to toolbar