Admin HEAD content
Starting in Zen Cart 1.5.7, a new file admin/includes/admin_html_head.php
was introduced to consolidate the code required to build the <head>
element in an admin page. This includes such things as:
- setting the page title
- pulling in stylesheets
- including any needed javascript
In prior versions, the code to do this was replicated on each admin page.
Since then, admin pages have updated over time to remove the replicated blocks of code in favor of a single inclusion of admin_html_head.php
. As of Zen Cart 2.0.0, this change is complete, and older files used by the old method have been deprecated. This includes:
admin/includes/menu.css
admin/includes/menu.js
admin/includes/stylesheet.css
Some older plugins may still use these files. Migrating to the new standard is straightforward; simply replace the old contents of the <head>
element by a reference to admin_html_head.php
.
You will also want to remove references to the old init()
javascript function.
If you maintain a plugin which needs to work on both older and newer versions of Zen Cart simultaneously, see the Email Archive Manager plugin, which does this.