Title: [Plugin: Preserved HTML Editor Markup] PHP code snippets not preserved
Last modified: August 20, 2016

---

# [Plugin: Preserved HTML Editor Markup] PHP code snippets not preserved

 *  Resolved [cwlee_klagroup](https://wordpress.org/support/users/cwlee_klagroup/)
 * (@cwlee_klagroup)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-preserved-html-editor-markup-php-code-snippets-not-preserved/)
 *     ```
       Original code loaded into HTML editor
   
       <!--  preserved-html-editor-markup TEST 2 -->
   
       <!-- test of PHP code -->
       <?php include("/includes/testimonials/CPSL-testimonial.php"); ?>
       [include file="CPSL-testimonial.php" path="/includes/testimonials"] 
   
       <!-- End preserved-html-editor-markup TEST 2 -->
   
       Code returned by TinyMCE Visual Editor with preserved-html-editor-markup plug-in activated  
   
       <!--  preserved-html-editor-markup TEST 2 -->
   
       <!-- test of PHP code -->
       <!--?php include("/includes/testimonials/CPSL-testimonial.php"); ?-->
       [include file="CPSL-testimonial.php" path="/includes/testimonials"] 
   
       <!-- End preserved-html-editor-markup TEST 2 -->
       ```
   
 * RESULT = PHP statement returned commented out
 * [http://wordpress.org/extend/plugins/preserved-html-editor-markup/](http://wordpress.org/extend/plugins/preserved-html-editor-markup/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [MarcusPope](https://wordpress.org/support/users/marcuspope/)
 * (@marcuspope)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-preserved-html-editor-markup-php-code-snippets-not-preserved/#post-2801580)
 * Interesting, I tried this multiple times and could not reproduce the behavior.
   The php code block was preserved as I entered it into the html editor. Can you
   verify this behavior with just my plugin installed? And what plugin are you using
   for the `[include]` shortcode? I’ll try my plugin with that if it’s a community
   plugin.
 * Thanks,
    Marcus
 *  Thread Starter [cwlee_klagroup](https://wordpress.org/support/users/cwlee_klagroup/)
 * (@cwlee_klagroup)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-preserved-html-editor-markup-php-code-snippets-not-preserved/#post-2801582)
 * Hi Marcus,
 * The plug-in most likely causing the `<?PHP>` commenting problem is “Magic-fields”(
   Version 1.5.8.3). I can’t turn off this plug-in as our site functionality is 
   based on its Custom Write Panels. (We built the site back before WordPress supported
   custom page types when Magic-Fields was the only way to do that.)
 * The plug-in we currently use to work around TinyMCE’s PHP filter is ‘AmberPanther
   WP Include File’.
 *  Thread Starter [cwlee_klagroup](https://wordpress.org/support/users/cwlee_klagroup/)
 * (@cwlee_klagroup)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-preserved-html-editor-markup-php-code-snippets-not-preserved/#post-2801596)
 * Hi Marcus,
 * I was able to resolve this issue. The root problem problem is not related to 
   your plug-in and it is not caused by any incompatibility between your plug-in
   and Magic-Fields.
 * The problem was caused by invalid data in my Magic Fields tables. Once I cleaned
   the tables up, everything worked as it should. Follows is a link that explains
   the problem and resolution in more detail.
 * About halfway down is an entry posted by ‘figureone’ that starts with… “Ok, so
   I fixed this problem. In short, it was caused by orphaned field entries in the
   wp_mf_panel_custom_field table.”

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘[Plugin: Preserved HTML Editor Markup] PHP code snippets not preserved’
is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/preserved-html-editor-markup.svg)
 * [Preserved HTML Editor Markup](https://wordpress.org/plugins/preserved-html-editor-markup/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/preserved-html-editor-markup/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/preserved-html-editor-markup/)
 * [Active Topics](https://wordpress.org/support/plugin/preserved-html-editor-markup/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/preserved-html-editor-markup/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/preserved-html-editor-markup/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [cwlee_klagroup](https://wordpress.org/support/users/cwlee_klagroup/)
 * Last activity: [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-preserved-html-editor-markup-php-code-snippets-not-preserved/#post-2801596)
 * Status: resolved