WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 6 years ago

#5113 closed enhancement (fixed)

text widget should have a text formatting option

Reported by: Denis-de-Bernardy Owned by:
Milestone: 2.8 Priority: normal
Severity: normal Version: 2.7
Component: Widgets Keywords: has-patch tested commit
Focuses: Cc:

Description

people need it on sometimes, and off other times (e.g. for a javascript). having the option to do this out of the box would be convenient.

Attachments (2)

text-widget.diff (1.9 KB) - added by Denis-de-Bernardy 7 years ago.
5113.diff (1.7 KB) - added by Denis-de-Bernardy 6 years ago.
updated patch for wp 2.8

Download all attachments as: .zip

Change History (23)

comment:1 @foolswisdom7 years ago

  • Keywords has-patch added
  • Milestone changed from 2.3.1 to 2.4

comment:2 @JeremyVisser7 years ago

Um, shouldn't autop be kind of implied? I mean, it is a text widget. If you want to use it for JavaScript, well, that's not what it was designed for. Create a new widget instead.

comment:3 follow-up: @JeremyVisser7 years ago

...as in, create your own custom widget via a plugin that doesn't run autop on its body text.

comment:4 @Denis-de-Bernardy7 years ago

and for forms?

comment:7 @Denis-de-Bernardy7 years ago

woops, nevermind those two last comments, they were for another ticket! :P

comment:8 in reply to: ↑ 3 @Otto427 years ago

Replying to JeremyVisser:

...as in, create your own custom widget via a plugin that doesn't run autop on its body text.

The text widget has always accepted straight, unformatted, html. Changing it like this in the middle of the game is kinda weak, a lot of people are using it for HTML, links, adsense scripts, etc.

This shouldn't be an option, it should not be doing autop on the text widget at all. If there's going to be options, then it should be the other way around entirely. wpautop should default to disabled.

comment:9 @Denis-de-Bernardy7 years ago

  • Component changed from Template to Administration
  • Version changed from 2.3 to 2.5

Any odds we'll see this enhancement in the core at some point?

comment:10 @Denis-de-Bernardy6 years ago

  • Milestone changed from 2.9 to 2.7.1
  • Version changed from 2.5 to 2.7

please?

comment:11 @DD326 years ago

  • Milestone changed from 2.7.1 to 2.8
  • Type changed from defect (bug) to enhancement

This sounds like an enhancement to current functionality, point releases are for bugfixes, So no, I highly doubt it.

comment:12 @ryan6 years ago

  • Component changed from Administration to Widgets
  • Owner anonymous deleted

@Denis-de-Bernardy6 years ago

updated patch for wp 2.8

comment:13 @Denis-de-Bernardy6 years ago

  • Keywords tested commit added

comment:14 @Denis-de-Bernardy6 years ago

I'd really like to stop needing to maintain my text widgets plugin, and mark it as "not useful as of WP 2.8".

It's just gory to scan through the widgets one by one, check if it's a text widget, and then replace the various callbacks as needed. (Using the new method, replacing the widget altogether is probably a better option, too...)

The same holds for link widgets (which also has a tried and tested patch): #9449

comment:15 @Otto426 years ago

Still -1 on this. I can see no need or reason to have this on the text widget.

comment:16 @Otto426 years ago

  • Keywords tested commit removed

comment:17 follow-up: @Denis-de-Bernardy6 years ago

  • Keywords tested commit added

Pardon, but... you might not see a use for this, but users who just want to insert two paragraph of text without needing to manually insert the paragraph tags definitely do.

These users include my many customers. For what it's worth as an information, they maintain, combined, several thousand sites. This lacking "feature" is one of those things that they immediately spot when my plugin happens to break during a WP upgrade.

To date, I've worked around the limitation with a text widgets plugin. It proceeds by replacing the built-in WP widget with a clone of the WP widget with the correct options. I'd honestly hate to need to rewrite it to fit the new WP architecture.

The patch would hit three birds with a single stone: the text widgets plugin (which currently leaves a WP 2.8 text widget untouched) would no longer be needed, sites that were using it wouldn't even notice (since the added setting is the same), and it would add a highly appreciated functionality to WP.

comment:18 in reply to: ↑ 17 @Otto426 years ago

Replying to Denis-de-Bernardy:

Pardon, but... you might not see a use for this, but users who just want to insert two paragraph of text without needing to manually insert the paragraph tags definitely do.

Wouldn't it be simpler to, you know, just add the paragraph tags? This just seems like unnecessary functionality for edge cases, at best.

comment:19 @Denis-de-Bernardy6 years ago

Not everyone likes to insert html tags in their content. I could name dozens of users who get nauseated whenever they see html code.

comment:20 @Denis-de-Bernardy6 years ago

could a core dev get in here and either commit or close as wontfix?

comment:21 @ryan6 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [11018]) Add option to run wpautop for text widget. Props Denis-de-Bernardy. fixes #5113

Note: See TracTickets for help on using tickets.