/** * * @TODO document * */ function get_pro_call() { global $pl_section_factory; $usections = $pl_section_factory->unavailable_sections; ?> <div id="vpro_billboard" class="vpro-billboard"> <div class="vpro-billboard-pad"> <div class="vpro_billboard_height fix"> <a class="vpro_thumb" href="<?php echo VPRO_TOUR . '?ref=le-admin'; ?> "><img src="<?php echo PL_IMAGES; ?> /pro-thumb.png" alt="<?php echo VPRO_NAME; ?> " /></a> <div class="vpro_desc"> <strong style="font-size: 1.2em">You Are Using PageLines Lite Edition</strong><br/> <strong>PageLines Lite</strong> is the <strong>free version</strong> of <?php echo VPRO_NAME; ?> .<br/> Upgrade to the Pro edition for more sections & options, no credit link, enhanced social & SEO, support and <a href="http://www.pagelines.com/tour?ref=le-admin">more...</a><br/> <?php $features_js = 'onClick="jQuery(\'.vpro-billboard\').find(\'.whatsmissing\').fadeToggle();"'; $pro_buttons = OptEngine::superlink(__('Why Upgrade? ↓', 'pagelines'), 'grey', 'left', '#', $features_js); $target = 'target="_blank"'; $pro_buttons .= OptEngine::superlink(__('PageLines Tour', 'pagelines'), 'grey', 'left', VPRO_TOUR . '?ref=le-admin', $target); $pro_buttons .= OptEngine::superlink(__('Upgrade Now →', 'pagelines'), 'blue', 'left', VPRO_PRICING . '?ref=le-admin', $target); printf('<div class="pro_buttons fix">%s</div>', $pro_buttons); ?> </div> </div> <div class="whatsmissing"> <h3> Why You'll Love the Professional or Developer edition... </h3> <p> When you upgrade you get 30+ pro drag & drop sections, 200+ CMS options, SEO and social enhancements and way, way more. </p> <p> The pro version way more control options. For advanced users, there is also a Developer version that supports "integrations" and WP "multisite"... To learn more see the <a href="http://www.pagelines.com/pricing?ref=le-admin">pricing page</a> or <a href="http://www.pagelines.com/tour?ref=le-admin">PageLines tour</a>... </p> <p> <strong>Some specifics:</strong> </p> <?php if (isset($usections) && is_array($usections)) { ?> <p class="mod"><strong>Professional Sections In Pro Version</strong><br/> <?php $list_sections = array(); foreach ($usections as $unavailable_section) { $list_sections[] = $unavailable_section->name; } echo join(' · ', $list_sections); ?> </p> <?php } ?> <?php $unavailable_section_areas = get_unavailable_section_areas(); if (isset($unavailable_section_areas) && is_array($unavailable_section_areas)) { ?> <p class="mod"><strong>New Templates and Template Areas</strong> (i.e. places to put sections)<br/> <?php foreach ($unavailable_section_areas as $unavailable_section_area_name) { ?> <?php echo $unavailable_section_area_name; if ($unavailable_section_area_name !== end($unavailable_section_areas)) { echo ' · '; } ?> <?php } ?> </p> <?php } ?> <p class="mod"><strong>New Settings & Options</strong><br/> <?php $list = array(); foreach (get_option_array(true) as $optionset) { foreach ($optionset as $oid => $o) { if (isset($o['version']) && $o['version'] == 'pro') { $list[] = $o['title']; } } } echo join(' · ', $list); ?> </p> </div> </div> </div> <?php }
/** * * Multiple Options Rendering.. * * @since 1.0.0 * @author Andrew Powers * */ function _get_multi_option($oid, $o) { global $post_ID; $sub_option_engine = new OptEngine($this->settings_field); $flag = $this->settings_field == 'meta' ? $post_ID : null; echo '<div class="multi_option">'; foreach ($o['selectvalues'] as $mid => $m) { // Needed for saving on special pages if (isset($o['special'])) { $m['special'] = $o['special']; } // Flag needed for post id/profile id -- settings for special handling. $sub_option_engine->option_engine($mid, $m, $flag, $this->settings_field); } echo '</div>'; }
/** * Draw a list of extended items */ function extension_banner($text, $click = '', $button_text = 'Add Some →') { if ($click != '') { $thebutton = OptEngine::superlink($button_text, 'blue', 'install_now iblock', $click); $button = sprintf('<br/><br/>%s', $thebutton); } else { $button = ''; } // The banner return sprintf('<div class="install-control fix"><span class="banner-text">%s</span>%s</div>', $text, $button); }
/** * * @TODO document * */ function save_bg($oid, $postID) { $bg = OptEngine::_background_image_array(); foreach ($bg as $k => $i) { $bgid = $oid . $k; $option_value = isset($_POST[$bgid]) ? $_POST[$bgid] : null; if (!empty($option_value) || get_post_meta($postID, $bgid)) { update_post_meta($postID, $bgid, $option_value); } } }
/** * * @TODO document * */ function load_engine($type, $opts, $post_ID = null, $user = null) { $option_engine = new OptEngine($type); $flag = $type == 'meta' ? $post_ID : $user; foreach ($opts as $oid => $o) { $option_engine->option_engine($oid, $o, $flag); } }
/** * * @TODO document * */ function _get_type_select($oid, $o) { $option_value = pagelines_sub_option($oid, $o['id']) ? pagelines_sub_option($oid, $o['id']) : $o['default']; ?> <div class="type_select"> <?php echo OptEngine::input_label(get_pagelines_option_id($oid, $o['id']), $o['inputlabel']); ?> <select id="<?php pagelines_option_id($oid, $o['id']); ?> " name="<?php pagelines_option_name($oid, $o['id']); ?> " onChange="PageLinesStyleFont(this, '<?php echo $o['prop']; ?> ')"> <option value="">—SELECT—</option> <?php foreach ($o['selectvalues'] as $sid => $s) { ?> <option value="<?php echo $sid; ?> " <?php selected($sid, $option_value); ?> ><?php echo $s; ?> </option> <?php } ?> </select> </div> <?php }
/** * * * Main Layout Drag and Drop * * * @package PageLines Framework * @subpackage Options * @since 2.0.b3 * */ function draw_layout_control($optionid, $option_settings) { ?> <div class="layout_controls selected_template"> <div id="layout-dimensions" class="template-edit-panel"> <div class="select-edit-layout"> <div class="layout-selections layout-builder-select fix"> <div class="layout-selections-pad fix"> <div class="layout-overview">Select Layout To Edit</div> <?php global $pagelines_layout; foreach (get_the_layouts() as $layout) { $the_last_edited = pagelines_sub_option('layout', 'last_edit') ? pagelines_sub_option('layout', 'last_edit') : 'one-sidebar-right'; $load_layout = $the_last_edited == $layout ? true : false; ?> <div class="layout-select-item"> <span class="layout-image-border <?php if ($load_layout) { echo 'selectedlayout'; } ?> "> <span class="layout-image <?php echo $layout; ?> "> </span> </span> <input type="radio" class="layoutinput" name="<?php pagelines_option_name('layout', 'last_edit'); ?> " value="<?php echo $layout; ?> " <?php if ($load_layout) { echo 'checked'; } ?> /> </div> <?php } ?> </div> </div> </div> <?php foreach (get_the_layouts() as $layout) { $buildlayout = new PageLinesLayout($layout); ?> <div class="layouteditor <?php echo $layout; ?> <?php if ($buildlayout->layout_map['last_edit'] == $layout) { echo 'selectededitor'; } ?> "> <div class="layout-main-content" style="width:<?php echo $buildlayout->builder->bwidth; ?> px"> <div id="innerlayout" class="layout-inner-content" > <?php if ($buildlayout->west->id != 'hidden') { ?> <div id="<?php echo $buildlayout->west->id; ?> " class="ui-layout-west innerwest loelement locontent" style="width:<?php echo $buildlayout->west->bwidth; ?> px"> <div class="loelement-pad"> <div class="loelement-info"> <div class="layout_text"><?php echo $buildlayout->west->text; ?> </div> <div class="width "><span><?php echo $buildlayout->west->width; ?> </span>px</div> </div> </div> </div> <?php } ?> <div id="<?php echo $buildlayout->center->id; ?> " class="ui-layout-center loelement locontent innercenter"> <div class="loelement-pad"> <div class="loelement-info"> <div class="layout_text"><?php echo $buildlayout->center->text; ?> </div> <div class="width "><span><?php echo $buildlayout->center->width; ?> </span>px</div> </div> </div> </div> <?php if ($buildlayout->east->id != 'hidden') { ?> <div id="<?php echo $buildlayout->east->id; ?> " class="ui-layout-east innereast loelement locontent" style="width:<?php echo $buildlayout->east->bwidth; ?> px"> <div class="loelement-pad"> <div class="loelement-info"> <div class="layout_text"><?php echo $buildlayout->east->text; ?> </div> <div class="width "><span><?php echo $buildlayout->east->width; ?> </span>px</div> </div> </div> </div> <?php } ?> <div id="contentwidth" class="ui-layout-south loelement locontent" style="background: #fff;"> <div class="loelement-pad"><div class="loelement-info"><div class="width"><span><?php echo $buildlayout->content->width; ?> </span>px</div></div></div> </div> <div id="top" class="ui-layout-north loelement locontent"><div class="loelement-pad"><div class="loelement-info">Content Area</div></div></div> </div> <div class="margin-west loelement"><div class="loelement-pad"><div class="loelement-info">Margin<div class="width"></div></div></div></div> <div class="margin-east loelement"><div class="loelement-pad"><div class="loelement-info">Margin<div class="width"></div></div></div></div> </div> <div class="layoutinputs"> <div class="layoutinputs-pad fix"> <?php // Content Width $id = 'input-content-width'; $value = $buildlayout->content->width; $name = get_pagelines_option_name('layout', 'content_width'); // Output $input = OptEngine::input_text($id, $name, $value, 'small-text', 'text', 'readonly'); echo OptEngine::input_label_inline($id, $input, 'Global Content Width (px)', 'lbl-layout'); // Main Column $id = 'input-maincolumn-width'; $value = $buildlayout->main_content->width; $name = get_pagelines_option_name('layout', $layout, 'maincolumn_width'); // Output $input = OptEngine::input_text($id, $name, $value, 'small-text', 'text', 'readonly'); echo OptEngine::input_label_inline($id, $input, 'Main Column Width (px)', 'lbl-layout'); // Sidebar 1 $id = 'input-primarysidebar-width'; $value = $buildlayout->sidebar1->width; $name = get_pagelines_option_name('layout', $layout, 'primarysidebar_width'); // Output $input = OptEngine::input_text($id, $name, $value, 'small-text', 'text', 'readonly'); echo OptEngine::input_label_inline($id, $input, 'Sidebar1 Width (px)', 'lbl-layout'); // Responsive $id = 'input-responsive-width'; $value = $buildlayout->content->width / $buildlayout->builder->width * 100; $name = get_pagelines_option_name('layout', 'responsive_width'); // Output $input = OptEngine::input_text($id, $name, $value, 'small-text', 'text', 'readonly'); echo OptEngine::input_label_inline($id, $input, 'Content Percent (%)', 'lbl-layout'); ?> </div> </div> </div> <?php } ?> </div> </div> <?php }