Make WordPress Core

Ticket #12886: 12886.1.diff

File 12886.1.diff, 1.5 KB (added by caesarsgrunt, 13 years ago)

Hide Comment and Ping checkboxes when they don't apply

  • wp-admin/includes/template.php

     
    10411041<?php if ( $bulk ) : ?>
    10421042
    10431043                <div class="inline-edit-group">
     1044<?php if ( post_type_supports($screen->post_type, 'comments') ) { ?>
    10441045                <label class="alignleft">
    10451046                        <span class="title"><?php _e( 'Comments' ); ?></span>
    10461047                        <select name="comment_status">
     
    10491050                                <option value="closed"><?php _e('Do not allow'); ?></option>
    10501051                        </select>
    10511052                </label>
    1052 
     1053<?php } if ( post_type_supports($screen->post_type, 'trackbacks') ) { ?>
    10531054                <label class="alignright">
    10541055                        <span class="title"><?php _e( 'Pings' ); ?></span>
    10551056                        <select name="ping_status">
     
    10581059                                <option value="closed"><?php _e('Do not allow'); ?></option>
    10591060                        </select>
    10601061                </label>
     1062<?php } ?>
    10611063                </div>
    10621064
    10631065<?php else : // $bulk ?>
    10641066
    10651067                <div class="inline-edit-group">
     1068<?php if ( post_type_supports($screen->post_type, 'comments') ) { ?>
    10661069                        <label class="alignleft">
    10671070                                <input type="checkbox" name="comment_status" value="open" />
    10681071                                <span class="checkbox-title"><?php _e( 'Allow Comments' ); ?></span>
    10691072                        </label>
    1070 
     1073<?php } if ( post_type_supports($screen->post_type, 'trackbacks') ) { ?>
    10711074                        <label class="alignleft">
    10721075                                <input type="checkbox" name="ping_status" value="open" />
    10731076                                <span class="checkbox-title"><?php _e( 'Allow Pings' ); ?></span>
    10741077                        </label>
     1078<?php } ?>
    10751079                </div>
    10761080
    10771081<?php endif; // $bulk ?>