Changeset 10796
- Timestamp:
- 03/09/2021 12:38:15 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/shortcodes/class-readme-validator.php
r10004 r10796 14 14 <div class="wrap"> 15 15 <?php 16 if ( $_ POST ) {16 if ( $_REQUEST ) { 17 17 self::validate_readme(); 18 18 } 19 19 20 $readme_url = $_ POST['readme_url'] ?? '';20 $readme_url = $_REQUEST['readme'] ?? ''; 21 21 $readme_contents = $_POST['readme_contents'] ?? ''; 22 22 $readme_contents = base64_decode( wp_unslash( $readme_contents ) ); 23 23 ?> 24 24 25 <form method=" post" action="">25 <form method="get" action=""> 26 26 <p> 27 <input type="text" name="readme _url" size="70" placeholder="https://" value="<?php echo esc_attr( $readme_url ); ?>" />27 <input type="text" name="readme" size="70" placeholder="https://" value="<?php echo esc_attr( $readme_url ); ?>" /> 28 28 <input type="submit" class="button button-secondary" value="<?php esc_attr_e( 'Validate!', 'wporg-plugins' ); ?>" /> 29 29 </p> … … 33 33 <textarea rows="20" cols="100" name="readme_visible" placeholder="=== Plugin Name ==="><?php echo esc_textarea( $readme_contents ); ?></textarea> 34 34 <form id="readme-data" method="post" action=""> 35 <input type="hidden" name="readme" value="" /> 35 36 <textarea class="screen-reader-text" rows="20" cols="100" name="readme_contents"><?php echo esc_textarea( $readme_contents ); ?></textarea> 36 37 <p><input type="submit" class="button button-secondary" value="<?php esc_attr_e( 'Validate!', 'wporg-plugins' ); ?>" /></p> … … 58 59 */ 59 60 protected static function validate_readme() { 60 if ( ! empty( $_ POST['readme_url'] ) ) {61 $errors = Validator::instance()->validate_url( wp_unslash( $_ POST['readme_url'] ) );61 if ( ! empty( $_REQUEST['readme'] ) ) { 62 $errors = Validator::instance()->validate_url( wp_unslash( $_REQUEST['readme'] ) ); 62 63 63 64 } elseif ( ! empty( $_POST['readme_contents'] ) ) {
Note: See TracChangeset
for help on using the changeset viewer.