first commit
This commit is contained in:
122
wp-content/themes/thinkai/includes/classes/ajax.php
Normal file
122
wp-content/themes/thinkai/includes/classes/ajax.php
Normal file
@@ -0,0 +1,122 @@
|
||||
<?php
|
||||
namespace THINKAI\Includes\Classes;
|
||||
|
||||
class Ajax {
|
||||
|
||||
function actions() {
|
||||
add_action( 'wp_ajax_thinkai_ajax', array( $this, 'ajax_handler' ) );
|
||||
add_action( 'wp_ajax_nopriv_thinkai_ajax', array( $this, 'ajax_handler' ) );
|
||||
}
|
||||
|
||||
function ajax_handler() {
|
||||
|
||||
$method = thinkai_set( $_REQUEST, 'subaction' );
|
||||
if ( method_exists( $this, $method ) ) {
|
||||
$this->$method();
|
||||
}
|
||||
exit;
|
||||
|
||||
}
|
||||
|
||||
function thinkai_project_loadmore() {
|
||||
$allowed_html = wp_kses_allowed_html( 'post' );
|
||||
if ( class_exists( 'Douens_Resizer' ) ) {
|
||||
$img_obj = new \Thinkai_Resizer();
|
||||
}
|
||||
$args = thinkai_set( $_POST, 'query' );
|
||||
if ( ! empty( $args['paged'] ) AND ! empty( $args['posts_per_page'] ) AND ! empty( $args['order'] ) ) {
|
||||
$args['paged'] = $args['paged'] + 1;
|
||||
$args['post_type'] = 'project';
|
||||
$query = new \WP_Query( $args );
|
||||
if ( $query->have_posts() ) {
|
||||
$count = 0;
|
||||
ob_start();
|
||||
while ( $query->have_posts() ) {
|
||||
$query->the_post();
|
||||
if ( $count == 0 ) {
|
||||
$anim = array( 4, 5 );
|
||||
} else {
|
||||
$anim = array( 6, 5 );
|
||||
}
|
||||
?>
|
||||
<div class="col-md-6 col-sm-12 col-lg-6 wow zoomIn" data-wow-delay=".<?php echo esc_attr( $anim[0] ); ?>s" data-wow-duration=".<?php echo esc_attr( $anim[1] ); ?>s">
|
||||
<div class="portfolio-item">
|
||||
<?php echo wp_kses( $img_obj->resize( wp_get_attachment_url( get_post_thumbnail_id(), 'full' ), 585, 420, true ), $allowed_html ); ?>
|
||||
<div class="portfolio-cap">
|
||||
<h2><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute() ?>"><?php the_title(); ?></a></h2>
|
||||
<span><?php the_terms( get_the_ID(), 'project_cat', '', ', ', '' ); ?></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
if ( $count == 1 ) {
|
||||
$count = - 1;
|
||||
}
|
||||
$count ++;
|
||||
}
|
||||
wp_reset_postdata();
|
||||
$output = ob_get_clean();
|
||||
$button = '<a class="loadmore-btn" href="javascript:void(0)" data-attr=\'' . json_encode($args) . '\' ><i class="flaticon-load theme-bg"></i>' . esc_html__( "Load More", "thinkai" ) . '</a>';
|
||||
wp_send_json( [
|
||||
'post' => $output,
|
||||
'button' => $button,
|
||||
] );
|
||||
} else {
|
||||
wp_reset_postdata();
|
||||
wp_send_json( [ 'button' => '<a class="loadmore-btn" href="javascript:void(0)"><i class="flaticon-load theme-bg"></i>' . esc_html__( "No More Post", "thinkai" ) . '</a>' ] );
|
||||
}
|
||||
exit;
|
||||
} else {
|
||||
wp_send_json( [ 'button' => '<a class="loadmore-btn" href="javascript:void(0)"><i class="flaticon-load theme-bg"></i>' . esc_html__( "No More Post", "thinkai" ) . '</a>' ] );
|
||||
}
|
||||
exit;
|
||||
}
|
||||
|
||||
function thinkai_project_loadmore2() {
|
||||
if ( class_exists( 'Thinkai_Resizer' ) ) {
|
||||
$img_obj = new \Thinkai_Resizer();
|
||||
}
|
||||
$args = thinkai_set( $_POST, 'query' );
|
||||
$args['post_type'] = 'project';
|
||||
$query = new \WP_Query( $args );
|
||||
if ( $query->have_posts() ) {
|
||||
$count = 0;
|
||||
ob_start();
|
||||
while ( $query->have_posts() ) {
|
||||
$query->the_post();
|
||||
if ( $count == 0 ) {
|
||||
$anim = 8;
|
||||
} elseif ( $count == 1 ) {
|
||||
$anim = 1;
|
||||
} else {
|
||||
$anim = '1.2';
|
||||
}
|
||||
?>
|
||||
<div class="col-md-4 col-sm-6 col-lg-4 fltr-itm wow zoomIn " data-wow-delay=".<?php echo esc_attr( $anim ); ?>s" data-wow-duration=".5s">
|
||||
<div class="portfolio-item2">
|
||||
<a href="<?php the_permalink(); ?>" data-fancybox="gallery">
|
||||
<?php echo wp_kses( $img_obj->resize( wp_get_attachment_url( get_post_thumbnail_id( get_the_ID() ), 'full' ), 357, 428, true ), $allowed_html ); ?>
|
||||
</a>
|
||||
<h4><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute() ?>"><?php the_title(); ?></a></h4>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
if ( $count == 2 ) {
|
||||
$count = - 1;
|
||||
}
|
||||
$count ++;
|
||||
}
|
||||
wp_reset_postdata();
|
||||
$output = ob_get_clean();
|
||||
$button = '<a class="loadmore-btn" href="javascript:void(0)" data-offset="' . ( thinkai_set( $args, 'offset' ) + thinkai_set( $args, 'showposts' ) ) . '" data-order="' . thinkai_set( $args, 'order' ) . '" data-orderby="' . thinkai_set( $args, 'orderby' ) . '" data-count="' . thinkai_set( $args, 'showposts' ) . '"><i class="flaticon-load theme-bg"></i>' . esc_html__( "Load More", "thinkai" ) . '</a>';
|
||||
wp_send_json( [
|
||||
'post' => $output,
|
||||
'button' => $button,
|
||||
] );
|
||||
} else {
|
||||
wp_send_json( [ 'button' => $button = '<a class="loadmore-btn" href="javascript:void(0)"><i class="flaticon-load theme-bg"></i>' . esc_html__( "No More Post", "thinkai" ) . '</a>' ] );
|
||||
}
|
||||
exit;
|
||||
}
|
||||
|
||||
}
|
||||
114
wp-content/themes/thinkai/includes/classes/base.php
Normal file
114
wp-content/themes/thinkai/includes/classes/base.php
Normal file
@@ -0,0 +1,114 @@
|
||||
<?php
|
||||
|
||||
namespace THINKAI\Includes\Classes;
|
||||
|
||||
use THINKAI\Includes\Classes\Header_Enqueue;
|
||||
use THINKAI\Includes\Classes\Options;
|
||||
|
||||
/**
|
||||
* Header and Enqueue class
|
||||
*/
|
||||
class Base {
|
||||
|
||||
public static $instance;
|
||||
public $protocol;
|
||||
|
||||
/**
|
||||
* Set this value for theme options key
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $option_key = 'thinkai';
|
||||
|
||||
function __construct() {
|
||||
|
||||
}
|
||||
|
||||
function loadDefaults() {
|
||||
|
||||
$this->protocol = ( is_ssl() ) ? 'https' : 'http';
|
||||
|
||||
Header_Enqueue::init();
|
||||
|
||||
( new Options )->init();
|
||||
}
|
||||
|
||||
public static function instance() {
|
||||
|
||||
if ( isset( $GLOBALS['thinkai_base'] ) ) {
|
||||
return $GLOBALS['thinkai_base'];
|
||||
}
|
||||
|
||||
if ( is_null( self::$instance ) ) {
|
||||
self::$instance = new self();
|
||||
}
|
||||
|
||||
$GLOBALS['taon_base'] = self::$instance;
|
||||
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the theme options.
|
||||
*
|
||||
* @param string $key [description]
|
||||
* @return [type] [description]
|
||||
*/
|
||||
function option( $key = '' ) {
|
||||
|
||||
$options = (array) get_theme_mod( 'thinkai' . '_options-mods' );
|
||||
|
||||
$dn = thinkai_dot( $options );
|
||||
|
||||
if ( $key ) {
|
||||
return $dn->get( $key );
|
||||
}
|
||||
|
||||
return $dn;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* [config description]
|
||||
*
|
||||
* @param string $name [description].
|
||||
* @return array [description]
|
||||
*/
|
||||
function config( $name = '' ) {
|
||||
|
||||
$config = include get_template_directory() . '/includes/config.php';
|
||||
|
||||
$dn = new DotNotation( $config );
|
||||
$found = $dn->get( $name );
|
||||
|
||||
if ( $found ) {
|
||||
return $found;
|
||||
}
|
||||
|
||||
return $config;
|
||||
}
|
||||
|
||||
/**
|
||||
* [get_meta description]
|
||||
*
|
||||
* @param string $key [description].
|
||||
* @param string $id [description].
|
||||
* @return [type] [description]
|
||||
*/
|
||||
function get_meta( $key = '', $id = '' ) {
|
||||
global $post, $post_type;
|
||||
|
||||
if ( ! $post_type ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$id = ( $id ) ? $id : thinkai_set( $post, 'ID' );
|
||||
|
||||
$key = ( $key ) ? $key : '_sh_'.$post_type.'_settings';
|
||||
|
||||
$meta = get_post_meta( $id, $key, true );
|
||||
|
||||
return ( $meta ) ? $meta : false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,401 @@
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
* Class Name: wp_bootstrap_navwalker
|
||||
|
||||
* GitHub URI: https://github.com/twittem/wp-bootstrap-navwalker
|
||||
|
||||
* Description: A custom WordPress nav walker class to implement the Bootstrap 3 navigation style in a custom theme using the WordPress built in menu manager.
|
||||
|
||||
* Version: 2.0.4
|
||||
|
||||
* Author: Edward McIntyre - @twittem
|
||||
|
||||
* License: GPL-2.0+
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
class Bootstrap_walker_Mobile extends Walker_Nav_Menu {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
* @see Walker::start_lvl()
|
||||
|
||||
* @since 3.0.0
|
||||
|
||||
*
|
||||
|
||||
* @param string $output Passed by reference. Used to append additional content.
|
||||
|
||||
* @param int $depth Depth of page. Used for padding.
|
||||
|
||||
*/
|
||||
|
||||
public function start_lvl( &$output, $depth = 0, $args = array() ) {
|
||||
|
||||
$indent = str_repeat( "\t", $depth );
|
||||
|
||||
$output .= "\n$indent<ul role=\"menu\" class=\"nav-dropdown-sm\">\n";
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
* @see Walker::start_el()
|
||||
|
||||
* @since 3.0.0
|
||||
|
||||
*
|
||||
|
||||
* @param string $output Passed by reference. Used to append additional content.
|
||||
|
||||
* @param object $item Menu item data object.
|
||||
|
||||
* @param int $depth Depth of menu item. Used for padding.
|
||||
|
||||
* @param int $current_page Menu item ID.
|
||||
|
||||
* @param object $args
|
||||
|
||||
*/
|
||||
|
||||
public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {
|
||||
|
||||
$indent = ( $depth ) ? str_repeat( "\t", $depth ) : '';
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
* Dividers, Headers or Disabled
|
||||
|
||||
* =============================
|
||||
|
||||
* Determine whether the item is a Divider, Header, Disabled or regular
|
||||
|
||||
* menu item. To prevent errors we use the strcasecmp() function to so a
|
||||
|
||||
* comparison that is not case sensitive. The strcasecmp() function returns
|
||||
|
||||
* a 0 if the strings are equal.
|
||||
|
||||
*/
|
||||
|
||||
if ( strcasecmp( $item->attr_title, 'divider' ) == 0 && $depth === 1 ) {
|
||||
|
||||
$output .= $indent . '<li role="presentation" class="divider">';
|
||||
|
||||
} else if ( strcasecmp( $item->title, 'divider') == 0 && $depth === 1 ) {
|
||||
|
||||
$output .= $indent . '<li role="presentation" class="divider">';
|
||||
|
||||
} else if ( strcasecmp( $item->attr_title, 'dropdown-header') == 0 && $depth === 1 ) {
|
||||
|
||||
$output .= $indent . '<li role="presentation" class="dropdown-header">' . esc_attr( $item->title );
|
||||
|
||||
} else if ( strcasecmp($item->attr_title, 'disabled' ) == 0 ) {
|
||||
|
||||
$output .= $indent . '<li role="presentation" class="disabled"><a href="#">' . esc_attr( $item->title ) . '</a>';
|
||||
|
||||
} else {
|
||||
|
||||
|
||||
|
||||
$class_names = $value = '';
|
||||
|
||||
|
||||
|
||||
$classes = empty( $item->classes ) ? array() : (array) $item->classes;
|
||||
|
||||
$classes[] = 'menu-item-' . $item->ID;
|
||||
|
||||
|
||||
|
||||
$class_names = join( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $item, $args ) );
|
||||
|
||||
|
||||
|
||||
if ( $args->has_children )
|
||||
|
||||
$class_names .= ' group/step-one';
|
||||
|
||||
$class_names = $class_names ? ' class="' . esc_attr( $class_names ) . '"' : '';
|
||||
|
||||
|
||||
|
||||
$id = apply_filters( 'nav_menu_item_id', 'menu-item-'. $item->ID, $item, $args );
|
||||
|
||||
$id = $id ? ' id="' . esc_attr( $id ) . '"' : '';
|
||||
|
||||
|
||||
|
||||
$output .= $indent . '<li' . $id . $value . $class_names .'>';
|
||||
|
||||
|
||||
|
||||
$atts = array();
|
||||
|
||||
$atts['title'] = ! empty( $item->title ) ? $item->title : '';
|
||||
|
||||
$atts['target'] = ! empty( $item->target ) ? $item->target : '';
|
||||
|
||||
$atts['rel'] = ! empty( $item->xfn ) ? $item->xfn : '';
|
||||
|
||||
|
||||
|
||||
// If item has_children add atts to a.
|
||||
|
||||
if ( $args->has_children && $depth === 0 ) {
|
||||
|
||||
$atts['href'] = ! empty( $item->url ) ? $item->url : '';
|
||||
$atts['class'] = 'has-dropdown nav-link nav-link-sm';
|
||||
|
||||
}elseif( $depth == 0 ){
|
||||
$atts['href'] = ! empty( $item->url ) ? $item->url : '';
|
||||
$atts['class'] = 'nav-link nav-link-sm';
|
||||
|
||||
} else {
|
||||
|
||||
$atts['href'] = ! empty( $item->url ) ? $item->url : '';
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
$atts = apply_filters( 'nav_menu_link_attributes', $atts, $item, $args );
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$attributes = '';
|
||||
|
||||
foreach ( $atts as $attr => $value ) {
|
||||
|
||||
if ( ! empty( $value ) ) {
|
||||
|
||||
$value = ( 'href' === $attr ) ? esc_url( $value ) : esc_attr( $value );
|
||||
|
||||
$attributes .= ' ' . $attr . '="' . $value . '"';
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
$item_output = $args->before;
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
||||
* Glyphicons
|
||||
|
||||
* ===========
|
||||
|
||||
* Since the the menu item is NOT a Divider or Header we check the see
|
||||
|
||||
* if there is a value in the attr_title property. If the attr_title
|
||||
|
||||
* property is NOT null we apply it as the class name for the glyphicon.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if ( $args->has_children && 0 === $depth )
|
||||
|
||||
$item_output .= '<a'. $attributes .'>'.$args->link_before . apply_filters( 'the_title', $item->title, $item->ID ) . '' . $args->link_after.'</a>';
|
||||
|
||||
else
|
||||
|
||||
$item_output .= '<a'. $attributes .'>'.$args->link_before . apply_filters( 'the_title', $item->title, $item->ID ) . $args->link_after.'</a>';
|
||||
|
||||
|
||||
|
||||
$output .= apply_filters( 'walker_nav_menu_start_el', $item_output, $item, $depth, $args );
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
* Traverse elements to create list from elements.
|
||||
|
||||
*
|
||||
|
||||
* Display one element if the element doesn't have any children otherwise,
|
||||
|
||||
* display the element and its children. Will only traverse up to the max
|
||||
|
||||
* depth and no ignore elements under that depth.
|
||||
|
||||
*
|
||||
|
||||
* This method shouldn't be called directly, use the walk() method instead.
|
||||
|
||||
*
|
||||
|
||||
* @see Walker::start_el()
|
||||
|
||||
* @since 2.5.0
|
||||
|
||||
*
|
||||
|
||||
* @param object $element Data object
|
||||
|
||||
* @param array $children_elements List of elements to continue traversing.
|
||||
|
||||
* @param int $max_depth Max depth to traverse.
|
||||
|
||||
* @param int $depth Depth of current element.
|
||||
|
||||
* @param array $args
|
||||
|
||||
* @param string $output Passed by reference. Used to append additional content.
|
||||
|
||||
* @return null Null on failure with no changes to parameters.
|
||||
|
||||
*/
|
||||
|
||||
public function display_element( $element, &$children_elements, $max_depth, $depth, $args, &$output ) {
|
||||
|
||||
if ( ! $element )
|
||||
|
||||
return;
|
||||
|
||||
|
||||
|
||||
$id_field = $this->db_fields['id'];
|
||||
|
||||
|
||||
|
||||
// Display this element.
|
||||
|
||||
if ( is_object( $args[0] ) )
|
||||
|
||||
$args[0]->has_children = ! empty( $children_elements[ $element->$id_field ] );
|
||||
|
||||
|
||||
|
||||
parent::display_element( $element, $children_elements, $max_depth, $depth, $args, $output );
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
* Menu Fallback
|
||||
|
||||
* =============
|
||||
|
||||
* If this function is assigned to the wp_nav_menu's fallback_cb variable
|
||||
|
||||
* and a manu has not been assigned to the theme location in the WordPress
|
||||
|
||||
* menu manager the function with display nothing to a non-logged in user,
|
||||
|
||||
* and will add a link to the WordPress menu manager if logged in as an admin.
|
||||
|
||||
*
|
||||
|
||||
* @param array $args passed from the wp_nav_menu function.
|
||||
|
||||
*
|
||||
|
||||
*/
|
||||
|
||||
public static function fallback( $args ) {
|
||||
|
||||
if ( current_user_can( 'manage_options' ) ) {
|
||||
|
||||
|
||||
|
||||
extract( $args );
|
||||
|
||||
|
||||
|
||||
$fb_output = null;
|
||||
|
||||
|
||||
|
||||
if ( $container ) {
|
||||
|
||||
$fb_output = '<' . $container;
|
||||
|
||||
|
||||
|
||||
if ( $container_id )
|
||||
|
||||
$fb_output .= ' id="' . $container_id . '"';
|
||||
|
||||
|
||||
|
||||
if ( $container_class )
|
||||
|
||||
$fb_output .= ' class="' . $container_class . '"';
|
||||
|
||||
|
||||
|
||||
$fb_output .= '>';
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
$fb_output .= '<ul';
|
||||
|
||||
|
||||
|
||||
if ( $menu_id )
|
||||
|
||||
$fb_output .= ' id="' . $menu_id . '"';
|
||||
|
||||
|
||||
|
||||
if ( $menu_class )
|
||||
|
||||
$fb_output .= ' class="' . $menu_class . '"';
|
||||
|
||||
|
||||
|
||||
$fb_output .= '>';
|
||||
|
||||
$fb_output .= '<li><a href="' . esc_url(admin_url( 'nav-menus.php' )) . '">Add a menu</a></li>';
|
||||
|
||||
$fb_output .= '</ul>';
|
||||
|
||||
|
||||
|
||||
if ( $container )
|
||||
|
||||
$fb_output .= '</' . $container . '>';
|
||||
|
||||
|
||||
|
||||
echo wp_kses($fb_output, true);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
171
wp-content/themes/thinkai/includes/classes/bootstrap_walker.php
Normal file
171
wp-content/themes/thinkai/includes/classes/bootstrap_walker.php
Normal file
@@ -0,0 +1,171 @@
|
||||
<?php
|
||||
/**
|
||||
* Class Name: wp_bootstrap_navwalker
|
||||
* GitHub URI: https://github.com/twittem/wp-bootstrap-navwalker
|
||||
* Description: A custom WordPress nav walker class to implement the Bootstrap 3 navigation style in a custom theme using the WordPress built in menu manager.
|
||||
* Version: 2.0.4
|
||||
* Author: Edward McIntyre - @twittem
|
||||
* License: GPL-2.0+
|
||||
*/
|
||||
class Bootstrap_walker extends Walker_Nav_Menu {
|
||||
/**
|
||||
* @see Walker::start_lvl()
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param string $output Passed by reference. Used to append additional content.
|
||||
* @param int $depth Depth of page. Used for padding.
|
||||
*/
|
||||
public function start_lvl( &$output, $depth = 0, $args = array() ) {
|
||||
$indent = str_repeat( "\t", $depth );
|
||||
$output .= "\n$indent<ul role=\"menu\" class=\"nav-dropdown\">\n";
|
||||
}
|
||||
/**
|
||||
* @see Walker::start_el()
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param string $output Passed by reference. Used to append additional content.
|
||||
* @param object $item Menu item data object.
|
||||
* @param int $depth Depth of menu item. Used for padding.
|
||||
* @param int $current_page Menu item ID.
|
||||
* @param object $args
|
||||
*/
|
||||
public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {
|
||||
$indent = ( $depth ) ? str_repeat( "\t", $depth ) : '';
|
||||
/**
|
||||
* Dividers, Headers or Disabled
|
||||
* =============================
|
||||
* Determine whether the item is a Divider, Header, Disabled or regular
|
||||
* menu item. To prevent errors we use the strcasecmp() function to so a
|
||||
* comparison that is not case sensitive. The strcasecmp() function returns
|
||||
* a 0 if the strings are equal.
|
||||
*/
|
||||
if ( strcasecmp( $item->attr_title, 'divider' ) == 0 && $depth === 1 ) {
|
||||
$output .= $indent . '<li role="presentation" class="divider">';
|
||||
} else if ( strcasecmp( $item->title, 'divider') == 0 && $depth === 1 ) {
|
||||
$output .= $indent . '<li role="presentation" class="divider">';
|
||||
} else if ( strcasecmp( $item->attr_title, 'dropdown-header') == 0 && $depth === 1 ) {
|
||||
$output .= $indent . '<li role="presentation" class="dropdown-header">' . esc_attr( $item->title );
|
||||
} else if ( strcasecmp($item->attr_title, 'disabled' ) == 0 ) {
|
||||
$output .= $indent . '<li role="presentation" class="disabled"><a href="#">' . esc_attr( $item->title ) . '</a>';
|
||||
} else {
|
||||
$class_names = $value = '';
|
||||
$classes = empty( $item->classes ) ? array() : (array) $item->classes;
|
||||
$classes[] = 'menu-item-' . $item->ID;
|
||||
$class_names = join( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $item, $args ) );
|
||||
if ( $args->has_children )
|
||||
$class_names .= ' dropdown';
|
||||
|
||||
if (in_array('current-menu-ancestor', $classes)) {
|
||||
$class_names .= ' current';
|
||||
}
|
||||
$class_names = $class_names ? ' class="' . esc_attr( $class_names ) . '"' : '';
|
||||
$id = apply_filters( 'nav_menu_item_id', 'menu-item-'. $item->ID, $item, $args );
|
||||
$id = $id ? ' id="' . esc_attr( $id ) . '"' : '';
|
||||
$output .= $indent . '<li' . $id . $value . $class_names .'>';
|
||||
$atts = array();
|
||||
$atts['title'] = ! empty( $item->title ) ? $item->title : '';
|
||||
$atts['target'] = ! empty( $item->target ) ? $item->target : '';
|
||||
$atts['rel'] = ! empty( $item->xfn ) ? $item->xfn : '';
|
||||
// If item has_children add atts to a.
|
||||
if ( $args->has_children && $depth === 0 ) {
|
||||
$atts['href'] = ! empty( $item->url ) ? $item->url : '';
|
||||
$atts['class'] = 'has-dropdown';
|
||||
}elseif( $depth == 0 ){
|
||||
$atts['href'] = ! empty( $item->url ) ? $item->url : '';
|
||||
$atts['class'] = '';
|
||||
} else {
|
||||
$atts['href'] = ! empty( $item->url ) ? $item->url : '';
|
||||
|
||||
}
|
||||
$atts = apply_filters( 'nav_menu_link_attributes', $atts, $item, $args );
|
||||
$attributes = '';
|
||||
foreach ( $atts as $attr => $value ) {
|
||||
if ( ! empty( $value ) ) {
|
||||
$value = ( 'href' === $attr ) ? esc_url( $value ) : esc_attr( $value );
|
||||
$attributes .= ' ' . $attr . '="' . $value . '"';
|
||||
}
|
||||
}
|
||||
$item_output = $args->before;
|
||||
/*
|
||||
* Glyphicons
|
||||
* ===========
|
||||
* Since the the menu item is NOT a Divider or Header we check the see
|
||||
* if there is a value in the attr_title property. If the attr_title
|
||||
* property is NOT null we apply it as the class name for the glyphicon.
|
||||
*/
|
||||
|
||||
|
||||
if ( $args->has_children && 0 === $depth )
|
||||
$item_output .= '<a'. $attributes .'>'.$args->link_before . apply_filters( 'the_title', $item->title, $item->ID ) . '' . $args->link_after.'</a>';
|
||||
else
|
||||
$item_output .= '<a'. $attributes .'>'.$args->link_before . apply_filters( 'the_title', $item->title, $item->ID ) . $args->link_after.'</a>';
|
||||
|
||||
$output .= apply_filters( 'walker_nav_menu_start_el', $item_output, $item, $depth, $args );
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Traverse elements to create list from elements.
|
||||
*
|
||||
* Display one element if the element doesn't have any children otherwise,
|
||||
* display the element and its children. Will only traverse up to the max
|
||||
* depth and no ignore elements under that depth.
|
||||
*
|
||||
* This method shouldn't be called directly, use the walk() method instead.
|
||||
*
|
||||
* @see Walker::start_el()
|
||||
* @since 2.5.0
|
||||
*
|
||||
* @param object $element Data object
|
||||
* @param array $children_elements List of elements to continue traversing.
|
||||
* @param int $max_depth Max depth to traverse.
|
||||
* @param int $depth Depth of current element.
|
||||
* @param array $args
|
||||
* @param string $output Passed by reference. Used to append additional content.
|
||||
* @return null Null on failure with no changes to parameters.
|
||||
*/
|
||||
public function display_element( $element, &$children_elements, $max_depth, $depth, $args, &$output ) {
|
||||
if ( ! $element )
|
||||
return;
|
||||
$id_field = $this->db_fields['id'];
|
||||
// Display this element.
|
||||
if ( is_object( $args[0] ) )
|
||||
$args[0]->has_children = ! empty( $children_elements[ $element->$id_field ] );
|
||||
parent::display_element( $element, $children_elements, $max_depth, $depth, $args, $output );
|
||||
}
|
||||
/**
|
||||
* Menu Fallback
|
||||
* =============
|
||||
* If this function is assigned to the wp_nav_menu's fallback_cb variable
|
||||
* and a manu has not been assigned to the theme location in the WordPress
|
||||
* menu manager the function with display nothing to a non-logged in user,
|
||||
* and will add a link to the WordPress menu manager if logged in as an admin.
|
||||
*
|
||||
* @param array $args passed from the wp_nav_menu function.
|
||||
*
|
||||
*/
|
||||
public static function fallback( $args ) {
|
||||
if ( current_user_can( 'manage_options' ) ) {
|
||||
extract( $args );
|
||||
$fb_output = null;
|
||||
if ( $container ) {
|
||||
$fb_output = '<' . $container;
|
||||
if ( $container_id )
|
||||
$fb_output .= ' id="' . $container_id . '"';
|
||||
if ( $container_class )
|
||||
$fb_output .= ' class="' . $container_class . '"';
|
||||
$fb_output .= '>';
|
||||
}
|
||||
$fb_output .= '<ul';
|
||||
if ( $menu_id )
|
||||
$fb_output .= ' id="' . $menu_id . '"';
|
||||
if ( $menu_class )
|
||||
$fb_output .= ' class="' . $menu_class . '"';
|
||||
$fb_output .= '>';
|
||||
$fb_output .= '<li><a href="' . esc_url(admin_url( 'nav-menus.php' )) . '">Add a menu</a></li>';
|
||||
$fb_output .= '</ul>';
|
||||
if ( $container )
|
||||
$fb_output .= '</' . $container . '>';
|
||||
echo wp_kses($fb_output, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
171
wp-content/themes/thinkai/includes/classes/common.php
Normal file
171
wp-content/themes/thinkai/includes/classes/common.php
Normal file
@@ -0,0 +1,171 @@
|
||||
<?php
|
||||
namespace THINKAI\Includes\Classes;
|
||||
/**
|
||||
* Common functions
|
||||
*/
|
||||
class Common {
|
||||
public static $instance;
|
||||
public $template;
|
||||
function __construct() {
|
||||
}
|
||||
public static function instance() {
|
||||
if ( is_null( self::$instance ) ) {
|
||||
self::$instance = new self();
|
||||
}
|
||||
return self::$instance;
|
||||
}
|
||||
/**
|
||||
* [data description]
|
||||
*
|
||||
* @param string $emplate [description]
|
||||
*
|
||||
* @return [type] [description]
|
||||
*/
|
||||
function data( $template = 'blog' ) {
|
||||
$this->template = $template;
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* [get description]
|
||||
*
|
||||
* @return [type] [description]
|
||||
*/
|
||||
function get() {
|
||||
$data = (array) $this->blog();
|
||||
switch ( $this->template ) {
|
||||
case 'blog':
|
||||
case 'author':
|
||||
case 'search':
|
||||
case 'tag':
|
||||
case '404':
|
||||
case 'category':
|
||||
case 'archive':
|
||||
return $this->blog( $this->template );
|
||||
break;
|
||||
case 'product':
|
||||
return $this->single( $this->template );
|
||||
break;
|
||||
case 'single':
|
||||
return $this->single( $this->template );
|
||||
break;
|
||||
case 'single-team':
|
||||
return $this->single( $this->template );
|
||||
break;
|
||||
case 'single-project':
|
||||
return $this->single( $this->template );
|
||||
break;
|
||||
case 'single-service':
|
||||
return $this->single( $this->template );
|
||||
break;
|
||||
default:
|
||||
#code...
|
||||
break;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Blog pages banner, sidebar and layout data.
|
||||
*
|
||||
* @param string $template The tempalte need to return the data for.
|
||||
*
|
||||
* @return [type] [description]
|
||||
*/
|
||||
function blog( $template = 'blog' ) {
|
||||
global $wp_query;
|
||||
$options = thinkai_WSH()->option();
|
||||
if ( ( $wp_query->is_posts_page && 'blog' == $template ) || $template == 'page' ) {
|
||||
$page_id = ( $wp_query->is_posts_page ) ? $wp_query->queried_object->ID : get_the_ID();
|
||||
|
||||
$return = [
|
||||
'layout' => thinkai_meta( 'sidebar_sidebar_layout', $page_id, 'right' ),
|
||||
'sidebar_type' => thinkai_meta( 'sidebar_source_type', $page_id, 'd' ),
|
||||
'sidebar_elementor' => thinkai_meta( 'sidebar_elementor_template', $page_id ),
|
||||
'sidebar' => thinkai_meta( 'sidebar_page_sidebar', $page_id, 'default-sidebar' ),
|
||||
'banner_type' => thinkai_meta( 'banner_source_type', $page_id ),
|
||||
'banner_elementor' => thinkai_meta( 'banner_elementor_template', $page_id ),
|
||||
'banner' => thinkai_set( thinkai_meta( 'banner_page_background', $page_id ), 'url' ),
|
||||
'banner_image' => thinkai_set( thinkai_meta( 'banner_banner_image', $page_id ), 'url' ),
|
||||
'title' => thinkai_meta( 'banner_banner_title', $page_id ),
|
||||
'features_list' => thinkai_meta( 'banner_banner_list', $page_id ),
|
||||
'enable_banner' => thinkai_meta( 'banner_page_banner', $page_id ),
|
||||
];
|
||||
} else {
|
||||
$enable_banner = $template . '_page_banner';
|
||||
$title = $template . '_banner_title';
|
||||
$features_list = $template . '_banner_list';
|
||||
$banner = $template . '_page_background';
|
||||
$banner_image = $template . '_banner_banner_image';
|
||||
$layout = $template . '_sidebar_layout';
|
||||
$sidebar = $template . '_page_sidebar';
|
||||
$bg = $options->get( $banner );
|
||||
|
||||
$return = [
|
||||
'enable_banner' => $options->get( $enable_banner ),
|
||||
'title' => $options->get( $title ) ? $options->get( $title ) : thinkai_the_title( $template ),
|
||||
'features_list' => $options->get( $features_list ) ? $options->get( $features_list ) : thinkai_the_title( $template ),
|
||||
'banner' => thinkai_set( $bg, 'url' ),
|
||||
'banner_image' => thinkai_set( $banner_image, 'url' ),
|
||||
'sidebar' => $options->get( $sidebar, 'default-sidebar' ),
|
||||
'layout' => $options->get( $layout, 'right' ),
|
||||
];
|
||||
}
|
||||
$return['tpl-type'] = $options->get( $template . '_source_type' );
|
||||
$return['tpl-elementor'] = $options->get( $template . '_elementor_template' );
|
||||
$return['author'] = $options->get( $template . '_post_author' );
|
||||
$return['date'] = $options->get( $template . '_post_date' );
|
||||
$return['comments'] = $options->get( $template . '_post_comments' );
|
||||
return new DotNotation( $return );
|
||||
}
|
||||
/**
|
||||
* Post detail and custom post types datail meta.
|
||||
*
|
||||
* @param string $template The template for which data is need to be returned.
|
||||
*
|
||||
* @return [type] [description]
|
||||
*/
|
||||
public function single( $template = 'single' ) {
|
||||
global $wp_query;
|
||||
$options = thinkai_WSH()->option();
|
||||
|
||||
$page_id = ( $wp_query->is_posts_page ) ? $wp_query->queried_object->ID : get_the_ID();
|
||||
if(is_woocommerce()) {
|
||||
if(is_shop()){
|
||||
$page_id = get_option( 'woocommerce_shop_page_id' );
|
||||
}elseif(is_cart()){
|
||||
$page_id = get_option( 'woocommerce_cart_page_id' );
|
||||
}elseif(is_checkout()){
|
||||
$page_id = get_option( 'woocommerce_checkout_page_id' );
|
||||
}elseif(is_account_page()){
|
||||
$page_id = get_option( 'woocommerce_myaccount_page_id' );
|
||||
}else{
|
||||
$page_id = ( $wp_query->is_posts_page ) ? $wp_query->queried_object->ID : get_the_ID();
|
||||
}
|
||||
}
|
||||
|
||||
$title = thinkai_meta( 'banner_banner_title', $page_id );
|
||||
$features_list = thinkai_meta( 'banner_banner_list', $page_id );
|
||||
$banner_image = thinkai_meta( 'banner_banner_image', $page_id );
|
||||
$return = [
|
||||
'tpl-type' => $options->get( $template . '_source_type', 'd' ),
|
||||
'tpl-elementor' => $options->get( $template . '_elementor_template' ),
|
||||
'layout' => thinkai_meta( 'sidebar_sidebar_layout', $page_id, 'right' ),
|
||||
'sidebar_type' => thinkai_meta( 'sidebar_source_type', $page_id, 'd' ),
|
||||
'sidebar_elementor' => thinkai_meta( 'sidebar_elementor_template', $page_id ),
|
||||
'sidebar' => thinkai_meta( 'sidebar_page_sidebar', $page_id, 'default-sidebar' ),
|
||||
'banner_type' => thinkai_meta( 'banner_source_type', $page_id ),
|
||||
'banner_elementor' => thinkai_meta( 'banner_elementor_template', $page_id ),
|
||||
'banner' => thinkai_set( thinkai_meta( 'banner_page_background', $page_id ), 'url' ),
|
||||
'banner_image' => thinkai_set( thinkai_meta( 'banner_banner_image', $page_id ), 'url' ),
|
||||
'title' => ($title),
|
||||
'features_list' => ($features_list),
|
||||
'enable_banner' => thinkai_meta( 'banner_page_banner', $page_id ),
|
||||
'date' => $options->get( 'single_post_date', 1 ),
|
||||
'author' => $options->get( 'single_post_author', 1 ),
|
||||
'comments' => $options->get( 'single_post_comments', 1 ),
|
||||
'tag' => $options->get( 'single_post_tag' ),
|
||||
'share' => $options->get( 'single_post_share' ),
|
||||
'share_list' => $options->get( 'single_social_share' ),
|
||||
'author_box' => $options->get( 'single_post_author_box' ),
|
||||
];
|
||||
return new DotNotation( $return );
|
||||
}
|
||||
}
|
||||
194
wp-content/themes/thinkai/includes/classes/dotnotation.php
Normal file
194
wp-content/themes/thinkai/includes/classes/dotnotation.php
Normal file
@@ -0,0 +1,194 @@
|
||||
<?php
|
||||
|
||||
namespace THINKAI\Includes\Classes;
|
||||
|
||||
/**
|
||||
* Dot notation for access multidimensional arrays.
|
||||
*
|
||||
* $dn = new DotNotation(['bar'=>['baz'=>['foo'=>true]]]);
|
||||
*
|
||||
* $value = $dn->get('bar.baz.foo'); // $value == true
|
||||
*
|
||||
* $dn->set('bar.baz.foo', false); // ['foo'=>false]
|
||||
*
|
||||
* $dn->add('bar.baz', ['boo'=>true]); // ['foo'=>false,'boo'=>true]
|
||||
*
|
||||
* @author Anton Medvedev <anton (at) elfet (dot) ru>
|
||||
* @version 2.0
|
||||
* @license MIT
|
||||
*/
|
||||
class DotNotation
|
||||
{
|
||||
const SEPARATOR = '/[:\.]/';
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $values = array();
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
public function __construct(array $values)
|
||||
{
|
||||
$this->values = $values;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $path
|
||||
* @param string $default
|
||||
* @return mixed
|
||||
*/
|
||||
public function get($path, $default = null)
|
||||
{
|
||||
$array = $this->values;
|
||||
|
||||
if (!empty($path)) {
|
||||
$keys = $this->explode($path);
|
||||
foreach ($keys as $key) {
|
||||
if (isset($array[$key]) && ! empty( $array[$key] ) ) {
|
||||
$array = $array[$key];
|
||||
} else {
|
||||
return $default;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $array;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $path
|
||||
* @param mixed $value
|
||||
*/
|
||||
public function set($path, $value)
|
||||
{
|
||||
if (!empty($path)) {
|
||||
$at = & $this->values;
|
||||
$keys = $this->explode($path);
|
||||
|
||||
while (count($keys) > 0) {
|
||||
if (count($keys) === 1) {
|
||||
if (is_array($at)) {
|
||||
$at[array_shift($keys)] = $value;
|
||||
} else {
|
||||
throw new \RuntimeException("Can not set value at this path ($path) because is not array.");
|
||||
}
|
||||
} else {
|
||||
$key = array_shift($keys);
|
||||
|
||||
if (!isset($at[$key])) {
|
||||
$at[$key] = array();
|
||||
}
|
||||
|
||||
$at = & $at[$key];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$this->values = $value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $path
|
||||
* @param array $values
|
||||
*/
|
||||
public function add($path, array $values)
|
||||
{
|
||||
$get = (array)$this->get($path);
|
||||
$this->set($path, $this->arrayMergeRecursiveDistinct($get, $values));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $path
|
||||
* @return bool
|
||||
*/
|
||||
public function have($path)
|
||||
{
|
||||
$keys = $this->explode($path);
|
||||
$array = $this->values;
|
||||
foreach ($keys as $key) {
|
||||
if (isset($array[$key])) {
|
||||
$array = $array[$key];
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $values
|
||||
*/
|
||||
public function setValues($values)
|
||||
{
|
||||
$this->values = $values;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function getValues()
|
||||
{
|
||||
return $this->values;
|
||||
}
|
||||
|
||||
protected function explode($path)
|
||||
{
|
||||
return preg_split(self::SEPARATOR, $path);
|
||||
}
|
||||
|
||||
/**
|
||||
* array_merge_recursive does indeed merge arrays, but it converts values with duplicate
|
||||
* keys to arrays rather than overwriting the value in the first array with the duplicate
|
||||
* value in the second array, as array_merge does. I.e., with array_merge_recursive,
|
||||
* this happens (documented behavior):
|
||||
*
|
||||
* array_merge_recursive(array('key' => 'org value'), array('key' => 'new value'));
|
||||
* => array('key' => array('org value', 'new value'));
|
||||
*
|
||||
* arrayMergeRecursiveDistinct does not change the datatypes of the values in the arrays.
|
||||
* Matching keys' values in the second array overwrite those in the first array, as is the
|
||||
* case with array_merge, i.e.:
|
||||
*
|
||||
* arrayMergeRecursiveDistinct(array('key' => 'org value'), array('key' => 'new value'));
|
||||
* => array('key' => array('new value'));
|
||||
*
|
||||
* Parameters are passed by reference, though only for performance reasons. They're not
|
||||
* altered by this function.
|
||||
*
|
||||
* If key is integer, it will be merged like array_merge do:
|
||||
* arrayMergeRecursiveDistinct(array(0 => 'org value'), array(0 => 'new value'));
|
||||
* => array(0 => 'org value', 1 => 'new value');
|
||||
*
|
||||
* @param array $array1
|
||||
* @param array $array2
|
||||
* @return array
|
||||
* @author Daniel <daniel (at) danielsmedegaardbuus (dot) dk>
|
||||
* @author Gabriel Sobrinho <gabriel (dot) sobrinho (at) gmail (dot) com>
|
||||
* @author Anton Medvedev <anton (at) elfet (dot) ru>
|
||||
*/
|
||||
protected function arrayMergeRecursiveDistinct(array &$array1, array &$array2)
|
||||
{
|
||||
$merged = $array1;
|
||||
|
||||
foreach ($array2 as $key => &$value) {
|
||||
if (is_array($value) && isset ($merged[$key]) && is_array($merged[$key])) {
|
||||
if (is_int($key)) {
|
||||
$merged[] = $this->arrayMergeRecursiveDistinct($merged[$key], $value);
|
||||
} else {
|
||||
$merged[$key] = $this->arrayMergeRecursiveDistinct($merged[$key], $value);
|
||||
}
|
||||
} else {
|
||||
if (is_int($key)) {
|
||||
$merged[] = $value;
|
||||
} else {
|
||||
$merged[$key] = $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $merged;
|
||||
}
|
||||
}
|
||||
204
wp-content/themes/thinkai/includes/classes/header-enqueue.php
Normal file
204
wp-content/themes/thinkai/includes/classes/header-enqueue.php
Normal file
@@ -0,0 +1,204 @@
|
||||
<?php
|
||||
|
||||
namespace THINKAI\Includes\Classes;
|
||||
|
||||
|
||||
/**
|
||||
* Header and Enqueue class
|
||||
*/
|
||||
class Header_Enqueue {
|
||||
|
||||
|
||||
public static function init() {
|
||||
add_action( 'wp_enqueue_scripts', array( __CLASS__, 'enqueue' ) );
|
||||
|
||||
add_filter( 'wp_resource_hints', array( __CLASS__, 'resource_hints' ), 10, 2 );
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the arrays from method scripts and styles and process them to load.
|
||||
* Styles are being loaded by default while scripts only enqueue and can be loaded where required.
|
||||
*
|
||||
* @return void This function returns nothing.
|
||||
*/
|
||||
public static function enqueue() {
|
||||
|
||||
self::scripts();
|
||||
|
||||
self::styles();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* The major scripts loader to load all the scripts of the theme. Developer can hookup own scripts.
|
||||
* All the scripts are being load in footer.
|
||||
*
|
||||
* @return array Returns the array of scripts to load
|
||||
*/
|
||||
public static function scripts() {
|
||||
$options = get_theme_mod( 'thinkai' . '_options-mods' );
|
||||
$ssl = is_ssl() ? 'https' : 'http';
|
||||
|
||||
$scripts = array(
|
||||
);
|
||||
|
||||
$scripts = apply_filters( 'THINKAI/includes/classes/header_enqueue/scripts', $scripts );
|
||||
/**
|
||||
* Enqueue the scripts
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
foreach ( $scripts as $name => $js ) {
|
||||
|
||||
if ( strstr( $js, 'http' ) || strstr( $js, 'https' ) || strstr( $js, 'googleapis.com' ) ) {
|
||||
|
||||
wp_register_script( "{$name}", $js, '', '', true );
|
||||
} else {
|
||||
wp_register_script( "{$name}", get_template_directory_uri() . '/' . $js, '', '', true );
|
||||
}
|
||||
}
|
||||
|
||||
wp_enqueue_script( array(
|
||||
) );
|
||||
|
||||
|
||||
$header_data = array(
|
||||
'ajaxurl' => esc_url( admin_url( 'admin-ajax.php' ) ),
|
||||
'nonce' => wp_create_nonce( THINKAI_NONCE ),
|
||||
);
|
||||
|
||||
wp_localize_script( 'jquery', 'thinkai_data', $header_data );
|
||||
|
||||
if ( thinkai_set( $options, 'footer_js' ) ) {
|
||||
|
||||
wp_add_inline_script( 'jquery', thinkai_set( $options, 'footer_js' ) );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* The major styles loader to load all the styles of the theme. Developer can hookup own styles.
|
||||
* All the styles are being load in head.
|
||||
*
|
||||
* @return array Returns the array of styles to load
|
||||
*/
|
||||
public static function styles() {
|
||||
$options = thinkai_WSH()->option();
|
||||
$header_meta = get_post_meta( get_the_ID(), 'header_style_settings');
|
||||
$header_option = $options->get( 'header_style_settings' );
|
||||
$header = ( $header_meta ) ? $header_meta['0'] : $header_option;
|
||||
|
||||
if ( $header == 'header_v1' ) {
|
||||
$color_scheme = 'assets/css/color.css';
|
||||
} elseif ( $header == 'header_v2' ) {
|
||||
$color_scheme = 'assets/css/color-2.css';
|
||||
} elseif ( $header == 'header_v3' ) {
|
||||
$color_scheme = 'assets/css/color-3.css';
|
||||
} elseif ( $header == 'header_v4' ) {
|
||||
$color_scheme = 'assets/css/color-4.css';
|
||||
} elseif ( $header == 'header_v5' ) {
|
||||
$color_scheme = 'assets/css/color-5.css';
|
||||
} else {
|
||||
$color_scheme = 'assets/css/color.css';
|
||||
}
|
||||
$styles = array(
|
||||
//'google-fonts' => self::fonts_url(),
|
||||
);
|
||||
|
||||
|
||||
$styles = apply_filters( 'THINKAI/includes/classes/header_enqueue/styles', $styles );
|
||||
|
||||
/**
|
||||
* Enqueue the styles
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
foreach ( $styles as $name => $style ) {
|
||||
|
||||
if ( strstr( $style, 'http' ) || strstr( $style, 'https' ) || strstr( $style, 'fonts.googleapis' ) ) {
|
||||
wp_enqueue_style( "thinkai-{$name}", $style );
|
||||
} else {
|
||||
wp_enqueue_style( "thinkai-{$name}", get_template_directory_uri() . '/' . $style );
|
||||
}
|
||||
}
|
||||
$options = thinkai_WSH()->option();
|
||||
$custom_style = '';
|
||||
|
||||
wp_add_inline_style( 'color', $custom_style );
|
||||
|
||||
$header_styles = self::header_styles();
|
||||
|
||||
if ( $custom_font = $options->get('theme_custom_font') ) {
|
||||
$header_styles .= thinkai_custom_fonts_load( $custom_font );
|
||||
}
|
||||
|
||||
wp_add_inline_style( 'thinkai-main-style', $header_styles );
|
||||
}
|
||||
|
||||
/**
|
||||
* Register custom fonts.
|
||||
*/
|
||||
public static function fonts_url() {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Add preconnect for Google Fonts.
|
||||
*
|
||||
* @since THINKAI 1.0
|
||||
*
|
||||
* @param array $urls URLs to print for resource hints.
|
||||
* @param string $relation_type The relation type the URLs are printed.
|
||||
*
|
||||
* @return array $urls URLs to print for resource hints.
|
||||
*/
|
||||
public static function resource_hints( $urls, $relation_type ) {
|
||||
if ( wp_style_is( 'thinkai-fonts', 'queue' ) && 'preconnect' === $relation_type ) {
|
||||
$urls[] = array(
|
||||
'href' => 'https://fonts.gstatic.com',
|
||||
'crossorigin',
|
||||
);
|
||||
}
|
||||
|
||||
return $urls;
|
||||
}
|
||||
|
||||
/**
|
||||
* header_styles
|
||||
*
|
||||
* @since THINKAI 1.0
|
||||
*
|
||||
* @param array $urls URLs to print for resource hints.
|
||||
*/
|
||||
public static function header_styles() {
|
||||
|
||||
$data = \THINKAI\Includes\Classes\Common::instance()->data( 'blog' )->get();
|
||||
|
||||
$options = thinkai_WSH()->option();
|
||||
|
||||
$styles = '';
|
||||
if ( $options->get( 'footer_top_button' ) ) :
|
||||
$styles .= "#topcontrol {
|
||||
background: " . $options->get( 'button_bg' ) . " none repeat scroll 0 0 !important;
|
||||
opacity: 0.5;
|
||||
|
||||
color: " . $options->get( 'button_color' ) . " !important;
|
||||
|
||||
}";
|
||||
|
||||
endif;
|
||||
|
||||
$settings = get_theme_mod( 'thinkai' . '_options-mods' );
|
||||
|
||||
if ( $custom_font = thinkai_set( $settings, 'theme_custom_font' ) ) {
|
||||
|
||||
$styles .= apply_filters('thinkai_redux_custom_fonts_load', $custom_font );
|
||||
|
||||
|
||||
}
|
||||
|
||||
return $styles;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
29
wp-content/themes/thinkai/includes/classes/helpers.php
Normal file
29
wp-content/themes/thinkai/includes/classes/helpers.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace THINKAI\Includes\Classes;
|
||||
|
||||
|
||||
/**
|
||||
* Header and Enqueue class
|
||||
*/
|
||||
class Helpers {
|
||||
|
||||
|
||||
function __construct() {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Hook up main headers with different header styles
|
||||
*
|
||||
* @return void This function returns nothing.
|
||||
*/
|
||||
function header() {
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
52
wp-content/themes/thinkai/includes/classes/hooks.php
Normal file
52
wp-content/themes/thinkai/includes/classes/hooks.php
Normal file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
|
||||
namespace THINKAI\Includes\Classes;
|
||||
|
||||
|
||||
/**
|
||||
* Header and Enqueue class
|
||||
*/
|
||||
class Hooks {
|
||||
|
||||
|
||||
function __construct() {
|
||||
|
||||
add_action( 'thinkai_main_header', array( $this, 'header' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Hook up main headers with different header styles
|
||||
*
|
||||
* @return void This function returns nothing.
|
||||
*/
|
||||
function header() {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Footer and Enqueue class
|
||||
*/
|
||||
class Hooks {
|
||||
|
||||
|
||||
function __construct() {
|
||||
|
||||
add_action( 'thinkai_main_footer', array( $this, 'footer' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Hook up main footer with different footer styles
|
||||
*
|
||||
* @return void This function returns nothing.
|
||||
*/
|
||||
function footer() {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
311
wp-content/themes/thinkai/includes/classes/options.php
Normal file
311
wp-content/themes/thinkai/includes/classes/options.php
Normal file
@@ -0,0 +1,311 @@
|
||||
<?php
|
||||
|
||||
namespace THINKAI\Includes\Classes;
|
||||
|
||||
|
||||
/**
|
||||
* Header and Enqueue class
|
||||
*/
|
||||
class Options {
|
||||
|
||||
public static $instance;
|
||||
|
||||
/**
|
||||
* Set this value for theme options key
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $opt_name = 'thinkai' . '_options';
|
||||
|
||||
private $menu_title = '';
|
||||
|
||||
private $page_title = '';
|
||||
|
||||
private $menu_type = 'submenu';
|
||||
|
||||
private $page_slug = 'thinkai' . '_options';
|
||||
|
||||
private $customizer = true;
|
||||
|
||||
private $admin_bar_icon = 'dashicons-portfolio';
|
||||
|
||||
private $page_parent = 'themes.php';
|
||||
|
||||
private $menu_icon = 'dashicons-settings';
|
||||
|
||||
private $docs_link = 'https://docs.themekalia.com';
|
||||
|
||||
private $google_api_key = '';
|
||||
|
||||
function init() {
|
||||
|
||||
if ( ! class_exists( 'Redux' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$this->opt_name = apply_filters( 'redux_demo/opt_name', $this->opt_name );
|
||||
$this->menu_title = esc_html__( 'THINKAI Options', 'thinkai' );
|
||||
$this->page_title = esc_html__( 'THINKAI Options', 'thinkai' );
|
||||
|
||||
$this->args();
|
||||
|
||||
$this->sections();
|
||||
}
|
||||
|
||||
public static function instance() {
|
||||
|
||||
if ( is_null( self::$instance ) ) {
|
||||
self::$instance = new self();
|
||||
}
|
||||
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* [args description]
|
||||
*
|
||||
* @return [type] [description]
|
||||
*/
|
||||
function args() {
|
||||
|
||||
/**s
|
||||
* ---> SET ARGUMENTS
|
||||
* All the possible arguments for Redux.
|
||||
* For full documentation on arguments, please refer to: https://github.com/ReduxFramework/ReduxFramework/wiki/Arguments
|
||||
* */
|
||||
|
||||
$theme = wp_get_theme(); // For use with some settings. Not necessary.
|
||||
|
||||
$args = array(
|
||||
/*TYPICAL -> Change these values as you need/desire*/
|
||||
'opt_name' => $this->opt_name,
|
||||
/*This is where your data is stored in the database and also becomes your global variable name.*/
|
||||
'display_name' => $theme->get( 'Name' ),
|
||||
/*Name that appears at the top of your panel*/
|
||||
'display_version' => $theme->get( 'Version' ),
|
||||
/*Version that appears at the top of your panel*/
|
||||
'menu_type' => $this->menu_type,
|
||||
/*Specify if the admin menu should appear or not. Options: menu or submenu (Under appearance only)*/
|
||||
'allow_sub_menu' => true,
|
||||
/*Show the sections below the admin menu item or not*/
|
||||
'menu_title' => $this->menu_title,
|
||||
'page_title' => $this->page_title,
|
||||
/*You will need to generate a Google API key to use this feature.
|
||||
Please visit: https://developers.google.com/fonts/docs/developer_api#Auth*/
|
||||
'google_api_key' => $this->google_api_key,
|
||||
/*Set it you want google fonts to update weekly. A google_api_key value is required.*/
|
||||
'google_update_weekly' => false,
|
||||
/*Must be defined to add google fonts to the typography module*/
|
||||
'async_typography' => true,
|
||||
/*Use a asynchronous font on the front end or font string
|
||||
'disable_google_fonts_link' => true, Disable this in case you want to create your own google fonts loader*/
|
||||
'admin_bar' => true,
|
||||
/*Show the panel pages on the admin bar*/
|
||||
'admin_bar_icon' => $this->admin_bar_icon,
|
||||
/*Choose an icon for the admin bar menu*/
|
||||
'admin_bar_priority' => 50,
|
||||
/*Choose an priority for the admin bar menu*/
|
||||
'global_variable' => 'thinkai_options',
|
||||
/*Set a different name for your global variable other than the opt_name*/
|
||||
'dev_mode' => false,
|
||||
/*Show the time the page took to load, etc*/
|
||||
'update_notice' => false,
|
||||
/*If dev_mode is enabled, will notify developer of updated versions available in the GitHub Repo*/
|
||||
'customizer' => $this->customizer,
|
||||
/*Enable basic customizer support
|
||||
'open_expanded' => true, // Allow you to start the panel in an expanded way initially.
|
||||
'disable_save_warn' => true, // Disable the save warning when a user changes a field*/
|
||||
|
||||
/*OPTIONAL -> Give you extra features*/
|
||||
'page_priority' => null,
|
||||
/*Order where the menu appears in the admin area. If there is any conflict, something will not show. Warning.*/
|
||||
'page_parent' => $this->page_parent,
|
||||
/*For a full list of options, visit: http://codex.wordpress.org/Function_Reference/add_submenu_page#Parameters*/
|
||||
'page_permissions' => 'manage_options',
|
||||
/*Permissions needed to access the options panel.*/
|
||||
'menu_icon' => '',
|
||||
/*Specify a custom URL to an icon*/
|
||||
'last_tab' => '',
|
||||
/*Force your panel to always open to a specific tab (by id)*/
|
||||
'page_icon' => 'icon-themes',
|
||||
/*Icon displayed in the admin panel next to your menu_title*/
|
||||
'page_slug' => $this->page_slug,
|
||||
/*Page slug used to denote the panel, will be based off page title then menu title then opt_name if not provided*/
|
||||
'save_defaults' => true,
|
||||
/*On load save the defaults to DB before user clicks save or not*/
|
||||
'default_show' => false,
|
||||
/*If true, shows the default value next to each field that is not the default value.*/
|
||||
'default_mark' => '',
|
||||
/*What to print by the field's title if the value shown is default. Suggested: **/
|
||||
'show_import_export' => true,
|
||||
/*Shows the Import/Export panel when not used as a field.*/
|
||||
/*CAREFUL -> These options are for advanced use only*/
|
||||
'transient_time' => 60 * MINUTE_IN_SECONDS,
|
||||
'output' => true,
|
||||
/*Global shut-off for dynamic CSS output by the framework. Will also disable google fonts output*/
|
||||
'output_tag' => true,
|
||||
/*Allows dynamic CSS to be generated for customizer and google fonts, but stops the dynamic CSS from going to the head
|
||||
'footer_credit' => '', Disable the footer credit of Redux. Please leave if you can help it.
|
||||
|
||||
FUTURE -> Not in use yet, but reserved or partially implemented. Use at your own risk.*/
|
||||
'database' => 'theme_mods',
|
||||
/*possible: options, theme_mods, theme_mods_expanded, transient. Not fully functional, warning!*/
|
||||
'use_cdn' => true,
|
||||
/*If you prefer not to use the CDN for Select2, Ace Editor, and others, you may download the Redux Vendor Support plugin yourself and run locally or embed it in your code.
|
||||
|
||||
HINTS*/
|
||||
'hints' => array(
|
||||
'icon' => 'el el-question-sign',
|
||||
'icon_position' => 'right',
|
||||
'icon_color' => 'lightgray',
|
||||
'icon_size' => 'normal',
|
||||
'tip_style' => array(
|
||||
'color' => 'red',
|
||||
'shadow' => true,
|
||||
'rounded' => false,
|
||||
'style' => '',
|
||||
),
|
||||
'tip_position' => array(
|
||||
'my' => 'top left',
|
||||
'at' => 'bottom right',
|
||||
),
|
||||
'tip_effect' => array(
|
||||
'show' => array(
|
||||
'effect' => 'slide',
|
||||
'duration' => '500',
|
||||
'event' => 'mouseover',
|
||||
),
|
||||
'hide' => array(
|
||||
'effect' => 'slide',
|
||||
'duration' => '500',
|
||||
'event' => 'click mouseleave',
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
|
||||
|
||||
// SOCIAL ICONS -> Setup custom links in the footer for quick links in your panel footer icons.
|
||||
$args['share_icons'][] = array(
|
||||
'url' => 'https://www.pinterest.com/themekalia_/',
|
||||
'title' => 'Visit us on Pinterest',
|
||||
'icon' => 'el el-pinterest',
|
||||
);
|
||||
$args['share_icons'][] = array(
|
||||
'url' => 'https://www.facebook.com/people/@/themekalia',
|
||||
'title' => 'Like us on Facebook',
|
||||
'icon' => 'el el-facebook',
|
||||
);
|
||||
$args['share_icons'][] = array(
|
||||
'url' => 'https://twitter.com/themekalia',
|
||||
'title' => 'Follow us on Twitter',
|
||||
'icon' => 'el el-twitter',
|
||||
);
|
||||
$args['share_icons'][] = array(
|
||||
'url' => 'https://www.linkedin.com/company/themekalia-web-arcade',
|
||||
'title' => 'Find us on LinkedIn',
|
||||
'icon' => 'el el-linkedin',
|
||||
);
|
||||
|
||||
// Panel Intro text -> before the form
|
||||
if ( ! isset( $args['global_variable'] ) || $args['global_variable'] !== false ) {
|
||||
if ( ! empty( $args['global_variable'] ) ) {
|
||||
$v = $args['global_variable'];
|
||||
} else {
|
||||
$v = str_replace( '-', '_', $args['opt_name'] );
|
||||
}
|
||||
$args['intro_text'] = '';
|
||||
} else {
|
||||
$args['intro_text'] = '';
|
||||
}
|
||||
|
||||
// Add content after the form.
|
||||
$args['footer_text'] = '';
|
||||
\Redux::setArgs( $this->opt_name, $args );
|
||||
do_action( 'templatepath/themes/after_redux_setup', $this->opt_name, $args );
|
||||
}
|
||||
|
||||
|
||||
function helpTabs() {
|
||||
|
||||
/*
|
||||
* ---> START HELP TABS
|
||||
*/
|
||||
|
||||
$tabs = array(
|
||||
array(
|
||||
'id' => 'redux-help-tab-1',
|
||||
'title' => esc_html__( 'Theme Information 1', 'thinkai' ),
|
||||
'content' => esc_html__( '<p>This is the tab content, HTML is allowed.</p>', 'thinkai' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'redux-help-tab-2',
|
||||
'title' => esc_html__( 'Theme Information 2', 'thinkai' ),
|
||||
'content' => esc_html__( '<p>This is the tab content, HTML is allowed.</p>', 'thinkai' ),
|
||||
),
|
||||
);
|
||||
Redux::setHelpTab( $opt_name, $tabs );
|
||||
|
||||
// Set the help sidebar
|
||||
$content = '<p>' . esc_html__( 'This is the sidebar content, HTML is allowed.', 'thinkai' ) . '</p>';
|
||||
Redux::setHelpSidebar( $opt_name, $content );
|
||||
}
|
||||
|
||||
|
||||
function sections() {
|
||||
|
||||
$sections = array(
|
||||
'general_setting',
|
||||
'logo_setting',
|
||||
'headers_setting',
|
||||
'mobile_setting',
|
||||
'sidebar_setting',
|
||||
'footer_setting',
|
||||
'blog_setting',
|
||||
'tag_setting',
|
||||
'archive_setting',
|
||||
'author_setting',
|
||||
'category_setting',
|
||||
'search_setting',
|
||||
'404_setting',
|
||||
'single_post_setting',
|
||||
'language_setting',
|
||||
'custom_sidebar_setting',
|
||||
'social_setting',
|
||||
'custom_fonts_setting',
|
||||
'typography_setting',
|
||||
'body_font_setting',
|
||||
);
|
||||
|
||||
|
||||
$sections_path = array();
|
||||
|
||||
// Set the path for options.
|
||||
foreach ( $sections as $sec ) {
|
||||
$sections_path[ $sec ] = get_template_directory() . '/includes/resource/options/' . $sec . '.php';
|
||||
}
|
||||
|
||||
$sections_path = apply_filters( 'thinkai_redux_sections', $sections_path );
|
||||
|
||||
$count = 1;
|
||||
|
||||
|
||||
foreach ( $sections_path as $key => $file ) {
|
||||
|
||||
if ( file_exists( $file ) ) {
|
||||
|
||||
$options = include( $file );
|
||||
|
||||
$options['priority'] = $count;
|
||||
|
||||
$options = apply_filters( "thinkai_redux_sections_{$key}", $options );
|
||||
|
||||
\Redux::setSection( $this->opt_name, $options );
|
||||
}
|
||||
|
||||
$count ++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
246
wp-content/themes/thinkai/includes/classes/visual-composer.php
Normal file
246
wp-content/themes/thinkai/includes/classes/visual-composer.php
Normal file
@@ -0,0 +1,246 @@
|
||||
<?php
|
||||
|
||||
namespace THINKAI\Includes\Classes;
|
||||
|
||||
/**
|
||||
* Visual Composer array mapper and render the output.
|
||||
*/
|
||||
class Visual_Composer {
|
||||
|
||||
/**
|
||||
* [$maps description]
|
||||
* @var array
|
||||
*/
|
||||
protected $maps = array(
|
||||
'heading1',
|
||||
'our_services',
|
||||
'choose_us',
|
||||
'projects',
|
||||
'blog',
|
||||
'testimonial',
|
||||
'brands',
|
||||
'slider',
|
||||
'get_in_touch',
|
||||
'our_services2',
|
||||
'services_news',
|
||||
'circled_services',
|
||||
'custom_info',
|
||||
'services_icon',
|
||||
'our_experts',
|
||||
'pricing_plan',
|
||||
'projects2',
|
||||
'faqs',
|
||||
'contact_info',
|
||||
'contact_form',
|
||||
'map',
|
||||
'estimated_time',
|
||||
'pricing_plan2',
|
||||
'about_us',
|
||||
'widget_contact',
|
||||
'useful_links',
|
||||
'store_hours',
|
||||
'get_offer',
|
||||
'header_logo',
|
||||
'contact_us',
|
||||
'main_menu',
|
||||
'simple_info',
|
||||
'header_button',
|
||||
'search_box',
|
||||
'header_contact_info',
|
||||
'header_social_icons',
|
||||
'reparing',
|
||||
'about_us_carousel',
|
||||
'repair_video',
|
||||
'problem_fix_form',
|
||||
'widget_blog',
|
||||
'widget_newsletter',
|
||||
'widget_social_profiles',
|
||||
'funfacts',
|
||||
'repaired_parallax',
|
||||
'appointment_banner',
|
||||
'repair_device',
|
||||
'best_opertunity',
|
||||
'simple_banner',
|
||||
'states',
|
||||
'repair_model',
|
||||
'parts_price',
|
||||
'supported_models',
|
||||
'branches',
|
||||
'latest_articles',
|
||||
'projects3',
|
||||
'pricing_plans3',
|
||||
'funfact2',
|
||||
'services3',
|
||||
'contact_infobar',
|
||||
'services4',
|
||||
'about_us2',
|
||||
'choose_us2',
|
||||
'team',
|
||||
'funfacts3',
|
||||
'specialized_services',
|
||||
'services5',
|
||||
'pricing_plans4',
|
||||
'blog2',
|
||||
'call_back',
|
||||
'sponsors',
|
||||
'fun_facts_boxes',
|
||||
'gallery',
|
||||
'portfolio',
|
||||
'featured_banner',
|
||||
'video_banner',
|
||||
'featured_carousel'
|
||||
);
|
||||
|
||||
/**
|
||||
* [__construct description]
|
||||
*/
|
||||
function __construct() {
|
||||
|
||||
if ( ! function_exists( 'vc_map' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
vc_set_default_editor_post_types( array( 'page', 'static_block' ) );
|
||||
|
||||
|
||||
add_action( 'vc_before_init', array( $this, 'init' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* VC Map main init
|
||||
* @return void [description]
|
||||
*/
|
||||
function init() {
|
||||
|
||||
// set vc as theme.
|
||||
vc_set_as_theme();
|
||||
|
||||
if ( function_exists( 'vc_addshortcode_param' ) ) {
|
||||
vc_addshortcode_param( 'toggle', array( $this, 'toggle' ) );
|
||||
}
|
||||
|
||||
$dir = get_stylesheet_directory() . '/shortcodes'; // First, set new directory for templates
|
||||
vc_set_shortcodes_templates_dir( $dir );
|
||||
|
||||
// Map the params of existing elements.
|
||||
$this->map_params();
|
||||
|
||||
$maps = apply_filters( 'thinkai_vc_map', $this->maps );
|
||||
|
||||
foreach ( $maps as $value) {
|
||||
|
||||
$file = $this->get_file( $value );
|
||||
|
||||
if ( file_exists( $file ) ) {
|
||||
|
||||
$data = include $file;
|
||||
|
||||
vc_map( $data );
|
||||
|
||||
if ( function_exists( 'wpthinkai_shortcode' ) ) {
|
||||
$tag = esc_attr( thinkai_set( $data, 'base' ) );
|
||||
|
||||
wpthinkai_shortcode( $tag, array( $this, 'output' ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function output( $atts, $content = null, $tag ) {
|
||||
|
||||
$params = $this->shortcodeParams( $tag );
|
||||
|
||||
ob_start();
|
||||
|
||||
thinkai_template_load( 'shortcodes/' . $tag . '.php', compact( 'atts', 'content', 'tag' ) );
|
||||
|
||||
return ob_get_clean();
|
||||
|
||||
}
|
||||
|
||||
function get_file( $tag ) {
|
||||
|
||||
$file = thinkai_template( 'includes/resource/vc_map/'.$tag . '.php' );
|
||||
$file = apply_filters( "thinkai_vc_map_file_{$tag}", $file );
|
||||
|
||||
return $file;
|
||||
}
|
||||
|
||||
/**
|
||||
* shortcode params from vc array.
|
||||
*
|
||||
* @param string $tag shortcode tag
|
||||
* @return array params
|
||||
*/
|
||||
function shortcodeParams( $tag ) {
|
||||
|
||||
$file = $this->get_file( $tag );
|
||||
|
||||
if ( file_exists( $file ) ) {
|
||||
$data = include $file;
|
||||
|
||||
return thinkai_set( $data, 'params' );
|
||||
}
|
||||
|
||||
return array();
|
||||
}
|
||||
|
||||
function map_params() {
|
||||
|
||||
$array = array(
|
||||
'vc_row',
|
||||
);
|
||||
|
||||
foreach( $array as $file ) {
|
||||
|
||||
$file = $this->get_file( $file );
|
||||
|
||||
if ( file_exists( $file ) ) {
|
||||
$data = include $file;
|
||||
|
||||
foreach ( $data as $key => $value) {
|
||||
|
||||
foreach( $value as $param ) {
|
||||
vc_add_param( $key, $param );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Checkbox shortcode attribute type generator.
|
||||
*
|
||||
* @param $settings
|
||||
* @param string $value
|
||||
*
|
||||
* @since 4.4
|
||||
* @return string - html string.
|
||||
*/
|
||||
function toggle( $settings, $value ) {
|
||||
$output = '';
|
||||
if ( is_array( $value ) ) {
|
||||
$value = '';
|
||||
}
|
||||
$current_value = strlen( $value ) > 0 ? explode( ',', $value ) : array();
|
||||
$values = isset( $settings['value'] ) && is_array( $settings['value'] ) ? $settings['value'] : array( esc_html__( 'Yes', 'thinkai' ) => 'true' );
|
||||
if ( ! empty( $values ) ) {
|
||||
foreach ( $values as $label => $v ) {
|
||||
$checked = count( $current_value ) > 0 && in_array( $v, $current_value ) ? ' checked' : '';
|
||||
$output .= ' <label class="vc_checkbox-label"><input id="'
|
||||
. $settings['param_name'] . '-' . $v . '" value="'
|
||||
. $v . '" class="wpb_vc_param_value tgl tgl-ios '
|
||||
. $settings['param_name'] . ' ' . $settings['type'] . '" type="checkbox" name="'
|
||||
. $settings['param_name'] . '"'
|
||||
|
||||
. $checked . '> '
|
||||
. '<span class="tgl-btn" for="cb2"></span>'
|
||||
. $label . '</label>';
|
||||
}
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
26
wp-content/themes/thinkai/includes/config.php
Normal file
26
wp-content/themes/thinkai/includes/config.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/**
|
||||
* Theme config file.
|
||||
*
|
||||
* @package THINKAI
|
||||
* @author TonaTheme
|
||||
* @version 1.0
|
||||
* changed
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( 'Restricted' );
|
||||
}
|
||||
|
||||
$config = array();
|
||||
|
||||
$config['default']['thinkai_main_header'][] = array( 'thinkai_main_header_area', 99 );
|
||||
|
||||
$config['default']['thinkai_main_footer'][] = array( 'thinkai_main_footer_area', 99 );
|
||||
|
||||
$config['default']['thinkai_sidebar'][] = array( 'thinkai_sidebar', 99 );
|
||||
|
||||
$config['default']['thinkai_banner'][] = array( 'thinkai_banner', 99 );
|
||||
|
||||
|
||||
return $config;
|
||||
874
wp-content/themes/thinkai/includes/functions/functions.php
Normal file
874
wp-content/themes/thinkai/includes/functions/functions.php
Normal file
@@ -0,0 +1,874 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* [thinkai_WSH description]
|
||||
*
|
||||
* @return [type] [description]
|
||||
*/
|
||||
function thinkai_WSH() {
|
||||
return \THINKAI\Includes\Classes\Base::instance();
|
||||
}
|
||||
|
||||
/**
|
||||
* [thinkai_dot description]
|
||||
*
|
||||
* @param array $data [description]
|
||||
*
|
||||
* @return [type] [description]
|
||||
*/
|
||||
function thinkai_dot( $data = array() ) {
|
||||
$dn = new \THINKAI\Includes\Classes\DotNotation( $data );
|
||||
|
||||
return $dn;
|
||||
}
|
||||
|
||||
/**
|
||||
* [thinkai_meta description].
|
||||
*
|
||||
* @param array $data [description]
|
||||
*
|
||||
* @return [type] [description]
|
||||
*/
|
||||
function thinkai_meta( $key, $id = '' ) {
|
||||
if ( empty( $id ) ) {
|
||||
$id = get_the_ID();
|
||||
}
|
||||
|
||||
return ( get_post_meta( $id, $key, true ) ) ? get_post_meta( $id, $key, true ) : '';
|
||||
}
|
||||
|
||||
function thinkaic_app( $class = 'base', $instance = true ) {
|
||||
$all = array(
|
||||
'base' => '\THINKAI\Includes\Classes\Base',
|
||||
'vc' => '\THINKAI\Includes\Classes\Visual_Composer',
|
||||
'ajax' => '\THINKAI\Includes\Classes\Ajax',
|
||||
);
|
||||
$dn = thinkai_dot( $all );
|
||||
$class = ( $dn->get( $class ) ) ? $dn->get( $class ) : 'base';
|
||||
if ( $dn->get( $class ) ) {
|
||||
if ( $instance ) {
|
||||
return new $dn->get( $class );
|
||||
} else {
|
||||
return $dn->get( $classs );
|
||||
}
|
||||
} else {
|
||||
exit( esc_html__( 'No class found', 'thinkai' ) );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Use front-page.php when Front page displays is set to a static page.
|
||||
*
|
||||
* @since THINKAI 1.0
|
||||
*
|
||||
* @param string $template front-page.php.
|
||||
*
|
||||
* @return string The template to be used: blank if is_home() is true (defaults to index.php), else $template.
|
||||
*/
|
||||
function thinkai_front_page_template( $template ) {
|
||||
return is_home() ? '' : $template;
|
||||
}
|
||||
|
||||
add_filter( 'frontpage_template', 'thinkai_front_page_template' );
|
||||
if ( ! function_exists( 'printr' ) ) {
|
||||
function printr( $arr ) {
|
||||
echo '<pre>';
|
||||
print_r( $arr );
|
||||
echo '</pre>';
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* [thinkai_template_load description]
|
||||
*
|
||||
* @param string $template [description]
|
||||
* @param array $args [description]
|
||||
*
|
||||
* @return [type] [description]
|
||||
*/
|
||||
function thinkai_template_load( $templ = '', $args = array() ) {
|
||||
$template = get_theme_file_path( $templ );
|
||||
if ( file_exists( $template ) ) {
|
||||
extract( $args );
|
||||
unset( $args );
|
||||
include $template;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* [thinkai_get_sidebars description]
|
||||
*
|
||||
* @param boolean $multi [description].
|
||||
*
|
||||
* @return [type] [description]
|
||||
*/
|
||||
function thinkai_get_sidebars( $multi = false ) {
|
||||
global $wp_registered_sidebars;
|
||||
$sidebars = ! ( $wp_registered_sidebars ) ? get_option( 'wp_registered_sidebars' ) : $wp_registered_sidebars;
|
||||
if ( $multi ) {
|
||||
$data[] = array( 'value' => '', 'label' => '' );
|
||||
}
|
||||
foreach ( (array) $sidebars as $sidebar ) {
|
||||
if ( $multi ) {
|
||||
$data[] = array( 'value' => thinkai_set( $sidebar, 'id' ), 'label' => thinkai_set( $sidebar, 'name' ) );
|
||||
} else {
|
||||
$data[ thinkai_set( $sidebar, 'id' ) ] = thinkai_set( $sidebar, 'name' );
|
||||
}
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
add_action( 'tgmpa_register', 'thinkai_register_required_plugins' );
|
||||
/**
|
||||
* [my_theme_register_required_plugins description]
|
||||
*
|
||||
* @return void [description]
|
||||
*/
|
||||
function thinkai_register_required_plugins() {
|
||||
$plugins = array(
|
||||
array(
|
||||
'name' => esc_html__( 'Thinkai Plugin', 'thinkai' ),
|
||||
'slug' => 'thinkai-plugin',
|
||||
'source' => get_template_directory() . '/includes/thirdparty/plugins/thinkai-plugin.zip',
|
||||
'required' => true,
|
||||
'force_deactivation' => false,
|
||||
'file_path' => ABSPATH . 'wp-content/plugins/thinkai-plugin/thinkai-plugin.php',
|
||||
),
|
||||
array(
|
||||
'name' => esc_html__('Contact Form 7', 'thinkai'),
|
||||
'slug' => 'contact-form-7',
|
||||
'required' => true,
|
||||
),
|
||||
array(
|
||||
'name' => esc_html__( 'Elementor', 'thinkai' ),
|
||||
'slug' => 'elementor',
|
||||
'required' => true,
|
||||
),
|
||||
array(
|
||||
'name' => esc_html__('Woocommerce', 'thinkai'),
|
||||
'slug' => 'woocommerce',
|
||||
'required' => true,
|
||||
),
|
||||
array(
|
||||
'name' => esc_html__('Mailchimp for WordPress', 'thinkai'),
|
||||
'slug' => 'mailchimp-for-wp',
|
||||
'required' => true,
|
||||
),
|
||||
);
|
||||
/*Change this to your theme text domain, used for internationalising strings.*/
|
||||
$theme_text_domain = 'thinkai';
|
||||
$config = array(
|
||||
'id' => 'tgmpa',
|
||||
'default_path' => '',
|
||||
'menu' => 'tgmpa-install-plugins',
|
||||
'parent_slug' => 'themes.php',
|
||||
'capability' => 'edit_theme_options',
|
||||
'has_notices' => true,
|
||||
'dismissable' => true,
|
||||
'dismiss_msg' => '',
|
||||
'is_automatic' => false,
|
||||
'message' => '',
|
||||
);
|
||||
THINKAI\Includes\Library\tgmpa( $plugins, $config );
|
||||
}
|
||||
|
||||
/**
|
||||
* [thinkai_logo description]
|
||||
*
|
||||
* @return [type] [description]
|
||||
*/
|
||||
function thinkai_logo( $logo_type, $image_logo, $logo_dimension, $logo_text, $logo_typography ) {
|
||||
if ( $logo_type === 'text' ) {
|
||||
$logo = $logo_text ? $logo_text : '<span>' . esc_html__( 'THINKAI', 'thinkai' ) . '</span>';
|
||||
$logo_style = $logo_typography;
|
||||
$logo_the_style = ( thinkai_set( $logo_style, 'font-size' ) ) ? 'font-size:' . thinkai_set( $logo_style, 'font-size' ) . ';' : '';
|
||||
$logo_the_style .= ( thinkai_set( $logo_style, 'font-family' ) ) ? "font-family:'" . thinkai_set( $logo_style, 'font-family' ) . "';" : '';
|
||||
$logo_the_style .= ( thinkai_set( $logo_style, 'font-weight' ) ) ? 'font-weight:' . thinkai_set( $logo_style, 'font-weight' ) . ';' : '';
|
||||
$logo_the_style .= ( thinkai_set( $logo_style, 'line-height' ) ) ? 'line-height:' . thinkai_set( $logo_style, 'line-height' ) . ';' : '';
|
||||
$logo_the_style .= ( thinkai_set( $logo_style, 'color' ) ) ? 'color:' . thinkai_set( $logo_style, 'color' ) . ';' : '';
|
||||
$logo_the_style .= ( thinkai_set( $logo_style, 'letter-spacing' ) ) ? 'letter-spacing:' . thinkai_set( $logo_style, 'letter-spacing' ) . ';' : '';
|
||||
$logo_output = '<a style="' . $logo_the_style . '" href="' . home_url( '/' ) . '" title="' . get_bloginfo( 'name' ) . '">' . wp_kses( $logo, true ) . '</a>';
|
||||
} else {
|
||||
$logo_the_style = '';
|
||||
$logo_image_style = '';
|
||||
$logo_image_style .= thinkai_set( $logo_dimension, 'width' ) ? ' width:' . thinkai_set( $logo_dimension, 'width' ) . ';' : '';
|
||||
$logo_image_style .= thinkai_set( $logo_dimension, 'height' ) ? ' height:' . ( thinkai_set( $logo_dimension, 'height' ) ) . ';' : '';
|
||||
if ( thinkai_set( $image_logo, 'url' ) ) {
|
||||
$logo_output = '<a href="' . home_url( '/' ) . '" title="' . get_bloginfo( 'name' ) . '"><img src="' . esc_url( thinkai_set( $image_logo, 'url' ) ) . '" alt="'.esc_attr__('logo', 'thinkai').'" style="' . $logo_image_style . '" /></a>';
|
||||
} else {
|
||||
$logo_output = '<a href="' . esc_url(home_url('/')) . '" title="' . get_bloginfo( 'name' ) . '"><img src="' . get_template_directory_uri() . '/assets/images/logo.png' . '" alt="'.esc_attr__('logo', 'thinkai').'" style="' . $logo_image_style . '" /></a>';
|
||||
}
|
||||
}
|
||||
|
||||
return $logo_output;
|
||||
}
|
||||
|
||||
/**
|
||||
* [thinkai_twitter description]
|
||||
*
|
||||
* @param string $post_type [description].
|
||||
* @param boolean $flip [description].
|
||||
*
|
||||
* @return [type] [description]
|
||||
*/
|
||||
function thinkai_twitter( $args = array() ) {
|
||||
$selector = thinkai_set( $args, 'selector' );
|
||||
$data = thinkai_set( $args, 'data' );
|
||||
$count = thinkai_set( $args, 'count', 3 );
|
||||
$screen = thinkai_set( $args, 'screen_name', 'WordPress' );
|
||||
$settings = array( 'count' => $count, 'screen_name' => $screen );
|
||||
ob_start(); ?>
|
||||
jQuery(document).ready(function ($) {
|
||||
$('<?php echo esc_js( $selector ); ?>').tweets(<?php echo json_encode( $settings ); ?>);
|
||||
});
|
||||
<?php $jsOutput = ob_get_contents();
|
||||
ob_end_clean();
|
||||
wp_add_inline_script( 'twitter-tweets', $jsOutput );
|
||||
}
|
||||
|
||||
/**
|
||||
* [thinkai_the_pagination description]
|
||||
*
|
||||
* @param array $args [description].
|
||||
* @param integer $echo [description].
|
||||
*
|
||||
* @return [type] [description]
|
||||
*/
|
||||
|
||||
|
||||
function thinkai_the_pagination() {
|
||||
|
||||
if( is_singular() )
|
||||
return;
|
||||
|
||||
global $wp_query;
|
||||
|
||||
/** Stop execution if there's only 1 page */
|
||||
if( $wp_query->max_num_pages <= 1 )
|
||||
return;
|
||||
|
||||
$paged = get_query_var( 'paged' ) ? absint( get_query_var( 'paged' ) ) : 1;
|
||||
$max = intval( $wp_query->max_num_pages );
|
||||
|
||||
/** Add current page to the array */
|
||||
if ( $paged >= 1 )
|
||||
$links[] = $paged;
|
||||
|
||||
/** Add the pages around the current page to the array */
|
||||
if ( $paged >= 3 ) {
|
||||
$links[] = $paged - 1;
|
||||
$links[] = $paged - 2;
|
||||
}
|
||||
|
||||
if ( ( $paged + 2 ) <= $max ) {
|
||||
$links[] = $paged + 2;
|
||||
$links[] = $paged + 1;
|
||||
}
|
||||
|
||||
echo '<ul class="pagination clearfix">' . "\n";
|
||||
|
||||
/** Previous Post Link */
|
||||
if ( get_previous_posts_link() )
|
||||
printf( '<li class="prev">%s</li>' . "\n", get_previous_posts_link(__( '<i class="icon-left-arrow1 left"></i> Prev Page', 'thinkai' )) );
|
||||
|
||||
/** Link to first page, plus ellipses if necessary */
|
||||
if ( ! in_array( 1, $links ) ) {
|
||||
$class = 1 == $paged ? ' class="active"' : '';
|
||||
|
||||
printf( '<li%s><a href="%s">%s</a></li>' . "\n", $class, esc_url( get_pagenum_link( 1 ) ), '1' );
|
||||
|
||||
if ( ! in_array( 2, $links ) )
|
||||
echo '<li>…</li>';
|
||||
}
|
||||
|
||||
/** Link to current page, plus 2 pages in either direction if necessary */
|
||||
sort( $links );
|
||||
foreach ( (array) $links as $link ) {
|
||||
$class = $paged == $link ? ' class="active"' : '';
|
||||
printf( '<li%s><a href="%s">%s</a></li>' . "\n", $class, esc_url( get_pagenum_link( $link ) ), $link );
|
||||
}
|
||||
|
||||
/** Link to last page, plus ellipses if necessary */
|
||||
if ( ! in_array( $max, $links ) ) {
|
||||
if ( ! in_array( $max - 1, $links ) )
|
||||
echo '<li>…</li>' . "\n";
|
||||
|
||||
$class = $paged == $max ? ' class="active"' : '';
|
||||
printf( '<li%s><a href="%s">%s</a></li>' . "\n", $class, esc_url( get_pagenum_link( $max ) ), $max );
|
||||
}
|
||||
|
||||
/** Next Post Link */
|
||||
if ( get_next_posts_link() )
|
||||
printf( '<li class="next">%s</li>' . "\n", get_next_posts_link(__( 'Next Page <i class="icon-right-arrow1 right"></i>', 'thinkai' )) );
|
||||
|
||||
echo '</ul>' . "\n";
|
||||
|
||||
}
|
||||
|
||||
function thinkai_the_breadcrumb() {
|
||||
global $wp_query;
|
||||
$queried_object = get_queried_object();
|
||||
$breadcrumb = '';
|
||||
$delimiter = ' / ';
|
||||
$before = '<li class="breadcrumb-item">';
|
||||
$after = '</li>';
|
||||
if ( ! is_front_page() ) {
|
||||
$breadcrumb .= $before . '<a href="' . home_url( '/' ) . '">' . esc_html__( 'Home', 'thinkai' ) . ' </a>' . $after;
|
||||
/** If category or single post */
|
||||
if ( is_category() ) {
|
||||
$cat_obj = $wp_query->get_queried_object();
|
||||
$this_category = get_category( $cat_obj->term_id );
|
||||
if ( $this_category->parent != 0 ) {
|
||||
$parent_category = get_category( $this_category->parent );
|
||||
$breadcrumb .= get_category_parents( $parent_category, true, $delimiter );
|
||||
}
|
||||
$breadcrumb .= $before . '<a href="' . get_category_link( get_query_var( 'cat' ) ) . '">' . single_cat_title( '', false ) . '</a>' . $after;
|
||||
} elseif ( $wp_query->is_posts_page ) {
|
||||
$breadcrumb .= $before . $queried_object->post_title . $after;
|
||||
} elseif ( is_tax() ) {
|
||||
$breadcrumb .= $before . '<a href="' . get_term_link( $queried_object ) . '">' . $queried_object->name . '</a>' . $after;
|
||||
} elseif ( is_page() ) /** If WP pages */ {
|
||||
global $post;
|
||||
if ( $post->post_parent ) {
|
||||
$anc = get_post_ancestors( $post->ID );
|
||||
foreach ( $anc as $ancestor ) {
|
||||
$breadcrumb .= $before . '<a href="' . get_permalink( $ancestor ) . '">' . get_the_title( $ancestor ) . ' </a>' . $after;
|
||||
}
|
||||
$breadcrumb .= $before . '' . get_the_title( $post->ID ) . '' . $after;
|
||||
} else {
|
||||
$breadcrumb .= $before . '' . get_the_title() . '' . $after;
|
||||
}
|
||||
} elseif ( is_singular() ) {
|
||||
if ( $category = wp_get_object_terms( get_the_ID(), array( 'category', 'location', 'tax_feature' ) ) ) {
|
||||
if ( ! is_wp_error( $category ) ) {
|
||||
$breadcrumb .= $before . '<a href="' . get_term_link( thinkai_set( $category, '0' ) ) . '">' . thinkai_set( thinkai_set( $category, '0' ), 'name' ) . ' </a>' . $after;
|
||||
$breadcrumb .= $before . '' . get_the_title() . '' . $after;
|
||||
} else {
|
||||
$breadcrumb .= $before . '' . get_the_title() . '' . $after;
|
||||
}
|
||||
} else {
|
||||
$breadcrumb .= $before . '' . get_the_title() . '' . $after;
|
||||
}
|
||||
} elseif ( is_tag() ) {
|
||||
$breadcrumb .= $before . '<a href="' . get_term_link( $queried_object ) . '">' . single_tag_title( '', false ) . '</a>' . $after;
|
||||
} /**If tag template*/
|
||||
elseif ( is_day() ) {
|
||||
$breadcrumb .= $before . '<a href="#">' . esc_html__( 'Archive for ', 'thinkai' ) . get_the_time( 'F jS, Y' ) . '</a>' . $after;
|
||||
} /** If daily Archives */
|
||||
elseif ( is_month() ) {
|
||||
$breadcrumb .= $before . '<a href="' . get_month_link( get_the_time( 'Y' ), get_the_time( 'm' ) ) . '">'. get_the_time( 'F' ) . '</a> ' . $after;
|
||||
$breadcrumb .= $before . '<a href="' . get_year_link( get_the_time( 'Y' ) ) . '">'. get_the_time( 'Y' ) . '</a>' . $after;
|
||||
} /* If montly Archives /
|
||||
elseif ( is_year() ) {
|
||||
$breadcrumb .= $before . '<a href="' . get_year_link( get_the_time( 'Y' ) ) . '">' . esc_html__( 'Archive for ', 'thinkai' ) . get_the_time( 'Y' ) . '</a>' . $after;
|
||||
} /** If year Archives */
|
||||
elseif ( is_author() ) {
|
||||
$breadcrumb .= $before . '<a href="' . esc_url( get_author_posts_url( get_the_author_meta( "ID" ) ) ) . '">' . esc_html__( 'Archive for ', 'thinkai' ) . get_the_author() . '</a>' . $after;
|
||||
} /** If author Archives */
|
||||
elseif ( is_search() ) {
|
||||
$breadcrumb .= $before . '' . esc_html__( 'Search Results for ', 'thinkai' ) . get_search_query() . '' . $after;
|
||||
} /** if search template */
|
||||
elseif ( is_404() ) {
|
||||
$breadcrumb .= $before . '' . esc_html__( '404 - Not Found', 'thinkai' ) . '' . $after;
|
||||
/** if search template */
|
||||
} elseif ( is_post_type_archive( 'product' ) ) {
|
||||
$shop_page_id = wc_get_page_id( 'shop' );
|
||||
if ( get_option( 'page_on_front' ) !== $shop_page_id ) {
|
||||
$shop_page = get_post( $shop_page_id );
|
||||
$_name = wc_get_page_id( 'shop' ) ? get_the_title( wc_get_page_id( 'shop' ) ) : '';
|
||||
if ( ! $_name ) {
|
||||
$product_post_type = get_post_type_object( 'product' );
|
||||
$_name = $product_post_type->labels->singular_name;
|
||||
}
|
||||
if ( is_search() ) {
|
||||
$breadcrumb .= $before . '<a href="' . get_post_type_archive_link( 'product' ) . '">' . $_name . '</a>' . $delimiter . esc_html__( 'Search results for “', 'thinkai' ) . get_search_query() . '”' . $after;
|
||||
} elseif ( is_paged() ) {
|
||||
$breadcrumb .= $before . '<a href="' . get_post_type_archive_link( 'product' ) . '">' . $_name . '</a>' . $after;
|
||||
} else {
|
||||
$breadcrumb .= $before . $_name . $after;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$breadcrumb .= $before . '<a href="' . get_permalink() . '">' . get_the_title() . '</a>' . $after;
|
||||
}
|
||||
/** Default value */
|
||||
}
|
||||
|
||||
return $breadcrumb;
|
||||
}
|
||||
|
||||
function thinkai_the_title( $template ) {
|
||||
global $wp_query;
|
||||
$queried_object = get_queried_object();
|
||||
$title = '';
|
||||
/** If category or single post */
|
||||
if ( $template == 'category' || $template == 'tag' || $template == 'galleryCat' ) {
|
||||
$current_obj = $wp_query->get_queried_object();
|
||||
$this_category = get_category( $current_obj->term_id );
|
||||
$title .= $current_obj->name;
|
||||
} elseif ( is_home() ) {
|
||||
$title .= esc_html__( 'Home Page ', 'thinkai' );
|
||||
} elseif ( $template == 'page' || $template == 'post' || $template == 'VC' || $template == 'blog' || $template == 'courseDetail' || $template == 'team' || $template == 'services' || $template == 'events' || $template == 'gallery' || $template == 'shop' || $template == 'product' ) {
|
||||
$title .= get_the_title();
|
||||
} elseif ( $template == 'archive' and is_day() ) {
|
||||
$title .= esc_html__( 'Archive for ', 'thinkai' ) . get_the_time( 'F jS, Y' );
|
||||
} elseif ( $template == 'archive' and is_month() ) {
|
||||
$title .= esc_html__( 'Archive for ', 'thinkai' ) . get_the_time( 'F, Y' );
|
||||
} elseif ( $template == 'archive' and is_year() ) {
|
||||
$title .= esc_html__( 'Archive for ', 'thinkai' ) . get_the_time( 'Y' );
|
||||
} elseif ( $template == 'author' ) {
|
||||
$title .= esc_html__( 'Archive for ', 'thinkai' ) . get_the_author();
|
||||
} elseif ( $template == 'search' ) {
|
||||
$title .= esc_html__( 'Search Results for ', 'thinkai' ) . '"' . get_search_query() . '"';
|
||||
} elseif ( $template == '404' ) {
|
||||
$title .= esc_html__( '404 Page Not Found', 'thinkai' );
|
||||
}
|
||||
|
||||
return $title;
|
||||
}
|
||||
|
||||
/**
|
||||
* [thinkai_list_comments description]
|
||||
*
|
||||
* @param [type] $comment [description].
|
||||
* @param [type] $args [description].
|
||||
* @param [type] $depth [description].
|
||||
*
|
||||
* @return void [description]
|
||||
*/
|
||||
function thinkai_list_comments( $comment, $args, $depth ) {
|
||||
$allowed_html = wp_kses_allowed_html( 'post' );
|
||||
|
||||
wp_enqueue_script( 'comment-reply' );
|
||||
$GLOBALS['comment'] = $comment;
|
||||
$like = (int) get_comment_meta( $comment->comment_ID, 'like_it', true ); ?>
|
||||
|
||||
<div class="thinkai-comment-item">
|
||||
<div class="single-comment">
|
||||
<div <?php comment_class('comment');?> id="comment-<?php comment_ID(); ?>">
|
||||
<div class="inner">
|
||||
<div class="single-comment-box">
|
||||
<div class="img-holder">
|
||||
<?php echo wp_kses( get_avatar( $comment, 70 ), true ); ?>
|
||||
</div>
|
||||
<div class="text-holder">
|
||||
<div class="top">
|
||||
<h3><?php echo wp_kses( get_comment_author(), true ); ?>,</h3>
|
||||
<p> <?php comment_date('F d, Y'); ?></p>
|
||||
</div>
|
||||
<div class="text">
|
||||
<?php comment_text(); ?>
|
||||
</div>
|
||||
<div class="btn-box">
|
||||
<?php
|
||||
comment_reply_link( array_merge($args, array(
|
||||
'reply_text' => '<span class="icon-arrow-1"></span>' . esc_html( 'Reply', 'thinkai' ).'',
|
||||
'depth' => $depth,
|
||||
'max_depth' => $args['max_depth'],
|
||||
)
|
||||
)); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
function thinkai_comment_reply_link_class( $class ) {
|
||||
$class = str_replace( "class='comment-reply-link", "class='comment-reply-link reply-btn", $class );
|
||||
return $class;
|
||||
}
|
||||
|
||||
add_filter( 'comment_reply_link', 'thinkai_comment_reply_link_class' );
|
||||
|
||||
|
||||
/**
|
||||
* [comment_form description]
|
||||
*
|
||||
* @param array $args [description].
|
||||
* @param [type] $post_id [description].
|
||||
*
|
||||
* @return void [description]
|
||||
*/
|
||||
function thinkai_comment_form( $args = array(), $post_id = null ) {
|
||||
if ( null === $post_id ) {
|
||||
$post_id = get_the_ID();
|
||||
}
|
||||
$allowed_html = wp_kses_allowed_html( 'post' );
|
||||
$commenter = wp_get_current_commenter();
|
||||
$user = wp_get_current_user();
|
||||
$user_identity = $user->exists() ? $user->display_name : '';
|
||||
$args = wp_parse_args( $args );
|
||||
if ( ! isset( $args['format'] ) ) {
|
||||
$args['format'] = current_theme_supports( 'html5', 'comment-form' ) ? 'html5' : 'xhtml';
|
||||
}
|
||||
$req = get_option( 'require_name_email' );
|
||||
$aria_req = ( $req ? " aria-required='true'" : '' );
|
||||
$html_req = ( $req ? " required='required'" : '' );
|
||||
$html5 = 'html5' === $args['format'];
|
||||
$comment_field_class = is_user_logged_in() ? 'col-sm-12' : 'col-sm-6';
|
||||
$fields = array(
|
||||
'author' => '<div class="col-lg-6 col-md-6 col-sm-12"><div class="input-box"><input id="author" class="input_style__primary" name="author" placeholder="' . esc_attr__( 'Name', 'thinkai' ) . '" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30" maxlength="245"' . $aria_req . $html_req . ' /></div></div>',
|
||||
'email' => '<div class="col-lg-6 col-md-6 col-sm-12"><div class="input-box"><input id="email" class="input_style__primary" placeholder="' . esc_attr__( 'Email', 'thinkai' ) . '" name="email" ' . ( $html5 ? 'type="email"' : 'type="text"' ) . ' value="' . esc_attr( $commenter['comment_author_email'] ) . '" size="30" maxlength="100"/></div></div>',
|
||||
);
|
||||
$required_text = sprintf( ' ' . esc_html__( '%s', 'thinkai' ), '' );
|
||||
/**
|
||||
* Filters the default comment form fields.
|
||||
*
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param array $fields The default comment fields.
|
||||
*/
|
||||
$fields = apply_filters( 'comment_form_default_fields', $fields );
|
||||
$defaults = array(
|
||||
'fields' => $fields,
|
||||
'comment_field' => '<div class="col-lg-12 col-md-12 col-sm-12"><div class="input-box input-box--sytle1"><textarea placeholder="' . esc_attr__( 'Type Comment here', 'thinkai' ) . '" id="comment" class="input_style__primary" name="comment" rows="7" required="required"></textarea></div></div>',
|
||||
/** This filter is documented in wp-includes/link-template.php */
|
||||
'must_log_in' => '<div class="log-in-text"><p class="must-log-in">' . sprintf(
|
||||
/* translators: %s: login URL */
|
||||
esc_html__( 'You must be <a href="%s">logged in</a> to post a comment.', 'thinkai' ),
|
||||
wp_login_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) )
|
||||
) . '</p></div>',
|
||||
/** This filter is documented in wp-includes/link-template.php */
|
||||
'logged_in_as' => '<div class="col-lg-12 col-md-12 col-sm-12"><p class="logged-in-as">' . sprintf(
|
||||
/* translators: 1: edit user link, 2: accessibility text, 3: user name, 4: logout URL */
|
||||
'<a href="%1$s" aria-label="%2$s">' . esc_html__( 'Logged in as', 'thinkai' ) . ' %3$s</a>. <a href="%4$s">' . esc_html__( 'Log out?', 'thinkai' ) . '</a>',
|
||||
get_edit_user_link(),
|
||||
/* translators: %s: user name */
|
||||
esc_attr( sprintf( esc_html__( 'Logged in as %s. Edit your profile.', 'thinkai' ), $user_identity ) ),
|
||||
$user_identity,
|
||||
wp_logout_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) )
|
||||
) . '</p></div>',
|
||||
'comment_notes_before' => '',
|
||||
'comment_notes_after' => '',
|
||||
'action' => site_url( '/wp-comments-post.php' ),
|
||||
'id_form' => 'add-comment-form',
|
||||
'id_submit' => 'submit',
|
||||
'class_form' => 'te-custom__form',
|
||||
'class_submit' => 'submit',
|
||||
'name_submit' => 'submit',
|
||||
'title_reply' => esc_html__( 'Leave A Comment', 'thinkai' ),
|
||||
'title_reply_to' => esc_html__( 'Leave a Reply to %s', 'thinkai' ),
|
||||
'title_reply_before' => '<div class="inner-title"><h2>',
|
||||
'title_reply_after' => '</h2></div>',
|
||||
'cancel_reply_before' => ' <small>',
|
||||
'cancel_reply_after' => '</small>',
|
||||
'cancel_reply_link' => esc_html__( 'Cancel reply', 'thinkai' ),
|
||||
'label_submit' => esc_html__( 'Post a Comment', 'thinkai' ),
|
||||
'submit_button' => '<button name="%1$s" type="submit" id="%2$s" class="%3$s btn-one" value="%4$s"><span class="txt">Post Comment<i class="icon-next1"></i></span></button>',
|
||||
'submit_field' => '<div class="button-box message-btn">%1$s %2$s</div>',
|
||||
'format' => 'xhtml',
|
||||
);
|
||||
/**
|
||||
* Filters the comment form default arguments.
|
||||
* Use {@see 'comment_form_default_fields'} to filter the comment fields.
|
||||
*
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param array $defaults The default comment form arguments.
|
||||
*/
|
||||
$args = wp_parse_args( $args, apply_filters( 'comment_form_defaults', $defaults ) );
|
||||
$args = array_merge( $defaults, $args );
|
||||
if ( comments_open( $post_id ) ) : ?>
|
||||
<?php
|
||||
/**
|
||||
* Fires before the comment form.
|
||||
*
|
||||
* @since 3.0.0
|
||||
*/
|
||||
do_action( 'comment_form_before' );
|
||||
?>
|
||||
<div id="respond" class="comment-form-area add-comment-box">
|
||||
|
||||
<?php
|
||||
echo wp_kses( $args['title_reply_before'], $allowed_html );
|
||||
comment_form_title( $args['title_reply'], $args['title_reply_to'] );
|
||||
echo wp_kses( $args['cancel_reply_before'], $allowed_html );
|
||||
cancel_comment_reply_link( $args['cancel_reply_link'] );
|
||||
echo wp_kses( $args['cancel_reply_after'], $allowed_html );
|
||||
echo wp_kses( $args['title_reply_after'], $allowed_html );
|
||||
if ( get_option( 'comment_registration' ) && ! is_user_logged_in() ) :
|
||||
echo wp_kses( $args['must_log_in'], $allowed_html );
|
||||
/**
|
||||
* Fires after the HTML-formatted 'must log in after' message in the comment form.
|
||||
*
|
||||
* @since 3.0.0
|
||||
*/
|
||||
do_action( 'comment_form_must_log_in_after' );
|
||||
else : ?>
|
||||
<div class="form-inner">
|
||||
<form action="<?php echo esc_url( $args['action'] ); ?>" method="post" id="<?php echo esc_attr( $args['id_form'] ); ?>" class="<?php echo esc_attr( $args['class_form'] ); ?>" <?php echo wp_kses( $html5, $allowed_html ) ? ' novalidate' : ''; ?>>
|
||||
<div class="row clearfix">
|
||||
<?php
|
||||
/**
|
||||
* Fires at the top of the comment form, inside the form tag.
|
||||
*
|
||||
* @since 3.0.0
|
||||
*/
|
||||
do_action( 'comment_form_top' );
|
||||
if ( is_user_logged_in() ) :
|
||||
/**
|
||||
* Filters the 'logged in' message for the comment form for display.
|
||||
*
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param string $args_logged_in The logged-in-as HTML-formatted message.
|
||||
* @param array $commenter An array containing the comment author's
|
||||
* username, email, and URL.
|
||||
* @param string $user_identity If the commenter is a registered user,
|
||||
* the display name, blank otherwise.
|
||||
*/
|
||||
echo apply_filters( 'comment_form_logged_in', $args['logged_in_as'], $commenter, $user_identity );
|
||||
/**
|
||||
* Fires after the is_user_logged_in() check in the comment form.
|
||||
*
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param array $commenter An array containing the comment author's
|
||||
* username, email, and URL.
|
||||
* @param string $user_identity If the commenter is a registered user,
|
||||
* the display name, blank otherwise.
|
||||
*/
|
||||
do_action( 'comment_form_logged_in_after', $commenter, $user_identity );
|
||||
else :
|
||||
echo wp_kses( $args['comment_notes_before'], $allowed_html );
|
||||
endif;
|
||||
$comment_fields = (array) $args['fields'] + array( 'comment' => $args['comment_field'] );
|
||||
/**
|
||||
* Filters the comment form fields, including the textarea.
|
||||
*
|
||||
* @since 4.4.0
|
||||
*
|
||||
* @param array $comment_fields The comment fields.
|
||||
*/
|
||||
$comment_fields = apply_filters( 'comment_form_fields', $comment_fields );
|
||||
$comment_field_keys = array_diff( array_keys( $comment_fields ), array( 'comment' ) );
|
||||
$first_field = reset( $comment_field_keys );
|
||||
$last_field = end( $comment_field_keys ); ?>
|
||||
<?php foreach ( $comment_fields as $name => $field ) {
|
||||
if ( 'comment' === $name ) {
|
||||
/**
|
||||
* Filters the content of the comment textarea field for display.
|
||||
*
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param string $args_comment_field The content of the comment textarea field.
|
||||
*/
|
||||
echo apply_filters( 'comment_form_field_comment', $field );
|
||||
echo wp_kses( $args['comment_notes_after'], $allowed_html );
|
||||
} elseif ( ! is_user_logged_in() ) {
|
||||
if ( $first_field === $name ) {
|
||||
/**
|
||||
* Fires before the comment fields in the comment form, excluding the textarea.
|
||||
*
|
||||
* @since 3.0.0
|
||||
*/
|
||||
do_action( 'comment_form_before_fields' );
|
||||
}
|
||||
/**
|
||||
* Filters a comment form field for display.
|
||||
* The dynamic portion of the filter hook, `$name`, refers to the name
|
||||
* of the comment form field. Such as 'author', 'email', or 'url'.
|
||||
*
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param string $field The HTML-formatted output of the comment form field.
|
||||
*/
|
||||
echo apply_filters( "comment_form_field_{$name}", $field ) . "\n";
|
||||
if ( $last_field === $name ) {
|
||||
/**
|
||||
* Fires after the comment fields in the comment form, excluding the textarea.
|
||||
*
|
||||
* @since 3.0.0
|
||||
*/
|
||||
do_action( 'comment_form_after_fields' );
|
||||
}
|
||||
}
|
||||
} ?>
|
||||
<?php $submit_button = sprintf(
|
||||
$args['submit_button'],
|
||||
esc_attr( $args['name_submit'] ),
|
||||
esc_attr( $args['id_submit'] ),
|
||||
esc_attr( $args['class_submit'] ),
|
||||
esc_attr( $args['label_submit'] )
|
||||
);
|
||||
/**
|
||||
* Filters the submit button for the comment form to display.
|
||||
*
|
||||
* @since 4.2.0
|
||||
*
|
||||
* @param string $submit_button HTML markup for the submit button.
|
||||
* @param array $args Arguments passed to `comment_form()`.
|
||||
*/
|
||||
$submit_button = apply_filters( 'comment_form_submit_button', $submit_button, $args );
|
||||
$submit_field = sprintf(
|
||||
$args['submit_field'],
|
||||
$submit_button,
|
||||
get_comment_id_fields( $post_id )
|
||||
);
|
||||
/**
|
||||
* Filters the submit field for the comment form to display.
|
||||
* The submit field includes the submit button, hidden fields for the
|
||||
* comment form, and any wrapper markup.
|
||||
*
|
||||
* @since 4.2.0
|
||||
*
|
||||
* @param string $submit_field HTML markup for the submit field.
|
||||
* @param array $args Arguments passed to comment_form().
|
||||
*/
|
||||
echo apply_filters( 'comment_form_submit_field', $submit_field, $args );
|
||||
/**
|
||||
* Fires at the bottom of the comment form, inside the closing </form> tag.
|
||||
*
|
||||
* @since 1.5.0
|
||||
*
|
||||
* @param int $post_id The post ID.
|
||||
*/
|
||||
do_action( 'comment_form', $post_id );
|
||||
?>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
<?php
|
||||
/**
|
||||
* Fires after the comment form.
|
||||
*
|
||||
* @since 3.0.0
|
||||
*/
|
||||
do_action( 'comment_form_after' );
|
||||
else :
|
||||
/**
|
||||
* Fires after the comment form if comments are closed.
|
||||
*
|
||||
* @since 3.0.0
|
||||
*/
|
||||
do_action( 'comment_form_comments_closed' );
|
||||
endif;
|
||||
}
|
||||
|
||||
if( ! function_exists('thinkai_filesystem') ) {
|
||||
/**
|
||||
* [fixkar_filesystem description]
|
||||
* @return [type] [description]
|
||||
*/
|
||||
function thinkai_filesystem() {
|
||||
if( ! function_exists('require_filesystem_credentials')) {
|
||||
require_once ABSPATH . 'wp-admin/includes/file.php';
|
||||
}
|
||||
|
||||
/* you can safely run request_filesystem_credentials() without any issues and don't need to worry about passing in a URL */
|
||||
$creds = request_filesystem_credentials(esc_url(home_url('/')), '', false, false, array());
|
||||
|
||||
/* initialize the API */
|
||||
if ( ! WP_Filesystem($creds) ) {
|
||||
/* any problems and we exit */
|
||||
return false;
|
||||
}
|
||||
|
||||
global $wp_filesystem;
|
||||
/* do our file manipulations below */
|
||||
|
||||
return $wp_filesystem;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if( ! function_exists('thinkai_get_server') ) {
|
||||
|
||||
function thinkai_get_server($key = '', $value = '') {
|
||||
if( function_exists('thinkai_server') ) {
|
||||
return thinkai_server($key, $value);
|
||||
}
|
||||
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
function thinkai_body_classes( $classes ) {
|
||||
$classes[] = 'menu-layer';
|
||||
|
||||
return $classes;
|
||||
}
|
||||
add_filter( 'body_class','thinkai_body_classes' );
|
||||
|
||||
function thinkai_custom_fonts_load( $custom_font ) {
|
||||
|
||||
$custom_style = '';
|
||||
|
||||
$pathinfo = pathinfo($custom_font);
|
||||
|
||||
if ( $filename = thinkai_set( $pathinfo, 'filename' ) ) {
|
||||
$custom_style .= '@font-face{
|
||||
font-family:"'.$filename.'";';
|
||||
$extensions = array( 'eot', 'woff', 'woff2', 'ttf', 'svg' );
|
||||
$count = 0;
|
||||
foreach( $extensions as $extension ) {
|
||||
$file_path = get_template_directory() . '/assets/css/custom-fonts/' . $filename . '.' . $extension;
|
||||
$file_url = get_template_directory_uri() . '/assets/css/custom-fonts/' . $filename . '.' . $extension;
|
||||
|
||||
if ( file_exists( $file_path ) ) {
|
||||
$format = $extension;
|
||||
if ( $extension === 'eot' ) {
|
||||
$format = 'embedded-opentype';
|
||||
}
|
||||
if ( $extension === 'ttf' ) {
|
||||
$format = 'truetype';
|
||||
}
|
||||
$terminated = ( $count > 0 ) ? ',' : '';
|
||||
$custom_style .= $terminated . 'src:url("'.$file_url.'") format("'.$format.'")';
|
||||
|
||||
$count++;
|
||||
}
|
||||
}
|
||||
|
||||
$custom_style .= ';}';
|
||||
}
|
||||
|
||||
return $custom_style;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Add Flaticon existing font library
|
||||
*
|
||||
* @since 0.0.1
|
||||
*/
|
||||
if( ! function_exists('thinkai_el_flat_icon') ) {
|
||||
function thinkai_el_flat_icon($args) {
|
||||
|
||||
|
||||
$args['icomoon'] = [
|
||||
'name' => 'icomoon',
|
||||
'label' => esc_html__( 'Icomoon Icons', 'thinkai' ),
|
||||
'url' => get_template_directory_uri() . '/assets/vendors/thm-icons/style.css',
|
||||
'enqueue' => [ get_template_directory_uri() . '/assets/vendors/thm-icons/style.css' ],
|
||||
'prefix' => 'icon ',
|
||||
'labelIcon' => 'icon-packs',
|
||||
'ver' => '1.0',
|
||||
'fetchJson' => get_template_directory_uri() . '/assets/js/icomoon.js',
|
||||
'native' => true,
|
||||
];
|
||||
|
||||
return $args;
|
||||
}
|
||||
}
|
||||
add_filter( 'elementor/icons_manager/native', 'thinkai_el_flat_icon' );
|
||||
|
||||
function thinkai_trim( $text, $len, $more = null )
|
||||
{
|
||||
$text = strip_shortcodes( $text );
|
||||
$text = apply_filters( 'the_content', $text );
|
||||
$text = str_replace(']]>', ']]>', $text);
|
||||
$excerpt_length = apply_filters( 'excerpt_length', $len );
|
||||
$excerpt_more = apply_filters( 'excerpt_more', ' ' . '[…]' );
|
||||
$excerpt_more = ( $more ) ? $more : ' ...';
|
||||
$text = wp_trim_words( $text, $excerpt_length, $excerpt_more );
|
||||
return $text;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
176
wp-content/themes/thinkai/includes/library/hook.php
Normal file
176
wp-content/themes/thinkai/includes/library/hook.php
Normal file
@@ -0,0 +1,176 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Hookup all the tags here.
|
||||
*
|
||||
* @package THINKAI
|
||||
* @author Shahbaz Ahmed <shahbazahmed9@hotmail.com>
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* Load the default config
|
||||
*/
|
||||
//thinkai_load_default_hooks
|
||||
function thinkai_load_default_hooks() {
|
||||
|
||||
$config = thinkai_WSH()->config( 'default' );
|
||||
|
||||
if ( is_array( $config ) ) {
|
||||
|
||||
foreach ( $config as $key => $more ) {
|
||||
|
||||
foreach ( $more as $k => $value ) {
|
||||
$func = is_array( $value ) ? $value[0] : $value;
|
||||
|
||||
$priority = isset( $value[1] ) ? $value[1] : 99;
|
||||
$params = isset( $value[2] ) ? $value[2] : 2;
|
||||
|
||||
add_action( $key, $func, $priority, $params );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* [thinkai_main_header_area description]
|
||||
*
|
||||
* @return [type] [description]
|
||||
*/
|
||||
|
||||
//thinkai_main_header_area
|
||||
function thinkai_main_header_area() {
|
||||
|
||||
$options = thinkai_WSH()->option();
|
||||
|
||||
$header_type = '';
|
||||
$header_e = 0;
|
||||
$header_d = '';
|
||||
|
||||
if( is_page() ) {
|
||||
$header_type = get_post_meta( get_the_ID(), 'header_source_type', true );
|
||||
$header_e = get_post_meta( get_the_ID(), 'header_new_elementor_template', true );
|
||||
$header_d = get_post_meta( get_the_ID(), 'header_style_settings');
|
||||
}
|
||||
|
||||
if( ! $header_type || $header_type == 'd' ) {
|
||||
|
||||
$header_type = $options->get( 'header_source_type' );
|
||||
$header_e = $options->get('header_elementor_template');
|
||||
$header_d = $options->get('header_style_settings');
|
||||
|
||||
}
|
||||
if ( $header_type == 'e' AND class_exists( '\Elementor\Plugin' ) AND $header_e ) {
|
||||
echo Elementor\Plugin::instance()->frontend->get_builder_content_for_display( $header_e );
|
||||
|
||||
return false;
|
||||
} elseif ( $header_type == 'd' AND class_exists( '\Elementor\Plugin' ) AND $header_d ) {
|
||||
//need to change
|
||||
$header_meta = get_post_meta( get_the_ID(), 'header_style_settings');
|
||||
$header_option = $options->get( 'header_style_settings' );
|
||||
$header = ( $header_meta ) ? $header_meta['0'] : $header_option;
|
||||
}else {
|
||||
//need to change
|
||||
$header_meta = get_post_meta( get_the_ID(), 'header_style_settings');
|
||||
$header_option = $options->get( 'header_style_settings' );
|
||||
$header = ( $header_meta ) ? $header_meta['0'] : $header_option;
|
||||
}
|
||||
|
||||
//need to change
|
||||
if ( $header == 'header_v1' ) {
|
||||
thinkai_template_load( 'templates/header/default-header.php' );
|
||||
} elseif ( $header == 'header_v2' ) {
|
||||
thinkai_template_load( 'templates/header/header_v2.php' );
|
||||
} elseif ( $header == 'header_v3' ) {
|
||||
thinkai_template_load( 'templates/header/header_v3.php' );
|
||||
} elseif ( $header == 'header_v4' ) {
|
||||
thinkai_template_load( 'templates/header/header_v4.php' );
|
||||
} elseif ( $header == 'header_v5' ) {
|
||||
thinkai_template_load( 'templates/header/header_v5.php' );
|
||||
} else {
|
||||
thinkai_template_load( 'templates/header/default-header.php' );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* [thinkai_main_footer_area description]
|
||||
*
|
||||
* @return [type] [description]
|
||||
*/
|
||||
//thinkai_main_footer_area
|
||||
function thinkai_main_footer_area() {
|
||||
|
||||
$options = thinkai_WSH()->option();
|
||||
|
||||
$footer_type = '';
|
||||
$footer_e = 0;
|
||||
$footer_d = '';
|
||||
|
||||
if( is_page() ) {
|
||||
$footer_type = get_post_meta( get_the_ID(), 'footer_source_type', true );
|
||||
$footer_e = get_post_meta( get_the_ID(), 'footer_new_elementor_template', true );
|
||||
$footer_d = get_post_meta( get_the_ID(), 'footer_style_settings');
|
||||
}
|
||||
|
||||
if( ! $footer_type || $footer_type == 'd' ) {
|
||||
|
||||
$footer_type = $options->get( 'footer_source_type' );
|
||||
$footer_e = $options->get('footer_elementor_template');
|
||||
$footer_d = $options->get('footer_style_settings');
|
||||
|
||||
}
|
||||
|
||||
if ( $footer_type == 'e' AND class_exists( '\Elementor\Plugin' ) AND $footer_e ) {
|
||||
echo Elementor\Plugin::instance()->frontend->get_builder_content_for_display( $footer_e );
|
||||
|
||||
return false;
|
||||
} elseif ( $footer_type == 'd' AND class_exists( '\Elementor\Plugin' ) AND $footer_d ) {
|
||||
//need to change
|
||||
$footer_meta = get_post_meta( get_the_ID(), 'footer_style_settings');
|
||||
$footer_option = $options->get( 'footer_style_settings' );
|
||||
$footer = ( $footer_meta ) ? $footer_meta['0'] : $footer_option;
|
||||
}else {
|
||||
//need to change
|
||||
$footer_meta = get_post_meta( get_the_ID(), 'footer_style_settings');
|
||||
$footer_option = $options->get( 'footer_style_settings' );
|
||||
$footer = ( $footer_meta ) ? $footer_meta['0'] : $footer_option;
|
||||
}
|
||||
|
||||
//need to change
|
||||
if ( $footer == 'footer_v1' ) {
|
||||
thinkai_template_load( 'templates/footer/default-footer.php' );
|
||||
} elseif ( $footer == 'footer_v2' ) {
|
||||
thinkai_template_load( 'templates/footer/footer_v2.php' );
|
||||
} elseif ( $footer == 'footer_v3' ) {
|
||||
thinkai_template_load( 'templates/footer/footer_v3.php' );
|
||||
} elseif ( $footer == 'footer_v4' ) {
|
||||
thinkai_template_load( 'templates/footer/footer_v4.php' );
|
||||
} elseif ( $footer == 'footer_v5' ) {
|
||||
thinkai_template_load( 'templates/footer/footer_v5.php' );
|
||||
} else {
|
||||
thinkai_template_load( 'templates/footer/default-footer.php' );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* [thinkai_sidebar description]
|
||||
*
|
||||
* @return [type] [description]
|
||||
*/
|
||||
//thinkai_sidebar
|
||||
function thinkai_sidebar( $data ) {
|
||||
|
||||
thinkai_template_load( 'templates/sidebar.php', compact( 'data' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* [thinkai_banner description]
|
||||
*
|
||||
* @return [type] [description]
|
||||
*/
|
||||
//thinkai_banner
|
||||
function thinkai_banner( $data ) {
|
||||
|
||||
thinkai_template_load( 'templates/banner/banner.php', compact( 'data' ) );
|
||||
|
||||
}
|
||||
49
wp-content/themes/thinkai/includes/loader.php
Normal file
49
wp-content/themes/thinkai/includes/loader.php
Normal file
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
define( 'THINKAI_ROOT', get_template_directory() . '/' );
|
||||
|
||||
require_once get_template_directory() . '/includes/functions/functions.php';
|
||||
include_once get_template_directory() . '/includes/classes/base.php';
|
||||
include_once get_template_directory() . '/includes/classes/dotnotation.php';
|
||||
include_once get_template_directory() . '/includes/classes/header-enqueue.php';
|
||||
include_once get_template_directory() . '/includes/classes/options.php';
|
||||
include_once get_template_directory() . '/includes/classes/ajax.php';
|
||||
include_once get_template_directory() . '/includes/classes/common.php';
|
||||
include_once get_template_directory() . '/includes/classes/bootstrap_walker.php';
|
||||
include_once get_template_directory() . '/includes/classes/bootstrap_walker-mobile.php';
|
||||
include_once get_template_directory() . '/includes/library/class-tgm-plugin-activation.php';
|
||||
require_once get_template_directory() . '/includes/library/hook.php';
|
||||
|
||||
// Merlin demo import.
|
||||
require_once get_template_directory() . '/demo-import/class-merlin.php';
|
||||
require_once get_template_directory() . '/demo-import/merlin-config.php';
|
||||
require_once get_template_directory() . '/demo-import/merlin-filters.php';
|
||||
|
||||
add_action( 'after_setup_theme', 'thinkai_wp_load', 5 );
|
||||
|
||||
function thinkai_wp_load() {
|
||||
|
||||
defined( 'THINKAI_URL' ) or define( 'THINKAI_URL', get_template_directory_uri() . '/' );
|
||||
define( 'THINKAI_KEY','!@#thinkai');
|
||||
define( 'THINKAI_URI', get_template_directory_uri() . '/');
|
||||
|
||||
if ( ! defined( 'THINKAI_NONCE' ) ) {
|
||||
define( 'THINKAI_NONCE', 'thinkai_wp_theme' );
|
||||
}
|
||||
|
||||
( new \THINKAI\Includes\Classes\Base )->loadDefaults();
|
||||
( new \THINKAI\Includes\Classes\Ajax )->actions();
|
||||
|
||||
}
|
||||
|
||||
add_action( 'init', 'thinkai_bunch_theme_init');
|
||||
function thinkai_bunch_theme_init()
|
||||
{
|
||||
$bunch_exlude_hooks = include_once get_template_directory(). '/includes/resource/remove_action.php';
|
||||
foreach( $bunch_exlude_hooks as $k => $v )
|
||||
{
|
||||
foreach( $v as $value )
|
||||
remove_action( $k, $value[0], $value[1] );
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'title' => esc_html__( '404 Page Settings', 'thinkai' ),
|
||||
'id' => '404_setting',
|
||||
'desc' => '',
|
||||
'subsection' => true,
|
||||
'fields' => array(
|
||||
array(
|
||||
'id' => '404_source_type',
|
||||
'type' => 'button_set',
|
||||
'title' => esc_html__( '404 Source Type', 'thinkai' ),
|
||||
'options' => array(
|
||||
'd' => esc_html__( 'Default', 'thinkai' ),
|
||||
'e' => esc_html__( 'Elementor', 'thinkai' ),
|
||||
),
|
||||
'default' => 'd',
|
||||
),
|
||||
array(
|
||||
'id' => '404_elementor_template',
|
||||
'type' => 'select',
|
||||
'title' => __( 'Template', 'thinkai' ),
|
||||
'data' => 'posts',
|
||||
'args' => [
|
||||
'post_type' => [ 'elementor_library' ],
|
||||
],
|
||||
'required' => [ '404_source_type', '=', 'e' ],
|
||||
),
|
||||
array(
|
||||
'id' => '404_default_st',
|
||||
'type' => 'section',
|
||||
'title' => esc_html__( '404 Default', 'thinkai' ),
|
||||
'indent' => true,
|
||||
'required' => [ '404_source_type', '=', 'd' ],
|
||||
),
|
||||
//BG Image
|
||||
array(
|
||||
'id' => 'bg_image',
|
||||
'type' => 'media',
|
||||
'url' => true,
|
||||
'title' => esc_html__( '404 Error Image', 'thinkai' ),
|
||||
'desc' => esc_html__( 'Insert Error image', 'thinkai' ),
|
||||
'default' => '',
|
||||
),
|
||||
array(
|
||||
'id' => '404_page_title',
|
||||
'type' => 'text',
|
||||
'title' => esc_html__( '404 Page Heading', 'thinkai' ),
|
||||
'desc' => esc_html__( 'Enter 404 section Page Heading that you want to show', 'thinkai' ),
|
||||
),
|
||||
array(
|
||||
'id' => '404_page_tagline',
|
||||
'type' => 'text',
|
||||
'title' => esc_html__( '404 Page Tag Line', 'thinkai' ),
|
||||
'desc' => esc_html__( 'Enter 404 section Page Heading that you want to show', 'thinkai' ),
|
||||
),
|
||||
array(
|
||||
'id' => '404_page_text',
|
||||
'type' => 'textarea',
|
||||
'title' => esc_html__( '404 Page Description', 'thinkai' ),
|
||||
'desc' => esc_html__( 'Enter 404 page description that you want to show.', 'thinkai' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'back_home_btn',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__( 'Show Button', 'thinkai' ),
|
||||
'desc' => esc_html__( 'Enable to show back to home button.', 'thinkai' ),
|
||||
'default' => true,
|
||||
),
|
||||
array(
|
||||
'id' => 'back_home_btn_label',
|
||||
'type' => 'text',
|
||||
'title' => esc_html__( 'Button Label', 'thinkai' ),
|
||||
'desc' => esc_html__( 'Enter back to home button label that you want to show.', 'thinkai' ),
|
||||
'default' => esc_html__( 'Back to Home Page', 'thinkai' ),
|
||||
'required' => array( 'back_home_btn', '=', true ),
|
||||
),
|
||||
array(
|
||||
'id' => '404_post_settings_end',
|
||||
'type' => 'section',
|
||||
'indent' => false,
|
||||
),
|
||||
),
|
||||
);
|
||||
@@ -0,0 +1,112 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'title' => esc_html__( 'Archive Page Settings', 'thinkai' ),
|
||||
'id' => 'archive_setting',
|
||||
'desc' => '',
|
||||
'subsection' => true,
|
||||
'fields' => array(
|
||||
array(
|
||||
'id' => 'archive_source_type',
|
||||
'type' => 'button_set',
|
||||
'title' => esc_html__( 'Archive Source Type', 'thinkai' ),
|
||||
'options' => array(
|
||||
'd' => esc_html__( 'Default', 'thinkai' ),
|
||||
'e' => esc_html__( 'Elementor', 'thinkai' ),
|
||||
),
|
||||
'default' => 'd',
|
||||
),
|
||||
array(
|
||||
'id' => 'archive_elementor_template',
|
||||
'type' => 'select',
|
||||
'title' => __( 'Template', 'thinkai' ),
|
||||
'data' => 'posts',
|
||||
'args' => [
|
||||
'post_type' => [ 'elementor_library' ],
|
||||
'posts_per_page'=> -1,
|
||||
],
|
||||
'required' => [ 'archive_source_type', '=', 'e' ],
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'archive_default_st',
|
||||
'type' => 'section',
|
||||
'title' => esc_html__( 'Archive Default', 'thinkai' ),
|
||||
'indent' => true,
|
||||
'required' => [ 'archive_source_type', '=', 'd' ],
|
||||
),
|
||||
array(
|
||||
'id' => 'archive_page_banner',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__( 'Show Banner', 'thinkai' ),
|
||||
'desc' => esc_html__( 'Enable to show banner on blog', 'thinkai' ),
|
||||
'default' => true,
|
||||
),
|
||||
array(
|
||||
'id' => 'archive_features_list',
|
||||
'type' => 'textarea',
|
||||
'title' => esc_html__( 'Banner Feature List', 'thinkai' ),
|
||||
'desc' => esc_html__( 'Enter the Feature List to show in banner section', 'thinkai' ),
|
||||
'required' => array( 'archive_page_banner', '=', true ),
|
||||
),
|
||||
array(
|
||||
'id' => 'archive_banner_title',
|
||||
'type' => 'text',
|
||||
'title' => esc_html__( 'Banner Section Title', 'thinkai' ),
|
||||
'desc' => esc_html__( 'Enter the title to show in banner section', 'thinkai' ),
|
||||
'required' => array( 'archive_page_banner', '=', true ),
|
||||
),
|
||||
array(
|
||||
'id' => 'archive_page_background',
|
||||
'type' => 'media',
|
||||
'url' => true,
|
||||
'title' => esc_html__( 'Background Image', 'thinkai' ),
|
||||
'desc' => esc_html__( 'Insert background image for banner', 'thinkai' ),
|
||||
'default' => array(
|
||||
'url' => THINKAI_URI . 'assets/images/breadcrumb/breadcrumb-1.jpg',
|
||||
),
|
||||
'required' => array( 'archive_page_banner', '=', true ),
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'archive_sidebar_layout',
|
||||
'type' => 'image_select',
|
||||
'title' => esc_html__( 'Layout', 'thinkai' ),
|
||||
'subtitle' => esc_html__( 'Select main content and sidebar alignment.', 'thinkai' ),
|
||||
'options' => array(
|
||||
|
||||
'left' => array(
|
||||
'alt' => esc_html__( '2 Column Left', 'thinkai' ),
|
||||
'img' => get_template_directory_uri() . '/assets/images/redux/2cl.png',
|
||||
),
|
||||
'full' => array(
|
||||
'alt' => esc_html__( '1 Column', 'thinkai' ),
|
||||
'img' => get_template_directory_uri() . '/assets/images/redux/1col.png',
|
||||
),
|
||||
'right' => array(
|
||||
'alt' => esc_html__( '2 Column Right', 'thinkai' ),
|
||||
'img' => get_template_directory_uri() . '/assets/images/redux/2cr.png',
|
||||
),
|
||||
),
|
||||
|
||||
'default' => 'right',
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'archive_page_sidebar',
|
||||
'type' => 'select',
|
||||
'title' => esc_html__( 'Sidebar', 'thinkai' ),
|
||||
'desc' => esc_html__( 'Select sidebar to show at blog listing page', 'thinkai' ),
|
||||
'required' => array(
|
||||
array( 'archive_sidebar_layout', '=', array( 'left', 'right' ) ),
|
||||
),
|
||||
'options' => thinkai_get_sidebars(),
|
||||
),
|
||||
array(
|
||||
'id' => 'archive_default_ed',
|
||||
'type' => 'section',
|
||||
'indent' => false,
|
||||
'required' => [ 'archive_source_type', '=', 'd' ],
|
||||
),
|
||||
),
|
||||
);
|
||||
@@ -0,0 +1,112 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'title' => esc_html__( 'Author Page Settings', 'thinkai' ),
|
||||
'id' => 'author_setting',
|
||||
'desc' => '',
|
||||
'subsection' => true,
|
||||
'fields' => array(
|
||||
array(
|
||||
'id' => 'author_source_type',
|
||||
'type' => 'button_set',
|
||||
'title' => esc_html__( 'Author Source Type', 'thinkai' ),
|
||||
'options' => array(
|
||||
'd' => esc_html__( 'Default', 'thinkai' ),
|
||||
'e' => esc_html__( 'Elementor', 'thinkai' ),
|
||||
),
|
||||
'default' => 'd',
|
||||
),
|
||||
array(
|
||||
'id' => 'author_elementor_template',
|
||||
'type' => 'select',
|
||||
'title' => __( 'Template', 'thinkai' ),
|
||||
'data' => 'posts',
|
||||
'args' => [
|
||||
'post_type' => [ 'elementor_library' ],
|
||||
'posts_per_page'=> -1,
|
||||
],
|
||||
'required' => [ 'author_source_type', '=', 'e' ],
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'author_default_st',
|
||||
'type' => 'section',
|
||||
'title' => esc_html__( 'Author Default', 'thinkai' ),
|
||||
'indent' => true,
|
||||
'required' => [ 'author_source_type', '=', 'd' ],
|
||||
),
|
||||
array(
|
||||
'id' => 'author_page_banner',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__( 'Show Banner', 'thinkai' ),
|
||||
'desc' => esc_html__( 'Enable to show banner on blog', 'thinkai' ),
|
||||
'default' => true,
|
||||
),
|
||||
array(
|
||||
'id' => 'author_features_list',
|
||||
'type' => 'textarea',
|
||||
'title' => esc_html__( 'Banner Feature List', 'thinkai' ),
|
||||
'desc' => esc_html__( 'Enter the feature list to show in banner section', 'thinkai' ),
|
||||
'required' => array( 'author_page_banner', '=', true ),
|
||||
),
|
||||
array(
|
||||
'id' => 'author_banner_title',
|
||||
'type' => 'text',
|
||||
'title' => esc_html__( 'Banner Section Title', 'thinkai' ),
|
||||
'desc' => esc_html__( 'Enter the title to show in banner section', 'thinkai' ),
|
||||
'required' => array( 'author_page_banner', '=', true ),
|
||||
),
|
||||
array(
|
||||
'id' => 'author_page_background',
|
||||
'type' => 'media',
|
||||
'url' => true,
|
||||
'title' => esc_html__( 'Background Image', 'thinkai' ),
|
||||
'desc' => esc_html__( 'Insert background image for banner', 'thinkai' ),
|
||||
'default' => array(
|
||||
'url' => THINKAI_URI . 'assets/images/breadcrumb/breadcrumb-1.jpg',
|
||||
),
|
||||
'required' => array( 'author_page_banner', '=', true ),
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'author_sidebar_layout',
|
||||
'type' => 'image_select',
|
||||
'title' => esc_html__( 'Layout', 'thinkai' ),
|
||||
'subtitle' => esc_html__( 'Select main content and sidebar alignment.', 'thinkai' ),
|
||||
'options' => array(
|
||||
|
||||
'left' => array(
|
||||
'alt' => esc_html__( '2 Column Left', 'thinkai' ),
|
||||
'img' => get_template_directory_uri() . '/assets/images/redux/2cl.png',
|
||||
),
|
||||
'full' => array(
|
||||
'alt' => esc_html__( '1 Column', 'thinkai' ),
|
||||
'img' => get_template_directory_uri() . '/assets/images/redux/1col.png',
|
||||
),
|
||||
'right' => array(
|
||||
'alt' => esc_html__( '2 Column Right', 'thinkai' ),
|
||||
'img' => get_template_directory_uri() . '/assets/images/redux/2cr.png',
|
||||
),
|
||||
),
|
||||
|
||||
'default' => 'right',
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'author_page_sidebar',
|
||||
'type' => 'select',
|
||||
'title' => esc_html__( 'Sidebar', 'thinkai' ),
|
||||
'desc' => esc_html__( 'Select sidebar to show at blog listing page', 'thinkai' ),
|
||||
'required' => array(
|
||||
array( 'author_sidebar_layout', '=', array( 'left', 'right' ) ),
|
||||
),
|
||||
'options' => thinkai_get_sidebars(),
|
||||
),
|
||||
array(
|
||||
'id' => 'author_default_ed',
|
||||
'type' => 'section',
|
||||
'indent' => false,
|
||||
'required' => [ 'author_source_type', '=', 'd' ],
|
||||
),
|
||||
),
|
||||
);
|
||||
@@ -0,0 +1,141 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'title' => esc_html__( 'Blog Page Settings', 'thinkai' ),
|
||||
'id' => 'blog_setting',
|
||||
'desc' => '',
|
||||
'icon' => 'el el-indent-left',
|
||||
'fields' => array(
|
||||
array(
|
||||
'id' => 'blog_source_type',
|
||||
'type' => 'button_set',
|
||||
'title' => esc_html__( 'Blog Source Type', 'thinkai' ),
|
||||
'options' => array(
|
||||
'd' => esc_html__( 'Default', 'thinkai' ),
|
||||
'e' => esc_html__( 'Elementor', 'thinkai' ),
|
||||
),
|
||||
'default' => 'd',
|
||||
),
|
||||
array(
|
||||
'id' => 'blog_elementor_template',
|
||||
'type' => 'select',
|
||||
'title' => __( 'Template', 'thinkai' ),
|
||||
'data' => 'posts',
|
||||
'args' => [
|
||||
'post_type' => [ 'elementor_library' ],
|
||||
'posts_per_page'=> -1,
|
||||
],
|
||||
'required' => [ 'blog_source_type', '=', 'e' ],
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'blog_default_st',
|
||||
'type' => 'section',
|
||||
'title' => esc_html__( 'Blog Default', 'thinkai' ),
|
||||
'indent' => true,
|
||||
'required' => [ 'blog_source_type', '=', 'd' ],
|
||||
),
|
||||
array(
|
||||
'id' => 'blog_page_banner',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__( 'Show Banner', 'thinkai' ),
|
||||
'desc' => esc_html__( 'Enable to show banner on blog', 'thinkai' ),
|
||||
'default' => true,
|
||||
),
|
||||
array(
|
||||
'id' => 'blog_features_list',
|
||||
'type' => 'textarea',
|
||||
'title' => esc_html__( 'Banner Feature List', 'thinkai' ),
|
||||
'desc' => esc_html__( 'Enter the Feature List to show in banner section', 'thinkai' ),
|
||||
'required' => array( 'blog_page_banner', '=', true ),
|
||||
),
|
||||
array(
|
||||
'id' => 'blog_banner_title',
|
||||
'type' => 'text',
|
||||
'title' => esc_html__( 'Banner Section Title', 'thinkai' ),
|
||||
'desc' => esc_html__( 'Enter the title to show in banner section', 'thinkai' ),
|
||||
'required' => array( 'blog_page_banner', '=', true ),
|
||||
),
|
||||
array(
|
||||
'id' => 'blog_page_background',
|
||||
'type' => 'media',
|
||||
'url' => true,
|
||||
'title' => esc_html__( 'Background Image', 'thinkai' ),
|
||||
'desc' => esc_html__( 'Insert background image for banner', 'thinkai' ),
|
||||
'default' => array(
|
||||
'url' => THINKAI_URI . 'assets/images/breadcrumb/breadcrumb-1.jpg',
|
||||
),
|
||||
'required' => array( 'blog_page_banner', '=', true ),
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'blog_sidebar_layout',
|
||||
'type' => 'image_select',
|
||||
'title' => esc_html__( 'Layout', 'thinkai' ),
|
||||
'subtitle' => esc_html__( 'Select main content and sidebar alignment.', 'thinkai' ),
|
||||
'options' => array(
|
||||
|
||||
'left' => array(
|
||||
'alt' => esc_html__( '2 Column Left', 'thinkai' ),
|
||||
'img' => get_template_directory_uri() . '/assets/images/redux/2cl.png',
|
||||
),
|
||||
'full' => array(
|
||||
'alt' => esc_html__( '1 Column', 'thinkai' ),
|
||||
'img' => get_template_directory_uri() . '/assets/images/redux/1col.png',
|
||||
),
|
||||
'right' => array(
|
||||
'alt' => esc_html__( '2 Column Right', 'thinkai' ),
|
||||
'img' => get_template_directory_uri() . '/assets/images/redux/2cr.png',
|
||||
),
|
||||
),
|
||||
|
||||
'default' => 'right',
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'blog_page_sidebar',
|
||||
'type' => 'select',
|
||||
'title' => esc_html__( 'Sidebar', 'thinkai' ),
|
||||
'desc' => esc_html__( 'Select sidebar to show at blog listing page', 'thinkai' ),
|
||||
'required' => array(
|
||||
array( 'blog_sidebar_layout', '=', array( 'left', 'right' ) ),
|
||||
),
|
||||
'options' => thinkai_get_sidebars(),
|
||||
),
|
||||
array(
|
||||
'id' => 'blog_post_comments',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__( 'Show Post Comments', 'thinkai' ),
|
||||
'desc' => esc_html__( 'Enable to show post comments on posts listing', 'thinkai' ),
|
||||
'default' => false,
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'blog_post_author',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__( 'Hide Author', 'thinkai' ),
|
||||
'desc' => esc_html__( 'Enable to show author on posts listing', 'thinkai' ),
|
||||
'default' => false,
|
||||
),
|
||||
array(
|
||||
'id' => 'blog_post_date',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__( 'Hide Post Date', 'thinkai' ),
|
||||
'desc' => esc_html__( 'Enable to show post data on posts listing', 'thinkai' ),
|
||||
'default' => false,
|
||||
),
|
||||
array(
|
||||
'id' => 'blog_post_category',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__( 'Hide Post Category', 'thinkai' ),
|
||||
'desc' => esc_html__( 'Enable to show post category on posts listing', 'thinkai' ),
|
||||
'default' => false,
|
||||
),
|
||||
array(
|
||||
'id' => 'blog_default_ed',
|
||||
'type' => 'section',
|
||||
'indent' => false,
|
||||
'required' => [ 'blog_source_type', '=', 'd' ],
|
||||
),
|
||||
),
|
||||
);
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
'title' => esc_html__( 'Body Font Settings', 'thinkai' ),
|
||||
'id' => 'body_font_setting',
|
||||
'desc' => '',
|
||||
'subsection' => true,
|
||||
'fields' => array(
|
||||
array(
|
||||
'id' => 'body_custom_fonts',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__('Use Body,Paragraph Custom Font', 'thinkai'),
|
||||
'desc' => esc_html__('Enable to customize the theme body,p tag font', 'thinkai'),
|
||||
),
|
||||
array(
|
||||
'id' => 'body_typography',
|
||||
'type' => 'typography',
|
||||
'title' => esc_html__('Body Font Typography', 'thinkai'),
|
||||
'google' => true,
|
||||
'font-backup' => true,
|
||||
'output' => array('p', '.about > p', '.serv-caro li p ', '.counter-meta > p', '.funfacts > li > p', '.price-table p ', '.testimonials li p', '.ser-meta > p', '.whyus-meta > p ', '.touch-form > p ', '.category-box > p', '.experts-box .experts-box > p', '.blog-detail-meta > p', '.banner-meta > p', '.author-post > p', '.commenter-meta > p ', '.times > li p', '.complete-contact > p', '.xyz > p', '.error-page > p', '.project-deta .blog-detail-meta > p ', '.ziehharmonika > div p', '.download-box ul li p', '.soom-info > p ', '.countdown > li > p', '.s-not-found > p', '.about > p', '.serv-caro li p' ),
|
||||
'units' => 'px',
|
||||
'subtitle' => esc_html__('Apply options to customize the body,paragraph font for the theme', 'thinkai'),
|
||||
'default' => array(
|
||||
'color' => '',
|
||||
'font-style' => '',
|
||||
'font-family' => '',
|
||||
'google' => true,
|
||||
'font-size' => '',
|
||||
'line-height' => ''
|
||||
),
|
||||
'required' => array('body_custom_fonts', '=', true),
|
||||
),
|
||||
),
|
||||
);
|
||||
@@ -0,0 +1,112 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'title' => esc_html__( 'Category Page Settings', 'thinkai' ),
|
||||
'id' => 'category_setting',
|
||||
'desc' => '',
|
||||
'subsection' => true,
|
||||
'fields' => array(
|
||||
array(
|
||||
'id' => 'category_source_type',
|
||||
'type' => 'button_set',
|
||||
'title' => esc_html__( 'Category Source Type', 'thinkai' ),
|
||||
'options' => array(
|
||||
'd' => esc_html__( 'Default', 'thinkai' ),
|
||||
'e' => esc_html__( 'Elementor', 'thinkai' ),
|
||||
),
|
||||
'default' => 'd',
|
||||
),
|
||||
array(
|
||||
'id' => 'category_elementor_template',
|
||||
'type' => 'select',
|
||||
'title' => __( 'Template', 'thinkai' ),
|
||||
'data' => 'posts',
|
||||
'args' => [
|
||||
'post_type' => [ 'elementor_library' ],
|
||||
'posts_per_page'=> -1,
|
||||
],
|
||||
'required' => [ 'category_source_type', '=', 'e' ],
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'category_default_st',
|
||||
'type' => 'section',
|
||||
'title' => esc_html__( 'Category Default', 'thinkai' ),
|
||||
'indent' => true,
|
||||
'required' => [ 'category_source_type', '=', 'd' ],
|
||||
),
|
||||
array(
|
||||
'id' => 'category_page_banner',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__( 'Show Banner', 'thinkai' ),
|
||||
'desc' => esc_html__( 'Enable to show banner on blog', 'thinkai' ),
|
||||
'default' => true,
|
||||
),
|
||||
array(
|
||||
'id' => 'category_features_list',
|
||||
'type' => 'textarea',
|
||||
'title' => esc_html__( 'Banner Feature List', 'thinkai' ),
|
||||
'desc' => esc_html__( 'Enter the Feature List to show in banner section', 'thinkai' ),
|
||||
'required' => array( 'category_page_banner', '=', true ),
|
||||
),
|
||||
array(
|
||||
'id' => 'category_banner_title',
|
||||
'type' => 'text',
|
||||
'title' => esc_html__( 'Banner Section Title', 'thinkai' ),
|
||||
'desc' => esc_html__( 'Enter the title to show in banner section', 'thinkai' ),
|
||||
'required' => array( 'category_page_banner', '=', true ),
|
||||
),
|
||||
array(
|
||||
'id' => 'category_page_background',
|
||||
'type' => 'media',
|
||||
'url' => true,
|
||||
'title' => esc_html__( 'Background Image', 'thinkai' ),
|
||||
'desc' => esc_html__( 'Insert background image for banner', 'thinkai' ),
|
||||
'default' => array(
|
||||
'url' => THINKAI_URI . 'assets/images/breadcrumb/breadcrumb-1.jpg',
|
||||
),
|
||||
'required' => array( 'category_page_banner', '=', true ),
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'category_sidebar_layout',
|
||||
'type' => 'image_select',
|
||||
'title' => esc_html__( 'Layout', 'thinkai' ),
|
||||
'subtitle' => esc_html__( 'Select main content and sidebar alignment.', 'thinkai' ),
|
||||
'options' => array(
|
||||
|
||||
'left' => array(
|
||||
'alt' => esc_html__( '2 Column Left', 'thinkai' ),
|
||||
'img' => get_template_directory_uri() . '/assets/images/redux/2cl.png',
|
||||
),
|
||||
'full' => array(
|
||||
'alt' => esc_html__( '1 Column', 'thinkai' ),
|
||||
'img' => get_template_directory_uri() . '/assets/images/redux/1col.png',
|
||||
),
|
||||
'right' => array(
|
||||
'alt' => esc_html__( '2 Column Right', 'thinkai' ),
|
||||
'img' => get_template_directory_uri() . '/assets/images/redux/2cr.png',
|
||||
),
|
||||
),
|
||||
|
||||
'default' => 'right',
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'category_page_sidebar',
|
||||
'type' => 'select',
|
||||
'title' => esc_html__( 'Sidebar', 'thinkai' ),
|
||||
'desc' => esc_html__( 'Select sidebar to show at blog listing page', 'thinkai' ),
|
||||
'required' => array(
|
||||
array( 'category_sidebar_layout', '=', array( 'left', 'right' ) ),
|
||||
),
|
||||
'options' => thinkai_get_sidebars(),
|
||||
),
|
||||
array(
|
||||
'id' => 'category_default_ed',
|
||||
'type' => 'section',
|
||||
'indent' => false,
|
||||
'required' => [ 'category_source_type', '=', 'd' ],
|
||||
),
|
||||
),
|
||||
);
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
|
||||
return array(
|
||||
|
||||
'title' => esc_html__( 'Custom Font Settings', 'thinkai' ),
|
||||
|
||||
'id' => 'custom_fonts_setting',
|
||||
|
||||
'desc' => '',
|
||||
|
||||
'icon' => 'el el-font',
|
||||
|
||||
'fields' => array(
|
||||
|
||||
array(
|
||||
'id' => 'theme_custom_font',
|
||||
|
||||
'type' => 'fonts',
|
||||
|
||||
'desc' => esc_html__( 'Please upload your desire font file in *.ttf, *.otf, *.eot, *.woff format', 'thinkai' ),
|
||||
),
|
||||
),
|
||||
);
|
||||
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
'title' => esc_html__( 'Custom Sidebar Settings', 'thinkai' ),
|
||||
'id' => 'custom_sidebar_setting',
|
||||
'desc' => '',
|
||||
'icon' => 'el el-indent-left',
|
||||
'fields' => array(
|
||||
array(
|
||||
'id' => 'custom_sidebar_name',
|
||||
'type' => 'multi_text',
|
||||
'title' => esc_html__('Dynamic Custom Sidebar', 'thinkai'),
|
||||
'desc' => esc_html__('This section is used to create custom sidebar', 'thinkai')
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -0,0 +1,442 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'title' => esc_html__( 'Footer Setting', 'thinkai' ),
|
||||
'id' => 'footer_setting',
|
||||
'desc' => '',
|
||||
'subsection' => false,
|
||||
'fields' => array(
|
||||
array(
|
||||
'id' => 'footer_source_type',
|
||||
'type' => 'button_set',
|
||||
'title' => esc_html__( 'Footer Source Type', 'thinkai' ),
|
||||
'options' => array(
|
||||
'd' => esc_html__( 'Default', 'thinkai' ),
|
||||
'e' => esc_html__( 'Elementor', 'thinkai' ),
|
||||
),
|
||||
'default' => 'd',
|
||||
),
|
||||
array(
|
||||
'id' => 'footer_elementor_template',
|
||||
'type' => 'select',
|
||||
'title' => __( 'Template', 'thinkai' ),
|
||||
'data' => 'posts',
|
||||
'args' => [
|
||||
'post_type' => [ 'elementor_library' ],
|
||||
'posts_per_page' => -1
|
||||
],
|
||||
'required' => [ 'footer_source_type', '=', 'e' ],
|
||||
),
|
||||
array(
|
||||
'id' => 'footer_style_section_start',
|
||||
'type' => 'section',
|
||||
'indent' => true,
|
||||
'title' => esc_html__( 'Footer Settings', 'thinkai' ),
|
||||
'required' => array( 'footer_source_type', '=', 'd' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'footer_style_settings',
|
||||
'type' => 'image_select',
|
||||
'title' => esc_html__( 'Choose Footer Styles', 'thinkai' ),
|
||||
'subtitle' => esc_html__( 'Choose Footer Styles', 'thinkai' ),
|
||||
'options' => array(
|
||||
|
||||
'footer_v1' => array(
|
||||
'alt' => esc_html__( 'Footer Style 1', 'thinkai' ),
|
||||
'img' => get_template_directory_uri() . '/assets/images/redux/footer/footer_v1.png',
|
||||
),
|
||||
'footer_v2' => array(
|
||||
'alt' => esc_html__( 'Footer Style 2', 'thinkai' ),
|
||||
'img' => get_template_directory_uri() . '/assets/images/redux/footer/footer_v2.png',
|
||||
),
|
||||
'footer_v3' => array(
|
||||
'alt' => esc_html__( 'Footer Style 3', 'thinkai' ),
|
||||
'img' => get_template_directory_uri() . '/assets/images/redux/footer/footer_v3.png',
|
||||
),
|
||||
'footer_v4' => array(
|
||||
'alt' => esc_html__( 'Footer Style 4', 'thinkai' ),
|
||||
'img' => get_template_directory_uri() . '/assets/images/redux/footer/footer_v4.png',
|
||||
),
|
||||
'footer_v5' => array(
|
||||
'alt' => esc_html__( 'Footer Style 5', 'thinkai' ),
|
||||
'img' => get_template_directory_uri() . '/assets/images/redux/footer/footer_v5.png',
|
||||
),
|
||||
),
|
||||
'required' => array( 'footer_source_type', '=', 'd' ),
|
||||
'default' => 'footer_v1',
|
||||
),
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
Footer Version 1 Start
|
||||
************************************************************************/
|
||||
array(
|
||||
'id' => 'footer_v1_settings_section_start',
|
||||
'type' => 'section',
|
||||
'indent' => true,
|
||||
'title' => esc_html__( 'Footer Style One Settings', 'thinkai' ),
|
||||
'required' => array( 'footer_style_settings', '=', 'footer_v1' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'show_top_footer_v1',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__('Enable/Disable Top Footer', 'thinkai'),
|
||||
'default' => false,
|
||||
'required' => array( 'footer_style_settings', '=', 'footer_v1' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'footer_shape_img_v1',
|
||||
'type' => 'media',
|
||||
'url' => true,
|
||||
'title' => esc_html__( 'Footer BG Pattern Image', 'thinkai' ),
|
||||
'subtitle' => esc_html__( 'Insert footer BG Pattern Image', 'thinkai' ),
|
||||
'required' => array( 'show_top_footer_v1', '=', true ),
|
||||
),
|
||||
array(
|
||||
'id' => 'footer_logo_title_v1',
|
||||
'type' => 'text',
|
||||
'title' => __( 'Logo Title', 'thinkai' ),
|
||||
'required' => array( 'show_top_footer_v1', '=', true ),
|
||||
),
|
||||
array(
|
||||
'id' => 'footer_user_text_v1',
|
||||
'type' => 'textarea',
|
||||
'title' => __( 'User Description', 'thinkai' ),
|
||||
'required' => array( 'show_top_footer_v1', '=', true ),
|
||||
),
|
||||
array(
|
||||
'id' => 'footer_external_link_v1',
|
||||
'type' => 'text',
|
||||
'title' => __( 'External Link', 'thinkai' ),
|
||||
'required' => array( 'show_top_footer_v1', '=', true ),
|
||||
),
|
||||
array(
|
||||
'id' => 'footer_newsletter_icon_image',
|
||||
'type' => 'media',
|
||||
'url' => true,
|
||||
'title' => esc_html__( 'Form Icon Image', 'thinkai' ),
|
||||
'subtitle' => esc_html__( 'Insert footer Form Icon Image', 'thinkai' ),
|
||||
'required' => array( 'show_top_footer_v1', '=', true ),
|
||||
),
|
||||
array(
|
||||
'id' => 'footer_newsletter_title_v1',
|
||||
'type' => 'textarea',
|
||||
'title' => __( 'Newsletter Form Title', 'thinkai' ),
|
||||
'required' => array( 'show_top_footer_v1', '=', true ),
|
||||
),
|
||||
array(
|
||||
'id' => 'footer_newsletter_text_v1',
|
||||
'type' => 'textarea',
|
||||
'title' => __( 'Newsletter Form Text', 'thinkai' ),
|
||||
'required' => array( 'show_top_footer_v1', '=', true ),
|
||||
),
|
||||
array(
|
||||
'id' => 'footer_newsletter_form_url_v1',
|
||||
'type' => 'text',
|
||||
'title' => __( 'Mailchimp Form Url', 'thinkai' ),
|
||||
'required' => array( 'show_top_footer_v1', '=', true ),
|
||||
),
|
||||
array(
|
||||
'id' => 'footer_copyright_text_v1',
|
||||
'type' => 'textarea',
|
||||
'title' => __( 'Copyright Text', 'thinkai' ),
|
||||
'required' => array( 'footer_style_settings', '=', 'footer_v1' ),
|
||||
),
|
||||
//Footer Privacy Menu
|
||||
array(
|
||||
'id' => 'show_footer_privacy_menu_v1',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__('Enable/Disable Privacy Menu', 'thinkai'),
|
||||
'default' => false,
|
||||
'required' => array( 'footer_style_settings', '=', 'footer_v1' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'footer_privacy_menu_v1',
|
||||
'type' => 'textarea',
|
||||
'title' => __( 'Privacy Menu', 'thinkai' ),
|
||||
'required' => array( 'show_footer_privacy_menu_v1', '=', true ),
|
||||
),
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
Footer Version 1 Start
|
||||
************************************************************************/
|
||||
array(
|
||||
'id' => 'footer_v2_settings_section_start',
|
||||
'type' => 'section',
|
||||
'indent' => true,
|
||||
'title' => esc_html__( 'Footer Style Two Settings', 'thinkai' ),
|
||||
'required' => array( 'footer_style_settings', '=', 'footer_v2' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'footer_copyright_text_v2',
|
||||
'type' => 'textarea',
|
||||
'title' => __( 'Copyright Text', 'thinkai' ),
|
||||
'required' => array( 'footer_style_settings', '=', 'footer_v2' ),
|
||||
),
|
||||
|
||||
//Footer Privacy Menu
|
||||
array(
|
||||
'id' => 'show_footer_privacy_menu_v2',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__('Enable/Disable Privacy Menu', 'thinkai'),
|
||||
'default' => false,
|
||||
'required' => array( 'footer_style_settings', '=', 'footer_v2' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'footer_privacy_menu_v2',
|
||||
'type' => 'textarea',
|
||||
'title' => __( 'Privacy Menu', 'thinkai' ),
|
||||
'required' => array( 'show_footer_privacy_menu_v2', '=', true ),
|
||||
),
|
||||
|
||||
/***********************************************************************
|
||||
Footer Version 3 Start
|
||||
************************************************************************/
|
||||
array(
|
||||
'id' => 'footer_v3_settings_section_start',
|
||||
'type' => 'section',
|
||||
'indent' => true,
|
||||
'title' => esc_html__( 'Footer Style Three Settings', 'thinkai' ),
|
||||
'required' => array( 'footer_style_settings', '=', 'footer_v3' ),
|
||||
),
|
||||
//Footer Privacy Menu
|
||||
array(
|
||||
'id' => 'show_footer_privacy_menu_v3',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__('Enable/Disable Privacy Menu', 'thinkai'),
|
||||
'default' => false,
|
||||
'required' => array( 'footer_style_settings', '=', 'footer_v3' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'footer_privacy_menu_v3',
|
||||
'type' => 'textarea',
|
||||
'title' => __( 'Privacy Menu', 'thinkai' ),
|
||||
'required' => array( 'show_footer_privacy_menu_v3', '=', true ),
|
||||
),
|
||||
array(
|
||||
'id' => 'footer_copyright_text_v3',
|
||||
'type' => 'textarea',
|
||||
'title' => __( 'Copyright Text', 'thinkai' ),
|
||||
'required' => array( 'footer_style_settings', '=', 'footer_v3' ),
|
||||
),
|
||||
//Social Icon
|
||||
array(
|
||||
'id' => 'show_footer_social_icon_v3',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__('Enable/Disable Social Icon', 'thinkai'),
|
||||
'default' => false,
|
||||
'required' => array( 'footer_style_settings', '=', 'footer_v3' ),
|
||||
),
|
||||
//Email address Info
|
||||
array(
|
||||
'id' => 'show_footer_email_info_v3',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__('Enable/Disable Email Address', 'thinkai'),
|
||||
'default' => false,
|
||||
'required' => array( 'footer_style_settings', '=', 'footer_v3' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'footer_email_title_v3',
|
||||
'type' => 'text',
|
||||
'title' => __( 'Email Title', 'thinkai' ),
|
||||
'required' => array( 'show_footer_email_info_v3', '=', true ),
|
||||
),
|
||||
array(
|
||||
'id' => 'footer_email_address_v3',
|
||||
'type' => 'text',
|
||||
'title' => __( 'Email Address', 'thinkai' ),
|
||||
'required' => array( 'show_footer_email_info_v3', '=', true ),
|
||||
),
|
||||
|
||||
/***********************************************************************
|
||||
Footer Version 4 Start
|
||||
************************************************************************/
|
||||
array(
|
||||
'id' => 'footer_v4_settings_section_start',
|
||||
'type' => 'section',
|
||||
'indent' => true,
|
||||
'title' => esc_html__( 'Footer Style Four Settings', 'thinkai' ),
|
||||
'required' => array( 'footer_style_settings', '=', 'footer_v4' ),
|
||||
),
|
||||
|
||||
//BG Image
|
||||
array(
|
||||
'id' => 'bg_img_v4',
|
||||
'type' => 'media',
|
||||
'url' => true,
|
||||
'title' => esc_html__( 'BG Image', 'thinkai' ),
|
||||
'subtitle' => esc_html__( 'Insert footer BG Image', 'thinkai' ),
|
||||
'required' => array( 'footer_style_settings', '=', 'footer_v4' ),
|
||||
),
|
||||
|
||||
//Footer Topbar Section
|
||||
array(
|
||||
'id' => 'show_top_footer_v4',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__('Enable/Disable Footer Topbar Section', 'thinkai'),
|
||||
'default' => false,
|
||||
'required' => array( 'footer_style_settings', '=', 'footer_v4' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'logo_img_v4',
|
||||
'type' => 'media',
|
||||
'url' => true,
|
||||
'title' => esc_html__( 'Logo Image', 'thinkai' ),
|
||||
'subtitle' => esc_html__( 'Insert footer Logo Image', 'thinkai' ),
|
||||
'required' => array( 'show_top_footer_v4', '=', true ),
|
||||
),
|
||||
array(
|
||||
'id' => 'footer_title_v4',
|
||||
'type' => 'textarea',
|
||||
'title' => __( 'Title', 'thinkai' ),
|
||||
'required' => array( 'show_top_footer_v4', '=', true ),
|
||||
),
|
||||
array(
|
||||
'id' => 'footer_contact_info_title_v4',
|
||||
'type' => 'text',
|
||||
'title' => __( 'Question Title', 'thinkai' ),
|
||||
'required' => array( 'show_top_footer_v4', '=', true ),
|
||||
),
|
||||
array(
|
||||
'id' => 'footer_email_address_v4',
|
||||
'type' => 'text',
|
||||
'title' => __( 'Email Address', 'thinkai' ),
|
||||
'required' => array( 'show_top_footer_v4', '=', true ),
|
||||
),
|
||||
array(
|
||||
'id' => 'footer_button_title_v4',
|
||||
'type' => 'text',
|
||||
'title' => __( 'Button Title', 'thinkai' ),
|
||||
'required' => array( 'show_top_footer_v4', '=', true ),
|
||||
),
|
||||
array(
|
||||
'id' => 'footer_button_link_v4',
|
||||
'type' => 'text',
|
||||
'title' => __( 'Button Link', 'thinkai' ),
|
||||
'required' => array( 'show_top_footer_v4', '=', true ),
|
||||
),
|
||||
array(
|
||||
'id' => 'footer_external_link_v4',
|
||||
'type' => 'text',
|
||||
'title' => __( 'External Link', 'thinkai' ),
|
||||
'required' => array( 'show_top_footer_v4', '=', true ),
|
||||
),
|
||||
|
||||
//Social Media
|
||||
array(
|
||||
'id' => 'social_media_tabs_v2',
|
||||
'type' => 'repeater',
|
||||
'icon' => 'el-icon-thumbs-up',
|
||||
'title' => __('Add Social Media', 'thinkai'),
|
||||
'required' => array( 'show_top_footer_v4', '=', true ),
|
||||
'group_values' => true,
|
||||
'sortable' => true,
|
||||
'fields' => array(
|
||||
array(
|
||||
'id' => 'title_social_media_v2',
|
||||
'type' => 'text',
|
||||
'title' => __('Title', 'thinkai'),
|
||||
),
|
||||
array(
|
||||
'id' => 'select_social_media_v2',
|
||||
'type' => 'select',
|
||||
'data' => get_fontawesome_icons(),
|
||||
'title' => esc_html__('Choose Social Media', 'thinkai'),
|
||||
),
|
||||
array(
|
||||
'id' => 'link_social_media_v2',
|
||||
'type' => 'text',
|
||||
'title' => __('Link', 'thinkai'),
|
||||
),
|
||||
)
|
||||
),
|
||||
|
||||
//Footer Privacy Menu
|
||||
array(
|
||||
'id' => 'show_footer_privacy_menu_v4',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__('Enable/Disable Privacy Menu', 'thinkai'),
|
||||
'default' => false,
|
||||
'required' => array( 'footer_style_settings', '=', 'footer_v4' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'footer_privacy_menu_v4',
|
||||
'type' => 'textarea',
|
||||
'title' => __( 'Privacy Menu', 'thinkai' ),
|
||||
'required' => array( 'show_footer_privacy_menu_v4', '=', true ),
|
||||
),
|
||||
//Copyright
|
||||
array(
|
||||
'id' => 'footer_copyright_text_v4',
|
||||
'type' => 'textarea',
|
||||
'title' => __( 'Copyright Text', 'thinkai' ),
|
||||
'required' => array( 'footer_style_settings', '=', 'footer_v4' ),
|
||||
),
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
Footer Version 5 Start
|
||||
************************************************************************/
|
||||
array(
|
||||
'id' => 'footer_v5_settings_section_start',
|
||||
'type' => 'section',
|
||||
'indent' => true,
|
||||
'title' => esc_html__( 'Footer Style Five Settings', 'thinkai' ),
|
||||
'required' => array( 'footer_style_settings', '=', 'footer_v5' ),
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'show_top_footer_v5',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__('Enable/Disable Footer Topbar Section', 'thinkai'),
|
||||
'default' => false,
|
||||
'required' => array( 'footer_style_settings', '=', 'footer_v5' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'footer_bg_title_v5',
|
||||
'type' => 'text',
|
||||
'title' => __( 'BG Title', 'thinkai' ),
|
||||
'required' => array( 'show_top_footer_v5', '=', true ),
|
||||
),
|
||||
array(
|
||||
'id' => 'footer_text_v5',
|
||||
'type' => 'textarea',
|
||||
'title' => __( 'User Description', 'thinkai' ),
|
||||
'required' => array( 'show_top_footer_v5', '=', true ),
|
||||
),
|
||||
//Email Button
|
||||
array(
|
||||
'id' => 'footer_email_title_v5',
|
||||
'type' => 'text',
|
||||
'title' => __( 'Email Button Title', 'thinkai' ),
|
||||
'required' => array( 'show_top_footer_v5', '=', true ),
|
||||
),
|
||||
array(
|
||||
'id' => 'footer_email_address_v5',
|
||||
'type' => 'text',
|
||||
'title' => __( 'Email Address', 'thinkai' ),
|
||||
'required' => array( 'show_top_footer_v5', '=', true ),
|
||||
),
|
||||
//support Chat
|
||||
array(
|
||||
'id' => 'footer_support_title_v5',
|
||||
'type' => 'text',
|
||||
'title' => __( 'Chat button Title', 'thinkai' ),
|
||||
'required' => array( 'show_top_footer_v5', '=', true ),
|
||||
),
|
||||
array(
|
||||
'id' => 'footer_support_link_v5',
|
||||
'type' => 'text',
|
||||
'title' => __( 'Support Button Link', 'thinkai' ),
|
||||
'required' => array( 'show_top_footer_v5', '=', true ),
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'footer_default_ed',
|
||||
'type' => 'section',
|
||||
'indent' => false,
|
||||
'required' => [ 'footer_source_type', '=', 'd' ],
|
||||
),
|
||||
),
|
||||
);
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
$styles = [];
|
||||
foreach(range(1, 28) as $val) {
|
||||
$styles[$val] = sprintf(esc_html__('Style %s', 'thinkai'), $val);
|
||||
}
|
||||
|
||||
return array(
|
||||
'title' => esc_html__( 'General Setting', 'thinkai' ),
|
||||
'id' => 'general_setting',
|
||||
'desc' => '',
|
||||
'icon' => 'el el-wrench',
|
||||
'fields' => array(
|
||||
array(
|
||||
'id' => 'theme_preloader',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__('Enable Preloader', 'thinkai'),
|
||||
'default' => false,
|
||||
),
|
||||
array(
|
||||
'id' => 'mouse_cursor',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__('Enable Mouse Cursor ', 'thinkai'),
|
||||
'default' => false,
|
||||
),
|
||||
array(
|
||||
'id' => 'show_scroltop',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__('Enable Scroll To Top Button ', 'thinkai'),
|
||||
'default' => false,
|
||||
),
|
||||
array(
|
||||
'id' => 'scroltop_text',
|
||||
'type' => 'text',
|
||||
'title' => esc_html__( 'Button Text', 'thinkai' ),
|
||||
'required' => array( 'show_scroltop', '=', true ),
|
||||
),
|
||||
),
|
||||
);
|
||||
@@ -0,0 +1,439 @@
|
||||
<?php
|
||||
return array(
|
||||
'title' => esc_html__( 'Header Setting', 'thinkai' ),
|
||||
'id' => 'headers_setting',
|
||||
'desc' => '',
|
||||
'subsection' => false,
|
||||
'fields' => array(
|
||||
array(
|
||||
'id' => 'header_source_type',
|
||||
'type' => 'button_set',
|
||||
'title' => esc_html__( 'Header Source Type', 'thinkai' ),
|
||||
'options' => array(
|
||||
'd' => esc_html__( 'Default', 'thinkai' ),
|
||||
'e' => esc_html__( 'Elementor', 'thinkai' ),
|
||||
),
|
||||
'default' => 'd',
|
||||
),
|
||||
array(
|
||||
'id' => 'header_elementor_template',
|
||||
'type' => 'select',
|
||||
'title' => __( 'Template', 'thinkai' ),
|
||||
'data' => 'posts',
|
||||
'args' => [
|
||||
'post_type' => [ 'elementor_library' ],
|
||||
'posts_per_page' => -1
|
||||
],
|
||||
'required' => [ 'header_source_type', '=', 'e' ],
|
||||
),
|
||||
array(
|
||||
'id' => 'header_style_section_start',
|
||||
'type' => 'section',
|
||||
'indent' => true,
|
||||
'title' => esc_html__( 'Header Settings', 'thinkai' ),
|
||||
'required' => array( 'header_source_type', '=', 'd' ),
|
||||
),
|
||||
|
||||
//Header Settings
|
||||
array(
|
||||
'id' => 'header_style_settings',
|
||||
'type' => 'image_select',
|
||||
'title' => esc_html__( 'Choose Header Styles', 'thinkai' ),
|
||||
'subtitle' => esc_html__( 'Choose Header Styles', 'thinkai' ),
|
||||
'options' => array(
|
||||
|
||||
'header_v1' => array(
|
||||
'alt' => esc_html__( 'Header Style 1', 'thinkai' ),
|
||||
'img' => get_template_directory_uri() . '/assets/images/redux/header/header_v1.png',
|
||||
),
|
||||
'header_v2' => array(
|
||||
'alt' => esc_html__( 'Header Style 2', 'thinkai' ),
|
||||
'img' => get_template_directory_uri() . '/assets/images/redux/header/header_v2.png',
|
||||
),
|
||||
'header_v3' => array(
|
||||
'alt' => esc_html__( 'Header Style 3', 'thinkai' ),
|
||||
'img' => get_template_directory_uri() . '/assets/images/redux/header/header_v3.png',
|
||||
),
|
||||
'header_v4' => array(
|
||||
'alt' => esc_html__( 'Header Style 4', 'thinkai' ),
|
||||
'img' => get_template_directory_uri() . '/assets/images/redux/header/header_v4.png',
|
||||
),
|
||||
'header_v5' => array(
|
||||
'alt' => esc_html__( 'Header Style 5', 'thinkai' ),
|
||||
'img' => get_template_directory_uri() . '/assets/images/redux/header/header_v5.png',
|
||||
),
|
||||
),
|
||||
'required' => array( 'header_source_type', '=', 'd' ),
|
||||
'default' => 'header_v1',
|
||||
),
|
||||
|
||||
/***********************************************************************
|
||||
Header Version 1 Start
|
||||
************************************************************************/
|
||||
array(
|
||||
'id' => 'header_v1_settings_section_start',
|
||||
'type' => 'section',
|
||||
'indent' => true,
|
||||
'title' => esc_html__( 'Header Style One Settings', 'thinkai' ),
|
||||
'required' => array( 'header_style_settings', '=', 'header_v1' ),
|
||||
),
|
||||
|
||||
//Header V1 Logo Style
|
||||
array(
|
||||
'id' => 'header_v1_logo_show',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__('Enable Logo', 'thinkai'),
|
||||
'default' => true,
|
||||
'required' => array( 'header_style_settings', '=', 'header_v1' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'header_v1_logo',
|
||||
'type' => 'media',
|
||||
'url' => true,
|
||||
'title' => esc_html__( 'Logo Image', 'thinkai' ),
|
||||
'subtitle' => esc_html__( 'Insert site logo image', 'thinkai' ),
|
||||
'required' => array( 'header_v1_logo_show', '=', true ),
|
||||
),
|
||||
array(
|
||||
'id' => 'header_v1_logo_dimension',
|
||||
'type' => 'dimensions',
|
||||
'title' => esc_html__( 'Logo Dimentions', 'thinkai' ),
|
||||
'subtitle' => esc_html__( 'Select Logo Dimentions', 'thinkai' ),
|
||||
'units' => array( 'em', 'px', '%' ),
|
||||
'default' => array( 'Width' => '', 'Height' => '' ),
|
||||
'required' => array( 'header_v1_logo_show', '=', true ),
|
||||
),
|
||||
//Header Topbar
|
||||
array(
|
||||
'id' => 'show_header_topbar_v1',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__('Enable/Disable Header Topbar', 'thinkai'),
|
||||
'default' => false,
|
||||
'required' => array( 'header_style_settings', '=', 'header_v1' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'welcome_text_v1',
|
||||
'type' => 'text',
|
||||
'title' => __( 'Welcome Text', 'thinkai' ),
|
||||
'required' => array( 'show_header_topbar_v1', '=', true ),
|
||||
),
|
||||
|
||||
//Get Started Button
|
||||
array(
|
||||
'id' => 'show_btn_v1',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__('Enable/Disable Get Started BTN', 'thinkai'),
|
||||
'default' => false,
|
||||
'required' => array( 'show_header_topbar_v1', '=', true ),
|
||||
),
|
||||
array(
|
||||
'id' => 'btn_title_v1',
|
||||
'type' => 'text',
|
||||
'title' => __( 'Button Title', 'thinkai' ),
|
||||
'required' => array( 'show_btn_v1', '=', true ),
|
||||
),
|
||||
array(
|
||||
'id' => 'btn_link_v1',
|
||||
'type' => 'text',
|
||||
'title' => __( 'Button Link', 'thinkai' ),
|
||||
'required' => array( 'show_btn_v1', '=', true ),
|
||||
),
|
||||
|
||||
//Account Button
|
||||
array(
|
||||
'id' => 'show_account_btn_v1',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__('Enable/Disable Account BTN', 'thinkai'),
|
||||
'default' => false,
|
||||
'required' => array( 'header_style_settings', '=', 'header_v1' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'account_btn_title_v1',
|
||||
'type' => 'text',
|
||||
'title' => __( 'Account Button Title', 'thinkai' ),
|
||||
'required' => array( 'show_account_btn_v1', '=', true ),
|
||||
),
|
||||
array(
|
||||
'id' => 'account_btn_link_v1',
|
||||
'type' => 'text',
|
||||
'title' => __( 'Account Button Link', 'thinkai' ),
|
||||
'required' => array( 'show_account_btn_v1', '=', true ),
|
||||
),
|
||||
//Search Form
|
||||
array(
|
||||
'id' => 'show_seach_form_v1',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__('Enable/Disable Search Form Icon', 'thinkai'),
|
||||
'default' => false,
|
||||
'required' => array( 'header_style_settings', '=', 'header_v1' ),
|
||||
),
|
||||
/***********************************************************************
|
||||
Header Version 2 Start
|
||||
************************************************************************/
|
||||
array(
|
||||
'id' => 'header_v2_settings_section_start',
|
||||
'type' => 'section',
|
||||
'indent' => true,
|
||||
'title' => esc_html__( 'Header Style Two Settings', 'thinkai' ),
|
||||
'required' => array( 'header_style_settings', '=', 'header_v2' ),
|
||||
),
|
||||
|
||||
//Header V2 Logo Style
|
||||
array(
|
||||
'id' => 'header_v2_logo_show',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__('Enable Logo', 'thinkai'),
|
||||
'default' => true,
|
||||
'required' => array( 'header_style_settings', '=', 'header_v2' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'header_v2_logo',
|
||||
'type' => 'media',
|
||||
'url' => true,
|
||||
'title' => esc_html__( 'Logo Image', 'thinkai' ),
|
||||
'subtitle' => esc_html__( 'Insert site logo image', 'thinkai' ),
|
||||
'required' => array( 'header_v2_logo_show', '=', true ),
|
||||
),
|
||||
array(
|
||||
'id' => 'header_v2_logo_dimension',
|
||||
'type' => 'dimensions',
|
||||
'title' => esc_html__( 'Logo Dimentions', 'thinkai' ),
|
||||
'subtitle' => esc_html__( 'Select Logo Dimentions', 'thinkai' ),
|
||||
'units' => array( 'em', 'px', '%' ),
|
||||
'default' => array( 'Width' => '', 'Height' => '' ),
|
||||
'required' => array( 'header_v2_logo_show', '=', true ),
|
||||
),
|
||||
|
||||
//Account Button
|
||||
array(
|
||||
'id' => 'show_account_btn_v2',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__('Enable/Disable Account BTN', 'thinkai'),
|
||||
'default' => false,
|
||||
'required' => array( 'header_style_settings', '=', 'header_v2' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'account_btn_title_v2',
|
||||
'type' => 'text',
|
||||
'title' => __( 'Account Button Title', 'thinkai' ),
|
||||
'required' => array( 'show_account_btn_v2', '=', true ),
|
||||
),
|
||||
array(
|
||||
'id' => 'account_btn_link_v2',
|
||||
'type' => 'text',
|
||||
'title' => __( 'Account Button Link', 'thinkai' ),
|
||||
'required' => array( 'show_account_btn_v2', '=', true ),
|
||||
),
|
||||
//Search Form
|
||||
array(
|
||||
'id' => 'show_seach_form_v2',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__('Enable/Disable Search Form Icon', 'thinkai'),
|
||||
'default' => false,
|
||||
'required' => array( 'header_style_settings', '=', 'header_v2' ),
|
||||
),
|
||||
|
||||
/***********************************************************************
|
||||
Header Version 3 Start
|
||||
************************************************************************/
|
||||
array(
|
||||
'id' => 'header_v3_settings_section_start',
|
||||
'type' => 'section',
|
||||
'indent' => true,
|
||||
'title' => esc_html__( 'Header Style Three Settings', 'thinkai' ),
|
||||
'required' => array( 'header_style_settings', '=', 'header_v3' ),
|
||||
),
|
||||
|
||||
//Header V3 Logo Style
|
||||
array(
|
||||
'id' => 'header_v3_logo_show',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__('Enable Logo', 'thinkai'),
|
||||
'default' => true,
|
||||
'required' => array( 'header_style_settings', '=', 'header_v3' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'header_v3_logo',
|
||||
'type' => 'media',
|
||||
'url' => true,
|
||||
'title' => esc_html__( 'Logo Image', 'thinkai' ),
|
||||
'subtitle' => esc_html__( 'Insert site logo image', 'thinkai' ),
|
||||
'required' => array( 'header_v3_logo_show', '=', true ),
|
||||
),
|
||||
array(
|
||||
'id' => 'header_v3_logo_dimension',
|
||||
'type' => 'dimensions',
|
||||
'title' => esc_html__( 'Logo Dimentions', 'thinkai' ),
|
||||
'subtitle' => esc_html__( 'Select Logo Dimentions', 'thinkai' ),
|
||||
'units' => array( 'em', 'px', '%' ),
|
||||
'default' => array( 'Width' => '', 'Height' => '' ),
|
||||
'required' => array( 'header_v3_logo_show', '=', true ),
|
||||
),
|
||||
|
||||
//Search Form
|
||||
array(
|
||||
'id' => 'show_seach_form_v3',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__('Enable/Disable Search Form Icon', 'thinkai'),
|
||||
'default' => false,
|
||||
'required' => array( 'header_style_settings', '=', 'header_v3' ),
|
||||
),
|
||||
//SIdebar Icon Info
|
||||
array(
|
||||
'id' => 'show_sidebar_info_icon_v3',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__('Enable/Disable Sidebar Info Icon', 'thinkai'),
|
||||
'default' => false,
|
||||
'required' => array( 'header_style_settings', '=', 'header_v3' ),
|
||||
),
|
||||
|
||||
//Account Button
|
||||
array(
|
||||
'id' => 'show_account_btn_v3',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__('Enable/Disable Account BTN', 'thinkai'),
|
||||
'default' => false,
|
||||
'required' => array( 'header_style_settings', '=', 'header_v3' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'account_btn_title_v3',
|
||||
'type' => 'text',
|
||||
'title' => __( 'Account Button Title', 'thinkai' ),
|
||||
'required' => array( 'show_account_btn_v3', '=', true ),
|
||||
),
|
||||
array(
|
||||
'id' => 'account_btn_link_v3',
|
||||
'type' => 'text',
|
||||
'title' => __( 'Account Button Link', 'thinkai' ),
|
||||
'required' => array( 'show_account_btn_v3', '=', true ),
|
||||
),
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
Header Version 4 Start
|
||||
************************************************************************/
|
||||
array(
|
||||
'id' => 'header_v4_settings_section_start',
|
||||
'type' => 'section',
|
||||
'indent' => true,
|
||||
'title' => esc_html__( 'Header Style Four Settings', 'thinkai' ),
|
||||
'required' => array( 'header_style_settings', '=', 'header_v4' ),
|
||||
),
|
||||
|
||||
//Header V4 Logo Style
|
||||
array(
|
||||
'id' => 'header_v4_logo_show',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__('Enable Logo', 'thinkai'),
|
||||
'default' => true,
|
||||
'required' => array( 'header_style_settings', '=', 'header_v4' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'header_v4_logo',
|
||||
'type' => 'media',
|
||||
'url' => true,
|
||||
'title' => esc_html__( 'Logo Image', 'thinkai' ),
|
||||
'subtitle' => esc_html__( 'Insert site logo image', 'thinkai' ),
|
||||
'required' => array( 'header_v4_logo_show', '=', true ),
|
||||
),
|
||||
array(
|
||||
'id' => 'header_v4_logo_dimension',
|
||||
'type' => 'dimensions',
|
||||
'title' => esc_html__( 'Logo Dimentions', 'thinkai' ),
|
||||
'subtitle' => esc_html__( 'Select Logo Dimentions', 'thinkai' ),
|
||||
'units' => array( 'em', 'px', '%' ),
|
||||
'default' => array( 'Width' => '', 'Height' => '' ),
|
||||
'required' => array( 'header_v4_logo_show', '=', true ),
|
||||
),
|
||||
|
||||
//Search Form
|
||||
array(
|
||||
'id' => 'show_seach_form_v4',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__('Enable/Disable Search Form Icon', 'thinkai'),
|
||||
'default' => false,
|
||||
'required' => array( 'header_style_settings', '=', 'header_v4' ),
|
||||
),
|
||||
//SIdebar Icon Info
|
||||
array(
|
||||
'id' => 'show_sidebar_info_icon_v4',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__('Enable/Disable Sidebar Info Icon', 'thinkai'),
|
||||
'default' => false,
|
||||
'required' => array( 'header_style_settings', '=', 'header_v4' ),
|
||||
),
|
||||
|
||||
/***********************************************************************
|
||||
Header Version 4 Start
|
||||
************************************************************************/
|
||||
array(
|
||||
'id' => 'header_v5_settings_section_start',
|
||||
'type' => 'section',
|
||||
'indent' => true,
|
||||
'title' => esc_html__( 'Header Style Five Settings', 'thinkai' ),
|
||||
'required' => array( 'header_style_settings', '=', 'header_v5' ),
|
||||
),
|
||||
|
||||
//Header V5 Logo Style
|
||||
array(
|
||||
'id' => 'header_v5_logo_show',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__('Enable Logo', 'thinkai'),
|
||||
'default' => true,
|
||||
'required' => array( 'header_style_settings', '=', 'header_v5' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'header_v5_logo',
|
||||
'type' => 'media',
|
||||
'url' => true,
|
||||
'title' => esc_html__( 'Logo Image', 'thinkai' ),
|
||||
'subtitle' => esc_html__( 'Insert site logo image', 'thinkai' ),
|
||||
'required' => array( 'header_v5_logo_show', '=', true ),
|
||||
),
|
||||
array(
|
||||
'id' => 'header_v5_logo_dimension',
|
||||
'type' => 'dimensions',
|
||||
'title' => esc_html__( 'Logo Dimentions', 'thinkai' ),
|
||||
'subtitle' => esc_html__( 'Select Logo Dimentions', 'thinkai' ),
|
||||
'units' => array( 'em', 'px', '%' ),
|
||||
'default' => array( 'Width' => '', 'Height' => '' ),
|
||||
'required' => array( 'header_v5_logo_show', '=', true ),
|
||||
),
|
||||
|
||||
//Search Form
|
||||
array(
|
||||
'id' => 'show_seach_form_v5',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__('Enable/Disable Search Form Icon', 'thinkai'),
|
||||
'default' => false,
|
||||
'required' => array( 'header_style_settings', '=', 'header_v5' ),
|
||||
),
|
||||
//Sign In Button
|
||||
array(
|
||||
'id' => 'show_sign_in_btn_v5',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__('Enable/Disable Sign In BTN', 'thinkai'),
|
||||
'default' => false,
|
||||
'required' => array( 'header_style_settings', '=', 'header_v5' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'sign_in_btn_title_v5',
|
||||
'type' => 'text',
|
||||
'title' => __( 'Button Title', 'thinkai' ),
|
||||
'required' => array( 'show_sign_in_btn_v5', '=', true ),
|
||||
),
|
||||
array(
|
||||
'id' => 'sign_in_btn_link_v5',
|
||||
'type' => 'text',
|
||||
'title' => __( 'Button Link', 'thinkai' ),
|
||||
'required' => array( 'show_sign_in_btn_v5', '=', true ),
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'header_style_section_end',
|
||||
'type' => 'section',
|
||||
'indent' => false,
|
||||
'required' => [ 'header_source_type', '=', 'd' ],
|
||||
),
|
||||
),
|
||||
);
|
||||
@@ -0,0 +1,317 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
'title' => esc_html__( 'Heading Settings', 'thinkai' ),
|
||||
'id' => 'heading_setting',
|
||||
'desc' => '',
|
||||
'subsection' => true,
|
||||
'fields' => array(
|
||||
|
||||
array(
|
||||
|
||||
'id' => 'use_custom_heading_style_h1',
|
||||
|
||||
'type' => 'switch',
|
||||
|
||||
'title' => esc_html__('Use H1 Custom Font', 'thinkai'),
|
||||
|
||||
'desc' => esc_html__('Enable to customize the theme heading h1 tag font', 'thinkai'),
|
||||
|
||||
),
|
||||
|
||||
array(
|
||||
|
||||
'id' => 'h1_typography',
|
||||
|
||||
'type' => 'typography',
|
||||
|
||||
'title' => esc_html__('H1 Font Typography', 'thinkai'),
|
||||
|
||||
'google' => true,
|
||||
|
||||
'font-backup' => true,
|
||||
|
||||
'output' => array('h1', '.price-table h1 ', '.experts-box .main-title h1 ', '.soom-info > h1 ', '.m-content > h1', '.main-title > h1' ),
|
||||
|
||||
'units' => 'px',
|
||||
|
||||
'subtitle' => esc_html__('Apply options to customize the h1 heading font for the theme', 'thinkai'),
|
||||
|
||||
'default' => array(
|
||||
|
||||
'color' => '',
|
||||
|
||||
'font-style' => '',
|
||||
|
||||
'font-family' => '',
|
||||
|
||||
'google' => true,
|
||||
|
||||
'font-size' => '',
|
||||
|
||||
'line-height' => ''
|
||||
|
||||
),
|
||||
|
||||
'required' => array('use_custom_heading_style_h1', '=', true),
|
||||
|
||||
),
|
||||
|
||||
array(
|
||||
|
||||
'id' => 'use_custom_heading_style_h2',
|
||||
|
||||
'type' => 'switch',
|
||||
|
||||
'title' => esc_html__('Use H2 Custom Font', 'thinkai'),
|
||||
|
||||
'desc' => esc_html__('Enable to customize the theme heading h2 tag font', 'thinkai'),
|
||||
|
||||
),
|
||||
|
||||
array(
|
||||
|
||||
'id' => 'h2_typography',
|
||||
|
||||
'type' => 'typography',
|
||||
|
||||
'title' => esc_html__('H2 Font Typography', 'thinkai'),
|
||||
|
||||
'google' => true,
|
||||
|
||||
'font-backup' => true,
|
||||
|
||||
'output' => array('h2', '.rep-meta > h2', '.service-meta > h2', '.counter-meta > h2 ', '.price-table h2', '.service-box > h2', '.whyus-meta > h2', '.touch-form > h2', '.category-box > h2', '.hover-meta > h2', '.exprt-meta > h2', '.top-meta > h2', '.blog-detail-meta > h2', '.banner-meta > h2 ', '.banner-info > h2', '.tutorial-meta > h2', '.complete-contact > h2', '.thinkai .blog-detail-meta > h2', '.our-process > h2', '.video-meta .tutorial-meta > h2', '.rep-meta > h2 ', '.service-meta > h2' ),
|
||||
|
||||
'units' => 'px',
|
||||
|
||||
'subtitle' => esc_html__('Apply options to customize the h2 heading font for the theme', 'thinkai'),
|
||||
|
||||
'default' => array(
|
||||
|
||||
'color' => '',
|
||||
|
||||
'font-style' => '',
|
||||
|
||||
'font-family' => '',
|
||||
|
||||
'google' => true,
|
||||
|
||||
'font-size' => '',
|
||||
|
||||
'line-height' => ''
|
||||
|
||||
),
|
||||
|
||||
|
||||
'required' => array('use_custom_heading_style_h2', '=', true),
|
||||
|
||||
),
|
||||
|
||||
array(
|
||||
|
||||
'id' => 'use_custom_heading_style_h3',
|
||||
|
||||
'type' => 'switch',
|
||||
|
||||
'title' => esc_html__('Use H3 Custom Font', 'thinkai'),
|
||||
|
||||
'desc' => esc_html__('Enable to customize the theme heading h3 tag font', 'thinkai'),
|
||||
|
||||
),
|
||||
|
||||
array(
|
||||
|
||||
'id' => 'h3_typography',
|
||||
|
||||
'type' => 'typography',
|
||||
|
||||
'title' => esc_html__('H3 Font Typography', 'thinkai'),
|
||||
|
||||
'google' => true,
|
||||
|
||||
'font-backup' => true,
|
||||
|
||||
'output' => array('h3', '.author-post > h3', '.related-videos > h3', '.m-content > h3', '.s-not-found h3' ),
|
||||
|
||||
'units' => 'px',
|
||||
|
||||
'subtitle' => esc_html__('Apply options to customize the h3 heading for the theme', 'thinkai'),
|
||||
|
||||
'default' => array(
|
||||
|
||||
'color' => '',
|
||||
|
||||
'font-style' => '',
|
||||
|
||||
'font-family' => '',
|
||||
|
||||
'google' => true,
|
||||
|
||||
'font-size' => '',
|
||||
|
||||
'line-height' => ''
|
||||
|
||||
),
|
||||
|
||||
|
||||
'required' => array('use_custom_heading_style_h3', '=', true),
|
||||
|
||||
),
|
||||
|
||||
array(
|
||||
|
||||
'id' => 'use_custom_heading_style_h4',
|
||||
|
||||
'type' => 'switch',
|
||||
|
||||
'title' => esc_html__('Use H4 Custom Font', 'thinkai'),
|
||||
|
||||
'desc' => esc_html__('Enable to customize the theme heading h4 tag font', 'thinkai'),
|
||||
|
||||
),
|
||||
|
||||
array(
|
||||
|
||||
'id' => 'h4_typography',
|
||||
|
||||
'type' => 'typography',
|
||||
|
||||
'title' => esc_html__('H4 Font Typography', 'thinkai'),
|
||||
|
||||
'google' => true,
|
||||
|
||||
'font-backup' => true,
|
||||
|
||||
'output' => array( 'h4', '.blog-meta > h4', '.sidebar .widget-title > h4 ', '.banner-info > h4', '.result-errors h4' ),
|
||||
|
||||
'units' => 'px',
|
||||
|
||||
'subtitle' => esc_html__('Apply options to customize the h4 heading font for the theme', 'thinkai'),
|
||||
|
||||
'default' => array(
|
||||
|
||||
'color' => '',
|
||||
|
||||
'font-style' => '',
|
||||
|
||||
'font-family' => '',
|
||||
|
||||
'google' => true,
|
||||
|
||||
'font-size' => '',
|
||||
|
||||
'line-height' => ''
|
||||
|
||||
),
|
||||
|
||||
|
||||
'required' => array('use_custom_heading_style_h4', '=', true),
|
||||
|
||||
),
|
||||
|
||||
array(
|
||||
|
||||
'id' => 'use_custom_heading_style_h5',
|
||||
|
||||
'type' => 'switch',
|
||||
|
||||
'title' => esc_html__('Use H5 Custom Font', 'thinkai'),
|
||||
|
||||
'desc' => esc_html__('Enable to customize the theme heading h5 tag font', 'thinkai'),
|
||||
|
||||
),
|
||||
|
||||
array(
|
||||
|
||||
'id' => 'h5_typography',
|
||||
|
||||
'type' => 'typography',
|
||||
|
||||
'title' => esc_html__('H5 Font Typography', 'thinkai'),
|
||||
|
||||
'google' => true,
|
||||
|
||||
'font-backup' => true,
|
||||
|
||||
'output' => array( 'h5', '.widget-title > h5', '.baner-data > h5', '.m-content > h5' ),
|
||||
|
||||
'units' => 'px',
|
||||
|
||||
'subtitle' => esc_html__('Apply options to customize the h5 heading font for the theme', 'thinkai'),
|
||||
|
||||
'default' => array(
|
||||
|
||||
'color' => '',
|
||||
|
||||
'font-style' => '',
|
||||
|
||||
'font-family' => '',
|
||||
|
||||
'google' => true,
|
||||
|
||||
'font-size' => '',
|
||||
|
||||
'line-height' => ''
|
||||
|
||||
),
|
||||
|
||||
|
||||
'required' => array('use_custom_heading_style_h5', '=', true),
|
||||
|
||||
),
|
||||
|
||||
array(
|
||||
|
||||
'id' => 'use_custom_heading_style_h6',
|
||||
|
||||
'type' => 'switch',
|
||||
|
||||
'title' => esc_html__('Use H6 Custom Font', 'thinkai'),
|
||||
|
||||
'desc' => esc_html__('Enable to customize the theme heading h6 tag font', 'thinkai'),
|
||||
|
||||
),
|
||||
|
||||
array(
|
||||
|
||||
'id' => 'h6_typography',
|
||||
|
||||
'type' => 'typography',
|
||||
|
||||
'title' => esc_html__('H6 Font Typography', 'thinkai'),
|
||||
|
||||
'google' => true,
|
||||
|
||||
'font-backup' => true,
|
||||
|
||||
'output' => array( 'h6', '.comment-titles h6' ),
|
||||
|
||||
'units' => 'px',
|
||||
|
||||
'subtitle' => esc_html__('Apply options to customize the h6 heading font for the theme', 'thinkai'),
|
||||
|
||||
'default' => array(
|
||||
|
||||
'color' => '',
|
||||
|
||||
'font-style' => '',
|
||||
|
||||
'font-family' => '',
|
||||
|
||||
'google' => true,
|
||||
|
||||
'font-size' => '',
|
||||
|
||||
'line-height' => ''
|
||||
|
||||
),
|
||||
|
||||
|
||||
'required' => array('use_custom_heading_style_h6', '=', true),
|
||||
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
'title' => esc_html__( 'Language Settings', 'thinkai' ),
|
||||
'id' => 'language_settings',
|
||||
'desc' => '',
|
||||
'icon' => 'el el-globe',
|
||||
'fields' => array(
|
||||
array(
|
||||
'id' => 'optLanguage',
|
||||
'type' => 'language',
|
||||
'desc' => esc_html__('Please upload .mo language file', 'thinkai'),
|
||||
)
|
||||
),
|
||||
);
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
return array(
|
||||
'title' => esc_html__( 'Favicon Setting', 'thinkai' ),
|
||||
'id' => 'logo_setting',
|
||||
'desc' => '',
|
||||
'subsection' => false,
|
||||
'fields' => array(
|
||||
//Favicon Style
|
||||
array(
|
||||
'id' => 'image_favicon',
|
||||
'type' => 'media',
|
||||
'url' => true,
|
||||
'title' => esc_html__( 'Favicon', 'thinkai' ),
|
||||
'subtitle' => esc_html__( 'Insert site favicon image', 'thinkai' ),
|
||||
'default' => array( 'url' => get_template_directory_uri() . '/assets/images/favicon/favicon.png' ),
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'logo_settings_section_end',
|
||||
'type' => 'section',
|
||||
'indent' => false,
|
||||
),
|
||||
),
|
||||
);
|
||||
@@ -0,0 +1,72 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
'title' => esc_html__( 'Mobile Sidebar Settings', 'thinkai' ),
|
||||
'id' => 'mobile_setting',
|
||||
'desc' => '',
|
||||
'icon' => 'el el-font',
|
||||
'fields' => array(
|
||||
|
||||
//Mobile Logo Style
|
||||
array(
|
||||
'id' => 'mobile_logo_show',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__('Enable Mobile Logo', 'thinkai'),
|
||||
'default' => true,
|
||||
),
|
||||
array(
|
||||
'id' => 'mobile_logo',
|
||||
'type' => 'media',
|
||||
'url' => true,
|
||||
'title' => esc_html__( 'Logo Image', 'thinkai' ),
|
||||
'subtitle' => esc_html__( 'Insert site logo image', 'thinkai' ),
|
||||
'required' => array( 'mobile_logo_show', '=', true ),
|
||||
),
|
||||
array(
|
||||
'id' => 'header_v1_logo_dimension',
|
||||
'type' => 'dimensions',
|
||||
'title' => esc_html__( 'Logo Dimentions', 'thinkai' ),
|
||||
'subtitle' => esc_html__( 'Select Logo Dimentions', 'thinkai' ),
|
||||
'units' => array( 'em', 'px', '%' ),
|
||||
'default' => array( 'Width' => '', 'Height' => '' ),
|
||||
'required' => array( 'mobile_logo_show', '=', true ),
|
||||
),
|
||||
|
||||
//Search Form
|
||||
array(
|
||||
'id' => 'show_mobile_search_form_v1',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__('Enable/Disable Search Form', 'thinkai'),
|
||||
'default' => true,
|
||||
),
|
||||
|
||||
//show Mobile Info V1
|
||||
array(
|
||||
'id' => 'show_mobile_info_v1',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__('Enable/Disable Contact Info', 'thinkai'),
|
||||
'default' => true,
|
||||
),
|
||||
array(
|
||||
'id' => 'mobile_email_address_v1',
|
||||
'type' => 'text',
|
||||
'title' => __( 'Email Address', 'thinkai' ),
|
||||
'required' => array( 'show_mobile_info_v1', '=', true ),
|
||||
),
|
||||
array(
|
||||
'id' => 'mobile_phone_no_v1',
|
||||
'type' => 'text',
|
||||
'title' => __( 'Phone Number', 'thinkai' ),
|
||||
'required' => array( 'show_mobile_info_v1', '=', true ),
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'show_mob_social_icon',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__('Enable/Disable Social Icons', 'thinkai'),
|
||||
'default' => true,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -0,0 +1,118 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'title' => esc_html__( 'Search Page Settings', 'thinkai' ),
|
||||
'id' => 'search_setting',
|
||||
'desc' => '',
|
||||
'subsection' => true,
|
||||
'fields' => array(
|
||||
array(
|
||||
'id' => 'search_source_type',
|
||||
'type' => 'button_set',
|
||||
'title' => esc_html__( 'Search Source Type', 'thinkai' ),
|
||||
'options' => array(
|
||||
'd' => esc_html__( 'Default', 'thinkai' ),
|
||||
'e' => esc_html__( 'Elementor', 'thinkai' ),
|
||||
),
|
||||
'default' => 'd',
|
||||
),
|
||||
array(
|
||||
'id' => 'search_elementor_template',
|
||||
'type' => 'select',
|
||||
'title' => __( 'Template', 'thinkai' ),
|
||||
'data' => 'posts',
|
||||
'args' => [
|
||||
'post_type' => [ 'elementor_library' ],
|
||||
'posts_per_page'=> -1,
|
||||
],
|
||||
'required' => [ 'search_source_type', '=', 'e' ],
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'search_default_st',
|
||||
'type' => 'section',
|
||||
'title' => esc_html__( 'Search Default', 'thinkai' ),
|
||||
'indent' => true,
|
||||
'required' => [ 'search_source_type', '=', 'd' ],
|
||||
),
|
||||
array(
|
||||
'id' => 'search_page_banner',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__( 'Show Banner', 'thinkai' ),
|
||||
'desc' => esc_html__( 'Enable to show banner on blog', 'thinkai' ),
|
||||
'default' => true,
|
||||
),
|
||||
array(
|
||||
'id' => 'search_features_list',
|
||||
'type' => 'textarea',
|
||||
'title' => esc_html__( 'Banner Feature List', 'thinkai' ),
|
||||
'desc' => esc_html__( 'Enter the Feature List to show in banner section', 'thinkai' ),
|
||||
'required' => array( 'search_page_banner', '=', true ),
|
||||
),
|
||||
array(
|
||||
'id' => 'search_banner_title',
|
||||
'type' => 'text',
|
||||
'title' => esc_html__( 'Banner Section Title', 'thinkai' ),
|
||||
'desc' => esc_html__( 'Enter the title to show in banner section', 'thinkai' ),
|
||||
'required' => array( 'search_page_banner', '=', true ),
|
||||
),
|
||||
array(
|
||||
'id' => 'search_page_background',
|
||||
'type' => 'media',
|
||||
'url' => true,
|
||||
'title' => esc_html__( 'Background Image', 'thinkai' ),
|
||||
'desc' => esc_html__( 'Insert background image for banner', 'thinkai' ),
|
||||
'default' => array(
|
||||
'url' => THINKAI_URI . 'assets/images/breadcrumb/breadcrumb-1.jpg',
|
||||
),
|
||||
'required' => array( 'search_page_banner', '=', true ),
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'search_sidebar_layout',
|
||||
'type' => 'image_select',
|
||||
'title' => esc_html__( 'Layout', 'thinkai' ),
|
||||
'subtitle' => esc_html__( 'Select main content and sidebar alignment.', 'thinkai' ),
|
||||
'options' => array(
|
||||
|
||||
'left' => array(
|
||||
'alt' => esc_html__( '2 Column Left', 'thinkai' ),
|
||||
'img' => get_template_directory_uri() . '/assets/images/redux/2cl.png',
|
||||
),
|
||||
'full' => array(
|
||||
'alt' => esc_html__( '1 Column', 'thinkai' ),
|
||||
'img' => get_template_directory_uri() . '/assets/images/redux/1col.png',
|
||||
),
|
||||
'right' => array(
|
||||
'alt' => esc_html__( '2 Column Right', 'thinkai' ),
|
||||
'img' => get_template_directory_uri() . '/assets/images/redux/2cr.png',
|
||||
),
|
||||
),
|
||||
|
||||
'default' => 'right',
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'search_page_sidebar',
|
||||
'type' => 'select',
|
||||
'title' => esc_html__( 'Sidebar', 'thinkai' ),
|
||||
'desc' => esc_html__( 'Select sidebar to show at blog listing page', 'thinkai' ),
|
||||
'required' => array(
|
||||
array( 'search_sidebar_layout', '=', array( 'left', 'right' ) ),
|
||||
),
|
||||
'options' => thinkai_get_sidebars(),
|
||||
),
|
||||
array(
|
||||
'id' => 'search_default_ed',
|
||||
'type' => 'section',
|
||||
'indent' => false,
|
||||
'required' => [ 'search_source_type', '=', 'd' ],
|
||||
),
|
||||
|
||||
),
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,113 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
'title' => esc_html__( 'Sidebar Sidebar Settings', 'thinkai' ),
|
||||
'id' => 'sidebar_setting',
|
||||
'desc' => '',
|
||||
'icon' => 'el el-font',
|
||||
'fields' => array(
|
||||
|
||||
//Sidebar Info Style
|
||||
array(
|
||||
'id' => 'sidebar_logo_show',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__('Enable Sidebar Logo', 'thinkai'),
|
||||
'default' => true,
|
||||
),
|
||||
array(
|
||||
'id' => 'sidebar_logo',
|
||||
'type' => 'media',
|
||||
'url' => true,
|
||||
'title' => esc_html__( 'Logo Image', 'thinkai' ),
|
||||
'subtitle' => esc_html__( 'Insert site logo image', 'thinkai' ),
|
||||
'required' => array( 'sidebar_logo_show', '=', true ),
|
||||
),
|
||||
array(
|
||||
'id' => 'sidebar_logo_dimension',
|
||||
'type' => 'dimensions',
|
||||
'title' => esc_html__( 'Logo Dimentions', 'thinkai' ),
|
||||
'subtitle' => esc_html__( 'Select Logo Dimentions', 'thinkai' ),
|
||||
'units' => array( 'em', 'px', '%' ),
|
||||
'default' => array( 'Width' => '', 'Height' => '' ),
|
||||
'required' => array( 'sidebar_logo_show', '=', true ),
|
||||
),
|
||||
//Main Title
|
||||
array(
|
||||
'id' => 'sidebar_title_v1',
|
||||
'type' => 'text',
|
||||
'title' => __( 'Title', 'thinkai' ),
|
||||
),
|
||||
//Description
|
||||
array(
|
||||
'id' => 'sidebar_text_v1',
|
||||
'type' => 'textarea',
|
||||
'title' => __( 'Text', 'thinkai' ),
|
||||
),
|
||||
//Contact Info
|
||||
array(
|
||||
'id' => 'show_sidebar_info_v1',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__('Enable/Disable Contact Info', 'thinkai'),
|
||||
'default' => false,
|
||||
),
|
||||
array(
|
||||
'id' => 'sidebar_info_title_v1',
|
||||
'type' => 'text',
|
||||
'title' => __( 'Title', 'thinkai' ),
|
||||
'required' => array( 'show_sidebar_info_v1', '=', true ),
|
||||
),
|
||||
array(
|
||||
'id' => 'sidebar_address_v1',
|
||||
'type' => 'textarea',
|
||||
'title' => __( 'Address', 'thinkai' ),
|
||||
'required' => array( 'show_sidebar_info_v1', '=', true ),
|
||||
),
|
||||
array(
|
||||
'id' => 'sidebar_email_address_v1',
|
||||
'type' => 'text',
|
||||
'title' => __( 'Email Address', 'thinkai' ),
|
||||
'required' => array( 'show_sidebar_info_v1', '=', true ),
|
||||
),
|
||||
array(
|
||||
'id' => 'sidebar_phone_no_v1',
|
||||
'type' => 'text',
|
||||
'title' => __( 'Phone No', 'thinkai' ),
|
||||
'required' => array( 'show_sidebar_info_v1', '=', true ),
|
||||
),
|
||||
array(
|
||||
'id' => 'sidebar_working_hours_v1',
|
||||
'type' => 'text',
|
||||
'title' => __( 'Working Hours', 'thinkai' ),
|
||||
'required' => array( 'show_sidebar_info_v1', '=', true ),
|
||||
),
|
||||
|
||||
//MailChimp Form Info
|
||||
array(
|
||||
'id' => 'sidebar_mailchimp_form_v1',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__('Enable/Disable Mailchimp Form', 'thinkai'),
|
||||
'default' => false,
|
||||
),
|
||||
array(
|
||||
'id' => 'mailchimp_form_title',
|
||||
'type' => 'text',
|
||||
'title' => __( 'Form Title', 'thinkai' ),
|
||||
'required' => array( 'sidebar_mailchimp_form_v1', '=', true ),
|
||||
),
|
||||
array(
|
||||
'id' => 'mailchimp_form_url',
|
||||
'type' => 'text',
|
||||
'title' => __( 'Mailchimp Form Url', 'thinkai' ),
|
||||
'required' => array( 'sidebar_mailchimp_form_v1', '=', true ),
|
||||
),
|
||||
//Social Icon
|
||||
array(
|
||||
'id' => 'show_sidebar_social_icon',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__('Enable/Disable Social Icons', 'thinkai'),
|
||||
'default' => false,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -0,0 +1,136 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'title' => esc_html__( 'Single Post Settings', 'thinkai' ),
|
||||
'id' => 'single_post_setting',
|
||||
'desc' => '',
|
||||
'subsection' => true,
|
||||
'fields' => array(
|
||||
array(
|
||||
'id' => 'single_source_type',
|
||||
'type' => 'button_set',
|
||||
'title' => esc_html__( 'Single Post Source Type', 'thinkai' ),
|
||||
'options' => array(
|
||||
'd' => esc_html__( 'Default', 'thinkai' ),
|
||||
'e' => esc_html__( 'Elementor', 'thinkai' ),
|
||||
),
|
||||
'default' => 'd',
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'single_default_st',
|
||||
'type' => 'section',
|
||||
'title' => esc_html__( 'Post Default', 'thinkai' ),
|
||||
'indent' => true,
|
||||
'required' => [ 'single_source_type', '=', 'd' ],
|
||||
),
|
||||
array(
|
||||
'id' => 'single_post_date',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__( 'Hide Date', 'thinkai' ),
|
||||
'desc' => esc_html__( 'Enable to hide post publish date on detail page', 'thinkai' ),
|
||||
'default' => false,
|
||||
),
|
||||
array(
|
||||
'id' => 'single_post_author',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__( 'Hide Author', 'thinkai' ),
|
||||
'desc' => esc_html__( 'Enable to hide author on detail page', 'thinkai' ),
|
||||
'default' => false,
|
||||
),
|
||||
array(
|
||||
'id' => 'single_post_category',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__( 'Hide Category', 'thinkai' ),
|
||||
'desc' => esc_html__( 'Enable to hide number of category on single page', 'thinkai' ),
|
||||
'default' => false,
|
||||
),
|
||||
array(
|
||||
'id' => 'single_post_comments',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__( 'Hide Comments', 'thinkai' ),
|
||||
'desc' => esc_html__( 'Enable to hide number of comments on single page', 'thinkai' ),
|
||||
'default' => false,
|
||||
),
|
||||
//Facebook
|
||||
array(
|
||||
'id' => 'facebook_sharing',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__( 'Show Facebook Post Share', 'thinkai' ),
|
||||
'desc' => esc_html__( 'Enable to show Post Share to Facebook', 'thinkai' ),
|
||||
'default' => false,
|
||||
),
|
||||
array(
|
||||
'id' => 'twitter_sharing',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__( 'Show Twitter Post Share', 'thinkai' ),
|
||||
'desc' => esc_html__( 'Enable to show Post Share to Twitter', 'thinkai' ),
|
||||
'default' => false,
|
||||
),
|
||||
array(
|
||||
'id' => 'linkedin_sharing',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__( 'Show Linkedin Post Share', 'thinkai' ),
|
||||
'desc' => esc_html__( 'Enable to show Post Share to Linkedin', 'thinkai' ),
|
||||
'default' => false,
|
||||
),
|
||||
array(
|
||||
'id' => 'pinterest_sharing',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__( 'Show Pinterest Post Share', 'thinkai' ),
|
||||
'desc' => esc_html__( 'Enable to show Post Share to Pinterest', 'thinkai' ),
|
||||
'default' => false,
|
||||
),
|
||||
array(
|
||||
'id' => 'reddit_sharing',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__( 'Show Reddit Post Share', 'thinkai' ),
|
||||
'desc' => esc_html__( 'Enable to show Post Share to Reddit', 'thinkai' ),
|
||||
'default' => false,
|
||||
),
|
||||
array(
|
||||
'id' => 'tumblr_sharing',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__( 'Show Tumblr Post Share', 'thinkai' ),
|
||||
'desc' => esc_html__( 'Enable to show Post Share to Tumblr', 'thinkai' ),
|
||||
'default' => false,
|
||||
),
|
||||
array(
|
||||
'id' => 'digg_sharing',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__( 'Show Digg Post Share', 'thinkai' ),
|
||||
'desc' => esc_html__( 'Enable to show Post Share to Digg', 'thinkai' ),
|
||||
'default' => false,
|
||||
),
|
||||
|
||||
|
||||
//Author Box
|
||||
array(
|
||||
'id' => 'single_post_author_box',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__( 'Enable/Disable Author Box Info', 'thinkai' ),
|
||||
'desc' => esc_html__( 'Enable to show Author Box Info', 'thinkai' ),
|
||||
'default' => false,
|
||||
),
|
||||
array(
|
||||
'id' => 'show_author_post_social_icon',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__( 'Enable/Disable Social Icon', 'thinkai' ),
|
||||
'desc' => esc_html__( 'Enable to show Author Box Social Icon', 'thinkai' ),
|
||||
'default' => false,
|
||||
'required' => [ 'single_post_author_box', '=', true ],
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'single_section_default_ed',
|
||||
'type' => 'section',
|
||||
'indent' => false,
|
||||
'required' => [ 'single_source_type', '=', 'd' ],
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
return array(
|
||||
'title' => esc_html__( 'Social Setting', 'thinkai' ),
|
||||
'id' => 'social_setting',
|
||||
'desc' => '',
|
||||
'icon' => 'el el-share',
|
||||
'fields' => array(
|
||||
array(
|
||||
'id' => 'social_media_tabs_v3',
|
||||
'type' => 'repeater',
|
||||
'icon' => 'el-icon-thumbs-up',
|
||||
'title' => __('Add Social Media', 'thinkai'),
|
||||
'group_values' => true,
|
||||
'sortable' => true,
|
||||
'fields' => array(
|
||||
array(
|
||||
'id' => 'title_social_media',
|
||||
'type' => 'text',
|
||||
'title' => __('Title', 'thinkai'),
|
||||
),
|
||||
array(
|
||||
'id' => 'select_social_media',
|
||||
'type' => 'select',
|
||||
'data' => get_fontawesome_icons(),
|
||||
'title' => esc_html__('Choose Social Media', 'thinkai'),
|
||||
),
|
||||
array(
|
||||
'id' => 'link_social_media',
|
||||
'type' => 'text',
|
||||
'title' => __('Link', 'thinkai'),
|
||||
),
|
||||
)
|
||||
),
|
||||
),
|
||||
);
|
||||
@@ -0,0 +1,112 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'title' => esc_html__( 'Tag Page Settings', 'thinkai' ),
|
||||
'id' => 'tag_setting',
|
||||
'desc' => '',
|
||||
'subsection' => true,
|
||||
'fields' => array(
|
||||
array(
|
||||
'id' => 'tag_source_type',
|
||||
'type' => 'button_set',
|
||||
'title' => esc_html__( 'Tag Source Type', 'thinkai' ),
|
||||
'options' => array(
|
||||
'd' => esc_html__( 'Default', 'thinkai' ),
|
||||
'e' => esc_html__( 'Elementor', 'thinkai' ),
|
||||
),
|
||||
'default' => 'd',
|
||||
),
|
||||
array(
|
||||
'id' => 'tag_elementor_template',
|
||||
'type' => 'select',
|
||||
'title' => __( 'Template', 'thinkai' ),
|
||||
'data' => 'posts',
|
||||
'args' => [
|
||||
'post_type' => [ 'elementor_library' ],
|
||||
'posts_per_page'=> -1,
|
||||
],
|
||||
'required' => [ 'tag_source_type', '=', 'e' ],
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'tag_default_st',
|
||||
'type' => 'section',
|
||||
'title' => esc_html__( 'Tag Default', 'thinkai' ),
|
||||
'indent' => true,
|
||||
'required' => [ 'tag_source_type', '=', 'd' ],
|
||||
),
|
||||
array(
|
||||
'id' => 'tag_page_banner',
|
||||
'type' => 'switch',
|
||||
'title' => esc_html__( 'Show Banner', 'thinkai' ),
|
||||
'desc' => esc_html__( 'Enable to show banner on blog', 'thinkai' ),
|
||||
'default' => true,
|
||||
),
|
||||
array(
|
||||
'id' => 'tag_features_list',
|
||||
'type' => 'textarea',
|
||||
'title' => esc_html__( 'Banner Feature List', 'thinkai' ),
|
||||
'desc' => esc_html__( 'Enter the Feature List to show in banner section', 'thinkai' ),
|
||||
'required' => array( 'tag_page_banner', '=', true ),
|
||||
),
|
||||
array(
|
||||
'id' => 'tag_banner_title',
|
||||
'type' => 'text',
|
||||
'title' => esc_html__( 'Banner Section Title', 'thinkai' ),
|
||||
'desc' => esc_html__( 'Enter the title to show in banner section', 'thinkai' ),
|
||||
'required' => array( 'tag_page_banner', '=', true ),
|
||||
),
|
||||
array(
|
||||
'id' => 'tag_page_background',
|
||||
'type' => 'media',
|
||||
'url' => true,
|
||||
'title' => esc_html__( 'Background Image', 'thinkai' ),
|
||||
'desc' => esc_html__( 'Insert background image for banner', 'thinkai' ),
|
||||
'default' => array(
|
||||
'url' => THINKAI_URI . 'assets/images/breadcrumb/breadcrumb-1.jpg',
|
||||
),
|
||||
'required' => array( 'tag_page_banner', '=', true ),
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'tag_sidebar_layout',
|
||||
'type' => 'image_select',
|
||||
'title' => esc_html__( 'Layout', 'thinkai' ),
|
||||
'subtitle' => esc_html__( 'Select main content and sidebar alignment.', 'thinkai' ),
|
||||
'options' => array(
|
||||
|
||||
'left' => array(
|
||||
'alt' => esc_html__( '2 Column Left', 'thinkai' ),
|
||||
'img' => get_template_directory_uri() . '/assets/images/redux/2cl.png',
|
||||
),
|
||||
'full' => array(
|
||||
'alt' => esc_html__( '1 Column', 'thinkai' ),
|
||||
'img' => get_template_directory_uri() . '/assets/images/redux/1col.png',
|
||||
),
|
||||
'right' => array(
|
||||
'alt' => esc_html__( '2 Column Right', 'thinkai' ),
|
||||
'img' => get_template_directory_uri() . '/assets/images/redux/2cr.png',
|
||||
),
|
||||
),
|
||||
|
||||
'default' => 'right',
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'tag_page_sidebar',
|
||||
'type' => 'select',
|
||||
'title' => esc_html__( 'Sidebar', 'thinkai' ),
|
||||
'desc' => esc_html__( 'Select sidebar to show at blog listing page', 'thinkai' ),
|
||||
'required' => array(
|
||||
array( 'tag_sidebar_layout', '=', array( 'left', 'right' ) ),
|
||||
),
|
||||
'options' => thinkai_get_sidebars(),
|
||||
),
|
||||
array(
|
||||
'id' => 'tag_default_ed',
|
||||
'type' => 'section',
|
||||
'indent' => false,
|
||||
'required' => [ 'tag_source_type', '=', 'd' ],
|
||||
),
|
||||
),
|
||||
);
|
||||
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
'title' => esc_html__( 'Typography Settings', 'thinkai' ),
|
||||
'id' => 'typography_setting',
|
||||
'desc' => '',
|
||||
'icon' => 'el el-edit'
|
||||
);
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
return array(
|
||||
'woocommerce_before_shop_loop' => array(
|
||||
array('woocommerce_result_count', 20)
|
||||
),
|
||||
'woocommerce_after_shop_loop_item' => array(
|
||||
array('woocommerce_template_loop_add_to_cart', 10),
|
||||
),
|
||||
'woocommerce_before_main_content' => array(
|
||||
array('woocommerce_breadcrumb', 20),
|
||||
array( 'woocommerce_output_content_wrapper', 10)
|
||||
),
|
||||
'woocommerce_after_main_content' => array(
|
||||
array( 'woocommerce_output_content_wrapper_end', 10)
|
||||
),
|
||||
|
||||
'woocommerce_before_shop_loop_item_title' => array(
|
||||
array( 'woocommerce_show_product_loop_sale_flash', 10 ),
|
||||
array( 'woocommerce_template_loop_product_thumbnail', 10 )
|
||||
),
|
||||
'woocommerce_after_shop_loop_item_title' => array(
|
||||
array( 'woocommerce_template_loop_price', 10 ),
|
||||
array('woocommerce_template_loop_rating', 5 )
|
||||
),
|
||||
'woocommerce_sidebar' => array(
|
||||
array('woocommerce_get_sidebar', 10),
|
||||
),
|
||||
|
||||
'woocommerce_single_product_summary' => array(
|
||||
array('woocommerce_template_single_title', 5),
|
||||
array('woocommerce_template_single_price', 10),
|
||||
array('woocommerce_template_single_excerpt', 20),
|
||||
array('woocommerce_template_single_add_to_cart', 30),
|
||||
array('woocommerce_template_single_meta', 40),
|
||||
array('woocommerce_template_single_sharing', 50),
|
||||
array('woocommerce_template_single_rating', 10 )
|
||||
),
|
||||
|
||||
'woocommerce_before_single_product_summary' => array(
|
||||
array('woocommerce_show_product_sale_flash', 10)
|
||||
),
|
||||
);
|
||||
BIN
wp-content/themes/thinkai/includes/thirdparty/plugins/thinkai-plugin.zip
vendored
Normal file
BIN
wp-content/themes/thinkai/includes/thirdparty/plugins/thinkai-plugin.zip
vendored
Normal file
Binary file not shown.
Reference in New Issue
Block a user