Changeset 3812974
- Timestamp:
- 11/20/2026 05:07:27 AM (less than one hour ago)
- Location:
- themify-event-post
- Files:
-
- 89 added
- 8 edited
-
tags/1.3.8 (added)
-
tags/1.3.8/assets (added)
-
tags/1.3.8/assets/active.js (added)
-
tags/1.3.8/assets/active.js.gz (added)
-
tags/1.3.8/assets/admin_script.js (added)
-
tags/1.3.8/assets/admin_script.js.gz (added)
-
tags/1.3.8/assets/scripts.js (added)
-
tags/1.3.8/assets/scripts.js.gz (added)
-
tags/1.3.8/assets/style.css (added)
-
tags/1.3.8/assets/style.css.gz (added)
-
tags/1.3.8/assets/tinymce.css (added)
-
tags/1.3.8/assets/tinymce.css.gz (added)
-
tags/1.3.8/assets/tinymce.js (added)
-
tags/1.3.8/assets/tinymce.js.gz (added)
-
tags/1.3.8/includes (added)
-
tags/1.3.8/includes/admin.php (added)
-
tags/1.3.8/includes/functions.php (added)
-
tags/1.3.8/includes/i18n.php (added)
-
tags/1.3.8/includes/post-type.php (added)
-
tags/1.3.8/includes/system.php (added)
-
tags/1.3.8/includes/themify-metabox (added)
-
tags/1.3.8/includes/themify-metabox/css (added)
-
tags/1.3.8/includes/themify-metabox/css/jquery-ui-timepicker.min.css (added)
-
tags/1.3.8/includes/themify-metabox/css/jquery-ui-timepicker.min.css.gz (added)
-
tags/1.3.8/includes/themify-metabox/css/page-options-iframe.css (added)
-
tags/1.3.8/includes/themify-metabox/css/page-options-iframe.css.gz (added)
-
tags/1.3.8/includes/themify-metabox/css/page-options.css (added)
-
tags/1.3.8/includes/themify-metabox/css/page-options.css.gz (added)
-
tags/1.3.8/includes/themify-metabox/css/styles.css (added)
-
tags/1.3.8/includes/themify-metabox/css/styles.css.gz (added)
-
tags/1.3.8/includes/themify-metabox/css/themify.minicolors.css (added)
-
tags/1.3.8/includes/themify-metabox/css/themify.minicolors.css.gz (added)
-
tags/1.3.8/includes/themify-metabox/example-functions.php (added)
-
tags/1.3.8/includes/themify-metabox/img (added)
-
tags/1.3.8/includes/themify-metabox/img/ddbtn-blank.png (added)
-
tags/1.3.8/includes/themify-metabox/img/ddbtn-check.png (added)
-
tags/1.3.8/includes/themify-metabox/img/ddbtn-cross.png (added)
-
tags/1.3.8/includes/themify-metabox/img/icon-delete.png (added)
-
tags/1.3.8/includes/themify-metabox/img/jquery.minicolors.png (added)
-
tags/1.3.8/includes/themify-metabox/img/jquery.minicolors.webp (added)
-
tags/1.3.8/includes/themify-metabox/includes (added)
-
tags/1.3.8/includes/themify-metabox/includes/themify-field-types.php (added)
-
tags/1.3.8/includes/themify-metabox/includes/themify-metabox-core.php (added)
-
tags/1.3.8/includes/themify-metabox/includes/themify-metabox-utils.php (added)
-
tags/1.3.8/includes/themify-metabox/includes/themify-term-fields.php (added)
-
tags/1.3.8/includes/themify-metabox/includes/themify-user-fields.php (added)
-
tags/1.3.8/includes/themify-metabox/js (added)
-
tags/1.3.8/includes/themify-metabox/js/gallery-shortcode.js (added)
-
tags/1.3.8/includes/themify-metabox/js/gallery-shortcode.js.gz (added)
-
tags/1.3.8/includes/themify-metabox/js/jquery-ui-timepicker.min.js (added)
-
tags/1.3.8/includes/themify-metabox/js/jquery-ui-timepicker.min.js.gz (added)
-
tags/1.3.8/includes/themify-metabox/js/media-lib-browse.js (added)
-
tags/1.3.8/includes/themify-metabox/js/media-lib-browse.js.gz (added)
-
tags/1.3.8/includes/themify-metabox/js/meta-box-tabs.js (added)
-
tags/1.3.8/includes/themify-metabox/js/meta-box-tabs.js.gz (added)
-
tags/1.3.8/includes/themify-metabox/js/page-options-modal.js (added)
-
tags/1.3.8/includes/themify-metabox/js/page-options-modal.js.gz (added)
-
tags/1.3.8/includes/themify-metabox/js/page-options.js (added)
-
tags/1.3.8/includes/themify-metabox/js/page-options.js.gz (added)
-
tags/1.3.8/includes/themify-metabox/js/plupload.js (added)
-
tags/1.3.8/includes/themify-metabox/js/plupload.js.gz (added)
-
tags/1.3.8/includes/themify-metabox/js/scripts.js (added)
-
tags/1.3.8/includes/themify-metabox/js/scripts.js.gz (added)
-
tags/1.3.8/includes/themify-metabox/js/themify.minicolors.js (added)
-
tags/1.3.8/includes/themify-metabox/js/themify.minicolors.js.gz (added)
-
tags/1.3.8/includes/themify-metabox/readme.txt (added)
-
tags/1.3.8/includes/themify-metabox/themify-metabox.php (added)
-
tags/1.3.8/includes/tinymce.php (added)
-
tags/1.3.8/includes/widgets.php (added)
-
tags/1.3.8/json (added)
-
tags/1.3.8/json/style.json (added)
-
tags/1.3.8/json/style.json.gz (added)
-
tags/1.3.8/modules (added)
-
tags/1.3.8/modules/module-event-posts.php (added)
-
tags/1.3.8/readme.txt (added)
-
tags/1.3.8/templates (added)
-
tags/1.3.8/templates/archive.php (added)
-
tags/1.3.8/templates/comments-protected.php (added)
-
tags/1.3.8/templates/config-post-meta.php (added)
-
tags/1.3.8/templates/config-shortcode-generator.php (added)
-
tags/1.3.8/templates/content.php (added)
-
tags/1.3.8/templates/shortcode.php (added)
-
tags/1.3.8/templates/single.php (added)
-
tags/1.3.8/templates/template-event-posts.php (added)
-
tags/1.3.8/templates/widget-categories.php (added)
-
tags/1.3.8/templates/widget-posts.php (added)
-
tags/1.3.8/themify-event-post.php (added)
-
tags/1.3.8/wpml-config.xml (added)
-
trunk/assets/active.js.gz (modified) ( previous)
-
trunk/includes/functions.php (modified) (9 diffs)
-
trunk/includes/system.php (modified) (2 diffs)
-
trunk/json/style.json.gz (modified) ( previous)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/templates/comments-protected.php (added)
-
trunk/templates/content.php (modified) (4 diffs)
-
trunk/templates/single.php (modified) (4 diffs)
-
trunk/themify-event-post.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
themify-event-post/trunk/includes/functions.php
r3634833 r3812974 101 101 } 102 102 103 if ( ! function_exists( 'themify_event_post_hide_protected_meta' ) ) : 104 /** 105 * Password-protected events keep venue, ticket, and schedule details 106 * private until the visitor unlocks the post, same as the post content. 107 * 108 * Admin screens still show the details so the events list stays usable. 109 * 110 * @param int|WP_Post|null $post Post ID or object. Defaults to the current post. 111 * @return bool 112 */ 113 function themify_event_post_hide_protected_meta( $post = null ) { 114 if ( is_admin() && ! wp_doing_ajax() ) { 115 return false; 116 } 117 118 $post = get_post( $post ); 119 120 return $post instanceof WP_Post && post_password_required( $post ); 121 } 122 endif; 123 103 124 if ( ! function_exists( 'themify_event_post_date' ) ) : 104 125 /** … … 108 129 */ 109 130 function themify_event_post_date( $date_format = null, $time_format = null ) { 131 if ( themify_event_post_hide_protected_meta() ) { 132 return; 133 } 110 134 if(get_post_meta( get_the_id(), 'to_be_announced', true )==='on'){ 111 135 echo '<time class="tep_date"><span class="event-start-date">'.__('To be announced','themify-event-post').'</span></time>'; … … 164 188 */ 165 189 function themify_event_type() { 190 if ( themify_event_post_hide_protected_meta() ) { 191 return; 192 } 166 193 $post_id = get_the_ID(); 167 194 $e_type=get_post_meta( $post_id, 'event_attendance', true ); … … 180 207 */ 181 208 function themify_event_organizer() { 209 if ( themify_event_post_hide_protected_meta() ) { 210 return; 211 } 182 212 $post_id = get_the_ID(); 183 213 $name=get_post_meta( $post_id, 'organizer_name', true ); … … 209 239 */ 210 240 function themify_event_performer() { 241 if ( themify_event_post_hide_protected_meta() ) { 242 return; 243 } 211 244 $post_id = get_the_ID(); 212 245 $name=get_post_meta( $post_id, 'performer_name', true ); … … 334 367 */ 335 368 function themify_event_post_get_image( $args = array() ) { 336 if ( ! has_post_thumbnail() ) {369 if ( themify_event_post_hide_protected_meta() || ! has_post_thumbnail() ) { 337 370 return ''; 338 371 } … … 713 746 */ 714 747 function themify_event_post_json_ld_generator( $args = array() ) { 748 if ( themify_event_post_hide_protected_meta() ) { 749 return ''; 750 } 751 715 752 $schema = array( 716 753 '@context'=>'https://schema.org', … … 1016 1053 function themify_event_post_get_price( $post = null, $before = '', $after = '' ) { 1017 1054 $post = get_post( $post ); 1055 if ( ! ( $post instanceof WP_Post ) || themify_event_post_hide_protected_meta( $post ) ) { 1056 return ''; 1057 } 1018 1058 $price = get_post_meta( $post->ID, 'buy_tickets_price', true ); 1019 1059 if ( empty( $price ) ) { … … 1056 1096 function themify_event_get_buy_ticket( $post = null ) : string { 1057 1097 $post = get_post( $post ); 1098 if ( ! ( $post instanceof WP_Post ) || themify_event_post_hide_protected_meta( $post ) ) { 1099 return ''; 1100 } 1058 1101 $output = ''; 1059 1102 if ( $buy_ticket = get_post_meta( $post->ID, 'buy_tickets', true ) ) { -
themify-event-post/trunk/includes/system.php
r3634833 r3812974 76 76 ( is_singular( 'event' ) || is_tax( [ 'event-category', 'event-tag' ] ) ) 77 77 ) { 78 79 if ( is_singular( 'event' ) ) { 80 add_filter( 'comments_open', array( $this, 'close_protected_event_comments' ), 99, 2 ); 81 add_filter( 'pings_open', array( $this, 'close_protected_event_comments' ), 99, 2 ); 82 add_filter( 'comments_array', array( $this, 'hide_protected_event_comments' ), 99, 2 ); 83 add_filter( 'get_comments_number', array( $this, 'hide_protected_event_comment_count' ), 99, 2 ); 84 add_filter( 'comments_template', array( $this, 'protected_event_comments_template' ), 999 ); 85 } 78 86 79 87 if ( class_exists( 'Tbp_Public' ,false) ) { … … 131 139 } 132 140 141 /** 142 * Keep the comment form closed until a password-protected event is unlocked. 143 * 144 * @param bool $open 145 * @param int $post_id 146 * @return bool 147 */ 148 function close_protected_event_comments( $open, $post_id ) { 149 if ( themify_event_post_hide_protected_meta( $post_id ) ) { 150 return false; 151 } 152 153 return $open; 154 } 155 156 /** 157 * @param array $comments 158 * @param int $post_id 159 * @return array 160 */ 161 function hide_protected_event_comments( $comments, $post_id ) { 162 if ( themify_event_post_hide_protected_meta( $post_id ) ) { 163 return array(); 164 } 165 166 return $comments; 167 } 168 169 /** 170 * @param int|string $count 171 * @param int $post_id 172 * @return int|string 173 */ 174 function hide_protected_event_comment_count( $count, $post_id ) { 175 if ( themify_event_post_hide_protected_meta( $post_id ) ) { 176 return 0; 177 } 178 179 return $count; 180 } 181 182 /** 183 * Replace the theme comments template so the form is not rendered. 184 * 185 * @param string $template 186 * @return string 187 */ 188 function protected_event_comments_template( $template ) { 189 if ( themify_event_post_hide_protected_meta() ) { 190 return $this->get_template_dir() . '/comments-protected.php'; 191 } 192 193 return $template; 194 } 195 133 196 function archive_template( $content ) { 134 197 if ( get_post_type() === 'event' ) { -
themify-event-post/trunk/readme.txt
r3634833 r3812974 4 4 Tags: event, post, date, post-type 5 5 Requires at least: 5.2 6 Tested up to: 7. 0.27 Stable tag: 1.3. 76 Tested up to: 7.1.5 7 Stable tag: 1.3.8 8 8 License: GPL v2 9 9 License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html … … 31 31 32 32 The changelog is located at: https://themify.org/changelogs/themify-event-post.txt 33 34 == Frequently Asked Questions == 35 = Where do I report security bugs found in this plugin? = 36 37 Please report security bugs found in the source code of the Themify Event Post plugin through the [Patchstack Vulnerability Disclosure Program](https://patchstack.com/database/vdp/9e5fbdbd-9f41-431a-b198-cfa0c3ac0aef). The Patchstack team will assist you with verification, CVE assignment, and notify the developers of this plugin. -
themify-event-post/trunk/templates/content.php
r3634833 r3812974 25 25 $thumb = ''; 26 26 $map_address = ''; 27 $location = ''; 28 $hide_protected_meta = themify_event_post_hide_protected_meta( $post_id ); 27 29 ?> 28 30 <article id="post-<?php the_id(); ?>" <?php post_class( 'themify_event_post post tf_clearfix event-post' ); ?>> 29 31 30 <?php if ( $image === 'yes' && has_post_thumbnail() ) : ?>32 <?php if ( ! $hide_protected_meta && $image === 'yes' && has_post_thumbnail() ) : ?> 31 33 <?php 32 34 echo themify_event_post_get_image( array( … … 72 74 <?php endif; ?> 73 75 74 <?php if ( ( $location = get_post_meta( $post_id, 'location', true ) ) && $hide_event_location === 'no' ) : ?>76 <?php if ( ! $hide_protected_meta && ( $location = get_post_meta( $post_id, 'location', true ) ) && $hide_event_location === 'no' ) : ?> 75 77 <div> 76 78 <span class="tep_location"> … … 105 107 106 108 </div><!-- /.tep_content --> 107 <?php 109 <?php 110 if ( ! $hide_protected_meta ) : 108 111 $metadata = get_post_meta($post_id); 109 112 echo themify_event_post_json_ld_generator(array( … … 129 132 'performer'=>isset($metadata['event_performer'])?$metadata['event_performer'][0]:'', 130 133 'performer_name'=>isset($metadata['performer_name'])?$metadata['performer_name'][0]:'', 131 )); ?> 134 )); 135 endif; ?> 132 136 </div><!-- .tep_post_content --> 133 137 -
themify-event-post/trunk/templates/single.php
r3634833 r3812974 8 8 */ 9 9 $post_id = get_the_id(); 10 $hide_protected_meta = themify_event_post_hide_protected_meta( $post_id ); 11 $map_address = ''; 12 $location = ''; 10 13 ?> 11 14 <div <?php post_class( 'themify_event_post' ); ?>> 12 15 13 16 <?php 14 echo themify_event_post_get_image(); 15 $image = get_the_post_thumbnail_url($post_id); 17 if ( ! $hide_protected_meta ) { 18 echo themify_event_post_get_image(); 19 $image = get_the_post_thumbnail_url( $post_id ); 20 } else { 21 $image = ''; 22 } 16 23 ?> 17 24 18 <?php if ( $map_address = get_post_meta( $post_id, 'map_address', true) ) : ?>25 <?php if ( ! $hide_protected_meta && ( $map_address = get_post_meta( $post_id, 'map_address', true ) ) ) : ?> 19 26 <div class="tep_event_map"> 20 27 <?php echo themify_event_post_map( array( … … 43 50 <?php themify_event_performer(); ?> 44 51 45 <?php if ( $location = get_post_meta( $post_id, 'location', true) ) : ?>52 <?php if ( ! $hide_protected_meta && ( $location = get_post_meta( $post_id, 'location', true ) ) ) : ?> 46 53 <div> 47 54 <span class="tep_location"> … … 66 73 </div><!-- /.tep_content --> 67 74 68 <?php 75 <?php 76 if ( ! $hide_protected_meta ) : 69 77 $metadata = get_post_meta($post_id); 70 78 echo themify_event_post_json_ld_generator(array( … … 91 99 'performer'=>isset($metadata['event_performer'])?$metadata['event_performer'][0]:'', 92 100 'performer_name'=>isset($metadata['performer_name'])?$metadata['performer_name'][0]:'', 93 )); ?> 101 )); 102 endif; ?> 94 103 </div><!-- / .themify_event_post --> -
themify-event-post/trunk/themify-event-post.php
r3634833 r3812974 3 3 Plugin Name: Themify Event Post 4 4 Plugin URI: https://themify.me/event-post 5 Version: 1.3. 75 Version: 1.3.8 6 6 Author: Themify 7 7 Author URI: https://themify.me … … 45 45 'url' => trailingslashit( plugin_dir_url( __FILE__ ) ), 46 46 'dir' => trailingslashit( plugin_dir_path( __FILE__ ) ), 47 'version' => '1.3. 7'47 'version' => '1.3.8' 48 48 ) ); 49 49 }
Note:
See TracChangeset
for help on using the changeset viewer.