Opened 9 years ago
Closed 3 years ago
#18330 closed enhancement (wontfix)
Add a Class functionality to wpautop()
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Formatting | Keywords: | has-patch |
Focuses: | Cc: |
Description
It would be nice to be able to add a class to <p> with wpauto as an optional arg.
Attachments (1)
Change History (5)
#1
@
9 years ago
- Milestone Awaiting Review deleted
- Resolution set to wontfix
- Status changed from new to closed
#3
@
3 years ago
- Resolution wontfix deleted
- Status changed from closed to reopened
I respectfully disagree with @scribu, and think this is a valid argument to make.
If the user wanted to go along the Bootstrap route, and apply the lead
class to paragraphs, it would need to be added directly to each p
element, not a container that encases them.
I believe many people will want this patch to be added, including myself.
Please consider re-evaluating this?
#4
@
3 years ago
- Resolution set to wontfix
- Status changed from reopened to closed
With no other requests in 6 years, I don't think this is a beneficial change to such a low-level function that's designed to be called as a filter on the_content
& friends.
Adding the class to a wrapping element is how you'd do it with standard CSS/HTML, I don't think Bootstrap is enough of a use-case to add it here.
While I can see the usage within some themes, if you're wanting to do things like this it seems likely that you'd be better off rolling an extra output filter on the text you're altering (such as only applying the change to the first <p>
or similar element) or running the specific text you're changing through the various functions you want directly.
I'm re-closing this as wontfix
pending more requests for the functionality.
Erm... no.
Instead of each paragraph having a class, wrap that particular group of paragraphs in a container and add a class to the container.
Then you can style the paragraphs just as easily.