Support » Plugin: Image Widget » [Plugin: Image Widget] [request] Network (domain mapping) Image link and URL

  • Resolved TCBarrett

    (@tcbarrett)


    Hello

    I’m using this in a network/multisite environment with domain mapping. The plugin does work, but the image sources and links use the non-mapped url.

    There is a filter to change the image source, but not one for the link. Here’s some example code how I use it:

    add_filter( 'image_widget_image_url', 'tcb_image_widget_image_url', 1, 3 );
    function tcb_image_widget_image_url( $url, $args, $instance ){
      if( is_multisite() ) :
        if( function_exists('domain_mapping_post_content') ) :
          $url = domain_mapping_post_content( $url );
        endif;
      endif;
      return $url;
    }

    Any chance of adding a similar filter to the ‘link’ setting, or wrapping a filter around the whole HTML chunk (to be passed through dm filter)?

    http://wordpress.org/extend/plugins/image-widget/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Image Widget] [request] Network (domain mapping) Image link and URL’ is closed to new replies.