Changeset 1519831
- Timestamp:
- 10/22/2016 12:02:40 PM (9 years ago)
- Location:
- chronosly-events-calendar/trunk
- Files:
-
- 12 edited
-
README.txt (modified) (1 diff)
-
chronosly.php (modified) (2 diffs)
-
classes/chronosly_shortcode.php (modified) (4 diffs)
-
classes/chronosly_widgets.php (modified) (1 diff)
-
post-types/post_type_chronosly.php (modified) (2 diffs)
-
post-types/post_type_chronosly_calendar.php (modified) (4 diffs)
-
post-types/post_type_chronosly_category.php (modified) (2 diffs)
-
templates/archive-category-chronosly.php (modified) (1 diff)
-
templates/archive-chronosly.php (modified) (1 diff)
-
templates/single-category-chronosly.php (modified) (1 diff)
-
templates/single-chronosly.php (modified) (1 diff)
-
templates/single-tag-chronosly.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
chronosly-events-calendar/trunk/README.txt
r1506517 r1519831 6 6 Requires at least: 3.1 7 7 Tested up to: 4.5.3 8 Stable tag: 2.5. 28 Stable tag: 2.5.3 9 9 License: GPLv2 10 10 -
chronosly-events-calendar/trunk/chronosly.php
r1506517 r1519831 4 4 * Plugin URI: https://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.5. 26 * Version: 2.5.3 7 7 * Author: Chronosly 8 8 * Author URI: https://www.chronosly.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.5. 2"); //debug mode28 define('CHRONOSLY_VERSION', "2.5.3"); //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_shortcode.php
r1452263 r1519831 51 51 'organizer' => 0,//filter for concret organizers, coma separated 52 52 'place' => 0,//filter for concret places,coma separated 53 'tag' => 0,//filter for concret places,coma separated 53 54 'navigation' => 0, //show navigation on top 54 55 'pagination' => 0, //show pagination on bottom … … 144 145 unset($_REQUEST["chcount"]); 145 146 unset($_REQUEST["category"]); 147 unset($_REQUEST["tag"]); 146 148 unset($_REQUEST["organizer"]); 147 149 unset($_REQUEST["place"]); … … 205 207 if($args["category"]) { 206 208 $_REQUEST["category"] = $args["category"]; 209 } 210 if($args["tag"]) { 211 $_REQUEST["tag"] = $args["tag"]; 207 212 } 208 213 if($args["organizer"]) { … … 302 307 $wp_query = new WP_Query($q); 303 308 // echo "<pre>";print_r($wp_query); 304 $repeated = Post_Type_Chronosly::get_events_repeated_by_date(-1, 1, $extra); 309 310 $repeated = Post_Type_Chronosly::get_events_repeated_by_date(-1, 1, $extra,$elementos); 305 311 $elementos = Post_Type_Chronosly::get_days_by_date($wp_query, $repeated, -1, 1); 306 312 // print_r($repeated); -
chronosly-events-calendar/trunk/classes/chronosly_widgets.php
r1464000 r1519831 6 6 class Chronosly_Widget extends WP_Widget { 7 7 8 function Chronosly_Widget() {8 public function Chronosly_Widget() { 9 9 // Instantiate the parent object 10 10 parent::__construct( "chronosly_widget", 'Chronosly Widget',array( 'description' => __( 'Chronosly widget for Events,Calendar, Organizers and Places', 'chronosly' ) )); -
chronosly-events-calendar/trunk/post-types/post_type_chronosly.php
r1500197 r1519831 653 653 654 654 } 655 if(isset($_REQUEST["tag"]) and $_REQUEST["tag"]){ 656 $cats = explode(",",$_REQUEST["tag"]); 657 $tax_query = array( 658 'relation' => 'OR', 659 array( 660 'taxonomy' => 'chronosly_tag', 661 'field' => 'slug', 662 'terms' => $cats 663 )); 664 if(!$return) $query->set('tax_query',$tax_query); 665 666 667 } 655 668 // if(has_action( 'pre_get_posts', array("Post_Type_Chronosly",'add_custom_post_vars') )) remove_action( 'pre_get_posts', array("Post_Type_Chronosly",'add_custom_post_vars') ); 656 669 // print_r($meta_query); … … 782 795 783 796 } 797 if(isset($_REQUEST["tag"]) and $_REQUEST["tag"]){ 798 $cats = explode(",",$_REQUEST["tag"]); 799 800 $args['tax_query'] = array( 801 'relation' => 'OR', 802 array( 803 'taxonomy' => 'chronosly_tag', 804 'field' => 'slug', 805 'terms' => $cats 806 )); 807 808 } 809 784 810 if ( is_user_logged_in() ) $args["post_status"] = array('publish', 'private'); 785 811 if($_REQUEST["ch-price-min"]) $args["post_meta_price_min"] = $_REQUEST["ch-price-min"]; -
chronosly-events-calendar/trunk/post-types/post_type_chronosly_calendar.php
r1506517 r1519831 503 503 504 504 switch($meta["ev-repeat"][0]){ 505 case "day":505 case "day": 506 506 507 507 $start = $end; 508 if($distance == 1 && $start < $start_min) $start = $start_min-(60*60*24); 509 // echo $start." ".$end_top."<br/>"; 510 // continue; 508 511 while($start < $end_top and $count){//mientras no estemos en el tope superior 509 512 $start += ($distance*60*60*24);//añadimos la distancia de dias … … 512 515 $endHours = $end + ($meta["ev-to-h"][0]*60*60) + ($meta["ev-to-m"][0]*60); 513 516 --$count; 514 while($start <= $end and $start <= $end_top){//rellenamos los dias de este tramo 517 if($distance != 1) { 518 while($start <= $end and $start <= $end_top){//rellenamos los dias de este tramo 519 if($start >= $start_min and ($endHours < $end_top or date('Y-m-d',$start) != date('Y-m-d',$endHours)) and ($settings["hide_past_on_calendar"] != 1 or $start>= strtotime(date("Y-m-d")))) { 520 521 $elements["days"][date('Y-m-d',$start)]["$pos"]= array("id" => $id, "start" => $start1, "end" => $end ); 522 } 523 $start = strtotime("+ 1 day",$start); 524 // echo date('Y-m-d',$start)." ".date('Y-m-d',$end)."<br/>"; 525 } 526 $start = strtotime("- 1 day",$start);//restamos un dia porque si no el ultimo dia no se cuenta al salir del bucle 527 } else { 528 515 529 if($start >= $start_min and ($endHours < $end_top or date('Y-m-d',$start) != date('Y-m-d',$endHours)) and ($settings["hide_past_on_calendar"] != 1 or $start>= strtotime(date("Y-m-d")))) { 516 530 517 531 $elements["days"][date('Y-m-d',$start)]["$pos"]= array("id" => $id, "start" => $start1, "end" => $end ); 518 532 } 519 $start = strtotime("+ 1 day",$start); 520 //echo date('Y-m-d',$start)." ".date('Y-m-d',$end)."<br/>"; 521 } 522 $start = strtotime("- 1 day",$start);//restamos un dia porque si no el ultimo dia no se cuenta al salir del bucle 533 } 523 534 } 524 535 … … 904 915 905 916 } 917 if(isset($_REQUEST["tag"]) and $_REQUEST["tag"]){ 918 $cats = explode(",",$_REQUEST["tag"]); 919 920 $args['tax_query'] = array( 921 'relation' => 'OR', 922 array( 923 'taxonomy' => 'chronosly_tag', 924 'field' => 'slug', 925 'terms' => $cats 926 )); 927 928 } 906 929 907 930 if( $_REQUEST["event_name"]) { … … 986 1009 987 1010 } 1011 if(isset($_REQUEST["tag"]) and $_REQUEST["tag"]){ 1012 $cats = explode(",",$_REQUEST["tag"]); 1013 1014 $args['tax_query'] = array( 1015 'relation' => 'OR', 1016 array( 1017 'taxonomy' => 'chronosly_tag', 1018 'field' => 'slug', 1019 'terms' => $cats 1020 )); 1021 1022 } 988 1023 if ( is_user_logged_in() ) $args["post_status"] = array('publish', 'private'); 989 1024 -
chronosly-events-calendar/trunk/post-types/post_type_chronosly_category.php
r1452263 r1519831 107 107 //exit; 108 108 } else { 109 if(get_query_var("chronosly_category") == "list_all_cats") include(CHRONOSLY_PATH.DIRECTORY_SEPARATOR."templates".DIRECTORY_SEPARATOR.'archive-category-chronosly.php'); 109 if(get_query_var("chronosly_category") == "list_all_cats") { 110 if(file_exists(get_template_directory().DIRECTORY_SEPARATOR."archive-category-chronosly.php")) include(get_template_directory().DIRECTORY_SEPARATOR."archive-category-chronosly.php"); 111 else if(file_exists(get_template_directory().DIRECTORY_SEPARATOR."chronosly.php")) include(get_template_directory().DIRECTORY_SEPARATOR."chronosly.php"); 112 else include(CHRONOSLY_PATH.DIRECTORY_SEPARATOR."templates".DIRECTORY_SEPARATOR.'archive-category-chronosly.php'); 113 } 110 114 else { 111 115 add_action( 'pre_get_posts', array("Post_Type_Chronosly",'add_custom_post_vars') ); 112 include(CHRONOSLY_PATH.DIRECTORY_SEPARATOR."templates".DIRECTORY_SEPARATOR.'single-category-chronosly.php'); 116 if(file_exists(get_template_directory().DIRECTORY_SEPARATOR."single-category-chronosly.php")) include(get_template_directory().DIRECTORY_SEPARATOR."single-category-chronosly.php"); 117 else if(file_exists(get_template_directory().DIRECTORY_SEPARATOR."chronosly.php")) include(get_template_directory().DIRECTORY_SEPARATOR."chronosly.php"); 118 else include(CHRONOSLY_PATH.DIRECTORY_SEPARATOR."templates".DIRECTORY_SEPARATOR.'single-category-chronosly.php'); 113 119 } 114 120 exit; … … 403 409 //drag and drop 7 404 410 //get custom templates 405 if ($handle = opendir(CHRONOSLY_TEMPLATES_PATH.DIRECTORY_SEPARATOR."dad11".DIRECTORY_SEPARATOR)) { 411 if ($handle = opendir(CHRONOSLY_PATH.DIRECTORY_SEPARATOR."custom-templates".DIRECTORY_SEPARATOR."dad11".DIRECTORY_SEPARATOR)) { 412 406 413 while (false !== ($entry = readdir($handle))) { 407 414 if($entry != "." and $entry != "..") $custom_templates[] = str_replace(".php", "",$entry); -
chronosly-events-calendar/trunk/templates/archive-category-chronosly.php
r1403380 r1519831 157 157 } else { 158 158 echo '<div class="ch-error" style="'.$stilo.'">'; 159 _e("No events found" );159 _e("No events found", "chronosly"); 160 160 echo '</div>'; 161 161 } -
chronosly-events-calendar/trunk/templates/archive-chronosly.php
r1435498 r1519831 223 223 } else{ 224 224 echo '<div class="ch-error" style="'.$stilo.'">'; 225 _e("No events found" );225 _e("No events found", "chronosly"); 226 226 echo '</div>'; 227 227 } -
chronosly-events-calendar/trunk/templates/single-category-chronosly.php
r1435498 r1519831 121 121 } else { 122 122 $res = '<div class="ch-error" style="'.$stilo.'">'; 123 $res .= __("No events found" );123 $res .= __("No events found", "chronosly"); 124 124 $res .= '</div>'; 125 125 } -
chronosly-events-calendar/trunk/templates/single-chronosly.php
r1403380 r1519831 90 90 } else { 91 91 echo '<div class="ch-error" style="'.$stilo.'">'; 92 _e("No events found" );92 _e("No events found", "chronosly"); 93 93 echo '</div>'; 94 94 } -
chronosly-events-calendar/trunk/templates/single-tag-chronosly.php
r1403380 r1519831 93 93 } else { 94 94 echo '<div class="ch-error" style="'.$stilo.'">'; 95 _e("No events found" );95 _e("No events found", "chronosly"); 96 96 echo '</div>'; 97 97 }
Note: See TracChangeset
for help on using the changeset viewer.