mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@23262 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1454,6 +1454,12 @@ function wp_enqueue_media( $args = array() ) {
|
||||
$tabs = apply_filters( 'media_upload_tabs', $tabs );
|
||||
unset( $tabs['type'], $tabs['type_url'], $tabs['gallery'], $tabs['library'] );
|
||||
|
||||
$props = array(
|
||||
'link' => get_option( 'image_default_link_type' ), // db default is 'file'
|
||||
'align' => get_option( 'image_default_align' ), // empty default
|
||||
'size' => get_option( 'image_default_size' ), // empty default
|
||||
);
|
||||
|
||||
$settings = array(
|
||||
'tabs' => $tabs,
|
||||
'tabUrl' => add_query_arg( array( 'chromeless' => true ), admin_url('media-upload.php') ),
|
||||
@@ -1465,6 +1471,7 @@ function wp_enqueue_media( $args = array() ) {
|
||||
'post' => array(
|
||||
'id' => 0,
|
||||
),
|
||||
'defaultProps' => $props,
|
||||
);
|
||||
|
||||
$post = null;
|
||||
|
||||
Reference in New Issue
Block a user