$cm_theme ) ); } /** * Settings Page * Adds Admin Menu Item via WordPress' "Administration Menus" API. Also hook actions to register options via WordPress' Settings API. */ static function admin_load() { // added here to not effect other pages. Theme page requires JavaScript (less.js) or it doesn't make sense to save. add_filter( 'sns_show_submit_button', '__return_false' ); register_setting( SnS_Admin::OPTION_GROUP, 'SnS_options' ); add_settings_section( 'theme', __( 'Scripts n Styles Theme Files', 'scripts-n-styles' ), array( __CLASS__, 'less_fields' ), SnS_Admin::MENU_SLUG ); } static function less_fields() { $files = array(); $support_files = get_theme_support( 'scripts-n-styles' ); if ( is_child_theme() ) $root = get_stylesheet_directory(); else $root = get_template_directory(); foreach( $support_files[0] as $file ) { if ( is_file( $root . $file ) ) $files[] = $root . $file; } $slug = get_stylesheet(); $options = get_option( 'SnS_options' ); // Stores data on a theme by theme basis. $theme = isset( $options[ 'themes' ][ $slug ] ) ? $options[ 'themes' ][ $slug ] : array(); $stored = isset( $theme[ 'less' ] ) ? $theme[ 'less' ] : array(); // is an array of stored imported less file data $compiled = isset( $theme[ 'compiled' ] ) ? $theme[ 'compiled' ] : ''; // the complete compiled down css $slug = esc_attr( $slug ); $open_theme_panels = json_decode( get_user_option( 'sns_open_theme_panels', get_current_user_id() ), true ); ?>

every page (and post) of your site, including the homepage and archives. The code will appear before Scripts and Styles registered individually.', 'scripts-n-styles' )?>