Opened 14 years ago
Closed 14 years ago
#11249 closed enhancement (fixed)
wpautop no longer a standalone function
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 2.9 | Priority: | normal |
Severity: | normal | Version: | 2.9 |
Component: | Formatting | Keywords: | has-patch |
Focuses: | Cc: |
Description
Something that generally annoys me is inter-file dependencies of wp-includes. I would like for each of the files to be self-contained so you can include one and get everything you need from it.
A good recent example of us breaking this is with formatting, and wpautop in particular. You can no longer include formatting.php and call that function without including all of WP because it relies on a function called get_shortcode_regex().
Here's a one-liner that makes wpautop independently useful again with a simple function_exists.
Attachments (1)
Change History (8)
#4
@
14 years ago
- Milestone set to 2.9
- Resolution wontfix deleted
- Status changed from closed to reopened
Agreed with Westi, but there's still no point for this particular one. As the author of autop is was always designed to be standalone so there's no reason not to fix this. It's not even a good dependency, it's literally a wrapper for an echo. I'm happy to just commit this, and was going to, just wanted to post it as a bug in case there is any overwhelming reason not to or unintended side-effect.
#5
@
14 years ago
I'm the one who put this in. I'm fine with function_exists
as a quick and low-impact solution to the interdependency issue.
I doubt we can ever be in the situation where all wp-includes files are standalone and they all still have functionality unless we merge them all into one file.
We have interdependency so that we don't duplicate code.