'internet-explorer', 'category' => 'desktop', ), $atts)); $numberOfAlternatives = get_option('alt2_options_numberofalternatives'); if($numberOfAlternatives == "") { $numberOfAlternatives = "6"; } $wp_alt2_theme = get_option('alt2_options_theme'); if($wp_alt2_theme == "") { $wp_alt2_theme = "default"; } if (is_single()){ return "
"; } } /* Add the references to the javascript and ensure that jQuery is there. */ function alt2_scripts() { if (is_single()){ $wp_alt2_plugin_url = trailingslashit( get_bloginfo('wpurl') ).PLUGINDIR.'/'. dirname( plugin_basename(__FILE__) ); wp_enqueue_script('jquery'); wp_enqueue_script('wp_alt2_script', $wp_alt2_plugin_url.'/alt2.js', array('jquery')); } } // Add the CSS. function alt2_header() { $wp_alt2_theme = get_option('alt2_options_theme'); $wp_alt2_plugin_url = trailingslashit( get_bloginfo('wpurl') ).PLUGINDIR.'/'. dirname( plugin_basename(__FILE__) ); if($wp_alt2_theme == "") { $wp_alt2_theme = "default"; } if($wp_alt2_theme != "minimal") { echo '' . "\n"; } } // Hook it up add_shortcode('alt2app', 'alt2app_func'); add_action('wp_print_scripts', 'alt2_scripts'); add_action('wp_head', 'alt2_header', 1); // ********************** // ADMIN // ********************** function alt2_admin_menu() { add_options_page('AlternativeTo Options', 'AlternativeTo', 'administrator', 'alternativeto-options', 'alt2_admin_markup'); } function alt2_admin_markup() { ?>