Make WordPress Core


Ignore:
Timestamp:
01/04/2013 08:02:16 AM (12 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.

see #22841, for trunk.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/media.php

    r23214 r23262  
    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.