Make WordPress Core


Ignore:
Timestamp:
06/30/2011 07:23:09 PM (13 years ago)
Author:
azaozz
Message:

DFW: check if the Add Image button is enabled in ms mode before using it, props nacin, fixes #17942

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/post.php

    r18369 r18380  
    17931793<?php
    17941794
     1795    $media_link_type = 'image';
     1796    if ( is_multisite() && ( ( ! $mu_media_buttons = get_site_option( 'mu_media_buttons' ) ) || empty( $mu_media_buttons['image'] ) ) )
     1797        $media_link_type = 'media';
     1798
    17951799    $buttons = array(
    17961800        // format: title, onclick, show in both editors
     
    18021806        '1' => 'separator',
    18031807        'blockquote' => array( 'title' => __('Blockquote (Alt+Shift+Q)'), 'onclick' => 'fullscreen.blockquote();', 'both' => false ),
    1804         'image' => array( 'title' => __('Insert/edit image (Alt + Shift + M)'), 'onclick' => "jQuery('#add_image').click();", 'both' => true ),
     1808        'image' => array( 'title' => __('Insert/edit image (Alt + Shift + M)'), 'onclick' => "jQuery('#add_{$media_link_type}').click();", 'both' => true ),
    18051809        '2' => 'separator',
    18061810        'link' => array( 'title' => __('Insert/edit link (Alt + Shift + A)'), 'onclick' => 'fullscreen.link();', 'both' => true ),
Note: See TracChangeset for help on using the changeset viewer.