Version Description
Updated for WordPress 3.8, fixed auto-embedding of single line URLs when not removing paragraph tags.
Download this release
Release Info
Developer | azaozz |
Plugin | TinyMCE Advanced |
Version | 3.5.9.1 |
Comparing to | |
See all releases |
Code changes from version 3.5.9 to 3.5.9.1
- css/tadv-styles.css +15 -6
- mce/xhtmlxtras/css/popup.css +1 -1
- readme.txt +5 -2
- tinymce-advanced.php +62 -20
css/tadv-styles.css
CHANGED
@@ -56,6 +56,20 @@ body {
|
|
56 |
background: url(../images/wp_page.gif) no-repeat 0 0;
|
57 |
}
|
58 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
/* Theme */
|
60 |
#bold {background-position:0 0}
|
61 |
#italic {background-position:-60px 0}
|
@@ -220,12 +234,7 @@ form#tadvadmin {
|
|
220 |
margin: 0;
|
221 |
padding: 2px 4px;
|
222 |
border: 1px solid #ccc;
|
223 |
-
background: #
|
224 |
-
background-image: -webkit-gradient(linear, left bottom, left top, from(#e5e5e5), to(#f4f4f4));
|
225 |
-
background-image: -webkit-linear-gradient(bottom, #e5e5e5, #f4f4f4);
|
226 |
-
background-image: -moz-linear-gradient(bottom, #e5e5e5, #f4f4f4);
|
227 |
-
background-image: -o-linear-gradient(bottom, #e5e5e5, #f4f4f4);
|
228 |
-
background-image: linear-gradient(to top, #e5e5e5, #f4f4f4);
|
229 |
}
|
230 |
|
231 |
#tadvadmin .tadvmodule {
|
56 |
background: url(../images/wp_page.gif) no-repeat 0 0;
|
57 |
}
|
58 |
|
59 |
+
#fontsizeselect,
|
60 |
+
#fontselect,
|
61 |
+
#formatselect,
|
62 |
+
#styleselect {
|
63 |
+
border: 1px solid #ccc;
|
64 |
+
}
|
65 |
+
|
66 |
+
#tadvpalettediv #fontsizeselect,
|
67 |
+
#tadvpalettediv #fontselect,
|
68 |
+
#tadvpalettediv #formatselect,
|
69 |
+
#tadvpalettediv #styleselect {
|
70 |
+
border: 0;
|
71 |
+
}
|
72 |
+
|
73 |
/* Theme */
|
74 |
#bold {background-position:0 0}
|
75 |
#italic {background-position:-60px 0}
|
234 |
margin: 0;
|
235 |
padding: 2px 4px;
|
236 |
border: 1px solid #ccc;
|
237 |
+
background: #e5e5e5;
|
|
|
|
|
|
|
|
|
|
|
238 |
}
|
239 |
|
240 |
#tadvadmin .tadvmodule {
|
mce/xhtmlxtras/css/popup.css
CHANGED
@@ -5,5 +5,5 @@ img.picker {vertical-align:text-bottom; cursor:pointer;}
|
|
5 |
h1 {padding: 0 0 5px 0;}
|
6 |
.panel_wrapper div.current {min-height:160px;height:auto;}
|
7 |
#xhtmlxtrasdel .panel_wrapper div.current, #xhtmlxtrasins .panel_wrapper div.current {height: 230px;}
|
8 |
-
a.browse span {display:block; width:20px; height:20px; background:url('../../../
|
9 |
#datetime {width:180px;}
|
5 |
h1 {padding: 0 0 5px 0;}
|
6 |
.panel_wrapper div.current {min-height:160px;height:auto;}
|
7 |
#xhtmlxtrasdel .panel_wrapper div.current, #xhtmlxtrasins .panel_wrapper div.current {height: 230px;}
|
8 |
+
a.browse span {display:block; width:20px; height:20px; background:url('../../../images/icons.gif') -140px -20px;}
|
9 |
#datetime {width:180px;}
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: azaozz
|
|
3 |
Tags: wysiwyg, formatting, tinymce, write, editor
|
4 |
License: GPL v2
|
5 |
Requires at least: 3.7
|
6 |
-
Tested up to: 3.
|
7 |
-
Stable tag: 3.5.
|
8 |
|
9 |
Enables the advanced features of TinyMCE, the WordPress WYSIWYG editor.
|
10 |
|
@@ -37,6 +37,9 @@ Best is to install directly from WordPress. If manual installation is required,
|
|
37 |
|
38 |
== Changelog ==
|
39 |
|
|
|
|
|
|
|
40 |
= 3.5.9 =
|
41 |
Updated for WordPress 3.7 and TinyMCE 3.5.9.
|
42 |
|
3 |
Tags: wysiwyg, formatting, tinymce, write, editor
|
4 |
License: GPL v2
|
5 |
Requires at least: 3.7
|
6 |
+
Tested up to: 3.8
|
7 |
+
Stable tag: 3.5.9
|
8 |
|
9 |
Enables the advanced features of TinyMCE, the WordPress WYSIWYG editor.
|
10 |
|
37 |
|
38 |
== Changelog ==
|
39 |
|
40 |
+
= 3.5.9.1 =
|
41 |
+
Updated for WordPress 3.8, fixed auto-embedding of single line URLs when not removing paragraph tags.
|
42 |
+
|
43 |
= 3.5.9 =
|
44 |
Updated for WordPress 3.7 and TinyMCE 3.5.9.
|
45 |
|
tinymce-advanced.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: TinyMCE Advanced
|
4 |
Plugin URI: http://www.laptoptips.ca/projects/tinymce-advanced/
|
5 |
Description: Enables advanced features and plugins in TinyMCE, the visual editor in WordPress.
|
6 |
-
Version: 3.5.9
|
7 |
Author: Andrew Ozz
|
8 |
Author URI: http://www.laptoptips.ca/
|
9 |
|
@@ -196,7 +196,8 @@ if ( ! function_exists('tadv_htmledit') ) {
|
|
196 |
if ( isset($tadv_options['no_autop']) && $tadv_options['no_autop'] == 1 ) {
|
197 |
$c = str_replace( array('&', '<', '>'), array('&', '<', '>'), $c );
|
198 |
$c = wpautop($c);
|
199 |
-
$c =
|
|
|
200 |
}
|
201 |
return $c;
|
202 |
}
|
@@ -207,25 +208,66 @@ if ( ! function_exists('tadv_htmledit') ) {
|
|
207 |
if ( ! function_exists('tmce_replace') ) {
|
208 |
function tmce_replace() {
|
209 |
$tadv_options = get_option('tadv_options', array());
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
228 |
}
|
|
|
|
|
229 |
}
|
230 |
add_action( 'after_wp_tiny_mce', 'tmce_replace' );
|
231 |
}
|
3 |
Plugin Name: TinyMCE Advanced
|
4 |
Plugin URI: http://www.laptoptips.ca/projects/tinymce-advanced/
|
5 |
Description: Enables advanced features and plugins in TinyMCE, the visual editor in WordPress.
|
6 |
+
Version: 3.5.9.1
|
7 |
Author: Andrew Ozz
|
8 |
Author URI: http://www.laptoptips.ca/
|
9 |
|
196 |
if ( isset($tadv_options['no_autop']) && $tadv_options['no_autop'] == 1 ) {
|
197 |
$c = str_replace( array('&', '<', '>'), array('&', '<', '>'), $c );
|
198 |
$c = wpautop($c);
|
199 |
+
$c = preg_replace( '/^<p>(https?:\/\/[^<> "]+?)<\/p>$/im', '$1', $c );
|
200 |
+
$c = htmlspecialchars( $c, ENT_NOQUOTES, get_option( 'blog_charset' ) );
|
201 |
}
|
202 |
return $c;
|
203 |
}
|
208 |
if ( ! function_exists('tmce_replace') ) {
|
209 |
function tmce_replace() {
|
210 |
$tadv_options = get_option('tadv_options', array());
|
211 |
+
|
212 |
+
if ( empty( $tadv_options['no_autop'] ) ) {
|
213 |
+
return;
|
214 |
+
}
|
215 |
+
|
216 |
+
?>
|
217 |
+
<script type="text/javascript">
|
218 |
+
if ( typeof(jQuery) != 'undefined' ) {
|
219 |
+
jQuery('body').on('afterPreWpautop', function( event, obj ) {
|
220 |
+
var regex = [
|
221 |
+
new RegExp('https?://(www\.)?youtube\.com/watch.*', 'i'),
|
222 |
+
new RegExp('http://youtu.be/*'),
|
223 |
+
new RegExp('http://blip.tv/*'),
|
224 |
+
new RegExp('https?://(www\.)?vimeo\.com/.*', 'i'),
|
225 |
+
new RegExp('https?://(www\.)?dailymotion\.com/.*', 'i'),
|
226 |
+
new RegExp('http://dai.ly/*'),
|
227 |
+
new RegExp('https?://(www\.)?flickr\.com/.*', 'i'),
|
228 |
+
new RegExp('http://flic.kr/*'),
|
229 |
+
new RegExp('https?://(.+\.)?smugmug\.com/.*', 'i'),
|
230 |
+
new RegExp('https?://(www\.)?hulu\.com/watch/.*', 'i'),
|
231 |
+
new RegExp('https?://(www\.)?viddler\.com/.*', 'i'),
|
232 |
+
new RegExp('http://qik.com/*'),
|
233 |
+
new RegExp('http://revision3.com/*'),
|
234 |
+
new RegExp('http://i*.photobucket.com/albums/*'),
|
235 |
+
new RegExp('http://gi*.photobucket.com/groups/*'),
|
236 |
+
new RegExp('https?://(www\.)?scribd\.com/.*', 'i'),
|
237 |
+
new RegExp('http://wordpress.tv/*'),
|
238 |
+
new RegExp('https?://(.+\.)?polldaddy\.com/.*', 'i'),
|
239 |
+
new RegExp('https?://(www\.)?funnyordie\.com/videos/.*', 'i'),
|
240 |
+
new RegExp('https?://(www\.)?twitter\.com/.+?/status(es)?/.*', 'i'),
|
241 |
+
new RegExp('https?://(www\.)?soundcloud\.com/.*', 'i'),
|
242 |
+
new RegExp('https?://(www\.)?slideshare\.net/*', 'i'),
|
243 |
+
new RegExp('http://instagr(\.am|am\.com)/p/.*', 'i'),
|
244 |
+
new RegExp('https?://(www\.)?rdio\.com/.*', 'i'),
|
245 |
+
new RegExp('https?://rd\.io/x/.*', 'i'),
|
246 |
+
new RegExp('https?://(open|play)\.spotify\.com/.*', 'i')
|
247 |
+
];
|
248 |
+
|
249 |
+
obj.data = obj.unfiltered
|
250 |
+
.replace(/<p>(https?:\/\/[^<> "]+?)<\/p>/ig, function( all, match ) {
|
251 |
+
for( var i in regex ) {
|
252 |
+
if ( regex[i].test( match ) ) {
|
253 |
+
return '\n' + match + '\n';
|
254 |
+
}
|
255 |
+
}
|
256 |
+
return all;
|
257 |
+
})
|
258 |
+
.replace(/caption\]\[caption/g, 'caption] [caption')
|
259 |
+
.replace(/<object[\s\S]+?<\/object>/g, function(a) {
|
260 |
+
return a.replace(/[\r\n]+/g, ' ');
|
261 |
+
}).replace( /<pre[^>]*>[\s\S]+?<\/pre>/g, function( match ) {
|
262 |
+
match = match.replace( /<br ?\/?>(\r\n|\n)?/g, '\n' );
|
263 |
+
return match.replace( /<\/?p( [^>]*)?>(\r\n|\n)?/g, '\n' );
|
264 |
+
});
|
265 |
+
}).on('afterWpautop', function( event, obj ){
|
266 |
+
obj.data = obj.unfiltered;
|
267 |
+
});
|
268 |
}
|
269 |
+
</script>
|
270 |
+
<?php
|
271 |
}
|
272 |
add_action( 'after_wp_tiny_mce', 'tmce_replace' );
|
273 |
}
|