Skip to content
This repository
Browse code

Merged in Andrew Ozz's last updates from bitbucket; sync'ed the wp ti…

…nymce plugin and ice script
  • Loading branch information...
commit b95afb00d42cf6bb138dbacec1d07ef333984164 1 parent 7bf09b6
Matthew DeLambo delambo authored
143 wp-plugin/ice/editor_plugin.js
@@ -14,7 +14,10 @@
14 14 insertTag: 'span',
15 15 deleteClass: 'del',
16 16 insertClass: 'ins',
17   - attrPrefix: 'data-',
  17 + changeIdAttribute: 'data-cid',
  18 + userIdAttribute: 'data-userid',
  19 + userNameAttribute: 'data-username',
  20 + timeAttribute: 'data-time',
18 21 preserveOnPaste: 'p',
19 22 user: { name: 'Unknown User', id: Math.random() },
20 23 isTracking: true,
@@ -32,6 +35,24 @@
32 35 init: function(ed, url) {
33 36 var self = this, changeEditor = {};
34 37
  38 + /*
  39 + To add MCE custom event handlers:
  40 + ed.iceAfterLoad.add( function(){ //callback }, (optional scope) );
  41 +
  42 + Can also use:
  43 + ed.afterInit.addToTop() to add with higher event priority
  44 + ed.afterInit.remove(func_ref) to remove observer function (named functions only)
  45 + */
  46 +
  47 + ed.iceAfterInit = new tinymce.util.Dispatcher(self);
  48 + ed.iceAfterClean = new tinymce.util.Dispatcher(self);
  49 + // ed.iceAfterPasteClean = new tinymce.util.Dispatcher(self); // no way to convert to event?
  50 +
  51 + ed.iceAccept = new tinymce.util.Dispatcher(self);
  52 + ed.iceReject = new tinymce.util.Dispatcher(self);
  53 + ed.iceAcceptAll = new tinymce.util.Dispatcher(self);
  54 + ed.iceRejectAll = new tinymce.util.Dispatcher(self);
  55 +
35 56 /**
36 57 * After the editor renders, initialize ice.
37 58 */
@@ -43,8 +64,8 @@
43 64 self.deleteSelector = '.' + self.deleteClass;
44 65
45 66 // Add insert and delete tag/attribute rules.
46   - // Important: keep `id` and `style` in attributes list in case `insertTag` is a `span` - tinymce uses temporary spans with ids
47   - // and spans with inline styles to set font color.
  67 + // Important: keep `id` and `style` in attributes list in case `insertTag` is a `span` - tinymce uses spans
  68 + // with ids and inline styles.
48 69 ed.serializer.addRules(self.insertTag + '[id|class|style|title|username|userid|cid]');
49 70
50 71 if ( self.insertTag != self.deleteTag )
@@ -53,7 +74,7 @@
53 74 ed.serializer.addRules('tempdel[data-allocation]');
54 75
55 76 dom.loadCSS(self.css.indexOf('://') > 0 ? self.css : (url + '/' + self.css));
56   -
  77 +
57 78 if ( !self.manualInit )
58 79 ed.execCommand('initializeice');
59 80
@@ -75,7 +96,10 @@
75 96 element: ed.getBody(),
76 97 isTracking: self.isTracking,
77 98 contentEditable: self.contentEditable,
78   - attrNamePrefix: self.attrPrefix,
  99 + changeIdAttribute: self.changeIdAttribute,
  100 + userIdAttribute: self.userIdAttribute,
  101 + userNameAttribute: self.userNameAttribute,
  102 + timeAttribute: self.timeAttribute,
79 103 currentUser: {
80 104 id: self.user.id,
81 105 name: self.user.name
@@ -89,6 +113,7 @@
89 113 settings: {
90 114 pasteType: 'formattedClean',
91 115 preserve: self.preserveOnPaste,
  116 + beforePasteClean: self.beforePasteClean,
92 117 afterPasteClean: self.afterPasteClean
93 118 }
94 119 }
@@ -97,12 +122,15 @@
97 122 insertType: {tag: self.insertTag, alias: self.insertClass},
98 123 deleteType: {tag: self.deleteTag, alias: self.deleteClass}
99 124 }
100   - }, function() {
101   - ed.onEvent.add(function(ed, e) {
102   - return changeEditor.handleEvent(e);
103   - });
104   - setTimeout(function() { self.afterInit.call(self); }, 10);
  125 + }).startTracking();
  126 + ed.onEvent.add(function(ed, e) {
  127 + return changeEditor.handleEvent(e);
105 128 });
  129 + setTimeout(function() {
  130 + self.afterInit.call(self);
  131 + // MCE custom event
  132 + ed.iceAfterInit.dispatch(self);
  133 + }, 1);
106 134 }, 5);
107 135 });
108 136
@@ -124,6 +152,7 @@
124 152 */
125 153 ed.addCommand('icecleanbody', function(el) {
126 154 var body = changeEditor.getCleanContent(el || ed.getContent(), self.afterClean);
  155 + ed.iceAfterClean.dispatch({body: body, scope: self});
127 156 return body;
128 157 });
129 158
@@ -191,9 +220,22 @@
191 220 * insert tag and keeps the contents in place.
192 221 */
193 222 ed.addCommand('iceaccept', function(node) {
  223 + var n = node || ed.selection.getNode(), parents = [];
194 224 ed.undoManager.add();
195   - changeEditor.acceptChange(node || ed.selection.getNode());
196   - cleanup();
  225 +
  226 + //changeEditor.acceptChange(node);
  227 +
  228 + ed.iceAccept.dispatch({node: n, scope: self});
  229 +
  230 + if ( isInsert(n) ) {
  231 + ed.dom.remove(n, true);
  232 + } else if ( isDelete(n) ) {
  233 + parents.push( n.parentNode );
  234 + ed.dom.remove(n);
  235 + }
  236 +
  237 + cleanup(parents);
  238 + ed.execCommand('ice_initenv'); // temp until the event is used?
197 239 });
198 240
199 241 /**
@@ -202,9 +244,21 @@
202 244 * in the case of an insert, removes the node.
203 245 */
204 246 ed.addCommand('icereject', function(node) {
  247 + var n = node || ed.selection.getNode(), parents = [];
205 248 ed.undoManager.add();
206   - changeEditor.rejectChange(node || ed.selection.getNode());
207   - cleanup();
  249 +
  250 + //changeEditor.rejectChange(node);
  251 + ed.iceReject.dispatch({node: n, scope: self});
  252 +
  253 + if ( isInsert(n) ) {
  254 + parents.push( n.parentNode );
  255 + ed.dom.remove(n);
  256 + } else if ( isDelete(n) ) {
  257 + ed.dom.remove(n, true);
  258 + }
  259 +
  260 + cleanup(parents);
  261 + ed.execCommand('ice_initenv'); // temp until the event is used?
208 262 });
209 263
210 264 /**
@@ -212,9 +266,21 @@
212 266 * tags keeping the inner content in place. Defers to cleaning technique.
213 267 */
214 268 ed.addCommand('iceacceptall', function() {
  269 + var inserts = ed.dom.select(self.insertSelector), deletes = ed.dom.select(self.deleteSelector), parents = [];
  270 +
215 271 ed.undoManager.add();
216   - changeEditor.acceptAll();
217   - cleanup();
  272 + //changeEditor.acceptAll();
  273 +
  274 + tinymce.each(deletes, function(el){
  275 + parents.push( el.parentNode );
  276 + });
  277 +
  278 + ed.iceAcceptAll.dispatch(self);
  279 + ed.dom.remove(deletes);
  280 + ed.dom.remove(inserts, true);
  281 +
  282 + cleanup(parents);
  283 + ed.execCommand('ice_initenv'); // temp until the event is used?
218 284 });
219 285
220 286 /**
@@ -222,9 +288,21 @@
222 288 * keeping the inner content in place.
223 289 */
224 290 ed.addCommand('icerejectall', function() {
  291 + var inserts = ed.dom.select(self.insertSelector), deletes = ed.dom.select(self.deleteSelector), parents = [];
  292 +
225 293 ed.undoManager.add();
226   - changeEditor.rejectAll();
227   - cleanup();
  294 + //changeEditor.rejectAll();
  295 +
  296 + tinymce.each(inserts, function(el){
  297 + parents.push( el.parentNode );
  298 + });
  299 +
  300 + ed.iceRejectAll.dispatch(self);
  301 + ed.dom.remove(deletes, true);
  302 + ed.dom.remove(inserts);
  303 +
  304 + cleanup(parents);
  305 + ed.execCommand('ice_initenv'); // temp until the event is used?
228 306 });
229 307
230 308 /**
@@ -371,11 +449,11 @@
371 449 if (isInsideChangeTag(n)) {
372 450 cm.setDisabled('iceaccept', false);
373 451 cm.setDisabled('icereject', false);
  452 + cleanup();
374 453 } else {
375 454 cm.setDisabled('iceaccept', true);
376 455 cm.setDisabled('icereject', true);
377 456 }
378   - cleanup();
379 457 });
380 458
381 459 /**
@@ -386,9 +464,32 @@
386 464 return !!ed.dom.getParent(n, self.insertSelector + ',' + self.deleteSelector);
387 465 }
388 466
389   - function cleanup() {
  467 + function isInsert(n) {
  468 + return ed.dom.is(n, self.insertSelector);
  469 + }
  470 +
  471 + function isDelete(n) {
  472 + return ed.dom.is(n, self.deleteSelector);
  473 + }
  474 +
  475 + function cleanup(parents) {
390 476 var empty = ed.dom.select(self.insertSelector + ':empty,' + self.deleteSelector + ':empty');
391   - ed.dom.remove(empty);
  477 + parents = parents || [];
  478 +
  479 + if ( empty && empty[0] ) {
  480 + tinymce.each(empty, function(el){
  481 + parents.push( el.parentNode );
  482 + });
  483 + ed.dom.remove(empty);
  484 + }
  485 +
  486 + if ( parents && parents[0] ) {
  487 + tinymce.each(parents, function(el){
  488 + if ( ed.dom.is(el, 'p:empty, li:empty, span:empty, div:empty') )
  489 + ed.dom.remove(el);
  490 + });
  491 + }
  492 +
392 493 // Browsers insert breaks into empty paragraphs as a space holder - clean that up
393 494 // Not playing nice with Webkit...
394 495 /*tinymce.each(ed.dom.select('br'), function(br, i) {
143 wp-plugin/ice/editor_plugin_src.js
@@ -14,7 +14,10 @@
14 14 insertTag: 'span',
15 15 deleteClass: 'del',
16 16 insertClass: 'ins',
17   - attrPrefix: 'data-',
  17 + changeIdAttribute: 'data-cid',
  18 + userIdAttribute: 'data-userid',
  19 + userNameAttribute: 'data-username',
  20 + timeAttribute: 'data-time',
18 21 preserveOnPaste: 'p',
19 22 user: { name: 'Unknown User', id: Math.random() },
20 23 isTracking: true,
@@ -32,6 +35,24 @@
32 35 init: function(ed, url) {
33 36 var self = this, changeEditor = {};
34 37
  38 + /*
  39 + To add MCE custom event handlers:
  40 + ed.iceAfterLoad.add( function(){ //callback }, (optional scope) );
  41 +
  42 + Can also use:
  43 + ed.afterInit.addToTop() to add with higher event priority
  44 + ed.afterInit.remove(func_ref) to remove observer function (named functions only)
  45 + */
  46 +
  47 + ed.iceAfterInit = new tinymce.util.Dispatcher(self);
  48 + ed.iceAfterClean = new tinymce.util.Dispatcher(self);
  49 + // ed.iceAfterPasteClean = new tinymce.util.Dispatcher(self); // no way to convert to event?
  50 +
  51 + ed.iceAccept = new tinymce.util.Dispatcher(self);
  52 + ed.iceReject = new tinymce.util.Dispatcher(self);
  53 + ed.iceAcceptAll = new tinymce.util.Dispatcher(self);
  54 + ed.iceRejectAll = new tinymce.util.Dispatcher(self);
  55 +
35 56 /**
36 57 * After the editor renders, initialize ice.
37 58 */
@@ -43,8 +64,8 @@
43 64 self.deleteSelector = '.' + self.deleteClass;
44 65
45 66 // Add insert and delete tag/attribute rules.
46   - // Important: keep `id` and `style` in attributes list in case `insertTag` is a `span` - tinymce uses temporary spans with ids
47   - // and spans with inline styles to set font color.
  67 + // Important: keep `id` and `style` in attributes list in case `insertTag` is a `span` - tinymce uses spans
  68 + // with ids and inline styles.
48 69 ed.serializer.addRules(self.insertTag + '[id|class|style|title|username|userid|cid]');
49 70
50 71 if ( self.insertTag != self.deleteTag )
@@ -53,7 +74,7 @@
53 74 ed.serializer.addRules('tempdel[data-allocation]');
54 75
55 76 dom.loadCSS(self.css.indexOf('://') > 0 ? self.css : (url + '/' + self.css));
56   -
  77 +
57 78 if ( !self.manualInit )
58 79 ed.execCommand('initializeice');
59 80
@@ -75,7 +96,10 @@
75 96 element: ed.getBody(),
76 97 isTracking: self.isTracking,
77 98 contentEditable: self.contentEditable,
78   - attrNamePrefix: self.attrPrefix,
  99 + changeIdAttribute: self.changeIdAttribute,
  100 + userIdAttribute: self.userIdAttribute,
  101 + userNameAttribute: self.userNameAttribute,
  102 + timeAttribute: self.timeAttribute,
79 103 currentUser: {
80 104 id: self.user.id,
81 105 name: self.user.name
@@ -89,6 +113,7 @@
89 113 settings: {
90 114 pasteType: 'formattedClean',
91 115 preserve: self.preserveOnPaste,
  116 + beforePasteClean: self.beforePasteClean,
92 117 afterPasteClean: self.afterPasteClean
93 118 }
94 119 }
@@ -97,12 +122,15 @@
97 122 insertType: {tag: self.insertTag, alias: self.insertClass},
98 123 deleteType: {tag: self.deleteTag, alias: self.deleteClass}
99 124 }
100   - }, function() {
101   - ed.onEvent.add(function(ed, e) {
102   - return changeEditor.handleEvent(e);
103   - });
104   - setTimeout(function() { self.afterInit.call(self); }, 10);
  125 + }).startTracking();
  126 + ed.onEvent.add(function(ed, e) {
  127 + return changeEditor.handleEvent(e);
105 128 });
  129 + setTimeout(function() {
  130 + self.afterInit.call(self);
  131 + // MCE custom event
  132 + ed.iceAfterInit.dispatch(self);
  133 + }, 1);
106 134 }, 5);
107 135 });
108 136
@@ -124,6 +152,7 @@
124 152 */
125 153 ed.addCommand('icecleanbody', function(el) {
126 154 var body = changeEditor.getCleanContent(el || ed.getContent(), self.afterClean);
  155 + ed.iceAfterClean.dispatch({body: body, scope: self});
127 156 return body;
128 157 });
129 158
@@ -191,9 +220,22 @@
191 220 * insert tag and keeps the contents in place.
192 221 */
193 222 ed.addCommand('iceaccept', function(node) {
  223 + var n = node || ed.selection.getNode(), parents = [];
194 224 ed.undoManager.add();
195   - changeEditor.acceptChange(node || ed.selection.getNode());
196   - cleanup();
  225 +
  226 + //changeEditor.acceptChange(node);
  227 +
  228 + ed.iceAccept.dispatch({node: n, scope: self});
  229 +
  230 + if ( isInsert(n) ) {
  231 + ed.dom.remove(n, true);
  232 + } else if ( isDelete(n) ) {
  233 + parents.push( n.parentNode );
  234 + ed.dom.remove(n);
  235 + }
  236 +
  237 + cleanup(parents);
  238 + ed.execCommand('ice_initenv'); // temp until the event is used?
197 239 });
198 240
199 241 /**
@@ -202,9 +244,21 @@
202 244 * in the case of an insert, removes the node.
203 245 */
204 246 ed.addCommand('icereject', function(node) {
  247 + var n = node || ed.selection.getNode(), parents = [];
205 248 ed.undoManager.add();
206   - changeEditor.rejectChange(node || ed.selection.getNode());
207   - cleanup();
  249 +
  250 + //changeEditor.rejectChange(node);
  251 + ed.iceReject.dispatch({node: n, scope: self});
  252 +
  253 + if ( isInsert(n) ) {
  254 + parents.push( n.parentNode );
  255 + ed.dom.remove(n);
  256 + } else if ( isDelete(n) ) {
  257 + ed.dom.remove(n, true);
  258 + }
  259 +
  260 + cleanup(parents);
  261 + ed.execCommand('ice_initenv'); // temp until the event is used?
208 262 });
209 263
210 264 /**
@@ -212,9 +266,21 @@
212 266 * tags keeping the inner content in place. Defers to cleaning technique.
213 267 */
214 268 ed.addCommand('iceacceptall', function() {
  269 + var inserts = ed.dom.select(self.insertSelector), deletes = ed.dom.select(self.deleteSelector), parents = [];
  270 +
215 271 ed.undoManager.add();
216   - changeEditor.acceptAll();
217   - cleanup();
  272 + //changeEditor.acceptAll();
  273 +
  274 + tinymce.each(deletes, function(el){
  275 + parents.push( el.parentNode );
  276 + });
  277 +
  278 + ed.iceAcceptAll.dispatch(self);
  279 + ed.dom.remove(deletes);
  280 + ed.dom.remove(inserts, true);
  281 +
  282 + cleanup(parents);
  283 + ed.execCommand('ice_initenv'); // temp until the event is used?
218 284 });
219 285
220 286 /**
@@ -222,9 +288,21 @@
222 288 * keeping the inner content in place.
223 289 */
224 290 ed.addCommand('icerejectall', function() {
  291 + var inserts = ed.dom.select(self.insertSelector), deletes = ed.dom.select(self.deleteSelector), parents = [];
  292 +
225 293 ed.undoManager.add();
226   - changeEditor.rejectAll();
227   - cleanup();
  294 + //changeEditor.rejectAll();
  295 +
  296 + tinymce.each(inserts, function(el){
  297 + parents.push( el.parentNode );
  298 + });
  299 +
  300 + ed.iceRejectAll.dispatch(self);
  301 + ed.dom.remove(deletes, true);
  302 + ed.dom.remove(inserts);
  303 +
  304 + cleanup(parents);
  305 + ed.execCommand('ice_initenv'); // temp until the event is used?
228 306 });
229 307
230 308 /**
@@ -371,11 +449,11 @@
371 449 if (isInsideChangeTag(n)) {
372 450 cm.setDisabled('iceaccept', false);
373 451 cm.setDisabled('icereject', false);
  452 + cleanup();
374 453 } else {
375 454 cm.setDisabled('iceaccept', true);
376 455 cm.setDisabled('icereject', true);
377 456 }
378   - cleanup();
379 457 });
380 458
381 459 /**
@@ -386,9 +464,32 @@
386 464 return !!ed.dom.getParent(n, self.insertSelector + ',' + self.deleteSelector);
387 465 }
388 466
389   - function cleanup() {
  467 + function isInsert(n) {
  468 + return ed.dom.is(n, self.insertSelector);
  469 + }
  470 +
  471 + function isDelete(n) {
  472 + return ed.dom.is(n, self.deleteSelector);
  473 + }
  474 +
  475 + function cleanup(parents) {
390 476 var empty = ed.dom.select(self.insertSelector + ':empty,' + self.deleteSelector + ':empty');
391   - ed.dom.remove(empty);
  477 + parents = parents || [];
  478 +
  479 + if ( empty && empty[0] ) {
  480 + tinymce.each(empty, function(el){
  481 + parents.push( el.parentNode );
  482 + });
  483 + ed.dom.remove(empty);
  484 + }
  485 +
  486 + if ( parents && parents[0] ) {
  487 + tinymce.each(parents, function(el){
  488 + if ( ed.dom.is(el, 'p:empty, li:empty, span:empty, div:empty') )
  489 + ed.dom.remove(el);
  490 + });
  491 + }
  492 +
392 493 // Browsers insert breaks into empty paragraphs as a space holder - clean that up
393 494 // Not playing nice with Webkit...
394 495 /*tinymce.each(ed.dom.select('br'), function(br, i) {
452 wp-plugin/ice/ice/ice.min.js
224 additions, 228 deletions not shown
8 wp-plugin/icerevisions/editor_plugin.js
@@ -18,9 +18,12 @@
18 18 function() {
19 19 var DOM = tinymce.DOM, content;
20 20
21   - if ( ed.id != 'content' || !ice.isTracking || ed.isHidden() )
  21 + if ( ed.id != 'content' || !ice.isTracking )
22 22 return;
23 23
  24 + if ( ed.isHidden() )
  25 + ed.load();
  26 +
24 27 content = ed.getContent();
25 28 if ( ed.getParam('wpautop', true) && typeof(switchEditors) != 'undefined' )
26 29 content = switchEditors.pre_wpautop( content );
@@ -59,6 +62,9 @@
59 62 if ( ed.id != 'content' && ed.id != 'wp_mce_fullscreen' ) // only on the main editor
60 63 return;
61 64
  65 + if ( ed.isHidden() )
  66 + return;
  67 +
62 68 if ( o.initial )
63 69 setTimeout( function(){
64 70 ed.execCommand('initializeice');
2  wp-plugin/js/mce-revisions.js
@@ -8,7 +8,7 @@ jQuery(document).ready(function($){
8 8 if ( typeof(tinymce) == 'undefined' ) {
9 9 e.preventDefault();
10 10 alert('Please remove all revision tracking spans before ' + action);
11   - } else if ( !tinymce.get('content') || tinymce.get('content').isHidden() ) {
  11 + } else if ( !tinymce.get('content') ) {
12 12 e.preventDefault();
13 13 alert('Please switch to Visual mode before ' + action);
14 14 } else {
57 wp-plugin/mce-revisions.php
... ... @@ -1,17 +1,21 @@
1 1 <?php
2 2 /*
3 3 Plugin Name: Ice Visual Revisions
4   -Plugin URI: [URL to a webpage about the WP plugin, optional]
5   -Description: [few sentences explaining the functionality]
  4 +Description: Adds revision tracking to the visual editor. Once a new post is saved as draft, added or deleted text is stored with the user name and time of the change.
6 5 Version: 1.0
7   -Author: Andrew Ozz
8   -Author URI: (optional)
  6 +Author: Automattic, Andrew Ozz
9 7
10   -Copyright Andrew Ozz
  8 +Copyright (c) Automattic, Andrew Ozz
  9 +
  10 +Includes the Ice plugin for TinyMCE released under the GPL version 2 by: The New York Times, CMS Group, Matthew DeLambo
11 11
12 12 Released under the GPL v.2
13 13
14   - This program is distributed in the hope that it will be useful,
  14 + This program is free software; you can redistribute it and/or modify
  15 + it under the terms of the GNU General Public License, version 2, as
  16 + published by the Free Software Foundation.
  17 +
  18 + This program is distributed in the hope that it will be useful,
15 19 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 21 GNU General Public License for more details.
@@ -34,14 +38,19 @@ function vrev_load_plugins($plugins) {
34 38 function vrev_add_mce_buttons($buttons) {
35 39 return array_merge( $buttons, array(
36 40 '|',
37   - 'iceaccept',
38   - 'icereject',
39 41 'iceacceptall',
40 42 'icerejectall',
41 43 '|',
42   - 'ice_toggleshowchanges',
43   - // 'ice_togglechanges',
44   - // 'ice_smartquotes'
  44 + 'ice_toggleshowchanges'
  45 + ));
  46 +}
  47 +
  48 +add_filter('mce_buttons_2', 'vrev_add_mce_buttons_2');
  49 +function vrev_add_mce_buttons_2($buttons) {
  50 + return array_merge( $buttons, array(
  51 + '|',
  52 + 'iceaccept',
  53 + 'icereject'
45 54 ));
46 55 }
47 56
@@ -54,22 +63,22 @@ function vrev_mce_settings($settings) {
54 63
55 64 /*
56 65 Any of the following can be set by using the 'mce_ice_settings' filter.
57   - Note that the array is json encoded before adding it to the MCE settings.
58   - deleteTag: 'span',
59   - insertTag: 'span',
60   - deleteClass: 'del',
61   - insertClass: 'ins',
62   - attrPrefix: 'data-',
63   - preserveOnPaste: 'p',
64   - isTracking: true,
65   - contentEditable: true,
66   - css: 'css/ice.css',
67   - manualInit: false,
68   - user: { name: 'Some Name', id: Math.random() },
  66 + Note that the array is json encoded before adding it to the MCE settings (default values shown).
  67 + 'deleteTag' => 'span',
  68 + 'insertTag' => 'span',
  69 + 'deleteClass' => 'del',
  70 + 'insertClass' => 'ins',
  71 + 'attrPrefix' => 'data-',
  72 + 'preserveOnPaste' => 'p',
  73 + 'isTracking' => true,
  74 + 'contentEditable' => true,
  75 + 'css' => 'css/ice.css',
  76 + 'manualInit' => false,
  77 + 'user' => array{ 'name' => 'Some Name', 'id' => rand() },
69 78 */
70 79 $ice_settings = array(
71 80 'user' => array(
72   - 'name' => esc_html( $current_user->display_name ),
  81 + 'name' => esc_attr( $current_user->display_name ),
73 82 'id' => $current_user->ID
74 83 ),
75 84 'manualInit' => true,

0 comments on commit b95afb0

Please sign in to comment.
Something went wrong with that request. Please try again.