diff --git a/wp-admin/edit-form-advanced.php b/wp-admin/edit-form-advanced.php index 5d009fa5f2..b0a71ca91a 100644 --- a/wp-admin/edit-form-advanced.php +++ b/wp-admin/edit-form-advanced.php @@ -10,6 +10,19 @@ if ( !defined('ABSPATH') ) die('-1'); +wp_enqueue_script('post'); + +if ( post_type_supports($post_type, 'editor') ) { + if ( user_can_richedit() ) + wp_enqueue_script('editor'); + wp_enqueue_script('word-count'); +} + +if ( post_type_supports($post_type, 'editor') || post_type_supports($post_type, 'thumbnail') ) { + add_thickbox(); + wp_enqueue_script('media-upload'); +} + /** * Post ID global * @name $post_ID diff --git a/wp-admin/post-new.php b/wp-admin/post-new.php index ef9f7600af..7a84026aa6 100644 --- a/wp-admin/post-new.php +++ b/wp-admin/post-new.php @@ -7,7 +7,7 @@ */ /** Load WordPress Administration Bootstrap */ -require_once('admin.php'); +require_once('./admin.php'); if ( !isset($_GET['post_type']) ) $post_type = 'post'; @@ -29,16 +29,9 @@ $post_type_object = get_post_type_object($post_type); $title = sprintf(__('Add New %s'), $post_type_object->singular_label); $editing = true; -wp_enqueue_script('autosave'); -wp_enqueue_script('post'); -if ( user_can_richedit() ) - wp_enqueue_script('editor'); -add_thickbox(); -wp_enqueue_script('media-upload'); -wp_enqueue_script('word-count'); if ( 'post' == $post_type && !current_user_can('edit_posts') ) { - require_once ('./admin-header.php'); ?> + include('./admin-header.php'); ?>
edit_posts capability to your user, in order to be authorized to post.
You can also e-mail the admin to ask for a promotion.
@@ -46,10 +39,12 @@ When you’re promoted, just reload this page and you’ll be able to bl