<?php

global $fwe_settings;
$page_id = $stitch['stitch_page']->ID;
$path = fwe_relative_url(get_permalink($page_id));
$backgrounds = get_post_meta($page_id, 'page_backgrounds', true);
$backgrounds = fwe_build_page_background_object($backgrounds);
$bg_data = '';
$section_style = '';
$content_style = '';
$slider_speed = fwe_theme_option_exists('global_slider_speed') ? $fwe_settings['global_slider_speed'] : 8;
if (!empty($backgrounds)) {
    $bg_data = !empty($backgrounds) ? ' data-backgrounds="' . htmlspecialchars(json_encode($backgrounds)) . '"' : '';
    $first_bg = $backgrounds[0];
    $section_style = fwe_style_attribute(array('background-image' => "url({$first_bg['backgroundImage']})", 'background-size' => $first_bg['backgroundSize'], 'background-position' => $first_bg['backgroundPosition'], 'background-repeat' => $first_bg['backgroundRepeat']), true);
    $content_style = fwe_style_attribute(array('color' => $first_bg['textColor'], 'background-color' => fwe_hex_to_rgba($first_bg['backgroundColor'], $first_bg['colorOpacity'])), true);
}
?>
<section
  <?php 
echo $bg_data;
echo $section_style;
?>
  class="stitch content-section"
  id="<?php 
echo $stitch['stitch_page']->post_name;
?>
"
  data-slug="<?php 
echo $stitch['stitch_page']->post_name;
?>
Ejemplo n.º 2
0
<div class="accordion">
  <?php 
for ($i = 0; $i < $pane_count; $i++) {
    ?>
    <?php 
    if (empty($panes['content'][$i]) || empty($panes['title'][$i])) {
        continue;
    }
    $header_id = 'accordion-' . $id . '-header-' . $i;
    $pane_id = 'accordion-' . $id . '-pane-' . $i;
    $pane_icon_id = fwe_get_first_valid_image($panes['icon'][$i]);
    $pane_icon = wp_get_attachment_image_src($pane_icon_id, 'full');
    $header_style = fwe_style_attribute(array('background-color' => $panes['header_background'][$i]));
    $pane_content = apply_filters('the_content', $panes['content'][$i]);
    ?>
    <div class="pane">
      <div class="pane-header" id="<?php 
    echo $header_id;
    ?>
"<?php 
    echo $header_style;
    ?>
>
        <?php 
    echo '<' . $header . '>';
    ?>
          <a href="#<?php 
    echo $pane_id;
    ?>
">
            <div class="icon">
Ejemplo n.º 3
0
          <?php 
global $fwe_settings, $theme_uri;
$cta = fwe_get_cta();
if ($cta) {
    $bg_img = get_post_meta($cta->ID, 'background_image', true);
    $bg_img = wp_get_attachment_image_src($bg_img, 'full');
    $bg_size = get_post_meta($cta->ID, 'background_size', true);
    $bg_pos = get_post_meta($cta->ID, 'background_position', true);
    $bg_repeat = get_post_meta($cta->ID, 'background_repeat', true);
    $bg_color = get_post_meta($cta->ID, 'background_color', true);
    $link_url = get_post_meta($cta->ID, 'link_url', true);
    $btn_txt = get_post_meta($cta->ID, 'button_text', true);
    $target = fwe_is_url_local($link_url) ? '' : ' target="_blank"';
    $style_attr = fwe_style_attribute(array('background-image' => "url('{$bg_img[0]}')", 'background-size' => $bg_size, 'background-position' => $bg_pos, 'background-repeat' => $bg_repeat, 'background-color' => $bg_color));
    ?>
            <div class="call-to-action"<?php 
    echo $style_attr;
    ?>
>
              <div class="cta-body">
                <div class="cta-contents">
                  <div class="cta-text">
                    <?php 
    echo apply_filters('the_content', $cta->post_content);
    ?>
                  </div>

                  <?php 
    if (!empty($btn_txt) && !empty($link_url)) {
        ?>
                    <div class="cta-button">