WordPress Mystique Unicorn Joke Not Funny

I don’t mind a cute joke every now and then, however, not when it involves what I trust to be a quality designed product!

Mystique April Fools Joke

For anyone running the Mystique WordPress theme by Digital Nature that woke up this morning and checked their website, via the backoffice admin, you probably know what I mean. Stupid little unicorns and rainbows start appearing every other click of your mouse on any links/commands in your WordPress admin area. Apparently, the programmers at Digital Nature thought this would be a funny April Fools Day joke to play on all of their theme users. Sorry, but after spending hours restoring my website, researching the cause of this hack, and then implementing a fix to remove the “hack”, I don’t see the humor.

The programmers set the code to only activate on April 1st, “April Fools Day” of each year. So you could just laugh and grin and deal with the bothersome code for the day or you can remove the code and be frustrated that a programmer would go to such lengths to annoy and anger so many of their loyal followers.

Removing the “Not So Funny” Code

So let me share with you the fix that you will need to implement to remove this erroneous code that the programmers of the Mystique theme thought would be so funny. The fix depends on the version of the Mystique theme that you have installed. Again, it looks like the programmer decided to switch up the location of the code so that everyone would be impacted and it would be more difficult to remove the code.

For Mystique Version 3.2.9.2 you will need to search for and edit the code in your atom-core.php file

For Mystique Version 3.2.9.3 you will need to search for and edit the code in your theme-functions (functions.php) file.

What you are looking for is the lines of code that look like the following (see screenshot);

Not a Funny Joke

Seach for this code

You can locate this code by either searching for the text phrase “some fun”  or by searching for the date format of “04-01”.

Once you locate this code, you then need to comment out the If statement that calls this code. You can use the standard PHP implementation to comment a statement by preceding the statement with the “//” syntax. The resulting changes to make to the file will look similar to the following (see screenshot2);

Remove Unicorn

Unicorn Joke Fix

Here is where the difficult step is… You can not edit and change this code using the WordPress Themes Editor because the code executes with every other click of your mouse. So, if you try to use the themes editor to make changes to the theme, when you click the “Update File” button to save the changes that you made, you receive an HTTP 404 error. Hence, to make the changes that I am recommending you will have to first download a copy of the file via FTP, make the changes, and then FTP the file back up to your server overwriting the original version. If you have access to a File Manager aka CPanel then you can use that tool to modify the file.

These changes will disable the annoying Mystique Theme April Fools Day Unicorn and Rainbow popup images that the designers at Digital Nature thought would be so funny. Keep in mind that each time you upgrade your version of the theme you will have to look for the location of this code and make the changes again. Or you can do what I am doing, you can look for a different theme provider and avoid the problems in the future all together.

Last updated: September 22, 2016 at 16:41 pm

Comments

  1. Did you also catch the 9999 event code in that part of the script?
    And you right about needing to edit the functions.php file in another editor – c-panel or a text editor.
    Wonder what they’ll put in next year, and where? Last year it was in core.php

  2. Deepanshu says:

    Thanx for this tutorial loved it. Actually i am just starting with WP and after a hectic search i found this theme. and wouldn’t have wanted those unicorns.

Leave a Reply