fixed holiday misprint

This commit is contained in:
ivan 2020-06-18 12:01:08 +03:00
parent 37b2f5593b
commit 6c1eae64d7
1 changed files with 59 additions and 59 deletions

View File

@ -2,7 +2,7 @@
/* /*
Plugin Name: Discordian Date Function Plugin Name: Discordian Date Function
Plugin URI: https://is3.soundragon.su/discordian-date-function Plugin URI: https://is3.soundragon.su/discordian-date-function
Description: Convert dates in Wordpress to customizable Discordian dates and time (decimal). Also, this plugin provides shortcode and widget used to display the current erisian date with notification of 70 holydays. Based on the Discordian Date plugin by Dan Johnson. Description: Convert dates in Wordpress to customizable Discordian dates and time (decimal). Also, this plugin provides shortcode and widget used to display the current erisian date with notification of 70 holidays. Based on the Discordian Date plugin by Dan Johnson.
Version: 2.5 Version: 2.5
Author: ivan zlax Author: ivan zlax
Author URI: https://is3.soundragon.su/about Author URI: https://is3.soundragon.su/about
@ -163,117 +163,117 @@ class Discordian_Date_Widget extends WP_Widget {
$dday=($yday-(73*$dseason))+1; $dday=($yday-(73*$dseason))+1;
$a_holiday=array("Mungday", "Mojoday", "Syaday", "Zaraday", "Maladay"); $a_holiday=array("Mungday", "Mojoday", "Syaday", "Zaraday", "Maladay");
$s_holiday=array("Chaoflux", "Discoflux", "Confuflux", "Bureflux", "Afflux"); $s_holiday=array("Chaoflux", "Discoflux", "Confuflux", "Bureflux", "Afflux");
$m_holyday=array("Chaomas", "Discomas", "Confumas", "Buremas", "Afmas"); $m_holiday=array("Chaomas", "Discomas", "Confumas", "Buremas", "Afmas");
$t_holyday=array("Chaosloth", "Discosloth", "Confusloth", "Buresloth", "Afsloth"); $t_holiday=array("Chaosloth", "Discosloth", "Confusloth", "Buresloth", "Afsloth");
$e_holyday=array("Mungeye", "Mojeye", "Syadeye", "Zareye", "Maleye"); $e_holiday=array("Mungeye", "Mojeye", "Syadeye", "Zareye", "Maleye");
$holyday=""; $holiday="";
if ($dday==5) { if ($dday==5) {
$holyday = " Celebrate Apostle Day, ".$a_holiday[$dseason]."."; $holiday = " Celebrate Apostle Day, ".$a_holiday[$dseason].".";
} elseif ($dday==23) { } elseif ($dday==23) {
$holyday = " Celebrate Synaptyclypse Day, ".$m_holiday[$dseason]."."; $holiday = " Celebrate Synaptyclypse Day, ".$m_holiday[$dseason].".";
} elseif ($dday==27) { } elseif ($dday==27) {
$holyday = " Celebrate Sloth Day, ".$t_holiday[$dseason]."."; $holiday = " Celebrate Sloth Day, ".$t_holiday[$dseason].".";
} elseif ($dday==50) { } elseif ($dday==50) {
$holyday = " Celebrate Flux Day, ".$s_holiday[$dseason]."."; $holiday = " Celebrate Flux Day, ".$s_holiday[$dseason].".";
} elseif ($dday==73) { } elseif ($dday==73) {
$holyday = " Celebrate Eye Day, ".$e_holiday[$dseason]."."; $holiday = " Celebrate Eye Day, ".$e_holiday[$dseason].".";
} elseif ($mon==2 && $mday==29) { } elseif ($mon==2 && $mday==29) {
$holyday = " Celebrate St. Tib's Day."; $holiday = " Celebrate St. Tib's Day.";
} elseif ($dseason==0 && $dday==8) { } elseif ($dseason==0 && $dday==8) {
$holyday = " Celebrate Death of Emperor Norton."; $holiday = " Celebrate Death of Emperor Norton.";
} elseif ($dseason==0 && $dday==10) { } elseif ($dseason==0 && $dday==10) {
$holyday = " Celebrate Backwards/Binary Day."; $holiday = " Celebrate Backwards/Binary Day.";
} elseif ($dseason==0 && $dday==11) { } elseif ($dseason==0 && $dday==11) {
$holyday = " Celebrate RAW Day."; $holiday = " Celebrate RAW Day.";
} elseif ($dseason==0 && $dday==14) { } elseif ($dseason==0 && $dday==14) {
$holyday = " Celebrate Golden Apple Presentation Day."; $holiday = " Celebrate Golden Apple Presentation Day.";
} elseif ($dseason==0 && $dday==17) { } elseif ($dseason==0 && $dday==17) {
$holyday = " Celebrate Joshmas."; $holiday = " Celebrate Joshmas.";
} elseif ($dseason==0 && $dday==18) { } elseif ($dseason==0 && $dday==18) {
$holyday = " Celebrate Pat Pineapple Day."; $holiday = " Celebrate Pat Pineapple Day.";
} elseif ($dseason==0 && $dday==21) { } elseif ($dseason==0 && $dday==21) {
$holyday = " Celebrate Hug Day."; $holiday = " Celebrate Hug Day.";
} elseif ($dseason==0 && $dday==26) { } elseif ($dseason==0 && $dday==26) {
$holyday = " Celebrate Backwards Day (Traditional)."; $holiday = " Celebrate Backwards Day (Traditional).";
} elseif ($dseason==0 && $dday==37) { } elseif ($dseason==0 && $dday==37) {
$holyday = " Celebrate Aaron Burrs Birthday."; $holiday = " Celebrate Aaron Burrs Birthday.";
} elseif ($dseason==0 && $dday==49) { } elseif ($dseason==0 && $dday==49) {
$holyday = " Celebrate The Mary Day."; $holiday = " Celebrate The Mary Day.";
} elseif ($dseason==0 && $dday==51) { } elseif ($dseason==0 && $dday==51) {
$holyday = " Celebrate Pet Loving Day."; $holiday = " Celebrate Pet Loving Day.";
} elseif ($dseason==0 && $dday==69) { } elseif ($dseason==0 && $dday==69) {
$holyday = " Celebrate Head Chicken/Chicken Head Day."; $holiday = " Celebrate Head Chicken/Chicken Head Day.";
} elseif ($dseason==0 && $dday==72) { } elseif ($dseason==0 && $dday==72) {
$holyday = " Celebrate Daytime."; $holiday = " Celebrate Daytime.";
} elseif ($dseason==1 && $dday==4) { } elseif ($dseason==1 && $dday==4) {
$holyday = " Celebrate Grover Clevelands Birthday."; $holiday = " Celebrate Grover Clevelands Birthday.";
} elseif ($dseason==1 && $dday==11) { } elseif ($dseason==1 && $dday==11) {
$holyday = " Celebrate Discordians for Jesus/Love Your Neighbor Day."; $holiday = " Celebrate Discordians for Jesus/Love Your Neighbor Day.";
} elseif ($dseason==1 && $dday==18) { } elseif ($dseason==1 && $dday==18) {
$holyday = " Celebrate Fools Day."; $holiday = " Celebrate Fools Day.";
} elseif ($dseason==1 && $dday==19) { } elseif ($dseason==1 && $dday==19) {
$holyday = " Celebrate St. John the Blasphemists Day."; $holiday = " Celebrate St. John the Blasphemists Day.";
} elseif ($dseason==1 && $dday==34) { } elseif ($dseason==1 && $dday==34) {
$holyday = " Celebrate Omarmas."; $holiday = " Celebrate Omarmas.";
} elseif ($dseason==1 && $dday==43) { } elseif ($dseason==1 && $dday==43) {
$holyday = " Celebrate Universal Ordination Day."; $holiday = " Celebrate Universal Ordination Day.";
} elseif ($dseason==1 && $dday==68) { } elseif ($dseason==1 && $dday==68) {
$holyday = " Celebrate Mal-2mas."; $holiday = " Celebrate Mal-2mas.";
} elseif ($dseason==1 && $dday==70) { } elseif ($dseason==1 && $dday==70) {
$holyday = " Celebrate Jake Day Jr. (DJ)/Day of the Elppin."; $holiday = " Celebrate Jake Day Jr. (DJ)/Day of the Elppin.";
} elseif ($dseason==1 && $dday==72) { } elseif ($dseason==1 && $dday==72) {
$holyday = " Celebrate Towel Day."; $holiday = " Celebrate Towel Day.";
} elseif ($dseason==2 && $dday==26) { } elseif ($dseason==2 && $dday==26) {
$holyday = " Celebrate Imaginary Friend/Captain Tuttle Day."; $holiday = " Celebrate Imaginary Friend/Captain Tuttle Day.";
} elseif ($dseason==2 && $dday==28) { } elseif ($dseason==2 && $dday==28) {
$holyday = " Celebrate St. Georges Day."; $holiday = " Celebrate St. Georges Day.";
} elseif ($dseason==2 && $dday==30) { } elseif ($dseason==2 && $dday==30) {
$holyday = " Celebrate Zoog Day."; $holiday = " Celebrate Zoog Day.";
} elseif ($dseason==2 && $dday==36) { } elseif ($dseason==2 && $dday==36) {
$holyday = " Celebrate June 31st for Popes."; $holiday = " Celebrate June 31st for Popes.";
} elseif ($dseason==2 && $dday==37) { } elseif ($dseason==2 && $dday==37) {
$holyday = " Celebrate Mid-Years Day."; $holiday = " Celebrate Mid-Years Day.";
} elseif ($dseason==2 && $dday==40) { } elseif ($dseason==2 && $dday==40) {
$holyday = " Celebrate X-Day."; $holiday = " Celebrate X-Day.";
} elseif ($dseason==2 && $dday==55) { } elseif ($dseason==2 && $dday==55) {
$holyday = " Celebrate Mal-2 Day."; $holiday = " Celebrate Mal-2 Day.";
} elseif ($dseason==2 && $dday==57) { } elseif ($dseason==2 && $dday==57) {
$holyday = " Celebrate John Dillinger Day."; $holiday = " Celebrate John Dillinger Day.";
} elseif ($dseason==3 && $dday==3) { } elseif ($dseason==3 && $dday==3) {
$holyday = " Celebrate Multiversal Underwear Day."; $holiday = " Celebrate Multiversal Underwear Day.";
} elseif ($dseason==3 && $dday==18) { } elseif ($dseason==3 && $dday==18) {
$holyday = " Celebrate Festival of Hanky-Panky Spankies."; $holiday = " Celebrate Festival of Hanky-Panky Spankies.";
} elseif ($dseason==3 && $dday==33) { } elseif ($dseason==3 && $dday==33) {
$holyday = " Celebrate Cat Dancing & Pussyfoot Day."; $holiday = " Celebrate Cat Dancing & Pussyfoot Day.";
} elseif ($dseason==3 && $dday==37) { } elseif ($dseason==3 && $dday==37) {
$holyday = " Celebrate Mass of Planet Eris/Eristotle."; $holiday = " Celebrate Mass of Planet Eris/Eristotle.";
} elseif ($dseason==3 && $dday==39) { } elseif ($dseason==3 && $dday==39) {
$holyday = " Celebrate St. Mammes's Day."; $holiday = " Celebrate St. Mammes's Day.";
} elseif ($dseason==3 && $dday==41) { } elseif ($dseason==3 && $dday==41) {
$holyday = " Celebrate Emperor Norton Proclamation Day."; $holiday = " Celebrate Emperor Norton Proclamation Day.";
} elseif ($dseason==3 && $dday==57) { } elseif ($dseason==3 && $dday==57) {
$holyday = " Celebrate Shamlicht Kids Club Day."; $holiday = " Celebrate Shamlicht Kids Club Day.";
} elseif ($dseason==3 && $dday==59) { } elseif ($dseason==3 && $dday==59) {
$holyday = " Celebrate Gonkulator Day (Gonculator Day)."; $holiday = " Celebrate Gonkulator Day (Gonculator Day).";
} elseif ($dseason==3 && $dday==60) { } elseif ($dseason==3 && $dday==60) {
$holyday = " Celebrate Mad Hatter Day."; $holiday = " Celebrate Mad Hatter Day.";
} elseif ($dseason==3 && $dday==66) { } elseif ($dseason==3 && $dday==66) {
$holyday = " Celebrate Habeas Corpus Remembrance Day."; $holiday = " Celebrate Habeas Corpus Remembrance Day.";
} elseif ($dseason==4 && $dday==28) { } elseif ($dseason==4 && $dday==28) {
$holyday = " Celebrate Ek-sen-triks CluborGuild Day."; $holiday = " Celebrate Ek-sen-triks CluborGuild Day.";
} elseif ($dseason==4 && $dday==36) { } elseif ($dseason==4 && $dday==36) {
$holyday = " Celebrate Spanking Fest."; $holiday = " Celebrate Spanking Fest.";
} elseif ($dseason==4 && $dday==37) { } elseif ($dseason==4 && $dday==37) {
$holyday = " Celebrate 537 Day, sometimes Turkey Day."; $holiday = " Celebrate 537 Day, sometimes Turkey Day.";
} elseif ($dseason==4 && $dday==40) { } elseif ($dseason==4 && $dday==40) {
$holyday = " Celebrate Omars Day."; $holiday = " Celebrate Omars Day.";
} elseif ($dseason==4 && $dday==43) { } elseif ($dseason==4 && $dday==43) {
$holyday = " Celebrate Day D."; $holiday = " Celebrate Day D.";
} elseif ($dseason==4 && $dday==46) { } elseif ($dseason==4 && $dday==46) {
$holyday = " Celebrate Hug Day II."; $holiday = " Celebrate Hug Day II.";
} elseif ($dseason==4 && $dday==65) { } elseif ($dseason==4 && $dday==65) {
$holyday = " Celebrate Circlemas."; $holiday = " Celebrate Circlemas.";
} }
extract($args); extract($args);
@ -283,7 +283,7 @@ class Discordian_Date_Widget extends WP_Widget {
ob_start(); ob_start();
echo "<div class=\"discordian_date_func\" style=\"width:100%;text-align:center;font-size:18px;line-height:36px;padding-top:40px;padding-bottom:40px;\"> Today is "; echo "<div class=\"discordian_date_func\" style=\"width:100%;text-align:center;font-size:18px;line-height:36px;padding-top:40px;padding-bottom:40px;\"> Today is ";
echo get_ddate($content, $format, "now")."."; echo get_ddate($content, $format, "now").".";
if ($holyday) echo "<br><b>".$holyday."</b>"; if ($holiday) echo "<br><b>".$holiday."</b>";
echo "</div>"; echo "</div>";
$body2 = ob_get_contents(); $body2 = ob_get_contents();
ob_end_clean(); ob_end_clean();