WordPress.org

Make WordPress Core


Ignore:
Timestamp:
01/04/2013 08:08:45 PM (8 years ago)
Author:
nacin
Message:

Media: Restore 3.4 behavior by consulting the old-school DB options for default align, size, and link properties.

This restores linking to media files as the default, over attachment pages. This 'default' cannot currently be changed by a user setting (per 3.4 behavior), due to the default database schema.

Merges [23262] to the 3.5 branch.
fixes #22841.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.5/wp-includes/media.php

    r23269 r23273  
    14551455    unset( $tabs['type'], $tabs['type_url'], $tabs['gallery'], $tabs['library'] );
    14561456
     1457    $props = array(
     1458        'link'  => get_option( 'image_default_link_type' ), // db default is 'file'
     1459        'align' => get_option( 'image_default_align' ), // empty default
     1460        'size'  => get_option( 'image_default_size' ),  // empty default
     1461    );
     1462
    14571463    $settings = array(
    14581464        'tabs'      => $tabs,
     
    14661472            'id' => 0,
    14671473        ),
     1474        'defaultProps' => $props,
    14681475    );
    14691476
Note: See TracChangeset for help on using the changeset viewer.