[wp-trac] [WordPress Trac] #19342: Call to undefined function convert_to_screen when using plugins with custom meta boxes
WordPress Trac
wp-trac at lists.automattic.com
Fri Nov 25 07:26:32 UTC 2011
#19342: Call to undefined function convert_to_screen when using plugins with custom
meta boxes
------------------------------+---------------------
Reporter: jackdewey | Owner: rboren
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 3.3
Component: Template | Version: 3.3
Severity: major | Resolution: fixed
Keywords: has-patch commit |
------------------------------+---------------------
Changes (by mikeschinkel):
* cc: mikeschinkel@… (added)
Comment:
Replying to [comment:2 nacin]:
> Link Library is doing a very bad thing: `require_once(ABSPATH . '/wp-
admin/includes/template.php');`
While `add_meta_box()` is not one of them, some of the functions in `/wp-
admin/includes/template.php` can be useful outside the admin. Are you
saying that `require_once()` is bad for this specific file, or for any
file within `/wp-admin`?
I ask this more specifically because we currently have a plugin that uses
`require_once()` to load `/wp-admin/includes/image.php` because we need to
use `wp_crop_image()`, and also `/wp-admin/includes/upgrade.php` because
we need to use `dbDelta()`.
Is there another, preferred way to get access functions in files within
`/wp-admin/`?
--
Ticket URL: <http://core.trac.wordpress.org/ticket/19342#comment:10>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list