1149 posts
  • Affiliate Level 1
  • Author Level 3
  • Beta Tester
  • Collector Level 2
+3 more
fillerspace
says

I was working on a plugin and it stopped working after I upgraded. It looks like Farbtastic has been replaced as the default color picker:

http://core.trac.wordpress.org/changeset/22030

How do you guys handle situations like this, where WP included scripts get removed? It looks like I’ll have to handle cases where users have the old version of WP with Farbtastic, and the new version without it. Seems silly that they didn’t keep the old script for backwards compatibility.

1149 posts
  • Affiliate Level 1
  • Author Level 3
  • Beta Tester
  • Collector Level 2
+3 more
fillerspace
says

In case anyone is interested, there is a function wp_script_is that detects if a script is registered, queued, or printed, so you can conditionally register it if it doesn’t exist already.

122 posts
  • 6 Years of Membership
  • Affiliate Level 2
  • Author Level 3
  • Collector Level 3
+2 more
jayjdk
says

Farbtastic just got replaced in Trunk, not 3.4.2. The commit is 22 hours old and 3.4.2 is some weeks old.

1149 posts
  • Affiliate Level 1
  • Author Level 3
  • Beta Tester
  • Collector Level 2
+3 more
fillerspace
says

I just downloaded a fresh copy of 3.4.2 and there is no Farbtastic. Am I doing something wrong?

122 posts
  • 6 Years of Membership
  • Affiliate Level 2
  • Author Level 3
  • Collector Level 3
+2 more
jayjdk
says

It should be in wp-admin/js/farbtastic.js

1149 posts
  • Affiliate Level 1
  • Author Level 3
  • Beta Tester
  • Collector Level 2
+3 more
fillerspace
says

I see, so the js is still there, it’s just not registered anymore.

by
by
by
by
by
by