Make WordPress Core

Ticket #7435: comment-reply-no-js-validate.diff

File comment-reply-no-js-validate.diff, 2.0 KB (added by nbachiyski, 16 years ago)

Hides the Reply button if no js and fixes some HTML validation problems

  • wp-admin/edit-comments.php

     
    174174
    175175<div class="alignleft">
    176176<select name="action">
    177 <option value="" selected><?php _e('Actions') ?></option>
     177<option value="" selected="selected"><?php _e('Actions') ?></option>
    178178<?php if ( 'approved' == $comment_status ): ?>
    179179<option value="unapprove"><?php _e('Unapprove'); ?></option>
    180180<?php else : ?>
    181 <option value="approve"><?php _e('Approve'); ?>
     181<option value="approve"><?php _e('Approve'); ?></option>
    182182<?php endif; ?>
    183183<?php if ( 'spam' != $comment_status ): ?>
    184184<option value="markspam"><?php _e('Mark as Spam'); ?></option>
     
    263263
    264264<?php
    265265wp_comment_reply('-1', true, 'detail');
    266 include('admin-footer.php'); ?>
    267  No newline at end of file
     266include('admin-footer.php'); ?>
  • wp-admin/includes/template.php

     
    10341034                }
    10351035
    10361036                if ( 'spam' != $the_comment_status )
    1037                         $actions['reply'] = ' | <a onclick="commentReply.open(\''.$comment->comment_ID.'\',\''.$post->ID.'\',this);return false;" title="'.__('Reply to this comment').'" href="#">' . __('Reply') . '</a>';
     1037                        $actions['reply'] = '<span class="hide-if-no-js"> | <a onclick="commentReply.open(\''.$comment->comment_ID.'\',\''.$post->ID.'\',this);return false;" title="'.__('Reply to this comment').'" href="#">' . __('Reply') . '</a></span>';
    10381038
    10391039                $actions = apply_filters( 'comment_row_actions', $actions, $comment );
    10401040
     
    10781078        }
    10791079?>
    10801080        <div id="replyerror" style="display:none;">
    1081         <img src="images/logo.gif" />
    10821081        <h3 class="info-box-title"><?php _e('Comment Reply Error'); ?></h3>
    10831082        <p id="replyerrtext"></p>
    10841083        <p class="submit"><button id="close-button" onclick="commentReply.close();" class="button"><?php _e('Close'); ?></button></p>