Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter srlaura

    (@srlaura)

    For reference, for now I have added the following code to the remove_images function in wp-print.php:

    function remove_image($content) {
    	$content= preg_replace('/<img(.+?)src=[\"\'](.+?)[\"\'](.*?)>/', '',$content);
    	### Also remove entire <figure> elements and child elements
    	$content= preg_replace('/<figure\b[^>]*>(.*?)<\/figure>/', '',$content);
    	return $content;
    }
    • This reply was modified 4 years, 11 months ago by srlaura.
Viewing 1 replies (of 1 total)