[ Index ] |
|
Code source de WordPress 2.1.2 |
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('prototype'); 7 wp_enqueue_script('autosave'); 8 require_once ('./admin-header.php'); 9 10 if ( ! current_user_can('edit_posts') ) { ?> 11 <div class="wrap"> 12 <p><?php printf(__('Since you’re a newcomer, you’ll have to wait for an admin to raise your level to 1, in order to be authorized to post.<br /> 13 You can also <a href="mailto:%s?subject=Promotion?">e-mail the admin</a> to ask for a promotion.<br /> 14 When you’re promoted, just reload this page and you’ll be able to blog. :)'), get_option('admin_email')); ?> 15 </p> 16 </div> 17 <?php 18 include ('admin-footer.php'); 19 exit(); 20 } 21 22 if ( isset($_GET['posted']) && $_GET['posted'] ) : ?> 23 <div id="message" class="updated fade"><p><strong><?php _e('Post saved.'); ?></strong> <a href="<?php echo get_permalink( $_GET['posted'] ); ?>"><?php _e('View post'); ?> »</a></p></div> 24 <?php 25 endif; 26 27 if ( $drafts = get_users_drafts( $user_ID ) ) { ?> 28 <div class="wrap"> 29 <p><strong><?php _e('Your Drafts:') ?></strong> 30 <?php 31 // Show drafts. 32 $num_drafts = count($drafts); 33 if ( $num_drafts > 15 ) $num_drafts = 15; 34 for ( $i = 0; $i < $num_drafts; $i++ ) { 35 $draft = $drafts[$i]; 36 if ( 0 != $i ) 37 echo ', '; 38 if ( empty($draft->post_title) ) 39 $draft->post_title = sprintf(__('Post # %s'), $draft->ID); 40 echo "<a href='post.php?action=edit&post=$draft->ID' title='" . __('Edit this draft') . "'>$draft->post_title</a>"; 41 } 42 43 if ( 15 < count($drafts) ) { ?> 44 , <a href="edit.php"><?php echo sprintf(__('and %s more'), (count($drafts) - 15) ); ?> »</a> 45 <?php } ?> 46 .</p> 47 </div> 48 <?php 49 } 50 51 // Show post form. 52 $post = get_default_post_to_edit(); 53 include ('edit-form-advanced.php'); 54 ?> 55 56 <?php if ( $is_NS4 || $is_gecko || $is_winIE ) { ?> 57 <div id="wp-bookmarklet" class="wrap"> 58 <h3><?php _e('WordPress Bookmarklet'); ?></h3> 59 <p><?php _e('Right click on the following link and choose "Add to favorites" to create a posting shortcut.'); ?></p> 60 <p> 61 62 <?php 63 if ($is_NS4 || $is_gecko) { 64 ?> 65 <a href="javascript:if(navigator.userAgent.indexOf('Safari') >= 0){Q=getSelection();}else{Q=document.selection?document.selection.createRange().text:document.getSelection();}location.href='<?php echo get_option('siteurl') ?>/wp-admin/post-new.php?text='+encodeURIComponent(Q)+'&popupurl='+encodeURIComponent(location.href)+'&popuptitle='+encodeURIComponent(document.title);"><?php printf(__('Press It - %s'), wp_specialchars(get_option('blogname'))); ?></a> 66 <?php 67 } else if ($is_winIE) { 68 ?> 69 <a href="javascript:Q='';if(top.frames.length==0)Q=document.selection.createRange().text;location.href='<?php echo get_option('siteurl') ?>/wp-admin/post-new.php?text='+encodeURIComponent(Q)+'&popupurl='+encodeURIComponent(location.href)+'&popuptitle='+encodeURIComponent(document.title);"><?php printf(__('Press it - %s'), get_option('blogname')); ?></a> 70 <script type="text/javascript"> 71 <!-- 72 function oneclickbookmarklet(blah) { 73 window.open ("profile.php?action=IErightclick", "oneclickbookmarklet", "width=500, height=450, location=0, menubar=0, resizable=0, scrollbars=1, status=1, titlebar=0, toolbar=0, screenX=120, left=120, screenY=120, top=120"); 74 } 75 // --> 76 </script> 77 <br /> 78 <br /> 79 <?php _e('One-click bookmarklet:') ?><br /> 80 <a href="javascript:oneclickbookmarklet(0);"><?php _e('click here') ?></a> 81 <?php 82 } else if ($is_opera) { 83 ?> 84 <a href="javascript:location.href='<?php echo get_option('siteurl'); ?>/wp-admin/post-new.php?popupurl='+escape(location.href)+'&popuptitle='+escape(document.title);"><?php printf(__('Press it - %s'), get_option('blogname')); ?></a> 85 <?php 86 } else if ($is_macIE) { 87 ?> 88 <a href="javascript:Q='';location.href='<?php echo get_option('siteurl'); ?>/wp-admin/bookmarklet.php?text='+escape(document.getSelection())+'&popupurl='+escape(location.href)+'&popuptitle='+escape(document.title);"><?php printf(__('Press it - %s'), get_option('blogname')); ?></a> 89 <?php 90 } 91 ?> 92 </p> 93 </div> 94 <?php } ?> 95 96 <?php include ('admin-footer.php'); ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Fri Mar 30 19:41:27 2007 | par Balluche grâce à PHPXref 0.7 |