• Love this plugin. Thank you.

    Most annoyed at behaviour of WP editor. It changes and removes some characters from my inserted PHP code. Makes life difficult (impossible?).

    Most recent case:

    I’m trying to use the PHP condition
    <=
    but WP editor changes it to
    < =
    which generates a PHP syntax error.

    Another example, if I use the PHP condition
    <
    in my code, WP editor removes the next instance of
    </a>
    completely that happens to follow it in the PHP code even though it is part of a string expression.

    Is there some way to configure the WP editor to stop doing this? Sometimes WordPress makes me think I need to move to another platform which isn’t so overprotective.

    • This topic was modified 7 years, 5 months ago by dccharron.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author WillBontrager

    (@willbontrager)

    Hi (love your photo).

    It shouldn’t be doing that.

    Verify you’re using the “Text” tab instead of the “Visual” when editing. If that’s not the reason, there may be a plugin that’s interfering; they can be tested by temporarily deactivating each in turn.

    If your PHP code can run outside the WordPress environment, consider uploading them as stand-alone scripts and then using the Insert Here plugin ( https://www.willmaster.com/software/WPplugins/insert-here-wordpress-plugin.php ) to publish their output.

    Will

    Thread Starter dccharron

    (@dccharron)

    Many thanks for taking the time to reply.

    (My avatar is a photo of me circa 1953 – hence the black and white)

    Definitely using “Text” editing mode so that’s not the issue.

    The problem is happening on a live commercial website (which makes it a bit hard to test on/off of each plugin in turn) and uses your plugin extensively to do some fancy things. As it turns out, I’ve recently built a copy of the website in French and German that aren’t “live” yet so I’ll try duplicating the problem on one of those sites and let you know of my progress.

    Thread Starter dccharron

    (@dccharron)

    Just a follow up. Having a look at your “insert here” plugin. Looks very promising. Will try it out and let you know.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘WordPress Editor changes PHP code on Save’ is closed to new replies.