Make WordPress Core


Ignore:
Timestamp:
09/17/2008 12:50:34 AM (17 years ago)
Author:
azaozz
Message:

Update for the Save box in edit comment form.

File:
1 edited

Legend:

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

    r8697 r8913  
    2121<h2><?php echo $toprow_title; ?></h2>
    2222
    23 <div id="previewview">
    24 <a class="button" href="<?php echo get_comment_link(); ?>" target="_blank"><?php _e('View this Comment'); ?></a>
    25 </div>
    2623<div id="poststuff">
    2724<input type="hidden" name="user_ID" value="<?php echo (int) $user_ID ?>" />
     
    3027// All meta boxes should be defined and added before the first do_meta_boxes() call (or potentially during the do_meta_boxes action).
    3128
    32 function comment_submit_meta_box($comment) {
     29function comment_submit_meta_box($comment) { // not used, but keeping for a bit longer in case it's needed
    3330?>
    3431<div class="submitbox" id="submitcomment">
     
    3936<select name='comment_status' id='comment_status'>
    4037<option<?php selected( $comment->comment_approved, '1' ); ?> value='1'><?php _e('Approved') ?></option>
    41 <option<?php selected( $comment->comment_approved, '0' ); ?> value='0'><?php _e('Moderated') ?></option>
     38<option<?php selected( $comment->comment_approved, '0' ); ?> value='0'><?php _e('Awaiting Moderation') ?></option>
    4239<option<?php selected( $comment->comment_approved, 'spam' ); ?> value='spam'><?php _e('Spam') ?></option>
    4340</select>
    4441</p>
     42
     43<div class="insidebox" id="deletebutton">
     44<?php
     45echo "<a class='submitdelete' href='" . wp_nonce_url("comment.php?action=deletecomment&amp;c=$comment->comment_ID&amp;_wp_original_http_referer=" . wp_get_referer(), 'delete-comment_' . $comment->comment_ID) . "' onclick=\"if ( confirm('" . js_escape(__("You are about to delete this comment. \n  'Cancel' to stop, 'OK' to delete.")) . "') ) { return true;}return false;\">" . __('Delete comment') . "</a>"; ?>
     46</div>
    4547
    4648<?php
     
    4951$time = mysql2date(get_option('time_format'), $comment->comment_date);
    5052?>
    51 <p class="curtime"><?php printf($stamp, $date, $time); ?>
    52 &nbsp;<a href="#edit_timestamp" class="edit-timestamp hide-if-no-js"><?php _e('Edit') ?></a></p>
    53 
    54 <div id='timestampdiv' class='hide-if-js'><?php touch_time(('editcomment' == $action), 0, 5); ?></div>
     53<div class="insidebox curtime"><span id="timestamp"><?php printf($stamp, $date, $time); ?></span>
     54&nbsp;<a href="#edit_timestamp" class="edit-timestamp hide-if-no-js" tabindex='4'><?php _e('Edit') ?></a>
     55<div id='timestampdiv' class='hide-if-js'><?php touch_time(('editcomment' == $action), 0, 5); ?></div></div>
    5556
    5657</div>
     
    5859<p class="submit">
    5960<input type="submit" name="save" value="<?php _e('Save'); ?>" tabindex="4" class="button button-highlighted" />
    60 <?php
    61 echo "<a class='submitdelete' href='" . wp_nonce_url("comment.php?action=deletecomment&amp;c=$comment->comment_ID&amp;_wp_original_http_referer=" . wp_get_referer(), 'delete-comment_' . $comment->comment_ID) . "' onclick=\"if ( confirm('" . js_escape(__("You are about to delete this comment. \n  'Cancel' to stop, 'OK' to delete.")) . "') ) { return true;}return false;\">" . __('Delete comment') . "</a>";
    62 ?>
     61<a class="preview button" href="<?php echo get_comment_link(); ?>" target="_blank"><?php _e('View Comment'); ?></a>
    6362</p>
    6463</div>
    6564<?php
    6665}
    67 add_meta_box('submitdiv', __('Save'), 'comment_submit_meta_box', 'comment', 'side', 'core');
     66// add_meta_box('submitdiv', __('Save'), 'comment_submit_meta_box', 'comment', 'side', 'core');
    6867?>
    6968
    7069<div id="side-info-column" class="inner-sidebar">
     70<div id="submitdiv" class="stuffbox" >
     71<h3><span class='hndle'>Save</span></h3>
    7172
    72 <?php $side_meta_boxes = do_meta_boxes('comment', 'side', $comment); ?>
     73<div class="submitbox" id="submitcomment">
     74<div class="inside-submitbox">
    7375
     76<div class="insidebox"><strong><label for='comment_status'><?php _e('This comment is') ?></label></strong><br />
     77<select name='comment_status' id='comment_status'>
     78<option<?php selected( $comment->comment_approved, '1' ); ?> value='1'><?php _e('Approved') ?></option>
     79<option<?php selected( $comment->comment_approved, '0' ); ?> value='0'><?php _e('Awaiting Moderation') ?></option>
     80<option<?php selected( $comment->comment_approved, 'spam' ); ?> value='spam'><?php _e('Spam') ?></option>
     81</select>
     82</div>
     83
     84<div class="insidebox" id="deletebutton">
     85<?php
     86echo "<a class='submitdelete' href='" . wp_nonce_url("comment.php?action=deletecomment&amp;c=$comment->comment_ID&amp;_wp_original_http_referer=" . wp_get_referer(), 'delete-comment_' . $comment->comment_ID) . "' onclick=\"if ( confirm('" . js_escape(__("You are about to delete this comment. \n  'Cancel' to stop, 'OK' to delete.")) . "') ) { return true;}return false;\">" . __('Delete comment') . "</a>"; ?>
     87</div>
     88
     89<?php
     90$stamp = __('%1$s at %2$s');
     91$date = mysql2date(get_option('date_format'), $comment->comment_date);
     92$time = mysql2date(get_option('time_format'), $comment->comment_date);
     93?>
     94<div class="insidebox curtime"><span id="timestamp"><?php printf($stamp, $date, $time); ?></span>&nbsp;<a href="#edit_timestamp" class="edit-timestamp hide-if-no-js" tabindex='4'><?php _e('Edit') ?></a>
     95<div id='timestampdiv' class='hide-if-js'><?php touch_time(('editcomment' == $action), 0, 5); ?></div></div>
     96
     97</div>
     98
     99<p class="submit">
     100<input type="submit" name="save" value="<?php _e('Save'); ?>" tabindex="4" class="button button-highlighted" />
     101<a class="preview button" href="<?php echo get_comment_link(); ?>" target="_blank"><?php _e('View Comment'); ?></a>
     102</p>
     103</div>
     104
     105</div>
    74106</div>
    75107
Note: See TracChangeset for help on using the changeset viewer.