Changeset 3246718
- Timestamp:
- 02/25/2025 08:16:28 PM (13 months ago)
- Location:
- themify-event-post
- Files:
-
- 87 added
- 7 edited
-
tags/1.3.3 (added)
-
tags/1.3.3/assets (added)
-
tags/1.3.3/assets/active.js (added)
-
tags/1.3.3/assets/active.js.gz (added)
-
tags/1.3.3/assets/admin_script.js (added)
-
tags/1.3.3/assets/admin_script.js.gz (added)
-
tags/1.3.3/assets/scripts.js (added)
-
tags/1.3.3/assets/scripts.js.gz (added)
-
tags/1.3.3/assets/style.css (added)
-
tags/1.3.3/assets/style.css.gz (added)
-
tags/1.3.3/assets/tinymce.css (added)
-
tags/1.3.3/assets/tinymce.css.gz (added)
-
tags/1.3.3/assets/tinymce.js (added)
-
tags/1.3.3/assets/tinymce.js.gz (added)
-
tags/1.3.3/includes (added)
-
tags/1.3.3/includes/admin.php (added)
-
tags/1.3.3/includes/functions.php (added)
-
tags/1.3.3/includes/i18n.php (added)
-
tags/1.3.3/includes/post-type.php (added)
-
tags/1.3.3/includes/system.php (added)
-
tags/1.3.3/includes/themify-metabox (added)
-
tags/1.3.3/includes/themify-metabox/css (added)
-
tags/1.3.3/includes/themify-metabox/css/jquery-ui-timepicker.min.css (added)
-
tags/1.3.3/includes/themify-metabox/css/jquery-ui-timepicker.min.css.gz (added)
-
tags/1.3.3/includes/themify-metabox/css/page-options-iframe.css (added)
-
tags/1.3.3/includes/themify-metabox/css/page-options-iframe.css.gz (added)
-
tags/1.3.3/includes/themify-metabox/css/page-options.css (added)
-
tags/1.3.3/includes/themify-metabox/css/page-options.css.gz (added)
-
tags/1.3.3/includes/themify-metabox/css/styles.css (added)
-
tags/1.3.3/includes/themify-metabox/css/styles.css.gz (added)
-
tags/1.3.3/includes/themify-metabox/css/themify.minicolors.css (added)
-
tags/1.3.3/includes/themify-metabox/css/themify.minicolors.css.gz (added)
-
tags/1.3.3/includes/themify-metabox/example-functions.php (added)
-
tags/1.3.3/includes/themify-metabox/img (added)
-
tags/1.3.3/includes/themify-metabox/img/ddbtn-blank.png (added)
-
tags/1.3.3/includes/themify-metabox/img/ddbtn-check.png (added)
-
tags/1.3.3/includes/themify-metabox/img/ddbtn-cross.png (added)
-
tags/1.3.3/includes/themify-metabox/img/icon-delete.png (added)
-
tags/1.3.3/includes/themify-metabox/img/jquery.minicolors.png (added)
-
tags/1.3.3/includes/themify-metabox/img/jquery.minicolors.webp (added)
-
tags/1.3.3/includes/themify-metabox/includes (added)
-
tags/1.3.3/includes/themify-metabox/includes/themify-field-types.php (added)
-
tags/1.3.3/includes/themify-metabox/includes/themify-metabox-core.php (added)
-
tags/1.3.3/includes/themify-metabox/includes/themify-metabox-utils.php (added)
-
tags/1.3.3/includes/themify-metabox/includes/themify-term-fields.php (added)
-
tags/1.3.3/includes/themify-metabox/includes/themify-user-fields.php (added)
-
tags/1.3.3/includes/themify-metabox/js (added)
-
tags/1.3.3/includes/themify-metabox/js/gallery-shortcode.js (added)
-
tags/1.3.3/includes/themify-metabox/js/gallery-shortcode.js.gz (added)
-
tags/1.3.3/includes/themify-metabox/js/jquery-ui-timepicker.min.js (added)
-
tags/1.3.3/includes/themify-metabox/js/jquery-ui-timepicker.min.js.gz (added)
-
tags/1.3.3/includes/themify-metabox/js/media-lib-browse.js (added)
-
tags/1.3.3/includes/themify-metabox/js/media-lib-browse.js.gz (added)
-
tags/1.3.3/includes/themify-metabox/js/meta-box-tabs.js (added)
-
tags/1.3.3/includes/themify-metabox/js/meta-box-tabs.js.gz (added)
-
tags/1.3.3/includes/themify-metabox/js/page-options-modal.js (added)
-
tags/1.3.3/includes/themify-metabox/js/page-options-modal.js.gz (added)
-
tags/1.3.3/includes/themify-metabox/js/page-options.js (added)
-
tags/1.3.3/includes/themify-metabox/js/page-options.js.gz (added)
-
tags/1.3.3/includes/themify-metabox/js/plupload.js (added)
-
tags/1.3.3/includes/themify-metabox/js/plupload.js.gz (added)
-
tags/1.3.3/includes/themify-metabox/js/scripts.js (added)
-
tags/1.3.3/includes/themify-metabox/js/scripts.js.gz (added)
-
tags/1.3.3/includes/themify-metabox/js/themify.minicolors.js (added)
-
tags/1.3.3/includes/themify-metabox/js/themify.minicolors.js.gz (added)
-
tags/1.3.3/includes/themify-metabox/readme.txt (added)
-
tags/1.3.3/includes/themify-metabox/themify-metabox.php (added)
-
tags/1.3.3/includes/tinymce.php (added)
-
tags/1.3.3/includes/widgets.php (added)
-
tags/1.3.3/json (added)
-
tags/1.3.3/json/style.json (added)
-
tags/1.3.3/json/style.json.gz (added)
-
tags/1.3.3/modules (added)
-
tags/1.3.3/modules/module-event-posts.php (added)
-
tags/1.3.3/readme.txt (added)
-
tags/1.3.3/templates (added)
-
tags/1.3.3/templates/archive.php (added)
-
tags/1.3.3/templates/config-post-meta.php (added)
-
tags/1.3.3/templates/config-shortcode-generator.php (added)
-
tags/1.3.3/templates/content.php (added)
-
tags/1.3.3/templates/shortcode.php (added)
-
tags/1.3.3/templates/single.php (added)
-
tags/1.3.3/templates/template-event-posts.php (added)
-
tags/1.3.3/templates/widget-categories.php (added)
-
tags/1.3.3/templates/widget-posts.php (added)
-
tags/1.3.3/themify-event-post.php (added)
-
tags/1.3.3/wpml-config.xml (added)
-
trunk/includes/functions.php (modified) (1 diff)
-
trunk/includes/system.php (modified) (3 diffs)
-
trunk/json/style.json.gz (modified) (previous)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/templates/shortcode.php (modified) (5 diffs)
-
trunk/templates/single.php (modified) (1 diff)
-
trunk/themify-event-post.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
themify-event-post/trunk/includes/functions.php
r3064185 r3246718 1021 1021 $post = get_post( $post ); 1022 1022 1023 $start_date = get_post_meta( $post->ID, 'start_date', true );1024 1023 $end_date = get_post_meta( $post->ID, 'end_date', true ); 1025 1024 $time = time(); 1026 if ( 1027 ( ! $start_date || $time > strtotime( $start_date ) ) 1028 && ( ! $end_date || $time < strtotime( $end_date ) ) 1029 ) { 1030 return true; 1025 if ( $end_date && $time > strtotime( $end_date ) ) { 1026 return false; 1031 1027 } 1032 1028 1033 return false;1029 return true; 1034 1030 } 1035 1031 -
themify-event-post/trunk/includes/system.php
r3037797 r3246718 52 52 add_action( 'wp_enqueue_scripts', array( $this, 'wp_enqueue_scripts' ) ); 53 53 add_filter( 'template_include', array( $this, 'template_include' ) ); 54 add_filter( 'post_class', array( $this, 'post_class' ) ); 54 55 55 56 if ( current_user_can( 'publish_posts' ) && get_user_option( 'rich_editing' ) === 'true' ) { … … 267 268 268 269 public function locate_template( $name ) { 269 if( is_child_theme() && is_file( trailingslashit( get_stylesheet_directory() ) . trailingslashit( $this->pid ) . "{$name}.php" ) ) { 270 if ( str_contains( $name, '../' ) ) { 271 return false; 272 } else if ( is_child_theme() && is_file( trailingslashit( get_stylesheet_directory() ) . trailingslashit( $this->pid ) . "{$name}.php" ) ) { 270 273 return trailingslashit( get_stylesheet_directory() ) . trailingslashit( $this->pid ) . "{$name}.php"; 271 274 } else if( is_file( trailingslashit( get_template_directory() ) . trailingslashit( $this->pid ) . "{$name}.php" ) ) { … … 352 355 } 353 356 } 357 358 function post_class( $classes ) { 359 if ( get_post_type() === 'event' ) { 360 $classes[] = themify_event_is_visible() ? 'tep_upcoming_event' : 'tep_past_event'; 361 } 362 363 return $classes; 364 } 354 365 } -
themify-event-post/trunk/readme.txt
r3095360 r3246718 4 4 Tags: event, post, date, post-type 5 5 Requires at least: 5.2 6 Tested up to: 6.5.3 7 Stable tag: 1.3.2 6 Tested up to: 6.7.2 7 Stable tag: 1.3.3 8 License: GPL v2 9 License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html 8 10 9 11 This plugin will add Event post type. -
themify-event-post/trunk/templates/shortcode.php
r2944781 r3246718 39 39 ); 40 40 $args = shortcode_atts( $defaults, $atts, 'themify_event_post' ); 41 extract( $args );42 41 43 42 if ( ! empty( $args['id'] ) ) { … … 45 44 } 46 45 47 if ( empty( $ template_before) )48 $ template_before = '<div class="themify_event_post_loop ' . $args['style']. '">';49 if ( empty( $ template_after) )50 $ template_after= '</div>';46 if ( empty( $args['template_before'] ) ) 47 $args['template_before'] = '<div class="themify_event_post_loop ' . esc_attr( $args['style'] ) . '">'; 48 if ( empty( $args['template_after'] ) ) 49 $args['template_after'] = '</div>'; 51 50 52 51 // Event Query Setup 53 52 $events = array(); 54 53 55 if ( $ show === 'upcoming' || $show=== 'tabbed' ) { // show only future events54 if ( $args['show'] === 'upcoming' || $args['show'] === 'tabbed' ) { // show only future events 56 55 $query = new WP_Query(); 57 56 $args['show'] = 'upcoming'; 58 57 $events[] = $query->query( apply_filters( 'themify_event_shortcode_args', themify_event_post_parse_query( $args ) ) ); 59 58 } 60 if ( 'past' === $ show || 'tabbed' === $show) {59 if ( 'past' === $args['show'] || 'tabbed' === $args['show'] ) { 61 60 $query = new WP_Query(); 62 61 $args['show'] = 'past'; 63 62 $events[] = $query->query( apply_filters( 'themify_event_shortcode_args', themify_event_post_parse_query( $args ) ) ); 64 63 } 65 if ( 'mix' === $ show) {64 if ( 'mix' === $args['show'] ) { 66 65 $query = new WP_Query(); 67 66 $events[] = $query->query( apply_filters( 'themify_event_shortcode_args', themify_event_post_parse_query( $args ) ) ); … … 69 68 70 69 ob_start(); 71 if ( $ show=== 'tabbed' ) {70 if ( $args['show'] === 'tabbed' ) { 72 71 ?> 73 72 <div class="themify-events-tabs"> … … 77 76 </ul> 78 77 <div id="themify-events-upcoming-<?php echo $instance; ?>"> 79 <?php echo $ template_before . $this->get_shortcode_template( $events[0], $template, $args ) . $template_after; ?>78 <?php echo $args['template_before'] . $this->get_shortcode_template( $events[0], $args['template'], $args ) . $args['template_after']; ?> 80 79 </div> 81 80 <div id="themify-events-past-<?php echo $instance; ?>"> 82 <?php echo $ template_before . $this->get_shortcode_template( $events[1], $template, $args ) . $template_after; ?>81 <?php echo $args['template_before'] . $this->get_shortcode_template( $events[1], $args['template'], $args ) . $args['template_after']; ?> 83 82 </div> 84 83 </div> … … 86 85 } else { 87 86 88 $output = $this->get_shortcode_template( $events[0], $ template, $args );87 $output = $this->get_shortcode_template( $events[0], $args['template'], $args ); 89 88 if ( $output !== '' ) { 90 echo $ template_before . $output . $template_after;91 if ( $ hide_page_nav=== 'no' ) {89 echo $args['template_before'] . $output . $args['template_after']; 90 if ( $args['hide_page_nav'] === 'no' ) { 92 91 echo themify_event_post_pagenav( array( 93 92 'total_posts' => $query->found_posts, 94 93 'paged' => themify_event_post_get_paged_query(), 95 'offset' => (int) $ offset,96 'posts_per_page' => (int) $ limit,94 'offset' => (int) $args['offset'], 95 'posts_per_page' => (int) $args['limit'], 97 96 ) ); 98 97 } -
themify-event-post/trunk/templates/single.php
r3064185 r3246718 9 9 $post_id = get_the_id(); 10 10 ?> 11 <div class="themify_event_post">11 <div <?php post_class( 'themify_event_post' ); ?>> 12 12 13 13 <?php -
themify-event-post/trunk/themify-event-post.php
r3095360 r3246718 3 3 Plugin Name: Themify Event Post 4 4 Plugin URI: https://themify.me/event-post 5 Version: 1.3. 25 Version: 1.3.3 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. 2'47 'version' => '1.3.3' 48 48 ) ); 49 49 }
Note: See TracChangeset
for help on using the changeset viewer.