#10287 closed enhancement (fixed)
split wp-includes/classes.php into single-class files
Reported by: | dd32 | Owned by: | nacin |
---|---|---|---|
Milestone: | 3.1 | Priority: | low |
Severity: | trivial | Version: | |
Component: | General | Keywords: | |
Focuses: | Cc: |
Description
Right now, wp-includes/classes.php
contains a selection of classes which WordPress uses internally. I'd like to see the file broken up into a few subclasses to ease integration with other software's which may use parts of the WordPress core.
Whilst i realise there are not too many there, the files 1600 lines long, It takes a bit to dig through it sometimes.. and like i said, it'd help integration with other software (Primarily thinking of the WP_Error stuff there)
Current classes:
[138] => WP [139] => WP_Error [140] => Walker [141] => Walker_Page [142] => Walker_PageDropdown [143] => Walker_Category [144] => Walker_CategoryDropdown [145] => WP_Ajax_Response
The Walkers could all go in a single file.. the ajax response and WP could stay as one, and the error put into its own file too..
Just thoughts from me, seeking feedback from others.
(My whole reasoning for this ticket, is that i was hoping not to duplicate the code too much for just wanting to include WP_Error in a semi-standalone script which utilises a few of WordPress's helpful files)
Change History (12)
#2
@
15 years ago
I've always wanted to put the page and category walkers in the corresponding templates files alongside the functions that call them. That sound okay?
#3
@
15 years ago
I've always wanted to put the page and category walkers in the corresponding templates files alongside the functions that call them. That sound okay?
Sounds good to me, I was going to do that for a future walker which i've got in a upcoming patch anyway :)
#6
@
14 years ago
- Milestone changed from Awaiting Triage to Future Release
- Owner set to nacin
- Status changed from new to accepted
#8
@
14 years ago
- Keywords dev-feedback removed
- Milestone changed from Future Release to 3.1
Need to write file-level phpdoc, move the walkers next to the callers, and svn rm classes.php.
+1
I've had the same thought many times.