I found a work-around in a German forum post. Add these lines to the top of your script:

use framework "Foundation"
use scripting additions
current application's NSThread's sleepForTimeInterval:1


Applescript Delay not working since switch to Yosemite
I am using a simple if/elseif/else bit of code to generate a header image for my page, I can't seem to understand why it isn't working properly. It determines the category of the page being displayed and displays a header accordingly. Here's the code in my header.php: 

&lt;?php if (is_category('dino run') || has_category('dino run')) { ?&gt;
    &lt;a href="dino-run/"&gt;&lt;li&gt;&lt;div class="logo splash2"&gt;Dino Run&lt;/div&gt;&lt;/li&gt;&lt;/a&gt;           
&lt;?php } elseif (is_category('potatoman') || has_category('potatoman')) { ?&gt;
    &lt;a href="http://www.pixeljam.com/potatoman/"&gt;&lt;div class="logo splash4"&gt;Potatoman Seeks the Troof&lt;/div&gt;&lt;/a&gt;
&lt;?php } elseif (is_category('glorkian' || 'glork') || has_category('glorkian' || 'glork')) { ?&gt;
    &lt;a href="glorkian"&gt;&lt;div class="logo splash3"&gt;Glorkian Warrior&lt;/div&gt;&lt;/a&gt;
&lt;?php } else { ?&gt;
        &lt;a href="#"&gt;&lt;div class="logo splash1"&gt;The Pixeljam Octology&lt;/div&gt;&lt;/a&gt;
&lt;?php } ?&gt;


The problem I'm having is I click on a post that has a category "Dino Run" and it displays fine... but when I click on a post that doesn't have any of the above 3 defined categories it doesn't fall through to the else statement, it actually displays the third header "Glorkian Warrior".

Any ideas what I did wrong here?
