function display() { if (!FastfoodOptions::get_opt('fastfood_breadcrumb')) { return; } echo $this->get_the_breadcrumb(); }
public static function menu_primary() { if (FastfoodOptions::get_opt('fastfood_primary_menu')) { ?> <?php fastfood_hook_menu_primary_before(); ?> <div id="menu-primary-container" class="menu-primary-container menu-container"> <?php fastfood_hook_menu_primary_top(); ?> <?php wp_nav_menu(array('container' => false, 'menu_id' => 'menu-primary', 'menu_class' => 'nav-menu', 'fallback_cb' => 'Fastfood_Nav_Menus::menu_primary_fallback', 'theme_location' => 'primary')); ?> <?php fastfood_hook_menu_primary_bottom(); ?> </div> <?php fastfood_hook_menu_primary_after(); ?> <?php } }
function slider_filter($output) { $display_header_slider = get_theme_mod('display_header_slider', ''); $slides = get_uploaded_header_images(); $js_loaded = FastfoodOptions::get_opt('fastfood_jsani'); if ($display_header_slider && $slides && $js_loaded) { $output = $this->build_slider($slides); } return $output; }
/** * Is the primary widget area visible? * * @return bool */ function fastfood_use_sidebar() { static $bool; if (!isset($bool)) { $bool = true; if (!is_singular() && !FastfoodOptions::get_opt('fastfood_rsidebindexes') || is_page() && !FastfoodOptions::get_opt('fastfood_rsidebpages') || is_attachment() && !FastfoodOptions::get_opt('fastfood_rsidebattachments') || is_single() && !FastfoodOptions::get_opt('fastfood_rsidebposts')) { $bool = false; } $bool = apply_filters('fastfood_use_sidebar', $bool); } return $bool; }
function init() { if (is_admin() || fastfood_is_mobile() || fastfood_is_printpreview()) { return; } if (!FastfoodOptions::get_opt('fastfood_cust_comrep') || !FastfoodOptions::get_opt('fastfood_jsani')) { add_action('comment_form_before', array($this, 'load_standard_scripts')); } else { add_action('comment_form_before', array($this, 'load_custom_scripts')); add_action('comment_form_after', array($this, 'hide_form')); } }
public static function theme_option($value, $option) { $keys = explode('[', str_replace(']', '', $option->id)); $base = array_shift($keys); $slug = array_shift($keys); $_value = NULL; if (!self::$theme_options) { self::$theme_options = FastfoodOptions::get_coa(); } $coa = isset(self::$theme_options[$slug]) ? self::$theme_options[$slug] : false; if ($coa) { switch ($coa['setting']['sanitize_method']) { case 'checkbox': $_value = self::checkbox($value, $coa); break; case 'select': $_value = self::select($value, $coa); break; case 'radio': $_value = self::radio($value, $coa); break; case 'color': $_value = self::color($value, $coa); break; case 'url': $_value = self::url($value, $coa); break; case 'text': $_value = self::text($value, $coa); break; case 'number': $_value = self::number($value, $coa); break; case 'textarea': $_value = self::textarea($value, $coa); break; } } return $_value; }
/** * sanitize options value */ function sanitize_options($input) { $the_coa = FastfoodOptions::get_coa(); foreach ($the_coa as $key => $val) { $_value = NULL; if (!isset($input[$key])) { $input[$key] = NULL; } switch ($the_coa[$key]['setting']['sanitize_method']) { case 'checkbox': $_value = FastfoodSanitize::checkbox($input[$key], $the_coa[$key]); break; case 'select': $_value = FastfoodSanitize::select($input[$key], $the_coa[$key]); break; case 'radio': $_value = FastfoodSanitize::radio($input[$key], $the_coa[$key]); break; case 'color': $_value = FastfoodSanitize::color($input[$key], $the_coa[$key]); break; case 'url': $_value = FastfoodSanitize::url($input[$key], $the_coa[$key]); break; case 'text': $_value = FastfoodSanitize::text($input[$key], $the_coa[$key]); break; case 'number': $_value = FastfoodSanitize::number($input[$key], $the_coa[$key]); break; case 'textarea': $_value = FastfoodSanitize::textarea($input[$key], $the_coa[$key]); break; } $input[$key] = $_value; } return $input; }
/** * Grab the actions hooked to the 'fastfood_hook_builder' hook and add each one to its section * * @access private * @since Fastfood 0.37 */ private function grab_sort_n_hang() { global $wp_filter; if (isset($wp_filter['fastfood_hook_builder'])) { $sorted = (array) json_decode(FastfoodOptions::get_opt('fastfood_builder_order')); foreach ($wp_filter['fastfood_hook_builder'][10] as $element) { $id = $element['accepted_args']['id']; $section = $element['accepted_args']['section']; $callback = $element['function']; $label = $element['accepted_args']['label'] ? $element['accepted_args']['label'] : $element['accepted_args']['id']; $priority = false === ($offset = array_search($id, $sorted)) ? 10 + absint($element['accepted_args']['priority']) : 10 + $offset; if (!isset(self::$supported_sections[$section])) { continue; } self::$order[$section]['label'] = self::$supported_sections[$section]; self::$order[$section]['elements'][$priority] = array('id' => $id, 'callback' => $callback, 'priority' => $priority, 'label' => $label); add_action("fastfood_hook_{$section}", $callback, $priority); } foreach (self::$order as $s_key => $section) { ksort($section['elements']); self::$order[$s_key]['elements'] = $section['elements']; } } }
/** * Add classes to <body> */ function fastfood_body_classes($classes) { $classes[] = 'ff-no-js'; $classes[] = 'layout-2'; if (FastfoodOptions::get_opt('fastfood_tinynav')) { $classes[] = 'tinynav-support'; } if (FastfoodOptions::get_opt('fastfood_basic_animation_captions')) { $classes[] = 'fading-captions'; } if (FastfoodOptions::get_opt('fastfood_rsideb_position') == 'left') { $classes[] = 'left-sidebar'; } return $classes; }
/** * Initialize the default settings and the options hierarchy * * @return none */ public static function init() { self::$_coa = apply_filters('fastfood_options_array', array('fastfood_qbar' => array('setting' => array('default' => 1, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('show the quickbar', 'fastfood'), 'description' => __('the sliding panel that is activated when the mouse rolls over the fixed buttons on the bottom left', 'fastfood'))), 'fastfood_qbar_user' => array('setting' => array('default' => 1, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('user', 'fastfood'), 'description' => '', 'require' => 'fastfood_options[fastfood_qbar]')), 'fastfood_qbar_minilogin' => array('setting' => array('default' => 1, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('mini login', 'fastfood'), 'description' => __('a small login form in the "user" panel', 'fastfood'), 'require' => array('fastfood_options[fastfood_qbar]', 'fastfood_options[fastfood_qbar_user]'))), 'fastfood_qbar_reccom' => array('setting' => array('default' => 1, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('recent comments', 'fastfood'), 'description' => '', 'require' => 'fastfood_options[fastfood_qbar]')), 'fastfood_qbar_reccom_length' => array('setting' => array('default' => 10, 'sanitize_method' => 'number'), 'control' => array('type' => 'number', 'render_type' => 'number', 'label' => '', 'description' => sprintf(__('number of items to show in the "%s" panel', 'fastfood'), __('recent comments', 'fastfood')), 'input_attrs' => array('min' => 5, 'max' => 15, 'step' => 1), 'require' => array('fastfood_options[fastfood_qbar]', 'fastfood_options[fastfood_qbar_reccom]'))), 'fastfood_qbar_cat' => array('setting' => array('default' => 1, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('categories', 'fastfood'), 'description' => '', 'require' => 'fastfood_options[fastfood_qbar]')), 'fastfood_qbar_cat_length' => array('setting' => array('default' => 10, 'sanitize_method' => 'number'), 'control' => array('type' => 'number', 'render_type' => 'number', 'label' => '', 'description' => sprintf(__('number of items to show in the "%s" panel', 'fastfood'), __('categories', 'fastfood')), 'input_attrs' => array('min' => 5, 'max' => 15, 'step' => 1), 'require' => array('fastfood_options[fastfood_qbar]', 'fastfood_options[fastfood_qbar_cat]'))), 'fastfood_qbar_recpost' => array('setting' => array('default' => 1, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('recent posts', 'fastfood'), 'description' => '', 'require' => 'fastfood_options[fastfood_qbar]')), 'fastfood_qbar_recpost_length' => array('setting' => array('default' => 10, 'sanitize_method' => 'number'), 'control' => array('type' => 'number', 'render_type' => 'number', 'label' => '', 'description' => sprintf(__('number of items to show in the "%s" panel', 'fastfood'), __('recent posts', 'fastfood')), 'input_attrs' => array('min' => 5, 'max' => 15, 'step' => 1), 'require' => array('fastfood_options[fastfood_qbar]', 'fastfood_options[fastfood_qbar_recpost]'))), 'fastfood_postexcerpt' => array('setting' => array('default' => 0, 'sanitize_method' => 'select'), 'control' => array('type' => 'select', 'render_type' => 'select', 'label' => __('content', 'fastfood'), 'description' => __('the content to show on indexes', 'fastfood'), 'choices' => array(0 => __('content', 'fastfood'), 1 => __('excerpt', 'fastfood')))), 'fastfood_post_formats_standard_title' => array('setting' => array('default' => 'post title', 'sanitize_method' => 'select'), 'control' => array('type' => 'select', 'render_type' => 'select', 'label' => __('title', 'fastfood'), 'description' => __('the title to show on indexes', 'fastfood'), 'choices' => array('post title' => __('post title', 'fastfood'), 'post date' => __('post date', 'fastfood'), 'none' => __('none', 'fastfood')))), 'fastfood_post_formats_gallery' => array('setting' => array('default' => 1, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => sprintf(__('support the "%s" format', 'fastfood'), get_post_format_string('gallery')), 'description' => '')), 'fastfood_post_formats_gallery_title' => array('setting' => array('default' => 'post title', 'sanitize_method' => 'select'), 'control' => array('type' => 'select', 'render_type' => 'select', 'label' => __('title', 'fastfood'), 'description' => __('the title to show on indexes', 'fastfood'), 'choices' => array('post title' => __('post title', 'fastfood'), 'post date' => __('post date', 'fastfood'), 'none' => __('none', 'fastfood')), 'require' => 'fastfood_options[fastfood_post_formats_gallery]')), 'fastfood_post_formats_gallery_content' => array('setting' => array('default' => 'presentation', 'sanitize_method' => 'select'), 'control' => array('type' => 'select', 'render_type' => 'select', 'label' => __('content', 'fastfood'), 'description' => __('the content to show on indexes', 'fastfood'), 'choices' => array('presentation' => __('presentation', 'fastfood'), 'content' => __('content', 'fastfood'), 'excerpt' => __('excerpt', 'fastfood'), 'none' => __('none', 'fastfood')), 'require' => 'fastfood_options[fastfood_post_formats_gallery]')), 'fastfood_post_formats_gallery_preview_items' => array('setting' => array('default' => 5, 'sanitize_method' => 'number'), 'control' => array('type' => 'number', 'render_type' => 'number', 'label' => __('number of images', 'fastfood'), 'description' => sprintf(__('the number of images to show in "%s" view', 'fastfood'), __('presentation', 'fastfood')), 'input_attrs' => array('min' => 3, 'max' => 9, 'step' => 1), 'require' => 'fastfood_options[fastfood_post_formats_gallery]')), 'fastfood_post_formats_quote' => array('setting' => array('default' => 1, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => sprintf(__('support the "%s" format', 'fastfood'), get_post_format_string('quote')), 'description' => '')), 'fastfood_post_formats_aside' => array('setting' => array('default' => 1, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => sprintf(__('support the "%s" format', 'fastfood'), get_post_format_string('aside')), 'description' => '')), 'fastfood_post_view_aside' => array('setting' => array('default' => 1, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('show on indexes', 'fastfood'), 'description' => __('by deselecting this option, the "aside" posts will be ignored and will not appear on indexes', 'fastfood'), 'require' => 'fastfood_options[fastfood_post_formats_aside]')), 'fastfood_post_formats_status' => array('setting' => array('default' => 1, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => sprintf(__('support the "%s" format', 'fastfood'), get_post_format_string('status')), 'description' => '')), 'fastfood_post_view_status' => array('setting' => array('default' => 1, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('show on indexes', 'fastfood'), 'description' => __('by deselecting this option, the "status" posts will be ignored and will not appear on indexes', 'fastfood'), 'require' => 'fastfood_options[fastfood_post_formats_status]')), 'fastfood_xinfos_global' => array('setting' => array('default' => 1, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('show post/page details (author, date, tags, etc)', 'fastfood'), 'description' => '')), 'fastfood_xinfos_on_list' => array('setting' => array('default' => 1, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('in indexes', 'fastfood'), 'description' => __('show details (author, date, tags, etc) in posts overview (archives, search, main index...)', 'fastfood'), 'require' => 'fastfood_options[fastfood_xinfos_global]')), 'fastfood_xinfos_on_page' => array('setting' => array('default' => 1, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('in pages', 'fastfood'), 'description' => __('show details (hierarchy and comments) in pages', 'fastfood'), 'require' => 'fastfood_options[fastfood_xinfos_global]')), 'fastfood_xinfos_on_post' => array('setting' => array('default' => 1, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('in posts', 'fastfood'), 'description' => __('show details (author, date, tags, etc) in posts', 'fastfood'), 'require' => 'fastfood_options[fastfood_xinfos_global]')), 'fastfood_xinfos_on_front' => array('setting' => array('default' => 1, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('in front page', 'fastfood'), 'description' => __('show details (author, date, tags, etc) in front page', 'fastfood'), 'require' => 'fastfood_options[fastfood_xinfos_global]')), 'fastfood_xinfos_static' => array('setting' => array('default' => 0, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('static info', 'fastfood'), 'description' => __('show details as a static list (not animated)', 'fastfood'), 'require' => 'fastfood_options[fastfood_xinfos_global]')), 'fastfood_xinfos_byauth' => array('setting' => array('default' => 1, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('author', 'fastfood'), 'description' => '', 'require' => 'fastfood_options[fastfood_xinfos_global]')), 'fastfood_xinfos_date' => array('setting' => array('default' => 1, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('date', 'fastfood'), 'description' => '', 'require' => 'fastfood_options[fastfood_xinfos_global]')), 'fastfood_xinfos_comm' => array('setting' => array('default' => 1, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('comments number', 'fastfood'), 'description' => '', 'require' => 'fastfood_options[fastfood_xinfos_global]')), 'fastfood_xinfos_tag' => array('setting' => array('default' => 1, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('tags', 'fastfood'), 'description' => '', 'require' => 'fastfood_options[fastfood_xinfos_global]')), 'fastfood_xinfos_cat' => array('setting' => array('default' => 1, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('categories', 'fastfood'), 'description' => '', 'require' => 'fastfood_options[fastfood_xinfos_global]')), 'fastfood_xinfos_hiera' => array('setting' => array('default' => 1, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('hierarchy', 'fastfood'), 'description' => '', 'require' => 'fastfood_options[fastfood_xinfos_global]')), 'fastfood_jsani' => array('setting' => array('default' => 1, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('use javascript animations and features', 'fastfood'), 'description' => __('try disable animations if you encountered problems with javascript', 'fastfood'))), 'fastfood_basic_animation_main_menu' => array('setting' => array('default' => 1, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('main menu', 'fastfood'), 'description' => '', 'require' => 'fastfood_options[fastfood_jsani]')), 'fastfood_basic_animation_navigation_buttons' => array('setting' => array('default' => 1, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('navigation buttons', 'fastfood'), 'description' => '', 'require' => 'fastfood_options[fastfood_jsani]')), 'fastfood_basic_animation_quickbar_panels' => array('setting' => array('default' => 1, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('quickbar panels', 'fastfood'), 'description' => '', 'require' => 'fastfood_options[fastfood_jsani]')), 'fastfood_basic_animation_entry_meta' => array('setting' => array('default' => 1, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('entry metadata', 'fastfood'), 'description' => '', 'require' => 'fastfood_options[fastfood_jsani]')), 'fastfood_basic_animation_smooth_scroll' => array('setting' => array('default' => 1, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('smooth scroll', 'fastfood'), 'description' => '', 'require' => 'fastfood_options[fastfood_jsani]')), 'fastfood_basic_animation_captions' => array('setting' => array('default' => 1, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('caption slide', 'fastfood'), 'description' => '', 'require' => 'fastfood_options[fastfood_jsani]')), 'fastfood_post_expand' => array('setting' => array('default' => 1, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('post expander', 'fastfood'), 'description' => __('expands a post to show the full content when the reader clicks the "Read more..." link', 'fastfood'), 'require' => 'fastfood_options[fastfood_jsani]')), 'fastfood_comments_navigation' => array('setting' => array('default' => 0, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('comments navigation', 'fastfood'), 'description' => __('ajaxed navigation for comments', 'fastfood'), 'require' => 'fastfood_options[fastfood_jsani]')), 'fastfood_gallery_preview' => array('setting' => array('default' => 1, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('use thickbox for showing images and galleries', 'fastfood'), 'description' => '', 'require' => 'fastfood_options[fastfood_jsani]')), 'fastfood_force_link_to_image' => array('setting' => array('default' => 1, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('force galleries to use links to image instead of links to attachment', 'fastfood'), 'description' => '', 'require' => array('fastfood_options[fastfood_jsani]', 'fastfood_options[fastfood_gallery_preview]'))), 'fastfood_cust_comrep' => array('setting' => array('default' => 1, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('custom comment form', 'fastfood'), 'description' => __('custom floating form for posting comments', 'fastfood'), 'require' => 'fastfood_options[fastfood_jsani]')), 'fastfood_quotethis' => array('setting' => array('default' => 1, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('quote link', 'fastfood'), 'description' => __('show a link for easily add the selected text as a quote inside the comment form', 'fastfood'), 'require' => 'fastfood_options[fastfood_jsani]')), 'fastfood_tinynav' => array('setting' => array('default' => 1, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => 'Tinynav', 'description' => __('convert the primary menu in a tiny navigation menu for small screens (less than 800px wide)', 'fastfood') . '<br />' . __('more info', 'fastfood') . ' : <a target="_blank" href="https://github.com/viljamis/TinyNav.js">Tinynav</a>', 'require' => 'fastfood_options[fastfood_jsani]')), 'fastfood_rsidebindexes' => array('setting' => array('default' => 1, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('in indexes', 'fastfood'), 'description' => __('(archives, search, main index...)', 'fastfood'))), 'fastfood_rsidebpages' => array('setting' => array('default' => 0, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('in pages', 'fastfood'), 'description' => '')), 'fastfood_rsidebposts' => array('setting' => array('default' => 0, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('in posts', 'fastfood'), 'description' => '')), 'fastfood_rsidebattachments' => array('setting' => array('default' => 0, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('in attachments', 'fastfood'), 'description' => '')), 'fastfood_rsideb_position' => array('setting' => array('default' => 'right', 'sanitize_method' => 'radio', 'transport' => 'postMessage'), 'control' => array('type' => 'radio', 'render_type' => 'smart_radio', 'label' => __('position', 'fastfood'), 'description' => '', 'choices' => array('left' => '<span class="theme-option-sprite-image"></span>' . __('left', 'fastfood'), 'right' => '<span class="theme-option-sprite-image"></span>' . __('right', 'fastfood')))), 'fastfood_rsideb_width' => array('setting' => array('default' => 284, 'sanitize_method' => 'number', 'transport' => 'postMessage'), 'control' => array('render_type' => 'slider', 'label' => __('width (px)', 'fastfood'), 'description' => '[150-400]', 'input_attrs' => array('min' => 150, 'max' => 400, 'step' => 1))), 'fastfood_colors_link' => array('setting' => array('default' => '#2ea2cc', 'sanitize_method' => 'color', 'transport' => 'postMessage'), 'control' => array('render_type' => 'color', 'label' => __('normal links', 'fastfood'), 'description' => '')), 'fastfood_colors_link_hover' => array('setting' => array('default' => '#d54e21', 'sanitize_method' => 'color', 'transport' => 'postMessage'), 'control' => array('render_type' => 'color', 'label' => __('highlighted links', 'fastfood'), 'description' => '')), 'fastfood_colors_link_sel' => array('setting' => array('default' => '#aaaaaa', 'sanitize_method' => 'color', 'transport' => 'postMessage'), 'control' => array('render_type' => 'color', 'label' => __('selected links', 'fastfood'), 'description' => '')), 'fastfood_breadcrumb' => array('setting' => array('default' => 1, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('show breadcrumb navigation', 'fastfood'), 'description' => '')), 'fastfood_primary_menu' => array('setting' => array('default' => 1, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('show primary menu', 'fastfood'), 'description' => '')), 'fastfood_sticky_menu' => array('setting' => array('default' => 0, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('stick the menu on top when the user scrolls down the page', 'fastfood'), 'description' => '', 'require' => array('fastfood_options[fastfood_primary_menu]', 'fastfood_options[fastfood_jsani]'))), 'fastfood_manage_blank_title' => array('setting' => array('default' => 1, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('replace blank titles with a standard text', 'fastfood'), 'description' => '')), 'fastfood_blank_title' => array('setting' => array('default' => __('(no title)', 'fastfood'), 'sanitize_method' => 'text'), 'control' => array('type' => 'text', 'render_type' => 'text', 'label' => __('format', 'fastfood'), 'description' => __('you may use these codes:<br><code>%d</code> for post date<br><code>%f</code> for post format (if any)<br><code>%n</code> for post ID', 'fastfood'), 'require' => 'fastfood_options[fastfood_manage_blank_title]')), 'fastfood_featured_title' => array('setting' => array('default' => 0, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('show the thumbnail (if available) beside the posts title', 'fastfood'), 'description' => __('more info', 'fastfood') . ' : <a target="_blank" href="http://codex.wordpress.org/Post_Thumbnails">' . __('Post Thumbnails', 'fastfood') . '</a>')), 'fastfood_featured_title_size' => array('setting' => array('default' => 50, 'sanitize_method' => 'number', 'transport' => 'postMessage'), 'control' => array('render_type' => 'slider', 'label' => __('thumbnail size', 'fastfood') . ' (px)', 'description' => '[50-150]', 'input_attrs' => array('min' => 50, 'max' => 150, 'step' => 1), 'require' => 'fastfood_options[fastfood_featured_title]')), 'fastfood_hide_frontpage_title' => array('setting' => array('default' => 1, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('in front page (if a static page is selected)', 'fastfood'), 'description' => '')), 'fastfood_hide_pages_title' => array('setting' => array('default' => 0, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('in every single page', 'fastfood'), 'description' => '')), 'fastfood_hide_posts_title' => array('setting' => array('default' => 0, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('in every single post', 'fastfood'), 'description' => '')), 'fastfood_hide_selected_entries_title' => array('setting' => array('default' => '', 'sanitize_method' => 'text'), 'control' => array('type' => 'text', 'render_type' => 'text', 'label' => __('in selected posts/pages', 'fastfood'), 'description' => __('comma-separated list of IDs ( eg. <em>23,86,120</em> )', 'fastfood'))), 'fastfood_excerpt_lenght' => array('setting' => array('default' => 55, 'sanitize_method' => 'number'), 'control' => array('type' => 'number', 'render_type' => 'number', 'label' => __('excerpt length', 'fastfood'), 'description' => '')), 'fastfood_excerpt_more_txt' => array('setting' => array('default' => '[...]', 'sanitize_method' => 'text'), 'control' => array('type' => 'text', 'render_type' => 'text', 'label' => __('"excerpt more" string', 'fastfood'), 'description' => '')), 'fastfood_excerpt_more_link' => array('setting' => array('default' => 0, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('use the "excerpt more" string as a link to the full post', 'fastfood'), 'description' => '')), 'fastfood_more_tag' => array('setting' => array('default' => __('(more...)', 'fastfood'), 'sanitize_method' => 'text'), 'control' => array('type' => 'text', 'render_type' => 'text', 'label' => __('text', 'fastfood'), 'description' => __('only plain text. use <code>%t</code> as placeholder for the post title', 'fastfood') . ' (<a href="http://codex.wordpress.org/Customizing_the_Read_More" target="_blank">Codex</a>)')), 'fastfood_more_tag_scroll' => array('setting' => array('default' => 0, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('prevent scroll when clicking the "More" tag', 'fastfood'), 'description' => '')), 'fastfood_more_tag_always' => array('setting' => array('default' => 0, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('show a link to the page/post even if the "More" tag is not present', 'fastfood'), 'description' => '')), 'fastfood_editor_style' => array('setting' => array('default' => 1, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('editor style', 'fastfood'), 'description' => __('add style to the editor in order to write the post exactly how it will appear in the site', 'fastfood'))), 'fastfood_mobile_css' => array('setting' => array('default' => 1, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('use a dedicated style in mobile devices', 'fastfood'), 'description' => '')), 'fastfood_mobile_css_color' => array('setting' => array('default' => 'light', 'sanitize_method' => 'radio'), 'control' => array('type' => 'radio', 'render_type' => 'smart_radio', 'label' => __('colors', 'fastfood'), 'description' => '', 'choices' => array('light' => '<span class="theme-option-sprite-image"></span>' . __('light', 'fastfood'), 'dark' => '<span class="theme-option-sprite-image"></span>' . __('dark', 'fastfood')), 'require' => 'fastfood_options[fastfood_mobile_css]')), 'fastfood_body_width' => array('setting' => array('default' => 852, 'sanitize_method' => 'number', 'transport' => 'postMessage'), 'control' => array('render_type' => 'slider', 'label' => __('width', 'fastfood') . ' (px)', 'description' => '[640-1024]', 'input_attrs' => array('min' => 640, 'max' => 1024, 'step' => 1))), 'fastfood_head_h' => array('setting' => array('default' => 120, 'sanitize_method' => 'number', 'transport' => 'postMessage'), 'control' => array('render_type' => 'slider', 'label' => __('header height', 'fastfood'), 'description' => '[100-480]', 'input_attrs' => array('min' => 100, 'max' => 480, 'step' => 1))), 'fastfood_font_family' => array('setting' => array('default' => 'Verdana, Geneva, sans-serif', 'sanitize_method' => 'select', 'transport' => 'postMessage'), 'control' => array('type' => 'select', 'render_type' => 'select', 'label' => __('font family', 'fastfood'), 'description' => '', 'choices' => array('Arial, sans-serif' => 'Arial, sans-serif', 'Comic Sans MS, cursive' => 'Comic Sans MS, cursive', 'Courier New, monospace' => 'Courier New, monospace', 'Georgia, serif' => 'Georgia, serif', 'Helvetica, sans-serif' => 'Helvetica, sans-serif', 'Lucida Console, Monaco, monospace' => 'Lucida Console, Monaco, monospace', 'Lucida Sans Unicode, Lucida Grande, sans-serif' => 'Lucida Sans Unicode, Lucida Grande, sans-serif', 'monospace' => 'monospace', 'Palatino Linotype, Book Antiqua, Palatino, serif' => 'Palatino Linotype, Book Antiqua, Palatino, serif', 'Tahoma, Geneva, sans-serif' => 'Tahoma, Geneva, sans-serif', 'Times New Roman, Times, serif' => 'Times New Roman, Times, serif', 'Trebuchet MS, sans-serif' => 'Trebuchet MS, sans-serif', 'Verdana, Geneva, sans-serif' => 'Verdana, Geneva, sans-serif'))), 'fastfood_font_size' => array('setting' => array('default' => 12, 'sanitize_method' => 'number', 'transport' => 'postMessage'), 'control' => array('render_type' => 'slider', 'label' => __('font size', 'fastfood') . ' (px)', 'description' => '[9-16]', 'input_attrs' => array('min' => 9, 'max' => 16, 'step' => 1))), 'fastfood_google_font_family' => array('setting' => array('default' => '', 'sanitize_method' => 'text'), 'control' => array('type' => 'text', 'render_type' => 'text', 'label' => __('font name', 'fastfood'), 'description' => sprintf(__('Copy and paste here the name of a font from the %1$s library . Example: %2$s', 'fastfood'), '<a href="http://www.google.com/fonts" target="_blank"><strong>Google web font</strong></a>', '<code>Droid Sans</code>'))), 'fastfood_google_font_subset' => array('setting' => array('default' => '', 'sanitize_method' => 'text'), 'control' => array('type' => 'text', 'render_type' => 'text', 'label' => __('subset', 'fastfood'), 'description' => __('comma-separated list of subsets ( eg. "latin,latin-ext,cyrillic" )', 'fastfood'), 'require' => 'fastfood_options[fastfood_google_font_family]')), 'fastfood_google_font_body' => array('setting' => array('default' => 0, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('for whole site', 'fastfood'), 'description' => '', 'require' => 'fastfood_options[fastfood_google_font_family]')), 'fastfood_google_font_post_title' => array('setting' => array('default' => 1, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('for posts/pages title', 'fastfood'), 'description' => '', 'require' => 'fastfood_options[fastfood_google_font_family]')), 'fastfood_google_font_post_content' => array('setting' => array('default' => 0, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('for posts/pages content', 'fastfood'), 'description' => '', 'require' => 'fastfood_options[fastfood_google_font_family]')), 'fastfood_navbuttons' => array('setting' => array('default' => 1, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('show navigation buttons', 'fastfood'), 'description' => __('the fixed navigation bar on the right. Note: Is strongly recommended to keep it enabled', 'fastfood'))), 'fastfood_navbuttons_print' => array('setting' => array('default' => 1, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('print preview', 'fastfood'), 'description' => '', 'require' => 'fastfood_options[fastfood_navbuttons]')), 'fastfood_navbuttons_comment' => array('setting' => array('default' => 1, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('leave a comment', 'fastfood'), 'description' => '', 'require' => 'fastfood_options[fastfood_navbuttons]')), 'fastfood_navbuttons_feed' => array('setting' => array('default' => 1, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('RSS feed', 'fastfood'), 'description' => '', 'require' => 'fastfood_options[fastfood_navbuttons]')), 'fastfood_navbuttons_trackback' => array('setting' => array('default' => 1, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('trackback', 'fastfood'), 'description' => '', 'require' => 'fastfood_options[fastfood_navbuttons]')), 'fastfood_navbuttons_home' => array('setting' => array('default' => 1, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('home', 'fastfood'), 'description' => '', 'require' => 'fastfood_options[fastfood_navbuttons]')), 'fastfood_navbuttons_nextprev' => array('setting' => array('default' => 1, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('next/previous post', 'fastfood'), 'description' => '', 'require' => 'fastfood_options[fastfood_navbuttons]')), 'fastfood_navbuttons_newold' => array('setting' => array('default' => 1, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('newer/older posts', 'fastfood'), 'description' => '', 'require' => 'fastfood_options[fastfood_navbuttons]')), 'fastfood_navbuttons_topbottom' => array('setting' => array('default' => 1, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('top/bottom', 'fastfood'), 'description' => '', 'require' => 'fastfood_options[fastfood_navbuttons]')), 'fastfood_statusbar' => array('setting' => array('default' => 1, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('show status bar', 'fastfood'), 'description' => __('the fixed bar on bottom of page', 'fastfood'))), 'fastfood_custom_widgets' => array('setting' => array('default' => 1, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('custom widgets', 'fastfood'), 'description' => __('add a lot of new usefull widgets', 'fastfood'))), 'fastfood_responsive_layout' => array('setting' => array('default' => 1, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('the theme fits to small screens (less than 1024px wide)', 'fastfood'), 'description' => '')), 'fastfood_allowed_tags' => array('setting' => array('default' => 1, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('show the allowed tags list', 'fastfood'), 'description' => '')), 'fastfood_custom_css' => array('setting' => array('default' => '', 'sanitize_method' => 'textarea'), 'control' => array('type' => 'textarea', 'render_type' => 'textarea', 'label' => '', 'description' => __('<strong>For advanced users only</strong>: paste here your custom css code. it will be added after the defatult style', 'fastfood') . ' (<a href="' . get_stylesheet_uri() . '" target="_blank">style.css</a>)')), 'fastfood_tbcred' => array('setting' => array('default' => 1, 'sanitize_method' => 'checkbox'), 'control' => array('type' => 'checkbox', 'render_type' => 'checkbox', 'label' => __('theme credits', 'fastfood'), 'description' => __('It is completely optional, but if you like the Theme we would appreciate it if you keep the credit link at the bottom', 'fastfood'))), 'version' => array('setting' => array('default' => fastfood_get_info('version'), 'sanitize_method' => 'text'), 'control' => array('type' => 'hidden', 'render_type' => 'hidden', 'label' => '', 'description' => '', 'active_callback' => '__return_false')))); self::$_hierarchy = apply_filters('fastfood_options_hierarchy', array('group' => array('style' => array('label' => __('Style', 'fastfood'), 'description' => '', 'sections' => array('colors', 'fonts', 'other_a')), 'layout' => array('label' => __('Layout', 'fastfood'), 'description' => '', 'sections' => array('elements', 'mobile')), 'contents' => array('label' => __('Contents', 'fastfood'), 'description' => '', 'sections' => array('post_formats', 'titles', 'other_b')), 'features' => array('label' => __('Features', 'fastfood'), 'description' => '', 'sections' => array('javascript', 'other_c'))), 'section' => array('colors' => array('label' => __('Colors', 'fastfood'), 'description' => '', 'fields' => array('links_colors')), 'fonts' => array('label' => __('Fonts', 'fastfood'), 'description' => '', 'fields' => array('basic_font', 'google_font')), 'other_a' => array('label' => __('Other', 'fastfood'), 'description' => '', 'fields' => array('custom_css')), 'elements' => array('label' => __('Elements', 'fastfood'), 'description' => '', 'fields' => array('body', 'header', 'primary_menu', 'breadcrumb', 'sidebar', 'quickbar', 'navbuttons', 'statusbar', 'comment_form')), 'mobile' => array('label' => __('Mobile', 'fastfood'), 'description' => '', 'fields' => array('responsive_layout', 'mobile_theme')), 'post_formats' => array('label' => __('Post formats', 'fastfood') . ' <a class="more-info-link" href="http://codex.wordpress.org/Post_Formats" target="_blank" title="' . esc_attr__('learn more about the post formats', 'fastfood') . '">?</a>', 'description' => __('the following options affect only the blog/index view, while in single posts the appearance will be the same', 'fastfood'), 'fields' => array('post_formats_standard', 'post_formats_aside', 'post_formats_gallery', 'post_formats_quote', 'post_formats_status')), 'titles' => array('label' => __('Titles', 'fastfood'), 'description' => '', 'fields' => array('blank_titles', 'hide_titles', 'featured_titles')), 'other_b' => array('label' => __('Other', 'fastfood'), 'description' => '', 'fields' => array('extra_info', 'excerpt', 'the_more_tag')), 'javascript' => array('label' => __('Javascript', 'fastfood'), 'description' => '', 'fields' => array('js_animations', 'basic_animations', 'advanced_js_features', 'thickbox')), 'other_c' => array('label' => __('Other', 'fastfood'), 'description' => '', 'fields' => array('hotchpotch'))), 'field' => array('links_colors' => array('label' => __('Links colors', 'fastfood'), 'description' => '', 'options' => array('fastfood_colors_link', 'fastfood_colors_link_hover', 'fastfood_colors_link_sel'), 'require' => ''), 'basic_font' => array('label' => __('Basic font', 'fastfood'), 'description' => '', 'options' => array('fastfood_font_family', 'fastfood_font_size'), 'require' => ''), 'google_font' => array('label' => __('Google web font', 'fastfood'), 'description' => '', 'options' => array('fastfood_google_font_family', 'fastfood_google_font_subset', '', 'fastfood_google_font_body', 'fastfood_google_font_post_title', 'fastfood_google_font_post_content'), 'require' => ''), 'custom_css' => array('label' => __('Custom CSS', 'fastfood'), 'description' => '', 'options' => array('fastfood_custom_css'), 'require' => ''), 'body' => array('label' => __('Body', 'fastfood'), 'description' => '', 'options' => array('fastfood_body_width'), 'require' => ''), 'header' => array('label' => __('Site header', 'fastfood'), 'description' => '', 'options' => array('fastfood_head_h'), 'require' => ''), 'primary_menu' => array('label' => __('Primary menu', 'fastfood'), 'description' => '', 'options' => array('fastfood_primary_menu', '', 'fastfood_sticky_menu'), 'require' => ''), 'breadcrumb' => array('label' => __('Breadcrumb', 'fastfood'), 'description' => '', 'options' => array('fastfood_breadcrumb'), 'require' => ''), 'sidebar' => array('label' => __('Sidebar', 'fastfood'), 'description' => '', 'options' => array('fastfood_rsideb_position', '', 'fastfood_rsideb_width', '', 'fastfood_rsidebindexes', 'fastfood_rsidebpages', 'fastfood_rsidebposts', 'fastfood_rsidebattachments'), 'require' => ''), 'quickbar' => array('label' => __('Quickbar', 'fastfood'), 'description' => '', 'options' => array('fastfood_qbar', '', 'fastfood_qbar_recpost', 'fastfood_qbar_recpost_length', 'fastfood_qbar_cat', 'fastfood_qbar_cat_length', 'fastfood_qbar_reccom', 'fastfood_qbar_reccom_length', 'fastfood_qbar_user', '', 'fastfood_qbar_minilogin'), 'require' => ''), 'navbuttons' => array('label' => __('Navigation buttons', 'fastfood'), 'description' => '', 'options' => array('fastfood_navbuttons', '', 'fastfood_navbuttons_print', 'fastfood_navbuttons_comment', 'fastfood_navbuttons_feed', 'fastfood_navbuttons_trackback', 'fastfood_navbuttons_home', 'fastfood_navbuttons_nextprev', 'fastfood_navbuttons_newold', 'fastfood_navbuttons_topbottom'), 'require' => ''), 'statusbar' => array('label' => __('Status bar', 'fastfood'), 'description' => '', 'options' => array('fastfood_statusbar'), 'require' => ''), 'comment_form' => array('label' => __('Comment form', 'fastfood'), 'description' => '', 'options' => array('fastfood_cust_comrep', 'fastfood_allowed_tags'), 'require' => ''), 'responsive_layout' => array('label' => __('Responsive layout', 'fastfood'), 'description' => '', 'options' => array('fastfood_responsive_layout'), 'require' => ''), 'mobile_theme' => array('label' => __('Mobile theme', 'fastfood'), 'description' => '', 'options' => array('fastfood_mobile_css', 'fastfood_mobile_css_color'), 'require' => ''), 'post_formats_standard' => array('label' => sprintf(__('"%s" Format', 'fastfood'), get_post_format_string('standard')), 'description' => '', 'options' => array('fastfood_post_formats_standard_title', 'fastfood_postexcerpt'), 'require' => ''), 'post_formats_aside' => array('label' => sprintf(__('"%s" Format', 'fastfood'), get_post_format_string('aside')), 'description' => '', 'options' => array('fastfood_post_formats_aside', '', 'fastfood_post_view_aside'), 'require' => ''), 'post_formats_gallery' => array('label' => sprintf(__('"%s" Format', 'fastfood'), get_post_format_string('gallery')), 'description' => '', 'options' => array('fastfood_post_formats_gallery', '', 'fastfood_post_formats_gallery_title', 'fastfood_post_formats_gallery_content', 'fastfood_post_formats_gallery_preview_items'), 'require' => ''), 'post_formats_quote' => array('label' => sprintf(__('"%s" Format', 'fastfood'), get_post_format_string('quote')), 'description' => '', 'options' => array('fastfood_post_formats_quote'), 'require' => ''), 'post_formats_status' => array('label' => sprintf(__('"%s" Format', 'fastfood'), get_post_format_string('status')), 'description' => '', 'options' => array('fastfood_post_formats_status', '', 'fastfood_post_view_status'), 'require' => ''), 'blank_titles' => array('label' => __('Blank titles', 'fastfood'), 'description' => '', 'options' => array('fastfood_manage_blank_title', '', 'fastfood_blank_title'), 'require' => ''), 'hide_titles' => array('label' => __('Hide titles', 'fastfood'), 'description' => '', 'options' => array('fastfood_hide_frontpage_title', 'fastfood_hide_pages_title', 'fastfood_hide_posts_title', 'fastfood_hide_selected_entries_title'), 'require' => ''), 'featured_titles' => array('label' => __('Thumbnails', 'fastfood'), 'description' => '', 'options' => array('fastfood_featured_title', 'fastfood_featured_title_size'), 'require' => ''), 'extra_info' => array('label' => __('Post/Page details', 'fastfood'), 'description' => '', 'options' => array('fastfood_xinfos_global', '', 'fastfood_xinfos_byauth', 'fastfood_xinfos_date', 'fastfood_xinfos_comm', 'fastfood_xinfos_tag', 'fastfood_xinfos_cat', 'fastfood_xinfos_hiera', '', 'fastfood_xinfos_on_list', 'fastfood_xinfos_on_page', 'fastfood_xinfos_on_post', 'fastfood_xinfos_on_front', '', 'fastfood_xinfos_static'), 'require' => ''), 'excerpt' => array('label' => __('Content summary', 'fastfood'), 'description' => '', 'options' => array('fastfood_excerpt_lenght', 'fastfood_excerpt_more_txt', 'fastfood_excerpt_more_link'), 'require' => ''), 'the_more_tag' => array('label' => __('The "More" tag', 'fastfood'), 'description' => __('more info', 'fastfood') . ' : <a target="_blank" href="http://support.wordpress.com/splitting-content/more-tag/">' . __('The "More" tag', 'fastfood') . '</a>', 'options' => array('fastfood_more_tag', 'fastfood_more_tag_scroll', 'fastfood_more_tag_always'), 'require' => ''), 'js_animations' => array('label' => __('Javascript support', 'fastfood'), 'description' => '', 'options' => array('fastfood_jsani'), 'require' => ''), 'basic_animations' => array('label' => __('Basic animations', 'fastfood'), 'description' => '', 'options' => array('fastfood_basic_animation_main_menu', 'fastfood_basic_animation_navigation_buttons', 'fastfood_basic_animation_quickbar_panels', 'fastfood_basic_animation_entry_meta', 'fastfood_basic_animation_smooth_scroll', 'fastfood_basic_animation_captions'), 'require' => 'fastfood_options[fastfood_jsani]'), 'advanced_js_features' => array('label' => __('Advanced features', 'fastfood'), 'description' => '', 'options' => array('fastfood_post_expand', 'fastfood_comments_navigation', 'fastfood_quotethis', 'fastfood_tinynav'), 'require' => 'fastfood_options[fastfood_jsani]'), 'thickbox' => array('label' => __('Thickbox', 'fastfood'), 'description' => '', 'options' => array('fastfood_gallery_preview', 'fastfood_force_link_to_image'), 'require' => 'fastfood_options[fastfood_jsani]'), 'hotchpotch' => array('label' => __('Hotchpotch', 'fastfood'), 'description' => __('other mixed options', 'fastfood'), 'options' => array('fastfood_editor_style', 'fastfood_custom_widgets', 'fastfood_tbcred', 'version'), 'require' => '')))); }
function show_title($title) { if (FastfoodOptions::get_opt('fastfood_hide_buddypress_title')) { $title = ''; } return $title; }
/** * Register all of the default WordPress widgets on startup. */ function fastfood_widgets_init() { if (!is_blog_installed()) { return; } if (!FastfoodOptions::get_opt('fastfood_custom_widgets')) { return; } register_widget('Fastfood_Widget_Popular_Posts'); register_widget('Fastfood_Widget_Latest_Commented_Posts'); register_widget('Fastfood_Widget_Latest_Commentators'); register_widget('Fastfood_Widget_Pop_Categories'); register_widget('Fastfood_Widget_Social'); register_widget('Fastfood_Widget_Besides'); register_widget('Fastfood_Widget_Recent_Posts'); register_widget('Fastfood_Widget_Image_Exif'); register_widget('Fastfood_Widget_Clean_Archives'); register_widget('Fastfood_Widget_Post_Details'); register_widget('Fastfood_Widget_Font_Resize'); unregister_widget('WP_Nav_Menu_Widget'); register_widget('Fastfood_Widget_Nav_Menu'); }
/** * Checks the requirements of a control and returns its visibility accordingly * * @since Fastfood 0.37 * * @param WP_Customize_Control $wp_control WP_Customize_Control instance. */ function control_visibility($wp_control) { preg_match_all('/fastfood_options\\[(.+)\\]/', $wp_control->id, $keys); if (!isset($keys[1][0])) { $option = isset($this->theme_mods[$wp_control->id]) ? $this->theme_mods[$wp_control->id] : false; } else { $option = isset($this->theme_options[$keys[1][0]]) ? $this->theme_options[$keys[1][0]] : false; } if (!$option || !isset($option['control']['require']) || !$option['control']['require']) { return true; } foreach ((array) $option['control']['require'] as $option) { preg_match_all('/fastfood_options\\[(.+)\\]/', $option, $o_keys); if (isset($o_keys[1][0]) && !FastfoodOptions::get_opt($o_keys[1][0])) { return false; } elseif (!isset($o_keys[1][0]) && !get_theme_mod($option)) { return false; } } return true; }
fastfood_featured_title(array('alternative' => get_the_time(get_option('date_format')), 'fallback' => sprintf(__('gallery #%s', 'fastfood'), get_the_ID()))); break; } ?> <?php fastfood_extrainfo(); ?> <?php fastfood_hook_post_content_before(); ?> <div class="entry-content"> <?php switch (FastfoodOptions::get_opt('fastfood_post_formats_gallery_content')) { case 'presentation': fastfood_gallery_preview(); break; case 'content': the_content(); break; case 'excerpt': the_excerpt(); break; } ?> </div> <?php fastfood_hook_post_content_after();
function get_option($option) { return FastfoodOptions::get_opt($option); }
fastfood_featured_title(array('alternative' => get_the_time(get_option('date_format')), 'fallback' => sprintf(__('post #%s', 'fastfood'), get_the_ID()))); break; } ?> <?php fastfood_extrainfo(); ?> <?php fastfood_hook_post_content_before(); ?> <div class="entry-content"> <?php switch (FastfoodOptions::get_opt('fastfood_postexcerpt')) { case 0: //the content the_content(); break; case 1: //the excerpt the_excerpt(); break; } ?> </div> <?php fastfood_hook_post_content_after(); ?>
/** * Add attachment description. (required for the Thickbox feature) * * @see wp_get_attachment_link() */ function fastfood_get_attachment_link($markup = '', $id = 0, $size = 'thumbnail', $permalink = false, $icon = false, $text = false) { if (!FastfoodOptions::get_opt('fastfood_jsani') || !FastfoodOptions::get_opt('fastfood_gallery_preview')) { return $markup; } $id = intval($id); $_post = get_post($id); if (empty($_post) || 'attachment' != $_post->post_type || !($url = wp_get_attachment_url($_post->ID))) { return __('Missing Attachment', 'fastfood'); } if ($permalink) { $url = get_attachment_link($_post->ID); } $post_title = esc_attr($_post->post_excerpt ? $_post->post_excerpt : $_post->post_title); if ($text) { $link_text = $text; } elseif ($size && 'none' != $size) { $link_text = wp_get_attachment_image($id, $size, $icon); } else { $link_text = ''; } if (trim($link_text) == '') { $link_text = $_post->post_title; } return "<a href='{$url}' title='{$post_title}'>{$link_text}</a>"; }
/** * Enqueues front-end custom CSS. * * @since Fastfood 0.37 * * @see wp_add_inline_style() */ function fastfood_custom_css() { $attributes['fastfood_custom_css'] = wp_strip_all_tags(FastfoodOptions::get_opt('fastfood_custom_css')); $attributes['fastfood_allowed_tags'] = FastfoodOptions::get_opt('fastfood_allowed_tags') ? 'block' : 'none'; $css = <<<CSS \t/* custom CSS */ \t.form-allowed-tags { \t\tdisplay: {$attributes['fastfood_allowed_tags']}; \t} \t{$attributes['fastfood_custom_css']} CSS; wp_add_inline_style('fastfood', $css); }
function header_style_front() { if (fastfood_is_mobile()) { return; } if ('blank' == get_header_textcolor()) { $style = 'display: none;'; } else { $style = 'color: #' . get_header_textcolor() . ';'; } $header_text_background = ltrim(get_theme_mod('header_text_background', 'transparent'), '#'); $header_text_background_rgba = $header_text_background; $filter = ''; if ($header_text_background_rgba && 'transparent' != $header_text_background_rgba) { $header_text_background_rgba = fastfood_hex2rgb($header_text_background_rgba); $header_text_background_rgba = vsprintf('rgba( %1$s, %2$s, %3$s, 0.7)', $header_text_background_rgba); $filter = "filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#b3{$header_text_background}', endColorstr='#b3{$header_text_background}',GradientType=0 ); /* IE6-9 */"; } ?> <style type="text/css"> #site-heading a, #site-heading { <?php echo $style; ?> } #site-image { max-height: <?php echo absint(FastfoodOptions::get_opt('fastfood_head_h')); ?> px; } .has-header-image #site-heading { background-color: <?php echo $header_text_background_rgba; ?> ; <?php echo $filter; ?> } </style> <?php }
/** * Add data to localized js variable * * @since Fastfood 0.37 */ function localize_script($data) { //$data['script_modules'][] = 'boobs'; $data['script_modules'][] = 'featured_slideshow'; $data['featuredSlideshowSpeed'] = absint(FastfoodOptions::get_opt('fastfood_featured_content_speed')); $data['featuredSlideshowPause'] = absint(FastfoodOptions::get_opt('fastfood_featured_content_speed')) + absint(FastfoodOptions::get_opt('fastfood_featured_content_pause')); return $data; }
/** * Display a small login module * * @since Fastfood 0.37 */ function mini_login() { if (!FastfoodOptions::get_opt('fastfood_qbar_minilogin') || class_exists("siCaptcha")) { return; } $args = array('redirect' => home_url()); ?> <div id="minilogin" class="quickbar-panel-subcontent"> <div class="quickbar-panel-title"><?php _e('Log in', 'fastfood'); ?> </div> <div class="preview"> <?php wp_login_form($args); ?> </div> </div> <?php }