TinyMCE wpViews: use the real attribute value instead of the cached jQuery data. Fixes updating of the wpView text strings.

Props iseulde. Fixes #31601.
Built from https://develop.svn.wordpress.org/trunk@31731


git-svn-id: http://core.svn.wordpress.org/trunk@31712 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz 2015-03-11 22:40:28 +00:00
parent bb99536bf5
commit cb185ed5bc
3 changed files with 4 additions and 4 deletions

View File

@ -181,7 +181,7 @@ window.wp = window.wp || {};
return instances[ encodeURIComponent( object ) ];
}
return instances[ $( object ).data( 'wpview-text' ) ];
return instances[ $( object ).attr( 'data-wpview-text' ) ];
},
/**
@ -192,7 +192,7 @@ window.wp = window.wp || {};
* @return {String} The textual representation of the view.
*/
getText: function( node ) {
return decodeURIComponent( $( node ).data( 'wpview-text' ) || '' );
return decodeURIComponent( $( node ).attr( 'data-wpview-text' ) || '' );
},
/**

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.2-alpha-31730';
$wp_version = '4.2-alpha-31731';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.