Viewing 2 replies - 1 through 2 (of 2 total)
  • Michael Torbert

    (@hallsofmontezuma)

    WordPress Virtuoso

    Hi,

    We have a lot of filter hooks (and add more all the time as needed), so all don’t have documentation yet.

    The filter hook is called aiosp_opengraph_meta. The first argument is the value of the meta tag, the second is the platform (facebook, twitter, etc) and the meta tag itself (ex: url).

    Here’s a rough example.

    add_filter( ‘aiosp_opengraph_meta’, ‘ abcfolio_filter_imgurl’, 10, 3 );

    function abcfolio_filter_imgurl( $value, $type, $field ) {
    if ( $field == ‘url’ ) {

    //code to get image url here

    $value = $img_url;
    }
    return $value;
    }

    Thread Starter abcfolio

    (@abcfolio)

    Thank You.

    It’s a very nice filter. Makes it quite easy to modify or remove all meta properties.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘og:image filter’ is closed to new replies.