diff options
author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2007-10-12 16:21:15 +0000 |
---|---|---|
committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2007-10-12 16:21:15 +0000 |
commit | 3a4570b0fc8b3d6339bef71d17d7701554e0bbf7 (patch) | |
tree | 2a06e5261263c68d8afd95a6328879dc289cb909 /wp-admin/edit-form-advanced.php | |
parent | b83c34a7010faee0223f6037025c350da12e05e6 (diff) | |
download | wordpress-mu-3a4570b0fc8b3d6339bef71d17d7701554e0bbf7.tar.gz wordpress-mu-3a4570b0fc8b3d6339bef71d17d7701554e0bbf7.tar.xz wordpress-mu-3a4570b0fc8b3d6339bef71d17d7701554e0bbf7.zip |
Merge with WP 2.3 - testing use only!
Move pluggable functions out of wpmu-functions and into pluggable.php, fixes #439
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1069 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-admin/edit-form-advanced.php')
-rw-r--r-- | wp-admin/edit-form-advanced.php | 53 |
1 files changed, 27 insertions, 26 deletions
diff --git a/wp-admin/edit-form-advanced.php b/wp-admin/edit-form-advanced.php index 81a998b..ab3adff 100644 --- a/wp-admin/edit-form-advanced.php +++ b/wp-admin/edit-form-advanced.php @@ -1,6 +1,6 @@ <?php if ( isset($_GET['message']) ) - $_GET['message'] = (int) $_GET['message']; + $_GET['message'] = (int) $_GET['message']; $messages[1] = __('Post updated'); $messages[2] = __('Custom field updated'); $messages[3] = __('Custom field deleted.'); @@ -57,7 +57,7 @@ if (empty($post->post_status)) $post->post_status = 'draft'; <input type="hidden" id="post_type" name="post_type" value="post" /> <?php echo $form_extra ?> -<?php if (isset($_GET['message']) && 2 > $_GET['message']) : ?> +<?php if ((isset($post->post_title) && '' == $post->post_title) || (isset($_GET['message']) && 2 > $_GET['message'])) : ?> <script type="text/javascript"> function focusit() { // focus on first input field @@ -84,26 +84,28 @@ addLoadEvent(focusit); <input name="advanced_view" type="hidden" value="1" /> <label for="comment_status" class="selectit"> <input name="comment_status" type="checkbox" id="comment_status" value="open" <?php checked($post->comment_status, 'open'); ?> /> -<?php _e('Allow Comments') ?></label> +<?php _e('Allow Comments') ?></label> <label for="ping_status" class="selectit"><input name="ping_status" type="checkbox" id="ping_status" value="open" <?php checked($post->ping_status, 'open'); ?> /> <?php _e('Allow Pings') ?></label> </div> </fieldset> <fieldset id="passworddiv" class="dbx-box"> -<h3 class="dbx-handle"><?php _e('Post Password') ?></h3> +<h3 class="dbx-handle"><?php _e('Post Password') ?></h3> <div class="dbx-content"><input name="post_password" type="text" size="13" id="post_password" value="<?php echo attribute_escape( $post->post_password ); ?>" /></div> </fieldset> <fieldset id="slugdiv" class="dbx-box"> -<h3 class="dbx-handle"><?php _e('Post Slug') ?></h3> +<h3 class="dbx-handle"><?php _e('Post Slug') ?></h3> <div class="dbx-content"><input name="post_name" type="text" size="13" id="post_name" value="<?php echo attribute_escape( $post->post_name ); ?>" /></div> </fieldset> <fieldset id="poststatusdiv" class="dbx-box"> -<h3 class="dbx-handle"><?php _e('Post Status') ?></h3> -<div class="dbx-content"><?php if ( current_user_can('publish_posts') ) : ?> -<label for="post_status_publish" class="selectit"><input id="post_status_publish" name="post_status" type="radio" value="publish" <?php checked($post->post_status, 'publish'); checked($post->post_status, 'future'); ?> /> <?php _e('Published') ?></label> +<h3 class="dbx-handle"><?php _e('Post Status') ?></h3> +<div class="dbx-content"> +<?php if ( current_user_can('publish_posts') ) : ?> + <label for="post_status_publish" class="selectit"><input id="post_status_publish" name="post_status" type="radio" value="publish" <?php checked($post->post_status, 'publish'); checked($post->post_status, 'future'); ?> /> <?php _e('Published') ?></label> <?php endif; ?> + <label for="post_status_pending" class="selectit"><input id="post_status_pending" name="post_status" type="radio" value="pending" <?php checked($post->post_status, 'pending'); ?> /> <?php _e('Pending Review') ?></label> <label for="post_status_draft" class="selectit"><input id="post_status_draft" name="post_status" type="radio" value="draft" <?php checked($post->post_status, 'draft'); ?> /> <?php _e('Draft') ?></label> <label for="post_status_private" class="selectit"><input id="post_status_private" name="post_status" type="radio" value="private" <?php checked($post->post_status, 'private'); ?> /> <?php _e('Private') ?></label></div> </fieldset> @@ -115,23 +117,16 @@ addLoadEvent(focusit); </fieldset> <?php endif; ?> -<?php -$authors = get_editable_authors( $current_user->id ); // TODO: ROLE SYSTEM +<?php +$authors = get_editable_user_ids( $current_user->id ); // TODO: ROLE SYSTEM +if ( $post->post_author && !in_array($post->post_author, $authors) ) + $authors[] = $post->post_author; if ( $authors && count( $authors ) > 1 ) : ?> <fieldset id="authordiv" class="dbx-box"> <h3 class="dbx-handle"><?php _e('Post Author'); ?></h3> <div class="dbx-content"> -<select name="post_author_override" id="post_author_override"> -<?php -foreach ($authors as $o) : -$o = get_userdata( $o->ID ); -if ( $post->post_author == $o->ID || ( empty($post_ID) && $user_ID == $o->ID ) ) $selected = 'selected="selected"'; -else $selected = ''; -echo "<option value='" . (int) $o->ID . "' $selected>" . wp_specialchars( $o->display_name ) . "</option>"; -endforeach; -?> -</select> +<?php wp_dropdown_users( array('include' => $authors, 'name' => 'post_author_override', 'selected' => empty($post_ID) ? $user_ID : $post->post_author) ); ?> </div> </fieldset> <?php endif; ?> @@ -162,21 +157,27 @@ endforeach; <?php echo $form_pingback ?> <?php echo $form_prevstatus ?> +<fieldset id="tagdiv"> + <legend><?php _e('Tags (separate multiple tags with commas: cats, pet food, dogs)'); ?></legend> + <div><input type="text" name="tags_input" class="tags-input" id="tags-input" size="30" tabindex="3" value="<?php echo get_tags_to_edit( $post_ID ); ?>" /></div> +</fieldset> <p class="submit"> <span id="autosave"></span> <?php echo $saveasdraft; ?> -<input type="submit" name="submit" value="<?php _e('Save') ?>" style="font-weight: bold;" tabindex="4" /> -<?php -if ('publish' != $post->post_status || 0 == $post_ID) { +<input type="submit" name="submit" value="<?php _e('Save'); ?>" style="font-weight: bold;" tabindex="4" /> +<?php +if ( !in_array( $post->post_status, array('publish', 'future') ) || 0 == $post_ID ) { ?> <?php if ( current_user_can('publish_posts') ) : ?> - <input name="publish" type="submit" id="publish" tabindex="5" accesskey="p" value="<?php _e('Publish'); ?>" /> + <input name="publish" type="submit" id="publish" tabindex="5" accesskey="p" value="<?php _e('Publish') ?>" /> +<?php else : ?> + <input name="publish" type="submit" id="publish" tabindex="5" accesskey="p" value="<?php _e('Submit for Review') ?>" /> <?php endif; ?> <?php } ?> -<input name="referredby" type="hidden" id="referredby" value="<?php +<input name="referredby" type="hidden" id="referredby" value="<?php if ( !empty($_REQUEST['popupurl']) ) echo clean_url(stripslashes($_REQUEST['popupurl'])); else if ( url_to_postid(wp_get_referer()) == $post_ID ) @@ -193,7 +194,7 @@ if (current_user_can('upload_files')) { $uploading_iframe_src = wp_nonce_url("upload.php?style=inline&tab=upload&post_id=$uploading_iframe_ID", 'inlineuploading'); $uploading_iframe_src = apply_filters('uploading_iframe_src', $uploading_iframe_src); if ( false != $uploading_iframe_src ) - echo '<iframe id="uploading" frameborder="0" src="' . $uploading_iframe_src . '">' . __('This feature requires iframe support.') . '</iframe>'; + echo '<iframe id="uploading" name="uploading" frameborder="0" src="' . $uploading_iframe_src . '">' . __('This feature requires iframe support.') . '</iframe>'; } ?> |