options; } add_action( 'init', 'phosphor_options_panel_init', 0 ); require_once 'class.options-framework.php'; /** * Returns an array of system fonts * Feel free to edit this, update the font fallbacks, etc. */ function phosphor_supported_os_fonts() { // OS Font Defaults $os_faces = array( 'Arial, sans-serif' => 'Arial', "'Avant Garde', sans-serif" => 'Avant Garde', 'Cambria, Georgia, serif' => 'Cambria', 'Copse, sans-serif' => 'Copse', "Garamond, 'Hoefler Text', Times New Roman, Times, serif" => 'Garamond', 'Georgia, serif' => 'Georgia', "'Helvetica Neue', Helvetica, sans-serif" => 'Helvetica Neue', 'Tahoma, Geneva, sans-serif' => 'Tahoma' ); return $os_faces; } /** * Returns a select list of Google fonts * Feel free to edit this, update the fallbacks, etc. */ function phosphor_supported_google_fonts() { // Google Font Defaults $google_faces = array( 'Arvo, serif' => 'Arvo (Google)', 'Copse, sans-serif' => 'Copse (Google)', 'Droid Sans, sans-serif' => 'Droid Sans (Google)', 'Droid Serif, serif' => 'Droid Serif (Google)', 'Lobster, cursive' => 'Lobster (Google)', 'Nobile, sans-serif' => 'Nobile (Google)', 'Open Sans, sans-serif' => 'Open Sans (Google)', 'Oswald, sans-serif' => 'Oswald (Google)', 'Pacifico, cursive' => 'Pacifico (Google)', 'Rokkitt, serif' => 'Rokkit (Google)', 'PT Sans, sans-serif' => 'PT Sans (Google)', 'Quattrocento, serif' => 'Quattrocento (Google)', 'Raleway, cursive' => 'Raleway (Google)', 'Ubuntu, sans-serif' => 'Ubuntu (Google)', 'Yanone Kaffeesatz, sans-serif' => 'Yanone Kaffeesatz (Google)', 'Bree Serif, serif' => 'Bree Serif (Google)', 'Poiret One, cursive' => 'Poiret One (Google)', 'PT Serif, serif' => 'PT Serif (Google)', 'Titillium Web, sans-serif' => 'Titillium Web (Google)', 'Merriweather, serif' => 'Merriweather (Google)', 'Roboto, sans-serif' => 'Roboto (Google)', 'Roboto Slab, serif' => 'Roboto Slab (Google)', 'Open Sans Condensed, sans-serif' => 'Open Sans Condensed (Google)', ); return $google_faces; } function phosphor_get_layouts() { return array( '' => array( 'label' => 'Inherit', 'image' => get_stylesheet_directory_uri() . '/img/layout-off.png' ), 'content-sidebar' => array( 'label' => 'Right Sidebar', 'image' => get_stylesheet_directory_uri() . '/img/col-2cl.png' ), 'sidebar-content' => array( 'label' => 'Left Sidebar', 'image' => get_stylesheet_directory_uri() . '/img/col-2cr.png' ), 'fullwidth' => array( 'label' => 'Fullwidth', 'image' => get_stylesheet_directory_uri() . '/img/col-1c.png' ) ); } /** * */ class Phosphor_Options_Panel extends Phosphor_Options_Framework { public $option_id = "phosphor_theme_options"; function __construct() { parent::__construct( 'phosphor_settings', 'Theme Options', $this->option_id ); } protected function get_settings_sections() { return array( 'general' => array( 'title' => __('General', 'phosphor'), 'icon' => 'paint-brush' ), 'home' => array( 'title' => __('Homepage', 'phosphor'), 'icon' => 'home' ), 'slider' => array( 'title' => __('Slider', 'phosphor'), 'icon' => 'picture-o' ), 'layouts' => array( 'title' => __('Layout', 'phosphor'), 'icon' => 'table' ), 'styling' => array( 'title' => __('Styling', 'phosphor'), 'icon' => 'paint-brush' ), 'fonts' => array( 'title' => __('Fonts', 'phosphor'), 'icon' => 'font' ), 'social' => array( 'title' => __('Social', 'phosphor'), 'icon' => 'comment' ), 'footer' => array( 'title' => __('Footer', 'phosphor'), 'icon' => 'arrow-down' ) ); } protected function get_settings_fields() { $fonts = array_merge(phosphor_supported_os_fonts(), phosphor_supported_google_fonts()); asort($fonts); $fonts = array_merge(array('' => 'Default'), $fonts); $layouts = phosphor_get_layouts(); $skins = array( '' => 'Emerald Water', 'lemon-twist' => 'Lemon Twist', 'cherry' => 'Cherry', 'sunrise' => 'Sunrise', 'bloody-mary' => 'Bloody Mary', 'amethyst' => 'Amethyst', 'rose-water' => 'Rose Water', 'aqua-marine' => 'Aqua Marine', 'mango-pulp' => 'Mango Pulp', 'electric-violet' => 'Electric Violet', 'mojito' => 'Mojito', 'virgin-america' => 'Virgin America' ); $skin_details = array(); foreach ($skins as $skin_key => $skin) { $image_name = ($skin_key) ? $skin_key : 'emerald-water'; $skin_details[ $skin_key ] = array( 'label' => $skin, 'image' => get_stylesheet_directory_uri() . '/img/skins/'. $image_name .'.png' ); } return array( 'general' => array( 'custom_favicon' => array( 'title' => __('Favicon', 'phosphor'), 'desc' => __('A favicon is a 16x16 pixel icon that represents your site; paste the URL to a .ico image that you want to use as the image', 'phosphor'), 'type' => 'url', 'widget'=> 'media_url' ), 'logo' => array( 'title' => __('Logo URL', 'phosphor'), 'desc' => __('Enter the link to your logo image', 'phosphor'), 'type' => 'url', 'widget'=> 'media_url' ), 'custom_css' => array( 'title' => __('Custom CSS', 'phosphor'), 'desc' => __('Want to add any custom CSS code? Put in here, and the rest is taken care of. This overrides any other stylesheets. eg: a.button{color:green}', 'phosphor'), 'widget'=> 'textarea' ), 'site_id' => array( 'widget'=> 'hidden', 'def' => rand(1000000000, 9999999999) ) ), 'layouts' => array( 'sidebar_width' => array( 'title' => __('Sidebar Width', 'phosphor'), 'widget'=> 'select', 'desc' => __('How wide do you want the sidebar area to be?', 'phosphor'), 'items' => array( '' => '25%', 'sidebar-30' => '30%', 'sidebar-35' => '35%', 'sidebar-40' => '40%' ) ), 'general' => array( 'title' => __('Layout', 'phosphor'), 'desc' => __('The general layout of the theme. It will be used on all pages unless a more specific layout is available', 'phosphor'), 'widget'=> 'image_picker', 'items' => $layouts ), 'single' => array( 'title' => __('Single Layout', 'phosphor'), 'desc' => __('Select a layout for the all the singular templates i.e. posts and pages (overrides the general layout)', 'phosphor'), 'widget'=> 'image_picker', 'items' => $layouts ), 'single_post' => array( 'title' => __('Single Post Layout', 'phosphor'), 'desc' => __('Select a layout for the single post template (overrides the general and single layouts)', 'phosphor'), 'widget'=> 'image_picker', 'items' => $layouts ), 'single_page' => array( 'title' => __('Single Page Layout', 'phosphor'), 'desc' => __('Select a layout for the single page template (overrides the general and single layouts)', 'phosphor'), 'widget'=> 'image_picker', 'items' => $layouts ), 'archive' => array( 'title' => __('Archive Layout', 'phosphor'), 'desc' => __('Select a layout for all the archives (overrides the general layout)', 'phosphor'), 'widget'=> 'image_picker', 'items' => $layouts ), 'archive_category' => array( 'title' => __('Category Archive Layout', 'phosphor'), 'desc' => __('Select a layout for the category archives (overrides the general and archive layouts)', 'phosphor'), 'widget'=> 'image_picker', 'items' => $layouts ), 'archive_tag' => array( 'title' => __('Tag Archive Layout', 'phosphor'), 'desc' => __('Select a layout for the tag archives (overrides the general and archive layouts)', 'phosphor'), 'widget'=> 'image_picker', 'items' => $layouts ), ), 'home' => array( 'show_excerpts' => array( 'title' => __('Show Excerpts', 'phosphor'), 'desc' => __('Do you want to show excerpts on homepage, even when the read more tag isn\'t present in the content?', 'phosphor'), 'type' => 'bool', 'widget'=> 'checkbox' ), ), 'slider' => array( 'disable_slider' => array( 'title' => __('Disable slider?', 'phosphor'), 'desc' => __('Check if you want to disable the slider', 'phosphor'), 'type' => 'bool', 'widget'=> 'checkbox' ), 'slides' => array( 'title' => __('Slider Images', 'phosphor'), 'desc' => __('Select the media items that you want to display in the slider', 'phosphor'), 'widget'=> 'media_items' ), 'transitionStyle' => array( 'title' => __('Transition Style', 'phosphor'), 'desc' => __('Select a transition style for the slider', 'phosphor'), 'widget'=> 'select', 'items' => array('' => __('Slide', 'phosphor'), 'fade' => __('Fade', 'phosphor'), 'backSlide' => __('Back Slide', 'phosphor'), 'goDown' => __('Go Down', 'phosphor'), 'fadeUp' => __('Fade Up', 'phosphor')) ), 'pagination' => array( 'title' => __('Display Pagination', 'phosphor'), 'desc' => __('Do you want pagination to appear below the slides?', 'phosphor'), 'type' => 'bool', 'widget'=> 'checkbox', 'def' => true ), 'autoPlay' => array( 'title' => __('Auto Play', 'phosphor'), 'desc' => __('Do you want the slides to start animating automatically?', 'phosphor'), 'type' => 'bool', 'widget'=> 'checkbox', 'def' => false ), 'stopOnHover' => array( 'title' => __('Stop On Hover', 'phosphor'), 'desc' => __('Do you want the animation to stop on hover?', 'phosphor'), 'type' => 'bool', 'widget'=> 'checkbox', 'def' => false ), 'navigation' => array( 'title' => __('Display Navigation', 'phosphor'), 'desc' => __('Do you want to display the next and previous links below the slides?', 'phosphor'), 'type' => 'bool', 'widget'=> 'checkbox', 'def' => false ) ), 'styling' => array( 'skin' => array( 'title' => __('Skin', 'phosphor'), 'desc' => __('Choose a skin for the website', 'phosphor'), 'widget'=> 'image_picker', 'items' => $skin_details ), ), 'fonts' => array( 'font_size' => array( 'title' => __('Font Size', 'phosphor'), 'desc' => __('Choose the basic font size in pixels. The size of all the text depends on this', 'phosphor'), 'type' => 'nested', 'widget'=> 'nested', 'items' => array( 'format' => array( 'widget'=> 'hidden', 'def' => 'body, button, input, select, textarea{font-size:%spx;}' ), 'value' => array( 'type' => 'int', 'widget'=> 'slider', 'min' => 10, 'max' => 50 ) ) ), 'font_family' => array( 'title' => __('Basic Font', 'phosphor'), 'desc' => __('Choose the basic font. This font will be used throughout the website unless a more specific font is available', 'phosphor'), 'type' => 'nested', 'widget' => 'nested', 'items' => array( 'format' => array( 'widget'=> 'hidden', 'def' => 'body, button, input, select, textarea{font-family:%s;}' ), 'value' => array( 'type' => 'text', 'widget'=> 'select', 'items' => $fonts ) ) ), 'headings_font_family' => array( 'title' => __('Headings Font', 'phosphor'), 'desc' => __('This font will be used for all the headings (h1, h2, h3, post titles, site title, widget titles etc) unless a more specific font is available', 'phosphor'), 'type' => 'nested', 'widget' => 'nested', 'items' => array( 'format' => array( 'widget'=> 'hidden', 'def' => 'h1,h2,h3,h4,h5,h6{font-family:%s;}' ), 'value' => array( 'type' => 'text', 'widget'=> 'select', 'items' => $fonts ) ) ), 'site_title_font_family' => array( 'title' => __('Site Title Font', 'phosphor'), 'desc' => __('This font will be used for the site title, it will override the basic font and the headings font', 'phosphor'), 'type' => 'nested', 'widget' => 'nested', 'items' => array( 'format' => array( 'widget'=> 'hidden', 'def' => '.site-title{font-family:%s;}' ), 'value' => array( 'type' => 'text', 'widget'=> 'select', 'items' => $fonts ) ) ), 'post_title_font_family' => array( 'title' => __('Post Title Font', 'phosphor'), 'desc' => __('This font will be used for the post titles, it will override the basic font and the headings font', 'phosphor'), 'type' => 'nested', 'widget' => 'nested', 'items' => array( 'format' => array( 'widget'=> 'hidden', 'def' => '.entry-title{font-family:%s;}' ), 'value' => array( 'type' => 'text', 'widget'=> 'select', 'items' => $fonts ) ) ), 'widget_title_font_family' => array( 'title' => __('Widget Title Font', 'phosphor'), 'desc' => __('This font will be used for the widget titles, it will override the basic font and the headings font', 'phosphor'), 'type' => 'nested', 'widget' => 'nested', 'items' => array( 'format' => array( 'widget'=> 'hidden', 'def' => '.widget-title{font-family:%s;}' ), 'value' => array( 'type' => 'text', 'widget'=> 'select', 'items' => $fonts ) ) ), ), 'social' => array( 'twitter' => array( 'title' => __('Twitter URL', 'phosphor'), 'desc' => __('Enter the URL of your Twitter page', 'phosphor'), 'type' => 'url', 'widget'=> 'text' ), 'fb' => array( 'title' => __('Facebook URL', 'phosphor'), 'desc' => __('Enter the URL of your Facebook fan page', 'phosphor'), 'type' => 'url', 'widget'=> 'text' ), 'google_plus' => array( 'title' => __('Google Plus URL', 'phosphor'), 'desc' => __('Enter the URL of your Google page', 'phosphor'), 'type' => 'url', 'widget'=> 'text' ), 'instagram' => array( 'title' => __('Instagram URL', 'phosphor'), 'desc' => __('Enter the URL of your Instagram page', 'phosphor'), 'type' => 'url', 'widget'=> 'text' ), 'pinterest' => array( 'title' => __('Pinterest URL', 'phosphor'), 'desc' => __('Enter the URL of your Pinterest page', 'phosphor'), 'type' => 'url', 'widget'=> 'text' ), 'youtube' => array( 'title' => __('Youtube URL', 'phosphor'), 'desc' => __('Enter the URL of your Youtube page', 'phosphor'), 'type' => 'url', 'widget'=> 'text' ), 'feedburner' => array( 'title' => __('Feedburner URL', 'phosphor'), 'desc' => __('Feedburner is a Google service that takes care of your RSS feed. Paste your Feedburner URL here to let readers see it in your website', 'phosphor'), 'type' => 'url', 'widget'=> 'text' ) ), 'footer' => array( 'footer_text' => array( 'title' => __('Footer Copyright Text', 'phosphor'), 'desc' => __('Enter the text that you want to appear on the left side of the footer', 'phosphor'), 'widget'=> 'text', 'def' => '© ' . get_bloginfo('name') ), 'hide_credits' => array( 'title' => __('Hide credit link?', 'phosphor'), 'desc' => __('Do you want to hide the credit link in footer?', 'phosphor'), 'type' => 'bool', 'widget'=> 'checkbox' ) ) ); } protected function display_sidebar() { ?>

9, 'fields' => 'ids', 'post_type' => array('post', 'page'), 'post_status' => 'publish' ) ); return implode(',', $post_ids); } } ?>