/** * Add admin script * * @since 1.1.0 */ function admin_scripts() { if (genesis_is_menu_page($this->page_id)) { wp_enqueue_script('sandbox-admin', CHILD_LIB . '/js/' . gs_script_suffix('admin'), array('jquery'), CHILD_THEME_VERSION); //wp_enqueue_script( 'sandbox-admin', CHILD_LIB . '/js/admin.js', array( 'jquery' ) , CHILD_THEME_VERSION ); } }
/** * Registers Appropriate Scripts and Styles when needed based on Debugging. * Assumes that the normal *.min.js/*.min.css is the minified version & *.js is beautified version. * To make the styles appear AFTER your base style, in the array(), place sanitize_title_with_dashes( CHILD_THEME_NAME ) * so that: array( sanitize_title_with_dashes( CHILD_THEME_NAME ) ) * e.g., wp_register_style( 'gs-twitter-bootstrap', CHILD_CSS . '/' . gs_script_suffix( 'bootstrap', 'css' ), array( sanitize_title_with_dashes( CHILD_THEME_NAME ) ), '1.0.0' ); * * @uses wp_enqueue_script() WP adds JS to page safely. * @uses gs_script_suffix() Adds proper CSS/JS suffix based on WP_DEBUG or SCRIPT_DEBUG */ function gs_register_scripts() { /** * Twitter Bootstrap CSS * @link http://www.bootstrapcdn.com/?v=10292012225705 * @link http://twitter.github.com/bootstrap/ */ wp_register_style('gs-twitter-bootstrap', CHILD_CSS . '/' . gs_script_suffix('bootstrap', 'css'), array(), '3.0.3'); //wp_register_style( 'gs-twitter-bootstrap-cdn', '//netdna.bootstrapcdn.com/twitter-bootstrap/3.0.3/css/bootstrap-combined.min.css', array(), '3.0.3' ); // Twitter Bootstrap CSS (Font Awesome version) //wp_register_style( 'gs-twitter-bootstrap-font-awesome', '//netdna.bootstrapcdn.com/twitter-bootstrap/4.0.3/css/bootstrap-combined.no-icons.min.css', array(), '4.0.3' ); /** * Twitter Bootstrap JS * @link http://www.bootstrapcdn.com/?v=10292012225705 * @link http://twitter.github.com/bootstrap/ */ //wp_register_script( 'gs-twitter-bootstrap', CHILD_JS . '/' . gs_script_suffix( 'bootstrap', 'js' ), array( 'jquery' ), '3.0.3' ); wp_register_script('gs-twitter-bootstrap-cdn', '//netdna.bootstrapcdn.com/twitter-bootstrap/3.0.3/js/bootstrap.min.js', array('jquery'), '3.0.3'); /** * Font Awesome * @link http://www.bootstrapcdn.com/?v=10292012225705 * @link http://fortawesome.github.com/Font-Awesome/ */ //wp_register_style( 'gs-font-awesome', CHILD_CSS . '/' . gs_script_suffix( 'font-awesome', 'css' ), array(), '4.0.3' ); wp_register_style('gs-font-awesome-cdn', '//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css', array(), '1.0.0'); /** * Animate.css * @link https://daneden.me/animate/ * @link https://github.com/daneden/animate.css */ //wp_register_style( 'gs-animate', CHILD_CSS . '/' . gs_script_suffix( 'animate', 'css' ), array(), '4.0.3' ); /** * Pretty Photo * @link http://www.no-margin-for-errors.com/projects/prettyphoto-jquery-lightbox-clone/ * @link http://www.no-margin-for-errors.com/projects/prettyphoto-jquery-lightbox-clone/documentation */ wp_register_style('gs-pretty-photo', CHILD_CSS . '/' . gs_script_suffix('prettyPhoto', 'css'), array(), '3.1.4'); wp_register_script('gs-pretty-photo', CHILD_JS . '/' . gs_script_suffix('jquery.prettyPhoto', 'js'), array('jquery'), '3.1.4'); /** Common, site specific */ wp_register_script('gs-common', CHILD_JS . '/' . gs_script_suffix('common'), array('jquery'), CHILD_THEME_VERSION); }
return 'one-sixth'; default: return ''; } } /** * Instantiate Pretty Photo * * @param array $args Future Development */ function gs_init_pretty_photo($args = array()) { ?> <script type="text/javascript" charset="utf-8"> jQuery(document).ready(function($){ <<<<<<< HEAD $("a[href$='.jpg'], a[href$='.gif'], a[href$='.png']").prettyPhoto(); ======= $("a[href$='.jpg'], a[href$='.gif'], a[href$='.png'], .prettyPhoto").prettyPhoto(); >>>>>>> origin/HTML5 }); </script> <?php } /** * Add Genesis Sandbox Responsive Styles * Roll own responsive functions * @uses gs_script_suffix() Adds proper CSS/JS suffix based on WP_DEBUG or WP_SCRIPT_DEBUG. */ add_theme_support('gs-responsive', array('css' => array('src' => CHILD_CSS . '/' . gs_script_suffix('responsive', 'css'), 'dir' => CHILD_CSS_DIR . '/' . gs_script_suffix('responsive', 'css')), 'viewport' => true));