/** * * @TODO document * */ function section_template($clone_id = null) { $h_head = ploption('_highlight_head', $this->tset); $h_subhead = ploption('_highlight_subhead', $this->tset); $h_splash = ploption('_highlight_splash', $this->tset); $h_splash_position = ploption('_highlight_splash_position', $this->oset); $frame_class = ploption('_highlight_image_frame', $this->oset) ? 'pl-imageframe' : ''; if ($h_head || $h_subhead || $h_splash) { ?> <div class="highlight-area"> <?php if ($h_splash_position == 'top' && $h_splash) { printf('<div class="highlight-splash hl-image-top %s"><img src="%s" alt="" /></div>', $frame_class, $h_splash); } if ($h_splash_position != 'notext') { if ($h_head) { printf('<h1 class="highlight-head">%s</h1>', __($h_head, 'pagelines')); } if ($h_subhead) { printf('<h3 class="highlight-subhead subhead">%s</h3>', __($h_subhead, 'pagelines')); } } if ($h_splash_position != 'top' && $h_splash) { printf('<div class="highlight-splash hl-image-bottom %s"><img src="%s" alt="" /></div>', $frame_class, apply_filters('pl_highlight_splash', $h_splash)); } ?> </div> <?php } else { echo setup_section_notify($this, __('Set highlight page options to activate.', 'pagelines')); } }
function section_template() { $images = get_field('fotos_page_gallery', get_the_ID()); if (!$images) { echo setup_section_notify($this); } else { ?> <div id="default-gallery-deck" class="gallslider"><ul class="unstyled slides"><?php foreach ($images as $image) { $getlink = $image['description']; $getimg = $image['sizes']['thumbnail']; $getlgimg = $image['sizes']['large']; $getalt = $image['alt']; $getcap = $image['caption']; printf('<li><img src="%s" alt="%s" /></li>', $getlgimg, $getalt); } ?> </ul></div><?php if ($this->opt('fw_defgallery_dothumbs')) { ?> <div id="default-gallery-thumbs" class="gallslider"><ul class="unstyled slides"><?php foreach ($images as $image) { $getlink = $image['description']; $getimg = $image['sizes']['thumbnail']; $getlgimg = $image['sizes']['large']; $getalt = $image['alt']; $getcap = $image['caption']; printf('<li><img src="%s" alt="%s" /></li>', $getimg, $getalt); } ?> </ul></div> <?php } } }
function section_template() { $formclass = new fotosContact(); $area = $this->opt('ba_fotos_contact_sb_area'); $layout = $this->opt('ba_fotos_contact_form_layout') ? 'contact-align-swap' : false; ?> <div class="ba-fotos-contact-form-wrap <?php echo $layout; ?> row"> <div class="span6 zmb ba-fotos-contact-has-sb"> <?php if ($area) { pagelines_draw_sidebar($area); } else { echo setup_section_notify($this); } ?> </div> <div class="span6 zmb ba-fotos-contact-has-form"> <?php echo $formclass->form(); ?> </div> </div> <?php }
function section_template() { $output = ''; $count = 1; $box_array = $this->opt('fotos_box_array'); $layout = $this->opt('fotos_box_col') ? $this->opt('fotos_box_col') : '3col'; $captxtcolor = pl_hashify($this->opt('ba_fotos_box_cap_text')); $capbgcolor = pl_hashify($this->opt('ba_fotos_box_cap_back')); $capstyle = $captxtcolor || $capbgcolor ? sprintf('style="background:%s;color:%s;"', $capbgcolor, $captxtcolor) : false; if (is_array($box_array)) { $boxes = count($box_array); foreach ($box_array as $box) { $last = $count == $layout ? 'last' : false; $getimg = pl_array_get('img', $box); $link = pl_array_get('link', $box); $cap = pl_array_get('caption', $box); if ($link) { if ($cap) { $image = sprintf('<a class="ba-fotos-box-link-wrap" href="%s"><img class="ba-fotos-box-img" alt="" src="%s" /><span class="ba-fotos-box-cap" %s>%s</span></a>', $link, $getimg, $capstyle, $cap); } else { $image = sprintf('<a class="ba-fotos-box-link-wrap" href="%s"><img class="ba-fotos-box-img" alt="" src="%s" /></a>', $link, $getimg); } } else { $image = sprintf('<img class="ba-fotos-box-img" alt="" src="%s" />', $getimg); } $output .= sprintf('<div class="ba-fotos-box-item %s">%s</div>', $last, $image); $count++; } } else { echo setup_section_notify($this); } printf('<div class="ba-fotos-box-wrap fix ba-fotos-box-%s">%s</div>', $layout, $output); }
/** * Section template. * * @version 2.2 - added conditional check for no social sites being chosen. */ function section_template() { if (!$this->get_shares()) { echo setup_section_notify($this, __('You have no shares setup, please look at PageLines Settings > Blog and Posts > Sharebar Social Sharing Buttons; or deactivate the Sharebar from the Blog Post Template.', 'pagelines'), admin_url('admin.php?page=pagelines'), __('Setup Sharebar', 'pagelines'), false); return; } $text = __('Share →', 'pagelines'); ?> <div class="pl-sharebar"> <div class="pl-sharebar-pad media"> <div class="img"> <?php printf('<em class="pl-sharebar-text">%s</em>', $text); ?> </div> <div class="bd fix"> <?php echo $this->get_shares(); ?> </div> <div class="clear"></div> </div> </div> <?php }
/** * Section template. */ function section_template() { if (!pagelines('twittername')) { printf('<div class="tbubble"><div class="tbubble-pad">%s</div></div>', __('Set your Twitter account name in your settings to use the TwitterBar Section.', 'pagelines')); return; } echo setup_section_notify($this, 'Twitter API 1.0 Deprecated.', 'http://www.pagelines.com/forum/topic/27565-unknown-twitter-error/', 'Forum post.'); /* $account = ploption('twittername'); $tweet_data = pagelines_get_tweets( $account, true ); if( ! is_array( $tweet_data ) && '' == $tweet_data ) $tweet_data = __( 'Unknown Twitter error.', 'pagelines' ); if( isset( $tweet_data['text'] ) && isset( $tweet_data['user']['id'] ) ) $twitter = sprintf( '<span class="twitter">%s — <a class="twitteraccount" href="http://twitter.com/#!/%s" %s>%s</a></span>', pagelines_tweet_clickable( $tweet_data['text'] ), $account, sprintf( 'rel="twitterpopover" data-img="https://api.twitter.com/1/users/profile_image?user_id=%s&size=bigger" data-original-title="@%s"', $tweet_data['user']['id'], $account ), $account ); else $twitter = sprintf( '<span class="twitter">%s</span>', $tweet_data ); printf('<div class="tbubble"><div class="tbubble-pad">%s</div></div>', $twitter); */ }
/** * Section template. */ function section_template() { $area = $this->opt('widgetizer_area'); if ($area) { pagelines_draw_sidebar($area); } else { echo setup_section_notify($this); } }
/** * Section template. */ function section_template($clone_id = null) { // Options $per_row = ploption('box_col_number', $this->oset) ? ploption('box_col_number', $this->oset) : 3; $box_set = ploption('box_set', $this->oset) ? ploption('box_set', $this->oset) : null; $box_limit = ploption('box_items', $this->oset); $this->thumb_type = ploption('box_thumb_type', $this->oset) ? ploption('box_thumb_type', $this->oset) : 'inline_thumbs'; $this->thumb_size = ploption('box_thumb_size', $this->oset); $this->framed = ploption('box_thumb_frame', $this->oset); $class = ploption('box_class', $this->oset) ? ploption('box_class', $this->oset) : null; // Actions // Set up the query for this page $orderby = ploption('box_orderby', $this->oset) ? ploption('box_orderby', $this->oset) : 'ID'; $order = ploption('box_order', $this->oset) ? ploption('box_order', $this->oset) : 'DESC'; $params = array('orderby' => $orderby, 'order' => $order, 'post_type' => $this->ptID); $params['showposts'] = ploption('box_items', $this->oset) ? ploption('box_items', $this->oset) : $per_row; $params[$this->taxID] = ploption('box_set', $this->oset) ? ploption('box_set', $this->oset) : null; $params['no_found_rows'] = 1; $q = new WP_Query($params); if (empty($q->posts)) { echo setup_section_notify($this, 'Add Box Posts To Activate.', admin_url('edit.php?post_type=' . $this->ptID), 'Add Posts'); return; } // Grid Args $args = array('per_row' => $per_row, 'callback' => array(&$this, 'draw_boxes'), 'class' => $class); // Call the Grid printf('<div class="fboxes fix">%s</div>', grid($q, $args)); }
/** * Section template. */ function section_template($clone_id) { // Options $set = ploption('banner_set', $this->oset) ? ploption('banner_set', $this->oset) : null; $limit = ploption('banner_items', $this->oset) ? ploption('banner_items', $this->oset) : null; // Actions $b = $this->load_pagelines_banners($set, $limit); if (empty($b)) { echo setup_section_notify($this, __("No Banner posts matched this page's criteria", 'pagelines')); return; } $this->draw_banners($b, 'banners ' . $set); }
/** * Section template. */ function section_template() { $call_title = ploption('pagelines_callout_header', $this->tset); $call_sub = ploption('pagelines_callout_subheader', $this->tset); $call_img = ploption('pagelines_callout_image', $this->oset); $call_link = ploption('pagelines_callout_button_link', $this->tset); $call_btext = ploption('pagelines_callout_button_text', $this->tset); $call_btheme = ploption('pagelines_callout_button_theme', $this->tset); $target = ploption('pagelines_callout_button_target', $this->oset) ? 'target="_blank"' : ''; $call_action_text = ploption('pagelines_callout_action_text', $this->oset) ? ploption('pagelines_callout_action_text', $this->oset) : __('Start Here', 'pagelines'); $styling_class = $call_sub ? 'with-callsub' : ''; $alignment = ploption('pagelines_callout_align', $this->oset); $call_align = $alignment == 'left' ? '' : 'rtimg'; if ($call_title || $call_img) { ?> <?php if ($alignment == 'center') { ?> <div class="callout-area fix callout-center <?php echo $styling_class; ?> "> <div class="callout_text"> <div class="callout_text-pad"> <?php $this->draw_text($call_title, $call_sub, $call_img); ?> </div> </div> <div class="callout_action <?php echo $call_align; ?> "> <?php $this->draw_action($call_link, $target, $call_img, $call_btheme, $call_btext); ?> </div> </div> <?php } else { ?> <div class="callout-area media fix <?php echo $styling_class; ?> "> <div class="callout_action img <?php echo $call_align; ?> "> <?php $this->draw_action($call_link, $target, $call_img, $call_btheme, $call_btext); ?> </div> <div class="callout_text bd"> <div class="callout_text-pad"> <?php $this->draw_text($call_title, $call_sub, $call_img); ?> </div> </div> </div> <?php } } else { echo setup_section_notify($this, __('Set Callout page options to activate.', 'pagelines')); } }
function section_template($clone_id = null) { $carousel_class = isset($clone_id) && $clone_id != 1 ? 'crsl' . $clone_id : 'crsl'; // Set Up Variables $carouselitems = ploption('carousel_items', $this->oset) ? ploption('carousel_items', $this->oset) : 30; $carousel_post_id = ploption('carousel_post_id', $this->oset) ? ploption('carousel_post_id', $this->oset) : null; $carousel_image_width = ploption('carousel_image_width', $this->oset) ? ploption('carousel_image_width', $this->oset) : 64; $carousel_image_height = ploption('carousel_image_height', $this->oset) ? ploption('carousel_image_height', $this->oset) : 64; $cmode = ploption('carousel_mode', $this->oset) ? ploption('carousel_mode', $this->oset) : null; $ngen_id = ploption('carousel_ngen_gallery', $this->oset) ? ploption('carousel_ngen_gallery', $this->oset) : 1; if ($cmode == 'flickr' && !function_exists('get_flickrRSS') || $cmode == 'ngen_gallery' && !function_exists('nggDisplayRandomImages')) { echo setup_section_notify($this, __("The <strong>plugin</strong> for the selected carousel mode needs to be activated (FlickrRSS or NextGen Gallery).", 'pagelines'), admin_url() . 'plugins.php', 'Setup Plugin'); } else { ?> <div class="<?php echo $carousel_class; ?> thecarousel"> <ul id="mycarousel" class="mycarousel"> <?php if (function_exists('nggDisplayRandomImages') && $cmode == 'ngen_gallery') { echo do_shortcode('[nggallery id=' . $ngen_id . ' template=plcarousel]'); } elseif (function_exists('get_flickrRSS') && $cmode == 'flickr') { if (!function_exists('get_and_delete_option')) { // fixes instantiation within the function in the plugin :/ get_flickrRSS(array('num_items' => $carouselitems, 'html' => '<li><a href="%flickr_page%" title="%title%"><img src="%image_square%" alt="%title%"/><span class="list-title">%title%</span></a></li>')); } } elseif ($cmode == 'hook') { pagelines_register_hook('pagelines_carousel_list'); } else { $carousel_post_query = 'numberposts=' . $carouselitems; if ($carousel_post_id) { $carousel_post_query .= '&category_name=' . $carousel_post_id; } $recentposts = get_posts($carousel_post_query); foreach ($recentposts as $cid => $c) { $a = array(); if (has_post_thumbnail($c->ID)) { $img_data = wp_get_attachment_image_src(get_post_thumbnail_id($c->ID)); $a['img'] = $img_data[0] != '' ? $img_data[0] : $this->base_url . '/post-blank.jpg'; $a['width'] = $img_data[1]; $a['height'] = $img_data[2]; } else { $a['img'] = $this->base_url . '/post-blank.jpg'; $a['width'] = 100; $a['height'] = 100; } $args = array('title' => $c->post_title, 'link' => get_permalink($c->ID), 'img' => $a['img'], 'maxheight' => $carousel_image_height, 'maxwidth' => $carousel_image_width, 'height' => $a['height'], 'width' => $a['width']); echo $this->carousel_item($args); } } ?> </ul> </div> <?php } }
/** * * @TODO document * */ function draw_features($f, $class, $clone_id = null) { // Setup global $post; global $pagelines_ID; global $pagelines_layout; $current_page_post = $post; if (empty($f)) { echo setup_section_notify($this, __("No Feature posts matched this page's criteria", 'pagelines')); return; } // Options $feature_source = ploption('feature_source', $this->oset); $timeout = ploption('timeout', $this->oset); $playpause = ploption('feature_playpause', $this->oset); $feature_nav_type = ploption('feature_nav_type', $this->oset); // Refine $no_nav = isset($f) && count($f) == 1 ? ' nonav' : ''; $footer_nav_class = $class . ' ' . $feature_nav_type . $no_nav; $cycle_selector = "fclone" . $clone_id; ?> <div id="feature_slider" class="<?php echo $cycle_selector . '_wrap ' . $class; ?> fix"> <div id="feature-area" class="fset_height"> <div id="cycle" class="<?php echo $cycle_selector; ?> "> <?php foreach ($f as $post) { // Setup For Std WP functions setup_postdata($post); $oset = array('post_id' => $post->ID); $target = apply_filters('pagelines_features_target', '', $post); $feature_style = ploption('feature-style', $oset) ? ploption('feature-style', $oset) : 'text-left'; $feature_style = apply_filters('pagelines-feature-style', $feature_style); $flink_text = ploption('feature-link-text', $oset) ? __(ploption('feature-link-text', $oset)) : __('More', 'pagelines'); if ($feature_source == 'posts' || $feature_source == 'posts_all') { $feature_background_image = ''; if (plmeta('feature-background-image', $oset)) { $feature_background_image = plmeta('feature-background-image', $oset); } elseif (has_post_thumbnail($post->ID)) { $feature_background_image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'single-post-thumbnail'); $feature_background_image = $feature_background_image[0]; } else { $feature_background_image = apply_filters('pagelines-feature-cat-default-image', $this->base_url . '/images/feature1.jpg', $post); } $background_class = 'bg_cover'; } else { $feature_background_image = ploption('feature-background-image', $oset); $background_class = 'bg_cover'; } $feature_design = ploption('feature-design', $oset) ? ploption('feature-design', $oset) : ''; if ($feature_source == 'posts' || $feature_source == 'posts_all') { setup_postdata($post); } if (plmeta('feature-link-url', $oset)) { $action = plmeta('feature-link-url', $oset); } elseif (ploption('feature-link-url', $oset)) { $action = ploption('feature-link-url', $oset); } elseif ($feature_source == 'posts' || $feature_source == 'posts_all') { $action = get_permalink(); } else { $action = ''; } $fcontent_class = ploption('fcontent-bg', $oset) ? ploption('feature-bg', $oset) : ''; $media_image = ploption('feature-media-image', $oset); $feature_media = ploption('feature-media', $oset); $feature_media_full = ploption('feature-media-full', $oset); $feature_wrap_markup = $feature_style == 'text-none' && $action ? 'a' : 'div'; $feature_wrap_link = $feature_style == 'text-none' && $action ? sprintf('href="%s"', $action) : ''; $more_link = $feature_style != 'text-none' && $action ? sprintf(' <a %s class="plmore" href="%s" >%s</a>', $target, $action, $flink_text) : ''; $background_css = $feature_background_image ? sprintf('style="background-image: url(\'%s\');"', $feature_background_image) : ''; printf('<div id="%s" class="fcontainer %s %s fix" >', 'feature_' . $post->ID, $feature_style, $feature_design); printf('<%s class="feature-wrap fset_height %s" %s %s >', $feature_wrap_markup, $background_class, $feature_wrap_link, $background_css); if ($feature_wrap_markup != 'a') { if ($feature_media && $feature_media_full) { echo $feature_media; } else { ?> <div class="feature-pad fset_height fix"> <div class="fcontent scale_text fset_height <?php echo $fcontent_class; ?> "> <div class="fcontent-pad fix"> <?php pagelines_register_hook('pagelines_feature_text_top', $this->id); // Hook $link = $feature_source == 'posts' || $feature_source == 'posts_all' ? sprintf('<a %s href="%s">%s</a>', $target, $action, $post->post_title) : $post->post_title; $title = sprintf('<div class="fheading"> <h2 class="ftitle">%s</h2> </div>', $link); $content = $feature_source == 'posts' || $feature_source == 'posts_all' ? apply_filters('pagelines_feature_output', custom_trim_excerpt(get_the_excerpt(), '30')) : do_shortcode(get_the_content()); printf('%s<div class="ftext"><div class="fexcerpt">%s%s%s</div></div>', $title, $content, $more_link, pledit($post->ID)); pagelines_register_hook('pagelines_fcontent_after', $this->id); // Hook ?> </div> </div> <div class="fmedia fset_height" style=""> <div class="fmedia-pad"> <?php pagelines_register_hook('pagelines_feature_media_top', $this->id); // Hook if ($media_image) { printf('<div class="media-frame"><img src="%s" /></div>', $media_image); } elseif ($feature_media) { echo do_shortcode($feature_media); } ?> </div> </div> <?php pagelines_register_hook('pagelines_feature_after', $this->id); // Hook ?> <div class="clear"></div> </div> <?php } } printf('</%s>', $feature_wrap_markup); echo '</div>'; } $post = $current_page_post; ?> </div> </div> <?php pagelines_register_hook('pagelines_feature_nav_before', $this->id); // Hook $playpause = $timeout != 0 && $playpause ? sprintf('<span class="playpause pause %s"><span> </span></span>', $cycle_selector) : ''; $nav = sprintf('<div id="featurenav" class="%s subtext fix"></div>', $cycle_selector); printf('<div id="feature-footer" class="%s fix"><div class="feature-footer-pad">%s%s<div class="clear"></div></div></div>', $footer_nav_class, $playpause, $nav); ?> </div> <div class="clear"></div> <?php }
/** * Section template. */ function section_template($clone_id) { $hero_lt_width = ploption('herounit_left_width', $this->oset); if (!$hero_lt_width) { $hero_lt_width = 'span6'; } $hero_rt_width = ploption('herounit_right_width', $this->oset); if (!$hero_rt_width) { $hero_rt_width = 'span6'; } $hero_title = ploption('pagelines_herounit_title', $this->tset); $hero_tag = ploption('pagelines_herounit_tagline', $this->tset); $hero_img = ploption('pagelines_herounit_image', $this->tset); $hero_butt_link = ploption('herounit_button_link', $this->oset); $hero_butt_text = ploption('herounit_button_text', $this->oset); $hero_butt_target = ploption('herounit_button_target', $this->oset) ? ' target="_blank"' : ''; $hero_butt_theme = ploption('herounit_button_theme', $this->oset); if ($hero_title) { ?> <div class="pl-hero-wrap row"> <?php if ($hero_lt_width) { printf('<div class="pl-hero %s">', $hero_lt_width); } ?> <?php if ($hero_title) { printf('<h1 class="m-bottom">%s</h1>', $hero_title); } if ($hero_tag) { printf('<p>%s</p>', $hero_tag); } if ($hero_butt_link) { printf('<a %s class="btn btn-%s btn-large" href="%s">%s</a> ', $hero_butt_target, $hero_butt_theme, $hero_butt_link, $hero_butt_text); } ?> </div> <?php if ($hero_rt_width) { printf('<div class="pl-hero-image %s">', $hero_rt_width); } ?> <?php if ($hero_img) { printf('<div class="hero_image"><img class="pl-imageframe" src="%s" /></div>', apply_filters('pl_hero_image', $hero_img)); } ?> </div> </div> <?php } else { echo setup_section_notify($this, __('Set Hero page options to activate.', 'pagelines')); } }
/** * Section template. */ function section_template($clone_id = null) { $mast_title = ploption('pagelines_masthead_title', $this->oset); $mast_img = ploption('pagelines_masthead_img', $this->oset); $mast_imgalt = ploption('pagelines_masthead_imgalt', $this->oset); $mast_tag = ploption('pagelines_masthead_tagline', $this->oset); $mast_menu = ploption('masthead_menu', $this->oset) ? ploption('masthead_menu', $this->oset) : null; $masthead_meta = ploption('masthead_meta', $this->oset); $masthtmlwidth = ploption('masthead_html_width', $this->oset) ? ploption('masthead_html_width', $this->oset) . 'px' : ''; // A Responsive, Drag & Drop Platform for Beautiful Websites $classes = $mast_img ? 'with-splash' : ''; if ($mast_title) { ?> <header class="jumbotron masthead <?php echo $classes; ?> "> <?php $theimg = sprintf('<img class="masthead-img" src="%s" alt="%s"/>', $mast_img, $mast_imgalt); $masthtml = ploption('pagelines_masthead_html', $this->oset); if ($mast_img) { printf('<div class="splash" style="max-width:%s;margin:0 auto;">%s</div>', $masthtmlwidth, $theimg); } if ($masthtml) { printf('<div class="video-splash" style="max-width:%s;margin:0 auto;">%s</div>', $masthtmlwidth, $masthtml); } ?> <div class="inner"> <?php if ($mast_title) { printf('<h1 class="masthead-title">%s</h1>', $mast_title); } if ($mast_tag) { printf('<p class="masthead-tag">%s</p>', $mast_tag); } ?> <p class="download-info"> <?php for ($i = 1; $i <= 2; $i++) { $butt_link = ploption('masthead_button_link_' . $i, $this->oset); // Flag $butt_text = ploption('masthead_button_text_' . $i, $this->oset) ? ploption('masthead_button_text_' . $i, $this->oset) : __('Start Here', 'pagelines'); $target = ploption('masthead_button_target_' . $i, $this->oset) ? 'target="_blank"' : ''; $btheme = ploption('masthead_button_theme_' . $i, $this->oset) ? ploption('masthead_button_theme_' . $i, $this->oset) : 'primary'; if ($butt_link) { printf('<a %s class="btn btn-%s btn-large" href="%s">%s</a> ', $target, $btheme, $butt_link, $butt_text); } } ?> </p> </div> <div class="mastlinks"> <?php if ($mast_menu) { wp_nav_menu(array('menu_class' => 'quick-links', 'menu' => $mast_menu, 'container' => null, 'container_class' => '', 'depth' => 1, 'fallback_cb' => '')); } if ($masthead_meta) { printf('<div class="quick-links mastmeta">%s</div>', do_shortcode($masthead_meta)); } ?> </div> </header> <hr class="soften" /> <?php } else { echo setup_section_notify($this, __('Set Masthead page options to activate.', 'pagelines')); } }