PATH:
home
/
fengshp
/
www
/
wp-content
/
plugins
/
themify-builder-pro
/
includes
/
dynamic-content
<?php /** * @package Themify Builder Pro * @link https://themify.me/ */ class Tbp_Dynamic_Item_EventPostDate extends Tbp_Dynamic_Item { public static function is_available():bool { return function_exists( 'themify_event_post_date' ); } public static function get_category():string { return 'post'; } public static function get_label():string { return __( 'Themify Event Post - Event Date', 'tbp' ); } public static function get_value(array $args = array()):?string { if ( ! isset( $args['date_format'] ) || $args['date_format'] === 'default' ) { $date_format = get_option( 'date_format' ); } elseif ( $args['date_format'] === 'custom' ) { $date_format = isset( $args['custom_date_format'] ) ? $args['custom_date_format'] : ''; } else { $date_format = $args['date_format']; } if ( ! isset( $args['time_format'] ) || $args['time_format'] === 'default' ) { $time_format = get_option( 'time_format' ); } elseif ( $args['time_format'] === 'custom' ) { $time_format = isset( $args['custom_time_format'] ) ? $args['custom_time_format'] : ''; } else { $time_format = $args['time_format']; } ob_start(); themify_event_post_date( $date_format, $time_format ); return ob_get_clean(); } public static function get_options():array { $custom_format_help = sprintf( __( 'For information on how to format date and time see <a href="%s" target="_blank">Codex</a>.', 'tbp' ), 'https://wordpress.org/support/article/formatting-date-and-time/' ); return array( array( 'label' => 'd_f', 'id' => 'date_format', 'type' => 'select', 'options' => array( 'default' => 'def', 'F j, Y' => 'F_j_Y', 'Y-m-d' => 'Y_m_d', 'm/d/Y' => 'm_d_Y', 'd/m/Y' => 'd_m_Y', 'l, F jS, Y' => date_i18n( 'l, F jS, Y' ), 'F j, Y g:i a' => date_i18n( 'F j, Y g:i a' ), 'M j, Y @ G:i' => date_i18n( 'M j, Y @ G:i' ), 'custom' => 'cus' ), 'binding' =>array( 'not_empty'=>array('hide'=>'custom_date_format'), 'custom'=>array('show'=>'custom_date_format') ), 'bindingContext' => '.tb_field_group', ), array( 'label' => __( 'Custom Date Format', 'tbp' ), 'id' => 'custom_date_format', 'type' => 'text', 'help' => $custom_format_help, ), array( 'label' => 't_f', 'id' => 'time_format', 'type' => 'select', 'options' => array( 'default' => 'def', 'g:i a' => 'g_i_a', 'g:i A' => 'g_i_A', 'H:i' => 'H_i', 'custom' => 'cus' ), 'binding' =>array( 'not_empty'=>array('hide'=>'custom_time_format'), 'custom'=>array('show'=>'custom_time_format') ), 'bindingContext' => '.tb_field_group', ), array( 'label' => __( 'Custom Time Format', 'tbp' ), 'id' => 'custom_time_format', 'type' => 'text', 'help' => $custom_format_help, ), ); } }
[+]
..
[-] ProductSalePrice.php
[edit]
[-] PTBGallery.php
[edit]
[-] WCCheckoutURL.php
[edit]
[-] PostDate.php
[edit]
[-] ACFURL.php
[edit]
[-] PostTermsClass.php
[edit]
[-] PostAuthorURL.php
[edit]
[-] ACFWysiwyg.php
[edit]
[-] PostAuthorEmail.php
[edit]
[-] PTBGalleryAsText.php
[edit]
[-] PTBAudioPlaylist.php
[edit]
[-] ProductTitle.php
[edit]
[-] PTBIconAsIcon.php
[edit]
[-] PTBTelephone.php
[edit]
[-] PTBSelectClass.php
[edit]
[-] ProductCartUrl.php
[edit]
[-] PostAuthorMeta.php
[edit]
[-] tbpTermCover.php
[edit]
[-] PTBEmail.php
[edit]
[-] ArchiveTitle.php
[edit]
[-] SiteURL.php
[edit]
[-] PostAuthorBio.php
[edit]
[-] ACFChoice.php
[edit]
[-] PTBDateAsText.php
[edit]
[-] ACFGallery.php
[edit]
[-] PTBRatingAsText.php
[edit]
[-] ACFEmail.php
[edit]
[-] Option.php
[edit]
[-] PostAuthorClass.php
[edit]
[-] PostCommentCount.php
[edit]
[-] ProductAttributes.php
[edit]
[-] PTBRadioButtonClass.php
[edit]
[-] ACFNumber.php
[edit]
[-] PTBAudio.php
[edit]
[-] PTBTextarea.php
[edit]
[-] PostTerms.php
[edit]
[-] ACFDate.php
[edit]
[-] PTBText.php
[edit]
[-] PostFeaturedImage.php
[edit]
[-] PTBAccordion.php
[edit]
[-] ACFoEmbed.php
[edit]
[-] ProductSKU.php
[edit]
[-] Shortcode.php
[edit]
[-] CurrentDate.php
[edit]
[-] PTBFile.php
[edit]
[-] PTBLinkButton.php
[edit]
[-] PTBMap.php
[edit]
[-] PTBRadioButton.php
[edit]
[-] CustomField.php
[edit]
[-] PTBRating.php
[edit]
[-] ACFFile.php
[edit]
[-] PTBCheckboxClass.php
[edit]
[-] FileContent.php
[edit]
[-] PTBVideoPlaylist.php
[edit]
[-] PTBRepeatableText.php
[edit]
[-] ProductDescription.php
[edit]
[-] PTBIcon.php
[edit]
[-] ArchiveDescription.php
[edit]
[-] PostImageAttachments.php
[edit]
[-] ACFMap.php
[edit]
[-] PTBRelations.php
[edit]
[-] PostAuthorName.php
[edit]
[-] PostAuthorAvatar.php
[edit]
[-] PTBVideo.php
[edit]
[-] ACFText.php
[edit]
[-] PTBDate.php
[edit]
[-] ACFImage.php
[edit]
[-] ACFTextarea.php
[edit]
[-] ProductImage.php
[edit]
[-] PTBNumber.php
[edit]
[-] ProductRating.php
[edit]
[-] ProductStock.php
[edit]
[-] PTBImage.php
[edit]
[-] ProductPrice.php
[edit]
[-] SiteDescription.php
[edit]
[-] EventPostDate.php
[edit]
[-] SiteTitle.php
[edit]
[-] ProductGallery.php
[edit]
[-] MediaLibrary.php
[edit]
[-] RandomNumber.php
[edit]
[-] PostExcerpt.php
[edit]
[-] PTBCheckbox.php
[edit]
[-] ProductCatImage.php
[edit]
[-] PostTitle.php
[edit]
[-] PostClass.php
[edit]
[-] PTBProgressBar.php
[edit]
[-] PTBIconAsText.php
[edit]
[-] ACFPageLink.php
[edit]
[-] PostPermalink.php
[edit]
[-] SiteIcon.php
[edit]
[-] PTBAcc.php
[edit]
[-] PTBSelect.php
[edit]