WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/14/2004 12:41:09 PM (17 years ago)
Author:
saxmatt
Message:

Initial functionality so level 1 users may be allowed to publish or just post drafts.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-form.php

    r1651 r1656  
    11
    22<div class="wrap">
    3 <?php
    4 $form_action = 'post';
    5 $form_extra = '';
    6 
    7 $form_pingback = '<input type="hidden" name="post_pingback" value="1" id="post_pingback" />';
    8 
    9 $form_trackback = '<p><label for="trackback">' . sprintf(__('<a href="%s" title="Help on trackbacks"><strong>TrackBack</strong> a <abbr title="Universal Resource Identifier">URI</abbr></a>:</label> (Separate multiple <abbr title="Universal Resource Identifier">URI</abbr>s with spaces.)<br />'), 'http://wordpress.org/docs/reference/post/#trackback') .
    10     '<input type="text" name="trackback_url" style="width: 360px" id="trackback" tabindex="7" /></p>';
    11 
    12 
    13 $saveasdraft = '';
    14 
    15 
    16 ?>
    173
    184<form name="post" action="post.php" method="post" id="simple">
    195
    20 <?php
    21 if (isset($mode) && 'bookmarklet' == $mode) {
    22     echo '<input type="hidden" name="mode" value="bookmarklet" />';
    23 }
    24 ?>
     6<?php if (isset($mode) && 'bookmarklet' == $mode) : ?>
     7<input type="hidden" name="mode" value="bookmarklet" />
     8<?php endif; ?>
    259<input type="hidden" name="user_ID" value="<?php echo $user_ID ?>" />
    26 <input type="hidden" name="action" value='<?php echo $form_action . $form_extra ?>' />
     10<input type="hidden" name="action" value='post' />
    2711
    2812<script type="text/javascript">
     
    6751</script>
    6852
    69 <?php echo $form_pingback ?>
    70 <?php echo $form_trackback; ?>
     53<input type="hidden" name="post_pingback" value="1" id="post_pingback" />
     54
     55<p><label for="trackback"> <?php printf(__('<a href="%s" title="Help on trackbacks"><strong>TrackBack</strong> a <abbr title="Universal Resource Identifier">URI</abbr></a>:</label> (Separate multiple <abbr title="Universal Resource Identifier">URI</abbr>s with spaces.)<br />'), 'http://wordpress.org/docs/reference/post/#trackback') ?>
     56    <input type="text" name="trackback_url" style="width: 360px" id="trackback" tabindex="7" /></p>
    7157
    7258<p class="submit"><input name="saveasdraft" type="submit" id="saveasdraft" tabindex="9" value="<?php _e('Save as Draft') ?>" />
    73   <input name="saveasprivate" type="submit" id="saveasprivate" tabindex="10" value="<?php _e('Save as Private') ?>" />
     59  <input name="saveasprivate" type="submit" id="saveasprivate" tabindex="10" value="<?php _e('Save as Private') ?>" />
     60
     61<?php if ( 1 < $user_level || (1 == $user_level && 2 == get_option('new_users_can_blog')) ) : ?>
    7462  <input name="publish" type="submit" id="publish" tabindex="6" style="font-weight: bold;" value="<?php _e('Publish') ?>" />
    75   <?php if ('bookmarklet' != $mode) {
     63<?php endif; ?>
     64
     65<?php if ('bookmarklet' != $mode) {
    7666      echo '<input name="advanced" type="submit" id="advancededit" tabindex="7" value="' .  __('Advanced Editing &raquo;') . '" />';
    7767  } ?>
    7868  <input name="referredby" type="hidden" id="referredby" value="<?php if (isset($_SERVER['HTTP_REFERER'])) echo urlencode($_SERVER['HTTP_REFERER']); ?>" />
    7969</p>
    80 <?php do_action('edit_form', ''); ?>
     70
     71<?php do_action('simple_edit_form', ''); ?>
     72
    8173</div>
    8274</form>
Note: See TracChangeset for help on using the changeset viewer.