home *** CD-ROM | disk | FTP | other *** search
/ Cricao de Sites - 650 Layouts Prontos / WebMasters.iso / Blogs / wordpress2.6.exe / wordpress2.6 / wp-admin / post-new.php < prev    next >
Encoding:
PHP Script  |  2008-06-03  |  1.4 KB  |  43 lines

  1. <?php
  2. require_once('admin.php');
  3. $title = __('Create New Post');
  4. $parent_file = 'post-new.php';
  5. $editing = true;
  6. wp_enqueue_script('autosave');
  7. wp_enqueue_script('post');
  8. if ( user_can_richedit() )
  9.     wp_enqueue_script('editor');
  10. add_thickbox();
  11. wp_enqueue_script('media-upload');
  12. wp_enqueue_script('word-count');
  13.  
  14. require_once ('./admin-header.php');
  15.  
  16. if ( ! current_user_can('edit_posts') ) { ?>
  17. <div class="wrap">
  18. <p><?php printf(__('Since you’re a newcomer, you’ll have to wait for an admin to add the <code>edit_posts</code> capability to your user, in order to be authorized to post.<br />
  19. You can also <a href="mailto:%s?subject=Promotion?">e-mail the admin</a> to ask for a promotion.<br />
  20. When you’re promoted, just reload this page and you’ll be able to blog. :)'), get_option('admin_email')); ?>
  21. </p>
  22. </div>
  23. <?php
  24.     include('admin-footer.php');
  25.     exit();
  26. }
  27.  
  28. if ( isset($_GET['posted']) && $_GET['posted'] ) : $_GET['posted'] = (int) $_GET['posted']; ?>
  29. <div id="message" class="updated fade"><p><strong><?php _e('Your post has been saved.'); ?></strong> <a href="<?php echo get_permalink( $_GET['posted'] ); ?>"><?php _e('View post'); ?></a> | <a href="post.php?action=edit&post=<?php echo $_GET['posted']; ?>"><?php _e('Edit post'); ?></a></p></div>
  30. <?php
  31. endif;
  32. ?>
  33.  
  34.  
  35. <?php
  36.  
  37. // Show post form.
  38. $post = get_default_post_to_edit();
  39. include('edit-form-advanced.php');
  40.  
  41. include('admin-footer.php');
  42. ?>
  43.