Changeset 3230
- Timestamp:
- 05/24/2016 04:01:00 PM (8 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/shortcodes/class-upload.php
r2640 r3230 8 8 */ 9 9 public static function display() { 10 ob_start(); 11 10 12 if ( is_user_logged_in() ) : 11 13 12 if ( ! empty( $_POST['_wpnonce'] ) && wp_verify_nonce( $_POST['_wpnonce'], 'wporg-plugins-upload' ) && 'upload' === $_POST['action'] ) {13 if ( UPLOAD_ERR_OK === $_FILES['zip_file']['error'] ) {14 if ( ! empty( $_POST['_wpnonce'] ) && wp_verify_nonce( $_POST['_wpnonce'], 'wporg-plugins-upload' ) && 'upload' === $_POST['action'] ) : 15 if ( UPLOAD_ERR_OK === $_FILES['zip_file']['error'] ) : 14 16 $uploader = new Upload_Handler; 15 17 $message = $uploader->process_upload(); 16 } else {18 else : 17 19 $message = __( 'Error in file upload.', 'wporg-plugins' ); 18 }20 endif; 19 21 20 if ( ! empty( $message ) ) { 21 echo "<div class='notice notice-warning'><p>{$message}</p></div>\n"; 22 } 23 } 24 ?> 22 if ( ! empty( $message ) ) : 23 echo "<div class='notice notice-warning notice-alt'><p>{$message}</p></div>\n"; 24 endif; 25 26 else : 27 $plugins = wp_count_posts( 'plugin', 'readable' ); 28 ?> 29 30 <div class="plugin-queue-message notice notice-info notice-alt"> 31 <p> 32 <?php 33 printf( _n( 'Currently there is %1$s plugin in the review queue.', 'Currently there are %1$s plugins in the review queue, %2$s of which are awaiting their initial review.', ( $plugins->draft + $plugins->pending ), 'wporg-plugins' ), 34 '<strong>' . ( $plugins->draft + $plugins->pending ) . '</strong>', 35 '<strong>' . $plugins->draft . '</strong>' 36 ); 37 ?> 38 </p> 39 </div> 40 41 <?php endif; ?> 42 25 43 <form enctype="multipart/form-data" id="upload_form" method="POST" action=""> 26 44 <?php wp_nonce_field( 'wporg-plugins-upload' ); ?> … … 33 51 </p> 34 52 </form> 53 35 54 <?php else : ?> 36 <p><?php printf( __( 'Before you can upload a new plugin, <a href="%s">please log in</a>.', 'wporg-plugins' ), esc_url( 'https://login.wordpress.org/' ) ); ?> 37 </p> 55 56 <p><?php printf( __( 'Before you can upload a new plugin, <a href="%s">please log in</a>.', 'wporg-plugins' ), esc_url( 'https://login.wordpress.org/' ) ); ?></p> 57 38 58 <?php endif; 59 60 return ob_get_clean(); 39 61 } 40 62 -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/css/style.css
r3229 r3230 438 438 margin: 0 0 1.5em; 439 439 width: 100%; 440 } 441 442 .notice { 443 background: #fff; 444 border-left: 4px solid #fff; 445 box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.1); 446 margin: 1em 0; 447 padding: 1px 12px; 448 } 449 450 .notice p { 451 font-size: 12.8px; 452 font-size: 0.8rem; 453 margin: 0.5em 0; 454 padding: 2px; 455 } 456 457 .notice.notice-alt { 458 box-shadow: none; 459 } 460 461 .notice.notice-large { 462 padding: 10px 20px; 463 } 464 465 .notice.notice-success { 466 border-left-color: #46b450; 467 } 468 469 .notice.notice-success.notice-alt { 470 background-color: #ecf7ed; 471 } 472 473 .notice.notice-warning { 474 border-left-color: #ffb900; 475 } 476 477 .notice.notice-warning.notice-alt { 478 background-color: #fff8e5; 479 } 480 481 .notice.notice-error { 482 border-left-color: #dc3232; 483 } 484 485 .notice.notice-error.notice-alt { 486 background-color: #fbeaea; 487 } 488 489 .notice.notice-info { 490 border-left-color: #00a0d2; 491 } 492 493 .notice.notice-info.notice-alt { 494 background-color: #e5f5fa; 440 495 } 441 496 -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/sass/elements/_elements.scss
r3193 r3230 39 39 40 40 @import "tables"; 41 @import "notices";
Note: See TracChangeset
for help on using the changeset viewer.