Make WordPress Core

Changeset 26942


Ignore:
Timestamp:
01/14/2014 05:51:41 AM (11 years ago)
Author:
azaozz
Message:

TinyMCE: add/remove the 'alignnone' class when aligning images without captions. See #24067.

Location:
trunk/src/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/tinymce/plugins/wpeditimage/plugin.js

    r26934 r26942  
    365365            }
    366366        } else if ( cmd === 'JustifyLeft' || cmd === 'JustifyRight' || cmd === 'JustifyCenter' ) {
    367             // When inside an image caption, set the align* class on dt.wp-caption
    368367            node = editor.selection.getNode();
    369368            align = cmd.substr(7).toLowerCase();
     
    377376
    378377            if ( DL ) {
     378                // When inside an image caption, set the align* class on dl.wp-caption
    379379                if ( dom.hasClass( DL, align ) ) {
    380380                    dom.removeClass( DL, align );
     
    387387                return false;
    388388            }
     389
     390            if ( node.nodeName === 'IMG' ) {
     391                if ( dom.hasClass( node, align ) ) {
     392                    // The align class is being removed
     393                    dom.addClass( node, 'alignnone' );
     394                } else {
     395                    dom.removeClass( node, 'alignnone' );
     396                }
     397            }
    389398        }
    390399    });
  • trunk/src/wp-includes/version.php

    r26930 r26942  
    1919 * @global string $tinymce_version
    2020 */
    21 $tinymce_version = '4012-20140109';
     21$tinymce_version = '4012-20140113';
    2222
    2323/**
Note: See TracChangeset for help on using the changeset viewer.