<?php
/*
 ______ _____   _______ _______ _______ _______ ______ _______ 
|   __ \     |_|    ___|_     _|   |   |       |   __ \   _   |
|    __/       |    ___| |   | |       |   -   |      <       |
|___|  |_______|_______| |___| |___|___|_______|___|__|___|___|

P L E T H O R A T H E M E S . C O M             (c) 2015 - 2016

Heading Group Shortcode

*/

if ( ! defined( 'ABSPATH' )) exit; // NO DIRECT ACCESS

if ( class_exists('Plethora_Shortcode_Headinggroup') && !class_exists('Plethora_Shortcode_Headinggroup_Ext') ) {

  /**
   * Extend base class
   * Base class file: /plugins/plethora-featureslib/features/shortcode/headinggroup/shortcode-headinggroup.php
   */
  class Plethora_Shortcode_Headinggroup_Ext extends Plethora_Shortcode_Headinggroup {

    /** 
    * Configure parameters displayed for Xenia theme
    * Will be displayed all items from params_index() with identical 'id'
    * This method should be used for extension class overrides
    *
    * @return array
    */
    public function params_config() {

        $params_config = array(
            array( 
              'id'         => 'content', 
              'default'    => '<h2>'.esc_html( 'Your H2 Title', 'hotel-xenia' ).'</h2>',
              'field_size' => '',
              ),
            array( 
              'id'         => 'subtitle', 
              'default'    => '',
              'field_size' => '',
              ),
            array( 
              'id'         => 'background_title', 
              'default'    => '',
              'field_size' => '',
              ),
            array( 
              'id'         => 'align', 
              'default'    => 'text-center',
              'field_size' => '6',
              ),
            array( 
              'id'         => 'subtitle_position', 
              'default'    => 'bottom',
              'field_size' => '6',
              ),
            array( 
              'id'         => 'divider', 
              'default'    => 1,
              'field_size' => '6',
              ),
            array( 
              'id'         => 'divider_template', 
              'default'    => 'templates/shortcodes/divider-default',
              'field_size' => '6',
              ),
            array( 
              'id'         => 'extra_class', 
              'default'    => '',
              'field_size' => '6',
              ),
            array( 
              'id'         => 'css', 
              'default'    => '',
              'field_size' => '',
              ),
        );

        return $params_config;
    }

    /** 
    * Returns divider for Xenia theme
    * @return string
    */
    public function get_svg_divider( $divider_status = false, $divider_template = 'templates/shortcodes/divider-default' ) {
      $divider = '';

      if ( $divider_status == 1 ) {
            
        ob_start();
        Plethora_WP::get_template_part( $divider_template );
        return ob_get_clean(); 

      }
      return $divider;
    }
  }
}