20 Comments

  1. Brin

    – well, that’s all a bit complicated. I wonder why they didn’t just stop the current text widget from changing pasted in HTML?

    Report

  2. Eugene Kopich

    What about adding a link field for the image in the image widget?

    Report

    • Mel Choyce

      Hey Eugene, the image widget does have a link field. When you’re adding your image, there’s an option in the media modal to add a link, just like when you’re adding an image to your post or page: https://cloudup.com/cAlQvZCsymD

      You can also go back and edit or add a link by clicking “edit image” later.

      Report

  3. Dave

    That’s probably good news. I’ll admit that I wish one widget handled all that, but that may be asking too much.

    I had noticed that HTML could be busted in the same way that you can do it in the post editor:

    You go into text mode in the editor, stick in some HTML, and save. So far, good. Then you go back in for some reason, and you’re in Visual mode (or switch to it). If you happen to save then, whether changing something or not, the HTML (or shortcode, etc.) might bust.

    Given that both contexts use Tiny, this is no surprise.

    Report

  4. Peter

    I don’t get the point of all these widgets. All functionality can be handled with one HTML + TINY like it is in WP editor. Special image widget, special text widget … what will be next – Text with bold font? Why WP is every update more complicated and bloated? This way after few years WP will need Microsoft-like, complicated lost in the legacy engineers to maintain it. Adding this and that would be not huge issue, if the system is modular and parts are removed after new are added. But the status is, that while something is there, it will stay there until the end of WP.

    Report

    • fwolf

      Its what they call “Feature Creep”. A horrible disease, and just a big pointer towards FORKING IT, or going someplace else. Just .. where?

      cu, w0lf.

      Report

      • Peter

        One day one theme designer will recognize that for white background, five menu items, black text … (in your case, dark background and white text obviously) he don’t need to learn JavaScript, bc. he don’t need it. Also one user will recognize that he don’t need a pop up communicating with API if he want to show online a big fish he get during last weekend. Then something cool will happen.
        Some nice movement already exist in the area of flat-file or static websites systems.

        Report

      • Peter

        or going someplace else. Just .. where?

        Drupal 8.4 will be released in october with improved media handling. I really can’t wait it as i definately will leave WP.

        Report

      • Peter

        Drupal is overkill for most websites and too complicated. Sometimes even simple task can took whole night ;)

        Report

  5. Cavalary

    Still think it should be one simple “stay out of my code” checkbox wherever you can type anything, to make it take and accept the input as plain text and not butt in, likely with “but still add [ ] line breaks [ ] paragraph breaks” below it if checked. And maybe a separate “do not replace characters” checkbox too, if you want everything exactly as typed, no “nice” quotes, apostrophes, dashes and so on, symbols not replaced with codes, that sort of thing.

    And if switching between checking and unchecking, so between visual and plain, it would switch the view accordingly, revealing code if box is checked, showing how it’d look if the box is unchecked. No different widgets, tabs, whatever, just something to click right under the editing area, wherever it is, simple and consistent.

    Report

  6. Matt

    Widgets are legacy and their continued use shouldn’t be encouraged. Breaking while enhancing existing ones, creating new ones, etc shouldn’t be a focus of any WP release this year. It would save people grief.

    Widgets are more problematic than shortcodes but unlike shortcodes they’re also theme and widget area dependent with no official way to change that behavior. The whole “inactive widgets” situation just needs to go away.

    The Widgets code could be removed from core, along with the Widgets screen and the customizer enhancements now that Gutenberg is going the blocks route. To leave it in is just legacy bloat since they’ve already decided widgets and shortcodes are legacy. Talk about your mixed messages. LOL.

    Report

    • Peter

      Oh really Matt? Well..if so you could have even told this:

      WP is legacy and its continued use shouldn’t be encouraged.

      WP is getting more problematic than other CMSs. The whole “cluttering” situation just needs to go away.

      Instead of just removing widgets and reinvent their functionalities with some other called features what if you invented proper media handling to tell the least? Somehow that area just never gets the improvements it would really need. If there are so many devs willing to contribute to core, they should improve that area first instead of touching/removing anything that already exists, works and people rely on.

      Report

  7. Jesse

    Agree 100% with Cavalary above. Should just be an option per page, post, widget, etc. The movement toward semantic, cleaner code and all that is excellent, I get it. But let’s stay on target. Up to here with Tiny’s filters stripping code and having to write functions or use CSS to circumvent that. Then again, maybe I just don’t see the whole picture.

    Report

  8. X-Raym

    Why not stay with the simple 5 line code to handle HTML and also PHP inside the regular text widget ?

    https://wploop.com/run-php-code-text-widget-wordpress/

    Unless this new widget supports PHP ?

    Report

    • Collins Agbonghama

      Running PHP in post or page is i think a bad idea considering the code uses eval which is considered evil.

      This could lead to some serious security issues if an exploit is discovered.

      Report

    • Otto

      Your simple 5 line code has zero security. If you want to do something so foolish as to run PHP code from inside a widget, use a widget designed for just that. It’s as secure as it can be, for such a non-secure thing to do.

      https://wordpress.org/plugins/php-code-widget/

      I recommend not using this unless you know exactly what you’re doing. But it’s there if you need it.

      Report

  9. David Brugge

    The approach to so many of these features seem to drift more and more into Microsoft’s overarching philosophy. They say, we’ve come up with these really neat improvements which our test marketing says everyone wants. Now take the improvements and shut up. What to break from the crowd and do things differently from others? Don’t expect any cooperation from us-our marketing knows what is best.

    Report

  10. Gabri

    Can I paste JS code too?

    Report

  11. Dave

    I just updated to 4.8.1. I found that on one of my sites a portion of the page suddenly looked very strange afterward, with extra space above a particular site area.

    This was a text widget with just a shortcode in it, nothing else.

    It was tricky to track down – unlike most such appearance quirks/errors, it wasn’t CSS this time. I tracked it down to paragraph opening and closing tags with no content.

    After fiddling some more, I replicated the problem in the same way I did in my other comment above. (to reiterate) If I stick HTML code or a shortcode into a text widget, make sure there are no extra spaces, and save it in Text mode, all is well. If I go back in, change nothing, make sure there are no extra spaces, and happen to save it in Visual mode, this magic annoying extra bit of empty paragraph code appears, and things look funny.

    It sort of seems like wpautop gone awry. :)

    I’m thinking that if someone has their CSS set to add no padding or margins for paragraphs, this may slide by unnoticed on their site, even if the errant P tags are there.

    The good news – the Custom HTML widget seems to be working.

    Report

Comments are closed.

%d bloggers like this: