Make WordPress Core

Ticket #43259: 43259.diff

File 43259.diff, 4.5 KB (added by chetan200891, 7 years ago)

Created patch to remove extra tabs.

  • src/wp-admin/includes/meta-boxes.php

    diff --git a/src/wp-admin/includes/meta-boxes.php b/src/wp-admin/includes/meta-boxes.php
    index 181d5bb..4793e54 100644
    a b do_action( 'post_submitbox_minor_actions', $post ); 
    8989
    9090<div class="misc-pub-section misc-pub-post-status">
    9191<?php _e( 'Status:' ); ?> <span id="post-status-display">
    92                         <?php
     92<?php
    9393
    94                         switch ( $post->post_status ) {
    95                                 case 'private':
    96                                         _e( 'Privately Published' );
    97                                         break;
    98                                 case 'publish':
    99                                         _e( 'Published' );
    100                                         break;
    101                                 case 'future':
    102                                         _e( 'Scheduled' );
    103                                         break;
    104                                 case 'pending':
    105                                         _e( 'Pending Review' );
    106                                         break;
    107                                 case 'draft':
    108                                 case 'auto-draft':
    109                                         _e( 'Draft' );
    110                                         break;
    111                         }
     94switch ( $post->post_status ) {
     95        case 'private':
     96                _e( 'Privately Published' );
     97                break;
     98        case 'publish':
     99                _e( 'Published' );
     100                break;
     101        case 'future':
     102                _e( 'Scheduled' );
     103                break;
     104        case 'pending':
     105                _e( 'Pending Review' );
     106                break;
     107        case 'draft':
     108        case 'auto-draft':
     109                _e( 'Draft' );
     110                break;
     111}
    112112?>
    113113</span>
    114114<?php
    if ( 'publish' == $post->post_status || 'private' == $post->post_status || $can_ 
    147147
    148148<div class="misc-pub-section misc-pub-visibility" id="visibility">
    149149<?php _e( 'Visibility:' ); ?> <span id="post-visibility-display">
    150                                                         <?php
    151 
    152                                                         if ( 'private' == $post->post_status ) {
    153                                                                 $post->post_password = '';
    154                                                                 $visibility          = 'private';
    155                                                                 $visibility_trans    = __( 'Private' );
    156                                                         } elseif ( ! empty( $post->post_password ) ) {
    157                                                                 $visibility       = 'password';
    158                                                                 $visibility_trans = __( 'Password protected' );
    159                                                         } elseif ( $post_type == 'post' && is_sticky( $post->ID ) ) {
    160                                                                 $visibility       = 'public';
    161                                                                 $visibility_trans = __( 'Public, Sticky' );
    162                                                         } else {
    163                                                                 $visibility       = 'public';
    164                                                                 $visibility_trans = __( 'Public' );
    165                                                         }
    166 
    167                                                         echo esc_html( $visibility_trans );
     150<?php
     151
     152if ( 'private' == $post->post_status ) {
     153        $post->post_password = '';
     154        $visibility          = 'private';
     155        $visibility_trans    = __( 'Private' );
     156} elseif ( ! empty( $post->post_password ) ) {
     157        $visibility       = 'password';
     158        $visibility_trans = __( 'Password protected' );
     159} elseif ( $post_type == 'post' && is_sticky( $post->ID ) ) {
     160        $visibility       = 'public';
     161        $visibility_trans = __( 'Public, Sticky' );
     162} else {
     163        $visibility       = 'public';
     164        $visibility_trans = __( 'Public' );
     165}
     166
     167echo esc_html( $visibility_trans );
    168168?>
    169169</span>
    170170<?php if ( $can_publish ) { ?>
    function post_comment_status_meta_box( $post ) { 
    757757<input name="advanced_view" type="hidden" value="1" />
    758758<p class="meta-options">
    759759        <label for="comment_status" class="selectit"><input name="comment_status" type="checkbox" id="comment_status" value="open" <?php checked( $post->comment_status, 'open' ); ?> /> <?php _e( 'Allow comments' ); ?></label><br />
    760         <label for="ping_status" class="selectit"><input name="ping_status" type="checkbox" id="ping_status" value="open" <?php checked( $post->ping_status, 'open' ); ?> /> 
    761                                                                                                                                                                                                                                                                                                                 <?php
    762                                                                                                                                                                                                                                                                                                                 printf(
    763                                                                                                                                                                                                                                                                                                                         /* translators: %s: Codex URL */
    764                                                                                                                                                                                                                                                                                                                         __( 'Allow <a href="%s">trackbacks and pingbacks</a> on this page' ),
    765                                                                                                                                                                                                                                                                                                                         __( 'https://codex.wordpress.org/Introduction_to_Blogging#Managing_Comments' )
    766                                                                                                                                                                                                                                                                                                                 );
    767                 ?>
    768                 </label>
     760        <label for="ping_status" class="selectit"><input name="ping_status" type="checkbox" id="ping_status" value="open" <?php checked( $post->ping_status, 'open' ); ?> />
     761        <?php
     762        printf(
     763                /* translators: %s: Codex URL */
     764                __( 'Allow <a href="%s">trackbacks and pingbacks</a> on this page' ),
     765                __( 'https://codex.wordpress.org/Introduction_to_Blogging#Managing_Comments' )
     766        );
     767        ?>
     768        </label>
    769769        <?php
    770770        /**
    771771         * Fires at the end of the Discussion meta box on the post editing screen.
    function attachment_id3_data_meta_box( $post ) { 
    13541354        <p>
    13551355                <label for="title"><?php echo $label; ?></label><br />
    13561356                <input type="text" name="id3_<?php echo esc_attr( $key ); ?>" id="id3_<?php echo esc_attr( $key ); ?>" class="large-text" value="
    1357                                                                                                 <?php
    1358                                                                                                 if ( ! empty( $meta[ $key ] ) ) {
    1359                                                                                                         echo esc_attr( $meta[ $key ] );
    1360                                                                                                 }
     1357                <?php
     1358                if ( ! empty( $meta[ $key ] ) ) {
     1359                        echo esc_attr( $meta[ $key ] );
     1360                }
    13611361                ?>
    13621362                " />
    13631363        </p>