function do_background_image()
 {
     global $pagelines_ID;
     if (is_archive() || is_home()) {
         $pagelines_ID = null;
     }
     $oset = array('post_id' => $pagelines_ID);
     $oid = 'page_background_image';
     $sel = cssgroup('page_background_image');
     if (!ploption('supersize_bg', $oset) && ploption($oid . '_url', $oset)) {
         $bg_repeat = ploption($oid . '_repeat', $oset) ? ploption($oid . '_repeat', $oset) : 'no-repeat';
         $bg_attach = ploption($oid . '_attach', $oset) ? ploption($oid . '_attach', $oset) : 'scroll';
         $bg_pos_vert = ploption($oid . '_pos_vert', $oset) || ploption($oid . '_pos_vert', $oset) == 0 ? (int) ploption($oid . '_pos_vert', $oset) : '0';
         $bg_pos_hor = ploption($oid . '_pos_hor', $oset) || ploption($oid . '_pos_hor', $oset) == 0 ? (int) ploption($oid . '_pos_hor', $oset) : '50';
         $bg_selector = ploption($oid . '_selector', $oset) ? ploption($oid . '_selector', $oset) : $sel;
         $bg_url = ploption($oid . '_url', $oset);
         $css = sprintf('%s{ background-image:url(%s);', $bg_selector, $bg_url);
         $css .= sprintf('background-repeat: %s;', $bg_repeat);
         $css .= sprintf('background-attachment: %s;', $bg_attach);
         $css .= sprintf('background-position: %s%% %s%%;}', $bg_pos_hor, $bg_pos_vert);
         echo inline_css_markup('pagelines-page-bg', $css);
     }
 }
Example #2
0
 /**
  *
  * @TODO document
  *
  */
 function parse_css_factory()
 {
     global $css_factory;
     $output = '';
     foreach ($css_factory as $cssgroup => $props) {
         $selectors = cssgroup($cssgroup);
         if ($selectors != '') {
             $output .= sprintf('%s{%s}', $selectors, $props);
         }
     }
     return $output;
 }
/**
*
* @TODO do
*
*/
function get_global_meta_options()
{
    $opts = array('_pagelines_layout_mode' => array('type' => 'graphic_selector', 'sprite' => PL_ADMIN_IMAGES . '/sprite-layouts.png', 'height' => '50px', 'width' => '50px', 'selectvalues' => array('fullwidth' => array('name' => __('Fullwidth layout', 'pagelines'), 'version' => 'pro', 'offset' => '0px 0px'), 'one-sidebar-right' => array('name' => __('One sidebar on right', 'pagelines'), 'offset' => '0px -50px'), 'one-sidebar-left' => array('name' => __('One sidebar on left', 'pagelines'), 'offset' => '0px -100px'), 'two-sidebar-right' => array('name' => __('Two sidebars on right', 'pagelines'), 'version' => 'pro', 'offset' => '0px -150px'), 'two-sidebar-left' => array('name' => __('Two sidebars on left', 'pagelines'), 'version' => 'pro', 'offset' => '0px -200px'), 'two-sidebar-center' => array('name' => __('Two sidebars, one on each side', 'pagelines'), 'version' => 'pro', 'offset' => '0px -250px')), 'title' => __('Individual Page Content Layout', 'pagelines'), 'inputlabel' => __('Select Page Layout', 'pagelines'), 'layout' => 'interface', 'shortexp' => __('Select the layout that will be used on this page', 'pagelines'), 'exp' => ''), 'section_control' => array('type' => 'section_control', 'title' => __('Individual Page Section Control', 'pagelines'), 'layout' => 'interface', 'shortexp' => __('Control which sections appear on this specific page', 'pagelines'), 'exp' => ''), 'page_background_image' => array('title' => 'Page Background Image', 'shortexp' => 'Setup A Background Image For This Page', 'exp' => 'Use this option to apply a background image to this page. This option will only be applied to the current page.<br/><br/><strong>Positioning</strong> Use percentages to position the images, 0% corresponds to the "top" or "left" side, 50% to center, etc..', 'type' => 'background_image', 'selectors' => cssgroup('page_background_image'), 'disabled_mode' => 'color_control'), 'disable_mobile_view' => array('default' => false, 'type' => 'check', 'title' => __('Disable Mobile Optimized View', 'pagelines'), 'inputlabel' => __('Disable Mobile View', 'pagelines'), 'shortexp' => __('Make it so mobile devices will see the full site, not the mobile optimized one.', 'pagelines'), 'exp' => __('By default PageLines accommodates mobile devices resolution and shows a mobile optimized view. Check this option to make it so users see your full site.', 'pagelines')));
    return apply_filters('global_meta_options', $opts);
}
 /**
  * Typography Options
  *
  * @since 2.0.0
  */
 function typography()
 {
     $a = array('icon' => PL_ADMIN_ICONS . '/typography.png', 'type_headers' => array('default' => array('font' => 'helvetica', 'weight' => 'bold'), 'type' => 'typography', 'layout' => 'full', 'selectors' => cssgroup('type_headers'), 'inputlabel' => 'Select Font', 'title' => __('Typography - Text Headers', 'pagelines'), 'shortexp' => __("Select and style your site's header tags (H1, H2, H3...)", 'pagelines'), 'exp' => __("Set typography for your h1, h2, etc.. tags. <br/><br/><strong>*</strong> Denotes Web Safe Fonts<br/><strong>G</strong> Denotes Google Fonts<br/><br/><strong>Note:</strong> These options make use of the <a href='http://code.google.com/webfonts' target='_blank'>Google fonts API</a> to vastly increase the number of websafe fonts you can use.", 'pagelines'), 'pro_note' => __('The Pro version of this framework has over 50 websafe and Google fonts.', 'pagelines')), 'type_primary' => array('default' => array('font' => 'helvetica'), 'type' => 'typography', 'layout' => 'full', 'selectors' => cssgroup('type_primary'), 'inputlabel' => __('Select Font', 'pagelines'), 'title' => __('Typography - Primary Font', 'pagelines'), 'shortexp' => __('Select and style the standard type used in your site (body)', 'pagelines'), 'exp' => __("Set typography for your primary site text. This is assigned to your site's body tag. <br/><br/> <strong>*</strong> Denotes Web Safe Fonts<br/><strong>G</strong> Denotes Google Fonts", 'pagelines'), 'pro_note' => __('The Pro version of this framework has over 50 websafe and Google fonts.', 'pagelines')), 'type_secondary' => array('default' => array('font' => 'helvetica'), 'type' => 'typography', 'layout' => 'full', 'selectors' => cssgroup('type_secondary'), 'inputlabel' => __('Select Font', 'pagelines'), 'title' => __('Typography - Secondary Font ', 'pagelines'), 'shortexp' => __("Select and style your site's secondary or sub title text (Metabar, Sub Titles, etc..)", 'pagelines'), 'exp' => __('This options sets the typography for secondary text used throughout your site. This includes your navigation, subtitles, widget titles, etc.. <br/><br/> <strong>*</strong> Denotes Web Safe Fonts<br/><strong>G</strong> Denotes Google Fonts', 'pagelines'), 'pro_note' => __('The Pro version of this framework has over 50 websafe and Google fonts.', 'pagelines')), 'type_inputs' => array('version' => 'pro', 'default' => array('font' => 'helvetica'), 'type' => 'typography', 'layout' => 'full', 'selectors' => cssgroup('type_inputs'), 'inputlabel' => __('Select Font', 'pagelines'), 'title' => __('Typography - Inputs and Textareas', 'pagelines'), 'shortexp' => __("Select and Style Your Site's Text Inputs and Textareas", 'pagelines'), 'exp' => __("This options sets the typography for general text inputs and textarea inputs. This includes default WordPress comment fields, etc.. <br/><br/> This option makes use of the <a href='http://code.google.com/webfonts'>Google fonts API</a> to vastly increase the number of websafe fonts you can use.<br/><strong>*</strong> Denotes web safe fonts<br/><strong>G</strong> Denotes Google fonts<br/><br/><strong>Note:</strong> the <strong>preview</strong> pane represents the font in your current browser and OS. If developing locally, Google fonts require an internet connection.", 'pagelines')), 'typekit_script' => array('default' => "", 'type' => 'textarea', 'inputlabel' => __('Typekit Header Script', 'pagelines'), 'title' => __('Typekit Font Replacement', 'pagelines'), 'shortexp' => __('Typekit is a service that allows you to use tons of new fonts on your site', 'pagelines'), 'exp' => __("Typekit is a new service and technique that allows you to use fonts outside of the 10 or so <strong>web-safe</strong> fonts. <br/><br/>Visit <a href='http://www.typekit.com' target='_blank'>Typekit.com</a> to get the script for this option. Instructions for setting up Typekit are <a href='http://typekit.assistly.com/portal/article/6780-Adding-fonts-to-your-site' target='_blank'>here</a>.", 'pagelines')), 'fontreplacement' => array('version' => 'pro', 'default' => false, 'type' => 'check', 'inputlabel' => __('Use Cufon font replacement?', 'pagelines'), 'title' => __('Use Cufon Font Replacement', 'pagelines'), 'shortexp' => __('Use a special font replacement technique for certain text', 'pagelines'), 'exp' => sprintf(__("Cufon is a special technique for allowing you to use fonts outside of the 10 or so <strong>web-safe</strong> fonts. <br/><br/>%s is equipped to use it.  Select this option to enable it. Visit the <a href='http://cufon.shoqolate.com/generate/'>Cufon site</a>.", 'pagelines'), PL_NICETHEMENAME)), 'font_file' => array('version' => 'pro', 'default' => '', 'type' => 'text', 'inputlabel' => __('Cufon replacement font file URL', 'pagelines'), 'title' => __('Cufon: Replacement Font File URL', 'pagelines'), 'shortexp' => __('The font file used to replace text', 'pagelines'), 'exp' => __("Use the <a href='http://cufon.shoqolate.com/generate/'>Cufon site</a> to generate a font file for use with this theme.  Place it in your theme folder and add the full URL to it here. The default font is Museo Sans.", 'pagelines')), 'replace_font' => array('version' => 'pro', 'default' => 'h1', 'type' => 'text', 'inputlabel' => __('CSS elements for font replacement', 'pagelines'), 'title' => __('Cufon: CSS elements for font replacement', 'pagelines'), 'shortexp' => __('Add selectors of elements you would like replaced', 'pagelines'), 'exp' => __('Use standard CSS selectors to replace them with your Cufon font. Font replacement must be enabled.', 'pagelines')));
     return apply_filters('pagelines_options_typography', $a);
 }