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/metabox/class-review-tools.php

    r6028 r6287  
    11<?php
    22namespace WordPressdotorg\Plugin_Directory\Admin\Metabox;
     3
    34use WordPressdotorg\Plugin_Directory\Tools;
    45
     
    1415        $zip_files = array();
    1516        foreach ( get_attached_media( 'application/zip', $post ) as $zip_file ) {
    16             $zip_files[ $zip_file->post_date ] = array( wp_get_attachment_url( $zip_file->ID ), $zip_file );
     17            $zip_files[ $zip_file->post_date ] = array( wp_get_attachment_url( $zip_file->ID ), $zip_file );
    1718        }
    1819        uksort( $zip_files, function( $a, $b ) {
     
    2223        if ( $zip_url = get_post_meta( $post->ID, '_submitted_zip', true ) ) {
    2324            // Back-compat only.
    24             $zip_files[ 'User provided URL' ] = array( $zip_url, null );
     25            $zip_files['User provided URL'] = array( $zip_url, null );
    2526        }
    2627
    2728        foreach ( $zip_files as $zip_date => $zip ) {
    2829            list( $zip_url, $zip_file ) = $zip;
    29             $zip_size = ( is_object( $zip_file ) ? size_format( filesize( get_attached_file( $zip_file->ID ) ), 1 ) : __( 'unknown size', 'wporg-plugins' ) );
    30             printf( '<p>' . __( '<strong>Zip file:</strong> %s', 'wporg-plugins' ) . '</p>',
     30            $zip_size                   = ( is_object( $zip_file ) ? size_format( filesize( get_attached_file( $zip_file->ID ) ), 1 ) : __( 'unknown size', 'wporg-plugins' ) );
     31            printf(
     32                '<p>' . __( '<strong>Zip file:</strong> %s', 'wporg-plugins' ) . '</p>',
    3133                sprintf( '%s <a href="%s">%s</a> (%s)', esc_html( $zip_date ), esc_url( $zip_url ), esc_html( $zip_url ), esc_html( $zip_size ) )
    3234            );
     
    6567                $subject = sprintf( __( '[WordPress Plugin Directory] Notice: %s', 'wporg-plugins' ), $post->post_title );
    6668            }
    67            
     69
    6870            ?>
    6971            <form id="contact-author" class="contact-author" method="POST" action="https://supportpress.wordpress.org/plugins/thread-new.php">
     
    7577            </form>
    7678            <?php
     79
    7780            return $string;
    7881        } );
Note: See TracChangeset for help on using the changeset viewer.