Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    Nope, not in this plugin, it doesn’t. The PHP Code widget is not a derivative of the built in text widget. It does not include the new 4.8 text widget code, it is a separate widget entirely.

    Edit: If it does, then that would be *very* strange. There should not be any tabs at all in the PHP Code widget. I’ll investigate further.

    Thread Starter dgirona

    (@dgirona)

    Thanks!

    My solution has been to program a widget : )

    Plugin Author Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    Just to follow up on this, I can confirm that the PHP Code widget does not have the new HTML editor that the default text widget does in 4.8.

    WordPress adds the TinyMCE editor specifically to Text Widgets, not to all textareas in general. Since the PHP Code widget has no code to enable the use of the TinyMCE editor, it just shows a plain text box, like always.

    Now, if you don’t have Admin or Editor permissions on the site, then that means you don’t have the “unfiltered_html” capability in WordPress. And in such a case, yes, your PHP code will be filtered out of the widget. That is not new behavior, nor is it caused by any changes to WordPress 4.8. The PHP Code widget has always required that you have unfiltered_html in order to use the widget.

    Thread Starter dgirona

    (@dgirona)

    OK thanks.

    I am web administrator, and before the update the widget worked correctly. Do you know how I can solve the “unfiltered_html” problem?

    Plugin Author Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    There is no problem, and there is nothing that changed from the “update”.

    If you are not an Administrator or Editor of the site, or you otherwise have unfiltered-html disabled in some way, then you cannot put code into the widget, same as you cannot put any arbitrary HTML into the text widget.

    In other words, nothing changed from the 4.8 update. There is literally no difference between 4.7 and 4.8 as far as this widget is concerned. If you’re seeing a difference, then it was not because of 4.8.

    So, you need to find out what the actual difference is. If you were able to put in code before, and cannot anymore, then somehow, you turned off the unfiltered_html setting. Maybe you added some kind of security plugin? Maybe your security plugin got an update? Who knows.

    Basically, do the simple troubleshooting steps. Turn off your other plugins. Switch to a default theme. Find out what is actually causing whatever problem you’re seeing, and then you are one step closer to figuring it out.

    There is *no* change in this plugin’s behavior between 4.7 and 4.8. You’re looking in the wrong place, and blaming the wrong cause.

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

The topic ‘Php code disappears’ is closed to new replies.