Jump to content

Help with Preg_replace


jalexanderdh

Recommended Posts

My client's newsletter has a problem and I need to fix it.

It is a hardcoded newsletter built for wordpress, but it is showing these messy shortcodes:

 

[caption id=attachment_xxxx" align="desiredalignment" width="xx" caption="Whatever caption text] <--! actual image shows here-->[/caption]

 

It has this line -

$text=preg_replace('/\<p class\=\"imagecaption.*?\/p>/i', '', $text);

 

I was thinking I need to change something in preg_replace to filter the caption shortcode - can anyone help?

Link to comment
https://forums.phpfreaks.com/topic/192369-help-with-preg_replace/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.