diff --git a/wordpress.org/public_html/wp-content/plugins/theme-directory/upload.php b/wordpress.org/public_html/wp-content/plugins/theme-directory/upload.php
index 690827f..b047c60 100644
|
a
|
b
|
function wporg_themes_render_upload_shortcode() { |
| 20 | 20 | if ( is_user_logged_in() ) : |
| 21 | 21 | |
| 22 | 22 | if ( ! empty( $_POST['_wpnonce'] ) && wp_verify_nonce( $_POST['_wpnonce'], 'wporg-themes-upload' ) && 'upload' === $_POST['action'] ) { |
| 23 | | $message = wporg_themes_process_upload(); |
| | 23 | $message = wporg_themes_process_upload(); |
| 24 | 24 | |
| 25 | 25 | if ( ! empty( $message ) ) { |
| 26 | 26 | echo "<div class='notice notice-warning'><p>{$message}</p></div>\n"; |
| … |
… |
function wporg_themes_render_upload_shortcode() { |
| 32 | 32 | <?php wp_nonce_field( 'wporg-themes-upload' ); ?> |
| 33 | 33 | <input type="hidden" name="action" value="upload"/> |
| 34 | 34 | <input type="file" id="zip_file" name="zip_file" size="25"/> |
| | 35 | <br /> |
| | 36 | <input type="checkbox" id="i_agree" name="i_agree" value="1" /> <?php printf( esc_html__( 'I agree to all the terms and conditions set by the %s.', 'wporg-themes' ), '<a href="https://make.wordpress.org/themes/handbook/review/required/">' . esc_html__( 'theme guidelines', 'wporg-themes' ) . '</a>' ); ?> |
| | 37 | <br /> |
| 35 | 38 | <input id="upload_button" class="button" type="submit" value="<?php esc_attr_e( 'Upload', 'wporg-themes' ); ?>"/> |
| 36 | 39 | |
| 37 | 40 | <p> |
| … |
… |
function wporg_themes_process_upload( ) { |
| 84 | 87 | return __( 'Error in file upload.', 'wporg-themes' ); |
| 85 | 88 | } |
| 86 | 89 | |
| | 90 | if ( ! isset( $_REQUEST['i_agree'] ) || 1 !== absint( $_REQUEST['i_agree'] ) ) { |
| | 91 | return __( 'You must agree to the terms.', 'wporg-themes' ); |
| | 92 | } |
| | 93 | |
| 87 | 94 | if ( ! class_exists( 'WPORG_Themes_Upload' ) ) { |
| 88 | 95 | include_once plugin_dir_path( __FILE__ ) . 'class-wporg-themes-upload.php'; |
| 89 | 96 | } |