Making WordPress.org


Ignore:
Timestamp:
12/19/2017 04:22:37 PM (7 years ago)
Author:
obenland
Message:

PLugins: Clean up formatting with phpcbf

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/class-customizations.php

    r6217 r6287  
    11<?php
    22namespace WordPressdotorg\Plugin_Directory\Admin;
     3
    34use \WordPressdotorg\Plugin_Directory;
    45use \WordPressdotorg\Plugin_Directory\Tools;
     
    4950        add_action( 'do_meta_boxes', array( $this, 'replace_title_global' ) );
    5051
    51         add_filter( 'postbox_classes_plugin_internal-notes',      array( __NAMESPACE__ . '\Metabox\Internal_Notes', 'postbox_classes' ) );
    52         add_filter( 'postbox_classes_plugin_plugin-committers',   array( __NAMESPACE__ . '\Metabox\Committers',    'postbox_classes' ) );
    53         add_filter( 'postbox_classes_plugin_plugin-support-reps', array( __NAMESPACE__ . '\Metabox\Support_Reps',   'postbox_classes' ) );
    54         add_filter( 'wp_ajax_add-committer',        array( __NAMESPACE__ . '\Metabox\Committers', 'add_committer' ) );
    55         add_filter( 'wp_ajax_delete-committer',     array( __NAMESPACE__ . '\Metabox\Committers', 'remove_committer' ) );
    56         add_filter( 'wp_ajax_add-support-rep',      array( __NAMESPACE__ . '\Metabox\Support_Reps', 'add_support_rep' ) );
    57         add_filter( 'wp_ajax_delete-support-rep',   array( __NAMESPACE__ . '\Metabox\Support_Reps', 'remove_support_rep' ) );
     52        add_filter( 'postbox_classes_plugin_internal-notes', array( __NAMESPACE__ . '\Metabox\Internal_Notes', 'postbox_classes' ) );
     53        add_filter( 'postbox_classes_plugin_plugin-committers', array( __NAMESPACE__ . '\Metabox\Committers', 'postbox_classes' ) );
     54        add_filter( 'postbox_classes_plugin_plugin-support-reps', array( __NAMESPACE__ . '\Metabox\Support_Reps', 'postbox_classes' ) );
     55        add_filter( 'wp_ajax_add-committer', array( __NAMESPACE__ . '\Metabox\Committers', 'add_committer' ) );
     56        add_filter( 'wp_ajax_delete-committer', array( __NAMESPACE__ . '\Metabox\Committers', 'remove_committer' ) );
     57        add_filter( 'wp_ajax_add-support-rep', array( __NAMESPACE__ . '\Metabox\Support_Reps', 'add_support_rep' ) );
     58        add_filter( 'wp_ajax_delete-support-rep', array( __NAMESPACE__ . '\Metabox\Support_Reps', 'remove_support_rep' ) );
    5859        add_action( 'wp_ajax_plugin-author-lookup', array( __NAMESPACE__ . '\Metabox\Author', 'lookup_author' ) );
    5960    }
     
    204205
    205206        if ( $rejected ) {
    206             set_transient( 'settings_errors', array( array(
    207                 'setting' => 'wporg-plugins',
    208                 'code'    => 'plugins-bulk-rejected',
    209                 'message' => sprintf( _n( '%d plugin rejected.', '%d plugins rejected.', $rejected, 'wporg-plugins' ), $rejected ),
    210                 'type'    => 'updated',
    211             ) ) );
     207            set_transient( 'settings_errors', array(
     208                array(
     209                    'setting' => 'wporg-plugins',
     210                    'code'    => 'plugins-bulk-rejected',
     211                    'message' => sprintf( _n( '%d plugin rejected.', '%d plugins rejected.', $rejected, 'wporg-plugins' ), $rejected ),
     212                    'type'    => 'updated',
     213                ),
     214            ) );
    212215        }
    213216
     
    277280
    278281        if ( $message ) {
    279             printf( '<div class="notice %1$s"><p>%2$s</p></div>', esc_attr( $type ), esc_html( $message ) ); 
     282            printf( '<div class="notice %1$s"><p>%2$s</p></div>', esc_attr( $type ), esc_html( $message ) );
    280283        }
    281284    }
     
    331334            return $data;
    332335        }
    333        
     336
    334337        $existing_plugin = Plugin_Directory\Plugin_Directory::get_plugin_post( $data['post_name'] );
    335338
     
    416419        );
    417420
    418 
    419421        add_meta_box(
    420422            'plugin-fields',
     
    449451
    450452        // Remove unnecessary metaboxes.
    451         remove_meta_box( 'commentsdiv',      'plugin', 'normal' );
     453        remove_meta_box( 'commentsdiv', 'plugin', 'normal' );
    452454        remove_meta_box( 'commentstatusdiv', 'plugin', 'normal' );
    453455
     
    489491     * Changes the permalink for internal notes to link to the edit post screen.
    490492     *
    491      * @param string $link The comment permalink with '#comment-$id' appended.
     493     * @param string      $link The comment permalink with '#comment-$id' appended.
    492494     * @param \WP_Comment $comment The current comment object.
    493495     * @return string The permalink to the given comment.
     
    602604        ob_start();
    603605        if ( isset( $_REQUEST['mode'] ) && 'dashboard' == $_REQUEST['mode'] ) {
    604             require_once( ABSPATH . 'wp-admin/includes/dashboard.php' );
     606            require_once ABSPATH . 'wp-admin/includes/dashboard.php';
    605607            _wp_dashboard_recent_comments_row( $comment );
    606608        } else {
     
    618620            'id'       => $comment->comment_ID,
    619621            'data'     => $comment_list_item,
    620             'position' => $position
     622            'position' => $position,
    621623        );
    622624
     
    631633                _nx( '%s in moderation', '%s in moderation', $counts->moderated, 'comments', 'wporg-plugins' ),
    632634                number_format_i18n( $counts->moderated )
    633             )
     635            ),
    634636        );
    635637
Note: See TracChangeset for help on using the changeset viewer.