Make WordPress Core

Changeset 45453


Ignore:
Timestamp:
05/27/2019 02:39:46 AM (7 years ago)
Author:
SergeyBiryukov
Message:

Privacy: Remove reinstated wp-admin/options-privacy.php from $_old_files.

Fix WPCS violations in [45448].

See #43895.

Location:
trunk/src/wp-admin
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/list-table.php

    r45448 r45453  
    2323        $core_classes = array(
    2424                //Site Admin
    25                 'WP_Posts_List_Table'          => 'posts',
    26                 'WP_Media_List_Table'          => 'media',
    27                 'WP_Terms_List_Table'          => 'terms',
    28                 'WP_Users_List_Table'          => 'users',
    29                 'WP_Comments_List_Table'       => 'comments',
    30                 'WP_Post_Comments_List_Table'  => array( 'comments', 'post-comments' ),
    31                 'WP_Links_List_Table'          => 'links',
    32                 'WP_Plugin_Install_List_Table' => 'plugin-install',
    33                 'WP_Themes_List_Table'         => 'themes',
    34                 'WP_Theme_Install_List_Table'  => array( 'themes', 'theme-install' ),
    35                 'WP_Plugins_List_Table'        => 'plugins',
     25                'WP_Posts_List_Table'                         => 'posts',
     26                'WP_Media_List_Table'                         => 'media',
     27                'WP_Terms_List_Table'                         => 'terms',
     28                'WP_Users_List_Table'                         => 'users',
     29                'WP_Comments_List_Table'                      => 'comments',
     30                'WP_Post_Comments_List_Table'                 => array( 'comments', 'post-comments' ),
     31                'WP_Links_List_Table'                         => 'links',
     32                'WP_Plugin_Install_List_Table'                => 'plugin-install',
     33                'WP_Themes_List_Table'                        => 'themes',
     34                'WP_Theme_Install_List_Table'                 => array( 'themes', 'theme-install' ),
     35                'WP_Plugins_List_Table'                       => 'plugins',
    3636
    3737                // Network Admin
    38                 'WP_MS_Sites_List_Table'  => 'ms-sites',
    39                 'WP_MS_Users_List_Table'  => 'ms-users',
    40                 'WP_MS_Themes_List_Table' => 'ms-themes',
     38                'WP_MS_Sites_List_Table'                      => 'ms-sites',
     39                'WP_MS_Users_List_Table'                      => 'ms-users',
     40                'WP_MS_Themes_List_Table'                     => 'ms-themes',
    4141
    4242                // Privacy requests tables
  • trunk/src/wp-admin/includes/update-core.php

    r45365 r45453  
    537537        'wp-admin/images/screenshots/twitter-embed-2.png',
    538538        'wp-admin/js/utils.js',
    539         'wp-admin/options-privacy.php',
    540539        'wp-app.php',
    541540        'wp-includes/class-wp-atom-server.php',
  • trunk/src/wp-admin/options-privacy.php

    r45448 r45453  
    146146
    147147                $view_href = get_permalink( $privacy_policy_page_id );
    148 
    149148                ?>
    150149                <p class="tools-privacy-edit"><strong>
    151150                        <?php
    152 
    153151                        if ( 'publish' === get_post_status( $privacy_policy_page_id ) ) {
    154152                                printf(
    … …  
    166164                                );
    167165                        }
    168 
    169166                        ?>
    170167                </strong></p>
    … …  
    174171        <p>
    175172                <?php
    176 
    177173                printf(
    178174                        /* translators: 1: Privacy Policy guide URL, 2: additional link attributes, 3: accessibility text */
    … …  
    182178                        ''
    183179                );
    184 
    185180                ?>
    186181        </p>
    … …  
    202197                        <td>
    203198                                <?php
    204                                
    205199                                $has_pages = (bool) get_posts(
    206200                                        array(
    … …  
    219213                                                <input type="hidden" name="action" value="set-privacy-page" />
    220214                                                <?php
    221                                                
    222215                                                wp_dropdown_pages(
    223216                                                        array(
  • trunk/src/wp-admin/tools.php

    r45448 r45453  
    6161<?php
    6262
    63         if ( current_user_can( 'import' ) ) :
    64                 $cats = get_taxonomy( 'category' );
    65                 $tags = get_taxonomy( 'post_tag' );
    66                 if ( current_user_can( $cats->cap->manage_terms ) || current_user_can( $tags->cap->manage_terms ) ) :
    67                         ?>
    68         <div class="card">
    69                 <h2 class="title"><?php _e( 'Categories and Tags Converter' ); ?></h2>
    70                 <p><?php printf( __( 'If you want to convert your categories to tags (or vice versa), use the <a href="%s">Categories and Tags Converter</a> available from the Import screen.' ), 'import.php' ); ?></p>
    71         </div>
    72                         <?php
     63if ( current_user_can( 'import' ) ) :
     64        $cats = get_taxonomy( 'category' );
     65        $tags = get_taxonomy( 'post_tag' );
     66        if ( current_user_can( $cats->cap->manage_terms ) || current_user_can( $tags->cap->manage_terms ) ) :
     67                ?>
     68                <div class="card">
     69                        <h2 class="title"><?php _e( 'Categories and Tags Converter' ); ?></h2>
     70                        <p><?php printf( __( 'If you want to convert your categories to tags (or vice versa), use the <a href="%s">Categories and Tags Converter</a> available from the Import screen.' ), 'import.php' ); ?></p>
     71                </div>
     72                <?php
    7373        endif;
    74         endif;
     74endif;
    7575
    76         /**
    77         * Fires at the end of the Tools Administration screen.
    78         *
    79         * @since 2.8.0
    80         */
    81         do_action( 'tool_box' );
     76/**
     77 * Fires at the end of the Tools Administration screen.
     78 *
     79 * @since 2.8.0
     80 */
     81do_action( 'tool_box' );
    8282
    8383?>
Note: See TracChangeset for help on using the changeset viewer.