Why does the jquery below not fire? Its going to the "else" every time.
if ( is_admin() && $pagenow == 'theme-install.php' && $_GET['tab']=="upload"){
add_action('admin_print_scripts', 'theme_upgrade_alert');
function theme_upgrade_alert(){
wp_enqueue_script('jquery');
echo '
<script type="text/javascript">
if(typeof jQuery!="undefined"){
jQuery.noConflict();
//jQuery(document).ready(function(){
jQuery(".install-help").hide();
//});
}
else
{
alert("If you are attempting to upgrade the current theme, you must do it via theme options.");
}
</script>';
}
}
global $pagenow;before this block? – goldenapples Feb 9 '12 at 17:02