Make WordPress Core

Changeset 3563


Ignore:
Timestamp:
02/21/2006 06:11:46 AM (18 years ago)
Author:
ryan
Message:

Breakup post.php into post.php, comment.php, page.php, post-new.php

Location:
trunk
Files:
3 added
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-functions.php

    r3547 r3563  
    666666    <td><?php echo mysql2date('Y-m-d g:i a', $post->post_modified); ?></td>
    667667    <td><a href="<?php the_permalink(); ?>" rel="permalink" class="edit"><?php _e('View'); ?></a></td>
    668     <td><?php if ( current_user_can('edit_pages') ) { echo "<a href='post.php?action=edit&amp;post=$id' class='edit'>" . __('Edit') . "</a>"; } ?></td>
    669     <td><?php if ( current_user_can('edit_pages') ) { echo "<a href='post.php?action=delete&amp;post=$id' class='delete' onclick=\"return deleteSomething( 'page', " . $id . ", '" . sprintf(__("You are about to delete the &quot;%s&quot; page.\\n&quot;OK&quot; to delete, &quot;Cancel&quot; to stop."), wp_specialchars(get_the_title('','',0), 1)) . "' );\">" . __('Delete') . "</a>"; } ?></td>
     668    <td><?php if ( current_user_can('edit_page', $id) ) { echo "<a href='page.php?action=edit&amp;post=$id' class='edit'>" . __('Edit') . "</a>"; } ?></td>
     669    <td><?php if ( current_user_can('edit_page', $id) ) { echo "<a href='page.php?action=delete&amp;post=$id' class='delete' onclick=\"return deleteSomething( 'page', " . $id . ", '" . sprintf(__("You are about to delete the &quot;%s&quot; page.\\n&quot;OK&quot; to delete, &quot;Cancel&quot; to stop."), wp_specialchars(get_the_title('','',0), 1)) . "' );\">" . __('Delete') . "</a>"; } ?></td>
    670670  </tr>
    671671
  • trunk/wp-admin/admin-header.php

    r3541 r3563  
    3737//<![CDATA[
    3838addLoadEvent( function() {
    39 <?php switch ( $pagenow ) : case 'post.php' : ?>
     39<?php switch ( $pagenow ) : case 'post.php' : case 'post-new.php' : ?>
    4040var manager = new dbxManager('postmeta');
    41 <?php break; case 'page-new.php' : ?>
     41<?php break; case 'page.php' : case 'page-new.php' : ?>
    4242var manager = new dbxManager('pagemeta');
    4343<?php break; endswitch; ?>
  • trunk/wp-admin/edit-comments.php

    r3541 r3563  
    104104        <p><?php _e('Posted'); echo ' '; comment_date('M j, g:i A'); 
    105105            if ( current_user_can('edit_post', $comment->comment_post_ID) ) {
    106                 echo " | <a href=\"post.php?action=editcomment&amp;comment=".$comment->comment_ID."\">" . __('Edit Comment') . "</a>";
    107                 echo " | <a href=\"post.php?action=deletecomment&amp;p=".$comment->comment_post_ID."&amp;comment=".$comment->comment_ID."\" onclick=\"return deleteSomething( 'comment', $comment->comment_ID, '" . sprintf(__("You are about to delete this comment by &quot;%s&quot;.\\n&quot;Cancel&quot; to stop, &quot;OK&quot; to delete."), wp_specialchars( $comment->comment_author, 1 ))  . "' );\">" . __('Delete Comment') . "</a> ";
    108                 echo " | <a href=\"post.php?action=deletecomment&amp;delete_type=spam&amp;p=".$comment->comment_post_ID."&amp;comment=".$comment->comment_ID."\" onclick=\"return deleteSomething( 'comment-as-spam', $comment->comment_ID, '" . sprintf(__("You are about to mark as spam this comment by &quot;%s&quot;.\\n&quot;Cancel&quot; to stop, &quot;OK&quot; to mark as spam."), wp_specialchars( $comment->comment_author, 1 ))  . "' );\">" . __('Mark Comment as Spam') . "</a> ";
     106                echo " | <a href=\"comment.php?action=editcomment&amp;comment=".$comment->comment_ID."\">" . __('Edit Comment') . "</a>";
     107                echo " | <a href=\"comment.php?action=deletecomment&amp;p=".$comment->comment_post_ID."&amp;comment=".$comment->comment_ID."\" onclick=\"return deleteSomething( 'comment', $comment->comment_ID, '" . sprintf(__("You are about to delete this comment by &quot;%s&quot;.\\n&quot;Cancel&quot; to stop, &quot;OK&quot; to delete."), wp_specialchars( $comment->comment_author, 1 ))  . "' );\">" . __('Delete Comment') . "</a> ";
     108                echo " | <a href=\"comment.php?action=deletecomment&amp;delete_type=spam&amp;p=".$comment->comment_post_ID."&amp;comment=".$comment->comment_ID."\" onclick=\"return deleteSomething( 'comment-as-spam', $comment->comment_ID, '" . sprintf(__("You are about to mark as spam this comment by &quot;%s&quot;.\\n&quot;Cancel&quot; to stop, &quot;OK&quot; to mark as spam."), wp_specialchars( $comment->comment_author, 1 ))  . "' );\">" . __('Mark Comment as Spam') . "</a> ";
    109109            } // end if any comments to show
    110110            // Get post title
    111             if ( current_user_can('edit_post', $comment->comment_post_ID) ) {
    112                 $post_title = $wpdb->get_var("SELECT post_title FROM $wpdb->posts WHERE ID = $comment->comment_post_ID");
    113                 $post_title = ('' == $post_title) ? "# $comment->comment_post_ID" : $post_title;
    114                 ?> | <a href="post.php?action=edit&amp;post=<?php echo $comment->comment_post_ID; ?>"><?php printf(__('Edit Post &#8220;%s&#8221;'), stripslashes($post_title)); ?></a>
    115                 <?php } ?>
     111            $post = get_post($comment->comment_post_ID);
     112            $post_title = $post->post_title;
     113            $post_title = ('' == $post_title) ? "# $comment->comment_post_ID" : $post_title;
     114            if ( 'page' == $post->post_type ) {
     115                if ( current_user_can('edit_page', $comment->comment_post_ID) ) ?>
     116                    | <a href="page.php?action=edit&amp;post=<?php echo $comment->comment_post_ID; ?>"><?php printf(__('Edit Page &#8220;%s&#8221;'), $post_title); ?></a>
     117            <?php } else {
     118                if ( current_user_can('edit_post', $comment->comment_post_ID) ) ?>
     119                    | <a href="post.php?action=edit&amp;post=<?php echo $comment->comment_post_ID; ?>"><?php printf(__('Edit Post &#8220;%s&#8221;'), $post_title); ?></a>
     120            <?php } ?>
    116121             | <a href="<?php echo get_permalink($comment->comment_post_ID); ?>"><?php _e('View Post') ?></a></p>
    117122        </li>
     
    156161    <td><a href="<?php echo get_permalink($comment->comment_post_ID); ?>#comment-<?php comment_ID() ?>" class="edit"><?php _e('View') ?></a></td>
    157162    <td><?php if ( current_user_can('edit_post', $comment->comment_post_ID) ) {
    158     echo "<a href='post.php?action=editcomment&amp;comment=$comment->comment_ID' class='edit'>" .  __('Edit') . "</a>"; } ?></td>
     163    echo "<a href='comment.php?action=editcomment&amp;comment=$comment->comment_ID' class='edit'>" .  __('Edit') . "</a>"; } ?></td>
    159164    <td><?php if ( current_user_can('edit_post', $comment->comment_post_ID) ) {
    160             echo "<a href=\"post.php?action=deletecomment&amp;p=".$comment->comment_post_ID."&amp;comment=".$comment->comment_ID."\" onclick=\"return confirm('" . sprintf(__("You are about to delete this comment by \'%s\'\\n  \'Cancel\' to stop, \'OK\' to delete."), $comment->comment_author) . "')\"    class='delete'>" . __('Delete') . "</a>"; } ?></td>
     165            echo "<a href=\"comment.php?action=deletecomment&amp;p=".$comment->comment_post_ID."&amp;comment=".$comment->comment_ID."\" onclick=\"return confirm('" . sprintf(__("You are about to delete this comment by \'%s\'\\n  \'Cancel\' to stop, \'OK\' to delete."), $comment->comment_author) . "')\"    class='delete'>" . __('Delete') . "</a>"; } ?></td>
    161166  </tr>
    162167        <?php
  • trunk/wp-admin/edit-form-comment.php

    r3283 r3563  
    66?>
    77
    8 <form name="post" action="post.php" method="post" id="post">
     8<form name="post" action="comment.php" method="post" id="post">
    99<div class="wrap">
    1010<input type="hidden" name="user_ID" value="<?php echo $user_ID ?>" />
     
    114114    <tr>
    115115        <th scope="row"><?php _e('Delete'); ?>:</th>
    116         <td><p><a class="delete" href="post.php?action=confirmdeletecomment&amp;noredir=true&amp;comment=<?php echo $comment->comment_ID; ?>&amp;p=<?php echo $comment->comment_post_ID; ?>"><?php _e('Delete comment') ?></a></p></td>
     116        <td><p><a class="delete" href="comment.php?action=confirmdeletecomment&amp;noredir=true&amp;comment=<?php echo $comment->comment_ID; ?>&amp;p=<?php echo $comment->comment_post_ID; ?>"><?php _e('Delete comment') ?></a></p></td>
    117117    </tr>
    118118</table>
  • trunk/wp-admin/edit-page-form.php

    r3562 r3563  
    2121?>
    2222
    23 <form name="post" action="post.php" method="post" id="post">
     23<form name="post" action="page.php" method="post" id="post">
    2424
    2525<?php
     
    227227</div>
    228228
    229 <?php if ('edit' == $action) : ?>
     229<?php if ('edit' == $action) :
     230    if ( current_user_can('delete_page', $post->ID) ) ?>
    230231        <input name="deletepost" class="delete" type="submit" id="deletepost" tabindex="10" value="<?php _e('Delete this page') ?>" <?php echo "onclick=\"return confirm('" . sprintf(__("You are about to delete this page \'%s\'\\n  \'Cancel\' to stop, \'OK\' to delete."), $wpdb->escape($post->post_title) ) . "')\""; ?> />
    231232<?php endif; ?>
  • trunk/wp-admin/edit-pages.php

    r3541 r3563  
    5252    <td><?php echo mysql2date('Y-m-d g:i a', $post->post_modified); ?></td>
    5353    <td><a href="<?php the_permalink(); ?>" rel="permalink" class="edit"><?php _e('View'); ?></a></td>
    54     <td><?php if ( current_user_can('edit_page', $post->ID) ) { echo "<a href='post.php?action=edit&amp;post=$post->ID' class='edit'>" . __('Edit') . "</a>"; } ?></td>
    55     <td><?php if ( current_user_can('delete_page', $post->ID) ) { echo "<a href='post.php?action=delete&amp;post=$post->ID' class='delete' onclick=\"return deleteSomething( 'page', " . $id . ", '" . sprintf(__("You are about to delete the &quot;%s&quot; page.\\n&quot;OK&quot; to delete, &quot;Cancel&quot; to stop."), wp_specialchars(get_the_title('','',0), 1)) . "' );\">" . __('Delete') . "</a>"; } ?></td>
     54    <td><?php if ( current_user_can('edit_page', $post->ID) ) { echo "<a href='page.php?action=edit&amp;post=$post->ID' class='edit'>" . __('Edit') . "</a>"; } ?></td>
     55    <td><?php if ( current_user_can('delete_page', $post->ID) ) { echo "<a href='page.php?action=delete&amp;post=$post->ID' class='delete' onclick=\"return deleteSomething( 'page', " . $id . ", '" . sprintf(__("You are about to delete the &quot;%s&quot; page.\\n&quot;OK&quot; to delete, &quot;Cancel&quot; to stop."), wp_specialchars(get_the_title('','',0), 1)) . "' );\">" . __('Delete') . "</a>"; } ?></td>
    5656  </tr>
    5757<?php
  • trunk/wp-admin/menu.php

    r3536 r3563  
    66// The URL of the item's file
    77$menu[0] = array(__('Dashboard'), 'read', 'index.php');
    8 $menu[5] = array(__('Write'), 'edit_posts', 'post.php');
     8$menu[5] = array(__('Write'), 'edit_posts', 'post-new.php');
    99$menu[10] = array(__('Manage'), 'edit_posts', 'edit.php');
    1010$menu[20] = array(__('Links'), 'manage_links', 'link-manager.php');
     
    1818$menu[45] = array(__('Import'), 'import', 'import.php');
    1919
    20 $submenu['post.php'][5] = array(__('Write Post'), 'edit_posts', 'post.php');
    21 $submenu['post.php'][10] = array(__('Write Page'), 'edit_pages', 'page-new.php');
     20$submenu['post-new.php'][5] = array(__('Write Post'), 'edit_posts', 'post-new.php');
     21$submenu['post-new.php'][10] = array(__('Write Page'), 'edit_pages', 'page-new.php');
    2222
    2323$submenu['edit.php'][5] = array(__('Posts'), 'edit_posts', 'edit.php');
  • trunk/wp-admin/page-new.php

    r3541 r3563  
    22require_once('admin.php');
    33$title = __('New Page');
    4 $parent_file = 'post.php';
     4$parent_file = 'post-new.php';
    55$editing = true;
    66require_once('admin-header.php');
  • trunk/wp-admin/post.php

    r3529 r3563  
    1919}
    2020
    21 if (isset($_POST['deletepost'])) {
     21if (isset($_POST['deletepost']))
    2222$action = "delete";
    23 }
    24 
    25 // Fix submenu highlighting for pages.
    26 if ( isset($_REQUEST['post']) && 'page' == get_post_type($_REQUEST['post']) )
    27     $submenu_file = 'page-new.php';
    28 
    29 $editing = true;
    3023
    3124switch($action) {
     
    4437            break;
    4538        default:
    46             $location = 'post.php';
     39            $location = 'post-new.php';
    4740            break;
    4841        }
    4942    } else {
    50         $location = 'post.php?posted=true';
     43        $location = 'post-new.php?posted=true';
    5144    }
    52 
    53     if ( 'page' == $_POST['post_type'] )
    54         $location = "page-new.php?saved=true";
    5545
    5646    if ( isset($_POST['save']) )
     
    6353case 'edit':
    6454    $title = __('Edit');
    65 
     55    $parent_file = 'edit.php';
     56    $submenu_file = 'edit.php';
     57    $editing = true;
    6658    require_once('admin-header.php');
    6759
    6860    $post_ID = $p = (int) $_GET['post'];
    6961
     62    $post = get_post($post_ID);
    7063    if ( !current_user_can('edit_post', $post_ID) )
    7164        die ( __('You are not allowed to edit this post.') );
     
    7366    $post = get_post_to_edit($post_ID);
    7467
    75     if ($post->post_type == 'page')
    76         include('edit-page-form.php');
    77     else
    78         include('edit-form-advanced.php');
     68    include('edit-form-advanced.php');
    7969
    8070    ?>
     
    132122    $post = & get_post($post_id);
    133123
    134     if ( !current_user_can('edit_post', $post_id) )
     124    if ( !current_user_can('delete_post', $post_id) )
    135125        die( __('You are not allowed to delete this post.') );
    136126
     
    148138    $sendback = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $sendback);
    149139    header ('Location: ' . $sendback);
    150     break;
    151 
    152 case 'editcomment':
    153     $title = __('Edit Comment');
    154     $parent_file = 'edit.php';
    155     require_once ('admin-header.php');
    156 
    157     get_currentuserinfo();
    158 
    159     $comment = (int) $_GET['comment'];
    160 
    161     if ( ! $comment = get_comment($comment) )
    162         die(sprintf(__('Oops, no comment with this ID. <a href="%s">Go back</a>!'), 'javascript:history.go(-1)'));
    163 
    164     if ( !current_user_can('edit_post', $comment->comment_post_ID) )
    165         die( __('You are not allowed to edit comments on this post.') );
    166 
    167     $comment = get_comment_to_edit($comment);
    168 
    169     include('edit-form-comment.php');
    170 
    171     break;
    172 
    173 case 'confirmdeletecomment':
    174 
    175     require_once('./admin-header.php');
    176 
    177     $comment = (int) $_GET['comment'];
    178     $p = (int) $_GET['p'];
    179 
    180     if ( ! $comment = get_comment($comment) )
    181         die(sprintf(__('Oops, no comment with this ID. <a href="%s">Go back</a>!'), 'edit.php'));
    182 
    183     if ( !current_user_can('edit_post', $comment->comment_post_ID) )
    184         die( __('You are not allowed to delete comments on this post.') );
    185 
    186     echo "<div class='wrap'>\n";
    187     if ( 'spam' == $_GET['delete_type'] )
    188         echo "<p>" . __('<strong>Caution:</strong> You are about to mark the following comment as spam:') . "</p>\n";
    189     else
    190         echo "<p>" . __('<strong>Caution:</strong> You are about to delete the following comment:') . "</p>\n";
    191     echo "<table border='0'>\n";
    192     echo "<tr><td>" . __('Author:') . "</td><td>$comment->comment_author</td></tr>\n";
    193     echo "<tr><td>" . __('E-mail:') . "</td><td>$comment->comment_author_email</td></tr>\n";
    194     echo "<tr><td>". __('URL:') . "</td><td>$comment->comment_author_url</td></tr>\n";
    195     echo "<tr><td>". __('Comment:') . "</td><td>$comment->comment_content</td></tr>\n";
    196     echo "</table>\n";
    197     echo "<p>" . __('Are you sure you want to do that?') . "</p>\n";
    198 
    199     echo "<form action='".get_settings('siteurl')."/wp-admin/post.php' method='get'>\n";
    200     echo "<input type='hidden' name='action' value='deletecomment' />\n";
    201     if ( 'spam' == $_GET['delete_type'] )
    202         echo "<input type='hidden' name='delete_type' value='spam' />\n";
    203     echo "<input type='hidden' name='p' value='$p' />\n";
    204     echo "<input type='hidden' name='comment' value='{$comment->comment_ID}' />\n";
    205     echo "<input type='hidden' name='noredir' value='1' />\n";
    206     echo "<input type='submit' value='" . __('Yes') . "' />";
    207     echo "&nbsp;&nbsp;";
    208     echo "<input type='button' value='" . __('No') . "' onclick=\"self.location='". get_settings('siteurl') ."/wp-admin/edit.php?p=$p&amp;c=1#comments';\" />\n";
    209     echo "</form>\n";
    210     echo "</div>\n";
    211 
    212     break;
    213 
    214 case 'deletecomment':
    215 
    216     check_admin_referer();
    217 
    218     $comment = (int) $_GET['comment'];
    219     $p = (int) $_GET['p'];
    220     if (isset($_GET['noredir'])) {
    221         $noredir = true;
    222     } else {
    223         $noredir = false;
    224     }
    225 
    226     $postdata = get_post($p) or die(sprintf(__('Oops, no post with this ID. <a href="%s">Go back</a>!'), 'edit.php'));
    227 
    228     if ( ! $comment = get_comment($comment) )
    229              die(sprintf(__('Oops, no comment with this ID. <a href="%s">Go back</a>!'), 'post.php'));
    230 
    231     if ( !current_user_can('edit_post', $comment->comment_post_ID) )
    232         die( __('You are not allowed to edit comments on this post.') );
    233 
    234     if ( 'spam' == $_GET['delete_type'] )
    235         wp_set_comment_status($comment->comment_ID, 'spam');
    236     else
    237         wp_delete_comment($comment->comment_ID);
    238 
    239     if (($_SERVER['HTTP_REFERER'] != "") && (false == $noredir)) {
    240         header('Location: ' . $_SERVER['HTTP_REFERER']);
    241     } else {
    242         header('Location: '. get_settings('siteurl') .'/wp-admin/edit.php?p='.$p.'&c=1#comments');
    243     }
    244 
    245     break;
    246 
    247 case 'unapprovecomment':
    248 
    249     check_admin_referer();
    250 
    251     $comment = (int) $_GET['comment'];
    252     $p = (int) $_GET['p'];
    253     if (isset($_GET['noredir'])) {
    254         $noredir = true;
    255     } else {
    256         $noredir = false;
    257     }
    258 
    259     if ( ! $comment = get_comment($comment) )
    260         die(sprintf(__('Oops, no comment with this ID. <a href="%s">Go back</a>!'), 'edit.php'));
    261 
    262     if ( !current_user_can('edit_post', $comment->comment_post_ID) )
    263         die( __('You are not allowed to edit comments on this post, so you cannot disapprove this comment.') );
    264 
    265     wp_set_comment_status($comment->comment_ID, "hold");
    266 
    267     if (($_SERVER['HTTP_REFERER'] != "") && (false == $noredir)) {
    268         header('Location: ' . $_SERVER['HTTP_REFERER']);
    269     } else {
    270         header('Location: '. get_settings('siteurl') .'/wp-admin/edit.php?p='.$p.'&c=1#comments');
    271     }
    272 
    273     break;
    274 
    275 case 'mailapprovecomment':
    276 
    277     $comment = (int) $_GET['comment'];
    278 
    279     if ( ! $comment = get_comment($comment) )
    280              die(sprintf(__('Oops, no comment with this ID. <a href="%s">Go back</a>!'), 'edit.php'));
    281 
    282     if ( !current_user_can('edit_post', $comment->comment_post_ID) )
    283         die( __('You are not allowed to edit comments on this post, so you cannot approve this comment.') );
    284 
    285     if ('1' != $comment->comment_approved) {
    286         wp_set_comment_status($comment->comment_ID, 'approve');
    287         if (true == get_option('comments_notify'))
    288             wp_notify_postauthor($comment->comment_ID);
    289     }
    290 
    291     header('Location: ' . get_option('siteurl') . '/wp-admin/moderation.php?approved=1');
    292 
    293     break;
    294 
    295 case 'approvecomment':
    296 
    297     $comment = (int) $_GET['comment'];
    298     $p = (int) $_GET['p'];
    299     if (isset($_GET['noredir'])) {
    300         $noredir = true;
    301     } else {
    302         $noredir = false;
    303     }
    304 
    305     if ( ! $comment = get_comment($comment) )
    306         die(sprintf(__('Oops, no comment with this ID. <a href="%s">Go back</a>!'), 'edit.php'));
    307 
    308     if ( !current_user_can('edit_post', $comment->comment_post_ID) )
    309         die( __('You are not allowed to edit comments on this post, so you cannot approve this comment.') );
    310 
    311     wp_set_comment_status($comment->comment_ID, "approve");
    312     if (get_settings("comments_notify") == true) {
    313         wp_notify_postauthor($comment->comment_ID);
    314     }
    315 
    316 
    317     if (($_SERVER['HTTP_REFERER'] != "") && (false == $noredir)) {
    318         header('Location: ' . $_SERVER['HTTP_REFERER']);
    319     } else {
    320         header('Location: '. get_settings('siteurl') .'/wp-admin/edit.php?p='.$p.'&c=1#comments');
    321     }
    322 
    323     break;
    324 
    325 case 'editedcomment':
    326 
    327     edit_comment();
    328 
    329     $referredby = $_POST['referredby'];
    330     if (!empty($referredby)) {
    331         header('Location: ' . $referredby);
    332     } else {
    333         header ("Location: edit.php?p=$comment_post_ID&c=1#comments");
    334     }
    335 
     140    exit();
    336141    break;
    337142
    338143default:
    339     $title = __('Create New Post');
    340     require_once ('./admin-header.php');
    341 ?>
    342 <?php if ( isset($_GET['posted']) ) : ?>
    343 <div id="message" class="updated fade"><p><?php printf(__('Post saved. <a href="%s">View site &raquo;</a>'), get_bloginfo('home') . '/'); ?></p></div>
    344 <?php endif; ?>
    345 <?php
    346     if ( current_user_can('edit_posts') ) {
    347         $action = 'post';
    348         get_currentuserinfo();
    349         if ( $drafts = get_users_drafts( $user_ID ) ) {
    350             ?>
    351             <div class="wrap">
    352             <p><strong><?php _e('Your Drafts:') ?></strong>
    353             <?php
    354             $num_drafts = count($drafts);
    355             if ( $num_drafts > 15 ) $num_drafts = 15;
    356             for ( $i = 0; $i < $num_drafts; $i++ ) {
    357                 $draft = $drafts[$i];
    358                 if ( 0 != $i )
    359                     echo ', ';
    360                 $draft->post_title = stripslashes($draft->post_title);
    361                 if ( empty($draft->post_title) )
    362                     $draft->post_title = sprintf(__('Post # %s'), $draft->ID);
    363                 echo "<a href='post.php?action=edit&amp;post=$draft->ID' title='" . __('Edit this draft') . "'>$draft->post_title</a>";
    364             }
    365             ?>
    366             <?php if ( 15 < count($drafts) ) { ?>
    367             , <a href="edit.php"><?php echo sprintf(__('and %s more'), (count($drafts) - 15) ); ?> &raquo;</a>
    368             <?php } ?>
    369             .</p>
    370             </div>
    371             <?php
    372         }
    373 
    374         $post = get_default_post_to_edit();
    375 
    376         include('edit-form-advanced.php');
    377 ?>
    378 <div class="wrap">
    379 <?php echo '<h3>'.__('WordPress bookmarklet').'</h3>
    380 <p>'.__('Right click on the following link and choose "Add to favorites" to create a posting shortcut.').'</p>'; ?>
    381 <p>
    382 
    383 <?php
    384 if ($is_NS4 || $is_gecko) {
    385 ?>
    386 <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_settings('siteurl') ?>/wp-admin/post.php?text='+encodeURIComponent(Q)+'&amp;popupurl='+encodeURIComponent(location.href)+'&amp;popuptitle='+encodeURIComponent(document.title);"><?php printf(__('Press It - %s'), wp_specialchars(get_settings('blogname'))); ?></a>
    387 <?php
    388 } else if ($is_winIE) {
    389 ?>
    390 <a href="javascript:Q='';if(top.frames.length==0)Q=document.selection.createRange().text;location.href='<?php echo get_settings('siteurl') ?>/wp-admin/post.php?text='+encodeURIComponent(Q)+'&amp;popupurl='+encodeURIComponent(location.href)+'&amp;popuptitle='+encodeURIComponent(document.title);"><?php printf(__('Press it - %s'), get_settings('blogname')); ?></a>
    391 <script type="text/javascript">
    392 <!--
    393 function oneclickbookmarklet(blah) {
    394 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");
    395 }
    396 // -->
    397 </script>
    398 <br />
    399 <br />
    400 <?php _e('One-click bookmarklet:') ?><br />
    401 <a href="javascript:oneclickbookmarklet(0);"><?php _e('click here') ?></a>
    402 <?php
    403 } else if ($is_opera) {
    404 ?>
    405 <a href="javascript:location.href='<?php echo get_settings('siteurl'); ?>/wp-admin/post.php?popupurl='+escape(location.href)+'&popuptitle='+escape(document.title);"><?php printf(__('Press it - %s'), get_settings('blogname')); ?></a>
    406 <?php
    407 } else if ($is_macIE) {
    408 ?>
    409 <a href="javascript:Q='';location.href='<?php echo get_settings('siteurl'); ?>/wp-admin/bookmarklet.php?text='+escape(document.getSelection())+'&popupurl='+escape(location.href)+'&popuptitle='+escape(document.title);"><?php printf(__('Press it - %s'), get_settings('blogname')); ?></a>
    410 <?php
    411 }
    412 ?>
    413 </p>
    414 </div>
    415 <?php
    416 } else {
    417 ?>
    418 <div class="wrap">
    419 <p><?php printf(__('Since you&#8217;re a newcomer, you&#8217;ll have to wait for an admin to raise your level to 1, in order to be authorized to post.<br />
    420 You can also <a href="mailto:%s?subject=Promotion?">e-mail the admin</a> to ask for a promotion.<br />
    421 When you&#8217;re promoted, just reload this page and you&#8217;ll be able to blog. :)'), get_settings('admin_email')); ?>
    422 </p>
    423 </div>
    424 <?php
    425 }
    426 
    427144    break;
    428145} // end switch
    429 /* </Edit> */
    430146include('admin-footer.php');
    431147?>
  • trunk/wp-includes/pluggable-functions.php

    r3529 r3563  
    332332    }
    333333    $notify_message .= get_permalink($comment->comment_post_ID) . "#comments\r\n\r\n";
    334     $notify_message .= sprintf( __('To delete this comment, visit: %s'), get_settings('siteurl').'/wp-admin/post.php?action=confirmdeletecomment&p='.$comment->comment_post_ID."&comment=$comment_id" ) . "\r\n";
    335     $notify_message .= sprintf( __('To mark this comment as spam, visit: %s'), get_settings('siteurl').'/wp-admin/post.php?action=confirmdeletecomment&delete_type=spam&p='.$comment->comment_post_ID."&comment=$comment_id" ) . "\r\n";
     334    $notify_message .= sprintf( __('To delete this comment, visit: %s'), get_settings('siteurl').'/wp-admin/comment.php?action=confirmdeletecomment&p='.$comment->comment_post_ID."&comment=$comment_id" ) . "\r\n";
     335    $notify_message .= sprintf( __('To mark this comment as spam, visit: %s'), get_settings('siteurl').'/wp-admin/comment.php?action=confirmdeletecomment&delete_type=spam&p='.$comment->comment_post_ID."&comment=$comment_id" ) . "\r\n";
    336336
    337337    $wp_email = 'wordpress@' . preg_replace('#^www\.#', '', strtolower($_SERVER['SERVER_NAME']));
     
    389389    $notify_message .= sprintf( __('Whois  : http://ws.arin.net/cgi-bin/whois.pl?queryinput=%s'), $comment->comment_author_IP ) . "\r\n";
    390390    $notify_message .= __('Comment: ') . "\r\n" . $comment->comment_content . "\r\n\r\n";
    391     $notify_message .= sprintf( __('To approve this comment, visit: %s'),  get_settings('siteurl').'/wp-admin/post.php?action=mailapprovecomment&p='.$comment->comment_post_ID."&comment=$comment_id" ) . "\r\n";
    392     $notify_message .= sprintf( __('To delete this comment, visit: %s'), get_settings('siteurl').'/wp-admin/post.php?action=confirmdeletecomment&p='.$comment->comment_post_ID."&comment=$comment_id" ) . "\r\n";
    393     $notify_message .= sprintf( __('To mark this comment as spam, visit: %s'), get_settings('siteurl').'/wp-admin/post.php?action=confirmdeletecomment&delete_type=spam&p='.$comment->comment_post_ID."&comment=$comment_id" ) . "\r\n";
     391    $notify_message .= sprintf( __('To approve this comment, visit: %s'),  get_settings('siteurl').'/wp-admin/comment.php?action=mailapprovecomment&p='.$comment->comment_post_ID."&comment=$comment_id" ) . "\r\n";
     392    $notify_message .= sprintf( __('To delete this comment, visit: %s'), get_settings('siteurl').'/wp-admin/comment.php?action=confirmdeletecomment&p='.$comment->comment_post_ID."&comment=$comment_id" ) . "\r\n";
     393    $notify_message .= sprintf( __('To mark this comment as spam, visit: %s'), get_settings('siteurl').'/wp-admin/comment.php?action=confirmdeletecomment&delete_type=spam&p='.$comment->comment_post_ID."&comment=$comment_id" ) . "\r\n";
    394394    $notify_message .= sprintf( __('Currently %s comments are waiting for approval. Please visit the moderation panel:'), $comments_waiting ) . "\r\n";
    395395    $notify_message .= get_settings('siteurl') . "/wp-admin/moderation.php\r\n";
Note: See TracChangeset for help on using the changeset viewer.