Make WordPress Core

Changeset 9660


Ignore:
Timestamp:
11/13/2008 07:45:11 AM (16 years ago)
Author:
markjaquith
Message:

Do not show Media Upload buttons in Visual Editor if user lacks the capabilities to upload files. fixes #8110

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-form-advanced.php

    r9641 r9660  
    578578<div id="<?php echo user_can_richedit() ? 'postdivrich' : 'postdiv'; ?>" class="postarea">
    579579
    580 <!--<div id="add-media-button"><a id="add-media-link" href="<?php echo clean_url( admin_url( 'media-upload.php?post_id=' . ( $post_ID ? $post_ID : $temp_ID ) . '&amp;type=image&amp;TB_iframe=true' ) ); ?>" class="thickbox button"><?php _e( 'Insert Media' ); ?></a></div>-->
    581 
    582580<?php the_editor($post->post_content); ?>
    583581
  • trunk/wp-includes/general-template.php

    r9486 r9660  
    14841484        $rows = 12;
    14851485
     1486    if ( !current_user_can( 'upload_files' ) )
     1487        $media_buttons = false;
     1488
    14861489    $richedit =  user_can_richedit();
    14871490    $rows = "rows='$rows'";
Note: See TracChangeset for help on using the changeset viewer.