Ticket #14837: custom-header-15606.diff
File custom-header-15606.diff, 2.1 KB (added by , 14 years ago) |
---|
-
wp-includes/theme.php
1402 1402 add_action('wp_head', $header_callback); 1403 1403 1404 1404 add_theme_support( 'custom-header' ); 1405 add_theme_support( 'custom-header-uploads' ); 1405 1406 1406 1407 if ( ! is_admin() ) 1407 1408 return; -
wp-admin/custom-header.php
456 456 <?php } ?> 457 457 </td> 458 458 </tr> 459 459 <?php if ( current_theme_supports( 'custom-header-uploads' ) ): ?> 460 460 <tr valign="top"> 461 461 <th scope="row"><?php _e( 'Upload Image' ); ?></th> 462 462 <td> … … 473 473 </form> 474 474 </td> 475 475 </tr> 476 <?php endif; ?> 476 477 </tbody> 477 478 </table> 478 479 … … 483 484 <tr valign="top"> 484 485 <th scope="row"><?php _e( 'Default Images' ); ?></th> 485 486 <td> 487 <?php if ( current_theme_supports( 'custom-header-uploads' ) ): ?> 486 488 <p><?php _e( 'If you don‘t want to upload your own image, you can use one of these cool headers.' ) ?></p> 489 <?php else: ?> 490 <p><?php _e( 'You can use of these cool headers' ) ?> 491 <?php endif; ?> 487 492 <?php 488 493 $this->show_default_header_selector(); 489 494 ?> … … 568 573 */ 569 574 function step_2() { 570 575 check_admin_referer('custom-header-upload', '_wpnonce-custom-header-upload'); 576 if ( ! current_theme_supports('custom-header-uploads') ): 577 _e( 'You are not authorized to upload custom headers' ); 578 return; 579 endif; 580 571 581 $overrides = array('test_form' => false); 572 582 $file = wp_handle_upload($_FILES['import'], $overrides); 573 583 … … 647 657 * @since 2.1.0 648 658 */ 649 659 function step_3() { 650 check_admin_referer('custom-header-crop-image'); 660 check_admin_referer('custom-header-crop-image'); 661 if ( ! current_theme_supports('custom-header-uploads') ): 662 _e( 'You are not authorized to upload custom headers' ); 663 return; 664 endif; 651 665 if ( $_POST['oitar'] > 1 ) { 652 666 $_POST['x1'] = $_POST['x1'] * $_POST['oitar']; 653 667 $_POST['y1'] = $_POST['y1'] * $_POST['oitar'];