Opened 18 years ago
Closed 18 years ago
#8505 closed defect (bug) (fixed)
Changes in [9809] to class.wp-scripts.php introduce external dependencies to BackPress
| Reported by: | sambauers | Owned by: | nbachiyski |
|---|---|---|---|
| Priority: | normal | Milestone: | 2.7 |
| Component: | I18N | Version: | 2.7 |
| Severity: | normal | Keywords: | needs-patch |
| Cc: | Focuses: |
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
@
18 years ago
- Keywords needs-patch added; BackPress has-patch removed
- Resolution fixed
- Status closed → 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
(In [10086]) Move convertEntities js function into the BackPress scriptloader. Fixes #8505 props sambauers.