Opened 17 years ago
Closed 17 years ago
#8505 closed defect (bug) (fixed)
Changes in [9809] to class.wp-scripts.php introduce external dependencies to BackPress
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 2.7 | Priority: | normal |
| Severity: | normal | Version: | 2.7 |
| Component: | I18N | Keywords: | needs-patch |
| Focuses: | Cc: |
Description
[9808] introduced a call to an external JavaScript function "convertEntities" from a BackPress file, class.wp-scripts.php - this creates an external dependancy on the function that resides in wp-admin/admin-header.php
The attached patch puts that function inline inside of class-wp-scripts.php, which removes the external dependancy by internalising the function and also has the added benefit of only loading the function when it is explicitly required.
Attachments (4)
Change History (7)
#2
@
17 years ago
- Keywords needs-patch added; BackPress has-patch removed
- Resolution fixed deleted
- Status changed from closed to reopened
This is an utility function much like addLoadEvent() that should be loaded before any localized script file. The proper place for it would be in admin-header.php.
Don't think this is a new dependency problem, since loaded scripts may also depend on addLoadEvent() which is not a part of class.wp-scripts.php. The current patch also prints it 5-6 times in the HTML head.
(In [10086]) Move convertEntities js function into the BackPress scriptloader. Fixes #8505 props sambauers.