Closed pdewouters closed 10 years ago
It's a really complicated function.
What about hooking in to the_content
at a later priority and converting <p><img .../></p>
to <img />
? Probably easier than forking the function or mucking with its internals.
Hi Mark, Thanks for creating this repo and giving people a chance to ask you questions directly. I'm sure this is going to be a great resource.
Recently, I had the need to stop the wpautop filter from wrapping images in paragraph tags, so I followed @rarst 's suggestion to fork the core function , as it didn't provide a filter to change the list of elements that don't get wrapped.
http://wordpress.stackexchange.com/a/37656
Is this the best approach? Would it be a good idea to add some filters in this function to allow modifying the list without foking the function?
Another one that is often forked is the gallery shortcode function, although it does have a few filters, but in the case I want all the galleries to have custom parameters by default, for example, no itemtag and a custom thumbnail size, it's easier for the users if it's done for them, as it's not in the UI, rather than relying on them to add parameters to the shortcode
Thanks!