Marc St?mpfli
Forum Replies Created
-
Forum: Plugins
In reply to: [Thumb Fixer for Social Media] 1.7 breaks shortcode processing in page bodyWell, it’s doing what I need it to do on the site i’m working on. The first and 2nd change I posted. I haven’t had any problems, then again I haven’t tested for every possible angle this can break at.
For a perfect global fix I’d need to spend more time on it or if anyone else has time to finish what was started.
Forum: Plugins
In reply to: [Thumb Fixer for Social Media] 1.7 breaks shortcode processing in page bodyOk done.
$content = preg_replace('/\[.*?\]/', '', $content);
Just replace that line of code I added with this.
- This reply was modified 7 years, 4 months ago by Marc St?mpfli.
Forum: Plugins
In reply to: [Thumb Fixer for Social Media] 1.7 breaks shortcode processing in page bodyIt will only select [et_pb] tags.. if perhaps words are wrapped like this [random words] they will stay as is.
I’ve added an example that shows a word wrapped in square brackets.
- This reply was modified 7 years, 4 months ago by Marc St?mpfli.
Forum: Plugins
In reply to: [Thumb Fixer for Social Media] 1.7 breaks shortcode processing in page bodyI like your plugin, so I’ve decided to fix it for myself and anyone else having this problem with Divi theme.
So in the first if/else statement under apply_filters(). Add in the regular expression. It removes all content that begins with [et_pb and ends with the closing square bracket.
if($post_page_description) { $post_page_description = $post_page_description; } else { $post = get_post($post->ID); $content = apply_filters('get_the_content', $post->post_content); $content = preg_replace('/\[\/?et_pb.*?\]/', '', $content); $content_chars = substr($content, 0, 300); $page_description = strip_tags($content_chars); $post_page_description = str_replace(array("\n", "\t", "\r"), '', $page_description); }
Forum: Plugins
In reply to: [Thumb Fixer for Social Media] 1.7 breaks shortcode processing in page body
I’m using Divi theme and before it would pull the text directly from the content.. Now it shows the shortcodes.. If I add an excerpt it works, but I want it to pull the first few lines from the content of the post like it was before.- This reply was modified 7 years, 4 months ago by Marc St?mpfli.