WordPress.org

Make WordPress Core

Changeset 7250


Ignore:
Timestamp:
03/11/2008 09:08:09 PM (13 years ago)
Author:
ryan
Message:

Fix edit links for attachments. Props mdawaffe. fixes #6168

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/link-template.php

    r7204 r7250  
    442442    $post = &get_post( $id );
    443443
    444     if ( $post->post_type == 'attachment' ) {
    445         return;
    446     } elseif ( $post->post_type == 'page' ) {
     444    if ( $post->post_type == 'page' ) {
    447445        if ( !current_user_can( 'edit_page', $post->ID ) )
    448446            return;
     
    462460    global $post;
    463461
    464     if ( $post->post_type == 'attachment' ) {
    465         return;
    466     } elseif ( $post->post_type == 'page' ) {
     462    if ( $post->post_type == 'page' ) {
    467463        if ( !current_user_can( 'edit_page', $post->ID ) )
    468464            return;
     
    484480    $post = &get_post( $comment->comment_post_ID );
    485481
    486     if ( $post->post_type == 'attachment' ) {
    487         return;
    488     } elseif ( $post->post_type == 'page' ) {
     482    if ( $post->post_type == 'page' ) {
    489483        if ( !current_user_can( 'edit_page', $post->ID ) )
    490484            return;
     
    502496
    503497    if ( $post->post_type == 'attachment' ) {
    504         return;
    505498    } elseif ( $post->post_type == 'page' ) {
    506499        if ( !current_user_can( 'edit_page', $post->ID ) )
Note: See TracChangeset for help on using the changeset viewer.