Help changing text links by images in im store links

Tagged: , , , ,

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #54455
    Xpark Media
    Keymaster

    @danielgm,

    The plugin uses it’s on hooks just like WordPress to allow you to make modification without editing the code. That way you can update the plugin at any time.

    You can use is these two hooks

    function  change_image_store_links( $link, $data ){
    if( $data[ 'value' ] == 'something'  ){
    // modify link here
    $link = "my-new-link";
    }
    return $link;
    }
    add_filter( 'ims_image_link', 'change_image_store_links' )
    

    You can use add_filter( 'ims_image_data', 'my_function' ) to modify the data provided in the previous function.

    You can add additional links by using add_filter( 'ims_image_tag_meta', 'my_function' )

    I hope this helps

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.