Example #1
0
language_attributes();
?>
>
<head>
<?php 
pagelines_register_hook('pagelines_head');
// Hook
wp_head();
// Hook (WordPress)
pagelines_register_hook('pagelines_head_last');
// Hook
?>

</head>
<?php 
echo pl_source_comment('Start >> HTML Body', 1);
?>
<body <?php 
body_class(pagelines_body_classes());
?>
>
<?php 
pagelines_register_hook('pagelines_before_site');
// Hook
if (has_action('override_pagelines_body_output')) {
    do_action('override_pagelines_body_output');
} else {
    ?>
<div id="site" class="<?php 
    echo pagelines_layout_mode();
    ?>
/**
*
* @TODO do
*
*/
function pagelines_facebook_header()
{
    if (is_home() || is_archive()) {
        return;
    }
    if (function_exists('is_bbpress') && is_bbpress()) {
        return;
    }
    global $pagelines_ID;
    if (!$pagelines_ID) {
        return;
    }
    $fb_img = apply_filters('pl_opengraph_image', pl_the_thumbnail_url($pagelines_ID, 'full'));
    echo pl_source_comment('Facebook Open Graph');
    printf("<meta property='og:title' content='%s' />\n", get_the_title($pagelines_ID));
    printf("<meta property='og:url' content='%s' />\n", get_permalink($pagelines_ID));
    printf("<meta property='og:site_name' content='%s' />\n", get_bloginfo('name'));
    $fb_content = get_post($pagelines_ID);
    if (!function_exists('sharing_plugin_settings')) {
        printf("<meta property='og:description' content='%s' />\n", pl_short_excerpt($fb_content, 15));
    }
    printf("<meta property='og:type' content='%s' />", is_home() ? 'website' : 'article');
    if ($fb_img) {
        printf("\n<meta property='og:image' content='%s' />", $fb_img);
    }
}
Example #3
0
 function before_section($s)
 {
     echo pl_source_comment($s->name . ' | Section Template', 2);
     // Add Comment
     pagelines_register_hook('pagelines_before_' . $s->id, $s->id);
     // hook
     $sid = $s->id;
     $clone = $s->meta['clone'];
     $edition = $s->sinfo['edition'];
     $datas = array();
     if (!pl_is_pro()) {
         $edition = $s->sinfo['edition'];
         if ($edition == 'pro') {
             $class[] = 'pro-section';
         }
     }
     if ($s->level == 0) {
         $class[] = 'pl-area pl-area-sortable area-tag';
         $controls = $this->areas->area_controls($s);
         $pad_class = 'pl-area-pad';
         /* - User Sections Classes - */
         if (isset($s->meta['ctemplate'])) {
             $class[] = 'custom-section editing-locked';
             $datas[] = sprintf("data-custom-section='%s'", $s->meta['ctemplate']);
             $datas[] = sprintf("data-custom-name='%s'", pl_custom_section_name($s->meta['ctemplate']));
         }
     } else {
         // Content Section Stuff
         $span = isset($s->meta['span']) ? sprintf('span%s', $s->meta['span']) : 'span12';
         $offset = isset($s->meta['offset']) ? sprintf('offset%s', $s->meta['offset']) : 'offset0';
         $newrow = isset($s->meta['newrow']) && $s->meta['newrow'] == 'true' ? 'force-start-row' : '';
         $class[] = 'pl-section';
         $class[] = $span;
         $class[] = $offset;
         $class[] = $newrow;
         $controls = $this->editor->section_controls($s);
         $pad_class = 'pl-section-pad';
     }
     $styles = $s->wrapper_styles;
     $class = array_merge($class, $s->wrapper_classes, (array) explode(' ', $s->special_classes));
     $class = array_unique(array_filter($class));
     // ensure no empties or duplicates
     $video = pl_standard_video_bg($s);
     $title = !$s->alt_standard_title ? $s->opt('pl_standard_title') : false;
     if ($title) {
         $attr = 'class="pl-section-title pla-from-top subtle pl-animation" data-sync="pl_standard_title"';
         $title = $s->level == 0 ? sprintf('<h2 %s>%s</h2>', $attr, $title) : sprintf('<h3 %s>%s</h3>', $attr, $title);
     }
     printf('<section id="%s" data-object="%s" data-sid="%s" data-clone="%s" %s class="%s section-%s" style="%s">%s%s<div class="%s fix">%s', $s->id . $clone, $s->class_name, $s->id, $clone, implode(" ", $datas), implode(" ", $class), $sid, implode(" ", $styles), $controls, $video, $pad_class, $title);
     pagelines_register_hook('pagelines_outer_' . $s->id, $s->id);
     // hook
     pagelines_register_hook('pagelines_inside_top_' . $s->id, $s->id);
     // hook
 }
 function print_template_section_head()
 {
     foreach ((array) $this->allsections as $sid) {
         /**
          * If this is a cloned element, remove the clone flag before instantiation here.
          */
         $p = splice_section_slug($sid);
         $section = $p['section'];
         $clone_id = $p['clone_id'];
         if ($this->in_factory($section)) {
             $s = $this->factory[$section];
             $s->setup_oset($clone_id);
             ob_start();
             $s->section_head($clone_id);
             $section_head = ob_get_clean();
             if ($section_head != '') {
                 echo pl_source_comment($this->factory[$section]->name . ' | Section Head');
                 echo $section_head;
             }
         }
     }
 }