1286 posts
  • Has been part of the Envato Community for over 4 years
  • Has sold $40,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 50+ items on Envato Market
+5 more
Smartik says

Use global $wp_version; instead..
Try to use globals as little as possible. Use them when you really need them. Here you have no reasons why you should one or another, use any of them, but I would choose the function.

Anyways, this snipet is not perfect and it will return true on if both are numbers(integers or floats) but what if the WP version is a alpha release or RC or whatever? Here must be used native php version_compare() because it know how version naming works.

$version = get_bloginfo('version');
if( version_compare( $version, 3.9, '<' ) ) {
   //do the magic here
}
78 posts
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $125,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 10+ items on Envato Market
+9 more
smartdatasoft says

@Smartik , @RubenBristian

thank you very much. Actually i was in hurry to update that.

global $wp_version;

is best practice. and also version_compare :)

86 posts Vibe
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $250,000+ on Envato Market
  • Sells items exclusively on Envato Market
  • Has been part of the Envato Community for over 3 years
+3 more
VibeThemes says


WP 3.9 is one of the most unstable updates by WordPress so far. It has also meant death for many plugins using TinyMCE. Popular plugins such as Ultimate TinyMCE (over 2 million downloads) have declared end of life.
WooCommerce have already said they are not going to update. refer link.
, the compat3x does not work (link), The WP codex isn’t updated refer link ..I wonder why was there such haste to release it, when it was already known that upgrading TinyMCE to 4.0 would have issues and considering the impact of this on # of websites

LOL. You’re quite the drama queen aren’t you?

First off, I know change is hard. However, v3.9 isn’t as unstable as you claim. The release date was well known in advance. There were months where you could have tested more / provided more input during the betas and RCs. If you failed to get sufficiently involved then don’t blame the WP team.

Apparently, you’re unaware of the fact that Ultimate TinyMCE has only been Eol ‘ed because it’s been replaced with this (so not really dead) ...

https://wordpress.org/plugins/wp-edit/

WooCommerce is the brand rather the company. Woothemes will continue to update WooCommerce and the built in WC ShortCode will still work (no site breakage).

However, the ShortCode generator may just be MIA for a while. I know this can be fixed because it was already fixed on another plugin. It’s a TinyMCE issue rather than a WP one anyhow. If you’d done any amount of decent testing before release, you’d probably have already fixed it by now.

So, the sky is not falling and it’s really just your own stuff need fixing. They’re only dead if you decide to abandon them in their current state.
Well, the previous response was out of frustration of not finding results on debugging the issues after almost 12 hours, we had long known that TinyMCE 4.0 will bring issues. If you simply browse around you’ll find that there are many many people facing similar issues and all the blame will be given to the Plugin/theme authors and developers. Worst part is that TinyMCE 4.0 is not backwards compatible, several functions have simply been renamed/changed without a fallback.
397 posts
  • Has been part of the Envato Community for over 5 years
  • Has collected 100+ items on Envato Market
  • Sells items exclusively on Envato Market
  • Located in United States
WPWiseOwl says

Well, the previous response was out of frustration of not finding results on debugging the issues after almost 12 hours, we had long known that TinyMCE 4.0 will bring issues. If you simply browse around you’ll find that there are many many people facing similar issues and all the blame will be given to the Plugin/theme authors and developers. Worst part is that TinyMCE 4.0 is not backwards compatible, several functions have simply been renamed/changed without a fallback.

I see. Venting of frustration is fine. Spreading misinformation, not so much. I felt the need to try to prevent any potential spread of misinformation here. I have no need to browse around as I’ve been directly involved in several such situations personally. However, I feel that is just the way of things. Plugin / Theme authors like us know what TinyMCE is but end users don’t typically.

Let them remain ignorant about such things, that’s one reason they pay us. That’s also why I purchase from others as I’m still ignorant of so much. There’s always someone smarter. Though if any author has procrastinated (or supposedly didn’t have the time to go) about fixing any such issues until the 3.9 RC2 / Final was out, I have little to no sympathy. That’s just bad form IMO. Good Luck! ;-)

62 posts
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
  • Has been part of the Envato Community for over 1 year
thememassive says

I see. Venting of frustration is fine. Spreading misinformation, not so much. I felt the need to try to prevent any potential spread of misinformation here. I have no need to browse around as I’ve been directly involved in several such situations personally. However, I feel that is just the way of things. Plugin / Theme authors like us know what TinyMCE is but end users don’t typically.

Let them remain ignorant about such things, that’s one reason they pay us. That’s also why I purchase from others as I’m still ignorant of so much. There’s always someone smarter. Though if any author has procrastinated (or supposedly didn’t have the time to go) about fixing any such issues until the 3.9 RC2 / Final was out, I have little to no sympathy. That’s just bad form IMO. Good Luck! ;-)
You are indeed very wise sir! Totally agree with you :)
1701 posts Building the Web.
  • Has been a beta tester for an Envato feature
  • Sells items exclusively on Envato Market
  • Has sold $250,000+ on Envato Market
  • Had an item featured on Envato Market
+8 more
ZoomIt says

Javascript version for both pre 3.9 and 3.9

Hope it’s good

if (typeof window.tinyMCE != 'undefined') {
                    if (typeof window.tinyMCE.activeEditor != 'undefined') {
                        window.tinyMCE.activeEditor.selection.moveToBookmark(window.tinymce_cursor);
                    }
                    if (typeof window.tinyMCE.execInstanceCommand != 'undefined') {
                        window.tinyMCE.execInstanceCommand('content', 'mceInsertContent', false, arg);
                    } else {

                        if (typeof window.tinyMCE.execCommand != 'undefined') {
                            window.tinyMCE.get('content').execCommand('mceInsertContent', false, arg);
                        }
                    }
                }

tested with 3.6 and 3.9 and it worked for me…

177 posts ThemeVan
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $125,000+ on Envato Market
  • Has been part of the Envato Community for over 4 years
  • Won a Most Wanted contest
+4 more
ThemeVan says

Thanks soooo much!!

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by