Digg Digg extra paragraph bug
-
Hello again,
Thank you for your usefull plugin.
I had small bug with Digg Digg. Activating floating display adds extra new lines to posts begining with a paragraph (“<p>”).
It was caused by “” added by Digg Digg integrateFloatingButtonsIntoWpContent function, with this line of code:
$content = $dd_start_anchor . $content . $dd_end_anchor . $dd_floating_bar;
The problem comes from this extra content between “my” post paragraph “<p>” and WordPress automatically added paragraph. e.g. : “<p><p>My post</p></p>”
To fix this issue, I had to make small changes in integrateFloatingButtonsIntoWpContent function, in order to place “dd_start” after first <p>, here is my code:
$check_pos = strpos($content, '<p>'); if ($check_pos === false || $check_pos != 0) $content = $dd_start_anchor . $content . $dd_end_anchor . $dd_floating_bar; else $content = '<p>' . $dd_start_anchor . substr($content, 3) . $dd_end_anchor . $dd_floating_bar; }
return $content;
Can you please apply this patch to Digg Digg or fix this issue the way you want.
My posts were writen in wordpress text editor, so they weren’t formated as standart wordpress posts, thats why they start with a paragraph.
Best regards
- The topic ‘Digg Digg extra paragraph bug’ is closed to new replies.