Opened 7 years ago
Last modified 7 years ago
#42849 new feature request
Custom HTML Widget: Allow user to be able to bypass lint errors to save
Reported by: | skoen | Owned by: | |
---|---|---|---|
Milestone: | Future Release | Priority: | normal |
Severity: | normal | Version: | 4.9 |
Component: | Widgets | Keywords: | needs-patch |
Focuses: | Cc: |
Description
In the custom HTML widget I have some div ids that are the same, and for some reason I can't save the edited widget after updating to 4.9. I would like an ignore button to be able to save the content inside a widget, especially the custom HTML widget. I don't want WordPress' brand new HTML checker feature to override code that is working completely fine.
Would it be possible to do that, or make it so that you can at least checkmark something to be able to save the widget.
The error it is bugging me about is this:
<div id="widget4"><i class="fa fa-arrow-circle-right"></i> <a href="http://hamarradioen.no/om-oss/"><p>Dette er HamarRadioen</p></a></div> <div id="widget4"><i class="fa fa-arrow-circle-right"></i> <a href="http://hamarradioen.no/om-oss/ansatte/"><p>Ansatte</p></a></div>
Because I have two or more widgets using the same formatting it actually wants me to change them, and in that case break the formatting just to please itself. I have made websites for over 20 years, I don't need a WordPress feature «for dummies» to tell me how to write my HTML code.
Attachments (1)
Change History (11)
#2
@
7 years ago
Took a quick stab at this and got it working for the HTML widget outside of the Customizer. I don't know much about the api, but doing this within the wp.customize.Notification
realm seems a bit difficult at the moment.
Uploading my diff, but it's definitely not ready. Might help whoever picks this up next :)
Couple of things needed of the top of my head:
1) Passing down onChangeLintingErrors
doesn't feel right, but couldn't find a better way given the setup.
2) Interactions with setCustomValidity
don't feel right either.
3) Of course needs to work on the Customizer side as well.
4) Just noticed the checkbox and label need id
and for
attributes.
This ticket was mentioned in Slack in #core-customize by westonruter. View the logs.
7 years ago
#4
@
7 years ago
- Summary changed from Ignore html «error» to Custom HTML Widget: Allow user to be able to bypass lint errors to save
Yes, we added the ignore ability to Custom CSS in Customizer and the Theme/Plugin editor but we didn't add it to the Custom HTML widget yet.