Unicorns in Your WordPress Dashboard


Do you have Mystique Unicorn Pictures in WordPress Dashboard

image of unicorn avatar in mystique wordpress themeUnicorn images are showing up in WordPress Dashboards. If you are using the Mystique WordPress Theme for a self hosted WordPress blog this is not a sign of a hacked site, just an April Fools joke and it will go away on April 2. Apart from being totally annoying it is harmless and probably not worth the effort needed to edit the code and prevent the function.

The image URL shows up as coming from cornify.com – http://www.cornify.com/getacorn.php with a variable string attached at the end.

If you want to stop the unicorns from cornify.com disrupting your WordPress Dashboard, the place to look is in the functions.php file in the Mystique Theme folder. Look for this code; if you are using the current version of the theme it is on line 500 – near the bottom of the file code. (Or do a text search for ‘ some fun ‘ if you can’t find it).

// some fun : )
if(date(‘m-d’, current_time(‘timestamp’, true)) == ’04-01′) add_action(‘admin_footer’, ‘mystique_a1′);

function mystique_a1(){
  ?>
 // <![CDATA[
src
="http://www.cornify.com/js/cornify.js">
// ]]>
  <script type=”text/javascript”>
    jQuery(document).ready(function($){

      // show ponies on 1st click of a link
      $(‘a’).click(function(){
        if($(this).data(‘pwned’)) return true;
        cornify_add();
        $(this).data(‘pwned’, 1);
        return false;
      })

There are a few other functions listed under the “fun” section of the script. To remove them all delete everything from // some fun : ) to near the end of the file where it says     YOU MUST LEAVE THIS PART IN THE FILE!

 </script>
  <?php
}

Unicorns in Earlier Versions of Mystique Theme

First thing, if you’re seeing this the version of Mystique is out of date and should be up-dated.

If you haven’t updated to the latest version, or for some reason don’t want to, the function is in core.php (line 3531 but this may depend on your php editor). Look for a text line called  (function mystique_get_avatar) or the date string if (date(‘m-d’) == ’04-01′)?. If you want to fix this older theme version see How to remove the Unicorn avatar in Mystique WordPress theme

A Waste of Time but Smiling

These Unicorns in the WordPress Dashboard wasted 3 hours of my time today while I trawled the guilty website for malware, successful hacking attempts and all the usual suspects causing unexplained site behaviour. Eventually an old post in the WordPress.org support forums led me to the article mentioned above – which dealt with last years April Fools Day script in Mystique.

I decided to leave the code in place – annoyed as I was at first, after finding the cause and how to fix it, this April Mystique Fool had a good chuckle. This reminded me that we can take ourselves and our occupation too seriously, and after two solid days of some heavy Drupalling, the light humour was welcome.

Get your own back by saving the images from cornify for the kids – they’ll enjoy them – and seeing as they were placed on your site without your permission, copyright law cannot apply.

me on google plus+Mike Otgaar

About these ads

About Mike

Web Developer and Techno-geek Saltwater fishing nut Blogger

Posted on April 1, 2012, in WordPress and tagged , , , , , . Bookmark the permalink. 5 Comments.

  1. Though we all like to have fun some times but that was terrible!! Though I just came across your post but I still remember how it pissed me off on April 1st and how I had to install back up as I thought someone had successfully hacked my site but in the end it turned our to be wordpress which sent me through the roof.

    • Terrible is the word. I wonder how many users of Mystique changed their theme after that episode! And there’s another time it will pop up – when you get to 9999 visitors or maybe page views – I haven’t looked at how they are pulling that info…
      The developers really should mention something either in the theme readme file or on their website – If I remember correctly, there used to be a mention of ‘some surprise features’ before, but that was a while back.

  2. I am freakin’ PO’d too… At this very moment I am in the process of trying to restore my server from a backup because I thought my website had been hacked! I suppose I should have researched the problem BEFORE the restore but I panicked… I have Hundreds of $$$$ of ads running sending traffic to my site which is not functioning now. I don’t see any humor in this at all…

    • I did the same thing – also had my store site down for some time. Realised it was something else after restoring from known good database backups and the site files – re-installed wordpress and plugins from my local dev site…

  3. Totally pissed about this tbh, although I did suspect April 1st – I still spent the whole morning cleaning and restoring files. Five hours I should have been with the Mrs and kids. Switching themes asap.

    Only just found your post…

    Thanks for the fix.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 2,387 other followers

%d bloggers like this: