Changeset 8380
- Timestamp:
- 03/01/2019 09:03:33 AM (6 years ago)
- Location:
- sites/trunk/wordpress.tv/public_html/wp-content/themes/wptv2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.tv/public_html/wp-content/themes/wptv2/anon-upload-template.php
r8230 r8380 268 268 </p> 269 269 <p> 270 <input type="checkbox" id="wptv_video_wordcamp" name="wptv_video_wordcamp" />270 <input type="checkbox" id="wptv_video_wordcamp" name="wptv_video_wordcamp" <?php if ( !empty( $_GET['wptv_video_wordcamp'] ) ) { echo 'checked="checked"'; } ?> /> 271 271 <label for="wptv_video_wordcamp" class="wptv-video-wordcamp-cb"><?php esc_html_e( 'This is a WordCamp video' ); ?></label> 272 272 </p> … … 275 275 <p> 276 276 <label for="wptv_uploaded_by"><?php esc_html_e( 'Uploaded by' ); ?><span class="required"> * </span></label> 277 <input type="text" id="wptv_uploaded_by" name="wptv_uploaded_by" value=" " />277 <input type="text" id="wptv_uploaded_by" name="wptv_uploaded_by" value="<?php echo esc_attr( wp_unslash( $_GET['wptv_uploaded_by'] ?? '' ) ); ?>" /> 278 278 </p> 279 279 <p> 280 280 <label for="wptv_email"><?php esc_html_e( 'Email address' ); ?><span class="required"> * </span></label> 281 <input type="text" id="wptv_email" name="wptv_email" value=" " />281 <input type="text" id="wptv_email" name="wptv_email" value="<?php echo esc_attr( wp_unslash( $_GET['wptv_email'] ?? '' ) ); ?>" /> 282 282 </p> 283 283 <?php endif; ?> … … 285 285 <p> 286 286 <label for="wptv_video_title"><?php esc_html_e( 'Video title' ); ?></label> 287 <input type="text" id="wptv_video_title" name="wptv_video_title" value=" " />287 <input type="text" id="wptv_video_title" name="wptv_video_title" value="<?php echo esc_attr( wp_unslash( $_GET['wptv_video_title'] ?? '' ) ); ?>" /> 288 288 </p> 289 289 <p> 290 290 <label for="wptv_language"><?php esc_html_e( 'Language' ); ?></label> 291 <input type="text" id="wptv_language" name="wptv_language" value=" " />291 <input type="text" id="wptv_language" name="wptv_language" value="<?php echo esc_attr( wp_unslash( $_GET['wptv_language'] ?? '' ) ); ?>" /> 292 292 </p> 293 293 294 294 <div class="cats"> 295 <label for=" wptv_categories"><?php esc_html_e( 'Category' ); ?></label>295 <label for="post_category"><?php esc_html_e( 'Category' ); ?></label> 296 296 <ul class="cats-checkboxes"> 297 297 <?php 298 298 include_once( ABSPATH . '/wp-admin/includes/template.php' ); 299 wp_category_checklist(); 299 $selected_cats = false; 300 if ( isset( $_GET['post_category'] ) ) { 301 $selected_cats = array_map( 'intval', $_GET['post_category'] ); 302 } 303 wp_category_checklist( 0, 0, $selected_cats, false, null, false ); 300 304 ?> 301 305 </ul> … … 304 308 <p> 305 309 <label for="wptv_producer_username"><?php esc_html_e( 'Producer WordPress.org Username' ); ?></label> 306 <input type="text" id="wptv_producer_username" name="wptv_producer_username" value=" " />310 <input type="text" id="wptv_producer_username" name="wptv_producer_username" value="<?php echo esc_attr( wp_unslash( $_GET['wptv_producer_username'] ?? '' ) ); ?>" /> 307 311 </p> 308 312 <p> 309 313 <label for="wptv_speakers"><?php esc_html_e( 'Speakers' ); ?></label> 310 <input type="text" id="wptv_speakers" name="wptv_speakers" value=" " />314 <input type="text" id="wptv_speakers" name="wptv_speakers" value="<?php echo esc_attr( wp_unslash( $_GET['wptv_speakers'] ?? '' ) ); ?>" /> 311 315 </p> 312 316 <p> 313 317 <label for="wptv_event"><?php esc_html_e( 'Event' ); ?></label> 314 <input type="text" id="wptv_event" name="wptv_event" value=" " />318 <input type="text" id="wptv_event" name="wptv_event" value="<?php echo esc_attr( wp_unslash( $_GET['wptv_event'] ?? '' ) ); ?>" /> 315 319 </p> 316 320 <p> 317 321 <label for="wptv_video_description"><?php esc_html_e( 'Description' ); ?></label> 318 <textarea name="wptv_video_description" id="wptv_video_description" rows="8" cols="40">< /textarea>322 <textarea name="wptv_video_description" id="wptv_video_description" rows="8" cols="40"><?php echo esc_textarea( wp_unslash( $_GET['wptv_video_description'] ?? '' ) ); ?></textarea> 319 323 </p> 320 324 <p> 321 325 <label for="wptv_slides_url"><?php esc_html_e( 'Slides URL' ); ?></label> 322 <input type="text" name="wptv_slides_url" id="wptv_slides_url" value=" " />326 <input type="text" name="wptv_slides_url" id="wptv_slides_url" value="<?php echo esc_attr( wp_unslash( $_GET['wptv_slides_url'] ?? '' ) ); ?>" /> 323 327 </p> 324 328 <p> -
sites/trunk/wordpress.tv/public_html/wp-content/themes/wptv2/plugins/wordpresstv-anon-upload/anon-upload.php
r7675 r8380 24 24 } 25 25 26 $redir = home_url( 'submit-video' ); 26 $redir = home_url( '/submit-video/' ); 27 28 // Fields to prefill 29 $keep_fields = array( 30 'wptv_video_wordcamp', 31 'wptv_uploaded_by', 32 'wptv_email', 33 'wptv_language', 34 'post_category', // 'wptv_categories', 35 'wptv_producer_username', 36 'wptv_event', 37 ); 27 38 28 39 if ( $this->success ) { … … 30 41 } elseif ( $this->errors ) { 31 42 $redir = add_query_arg( array( 'error' => $this->errors ), $redir ); 43 44 // Video upload failed, include the video-specific fields in pre-fill. 45 $keep_fields[] = 'wptv_video_title'; 46 $keep_fields[] = 'wptv_speakers'; 47 $keep_fields[] = 'wptv_video_description'; 48 $keep_fields[] = 'wptv_slides_url'; 49 32 50 } else { 51 $keep_fields = array(); 33 52 $redir = add_query_arg( array( 'error' => 5 ), $redir ); 53 } 54 55 // Keep some fields. 56 if ( $keep_fields ) { 57 $redir = add_query_arg( 58 urlencode_deep( 59 array_intersect_key( 60 $_POST, 61 array_flip( $keep_fields ) 62 ) 63 ), 64 $redir 65 ); 34 66 } 35 67
Note: See TracChangeset
for help on using the changeset viewer.