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
Search in posts
Search in pages

wpdiscuz_source_to_image_conversion

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

Changelog

Added in version 7.0.4

Parameters

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

Usage

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

Was this article helpful to you? Yes No