PATH:
home
/
thecwrif
/
public_html
/
wp-content
/
plugins
/
jeg-elementor-kit
/
class
/
elements
/
views
<?php /** * Post Date View Class * * @package jeg-elementor-kit * @author Jegtheme * @since 1.5.0 */ namespace Jeg\Elementor_Kit\Elements\Views; /** * Class Post_Date_View * * @package Jeg\Elementor_Kit\Elements\Views */ class Post_Date_View extends View_Abstract { /** * Build block content */ public function build_content() { $content = ''; $post = get_post(); if ( ! empty( $post ) ) { $date_type = $this->attribute['sg_date_type']; if ( 'both' === $date_type ) { $date = $this->get_post_date( $post, $this->attribute['sg_date_format'], 'published', $this->attribute['sg_date_format_custom'] ); $date = $date . esc_html__( ' - Updated on ', 'jeg-elementor-kit' ); $date = $date . $this->get_post_date( $post, $this->attribute['sg_date_format'], 'modified', $this->attribute['sg_date_format_custom'] ); } else { $date = $this->get_post_date( $post, $this->attribute['sg_date_format'], $date_type, $this->attribute['sg_date_format_custom'] ); } if ( ! empty( $date ) ) { $link_to = $this->attribute['sg_date_link_to']; $html_tag = \Elementor\Utils::validate_html_tag( $this->attribute['sg_date_html_tag'] ); $animation = ! empty( $this->attribute['st_date_hover_animation'] ) ? 'elementor-animation-' . esc_attr( $this->attribute['st_date_hover_animation'] ) : ''; switch ( $link_to ) { case 'home': $content = sprintf( '<a href="%1$s">%2$s</a>', esc_url( get_home_url() ), $date ); break; case 'post': $content = sprintf( '<a href="%1$s">%2$s</a>', esc_url( get_the_permalink() ), $date ); break; case 'date': $content = sprintf( '<a href="%1$s">%2$s</a>', esc_url( get_day_link( get_the_time( 'Y' ), get_the_time( 'm' ), get_the_time( 'd' ) ) ), $date ); break; case 'custom': $content = $this->render_url_element( $this->attribute['sg_date_link_to_custom'], null, null, $date ); break; default: $content = $date; break; } $content = sprintf( '<%1$s class="post-date %2$s">%3$s</%1$s>', $html_tag, $animation, $content ); } } return $this->render_wrapper( 'post-date', $content ); } }
[-] class-view-abstract.php
[edit]
[-] class-post-terms-view.php
[edit]
[-] class-post-title-view.php
[edit]
[-] class-pie-chart-view.php
[edit]
[-] class-product-carousel-view.php
[edit]
[-] class-image-box-view.php
[edit]
[-] class-animated-text-view.php
[edit]
[-] class-feature-list-view.php
[edit]
[-] class-post-date-view.php
[edit]
[-] class-contact-form-7-view.php
[edit]
[-] class-post-featured-image-view.php
[edit]
[-] class-post-list-view.php
[edit]
[-] class-icon-box-view.php
[edit]
[-] class-post-comment-view.php
[edit]
[-] class-view-woocommerce-abstract.php
[edit]
[-] class-post-content-view.php
[edit]
[-] class-accordion-view.php
[edit]
[+]
..
[-] class-post-block-view.php
[edit]
[-] class-social-share-view.php
[edit]
[-] class-nav-menu-view.php
[edit]
[-] class-mailchimp-view.php
[edit]
[-] class-dual-button-view.php
[edit]
[-] class-client-logo-view.php
[edit]
[-] class-product-categories-view.php
[edit]
[-] class-banner-view.php
[edit]
[-] class-fun-fact-view.php
[edit]
[-] class-portfolio-gallery-view.php
[edit]
[-] class-post-excerpt-view.php
[edit]
[-] class-button-view.php
[edit]
[-] class-product-grid-view.php
[edit]
[-] class-post-author-view.php
[edit]
[-] class-progress-bar-view.php
[edit]
[-] class-video-button-view.php
[edit]
[-] class-gallery-view.php
[edit]
[-] class-tabs-view.php
[edit]
[-] class-countdown-view.php
[edit]
[-] class-team-view.php
[edit]
[-] class-testimonials-view.php
[edit]
[-] class-search-view.php
[edit]
[-] class-heading-view.php
[edit]
[-] class-off-canvas-view.php
[edit]
[-] class-category-list-view.php
[edit]