Changeset 1301303
- Timestamp:
- 12/06/2015 11:13:11 AM (10 years ago)
- Location:
- chronosly-events-calendar
- Files:
-
- 8 edited
- 9 copied
-
tags/2.2.8 (copied) (copied from chronosly-events-calendar/trunk)
-
tags/2.2.8/README.txt (copied) (copied from chronosly-events-calendar/trunk/README.txt) (1 diff)
-
tags/2.2.8/README.txt~ (copied) (copied from chronosly-events-calendar/trunk/README.txt~) (1 diff)
-
tags/2.2.8/chronosly.php (copied) (copied from chronosly-events-calendar/trunk/chronosly.php) (2 diffs)
-
tags/2.2.8/classes/chronosly_dad_elements.php (copied) (copied from chronosly-events-calendar/trunk/classes/chronosly_dad_elements.php)
-
tags/2.2.8/classes/chronosly_extend.php (copied) (copied from chronosly-events-calendar/trunk/classes/chronosly_extend.php) (1 diff)
-
tags/2.2.8/classes/chronosly_shortcode.php (copied) (copied from chronosly-events-calendar/trunk/classes/chronosly_shortcode.php) (2 diffs)
-
tags/2.2.8/classes/chronosly_templates.php (copied) (copied from chronosly-events-calendar/trunk/classes/chronosly_templates.php)
-
tags/2.2.8/classes/chronosly_widgets.php (modified) (6 diffs)
-
tags/2.2.8/post-types/post_type_chronosly.php (copied) (copied from chronosly-events-calendar/trunk/post-types/post_type_chronosly.php) (6 diffs)
-
trunk/README.txt (modified) (1 diff)
-
trunk/README.txt~ (modified) (1 diff)
-
trunk/chronosly.php (modified) (2 diffs)
-
trunk/classes/chronosly_extend.php (modified) (1 diff)
-
trunk/classes/chronosly_shortcode.php (modified) (2 diffs)
-
trunk/classes/chronosly_widgets.php (modified) (6 diffs)
-
trunk/post-types/post_type_chronosly.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
chronosly-events-calendar/tags/2.2.8/README.txt
r1286972 r1301303 6 6 Requires at least: 3.1 7 7 Tested up to: 4.3.1 8 Stable tag: 2.2. 78 Stable tag: 2.2.8 9 9 License: GPLv2 10 10 -
chronosly-events-calendar/tags/2.2.8/README.txt~
r1284685 r1301303 6 6 Requires at least: 3.1 7 7 Tested up to: 4.3.1 8 Stable tag: 2.2. 68 Stable tag: 2.2.8 9 9 License: GPLv2 10 11 10 12 11 Elegant event list display, easy-to-use interface with major event features included. 100% responsive and extensible with templates and addons. -
chronosly-events-calendar/tags/2.2.8/chronosly.php
r1286972 r1301303 4 4 * Plugin URI: http://www.chronosly.com 5 5 * Description: Chronosly is one of the plugins you have always dreamt about. Designed to suit all users (basic, designers, and software developers). Choose your template and you are ready to publish your events. Install addons to enhance the preset plugin features. You can get a wide selection of templates and addons in our marketplace 6 * Version: 2.2. 76 * Version: 2.2.8 7 7 * Author: Heimsveld IPBN 8 8 * Author URI: http://www.heimsveld.com … … 26 26 define('CHRONOSLY_TEMPLATES_URL', plugins_url()."/chronosly-templates"); //path para incluir scripts o css 27 27 define('CHRONOSLY_DEBUG', false); //debug mode 28 define('CHRONOSLY_VERSION', "2.2. 7"); //debug mode28 define('CHRONOSLY_VERSION', "2.2.8"); //debug mode 29 29 define('CHRONOSLY_ADMIN_INTERFACE', 1); //Todo: hacer diferentes interficies de admin simple o varios event 30 30 define('CHRONOSLY_ADMIN_MODALITY', 1); //Todo: hacer diferentes modalidades segun la tematica -
chronosly-events-calendar/tags/2.2.8/classes/chronosly_extend.php
r1286972 r1301303 150 150 "default":{"id":"default","version":"1.0","name":"Default","desc":"Default Template","img":"http://plugins.heimsveld.com/thumbnail-default-300px.jpg","price":0,"author":"Chronosly","author_url":"http://www.chronosly.com","view":"http://www.chronosly.com","url":"http://www.chronosly.com","featured":0,"updated":1412467200,"dw":1,"rate":8}, 151 151 "dark":{"id":"dark","version":"2.0","name":"Dark","desc":"This is the dark design version of Chronosly Default template, specially designed to match with darker theme sites.","img":"http://plugins.heimsveld.com/thumbnail-dark-300px.jpg","price":12,"author":"Chronosly","author_url":"http://www.chronosly.com", "view":"http://dark.chronosly.com/events/?utm_source=chronosly.com&utm_medium=referral&utm_campaign=Templates2DarkLiveDemo", "url":"https://www.chronosly.com/product/dark-template-addon/?utm_source=clients&utm_medium=referral&utm_campaign=Templates2Darkprofile","featured":0,"updated":1409356800,"dw":0,"rate":8}, 152 "grid":{"id":"grid","version":"2.0","name":"Grid","desc":"Responsive theme with 3 Column Grid based homepage layout.","img":"http://plugins.heimsveld.com/thumbnail-grid-300px.jpg","price":1 7,"author":"Chronosly","author_url":"http://www.chronosly.com", "view":"http://grid.chronosly.com/events/?utm_source=chronosly.com&utm_medium=referral&utm_campaign=Templates2GridLiveDemo", "url":"https://www.chronosly.com/product/grid-template/?utm_source=clients&utm_medium=referral&utm_campaign=Templates2Gridprofile","featured":0,"updated":1409356800,"dw":0,"rate":8},152 "grid":{"id":"grid","version":"2.0","name":"Grid","desc":"Responsive theme with 3 Column Grid based homepage layout.","img":"http://plugins.heimsveld.com/thumbnail-grid-300px.jpg","price":15,"author":"Chronosly","author_url":"http://www.chronosly.com", "view":"http://grid.chronosly.com/events/?utm_source=chronosly.com&utm_medium=referral&utm_campaign=Templates2GridLiveDemo", "url":"https://www.chronosly.com/product/grid-template/?utm_source=clients&utm_medium=referral&utm_campaign=Templates2Gridprofile","featured":0,"updated":1409356800,"dw":0,"rate":8}, 153 153 "tickets":{"id":"tickets","version":"1.4","name":"Ticketing","desc":"Modern and clean design, effective and convincing way to sell your tickets","img":"http://plugins.heimsveld.com/thumbnail-ticketing-300px.jpg","price":15,"author":"Chronosly","author_url":"http://www.chronosly.com", "view":"http://ticketing.chronosly.com/events/?utm_source=chronosly.com&utm_medium=referral&utm_campaign=Templates2TicketingLiveDemo", "url":"https://www.chronosly.com/product/ticketing-template/?utm_source=clients&utm_medium=referral&utm_campaign=Templates2Ticketingprofile","featured":0,"updated":1409356800,"dw":0,"rate":8} 154 154 -
chronosly-events-calendar/tags/2.2.8/classes/chronosly_shortcode.php
r1286972 r1301303 383 383 break; 384 384 case "category": 385 if($args["single"] ) {385 if($args["single"] || ($args["id"] && !stripos($args["id"], ",") !== FALSE)) { 386 386 $cat = get_term($args["id"], "chronosly_category"); 387 387 … … 391 391 } 392 392 else { 393 if($args["id"]){ 394 $ids = array(); 395 if(is_array($args["id"])){ 396 397 foreach ($args["id"] as $id) { 398 $cat = get_term($id, "chronosly_category"); 399 $ids[]= $cat->slug; 400 } 401 } 402 else $ids = $args["id"]; 403 $q["chronosly_category"] = $ids; 404 } 393 405 $wp_query = new WP_Query($q); 394 406 include(Post_Type_Chronosly::chronosly_templates("shortcode_categories")); -
chronosly-events-calendar/tags/2.2.8/classes/chronosly_widgets.php
r1157813 r1301303 15 15 $title = apply_filters( 'widget_title', $instance['title'] ); 16 16 // before and after widget arguments are defined by themes 17 17 18 echo $args['before_widget']; 18 19 if ( ! empty( $title ) ) echo $args['before_title'] . $title . $args['after_title']; 19 if($instance['type'] == "calendar" and !$instance[' month'] and !$instance['week']){20 if($instance['type'] == "calendar" and !$instance['year'] and !$instance['month'] and !$instance['week']){ 20 21 $instance['month'] = date("m"); 21 22 } … … 25 26 } 26 27 } 27 // This is where you run the code and display the output 28 // This is where you run the code and display the output 29 // echo '[chronosly '.$params.']'; 30 28 31 echo do_shortcode('[chronosly '.$params.']'); 29 32 echo $args['after_widget']; … … 65 68 if(!$instance["single"]){ 66 69 $year_style=1; 67 $upcoming_style = 1;70 if($instance["type"] == "event") $upcoming_style = 1; 68 71 $month_style=1; 69 72 $week_style=1; … … 75 78 76 79 77 }80 } 78 81 if($instance["type"] != "calendar"){ 79 82 // $single_style=1; … … 107 110 jQuery("#"+id+" .ch-widget-upcoming").hide(); 108 111 type = ch_lock; 109 console.log();110 112 if(type == "event" || type == "calendar" ){ 111 113 jQuery("#"+id+" .ch-widget-y").show(); … … 193 195 <option value="event" <?php if($instance["type"] == "event") echo "selected" ?>><?php _e("Events", "chronosly");?></option> 194 196 <option value="calendar" <?php if($instance["type"] == "calendar") echo "selected" ?>><?php _e("Calendar", "chronosly");?></option> 197 <option value="category" <?php if($instance["type"] == "category") echo "selected" ?>><?php _e("Categories", "chronosly");?></option> 195 198 <option value="organizer" <?php if($instance["type"] == "organizer") echo "selected" ?>><?php _e("Organizers", "chronosly");?></option> 196 199 <option value="place" <?php if($instance["type"] == "place") echo "selected" ?>><?php _e("Places", "chronosly");?></option> -
chronosly-events-calendar/tags/2.2.8/post-types/post_type_chronosly.php
r1286972 r1301303 575 575 else { 576 576 $fromc = date("Y-m-d", strtotime("+1 week")); 577 $toc = date("Y-m-d"); 577 if($settings["chronosly_show_past_events"]) $toc = date("Y-m-d",strtotime("-1 week")); 578 else $toc = date("Y-m-d"); 578 579 } 579 580 … … 586 587 else { 587 588 $fromc = date("Y-m-d",strtotime("+$time day")); 588 $toc = date("Y-m-d"); 589 if($settings["chronosly_show_past_events"]) $toc = date("Y-m-d",strtotime("-$time day")); 590 else $toc = date("Y-m-d"); 589 591 } 590 592 } … … 1110 1112 1111 1113 1112 if( $settings["chronosly_show_past_events"] != 1or $from >= strtotime(date("Y-m-d"))) {1114 if(!$settings["chronosly_show_past_events"] or $from >= strtotime(date("Y-m-d"))) { 1113 1115 $pos = Post_Type_Chronosly::get_event_position($name,$meta, $id, $from, date("H", $from), date("i", $from)); 1114 1116 // echo $pos." "; … … 1508 1510 } 1509 1511 else if(is_tax("chronosly_tag") and !$chronosly_shortcode ){ 1510 if(!has_action( 'posts_orderby', array("Post_Type_Chronosly",'add_custom_orderby') )) add_action( 'posts_orderby', array("Post_Type_Chronosly",'add_custom_orderby') );1512 // if(!has_action( 'posts_orderby', array("Post_Type_Chronosly",'add_custom_orderby') )) add_action( 'posts_orderby', array("Post_Type_Chronosly",'add_custom_orderby') ); 1511 1513 if(!has_action( 'pre_get_posts', array("Post_Type_Chronosly",'add_custom_post_vars') )) add_action( 'pre_get_posts', array("Post_Type_Chronosly",'add_custom_post_vars') ); 1512 1514 return CHRONOSLY_PATH.DIRECTORY_SEPARATOR."templates".DIRECTORY_SEPARATOR.'single-tag-chronosly.php'; … … 1514 1516 else if((self::POST_TYPE === $custom_post_type and !$chronosly_shortcode) or $template == "shortcode_event" or $template == "shortcode_events"){ 1515 1517 if(is_archive() or $template == "shortcode_events"){ 1516 add_action( 'posts_orderby', array("Post_Type_Chronosly",'add_custom_orderby') );1518 // add_action( 'posts_orderby', array("Post_Type_Chronosly",'add_custom_orderby') ); 1517 1519 add_action( 'pre_get_posts', array("Post_Type_Chronosly",'add_custom_post_vars') ); 1518 1520 if($template != "shortcode_events" and file_exists(get_template_directory().DIRECTORY_SEPARATOR."archive-chronosly.php")) return get_template_directory().DIRECTORY_SEPARATOR."archive-chronosly.php"; … … 1560 1562 else if(("chronosly_calendar" === $custom_post_type and !$chronosly_shortcode) or $template == "shortcode_calendar") 1561 1563 { 1562 if(!has_action( 'posts_orderby', array("Post_Type_Chronosly",'add_custom_orderby') )) add_action( 'posts_orderby', array("Post_Type_Chronosly",'add_custom_orderby') );1564 // if(!has_action( 'posts_orderby', array("Post_Type_Chronosly",'add_custom_orderby') )) add_action( 'posts_orderby', array("Post_Type_Chronosly",'add_custom_orderby') ); 1563 1565 if($template != "shortcode_calendar" and file_exists(get_template_directory().DIRECTORY_SEPARATOR."calendar-chronosly.php")) return get_template_directory().DIRECTORY_SEPARATOR."calendar-chronosly.php"; 1564 1566 if($template != "shortcode_calendar" and file_exists(get_template_directory().DIRECTORY_SEPARATOR."chronosly.php")) return get_template_directory().DIRECTORY_SEPARATOR."chronosly.php"; -
chronosly-events-calendar/trunk/README.txt
r1286972 r1301303 6 6 Requires at least: 3.1 7 7 Tested up to: 4.3.1 8 Stable tag: 2.2. 78 Stable tag: 2.2.8 9 9 License: GPLv2 10 10 -
chronosly-events-calendar/trunk/README.txt~
r1284685 r1301303 6 6 Requires at least: 3.1 7 7 Tested up to: 4.3.1 8 Stable tag: 2.2. 68 Stable tag: 2.2.8 9 9 License: GPLv2 10 11 10 12 11 Elegant event list display, easy-to-use interface with major event features included. 100% responsive and extensible with templates and addons. -
chronosly-events-calendar/trunk/chronosly.php
r1286972 r1301303 4 4 * Plugin URI: http://www.chronosly.com 5 5 * Description: Chronosly is one of the plugins you have always dreamt about. Designed to suit all users (basic, designers, and software developers). Choose your template and you are ready to publish your events. Install addons to enhance the preset plugin features. You can get a wide selection of templates and addons in our marketplace 6 * Version: 2.2. 76 * Version: 2.2.8 7 7 * Author: Heimsveld IPBN 8 8 * Author URI: http://www.heimsveld.com … … 26 26 define('CHRONOSLY_TEMPLATES_URL', plugins_url()."/chronosly-templates"); //path para incluir scripts o css 27 27 define('CHRONOSLY_DEBUG', false); //debug mode 28 define('CHRONOSLY_VERSION', "2.2. 7"); //debug mode28 define('CHRONOSLY_VERSION', "2.2.8"); //debug mode 29 29 define('CHRONOSLY_ADMIN_INTERFACE', 1); //Todo: hacer diferentes interficies de admin simple o varios event 30 30 define('CHRONOSLY_ADMIN_MODALITY', 1); //Todo: hacer diferentes modalidades segun la tematica -
chronosly-events-calendar/trunk/classes/chronosly_extend.php
r1286972 r1301303 150 150 "default":{"id":"default","version":"1.0","name":"Default","desc":"Default Template","img":"http://plugins.heimsveld.com/thumbnail-default-300px.jpg","price":0,"author":"Chronosly","author_url":"http://www.chronosly.com","view":"http://www.chronosly.com","url":"http://www.chronosly.com","featured":0,"updated":1412467200,"dw":1,"rate":8}, 151 151 "dark":{"id":"dark","version":"2.0","name":"Dark","desc":"This is the dark design version of Chronosly Default template, specially designed to match with darker theme sites.","img":"http://plugins.heimsveld.com/thumbnail-dark-300px.jpg","price":12,"author":"Chronosly","author_url":"http://www.chronosly.com", "view":"http://dark.chronosly.com/events/?utm_source=chronosly.com&utm_medium=referral&utm_campaign=Templates2DarkLiveDemo", "url":"https://www.chronosly.com/product/dark-template-addon/?utm_source=clients&utm_medium=referral&utm_campaign=Templates2Darkprofile","featured":0,"updated":1409356800,"dw":0,"rate":8}, 152 "grid":{"id":"grid","version":"2.0","name":"Grid","desc":"Responsive theme with 3 Column Grid based homepage layout.","img":"http://plugins.heimsveld.com/thumbnail-grid-300px.jpg","price":1 7,"author":"Chronosly","author_url":"http://www.chronosly.com", "view":"http://grid.chronosly.com/events/?utm_source=chronosly.com&utm_medium=referral&utm_campaign=Templates2GridLiveDemo", "url":"https://www.chronosly.com/product/grid-template/?utm_source=clients&utm_medium=referral&utm_campaign=Templates2Gridprofile","featured":0,"updated":1409356800,"dw":0,"rate":8},152 "grid":{"id":"grid","version":"2.0","name":"Grid","desc":"Responsive theme with 3 Column Grid based homepage layout.","img":"http://plugins.heimsveld.com/thumbnail-grid-300px.jpg","price":15,"author":"Chronosly","author_url":"http://www.chronosly.com", "view":"http://grid.chronosly.com/events/?utm_source=chronosly.com&utm_medium=referral&utm_campaign=Templates2GridLiveDemo", "url":"https://www.chronosly.com/product/grid-template/?utm_source=clients&utm_medium=referral&utm_campaign=Templates2Gridprofile","featured":0,"updated":1409356800,"dw":0,"rate":8}, 153 153 "tickets":{"id":"tickets","version":"1.4","name":"Ticketing","desc":"Modern and clean design, effective and convincing way to sell your tickets","img":"http://plugins.heimsveld.com/thumbnail-ticketing-300px.jpg","price":15,"author":"Chronosly","author_url":"http://www.chronosly.com", "view":"http://ticketing.chronosly.com/events/?utm_source=chronosly.com&utm_medium=referral&utm_campaign=Templates2TicketingLiveDemo", "url":"https://www.chronosly.com/product/ticketing-template/?utm_source=clients&utm_medium=referral&utm_campaign=Templates2Ticketingprofile","featured":0,"updated":1409356800,"dw":0,"rate":8} 154 154 -
chronosly-events-calendar/trunk/classes/chronosly_shortcode.php
r1286972 r1301303 383 383 break; 384 384 case "category": 385 if($args["single"] ) {385 if($args["single"] || ($args["id"] && !stripos($args["id"], ",") !== FALSE)) { 386 386 $cat = get_term($args["id"], "chronosly_category"); 387 387 … … 391 391 } 392 392 else { 393 if($args["id"]){ 394 $ids = array(); 395 if(is_array($args["id"])){ 396 397 foreach ($args["id"] as $id) { 398 $cat = get_term($id, "chronosly_category"); 399 $ids[]= $cat->slug; 400 } 401 } 402 else $ids = $args["id"]; 403 $q["chronosly_category"] = $ids; 404 } 393 405 $wp_query = new WP_Query($q); 394 406 include(Post_Type_Chronosly::chronosly_templates("shortcode_categories")); -
chronosly-events-calendar/trunk/classes/chronosly_widgets.php
r1157813 r1301303 15 15 $title = apply_filters( 'widget_title', $instance['title'] ); 16 16 // before and after widget arguments are defined by themes 17 17 18 echo $args['before_widget']; 18 19 if ( ! empty( $title ) ) echo $args['before_title'] . $title . $args['after_title']; 19 if($instance['type'] == "calendar" and !$instance[' month'] and !$instance['week']){20 if($instance['type'] == "calendar" and !$instance['year'] and !$instance['month'] and !$instance['week']){ 20 21 $instance['month'] = date("m"); 21 22 } … … 25 26 } 26 27 } 27 // This is where you run the code and display the output 28 // This is where you run the code and display the output 29 // echo '[chronosly '.$params.']'; 30 28 31 echo do_shortcode('[chronosly '.$params.']'); 29 32 echo $args['after_widget']; … … 65 68 if(!$instance["single"]){ 66 69 $year_style=1; 67 $upcoming_style = 1;70 if($instance["type"] == "event") $upcoming_style = 1; 68 71 $month_style=1; 69 72 $week_style=1; … … 75 78 76 79 77 }80 } 78 81 if($instance["type"] != "calendar"){ 79 82 // $single_style=1; … … 107 110 jQuery("#"+id+" .ch-widget-upcoming").hide(); 108 111 type = ch_lock; 109 console.log();110 112 if(type == "event" || type == "calendar" ){ 111 113 jQuery("#"+id+" .ch-widget-y").show(); … … 193 195 <option value="event" <?php if($instance["type"] == "event") echo "selected" ?>><?php _e("Events", "chronosly");?></option> 194 196 <option value="calendar" <?php if($instance["type"] == "calendar") echo "selected" ?>><?php _e("Calendar", "chronosly");?></option> 197 <option value="category" <?php if($instance["type"] == "category") echo "selected" ?>><?php _e("Categories", "chronosly");?></option> 195 198 <option value="organizer" <?php if($instance["type"] == "organizer") echo "selected" ?>><?php _e("Organizers", "chronosly");?></option> 196 199 <option value="place" <?php if($instance["type"] == "place") echo "selected" ?>><?php _e("Places", "chronosly");?></option> -
chronosly-events-calendar/trunk/post-types/post_type_chronosly.php
r1286972 r1301303 575 575 else { 576 576 $fromc = date("Y-m-d", strtotime("+1 week")); 577 $toc = date("Y-m-d"); 577 if($settings["chronosly_show_past_events"]) $toc = date("Y-m-d",strtotime("-1 week")); 578 else $toc = date("Y-m-d"); 578 579 } 579 580 … … 586 587 else { 587 588 $fromc = date("Y-m-d",strtotime("+$time day")); 588 $toc = date("Y-m-d"); 589 if($settings["chronosly_show_past_events"]) $toc = date("Y-m-d",strtotime("-$time day")); 590 else $toc = date("Y-m-d"); 589 591 } 590 592 } … … 1110 1112 1111 1113 1112 if( $settings["chronosly_show_past_events"] != 1or $from >= strtotime(date("Y-m-d"))) {1114 if(!$settings["chronosly_show_past_events"] or $from >= strtotime(date("Y-m-d"))) { 1113 1115 $pos = Post_Type_Chronosly::get_event_position($name,$meta, $id, $from, date("H", $from), date("i", $from)); 1114 1116 // echo $pos." "; … … 1508 1510 } 1509 1511 else if(is_tax("chronosly_tag") and !$chronosly_shortcode ){ 1510 if(!has_action( 'posts_orderby', array("Post_Type_Chronosly",'add_custom_orderby') )) add_action( 'posts_orderby', array("Post_Type_Chronosly",'add_custom_orderby') );1512 // if(!has_action( 'posts_orderby', array("Post_Type_Chronosly",'add_custom_orderby') )) add_action( 'posts_orderby', array("Post_Type_Chronosly",'add_custom_orderby') ); 1511 1513 if(!has_action( 'pre_get_posts', array("Post_Type_Chronosly",'add_custom_post_vars') )) add_action( 'pre_get_posts', array("Post_Type_Chronosly",'add_custom_post_vars') ); 1512 1514 return CHRONOSLY_PATH.DIRECTORY_SEPARATOR."templates".DIRECTORY_SEPARATOR.'single-tag-chronosly.php'; … … 1514 1516 else if((self::POST_TYPE === $custom_post_type and !$chronosly_shortcode) or $template == "shortcode_event" or $template == "shortcode_events"){ 1515 1517 if(is_archive() or $template == "shortcode_events"){ 1516 add_action( 'posts_orderby', array("Post_Type_Chronosly",'add_custom_orderby') );1518 // add_action( 'posts_orderby', array("Post_Type_Chronosly",'add_custom_orderby') ); 1517 1519 add_action( 'pre_get_posts', array("Post_Type_Chronosly",'add_custom_post_vars') ); 1518 1520 if($template != "shortcode_events" and file_exists(get_template_directory().DIRECTORY_SEPARATOR."archive-chronosly.php")) return get_template_directory().DIRECTORY_SEPARATOR."archive-chronosly.php"; … … 1560 1562 else if(("chronosly_calendar" === $custom_post_type and !$chronosly_shortcode) or $template == "shortcode_calendar") 1561 1563 { 1562 if(!has_action( 'posts_orderby', array("Post_Type_Chronosly",'add_custom_orderby') )) add_action( 'posts_orderby', array("Post_Type_Chronosly",'add_custom_orderby') );1564 // if(!has_action( 'posts_orderby', array("Post_Type_Chronosly",'add_custom_orderby') )) add_action( 'posts_orderby', array("Post_Type_Chronosly",'add_custom_orderby') ); 1563 1565 if($template != "shortcode_calendar" and file_exists(get_template_directory().DIRECTORY_SEPARATOR."calendar-chronosly.php")) return get_template_directory().DIRECTORY_SEPARATOR."calendar-chronosly.php"; 1564 1566 if($template != "shortcode_calendar" and file_exists(get_template_directory().DIRECTORY_SEPARATOR."chronosly.php")) return get_template_directory().DIRECTORY_SEPARATOR."chronosly.php";
Note: See TracChangeset
for help on using the changeset viewer.