WordPress.org

Ready to get started?Download WordPress

Forums

Not Stripping HTML widget titles = Feature Bloat? (9 posts)

  1. dannyjimmy
    Member
    Posted 2 years ago #

    With total respect for @ipstenu and other wp core devs, I guess i find myself a bit confused by a response from this thread:

    http://wordpress.org/support/topic/text-widgets-allow-html-tags-in-title-field?replies=10

    If WordPress always added in features that are basic, but not NEEDED, then we would have severe feature bloat. There has to be a bigger use-case, more people needing it, for it to make it into core.

    I guess I'm confused because it would seem to me that stripping HTML would be a feature (it's an action), and leaving HTML (an inaction) would be the default, so I guess I don't see why it would be bloaty to (as I would consider it) "remove the widget title HTML stripping 'feature'".

    (of course, this plugin will do the job just fine: http://wordpress.org/extend/plugins/linkable-title-html-and-php-widget/)

    I welcome being corrected in my naievete :-)

    Thanks,

  2. dannyjimmy
    Member
    Posted 2 years ago #

    Oops, I stand corrected, that plugin actually doesn't do the trick i'm wanting it to do. It just creates a uber-text widget where you can put php and have the title be a link. But it doesn't mean I can make a buddypress "Groups" widget link to All Groups, or "Recent Topics" widget to All Topics, etc.

    So I understand that there was some "vote tracking" going on, so you can add me to the list of ppl who want to be able to have widget titles be links.

  3. The point I was making is just that us wanting something doesn't make it best for everyone :) This issue pops up pretty rarely, and by very few people. In part it's a UI conundrum. Should we link to titles, or make a list of links? What's the purpose of having a link in the title, followed by content? Is it better to have Title, Content, ReadMore?

    I don't know yet. But I do know that the number of people who ask about this are surprisingly few, which tells me it'd be cool, but we're not there yet.

    My personal concern is that allowing any HTML in the widget title would cause problems when people goof their HTML. I'd like to see someone write a plugin that put in an option 'Title Links To...' and you put in a URL. That gets wrapped around the header and can be sanitized to prevent shenanigans.

    But basic HTML in a widget title means you change the view of each and every widget, which would be inconsistent and confuse people. CSS allows you to change most everything for titles, even per widget, just not make some letters one color/size/bold, and others another.

  4. dannyjimmy
    Member
    Posted 2 years ago #

    Gotcha. Consistency is good. Occasionally I forget that WP benefits from limiting people a lot, and then letting others hack their way out of the limitations. Which leads me to:

    I just accidentally discovered (via a typo) a way to get what I wanted, which is a link in the widget title. It's super funny and makes me laugh.

    Before the widget in question, add a text widget, and make its contents be this:

    <a href="/my_link">

    That's it. It will make your next header link to /my_link.

    Isn't that fun? :-)

    Oddly though, on some widgets, (namely "Groups" and "Members" [yup i'm a buddypress guy]) it makes them be the a: color and on some widgets the color doesn't change but it's still a link.

  5. dannyjimmy
    Member
    Posted 2 years ago #

    PS @ipstenu, it wouldn't actually be that inconsistent, because I got the idea in the first place from RSS widgets. (whose title, ironically, I wish I could make be not a link)

  6. RSS Widget isn't actually doing what I was thinking (and it's a link because the widget was built to be a link).

    A better way I'd think would be this:

    Label: Plain text
    Title Attribute:
    URL: URL
    CSS Classes (optional):
    Open link in a new window/tab:
    Content:

    Kind of like we do for Menus! Which ... I think widgets could be better if they were like menus ;) I mean, a menu I can add style too as I want to!

  7. ChrisJeffery
    Member
    Posted 2 years ago #

    I think this problem is more complex than just being able to add links.

    While this is the most common reason for this discussion, there are also other issues, like people wanting to replace widget titles with images, or in my case, translation.

    I want to be able to use <!--:en--> language tags in widget titles.

    Is there a simple way of doing this that I don't know about - it seems like this is a lot harder than it should be!

  8. ChrisJeffery
    Member
    Posted 2 years ago #

    nevermind. After hours of searching, I post on forum and immediately discover that quick tags [:en] work just fine.

  9. lauramdavies
    Member
    Posted 1 year ago #

    I just want to post to put in a vote that widget titles should not strip HTML. I'm not sure how you are counting people who want this feature (or as someone else points out, removal of the existing stripping of HTML feature) - particularly since most of the threads mentioning this issue are closed to comments. It seems an obvious and likely very common issue. I just want to make my title a link.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.