Better support for theme plugins. add_theme_page() and active theme functions.php autoloader.
git-svn-id: https://develop.svn.wordpress.org/trunk@2818 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
7f27e37e92
commit
081527cd3e
@ -1144,6 +1144,11 @@ function add_management_page($page_title, $menu_title, $access_level, $file, $fu
|
||||
return add_submenu_page('edit.php', $page_title, $menu_title, $access_level, $file, $function);
|
||||
}
|
||||
|
||||
function add_theme_page($page_title, $menu_title, $access_level, $file, $function = '') {
|
||||
return add_submenu_page('themes.php', $page_title, $menu_title, $access_level, $file, $function);
|
||||
}
|
||||
|
||||
|
||||
function validate_file($file, $allowed_files = '') {
|
||||
if ( false !== strpos($file, './'))
|
||||
return 1;
|
||||
@ -1393,4 +1398,4 @@ function get_importers() {
|
||||
return $wp_importers;
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
@ -189,6 +189,10 @@ load_default_textdomain();
|
||||
// Pull in locale data after loading text domain.
|
||||
require_once(ABSPATH . WPINC . '/locale.php');
|
||||
|
||||
// Load functions for active theme.
|
||||
if ( file_exists(TEMPLATEPATH . "/functions.php") )
|
||||
include(TEMPLATEPATH . "/functions.php");
|
||||
|
||||
function shutdown_action_hook() {
|
||||
do_action('shutdown');
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user