. */ define ('ASPEN_SW_VERSION','1.0'); define ('ASPEN_SW_MINIFY','.min'); // '' for dev, '.min' for production function aspen_sw_installed() { return true; } function aspen_sw_admin() { require_once(dirname( __FILE__ ) . '/includes/atw-sw-admin-top.php'); // NOW - load the admin stuff aspen_sw_admin_page(); } function aspen_sw_admin_menu() { $page = add_theme_page( 'Aspen Shortcodes and Widgets by Aspen ThemeWorks',' ♠[Aspen Shortcodes]','manage_options','aspen_sw', 'aspen_sw_admin'); /* using registered $page handle to hook stylesheet loading for this admin page */ add_action('admin_print_styles-'.$page, 'aspen_sw_admin_scripts'); } add_action('admin_menu', 'aspen_sw_admin_menu', 6); function aspen_sw_admin_scripts() { /* called only on the admin page, enqueue our special style sheet here (for tabbed pages) */ wp_enqueue_style('atw_sw_Stylesheet', aspen_sw_plugins_url('/atw-admin-style', ASPEN_SW_MINIFY . '.css'), array(), ASPEN_SW_VERSION); wp_enqueue_style ("thickbox"); // @@@@ if we use media browser... wp_enqueue_script ("thickbox"); wp_enqueue_script('atw_Yetii', aspen_sw_plugins_url('/js/yetii/yetii',ASPEN_SW_MINIFY.'.js'), array(),ASPEN_SW_VERSION); wp_enqueue_script('atw_Hide', aspen_sw_plugins_url('/js/theme/hide-css', ASPEN_SW_MINIFY.'.js'), array(),ASPEN_SW_VERSION); wp_enqueue_script('atw_MediaLib', aspen_sw_plugins_url('/js/theme/media-lib'.ASPEN_SW_MINIFY,'.js'), array(),ASPEN_SW_VERSION); } function aspen_sw_plugins_url($file,$ext) { return plugins_url($file,__FILE__) . $ext; } function aspen_sw_enqueue_scripts() { // action definition if (function_exists('atw_slider_header')) atw_slider_header(); //-- Aspen PLus js lib - requires jQuery... wp_enqueue_script('aspenswJSLib', aspen_sw_plugins_url('/js/aspenswjslib', ASPEN_SW_MINIFY . '.js'),array('jquery'),ASPEN_SW_VERSION); if (aspen_sw_getopt('video_fitvids')) wp_enqueue_script('atw-fit-vids', aspen_sw_plugins_url('/js/fitvids/jquery.fitvids', ASPEN_SW_MINIFY . '.js'),array('jquery'),ASPEN_SW_VERSION,true); // add plugin CSS here, too. wp_register_style('aspen-sw-style-sheet',aspen_sw_plugins_url('aspen-sw-style', ASPEN_SW_MINIFY.'.css'),ASPEN_SW_VERSION,'all'); wp_enqueue_style('aspen-sw-style-sheet'); } add_action('wp_enqueue_scripts', 'aspen_sw_enqueue_scripts' ); function aspen_sw_footer() { echo "\n"; if (function_exists('atw_slider_footer')) atw_slider_footer(); if (aspen_sw_getopt('video_fitvids')) { $selector = 'body'; // body works on all themes... if (function_exists( 'aspen_setup' ) || function_exists( 'weaverii_setup' )) $selector = '#wrapper'; echo "\n"; } } add_action('wp_footer','aspen_sw_footer', 9); // make it 9 so we can dequeue bxSlider script function aspen_has_bxsliderxxx() { } if (!function_exists('aspen_has_bxslider')) { function aspen_sw_has_bxslider() { // admin in atw-bxslider-admin.php return true; } } require_once(dirname( __FILE__ ) . '/includes/atw-runtime-lib.php'); // NOW - load the basic library require_once(dirname( __FILE__ ) . '/includes/atw-widgets.php'); // widgets runtime library require_once(dirname( __FILE__ ) . '/includes/atw-shortcodes.php'); // load the shortcode definitions ?>