'ald_page', 'title' => 'Display Loaded Scripts', 'href' => $ald_page, 'meta' => array( 'class' => 'ald-box' ) ); $wp_admin_bar->add_node( $args ); } /** * Load the enqueued styles and scripts into an object * We will utilize wp_print_scripts because it fires so late * in order to ensure all the scripts & styles are loaded * are captured and accurately reported */ function grab_the_code() { // call the method that will handle the retreval of the Styles // call the method that will handle the retreval of the Scripts $collected_styles = ALDCollectScripts::ald_grab_styles(); $collected_scripts = ALDCollectScripts::ald_grab_scripts(); $loaded_scripts = ''; $loaded_scripts .= ''; echo $loaded_scripts; } add_action( 'wp_print_scripts', 'grab_the_code' ); /** * Enqueue our styles and our front end script * both in admin and front end */ function ald_enqueue_scripts() { wp_enqueue_script( 'ald_plugin_scripts', plugins_url('js/ald_scripts.js', __FILE__), array('jquery') ); wp_enqueue_style( 'ald_styles', plugins_url('css/style.css', __FILE__ ) ); } add_action('admin_enqueue_scripts', 'ald_enqueue_scripts' ); add_action('wp_enqueue_scripts', 'ald_enqueue_scripts' );