function pl_social_links_options() { $the_urls = array(); $icons = pl_social_icons(); foreach ($icons as $icon) { $the_urls[] = array('label' => ui_key($icon) . ' URL', 'key' => 'sl_' . $icon, 'type' => 'text', 'scope' => 'global'); } return $the_urls; }
function section_opts() { $the_urls = array(); $icons = array_merge(array('karma'), $this->the_icons()); foreach ($icons as $icon) { $the_urls[] = array('label' => ui_key($icon) . ' Disable?', 'key' => $this->id . '_disable_' . $icon, 'type' => 'check', 'scope' => 'global'); } $opts = array(array('type' => 'multi', 'key' => 'config', 'title' => __('Config', 'pagelines'), 'col' => 1, 'opts' => array(array('type' => 'text', 'key' => 'text', 'label' => __('Description Text', 'pagelines')), array('type' => 'select', 'key' => 'align', 'label' => __('Alignment', 'pagelines'), 'opts' => array('right' => array('name' => __('Social links on right', 'pagelines')), 'center' => array('name' => __('Social links in center', 'pagelines')), 'left' => array('name' => __('Social links on left', 'pagelines')))))), array('type' => 'multi', 'key' => 'sl_urls', 'title' => __('Share Button Disable', 'pagelines'), 'col' => 2, 'opts' => $the_urls)); return $opts; }
function section_opts() { $the_urls = array(); $icons = $this->the_icons(); foreach ($icons as $icon) { $the_urls[] = array('label' => ui_key($icon) . ' URL', 'key' => 'sl_' . $icon, 'type' => 'text', 'scope' => 'global'); } $opts = array(array('type' => 'multi', 'key' => 'sl_config', 'title' => 'Text', 'col' => 1, 'opts' => array(array('type' => 'text', 'key' => 'sl_text', 'label' => 'Socialinks Text (e.g. copyright information)'), array('type' => 'select', 'key' => 'sl_align', 'label' => 'Alignment', 'opts' => array('sl-links-right' => array('name' => 'Social links on right'), 'sl-links-left' => array('name' => 'Social links on left'))), array('type' => 'check', 'key' => 'sl_web_disable', 'label' => 'Disable "Built With" Icons (HTML5, CSS3, PageLines)', 'scope' => 'global'), array('key' => 'menu', 'type' => 'select_menu', 'label' => 'Select Menu'))), array('type' => 'multi', 'key' => 'sl_urls', 'title' => 'Link URLs', 'col' => 2, 'opts' => $the_urls)); return $opts; }
/** * * Horizontal Navigation Option w/ Callbacks * * @since 1.0.0 * @author Andrew Powers * */ function get_horizontal_nav($menu, $oids) { $handle = 'htabs' . $menu; ?> <script type="text/javascript"> jQuery(document).ready(function() { var <?php echo $handle; ?> = jQuery("#<?php echo $handle; ?> ").tabs({ cookie: { name: "<?php echo $menu; ?> -tabs" } }); }); </script> <div id="<?php echo $handle; ?> " class="htabs-menu" > <ul class="tabbed-list horizontal-tabs fix"> <?php foreach ($oids['htabs'] as $key => $t) { $class = isset($t['class']) ? $t['class'] : 'left'; printf('<li class="ht-%s"><a href="#%s" >%s</a></li>', $class, $key, ui_key($key)); } ?> </ul> <?php foreach ($oids['htabs'] as $key => $t) { $callback = isset($t['type']) && $t['type'] == 'subtabs' ? self::get_horizontal_subtabs($key, $t) : $t['callback']; printf('<div id="%s" class="htab-content"><div class="htab-content-pad"><h3 class="htab-title">%s</h3>%s</div></div>', $key, $t['title'], $callback); } ?> </div> <?php }
/** * * * Show Section Control Option in MetaPanel * * * @package PageLines Framework * @subpackage Options * @since 4.0 * */ function section_control_interface($oid, $o) { if (isset($_GET['page']) && $_GET['page'] == 'pagelines_meta') { return; } if (isset($o['special'])) { $this->template->adjust_template_type($o['special']); $is_special = true; } else { $is_special = false; } $integration = $o['scontrol'] == 'integration' ? true : false; $template_slug = join('-', array('templates', $this->template->template_type)); $main_slug = join('-', array('main', $this->template->template_type)); global $metapanel_options; $editing = $is_special ? ucfirst($o['special']) : $metapanel_options->edit_slug; ?> <div class="section_control_wrap"> <div class="sc_gap fix"> <div class="sc_gap_title"><?php echo ui_key($editing); ?> - <?php _e('Basic Template', 'pagelines'); ?> </div> <div class="sc_gap_pad"> <div class="sc_area sc_header ntb"> <div class="sc_area_pad fix"> <div class="scta_head"><?php _e('Header', 'pagelines'); ?> </div> <?php $this->sc_inputs('header', $this->template->header, $o); ?> </div> </div> <div class="sc_area sc_templates"> <div class="sc_area_pad fix"> <div class="scta_head"><?php _e('Template', 'pagelines'); ?> </div> <?php if ($integration) { printf('<div class="sc_inputs"><div class="emptyarea">%s %s</div></div>', ui_key($editing), __('Integration', 'pagelines')); } else { $this->sc_inputs($template_slug, $this->template->templates, $o); } ?> </div> </div> <div class="sc_area sc_morefoot"> <div class="sc_area_pad fix"> <div class="scta_head"><?php _e('Morefoot', 'pagelines'); ?> </div> <?php $this->sc_inputs('morefoot', $this->template->morefoot, $o); ?> </div> </div> <div class="sc_area sc_footer nbb"> <div class="sc_area_pad fix"> <div class="scta_head"><?php _e('Footer', 'pagelines'); ?> </div> <?php $this->sc_inputs('footer', $this->template->footer, $o); ?> </div> </div> </div> </div> <?php if (!$integration) { ?> <div class="sc_gap fix"> <div class="sc_gap_title"><?php echo ui_key($editing); ?> - <?php _e('Content Area', 'pagelines'); ?> </div> <div class="sc_gap_pad"> <div class="sc_area sc_header ntb"> <div class="sc_area_pad fix"> <div class="scta_head"><?php _e('Content', 'pagelines'); ?> </div> <?php $this->sc_inputs($main_slug, $this->template->main, $o); ?> </div> </div> <div class="sc_area sc_header"> <div class="sc_area_pad fix"> <div class="scta_head"><?php _e('Wrap', 'pagelines'); ?> </div> <?php $this->sc_inputs('sidebar_wrap', $this->template->sidebar_wrap, $o); ?> </div> </div> <div class="sc_area sc_header"> <div class="sc_area_pad fix"> <div class="scta_head"><?php _e('Sidebar 1', 'pagelines'); ?> </div> <?php $this->sc_inputs('sidebar1', $this->template->sidebar1, $o); ?> </div> </div> <div class="sc_area sc_header nbb"> <div class="sc_area_pad fix"> <div class="scta_head"><?php _e('Sidebar 2', 'pagelines'); ?> </div> <?php $this->sc_inputs('sidebar2', $this->template->sidebar2, $o); ?> </div> </div> </div> </div> <?php } ?> </div> <?php }
/** * Option Interface Body, including vertical tabbed nav * */ function build_body() { $option_engine = new OptEngine($this->set['settings']); global $pl_section_factory; $tabs = $this->set['tabs'] ? true : false; ?> <div id="tabs" class="<?php if (!$tabs) { echo 'no_tabs'; } ?> "> <?php if ($tabs) { ?> <ul id="tabsnav"> <li><span class="graphic top"> </span></li> <?php foreach ($this->option_array as $menu => $oids) { $pro_tab = !VPRO && isset($oids['version']) && $oids['version'] == 'pro' ? true : false; $bg = isset($oids['icon']) ? sprintf('style="background: transparent url(%s) no-repeat 0 0;"', $oids['icon']) : ''; $name = $pro_tab ? sprintf('%s <span class="sss-tag">(Pro)</span>', ui_key($menu)) : ui_key($menu); $special_class = $pro_tab ? 'pro_tab' : ''; printf('<li><a class="%1$s tabnav-element %4$s" href="#%1$s"><span class="icn" %3$s >%2$s</span></a></li>', $menu, $name, $bg, $special_class); } ?> <li><span class="graphic bottom"> </span></li> <li class="framework_loading"> <a href="http://www.pagelines.com/forum/discussion/6489" target="_blank" title="Javascript Issue Detector"> <span class="framework_loading_gif" > </span> </a> </li> <script type="text/javascript">/*<![CDATA[*/ jQuery(document).ready(function(){ jQuery('.framework_loading').hide(); }); /*]]>*/</script> </ul> <?php } ?> <div id="thetabs" class="plpanel <?php echo $this->set['settings']; ?> -panel fix"> <?php if (!VPRO) { $this->get_pro_call(); } foreach ($this->option_array as $menu => $oids) { $pro_tab = !VPRO && isset($oids['version']) && $oids['version'] == 'pro' ? true : false; $bg = isset($oids['icon']) ? sprintf('style="background: transparent url(%s) no-repeat 10px 16px;"', $oids['icon']) : ''; $is_htabs = isset($oids['htabs']) ? true : false; // The tab container start.... printf('<div id="%s" class="tabinfo %s">', $menu, $is_htabs ? 'htabs-interface' : ''); // Draw Menu Title w/ Icon if (stripos($menu, '_') !== 0) { printf('<div class="tabtitle" %s><div class="tabtitle-pad">%s</div></div>', $bg, ui_key($menu)); } // Render Options if (isset($oids['htabs'])) { OptEngine::get_horizontal_nav($menu, $oids); } elseif ($pro_tab) { echo $this->show_banner(sprintf('The pro or dev version is needed for "%s" meta options.<br/> Please use "Blog Page" options instead.', ui_key($menu)), 'http://www.pagelines.com/pricing', 'Upgrade »'); } elseif (isset($oids['metapanel'])) { echo $oids['metapanel']; } else { foreach ($oids as $oid => $o) { if ($oid != 'icon') { $option_engine->option_engine($oid, $o); } } } echo '<div class="clear"></div></div>'; } ?> </div> </div> <?php }
/** * Page Type Name * * @return String * @todo Finish documentation */ function page_type_name() { if (isset($this->map['templates']['templates'][$this->template_type]['name'])) { return $this->map['templates']['templates'][$this->template_type]['name']; } else { return ui_key($this->template_type); } }
/** * * @TODO document * */ function draw_panel() { global $post_ID; global $pagelines_template; // if page doesn't support settings if ($this->page_for_posts) { $this->non_meta_template(); return; } $set = array('handle' => $this->settings['handle'], 'title' => $this->settings['name'], 'tag' => ui_key($this->get_edit_type()), 'type' => 'meta', 'stext' => __('Save Meta Settings', 'pagelines'), 'tabs' => $this->tabs, 'hidetabs' => $this->hide_tabs, 'post_ID' => $post_ID, 'post_type' => $this->settings['posttype']); $panel = new PLPanel(); $panel->the_panel($set); }