function section_template() { $section_output = !$this->active_loading ? render_nested_sections($this->meta['content'], 1) : ''; $style = ''; $inner_style = ''; // Use alt mode for this $title = $this->opt('pl_standard_title') ? sprintf('<h2 class="pl-section-title pla-from-top subtle pl-animation">%s</h2>', $this->opt('pl_standard_title')) : ''; $inner_style .= $this->opt('pl_area_height') ? sprintf('min-height: %spx;', $this->opt('pl_area_height')) : ''; $inner_classes = 'pl-inner area-region pl-sortable-area editor-row'; $classes = ''; // If there is no output, there should be no padding or else the empty area will have height. if ($section_output || $title != '') { // global $default_padding = pl_setting('section_area_default_pad', array('default' => '20')); // opt $padding = rtrim($this->opt('pl_area_pad', array('default' => $default_padding)), 'px'); $padding_bottom = rtrim($this->opt('pl_area_pad_bottom', array('default' => $padding)), 'px'); $style .= sprintf('padding-top: %spx; padding-bottom: %spx;', $padding, $padding_bottom); $content_class = $padding ? 'nested-section-area' : ''; $buffer = pl_draft_mode() ? sprintf('<div class="pl-sortable pl-sortable-buffer span12 offset0"></div>') : ''; $section_output = $buffer . $section_output . $buffer; } else { $pad_css = ''; $content_class = ''; } ?> <div class="pl-area-wrap <?php echo $classes; ?> " style="<?php echo $style; ?> "> <div class="pl-content <?php echo $content_class; ?> "> <?php echo $title; ?> <div class="<?php echo apply_filters('pl-area-inner-classes', $inner_classes, $this->meta); ?> " style="<?php echo apply_filters('pl-area-inner-style', $inner_style, $this->meta); ?> "> <?php echo $section_output; ?> </div> </div> </div> <?php }
function pagelines_after_footer_elements() { if (!pl_is_pro() && !pl_draft_mode()) { ?> <a class="pl-credit" href="http://www.pagelines.com/" title="Built with PageLines DMS [basic]" target="_blank"> <i class="icon icon-pagelines pl-transit"></i> <span class="fademein">DMS</span> </a> <?php } if (pl_setting('supersize_bg') && pl_setting('page_background_image_url')) { echo '<div id="supersized"></div>'; } }
function __construct() { if (!pl_draft_mode()) { return; } if (pl_less_dev()) { add_action('pagelines_head', array($this, 'load_time_tracker_start')); add_action('wp_footer', array($this, 'load_time_tracker_stop')); } else { add_action('wp_footer', array($this, 'loader_ready_script'), 20); add_action('pagelines_head_last', array($this, 'loader_inline_style')); add_action('pagelines_before_site', array($this, 'loader_html')); } }
function section_foot() { if (pl_draft_mode()) { return false; } ?> <script> jQuery(document).ready(function(){ jQuery("a[rel^='prettyPhoto']").prettyPhoto(); }); </script> <?php }
function section_template() { $image = $this->opt('mediabox_image'); $media_html = $this->opt('mediabox_html'); $disable_center = $this->opt('disable_centering'); $title = $this->opt('mediabox_title') ? sprintf('<h3 data-sync="mediabox_title">%s</h3>', $this->opt('mediabox_title')) : ''; $set_height = $this->opt('mediabox_height') ? $this->opt('mediabox_height') : 30; $height = sprintf('min-height: %spx', $set_height); if ($image || $media_html) { $img = $this->opt('mediabox_image') ? $this->image('mediabox_image', $this->base_url . '/default.png') : ''; } elseif (!$this->opt('mediabox_background')) { $img = sprintf('<img data-sync="mediabox_image" src="%s" />', $this->base_url . '/default.png'); } else { $img = ''; } $classes = array(); $align_class = array(); $align = $this->opt('mediabox_align'); if ($align == 'right') { $align_class = 'textright alignright'; } elseif ($align == 'left') { $align_class = 'textleft alignleft'; } elseif ($align == 'none') { $align_class = ''; } else { $align_class = 'center'; } $classes[] = $disable_center ? '' : 'pl-centerer'; $classes[] = $this->opt('mediabox_animation') ? $this->opt('mediabox_animation') : 'pla-fade'; $html = do_shortcode(wpautop($media_html)); $height_sync_data = pl_draft_mode() ? 'data-sync="mediabox_height" data-sync-mode="css" data-sync-target="min-height" data-sync-post="px"' : ''; printf('<div class="mediabox-wrap %s pl-animation fix" %s style="%s"> <div class="the-media fitvids pl-centered %s hentry"> %s %s <div class="the-media-html">%s</div> </div> </div>', join(' ', $classes), $height_sync_data, $height, $align_class, $img, $title, $html); }
function process_styles() { wp_enqueue_style('open-sans', '//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,300,400,600&subset=latin-ext,latin', false, '20130605'); if (pl_draft_mode()) { pagelines_add_bodyclass('pl-editor'); } $this->handler->process_styles(); }
/** * * Get compiled/cached CSS * * @package PageLines DMS * @since 2.2 */ function get_compiled_custom() { if (!pl_draft_mode() && is_array($a = get_transient('pagelines_custom_css'))) { return $a; } else { $start_time = microtime(true); $custom = stripslashes(pl_setting('custom_less')); $pless = new PagelinesLess(); $custom = $pless->raw_less($custom, 'custom'); $end_time = microtime(true); $a = array('custom' => $custom, 'c_time' => round($end_time - $start_time, 5), 'time' => time()); if (strpos($custom, 'PARSE ERROR') === false) { set_transient('pagelines_custom_css', $a, $this->ctimeout); set_transient('pagelines_custom_css_backup', $a, $this->btimeout); return $a; } else { pl_less_save_last_error($custom, false); return get_transient('pagelines_custom_css_backup'); } } }
function pl_get_mode() { $mode = pl_draft_mode() ? 'draft' : 'live'; return $mode; }
function process_styles() { if (pl_draft_mode()) { pagelines_add_bodyclass('pl-editor'); } $this->handler->process_styles(); }
function process_region($region = 'template') { if (!isset($this->map[$region])) { return; } if (pl_draft_mode()) { $this->regions->region_start($region); } if (is_array($this->map[$region])) { $area_count = 0; $area_total = count($this->map[$region]); foreach ($this->map[$region] as $area => $a) { if (isset($a['object']) && !empty($a['object']) && $this->in_factory($a['object'])) { $area_count++; $this->render_section($a, $area_count, $area_total, 0); } else { // THIS MIGHT NOT BE USED ANYMORE AS ALL SECTIONS USED A NESTED FUNCTION // deprecated - this isnt used i dont think $a['area_number'] = $this->area_number++; $this->areas->area_start($a); if (isset($a['content']) && !empty($a['content'])) { $section_count = 0; $sections_total = count($a['content']); foreach ($a['content'] as $key => $meta) { $section_count++; $this->render_section($meta, $section_count, $sections_total); } } $this->areas->area_end($a); } } } }
function area_sortable_buffer() { return pl_draft_mode() ? sprintf('<div class="pl-sortable pl-sortable-buffer"></div>') : ''; }