/
home
/
henzagold
/
blog
/
wp-content
/
themes
/
gillion
/
inc
/
elements
/
File Upload :
llllll
Current File: /home/henzagold/blog/wp-content/themes/gillion/inc/elements/single-comments.php
<?php /* Element: Empty Space (responsive) */ class vcg_single_comments extends WPBakeryShortCode { function __construct() { add_action( 'init', array( $this, '_mapping' ), 12 ); add_shortcode( 'vcg_single_comments', array( $this, '_html' ) ); } public function _mapping() { if ( !defined( 'WPB_VC_VERSION' ) ) { return; } vc_map( array( 'name' => __('Single Comments', 'gillion'), 'base' => 'vcg_single_comments', //'description' => __('Blank space with custom height', 'gillion'), 'category' => __('Gillion Single Elements', 'gillion'), 'icon' => get_template_directory_uri().'/img/builder-icon.png', 'params' => array( array( 'param_name' => 'class', 'heading' => __( 'Extra class name', 'gillion' ), 'description' => __( 'Style particular content element differently - add a class name and refer to it in custom CSS.', 'gillion' ), 'type' => 'textfield', ), array( 'param_name' => 'css', 'type' => 'css_editor', 'heading' => __( 'CSS box', 'gillion' ), 'group' => __( 'Design Options', 'gillion' ), ), ), ) ); } public function _html( $atts ) { // Params extraction extract( shortcode_atts( array( 'heading' => '32px', 'class' => '', 'css' => 'none' ), $atts ) ); // HTML $element_class = array(); $element_class[] = $class; $settings_base = !empty( $this->settings['base'] ) ? $this->settings['base'] : ''; $element_class[] = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, vc_shortcode_custom_css_class( $css, ' ' ), $settings_base, $atts ); ob_start(); ?> <div class="sh-element-post-single"> <p> <?php if( is_single() ) : if ( comments_open() || get_comments_number() ) : comments_template(); endif; if ( is_singular() ) : wp_enqueue_script( 'comment-reply' ); endif; else : esc_attr_e( '[Comments goes here]', 'gillion' ); endif; ?> </p> </div> <?php return ob_get_clean(); } } new vcg_single_comments();
Copyright ©2k19 -
Hexid
|
Tex7ure