Allow pages to have thumbnails too. Props scribu. see #10928
git-svn-id: http://svn.automattic.com/wordpress/trunk@12056 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
7e9d95d543
commit
557a8d242c
|
@ -80,6 +80,7 @@ add_meta_box('pageparentdiv', __('Attributes'), 'page_attributes_meta_box', 'pag
|
||||||
add_meta_box('postcustom', __('Custom Fields'), 'post_custom_meta_box', 'page', 'normal', 'core');
|
add_meta_box('postcustom', __('Custom Fields'), 'post_custom_meta_box', 'page', 'normal', 'core');
|
||||||
add_meta_box('commentstatusdiv', __('Discussion'), 'post_comment_status_meta_box', 'page', 'normal', 'core');
|
add_meta_box('commentstatusdiv', __('Discussion'), 'post_comment_status_meta_box', 'page', 'normal', 'core');
|
||||||
add_meta_box('slugdiv', __('Page Slug'), 'post_slug_meta_box', 'page', 'normal', 'core');
|
add_meta_box('slugdiv', __('Page Slug'), 'post_slug_meta_box', 'page', 'normal', 'core');
|
||||||
|
add_meta_box('postthumbnaildiv', __('Post Thumbnail'), 'post_thumbnail_meta_box', 'page', 'side', 'low');
|
||||||
|
|
||||||
$authors = get_editable_user_ids( $current_user->id, true, 'page' ); // TODO: ROLE SYSTEM
|
$authors = get_editable_user_ids( $current_user->id, true, 'page' ); // TODO: ROLE SYSTEM
|
||||||
if ( $post->post_author && !in_array($post->post_author, $authors) )
|
if ( $post->post_author && !in_array($post->post_author, $authors) )
|
||||||
|
|
|
@ -18,6 +18,7 @@ if ( user_can_richedit() )
|
||||||
add_thickbox();
|
add_thickbox();
|
||||||
wp_enqueue_script('media-upload');
|
wp_enqueue_script('media-upload');
|
||||||
wp_enqueue_script('word-count');
|
wp_enqueue_script('word-count');
|
||||||
|
wp_enqueue_script('set-post-thumbnail-handler');
|
||||||
|
|
||||||
if ( current_user_can('edit_pages') ) {
|
if ( current_user_can('edit_pages') ) {
|
||||||
$action = 'post';
|
$action = 'post';
|
||||||
|
|
|
@ -108,6 +108,7 @@ case 'edit':
|
||||||
add_thickbox();
|
add_thickbox();
|
||||||
wp_enqueue_script('media-upload');
|
wp_enqueue_script('media-upload');
|
||||||
wp_enqueue_script('word-count');
|
wp_enqueue_script('word-count');
|
||||||
|
wp_enqueue_script('set-post-thumbnail-handler');
|
||||||
|
|
||||||
if ( $last = wp_check_post_lock( $post->ID ) ) {
|
if ( $last = wp_check_post_lock( $post->ID ) ) {
|
||||||
add_action('admin_notices', '_admin_notice_post_locked' );
|
add_action('admin_notices', '_admin_notice_post_locked' );
|
||||||
|
|
Loading…
Reference in New Issue