_( 'AIM Style Vault' ), 'singular_name' => _( 'Custom Style' ), 'add_new' => _( 'Add New' ), 'add_new_item' => __( 'Add New Custom Style' ), 'edit_item' => __( 'Edit Custom Style' ), 'new_item' => __( 'New Custom Style' ), 'view_item' => __( 'View Custom Style' ), 'search_items' => __( 'Search Custom Styles' ), 'not_found' => __( 'No Custom Styles found' ), 'not_found_in_trash' => __( 'No Custom Styles found in Trash' ), ); $args = array( 'labels' => $labels, /* NOTICE: the $labels variable is used here... */ 'public' => true, 'show_ui' => true, // UI in admin panel '_builtin' => false, // It's a custom post type, not built in! '_edit_link' => 'post.php?post=%d', 'capability_type' => 'post', 'capabilities' => array( 'publish_posts' => 'manage_options', 'edit_posts' => 'manage_options', 'edit_others_posts' => 'manage_options', 'delete_posts' => 'manage_options', 'delete_others_posts' => 'manage_options', 'read_private_posts' => 'manage_options', 'edit_post' => 'manage_options', 'delete_post' => 'manage_options', 'read_post' => 'manage_options', ), 'hierarchical' => false, 'has_archives' => false, 'exclude_from_search' => true, 'publicly_queryable' => false, 'menu_position' => 45, 'rewrite' => array("slug" => "aim_style_vault"), // Permalinks format 'supports' => array('title') ); register_post_type( 'aim_style_vault', $args ); /* End AIM Style Vault Registration */ } // add metabox for stylesheets include_once(plugin_dir_path(__FILE__) . 'aim_metabox.php'); // compress CSS and add to head include_once(plugin_dir_path(__FILE__) . 'asv-styles.php'); // Browser Detection to extend body class add_filter('body_class','asv_browser_body_class'); function asv_browser_body_class($classes) { global $is_lynx, $is_gecko, $is_IE, $is_opera, $is_NS4, $is_safari, $is_chrome, $is_iphone; if($is_lynx) $classes[] = 'lynx'; elseif($is_gecko) $classes[] = 'gecko'; elseif($is_opera) $classes[] = 'opera'; elseif($is_NS4) $classes[] = 'ns4'; elseif($is_safari) $classes[] = 'safari'; elseif($is_chrome) $classes[] = 'chrome'; elseif($is_IE) $classes[] = 'ie'; else $classes[] = 'unknown'; if($is_iphone) $classes[] = 'iphone'; return $classes; } }