root/trunk/wp-admin/edit-form.php

Revision 8674, 3.2 kB (checked in by ryan, 2 months ago)

File level phpdoc from santosj. fixes #7496

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 <?php
2 /**
3  * Edit post form for Write Post and for the Bookmarklet mode.
4  *
5  * @package WordPress
6  * @subpackage Administration
7  */
8 ?>
9 <div class="wrap">
10 <h2><?php _e('Write Post'); ?></h2>
11 <form name="post" action="post.php" method="post" id="simple">
12
13 <?php if (isset($mode) && 'bookmarklet' == $mode) : ?>
14 <input type="hidden" name="mode" value="bookmarklet" />
15 <?php endif; ?>
16 <input type="hidden" id="user-id" name="user_ID" value="<?php echo (int) $user_ID ?>" />
17 <input type="hidden" name="action" value='post' />
18
19 <div id="poststuff">
20     <fieldset id="titlediv">
21       <legend><a href="http://wordpress.org/docs/reference/post/#title" title="<?php _e('Help on titles') ?>"><?php _e('Title') ?></a></legend>
22       <div><input type="text" name="post_title" size="30" tabindex="1" value="<?php echo attribute_escape( $post->post_title ); ?>" id="title" /></div>
23     </fieldset>
24
25     <fieldset id="categorydiv">
26       <legend><a href="http://wordpress.org/docs/reference/post/#category" title="<?php _e('Help on categories') ?>"><?php _e('Categories') ?></a></legend>
27       <div><?php dropdown_categories($post->post_category); ?></div>
28     </fieldset>
29
30 <br />
31 <fieldset id="postdiv">
32     <legend><a href="http://wordpress.org/docs/reference/post/#post" title="<?php _e('Help with post field') ?>"><?php _e('Post') ?></a></legend>
33 <?php
34  $rows = get_option('default_post_edit_rows');
35  if (($rows < 3) || ($rows > 100)) {
36      $rows = 10;
37  }
38 ?>
39 <div><textarea rows="<?php echo $rows; ?>" cols="40" name="content" tabindex="4" id="content"><?php echo $post->post_content ?></textarea></div>
40 <?php wp_nonce_field( 'autosave', 'autosavenonce', false ); ?>
41 </fieldset>
42
43
44 <script type="text/javascript">
45 <!--
46 edCanvas = document.getElementById('content');
47 //-->
48 </script>
49
50 <input type="hidden" name="post_pingback" value="<?php echo (int) get_option('default_pingback_flag') ?>" id="post_pingback" />
51
52 <p><label for="trackback"> <?php printf(__('<a href="%s" title="Help on trackbacks"><strong>TrackBack</strong> a <abbr title="Universal Resource Locator">URL</abbr></a>:</label> (Separate multiple <abbr title="Universal Resource Locator">URL</abbr>s with spaces.)'), 'http://wordpress.org/docs/reference/post/#trackback'); echo '<br />'; ?>
53     <input type="text" name="trackback_url" style="width: 360px" id="trackback" tabindex="7" /></p>
54
55 <p class="submit"><input name="saveasdraft" type="submit" id="saveasdraft" tabindex="9" value="<?php _e('Save as Draft') ?>" />
56     <input name="saveasprivate" type="submit" id="saveasprivate" tabindex="10" value="<?php _e('Save as Private') ?>" />
57
58      <?php if ( current_user_can('edit_posts') ) : ?>
59     <input name="publish" type="submit" id="publish" tabindex="6" value="<?php _e('Publish') ?>" class="button button-highlighted" />
60 <?php endif; ?>
61
62 <?php if ('bookmarklet' != $mode) {
63         echo '<input name="advanced" type="submit" id="advancededit" tabindex="7" value="' __('Advanced Editing') . '" />';
64     } ?>
65     <input name="referredby" type="hidden" id="referredby" value="<?php if ( $refby = wp_get_referer() ) echo urlencode($refby); ?>" />
66 </p>
67
68 <?php do_action('simple_edit_form', ''); ?>
69
70 </div>
71 </form>
72
73 <script type="text/javascript">
74 try{document.getElementById('title').focus();}catch(e){}
75 </script>
76 </div>
77
Note: See TracBrowser for help on using the browser.