?AlkantarClanX12

Your IP : 216.73.216.177


Current Path : /home/rankinh/lynkandco/wp-content/plugins/nexteuv-pro/modules/post/templates/simple/
Upload File :
Current File : /home/rankinh/lynkandco/wp-content/plugins/nexteuv-pro/modules/post/templates/simple/index.php

<?php
if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

if( !class_exists( 'NextEuvProPostSimple' ) ) {
    class NextEuvProPostSimple {

        private static $_instance = null;

        public static function instance() {
            if ( is_null( self::$_instance ) ) {
                self::$_instance = new self();
            }

            return self::$_instance;
        }

        function __construct() {
            add_filter( 'nexteuv_post_styles', array( $this, 'add_post_styles_option' ) );
            add_action( 'nexteuv_hook_container_before', array( $this, 'add_post_hook_container_before' ) );
        }

        function add_post_styles_option( $options ) {
            $options['simple'] = esc_html__('Simple', 'nexteuv-pro');
            return $options;
        }

        function add_post_hook_container_before() {

            if(is_singular('post')) {

                $post_id = get_the_ID();
                $post_style = nexteuv_get_single_post_style( $post_id );

                if($post_style != 'simple') {
                    return;
                }

                $template_args['post_ID'] = $post_id;
                $template_args['post_Style'] = $post_style;
                $template_args = array_merge( $template_args, nexteuv_single_post_params() );

                ob_start();
                echo '<div class="post-simple post-header">';
                    nexteuv_template_part( 'post', 'templates/simple/parts/date', '', $template_args );
                    if( $template_args['enable_title'] ) :
                        nexteuv_template_part( 'post', 'templates/post-extra/title', '', $template_args );
                    endif;
                    nexteuv_template_part( 'post', 'templates/simple/parts/category', '', $template_args );
                echo '</div>';
                echo ob_get_clean();

            }

        }

    }
}

NextEuvProPostSimple::instance();