Thanks for answer. As far as I am creating my own plugin, I have done $content dump a lot of times.
Lets clarify all moments.
I am using Text Editor for post, not Visual, because Visual one adds some markup.
1. As I’ve described, to be sure that my plugin or any other plugin can cause this problem, I installed pure wordpress distro. But the problem still exists. Without any plugin. You can try by your own. If tag is not closed all content after code snippet starts to look weird.
2. Here are images that I posted earlier (but inserted incorrect link)
First :

Second:

Third:
3. My plugin just takes code between shortcodes, processes it, saves to db and than output formatted code.
Here is unformatted code :
[code-highlight line-numbers="table" linenostart="53" highlight-lines="1,3,8" style="native" lang="html+php" pyg-id="1" ]
<?php
//This callback registers our plug-in
function wpse72394_register_tinymce_plugin($plugin_array) {
$plugin_array['wpse72394_button'] = 'path/to/shortcode.js';
return $plugin_array;
}
//This callback adds our button to the toolbar
function wpse72394_add_tinymce_button($buttons) {
//Add the button ID to the $button array
$buttons[] = "wpse72394_button";
return $buttons;
}
?>[/code-highlight]
And now formatted code that goes directly to the output
<table class="highlighted-source native html-php table"><tr><td class="linenos"><div class="linenodiv"><pre>53
54
55
56
57
58
59
60
61
62
63
64
65
66</pre></div></td><td class="code"><div class="highlighted-source native html-php "><pre><span></span><span class="hll"><span class="cp"><?php</span>
</span><span class="c1">//This callback registers our plug-in</span>
<span class="hll"><span class="k">function</span> <span class="nf">wpse72394_register_tinymce_plugin</span><span class="p">(</span><span class="nv">$plugin_array</span><span class="p">)</span> <span class="p">{</span>
</span> <span class="nv">$plugin_array</span><span class="p">[</span><span class="s1">'wpse72394_button'</span><span class="p">]</span> <span class="o">=</span> <span class="s1">'path/to/shortcode.js'</span><span class="p">;</span>
<span class="k">return</span> <span class="nv">$plugin_array</span><span class="p">;</span>
<span class="p">}</span>
<span class="hll"><span class="c1">//This callback adds our button to the toolbar</span>
</span><span class="k">function</span> <span class="nf">wpse72394_add_tinymce_button</span><span class="p">(</span><span class="nv">$buttons</span><span class="p">)</span> <span class="p">{</span>
<span class="c1">//Add the button ID to the $button array</span>
<span class="nv">$buttons</span><span class="p">[]</span> <span class="o">=</span> <span class="s2">"wpse72394_button"</span><span class="p">;</span>
<span class="k">return</span> <span class="nv">$buttons</span><span class="p">;</span>
<span class="p">}</span>
<span class="cp">?></span>
</pre></div>
</td></tr></table>
This code works because of <span class="cp">?></span>
Again this problem is not in my plugin.
4. It doesn’t work even with following HTML `<span><</span><span>?</span>php</span>
</span>` content is just missing, only one line after code snippet is present, no html at all than.
Maybe I am going crazy but I have no idea what is wrong. I am not aware of each core part of WordPress maybe there is core filter that tries to fix unclosed tags ..
[Moderator note: Please, no bumping.]
-
This reply was modified 8 years, 5 months ago by
crosp.
-
This reply was modified 8 years, 5 months ago by
crosp.
-
This reply was modified 8 years, 5 months ago by
Steven Stern (sterndata).