wpDiscuz 7 API Documentation

  1. Home
  2. Docs
  3. wpDiscuz 7 API Documentation
  4. Filters
  5. wpdiscuz_source_to_image_conversion
Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors


This hook can be used for changing the HTML after converting image URL to the image.


Added in version 7.0.4


1. $content (type: string) – the image with URL
2. $url (type: string) – the URL of the image


add_filter("wpdiscuz_source_to_image_conversion", function ($link) {
    return preg_replace('~]+>(]+>)~is', "$1", $link);

Was this article helpful to you? Yes No