Whoops \ Exception \ ErrorException (E_WARNING)
Use of undefined constant free - assumed 'free' (this will throw an Error in a future version of PHP) Whoops\Exception\ErrorException thrown with message "Use of undefined constant free - assumed 'free' (this will throw an Error in a future version of PHP)" Stacktrace: #17 Whoops\Exception\ErrorException in /www/newtheastrologercom_455/public/wp-content/plugins/global-content-blocks-bk/global-content-blocks.php:248 #16 Whoops\Run:handleError in /www/newtheastrologercom_455/public/wp-content/plugins/global-content-blocks-bk/global-content-blocks.php:248 #15 eval in /www/newtheastrologercom_455/public/wp-content/plugins/global-content-blocks-bk/global-content-blocks.php:248 #14 gcb in /www/newtheastrologercom_455/public/wp-content/plugins/global-content-blocks-bk/global-content-blocks.php:221 #13 gcb_shortcode_replacer in /www/newtheastrologercom_455/public/wp-includes/shortcodes.php:319 #12 do_shortcode_tag in [internal]:0 #11 preg_replace_callback in /www/newtheastrologercom_455/public/wp-includes/shortcodes.php:197 #10 do_shortcode in /www/newtheastrologercom_455/public/wp-includes/class-wp-hook.php:286 #9 WP_Hook:apply_filters in /www/newtheastrologercom_455/public/wp-includes/plugin.php:203 #8 apply_filters in /www/newtheastrologercom_455/public/wp-includes/post-template.php:240 #7 the_content in /www/newtheastrologercom_455/public/wp-content/themes/bb-theme-child/content-page.php:23 #6 require in /www/newtheastrologercom_455/public/wp-includes/template.php:690 #5 load_template in /www/newtheastrologercom_455/public/wp-includes/template.php:647 #4 locate_template in /www/newtheastrologercom_455/public/wp-includes/general-template.php:155 #3 get_template_part in /www/newtheastrologercom_455/public/wp-content/themes/bb-theme/tpl-no-header-footer.php:20 #2 include in /www/newtheastrologercom_455/public/wp-includes/template-loader.php:74 #1 require_once in /www/newtheastrologercom_455/public/wp-blog-header.php:19 #0 require in /www/newtheastrologercom_455/public/index.php:17
Stack frames (18)
17
Whoops
\
Exception
\
ErrorException
/
www
/
newtheastrologercom_455
/
public
/
wp-content
/
plugins
/
global-content-blocks-bk
/
global-content-blocks.php
248
16
Whoops
\
Run
handleError
/
www
/
newtheastrologercom_455
/
public
/
wp-content
/
plugins
/
global-content-blocks-bk
/
global-content-blocks.php
248
15
eval
/
www
/
newtheastrologercom_455
/
public
/
wp-content
/
plugins
/
global-content-blocks-bk
/
global-content-blocks.php
248
14
gcb
/
www
/
newtheastrologercom_455
/
public
/
wp-content
/
plugins
/
global-content-blocks-bk
/
global-content-blocks.php
221
13
gcb_shortcode_replacer
/
www
/
newtheastrologercom_455
/
public
/
wp-includes
/
shortcodes.php
319
12
do_shortcode_tag
[internal]
0
11
preg_replace_callback
/
www
/
newtheastrologercom_455
/
public
/
wp-includes
/
shortcodes.php
197
10
do_shortcode
/
www
/
newtheastrologercom_455
/
public
/
wp-includes
/
class-wp-hook.php
286
9
WP_Hook
apply_filters
/
www
/
newtheastrologercom_455
/
public
/
wp-includes
/
plugin.php
203
8
apply_filters
/
www
/
newtheastrologercom_455
/
public
/
wp-includes
/
post-template.php
240
7
the_content
/
www
/
newtheastrologercom_455
/
public
/
wp-content
/
themes
/
bb-theme-child
/
content-page.php
23
6
require
/
www
/
newtheastrologercom_455
/
public
/
wp-includes
/
template.php
690
5
load_template
/
www
/
newtheastrologercom_455
/
public
/
wp-includes
/
template.php
647
4
locate_template
/
www
/
newtheastrologercom_455
/
public
/
wp-includes
/
general-template.php
155
3
get_template_part
/
www
/
newtheastrologercom_455
/
public
/
wp-content
/
themes
/
bb-theme
/
tpl-no-header-footer.php
20
2
include
/
www
/
newtheastrologercom_455
/
public
/
wp-includes
/
template-loader.php
74
1
require_once
/
www
/
newtheastrologercom_455
/
public
/
wp-blog-header.php
19
0
require
/
www
/
newtheastrologercom_455
/
public
/
index.php
17
/
www
/
newtheastrologercom_455
/
public
/
wp-content
/
plugins
/
global-content-blocks-bk
/
global-content-blocks.php
        if(is_numeric($id)) {     
            $entry = gcb::get_entry_by_id(intval($id));
        } else {
            $entry = gcb::get_entry_by_custom_id($id);
        }        
    
        if(is_array($entry)) {            
            $content = htmlspecialchars_decode(stripslashes($entry['value']));
            
            //process the attributes
            if(is_array($attributes)&& count($attributes)){
                foreach($attributes as $attribute_key=>$attribute_value){
                    $content = str_replace("%%".$attribute_key."%%",$attribute_value,$content);
                }
            }            
            
            if($entry['type'] == "php") {
                //execute the php code
                ob_start();
                $result = eval(" ".$content);
                $output = ob_get_contents();
                ob_end_clean();
                
                return apply_filters('gcb_block_output', do_shortcode($output . $result));//run the shortcodes as well
            }
            elseif($entry['type'] == "html") {   // alloyphoto: enable PHP code in < ?php ... ? > tags inside blocks
                ob_start();
                eval("?>$content<?php ");
                $output = ob_get_contents();
                ob_end_clean();
                
                return apply_filters('gcb_block_output', do_shortcode($output));//run the shortcodes as well
            }
            else {
                return apply_filters('gcb_block_output', do_shortcode($content));//make sure we also run the shortcodes in here
            }
        }
        else
        {   return "";    }
    }
Arguments
  1. "Use of undefined constant free - assumed 'free' (this will throw an Error in a future version of PHP)"
    
/
www
/
newtheastrologercom_455
/
public
/
wp-content
/
plugins
/
global-content-blocks-bk
/
global-content-blocks.php
        if(is_numeric($id)) {     
            $entry = gcb::get_entry_by_id(intval($id));
        } else {
            $entry = gcb::get_entry_by_custom_id($id);
        }        
    
        if(is_array($entry)) {            
            $content = htmlspecialchars_decode(stripslashes($entry['value']));
            
            //process the attributes
            if(is_array($attributes)&& count($attributes)){
                foreach($attributes as $attribute_key=>$attribute_value){
                    $content = str_replace("%%".$attribute_key."%%",$attribute_value,$content);
                }
            }            
            
            if($entry['type'] == "php") {
                //execute the php code
                ob_start();
                $result = eval(" ".$content);
                $output = ob_get_contents();
                ob_end_clean();
                
                return apply_filters('gcb_block_output', do_shortcode($output . $result));//run the shortcodes as well
            }
            elseif($entry['type'] == "html") {   // alloyphoto: enable PHP code in < ?php ... ? > tags inside blocks
                ob_start();
                eval("?>$content<?php ");
                $output = ob_get_contents();
                ob_end_clean();
                
                return apply_filters('gcb_block_output', do_shortcode($output));//run the shortcodes as well
            }
            else {
                return apply_filters('gcb_block_output', do_shortcode($content));//make sure we also run the shortcodes in here
            }
        }
        else
        {   return "";    }
    }
Arguments
  1. 2
    
  2. "Use of undefined constant free - assumed 'free' (this will throw an Error in a future version of PHP)"
    
  3. "/www/newtheastrologercom_455/public/wp-content/plugins/global-content-blocks-bk/global-content-blocks.php(248) : eval()'d code"
    
  4. 56
    
  5. array:14 [
      "id" => "calendar-grid-responsive-dev"
      "attributes" => array:3 [
        "id" => "calendar-grid-responsive-dev"
        "month_year" => "current"
        "cal_type" => "free"
      ]
      "entry" => array:6 [
        "name" => "Calendar Grid - Responsive - DEV"
        "description" => ""
        "value" => """
          // Usage: [contentblock id=calendar-grid-responsive-dev cal_type=free month_year=October_2019]\r\n
          \r\n
          date_default_timezone_set(\'UTC\');\r\n
          \r\n
          // =========================================\r\n
          \r\n
          // GET PARAMETERS / URL QUERY STRINGS\r\n
          \r\n
          $getUtcOffset = htmlspecialchars($_GET[\'utc\']);\r\n
          \r\n
          $getPlusMonth = htmlspecialchars($_GET[\'pm\']);\r\n
          \r\n
          $getBD = htmlspecialchars($_GET[\'id\']);\r\n
          \r\n
          // USER META FIELDS\r\n
          \r\n
          // Get user first and last name\r\n
          \r\n
          $userInfo = wp_get_current_user();\r\n
          $userFullName = $userInfo-&gt;user_firstname.\' \'.$userInfo-&gt;user_lastname;\r\n
          \r\n
          // Get UTC offset from WP user meta via Toolset\r\n
          \r\n
          $userUtcOffset = types_render_usermeta( \&quot;utc-offset\&quot;, array( \&quot;user_current\&quot; =&gt; true, \&quot;output\&quot; =&gt; \&quot;raw\&quot; ) );\r\n
          \r\n
          // Trim last character\r\n
          $userUtcOffset = substr($userUtcOffset, 0, -1);\r\n
          \r\n
          // Get Date of Birth from WP user meta via Toolset\r\n
          \r\n
          $dateOfBirth = types_render_usermeta( \&quot;date-of-birth\&quot;, array( \&quot;user_current\&quot; =&gt; true ) );\r\n
           \r\n
          if ( empty($dateOfBirth) ) {\r\n
          \r\n
            // Assume DOB of member is August 15, 1967\r\n
          \r\n
            $dateOfBirth = \'08/15/1967\';\r\n
          \r\n
          } else {}\r\n
          \r\n
          if ( !empty( $getBD ) ) {\r\n
          \r\n
            $dateOfBirthUnix = $getBD;\r\n
            \r\n
          } else {\r\n
            \r\n
            $dateOfBirthUnix = strtotime($dateOfBirth);\r\n
            $dateOfBirthUnix = substr($dateOfBirthUnix, 0, -2);\r\n
            $dateOfBirthUnix = str_replace(\&quot;-\&quot;,\&quot;b\&quot;,$dateOfBirthUnix);\r\n
          \r\n
          }\r\n
          \r\n
          // SHORTCODE PARAMETERS\r\n
          \r\n
          // \'free\' or \'paid\'\r\n
          $calType = %%cal_type%%;\r\n
          \r\n
          // e.g. \'August_2018\'\r\n
          $monthYearInput = %%month_year%%;\r\n
          \r\n
          // $cachedDataCheck = \'&lt;div style=\&quot;font-size:14px;\&quot;&gt;\';\r\n
          \r\n
          // =========================================\r\n
          \r\n
          // If no UTC offset value is defined in user meta or in URL query parameter, present a form where users can choose one\r\n
          \r\n
          if ( ( empty($userUtcOffset) ) &amp;&amp; ( empty($getUtcOffset) ) &amp;&amp; ( $calType == \'free\' ) ) {\r\n
          \r\n
            $calendarForm = \'&lt;form action=\&quot;\&quot; method=\&quot;GET\&quot;&gt;\';\r\n
          \r\n
            if ( !empty($dateOfBirthUnix) ) {\r\n
          \r\n
              $calendarForm .= \'&lt;input id=\&quot;id\&quot; type=\&quot;hidden\&quot; name=\&quot;id\&quot; value=\&quot;\'.$dateOfBirthUnix.\'\&quot;/&gt;\';\r\n
          \r\n
            }\r\n
          \r\n
            $calendarForm .= \'&lt;div class=\&quot;row fields-row\&quot;&gt;\';\r\n
          \r\n
            $calendarForm .= \'&lt;div class=\&quot;col-lg-6\&quot;&gt;\';\r\n
            $calendarForm .= \'&lt;div class=\&quot;form-group\&quot;&gt;\';\r\n
            $calendarForm .= \'&lt;label for=\&quot;utc\&quot;&gt;To view the calendar, please select your timezone:&lt;/label&gt;\';\r\n
            $calendarForm .= \'&lt;select id=\&quot;utc\&quot; name=\&quot;utc\&quot;&gt;\r\n
                                &lt;option value=\&quot;\&quot;&gt;Please choose&lt;/option&gt;\r\n
                                &lt;option value=\&quot;-12\&quot;&gt;(UTC−12:00) International Date Line West&lt;/option&gt;\r\n
                                &lt;option value=\&quot;-11\&quot;&gt;(UTC−11:00) Coordinated Universal Time-11&lt;/option&gt;\r\n
                                &lt;option value=\&quot;-10\&quot;&gt;(UTC−10:00) Aleutian Islands&lt;/option&gt;\r\n
                                &lt;option value=\&quot;-10\&quot;&gt;(UTC−10:00) Hawaii&lt;/option&gt;\r\n
                                &lt;option value=\&quot;-9.5\&quot;&gt;(UTC−09:30) Marquesas Islands&lt;/option&gt;\r\n
                                &lt;option value=\&quot;-9\&quot;&gt;(UTC−09:00) Alaska&lt;/option&gt;\r\n
                                &lt;option value=\&quot;-9\&quot;&gt;(UTC−09:00) Coordinated Universal Time-09&lt;/option&gt;\r\n
                                &lt;option value=\&quot;-8\&quot;&gt;(UTC−08:00) Baja California&lt;/option&gt;\r\n
                                &lt;option value=\&quot;-8\&quot;&gt;(UTC−08:00) Coordinated Universal Time-08&lt;/option&gt;\r\n
                                &lt;option value=\&quot;-8\&quot;&gt;(UTC−08:00) Pacific Time (US &amp; Canada)&lt;/option&gt;\r\n
                                &lt;option value=\&quot;-7\&quot;&gt;(UTC−07:00) Arizona&lt;/option&gt;\r\n
                                &lt;option value=\&quot;-7\&quot;&gt;(UTC−07:00) Chihuahua, La Paz, Mazatlan&lt;/option&gt;\r\n
                                &lt;option value=\&quot;-7\&quot;&gt;(UTC−07:00) Mountain Time (US &amp; Canada)&lt;/option&gt;\r\n
                                &lt;option value=\&quot;-6\&quot;&gt;(UTC−06:00) Central America&lt;/option&gt;\r\n
                                &lt;option value=\&quot;-6\&quot;&gt;(UTC−06:00) Central Time (US &amp; Canada)&lt;/option&gt;\r\n
                                &lt;option value=\&quot;-6\&quot;&gt;(UTC−06:00) Easter Island&lt;/option&gt;\r\n
                                &lt;option value=\&quot;-6\&quot;&gt;(UTC−06:00) Guadalajara, Mexico City, Monterrey&lt;/option&gt;\r\n
                                &lt;option value=\&quot;-6\&quot;&gt;(UTC−06:00) Saskatchewan&lt;/option&gt;\r\n
                                &lt;option value=\&quot;-5\&quot;&gt;(UTC−05:00) Bogota, Lima, Quito, Rio Branco&lt;/option&gt;\r\n
                                &lt;option value=\&quot;-5\&quot;&gt;(UTC−05:00) Chetumal&lt;/option&gt;\r\n
                                &lt;option value=\&quot;-5\&quot;&gt;(UTC−05:00) Eastern Time (US &amp; Canada)&lt;/option&gt;\r\n
                                &lt;option value=\&quot;-5\&quot;&gt;(UTC−05:00) Haiti&lt;/option&gt;\r\n
                                &lt;option value=\&quot;-5\&quot;&gt;(UTC−05:00) Havana&lt;/option&gt;\r\n
                                &lt;option value=\&quot;-5\&quot;&gt;(UTC−05:00) Indiana (East)&lt;/option&gt;\r\n
                                &lt;option value=\&quot;-5\&quot;&gt;(UTC−05:00) Turks and Caicos&lt;/option&gt;\r\n
                                &lt;option value=\&quot;-4\&quot;&gt;(UTC−04:00) Asuncion&lt;/option&gt;\r\n
                                &lt;option value=\&quot;-4\&quot;&gt;(UTC−04:00) Atlantic Time (Canada)&lt;/option&gt;\r\n
                                &lt;option value=\&quot;-4\&quot;&gt;(UTC−04:00) Caracas&lt;/option&gt;\r\n
                                &lt;option value=\&quot;-4\&quot;&gt;(UTC−04:00) Cuiaba&lt;/option&gt;\r\n
                                &lt;option value=\&quot;-4\&quot;&gt;(UTC−04:00) Georgetown, La Paz, Manaus, San Juan&lt;/option&gt;\r\n
                                &lt;option value=\&quot;-4\&quot;&gt;(UTC−04:00) Santiago&lt;/option&gt;\r\n
                                &lt;option value=\&quot;-3.5\&quot;&gt;(UTC−03:30) Newfoundland&lt;/option&gt;\r\n
                                &lt;option value=\&quot;-3\&quot;&gt;(UTC−03:00) Araguaina&lt;/option&gt;\r\n
                                &lt;option value=\&quot;-3\&quot;&gt;(UTC−03:00) Brasilia&lt;/option&gt;\r\n
                                &lt;option value=\&quot;-3\&quot;&gt;(UTC−03:00) Cayenne, Fortaleza&lt;/option&gt;\r\n
                                &lt;option value=\&quot;-3\&quot;&gt;(UTC−03:00) City of Buenos Aires&lt;/option&gt;\r\n
                                &lt;option value=\&quot;-3\&quot;&gt;(UTC−03:00) Greenland&lt;/option&gt;\r\n
                                &lt;option value=\&quot;-3\&quot;&gt;(UTC−03:00) Montevideo&lt;/option&gt;\r\n
                                &lt;option value=\&quot;-3\&quot;&gt;(UTC−03:00) Punta Arenas&lt;/option&gt;\r\n
                                &lt;option value=\&quot;-3\&quot;&gt;(UTC−03:00) Saint Pierre and Miquelon&lt;/option&gt;\r\n
                                &lt;option value=\&quot;-3\&quot;&gt;(UTC−03:00) Salvador&lt;/option&gt;\r\n
                                &lt;option value=\&quot;-2\&quot;&gt;(UTC−02:00) Coordinated Universal Time-02&lt;/option&gt;\r\n
                                &lt;option value=\&quot;-1\&quot;&gt;(UTC−01:00) Azores&lt;/option&gt;\r\n
                                &lt;option value=\&quot;-1\&quot;&gt;(UTC−01:00) Cabo Verde Is.&lt;/option&gt;\r\n
                                &lt;option value=\&quot;0\&quot;&gt;(UTC) Coordinated Universal Time&lt;/option&gt;\r\n
                                &lt;option value=\&quot;0\&quot;&gt;(UTC+00:00) Casablanca&lt;/option&gt;\r\n
                                &lt;option value=\&quot;0\&quot;&gt;(UTC+00:00) Dublin, Edinburgh, Lisbon, London&lt;/option&gt;\r\n
                                &lt;option value=\&quot;0\&quot;&gt;(UTC+00:00) Monrovia, Reykjavik&lt;/option&gt;\r\n
                                &lt;option value=\&quot;1\&quot;&gt;(UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna&lt;/option&gt;\r\n
                                &lt;option value=\&quot;1\&quot;&gt;(UTC+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague&lt;/option&gt;\r\n
                                &lt;option value=\&quot;1\&quot;&gt;(UTC+01:00) Brussels, Copenhagen, Madrid, Paris&lt;/option&gt;\r\n
                                &lt;option value=\&quot;1\&quot;&gt;(UTC+01:00) Sao Tome&lt;/option&gt;\r\n
                                &lt;option value=\&quot;1\&quot;&gt;(UTC+01:00) Sarajevo, Skopje, Warsaw, Zagreb&lt;/option&gt;\r\n
                                &lt;option value=\&quot;1\&quot;&gt;(UTC+01:00) West Central Africa&lt;/option&gt;\r\n
                                &lt;option value=\&quot;2\&quot;&gt;(UTC+02:00) Amman&lt;/option&gt;\r\n
                                &lt;option value=\&quot;2\&quot;&gt;(UTC+02:00) Athens, Bucharest&lt;/option&gt;\r\n
                                &lt;option value=\&quot;2\&quot;&gt;(UTC+02:00) Beirut&lt;/option&gt;\r\n
                                &lt;option value=\&quot;2\&quot;&gt;(UTC+02:00) Cairo&lt;/option&gt;\r\n
                                &lt;option value=\&quot;2\&quot;&gt;(UTC+02:00) Chisinau&lt;/option&gt;\r\n
                                &lt;option value=\&quot;2\&quot;&gt;(UTC+02:00) Damascus&lt;/option&gt;\r\n
                                &lt;option value=\&quot;2\&quot;&gt;(UTC+02:00) Gaza, Hebron&lt;/option&gt;\r\n
                                &lt;option value=\&quot;2\&quot;&gt;(UTC+02:00) Harare, Pretoria&lt;/option&gt;\r\n
                                &lt;option value=\&quot;2\&quot;&gt;(UTC+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius&lt;/option&gt;\r\n
                                &lt;option value=\&quot;2\&quot;&gt;(UTC+02:00) Jerusalem&lt;/option&gt;\r\n
                                &lt;option value=\&quot;2\&quot;&gt;(UTC+02:00) Kaliningrad&lt;/option&gt;\r\n
                                &lt;option value=\&quot;2\&quot;&gt;(UTC+02:00) Khartoum&lt;/option&gt;\r\n
                                &lt;option value=\&quot;2\&quot;&gt;(UTC+02:00) Tripoli&lt;/option&gt;\r\n
                                &lt;option value=\&quot;2\&quot;&gt;(UTC+02:00) Windhoek&lt;/option&gt;\r\n
                                &lt;option value=\&quot;3\&quot;&gt;(UTC+03:00) Baghdad&lt;/option&gt;\r\n
                                &lt;option value=\&quot;3\&quot;&gt;(UTC+03:00) Istanbul&lt;/option&gt;\r\n
                                &lt;option value=\&quot;3\&quot;&gt;(UTC+03:00) Kuwait, Riyadh&lt;/option&gt;\r\n
                                &lt;option value=\&quot;3\&quot;&gt;(UTC+03:00) Minsk&lt;/option&gt;\r\n
                                &lt;option value=\&quot;3\&quot;&gt;(UTC+03:00) Moscow St. Petersburg, Volgograd&lt;/option&gt;\r\n
                                &lt;option value=\&quot;3\&quot;&gt;(UTC+03:00) Nairobi&lt;/option&gt;\r\n
                                &lt;option value=\&quot;3.5\&quot;&gt;(UTC+03:30) Tehran&lt;/option&gt;\r\n
                                &lt;option value=\&quot;4\&quot;&gt;(UTC+04:00) Abu Dhabi, Muscat&lt;/option&gt;\r\n
                                &lt;option value=\&quot;4\&quot;&gt;(UTC+04:00) Astrakhan, Ulyanovsk&lt;/option&gt;\r\n
                                &lt;option value=\&quot;4\&quot;&gt;(UTC+04:00) Baku&lt;/option&gt;\r\n
                                &lt;option value=\&quot;4\&quot;&gt;(UTC+04:00) Izhevsk, Samara&lt;/option&gt;\r\n
                                &lt;option value=\&quot;4\&quot;&gt;(UTC+04:00) Port Louis&lt;/option&gt;\r\n
                                &lt;option value=\&quot;4\&quot;&gt;(UTC+04:00) Saratov&lt;/option&gt;\r\n
                                &lt;option value=\&quot;4\&quot;&gt;(UTC+04:00) Tbilisi&lt;/option&gt;\r\n
                                &lt;option value=\&quot;4\&quot;&gt;(UTC+04:00) Yerevan&lt;/option&gt;\r\n
                                &lt;option value=\&quot;4.5\&quot;&gt;(UTC+04:30) Kabul&lt;/option&gt;\r\n
                                &lt;option value=\&quot;5\&quot;&gt;(UTC+05:00) Ashgabat, Tashkent&lt;/option&gt;\r\n
                                &lt;option value=\&quot;5\&quot;&gt;(UTC+05:00) Ekaterinburg&lt;/option&gt;\r\n
                                &lt;option value=\&quot;5\&quot;&gt;(UTC+05:00) Islamabad, Karachi&lt;/option&gt;\r\n
                                &lt;option value=\&quot;5.5\&quot;&gt;(UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi&lt;/option&gt;\r\n
                                &lt;option value=\&quot;5.5\&quot;&gt;(UTC+05:30) Sri Jayawardenepura&lt;/option&gt;\r\n
                                &lt;option value=\&quot;5.75\&quot;&gt;(UTC+05:45) Kathmandu&lt;/option&gt;\r\n
                                &lt;option value=\&quot;6\&quot;&gt;(UTC+06:00) Astana&lt;/option&gt;\r\n
                                &lt;option value=\&quot;6\&quot;&gt;(UTC+06:00) Dhaka&lt;/option&gt;\r\n
                                &lt;option value=\&quot;6\&quot;&gt;(UTC+06:00) Omsk&lt;/option&gt;\r\n
                                &lt;option value=\&quot;6.5\&quot;&gt;(UTC+06:30) Yangon (Rangoon)&lt;/option&gt;\r\n
                                &lt;option value=\&quot;7\&quot;&gt;(UTC+07:00) Bangkok, Hanoi, Jakarta&lt;/option&gt;\r\n
                                &lt;option value=\&quot;7\&quot;&gt;(UTC+07:00) Barnaul, Gorno-Altaysk&lt;/option&gt;\r\n
                                &lt;option value=\&quot;7\&quot;&gt;(UTC+07:00) Hovd&lt;/option&gt;\r\n
                                &lt;option value=\&quot;7\&quot;&gt;(UTC+07:00) Krasnoyarsk&lt;/option&gt;\r\n
                                &lt;option value=\&quot;7\&quot;&gt;(UTC+07:00) Novosibirsk&lt;/option&gt;\r\n
                                &lt;option value=\&quot;7\&quot;&gt;(UTC+07:00) Tomsk&lt;/option&gt;\r\n
                                &lt;option value=\&quot;8\&quot;&gt;(UTC+08:00) Beijing, Chongqing, Hong Kong, Urumqi&lt;/option&gt;\r\n
                                &lt;option value=\&quot;8\&quot;&gt;(UTC+08:00) Irkutsk&lt;/option&gt;\r\n
                                &lt;option value=\&quot;8\&quot;&gt;(UTC+08:00) Kuala Lumpur, Singapore&lt;/option&gt;\r\n
                                &lt;option value=\&quot;8\&quot;&gt;(UTC+08:00) Perth&lt;/option&gt;\r\n
                                &lt;option value=\&quot;8\&quot;&gt;(UTC+08:00) Taipei&lt;/option&gt;\r\n
                                &lt;option value=\&quot;8\&quot;&gt;(UTC+08:00) Ulaanbaatar&lt;/option&gt;\r\n
                                &lt;option value=\&quot;8.75\&quot;&gt;(UTC+08:45) Eucla&lt;/option&gt;\r\n
                                &lt;option value=\&quot;9\&quot;&gt;(UTC+09:00) Chita&lt;/option&gt;\r\n
                                &lt;option value=\&quot;9\&quot;&gt;(UTC+09:00) Osaka, Sapporo, Tokyo&lt;/option&gt;\r\n
                                &lt;option value=\&quot;9\&quot;&gt;(UTC+09:00) Pyongyang&lt;/option&gt;\r\n
                                &lt;option value=\&quot;9\&quot;&gt;(UTC+09:00) Seoul&lt;/option&gt;\r\n
                                &lt;option value=\&quot;9\&quot;&gt;(UTC+09:00) Yakutsk&lt;/option&gt;\r\n
                                &lt;option value=\&quot;9.5\&quot;&gt;(UTC+09:30) Adelaide&lt;/option&gt;\r\n
                                &lt;option value=\&quot;9.5\&quot;&gt;(UTC+09:30) Darwin&lt;/option&gt;\r\n
                                &lt;option value=\&quot;10\&quot;&gt;(UTC+10:00) Brisbane&lt;/option&gt;\r\n
                                &lt;option value=\&quot;10\&quot;&gt;(UTC+10:00) Canberra, Melbourne, Sydney&lt;/option&gt;\r\n
                                &lt;option value=\&quot;10\&quot;&gt;(UTC+10:00) Guam, Port Moresby&lt;/option&gt;\r\n
                                &lt;option value=\&quot;10\&quot;&gt;(UTC+10:00) Hobart&lt;/option&gt;\r\n
                                &lt;option value=\&quot;10\&quot;&gt;(UTC+10:00) Vladivostok&lt;/option&gt;\r\n
                                &lt;option value=\&quot;10.5\&quot;&gt;(UTC+10:30) Lord Howe Island&lt;/option&gt;\r\n
                                &lt;option value=\&quot;11\&quot;&gt;(UTC+11:00) Bougainville Island&lt;/option&gt;\r\n
                                &lt;option value=\&quot;11\&quot;&gt;(UTC+11:00) Chokurdakh&lt;/option&gt;\r\n
                                &lt;option value=\&quot;11\&quot;&gt;(UTC+11:00) Magadan&lt;/option&gt;\r\n
                                &lt;option value=\&quot;11\&quot;&gt;(UTC+11:00) Norfolk Island&lt;/option&gt;\r\n
                                &lt;option value=\&quot;11\&quot;&gt;(UTC+11:00) Sakhalin&lt;/option&gt;\r\n
                                &lt;option value=\&quot;11\&quot;&gt;(UTC+11:00) Solomon Is., New Caledonia&lt;/option&gt;\r\n
                                &lt;option value=\&quot;12\&quot;&gt;(UTC+12:00) Anadyr, Petrapavlovsk-Kamchatsky&lt;/option&gt;\r\n
                                &lt;option value=\&quot;12\&quot;&gt;(UTC+12:00) Auckland, Wellington&lt;/option&gt;\r\n
                                &lt;option value=\&quot;12\&quot;&gt;(UTC+12:00) Coordinated Universal Time+12&lt;/option&gt;\r\n
                                &lt;option value=\&quot;12\&quot;&gt;(UTC+12:00) Fiji&lt;/option&gt;\r\n
                                &lt;option value=\&quot;12.75\&quot;&gt;(UTC+12:45) Chatham Islands&lt;/option&gt;\r\n
                                &lt;option value=\&quot;13\&quot;&gt;(UTC+13:00) Coordinated Universal Time+13&lt;/option&gt;\r\n
                                &lt;option value=\&quot;13\&quot;&gt;(UTC+13:00) Nuku\\\'alofa&lt;/option&gt;\r\n
                                &lt;option value=\&quot;13\&quot;&gt;(UTC+13:00) Samoa&lt;/option&gt;\r\n
                                &lt;option value=\&quot;14\&quot;&gt;(UTC+14:00) Kiritimati Island&lt;/option&gt;\r\n
                              &lt;/select&gt;\';\r\n
            $calendarForm .= \'&lt;span class=\&quot;help-block with-errors\&quot;&gt;&lt;/span&gt;\';\r\n
            $calendarForm .= \'&lt;/div&gt;\';\r\n
            $calendarForm .= \'&lt;/div&gt;\';\r\n
          \r\n
            $calendarForm .= \'&lt;div class=\&quot;col-lg-6\&quot;&gt;\';\r\n
          \r\n
            $calendarForm .= \'&lt;input id=\&quot;pm\&quot; type=\&quot;hidden\&quot; name=\&quot;pm\&quot; value=\&quot;0\&quot;/&gt;\';\r\n
          \r\n
            $calendarForm .= \'&lt;/div&gt;\';\r\n
          \r\n
            $calendarForm .= \'&lt;/div&gt;\';\r\n
          \r\n
            $calendarForm .= \'&lt;div class=\&quot;row fields-row\&quot;&gt;\';\r\n
          \r\n
            $calendarForm .= \'&lt;div class=\&quot;col-lg-12\&quot;&gt;\r\n
                              &lt;div class=\&quot;form-notes\&quot;&gt;&lt;a href=\&quot;https://www.timeanddate.com/worldclock/search.html\&quot; target=\&quot;_blank\&quot;&gt;Search here&lt;/a&gt; to find the timezone (UTC offset) for your city/location.&lt;/div&gt;\';\r\n
            $calendarForm .= \'&lt;div class=\&quot;form-group\&quot;&gt;\';\r\n
            $calendarForm .= \'&lt;input type=\&quot;submit\&quot; class=\&quot;btn btn-primary\&quot; value=\&quot;View now\&quot; /&gt;\';\r\n
            $calendarForm .= \'&lt;/div&gt;\';\r\n
            $calendarForm .= \'&lt;/div&gt;\';\r\n
          \r\n
            $calendarForm .= \'&lt;/div&gt;\';\r\n
          \r\n
            $calendarForm .= \'&lt;/form&gt;\';\r\n
          \r\n
            echo $calendarForm;\r\n
            \r\n
          } if ( ( empty($userUtcOffset) ) &amp;&amp; ( empty($getUtcOffset) ) &amp;&amp; ( $calType == \'paid\' ) ) {\r\n
            \r\n
            echo do_shortcode( \&quot;[cred_user_form form=\'personal-details\']\&quot; );\r\n
          \r\n
          } elseif ( ( !empty($userUtcOffset) ) || ( !empty($getUtcOffset) ) ) {\r\n
          \r\n
            // Prioritize UTC offset defined in URL query string over user\'s chosen offset\r\n
          \r\n
            if ( !empty($getUtcOffset) ) {\r\n
          \r\n
              $utcOffset = $getUtcOffset;\r\n
          \r\n
            } else {\r\n
          \r\n
              $utcOffset = $userUtcOffset;\r\n
          \r\n
            }\r\n
          \r\n
            $currentTime = time();\r\n
          \r\n
            $currentTimeUtcOffset = time() + ($utcOffset*60*60);\r\n
            \r\n
            // =========================================\r\n
          \r\n
            // Create array containing abbreviations of days of week.\r\n
          \r\n
            $daysOfWeek = array(\'Sunday\',\'Monday\',\'Tuesday\',\'Wednesday\',\'Thursday\',\'Friday\',\'Saturday\');\r\n
          \r\n
            // =========================================\r\n
          \r\n
            // Decide which calendar to display, previous, current or next month\'s\r\n
          \r\n
            // Get month and year\r\n
          \r\n
            $calendarCurrentMonth = date(\&quot;n\&quot;, $currentTimeUtcOffset);\r\n
            $year = date(\&quot;Y\&quot;, $currentTimeUtcOffset);\r\n
          \r\n
            $currentMonthYear = date(\&quot;F Y\&quot;, $currentTimeUtcOffset);\r\n
          \r\n
            // http://id1.php.net/manual/en/function.strtotime.php#107331 add \&quot;first day of\&quot; to work around Jan 30-31 bug skipping to March\r\n
          \r\n
            $currentMonthYear_pm1 = date(\&quot;F Y\&quot;, strtotime(\'first day of +1 month\', $currentTimeUtcOffset));\r\n
          \r\n
            $currentMonthYear_pm2 = date(\&quot;F Y\&quot;, strtotime(\'first day of +2 month\', $currentTimeUtcOffset));\r\n
          \r\n
            $currentMonthYear_pm3 = date(\&quot;F Y\&quot;, strtotime(\'first day of +3 month\', $currentTimeUtcOffset));\r\n
          \r\n
            $currentMonthYear_pm4 = date(\&quot;F Y\&quot;, strtotime(\'first day of +4 month\', $currentTimeUtcOffset));\r\n
          \r\n
            $currentMonthYear_pm5 = date(\&quot;F Y\&quot;, strtotime(\'first day of +5 month\', $currentTimeUtcOffset));\r\n
          \r\n
            $currentMonthYear_pm6 = date(\&quot;F Y\&quot;, strtotime(\'first day of +6 month\', $currentTimeUtcOffset));\r\n
          \r\n
            $currentMonthYear_pm7 = date(\&quot;F Y\&quot;, strtotime(\'first day of +7 month\', $currentTimeUtcOffset));\r\n
          \r\n
            $currentMonthYear_pm8 = date(\&quot;F Y\&quot;, strtotime(\'first day of +8 month\', $currentTimeUtcOffset));\r\n
          \r\n
            $currentMonthYear_pm9 = date(\&quot;F Y\&quot;, strtotime(\'first day of +9 month\', $currentTimeUtcOffset));\r\n
          \r\n
            $currentMonthYear_pm10 = date(\&quot;F Y\&quot;, strtotime(\'first day of +10 month\', $currentTimeUtcOffset));\r\n
          \r\n
            $currentMonthYear_pm11 = date(\&quot;F Y\&quot;, strtotime(\'first day of +11 month\', $currentTimeUtcOffset));\r\n
          \r\n
            $currentMonthYear_pm12 = date(\&quot;F Y\&quot;, strtotime(\'first day of +12 month\', $currentTimeUtcOffset));\r\n
          \r\n
            if ( $monthYearInput == \'previous\' ) {\r\n
          \r\n
              if ( $calendarCurrentMonth == \'1\' ) { \r\n
          \r\n
                $calendarCurrentMonth = 12;\r\n
                $year = $year - 1;\r\n
          \r\n
              } else {\r\n
          \r\n
                $calendarCurrentMonth = $calendarCurrentMonth - 1;\r\n
          \r\n
              }\r\n
              \r\n
            } elseif ( $monthYearInput == \'current\' ) {\r\n
          \r\n
              if ( $getPlusMonth == \'1\' ) {\r\n
          \r\n
                $calendarCurrentMonth = date(\&quot;n\&quot;, strtotime(\'first day of +1 month\', $currentTimeUtcOffset));\r\n
          \r\n
                $year = date(\&quot;Y\&quot;, strtotime(\'first day of +1 month\', $currentTimeUtcOffset));\r\n
          \r\n
              } elseif ( $getPlusMonth == \'2\' ) {\r\n
          \r\n
                $calendarCurrentMonth = date(\&quot;n\&quot;, strtotime(\'first day of +2 month\', $currentTimeUtcOffset));\r\n
          \r\n
                $year = date(\&quot;Y\&quot;, strtotime(\'first day of +2 month\', $currentTimeUtcOffset));\r\n
          \r\n
              } elseif ( $getPlusMonth == \'3\' ) {\r\n
          \r\n
                $calendarCurrentMonth = date(\&quot;n\&quot;, strtotime(\'first day of +3 month\', $currentTimeUtcOffset));\r\n
          \r\n
                $year = date(\&quot;Y\&quot;, strtotime(\'first day of +3 month\', $currentTimeUtcOffset));\r\n
          \r\n
              } elseif ( $getPlusMonth == \'4\' ) {\r\n
          \r\n
                $calendarCurrentMonth = date(\&quot;n\&quot;, strtotime(\'first day of +4 month\', $currentTimeUtcOffset));\r\n
          \r\n
                $year = date(\&quot;Y\&quot;, strtotime(\'first day of +4 month\', $currentTimeUtcOffset));\r\n
          \r\n
              } elseif ( $getPlusMonth == \'5\' ) {\r\n
          \r\n
                $calendarCurrentMonth = date(\&quot;n\&quot;, strtotime(\'first day of +5 month\', $currentTimeUtcOffset));\r\n
          \r\n
                $year = date(\&quot;Y\&quot;, strtotime(\'first day of +5 month\', $currentTimeUtcOffset));\r\n
          \r\n
              } elseif ( $getPlusMonth == \'6\' ) {\r\n
          \r\n
                $calendarCurrentMonth = date(\&quot;n\&quot;, strtotime(\'first day of +6 month\', $currentTimeUtcOffset));\r\n
          \r\n
                $year = date(\&quot;Y\&quot;, strtotime(\'first day of +6 month\', $currentTimeUtcOffset));\r\n
          \r\n
              } elseif ( $getPlusMonth == \'7\' ) {\r\n
          \r\n
                $calendarCurrentMonth = date(\&quot;n\&quot;, strtotime(\'first day of +7 month\', $currentTimeUtcOffset));\r\n
          \r\n
                $year = date(\&quot;Y\&quot;, strtotime(\'first day of +7 month\', $currentTimeUtcOffset));\r\n
          \r\n
              } elseif ( $getPlusMonth == \'8\' ) {\r\n
          \r\n
                $calendarCurrentMonth = date(\&quot;n\&quot;, strtotime(\'first day of +8 month\', $currentTimeUtcOffset));\r\n
          \r\n
                $year = date(\&quot;Y\&quot;, strtotime(\'first day of +8 month\', $currentTimeUtcOffset));\r\n
          \r\n
              } elseif ( $getPlusMonth == \'9\' ) {\r\n
          \r\n
                $calendarCurrentMonth = date(\&quot;n\&quot;, strtotime(\'first day of +9 month\', $currentTimeUtcOffset));\r\n
          \r\n
                $year = date(\&quot;Y\&quot;, strtotime(\'first day of +9 month\', $currentTimeUtcOffset));\r\n
          \r\n
              } elseif ( $getPlusMonth == \'10\' ) {\r\n
          \r\n
                $calendarCurrentMonth = date(\&quot;n\&quot;, strtotime(\'first day of +10 month\', $currentTimeUtcOffset));\r\n
          \r\n
                $year = date(\&quot;Y\&quot;, strtotime(\'first day of +10 month\', $currentTimeUtcOffset));\r\n
          \r\n
              } elseif ( $getPlusMonth == \'11\' ) {\r\n
          \r\n
                $calendarCurrentMonth = date(\&quot;n\&quot;, strtotime(\'first day of +11 month\', $currentTimeUtcOffset));\r\n
          \r\n
                $year = date(\&quot;Y\&quot;, strtotime(\'first day of +11 month\', $currentTimeUtcOffset));\r\n
          \r\n
              } elseif ( $getPlusMonth == \'12\' ) {\r\n
          \r\n
                $calendarCurrentMonth = date(\&quot;n\&quot;, strtotime(\'first day of +12 month\', $currentTimeUtcOffset));\r\n
          \r\n
                $year = date(\&quot;Y\&quot;, strtotime(\'first day of +12 month\', $currentTimeUtcOffset));\r\n
          \r\n
              } else {}\r\n
          \r\n
            } elseif ( $monthYearInput == \'next\' ) {\r\n
          \r\n
              if ( $calendarCurrentMonth == \'12\' ) {\r\n
          \r\n
                $calendarCurrentMonth = 1;\r\n
                $year = $year + 1;\r\n
          \r\n
              } else {\r\n
          \r\n
                $calendarCurrentMonth = $calendarCurrentMonth + 1;\r\n
          \r\n
              }\r\n
          \r\n
              \r\n
            } else {\r\n
          \r\n
              $monthYearInput = explode(\&quot;_\&quot;,$monthYearInput);\r\n
              $whichMonth = $monthYearInput[0];\r\n
              $whichYear = $monthYearInput[1];\r\n
              $MonthYear = $whichMonth.\' \'.$whichYear;\r\n
          \r\n
              $calendarCurrentMonth = date(\&quot;n\&quot;,strtotime($MonthYear));\r\n
              $year = date(\&quot;Y\&quot;,strtotime($MonthYear));\r\n
              \r\n
            }\r\n
          \r\n
            // =========================================\r\n
          \r\n
            // Define date info variables\r\n
          \r\n
            // What is the first day of the month in question?\r\n
            $firstDayOfMonth = mktime(0,0,0,$calendarCurrentMonth,1,$year);\r\n
            $firstDayOfMonthName = date(\&quot;l\&quot;, $firstDayOfMonth); \r\n
          \r\n
            // How many days does this month contain?\r\n
            $numberDays = date(\'t\',$firstDayOfMonth);\r\n
          \r\n
            // Retrieve some information about the first day of\r\n
            // the month in question\r\n
            $dateComponents = getdate($firstDayOfMonth);\r\n
          \r\n
            // What is the name of the month in question?\r\n
            $monthName = $dateComponents[\'month\'];\r\n
            $monthNameNum = date(\'n\',$firstDayOfMonth);\r\n
          \r\n
            // What is the (week\'s) index value (0-6) of the first day of\r\n
            // the month in question\r\n
            $dayOfWeek = $dateComponents[\'wday\'];\r\n
          \r\n
            $yearTwoDigits = date(\'y\',$firstDayOfMonth);\r\n
          \r\n
            // $utcOffset = (int)$utcOffset;\r\n
          \r\n
            if ( $utcOffset == \'-12\' ) { $utcOffsetString = \'-12:00\'; } \r\n
            elseif ( $utcOffset == \'-12\' ) { $utcOffsetString = \'-12:00\'; }\r\n
            elseif ( $utcOffset == \'-11\' ) { $utcOffsetString = \'-11:00\'; }\r\n
            elseif ( $utcOffset == \'-10\' ) { $utcOffsetString = \'-10:00\'; }\r\n
            elseif ( $utcOffset == \'-9.5\' ) { $utcOffsetString = \'-09:30\'; }\r\n
            elseif ( $utcOffset == \'-9\' ) { $utcOffsetString = \'-09:00\'; }\r\n
            elseif ( $utcOffset == \'-8\' ) { $utcOffsetString = \'-08:00\'; }\r\n
            elseif ( $utcOffset == \'-7\' ) { $utcOffsetString = \'-07:00\'; }\r\n
            elseif ( $utcOffset == \'-6\' ) { $utcOffsetString = \'-06:00\'; }\r\n
            elseif ( $utcOffset == \'-5\' ) { $utcOffsetString = \'-05:00\'; }\r\n
            elseif ( $utcOffset == \'-4\' ) { $utcOffsetString = \'-04:00\'; }\r\n
            elseif ( $utcOffset == \'-3.5\' ) { $utcOffsetString = \'-03:30\'; }\r\n
            elseif ( $utcOffset == \'-3\' ) { $utcOffsetString = \'-03:00\'; }\r\n
            elseif ( $utcOffset == \'-2\' ) { $utcOffsetString = \'-02:00\'; }\r\n
            elseif ( $utcOffset == \'-1\' ) { $utcOffsetString = \'-01:00\'; }\r\n
            elseif ( $utcOffset == \'-0\' ) { $utcOffsetString = \'±00:00\'; }\r\n
            elseif ( $utcOffset == \'1\' ) { $utcOffsetString = \'+01:00\'; }\r\n
            elseif ( $utcOffset == \'2\' ) { $utcOffsetString = \'+02:00\'; }\r\n
            elseif ( $utcOffset == \'3\' ) { $utcOffsetString = \'+03:00\'; }\r\n
            elseif ( $utcOffset == \'3.5\' ) { $utcOffsetString = \'+03:30\'; }\r\n
            elseif ( $utcOffset == \'4\' ) { $utcOffsetString = \'+04:00\'; }\r\n
            elseif ( $utcOffset == \'4.5\' ) { $utcOffsetString = \'+04:30\'; }\r\n
            elseif ( $utcOffset == \'5\' ) { $utcOffsetString = \'+05:00\'; }\r\n
            elseif ( $utcOffset == \'5.5\' ) { $utcOffsetString = \'+05:30\'; }\r\n
            elseif ( $utcOffset == \'5.75\' ) { $utcOffsetString = \'+05:45\'; }\r\n
            elseif ( $utcOffset == \'6\' ) { $utcOffsetString = \'+06:00\'; }\r\n
            elseif ( $utcOffset == \'6.5\' ) { $utcOffsetString = \'+06:30\'; }\r\n
            elseif ( $utcOffset == \'7\' ) { $utcOffsetString = \'+07:00\'; }\r\n
            elseif ( $utcOffset == \'8\' ) { $utcOffsetString = \'+08:00\'; }\r\n
            elseif ( $utcOffset == \'8.75\' ) { $utcOffsetString = \'+08:45\'; }\r\n
            elseif ( $utcOffset == \'9\' ) { $utcOffsetString = \'+09:00\'; }\r\n
            elseif ( $utcOffset == \'9.5\' ) { $utcOffsetString = \'+09:30\'; }\r\n
            elseif ( $utcOffset == \'10\' ) { $utcOffsetString = \'+10:00\'; }\r\n
            elseif ( $utcOffset == \'10.5\' ) { $utcOffsetString = \'+10:30\'; }\r\n
            elseif ( $utcOffset == \'11\' ) { $utcOffsetString = \'+11:00\'; }\r\n
            elseif ( $utcOffset == \'12\' ) { $utcOffsetString = \'+12:00\'; }\r\n
            elseif ( $utcOffset == \'12.75\' ) { $utcOffsetString = \'+12:45\'; }\r\n
            elseif ( $utcOffset == \'13\' ) { $utcOffsetString = \'+13:00\'; }\r\n
            elseif ( $utcOffset == \'14\' ) { $utcOffsetString = \'+14:00\'; }\r\n
            else {}\r\n
          \r\n
            // =========================================\r\n
          \r\n
            if ( $calType === \'free\' ) {\r\n
          \r\n
              $calURLstring = \'/forecast-calendar/free/\';\r\n
          \r\n
            } else {\r\n
          \r\n
              $calURLstring = \'/account/edit-account/\';\r\n
          \r\n
            }\r\n
          \r\n
          \r\n
            $calendar = \'&lt;div class=\&quot;row\&quot;&gt;\r\n
                          &lt;div class=\&quot;col-sm-4 calendar-header\&quot;&gt;\';\r\n
          \r\n
            $calendar .= \'&lt;h2 class=\&quot;calendar-period\&quot;&gt;\' . $monthName . \' \' . $year . \' &lt;span&gt;(&lt;a href=\&quot;\'.$calURLstring.\'\&quot;&gt;UTC\'.$utcOffsetString.\'&lt;/a&gt;)&lt;/span&gt;&lt;/h2&gt;\';\r\n
          \r\n
            // $calendar .= \'&lt;h4 style=\&quot;margin-top: -36px; margin-bottom: 0;\&quot;&gt;UTC offset is \'.$utcOffsetString.\' hours&lt;/h4&gt;\';\r\n
          \r\n
          \r\n
            // =========================================\r\n
          \r\n
            // Query this month\'s Planet Update post put data into array. Check existence of cached data for the queried month first.\r\n
            // https://codex.wordpress.org/Class_Reference/WP_Query#Date_Parameters\r\n
          \r\n
            $planetUpdatePostsCacheKey = \'planet_update_posts_\'.$monthName.\'_\'.$year;\r\n
          \r\n
            $planetUpdatePosts = get_transient( $planetUpdatePostsCacheKey );\r\n
          \r\n
            if ( false === $planetUpdatePosts ) {\r\n
          \r\n
              $planetUpdatePostsContent = \'\';\r\n
              \r\n
              $args = array(\r\n
                \'post_type\' =&gt; \'post\',\r\n
                \'post_status\' =&gt; \'publish\',\r\n
                \'category_name\' =&gt; \'planet-update\',\r\n
                \'date_query\' =&gt; array(\r\n
                    array(\r\n
                        \'year\' =&gt; $year,\r\n
                        \'month\' =&gt; $monthNameNum        \r\n
                        )\r\n
                ),\r\n
                \'posts_per_page\' =&gt; -1\r\n
              );\r\n
          \r\n
              $the_query = new WP_Query( $args );\r\n
          \r\n
              $theQueryArray = (array)$the_query;\r\n
          \r\n
              if ( $the_query-&gt;have_posts() ) {\r\n
          \r\n
                while ( $the_query-&gt;have_posts() ) {\r\n
          \r\n
                  $the_query-&gt;the_post();\r\n
          \r\n
                  $planetUpdateTitle = get_the_title();\r\n
          \r\n
                  $planetUpdateLink = get_permalink();\r\n
          \r\n
                  $planetUpdateDate = get_the_date( \'Y-m-d H:i:s\' );\r\n
          \r\n
                  $planetUpdateDateGmt = get_gmt_from_date( $planetUpdateDate, \'Y-m-d H:i:s\' );\r\n
          \r\n
                  if (!empty(get_post_custom_values(\'wpcf-planet-update-glyph-1\')[0])) {\r\n
          \r\n
                    if ( get_post_custom_values(\'wpcf-planet-update-glyph-1\')[0] == \'solstice\' ) {\r\n
          \r\n
                      $planetUpdateGlyph1 = \'Solstice\';\r\n
          \r\n
                    } elseif ( get_post_custom_values(\'wpcf-planet-update-glyph-1\')[0] == \'equinox\' ) {\r\n
          \r\n
                      $planetUpdateGlyph1 = \'Equinox\';\r\n
          \r\n
                    } else {\r\n
          \r\n
                      $planetUpdateGlyph1 = \'&lt;img src=\&quot;/wp-content/uploads/images/glyphs/\'.get_post_custom_values(\'wpcf-planet-update-glyph-1\')[0].\'.png\&quot;&gt;\';\r\n
          \r\n
                    }\r\n
          \r\n
                  }\r\n
          \r\n
                  if ( (!empty(get_post_custom_values(\'wpcf-planet-update-glyph-2\')[0])) &amp;&amp; ( get_post_custom_values(\'wpcf-planet-update-glyph-2\')[0] !== \'in\' ) ) {\r\n
          \r\n
                    $planetUpdateGlyph2 = \'&lt;img src=\&quot;/wp-content/uploads/images/glyphs/\'.get_post_custom_values(\'wpcf-planet-update-glyph-2\')[0].\'.png\&quot;&gt;\';\r\n
          \r\n
                  }\r\n
          \r\n
                  if ( (!empty(get_post_custom_values(\'wpcf-planet-update-glyph-2\')[0])) &amp;&amp; ( get_post_custom_values(\'wpcf-planet-update-glyph-2\')[0] == \'in\' ) ) {\r\n
          \r\n
                    $planetUpdateGlyph2 = \'&lt;span class=\&quot;aspect-in\&quot;&gt;in&lt;/span&gt;\';\r\n
          \r\n
                  }\r\n
          \r\n
                  if (!empty(get_post_custom_values(\'wpcf-planet-update-glyph-3\')[0])) {\r\n
          \r\n
                    $planetUpdateGlyph3 = \'&lt;img src=\&quot;/wp-content/uploads/images/glyphs/\'.get_post_custom_values(\'wpcf-planet-update-glyph-3\')[0].\'.png\&quot;&gt;\';\r\n
          \r\n
                  }\r\n
          \r\n
                  // Create an array from the WP query data above\r\n
          \r\n
                  $planetUpdatePosts[] = array(\'title\' =&gt; $planetUpdateTitle, \'link\' =&gt; $planetUpdateLink, \'publishdate\' =&gt; $planetUpdateDateGmt, \'glyph1\' =&gt; $planetUpdateGlyph1, \'glyph2\' =&gt; $planetUpdateGlyph2, \'glyph3\' =&gt; $planetUpdateGlyph3 );\r\n
          \r\n
                  // Create string from WP query data above. For testing only.\r\n
          \r\n
                  // $planetUpdatePostsContent .= \'&lt;a href=\&quot;\'.$planetUpdateLink.\'\&quot;&gt;\'.$planetUpdateTitle.\'&lt;/a&gt;, \'.$planetUpdateDate.\' - \'.$planetUpdateDateGmt.\' | \'.$planetUpdateGlyph1.\' \'.$planetUpdateGlyph2.\' \'.$planetUpdateGlyph3.\'&lt;br /&gt;\';\r\n
          \r\n
                }\r\n
          \r\n
                set_transient( $planetUpdatePostsCacheKey, $planetUpdatePosts, 2629746 );\r\n
          \r\n
                wp_reset_postdata();\r\n
          \r\n
              } else {}\r\n
          \r\n
            } else {\r\n
          \r\n
              // $cachedDataCheck .= \'&lt;div&gt;Cached \'.$planetUpdatePostsCacheKey.\' data is used&lt;/div&gt;\';\r\n
          \r\n
            }\r\n
          \r\n
          \r\n
            $planetUpdatePostsOriginal = $planetUpdatePosts;\r\n
          \r\n
            if ( $utcOffset !== \'0\' ) {\r\n
          \r\n
              // https://stackoverflow.com/a/15472071\r\n
              \r\n
              foreach ($planetUpdatePosts as &amp;$planetUpdatePost) {\r\n
          \r\n
                $convertedPublishdate = strtotime( $planetUpdatePost[\'publishdate\'] ) + $utcOffset*60*60;\r\n
          \r\n
                $planetUpdatePost[\'publishdate\'] = date( \'Y-m-d H:i:s\', $convertedPublishdate );\r\n
          \r\n
              }\r\n
          \r\n
            $planetUpdatePostsConverted = $planetUpdatePosts;\r\n
          \r\n
            }\r\n
          \r\n
            // =========================================\r\n
          \r\n
            // Detect if calendar type is \'Paid\'\r\n
          \r\n
            if ( $calType === \'paid\' ) {\r\n
          \r\n
              $calendar .= \'&lt;p&gt;For \'.$userFullName.\', born on &lt;a href=\&quot;/account/edit-account/\&quot;&gt;\'.$dateOfBirth.\'&lt;/a&gt;&lt;/p&gt;\';\r\n
          \r\n
            } else {}\r\n
          \r\n
            $calendar .= \'&lt;/div&gt;\r\n
                          &lt;div class=\&quot;col-sm-4 plusmonth-selection\&quot;&gt;\';\r\n
          \r\n
              // =====================================\r\n
          \r\n
              if ( $calType === \'paid\' ) {\r\n
          \r\n
                // =====================================\r\n
          \r\n
                // Add dropdown to select an upcoming month\'s calendar\r\n
          \r\n
                $plusmonthForm = \'&lt;form action=\&quot;\&quot; method=\&quot;GET\&quot;&gt;\';\r\n
          \r\n
                if ( !empty($dateOfBirthUnix) ) {\r\n
          \r\n
                  $plusmonthForm .= \'&lt;input id=\&quot;id\&quot; type=\&quot;hidden\&quot; name=\&quot;id\&quot; value=\&quot;\'.$dateOfBirthUnix.\'\&quot;/&gt;\';\r\n
          \r\n
                }\r\n
          \r\n
                if ( !empty($getUtcOffset) ) {\r\n
          \r\n
                  $plusmonthForm .= \'&lt;input id=\&quot;utc\&quot; type=\&quot;hidden\&quot; name=\&quot;utc\&quot; value=\&quot;\'.$getUtcOffset.\'\&quot;/&gt;\';\r\n
          \r\n
                } else {\r\n
          \r\n
                  $plusmonthForm .= \'&lt;input id=\&quot;utc\&quot; type=\&quot;hidden\&quot; name=\&quot;utc\&quot; value=\&quot;\'.$userUtcOffset.\'\&quot;/&gt;\';        \r\n
          \r\n
                }\r\n
          \r\n
                $monthYearParam = $calendarCurrentMonth.\'\'.$yearTwoDigits;\r\n
          \r\n
                $plusmonthForm .= \'&lt;div class=\&quot;row plusmonth-row\&quot;&gt;\';\r\n
          \r\n
                $plusmonthForm .= \'&lt;div class=\&quot;col-lg-12\&quot;&gt;\';\r\n
                $plusmonthForm .= \'&lt;div class=\&quot;form-group\&quot;&gt;\';\r\n
                $plusmonthForm .= \'&lt;label for=\&quot;pm\&quot;&gt;View calendar for a different month&lt;/label&gt;\';\r\n
                $plusmonthForm .= \'&lt;select id=\&quot;pm\&quot; name=\&quot;pm\&quot;&gt;\r\n
                                    &lt;option value=\&quot;\&quot;&gt;Pick a month&lt;/option&gt;\';\r\n
          \r\n
                                    if ( !empty( $getPlusMonth ) ) {\r\n
                                    \r\n
                                      $plusmonthForm .= \'&lt;option value=\&quot;0\&quot;&gt;\'.$currentMonthYear.\'&lt;/option&gt;\';\r\n
                                    \r\n
                                    }\r\n
          \r\n
                                    if ( $getPlusMonth !== \'1\' ) {\r\n
          \r\n
                                      $plusmonthForm .= \'&lt;option value=\&quot;1\&quot;&gt;\'.$currentMonthYear_pm1.\'&lt;/option&gt;\';\r\n
          \r\n
                                    }\r\n
          \r\n
                                    if ( $getPlusMonth !== \'2\' ) {\r\n
          \r\n
                                      $plusmonthForm .= \'&lt;option value=\&quot;2\&quot;&gt;\'.$currentMonthYear_pm2.\'&lt;/option&gt;\';\r\n
          \r\n
                                    }\r\n
          \r\n
                                    if ( $getPlusMonth !== \'3\' ) {\r\n
          \r\n
                                      $plusmonthForm .= \'&lt;option value=\&quot;3\&quot;&gt;\'.$currentMonthYear_pm3.\'&lt;/option&gt;\';\r\n
          \r\n
                                    }\r\n
          \r\n
                                    if ( $getPlusMonth !== \'4\' ) {\r\n
          \r\n
                                      $plusmonthForm .= \'&lt;option value=\&quot;4\&quot;&gt;\'.$currentMonthYear_pm4.\'&lt;/option&gt;\';\r\n
          \r\n
                                    }\r\n
          \r\n
                                    if ( $getPlusMonth !== \'5\' ) {\r\n
          \r\n
                                      $plusmonthForm .= \'&lt;option value=\&quot;5\&quot;&gt;\'.$currentMonthYear_pm5.\'&lt;/option&gt;\';\r\n
          \r\n
                                    }\r\n
          \r\n
                                    if ( $getPlusMonth !== \'6\' ) {\r\n
          \r\n
                                      $plusmonthForm .= \'&lt;option value=\&quot;6\&quot;&gt;\'.$currentMonthYear_pm6.\'&lt;/option&gt;\';\r\n
          \r\n
                                    }\r\n
          \r\n
                                    if ( $getPlusMonth !== \'7\' ) {\r\n
          \r\n
                                      $plusmonthForm .= \'&lt;option value=\&quot;7\&quot;&gt;\'.$currentMonthYear_pm7.\'&lt;/option&gt;\';\r\n
          \r\n
                                    }\r\n
          \r\n
                                    if ( $getPlusMonth !== \'8\' ) {\r\n
          \r\n
                                      $plusmonthForm .= \'&lt;option value=\&quot;8\&quot;&gt;\'.$currentMonthYear_pm8.\'&lt;/option&gt;\';\r\n
          \r\n
                                    }\r\n
          \r\n
                                    if ( $getPlusMonth !== \'9\' ) {\r\n
          \r\n
                                      $plusmonthForm .= \'&lt;option value=\&quot;9\&quot;&gt;\'.$currentMonthYear_pm9.\'&lt;/option&gt;\';\r\n
          \r\n
                                    }\r\n
          \r\n
                                    if ( $getPlusMonth !== \'10\' ) {\r\n
          \r\n
                                      $plusmonthForm .= \'&lt;option value=\&quot;10\&quot;&gt;\'.$currentMonthYear_pm10.\'&lt;/option&gt;\';\r\n
          \r\n
                                    }\r\n
          \r\n
                                    if ( $getPlusMonth !== \'11\' ) {\r\n
          \r\n
                                      $plusmonthForm .= \'&lt;option value=\&quot;11\&quot;&gt;\'.$currentMonthYear_pm11.\'&lt;/option&gt;\';\r\n
          \r\n
                                    }\r\n
          \r\n
                                    if ( $getPlusMonth !== \'12\' ) {\r\n
          \r\n
                                      $plusmonthForm .= \'&lt;option value=\&quot;12\&quot;&gt;\'.$currentMonthYear_pm12.\'&lt;/option&gt;\';\r\n
          \r\n
                                    }\r\n
          \r\n
                $plusmonthForm .= \'&lt;/select&gt;\';\r\n
                $plusmonthForm .= \'&lt;input type=\&quot;submit\&quot; class=\&quot;btn btn-primary\&quot; value=\&quot;View now\&quot; /&gt;\';\r\n
                $plusmonthForm .= \'&lt;span class=\&quot;help-block with-errors\&quot;&gt;&lt;/span&gt;\';\r\n
                $plusmonthForm .= \'&lt;/div&gt;\';\r\n
                $plusmonthForm .= \'&lt;/div&gt;\';\r\n
                $plusmonthForm .= \'&lt;/div&gt;\';\r\n
          \r\n
                $plusmonthForm .= \'&lt;/form&gt;\';\r\n
          \r\n
                $calendar .= $plusmonthForm;\r\n
          \r\n
                $calendar .= \'&lt;/div&gt;\r\n
                              &lt;div class=\&quot;col-sm-4 dictionary-ephemeris\&quot;&gt;\';\r\n
          \r\n
                $monthYearString = $monthName.\' \'.$year;\r\n
                $mm = date(\'n\', strtotime($monthYearString));\r\n
                $yy = date(\'Y\', strtotime($monthYearString));\r\n
          \r\n
                $ephemerisUrlString = \'?mm=\'.$mm.\'&amp;yy=\'.$yy;\r\n
          \r\n
                $calendar .= \'&lt;a href=\&quot;/ephemeris/\'.$ephemerisUrlString.\'\&quot; target=\&quot;_blank\&quot;&gt;View \'.$monthName.\' \'.$year.\' ephemeris &amp;raquo;&lt;/a&gt;&lt;br /&gt;&lt;a href=\&quot;/astro-dictionary/\&quot; target=\&quot;_blank\&quot;&gt;View Astro Dictionary &amp;raquo;&lt;/a&gt;\';\r\n
          \r\n
                $calendar .= \'&lt;/div&gt;    \r\n
                              &lt;/div&gt;\';\r\n
          \r\n
                // =====================================\r\n
          \r\n
                // Add toggles for category icons in calendar\r\n
          \r\n
                $calendar .= \'&lt;p class=\&quot;influence-togglers\&quot;&gt;&lt;span class=\&quot;icon-toggles icon-show short-term-show\&quot; style=\&quot;display:none;\&quot;&gt;&lt;img class=\&quot;icon-checkbox\&quot; src=\&quot;/wp-content/uploads/images/glyphs/checkbox_empty.png\&quot; /&gt;Short-Term Influences&lt;/span&gt;&lt;span class=\&quot;icon-toggles short-term-hide\&quot;&gt;&lt;img class=\&quot;icon-checkbox\&quot; src=\&quot;/wp-content/uploads/images/glyphs/checkbox_checked.png\&quot; /&gt;Short-Term Influences&lt;/span&gt;&lt;span class=\&quot;icon-toggles icon-show long-term-show\&quot;&gt;&lt;img class=\&quot;icon-checkbox\&quot; src=\&quot;/wp-content/uploads/images/glyphs/checkbox_empty.png\&quot; /&gt;Long-Term Influences&lt;/span&gt;&lt;span class=\&quot;icon-toggles long-term-hide\&quot; style=\&quot;display:none;\&quot;&gt;&lt;img class=\&quot;icon-checkbox\&quot; src=\&quot;/wp-content/uploads/images/glyphs/checkbox_checked.png\&quot; /&gt;Long-Term Influences&lt;/span&gt;&lt;/p&gt;\';\r\n
          \r\n
                $calendar .= \'&lt;div class=\&quot;icon-togglers\&quot;&gt;&lt;span class=\&quot;icon-toggles icon-hide career-icons-hide\&quot;&gt;&lt;img class=\&quot;icon-checkbox\&quot; src=\&quot;/wp-content/uploads/images/glyphs/checkbox_checked.png\&quot; /&gt;&lt;img src=\&quot;/wp-content/uploads/images/glyphs/career.png\&quot; /&gt;Career&lt;/span&gt;&lt;span class=\&quot;icon-toggles icon-show career-icons-show\&quot; style=\&quot;display:none;\&quot;&gt;&lt;img class=\&quot;icon-checkbox\&quot; src=\&quot;/wp-content/uploads/images/glyphs/checkbox_empty.png\&quot; /&gt;&lt;img src=\&quot;/wp-content/uploads/images/glyphs/career.png\&quot; /&gt;Career&lt;/span&gt;\';\r\n
          \r\n
                $calendar .= \'&lt;span class=\&quot;icon-toggles icon-hide communication-icons-hide\&quot;&gt;&lt;img class=\&quot;icon-checkbox\&quot; src=\&quot;/wp-content/uploads/images/glyphs/checkbox_checked.png\&quot; /&gt;&lt;img src=\&quot;/wp-content/uploads/images/glyphs/communication.png\&quot; /&gt;Communication&lt;/span&gt;&lt;span class=\&quot;icon-toggles icon-show communication-icons-show\&quot; style=\&quot;display:none;\&quot;&gt;&lt;img class=\&quot;icon-checkbox\&quot; src=\&quot;/wp-content/uploads/images/glyphs/checkbox_empty.png\&quot; /&gt;&lt;img src=\&quot;/wp-content/uploads/images/glyphs/communication.png\&quot; /&gt;Communication&lt;/span&gt;\';\r\n
          \r\n
                $calendar .= \'&lt;span class=\&quot;icon-toggles icon-hide diet-icons-hide\&quot;&gt;&lt;img class=\&quot;icon-checkbox\&quot; src=\&quot;/wp-content/uploads/images/glyphs/checkbox_checked.png\&quot; /&gt;&lt;img src=\&quot;/wp-content/uploads/images/glyphs/diet.png\&quot; /&gt;Fitness&lt;/span&gt;&lt;span class=\&quot;icon-toggles icon-show diet-icons-show\&quot; style=\&quot;display:none;\&quot;&gt;&lt;img class=\&quot;icon-checkbox\&quot; src=\&quot;/wp-content/uploads/images/glyphs/checkbox_empty.png\&quot; /&gt;&lt;img src=\&quot;/wp-content/uploads/images/glyphs/diet.png\&quot; /&gt;Fitness&lt;/span&gt;\';\r\n
          \r\n
                $calendar .= \'&lt;span class=\&quot;icon-toggles icon-hide money-icons-hide\&quot;&gt;&lt;img class=\&quot;icon-checkbox\&quot; src=\&quot;/wp-content/uploads/images/glyphs/checkbox_checked.png\&quot; /&gt;&lt;img src=\&quot;/wp-content/uploads/images/glyphs/money.png\&quot; /&gt;Money&lt;/span&gt;&lt;span class=\&quot;icon-toggles icon-show money-icons-show\&quot; style=\&quot;display:none;\&quot;&gt;&lt;img class=\&quot;icon-checkbox\&quot; src=\&quot;/wp-content/uploads/images/glyphs/checkbox_empty.png\&quot; /&gt;&lt;img src=\&quot;/wp-content/uploads/images/glyphs/money.png\&quot; /&gt;Money&lt;/span&gt;\';\r\n
          \r\n
                $calendar .= \'&lt;span class=\&quot;icon-toggles icon-hide romance-icons-hide\&quot;&gt;&lt;img class=\&quot;icon-checkbox\&quot; src=\&quot;/wp-content/uploads/images/glyphs/checkbox_checked.png\&quot; /&gt;&lt;img src=\&quot;/wp-content/uploads/images/glyphs/romance.png\&quot; /&gt;Romance&lt;/span&gt;&lt;span class=\&quot;icon-toggles icon-show romance-icons-show\&quot; style=\&quot;display:none;\&quot;&gt;&lt;img class=\&quot;icon-checkbox\&quot; src=\&quot;/wp-content/uploads/images/glyphs/checkbox_empty.png\&quot; /&gt;&lt;img src=\&quot;/wp-content/uploads/images/glyphs/romance.png\&quot; /&gt;Romance&lt;/span&gt;\';\r\n
          \r\n
                $calendar .= \'&lt;span class=\&quot;icon-toggles icon-hide traveling-icons-hide\&quot;&gt;&lt;img class=\&quot;icon-checkbox\&quot; src=\&quot;/wp-content/uploads/images/glyphs/checkbox_checked.png\&quot; /&gt;&lt;img src=\&quot;/wp-content/uploads/images/glyphs/traveling.png\&quot; /&gt;Travel&lt;/span&gt;&lt;span class=\&quot;icon-toggles icon-show traveling-icons-show\&quot; style=\&quot;display:none;\&quot;&gt;&lt;img class=\&quot;icon-checkbox\&quot; src=\&quot;/wp-content/uploads/images/glyphs/checkbox_empty.png\&quot; /&gt;&lt;img src=\&quot;/wp-content/uploads/images/glyphs/traveling.png\&quot; /&gt;Travel&lt;/span&gt;\';\r\n
          \r\n
                $calendar .= \'&lt;span class=\&quot;icon-toggles icon-hide other-icons-hide\&quot; style=\&quot;display:none;\&quot;&gt;&lt;img class=\&quot;icon-checkbox\&quot; src=\&quot;/wp-content/uploads/images/glyphs/checkbox_checked.png\&quot; /&gt;&lt;img src=\&quot;/wp-content/uploads/images/glyphs/other.png\&quot; /&gt;Other&lt;/span&gt;&lt;span class=\&quot;icon-toggles icon-show other-icons-show\&quot;&gt;&lt;img class=\&quot;icon-checkbox\&quot; src=\&quot;/wp-content/uploads/images/glyphs/checkbox_empty.png\&quot; /&gt;&lt;img src=\&quot;/wp-content/uploads/images/glyphs/other.png\&quot; /&gt;Other&lt;/span&gt;\';\r\n
          \r\n
                $calendar .= \'&lt;/div&gt;\';\r\n
          \r\n
                // JQuery for the toggles\r\n
          \r\n
                $calendarExtraHtml = \&quot;\r\n
                    &lt;script type=\'text/javascript\'&gt;\r\n
                      jQuery(document).ready( function() {\r\n
          \r\n
                        jQuery(\'.other-category\').addClass(\'other-category-temp\');\r\n
                        jQuery(\'.day-aspects\').removeClass(\'other-category\');\r\n
          \r\n
                        jQuery(\'.short-term-show\').on( \'click\', function() {\r\n
                          jQuery(\'.short-influence\').show();\r\n
                          jQuery(\'.short-term-show\').hide();\r\n
                          jQuery(\'.short-term-hide\').show();\r\n
                        });\r\n
          \r\n
                        jQuery(\'.short-term-hide\').on( \'click\', function() {\r\n
                          jQuery(\'.short-influence\').hide();\r\n
                          jQuery(\'.short-term-hide\').hide();\r\n
                          jQuery(\'.short-term-show\').show();\r\n
                        });\r\n
          \r\n
                        jQuery(\'.long-term-show\').on( \'click\', function() {\r\n
                          jQuery(\'.long-influence\').show();\r\n
                          jQuery(\'.long-term-show\').hide();\r\n
                          jQuery(\'.long-term-hide\').show();\r\n
                          jQuery(\'.other-icons-show\').click();\r\n
                        });\r\n
          \r\n
                        jQuery(\'.long-term-hide\').on( \'click\', function() {\r\n
                          jQuery(\'.long-influence\').hide();\r\n
                          jQuery(\'.long-term-hide\').hide();\r\n
                          jQuery(\'.long-term-show\').show();\r\n
                        });\r\n
          \r\n
                        jQuery(\'.career-icons-hide\').on( \'click\', function() {\r\n
                          jQuery(\'.career-icon\').hide();\r\n
                          jQuery(\'.career-category\').addClass(\'career-category-temp\');\r\n
                          jQuery(\'.day-aspects\').removeClass(\'career-category\');\r\n
                          jQuery(\'.career-icons-hide\').hide();\r\n
                          jQuery(\'.career-icons-show\').show();\r\n
                        });\r\n
          \r\n
                        jQuery(\'.career-icons-show\').on( \'click\', function() {\r\n
                          jQuery(\'.career-icon\').show();\r\n
                          jQuery(\'.career-category-temp\').addClass(\'career-category\');\r\n
                          jQuery(\'.day-aspects\').removeClass(\'career-category-temp\');\r\n
                          jQuery(\'.career-icons-hide\').show();\r\n
                          jQuery(\'.career-icons-show\').hide();\r\n
                        });\r\n
          \r\n
                        jQuery(\'.communication-icons-hide\').on( \'click\', function() {\r\n
                          jQuery(\'.communication-icon\').hide();\r\n
                          jQuery(\'.communication-category\').addClass(\'communication-category-temp\');\r\n
                          jQuery(\'.day-aspects\').removeClass(\'communication-category\');\r\n
                          jQuery(\'.communication-icons-hide\').hide();\r\n
                          jQuery(\'.communication-icons-show\').show();\r\n
                        });\r\n
          \r\n
                        jQuery(\'.communication-icons-show\').on( \'click\', function() {\r\n
                          jQuery(\'.communication-icon\').show();\r\n
                          jQuery(\'.communication-category-temp\').addClass(\'communication-category\');\r\n
                          jQuery(\'.day-aspects\').removeClass(\'communication-category-temp\');\r\n
                          jQuery(\'.communication-icons-hide\').show();\r\n
                          jQuery(\'.communication-icons-show\').hide();\r\n
                        });\r\n
          \r\n
                        jQuery(\'.diet-icons-hide\').on( \'click\', function() {\r\n
                          jQuery(\'.diet-icon\').hide();\r\n
                          jQuery(\'.diet-category\').addClass(\'diet-category-temp\');\r\n
                          jQuery(\'.day-aspects\').removeClass(\'diet-category\');\r\n
                          jQuery(\'.diet-icons-hide\').hide();\r\n
                          jQuery(\'.diet-icons-show\').show();\r\n
                        });\r\n
          \r\n
                        jQuery(\'.diet-icons-show\').on( \'click\', function() {\r\n
                          jQuery(\'.diet-icon\').show();\r\n
                          jQuery(\'.diet-category-temp\').addClass(\'diet-category\');\r\n
                          jQuery(\'.day-aspects\').removeClass(\'diet-category-temp\');\r\n
                          jQuery(\'.diet-icons-hide\').show();\r\n
                          jQuery(\'.diet-icons-show\').hide();\r\n
                        });\r\n
          \r\n
                        jQuery(\'.money-icons-hide\').on( \'click\', function() {\r\n
                          jQuery(\'.money-icon\').hide();\r\n
                          jQuery(\'.money-category\').addClass(\'money-category-temp\');\r\n
                          jQuery(\'.day-aspects\').removeClass(\'money-category\');\r\n
                          jQuery(\'.money-icons-hide\').hide();\r\n
                          jQuery(\'.money-icons-show\').show();\r\n
                        });\r\n
          \r\n
                        jQuery(\'.money-icons-show\').on( \'click\', function() {\r\n
                          jQuery(\'.money-icon\').show();\r\n
                          jQuery(\'.money-category-temp\').addClass(\'money-category\');\r\n
                          jQuery(\'.day-aspects\').removeClass(\'money-category-temp\');\r\n
                          jQuery(\'.money-icons-hide\').show();\r\n
                          jQuery(\'.money-icons-show\').hide();\r\n
                        });\r\n
          \r\n
                        jQuery(\'.romance-icons-hide\').on( \'click\', function() {\r\n
                          jQuery(\'.romantic-icon\').hide();\r\n
                          jQuery(\'.romantic-category\').addClass(\'romantic-category-temp\');\r\n
                          jQuery(\'.day-aspects\').removeClass(\'romantic-category\');\r\n
                          jQuery(\'.romance-icons-hide\').hide();\r\n
                          jQuery(\'.romance-icons-show\').show();\r\n
                        });\r\n
          \r\n
                        jQuery(\'.romance-icons-show\').on( \'click\', function() {\r\n
                          jQuery(\'.romantic-icon\').show();\r\n
                          jQuery(\'.romantic-category-temp\').addClass(\'romantic-category\');\r\n
                          jQuery(\'.day-aspects\').removeClass(\'romantic-category-temp\');\r\n
                          jQuery(\'.romance-icons-hide\').show();\r\n
                          jQuery(\'.romance-icons-show\').hide();\r\n
                        });\r\n
          \r\n
                        jQuery(\'.traveling-icons-hide\').on( \'click\', function() {\r\n
                          jQuery(\'.traveling-icon\').hide();\r\n
                          jQuery(\'.traveling-category\').addClass(\'traveling-category-temp\');\r\n
                          jQuery(\'.day-aspects\').removeClass(\'traveling-category\');\r\n
                          jQuery(\'.traveling-icons-hide\').hide();\r\n
                          jQuery(\'.traveling-icons-show\').show();\r\n
                        });\r\n
          \r\n
                        jQuery(\'.traveling-icons-show\').on( \'click\', function() {\r\n
                          jQuery(\'.traveling-icon\').show();\r\n
                          jQuery(\'.traveling-category-temp\').addClass(\'traveling-category\');\r\n
                          jQuery(\'.day-aspects\').removeClass(\'traveling-category-temp\');\r\n
                          jQuery(\'.traveling-icons-hide\').show();\r\n
                          jQuery(\'.traveling-icons-show\').hide();\r\n
                        });\r\n
          \r\n
                        jQuery(\'.other-icons-hide\').on( \'click\', function() {\r\n
                          jQuery(\'.other-icon\').hide();\r\n
                          jQuery(\'.other-category\').addClass(\'other-category-temp\');\r\n
                          jQuery(\'.day-aspects\').removeClass(\'other-category\');\r\n
                          jQuery(\'.other-icons-hide\').hide();\r\n
                          jQuery(\'.other-icons-show\').show();\r\n
                        });\r\n
          \r\n
                        jQuery(\'.other-icons-show\').on( \'click\', function() {\r\n
                          jQuery(\'.other-icon\').show();\r\n
                          jQuery(\'.other-category-temp\').addClass(\'other-category\');\r\n
                          jQuery(\'.day-aspects\').removeClass(\'other-category-temp\');\r\n
                          jQuery(\'.other-icons-hide\').show();\r\n
                          jQuery(\'.other-icons-show\').hide();\r\n
                        });\r\n
                      });\r\n
                    &lt;/script&gt;\&quot;;\r\n
          \r\n
              } else {\r\n
          \r\n
                $calendar .= \'&lt;/div&gt;\r\n
                              &lt;/div&gt;\';\r\n
          \r\n
              }\r\n
          \r\n
            // =========================================\r\n
          \r\n
            $calendar .= \'&lt;p class=\&quot;toggle-notes\&quot;&gt;(Click/tap on the calendar icons to show more information)&lt;/p&gt;\';\r\n
          \r\n
          \r\n
            // Create the table tag opener and day headers\r\n
            $calendar .= \'&lt;table id=\&quot;calendar\&quot;&gt;\';\r\n
            $calendar .= \'&lt;tr class=\&quot;weekdays\&quot;&gt;\';\r\n
          \r\n
            // Create the calendar headers\r\n
            foreach ( $daysOfWeek as $day ) {\r\n
              $calendar .= \'&lt;th&gt;\' . $day . \'&lt;/th&gt;\';\r\n
            }\r\n
          \r\n
            // Compare today\'s month (real) with inputted month\r\n
            // Get current date (1-31) only if real month is the same as inputted month\r\n
          \r\n
            $realCurrentMonth = date(\&quot;n\&quot;, $currentTimeUtcOffset);\r\n
          \r\n
            if ( $realCurrentMonth == $calendarCurrentMonth ) {\r\n
          \r\n
              $today = date(\&quot;j\&quot;, $currentTimeUtcOffset);\r\n
          \r\n
            } else {\r\n
          \r\n
              $today = 0;\r\n
          \r\n
            }\r\n
          \r\n
          \r\n
            // Create the rest of the calendar\r\n
            // Initiate the day counter, starting with the 1st.\r\n
            $currentDay = 1;\r\n
          \r\n
            $calendar .= \'&lt;/tr&gt;&lt;tr class=\&quot;days\&quot;&gt;\';\r\n
          \r\n
            // The variable $dayOfWeek is used to ensure that the \r\n
            // calendar display consists of exactly 7 columns\r\n
          \r\n
            // =========================================\r\n
          \r\n
            // Create calendar cells for days from previous month\r\n
          \r\n
            if ( $dayOfWeek &gt; 0 ) {\r\n
          \r\n
              $i = 0;\r\n
          \r\n
              while ( $i &lt; $dayOfWeek) {\r\n
          \r\n
              // Create merged table cells at the beginning of \r\n
              // first row in the calendar\r\n
              // $calendar .= \'&lt;td colspan=\&quot;\'.$dayOfWeek.\'\&quot; class=\&quot;day other-month\&quot;&gt;&amp;nbsp;&lt;/td&gt;\';\r\n
          \r\n
              $calendar .= \'&lt;td class=\&quot;day other-month\&quot;&gt;&amp;nbsp;&lt;/td&gt;\';\r\n
          \r\n
              $i++;\r\n
          \r\n
              } \r\n
          \r\n
            }\r\n
          \r\n
            // =========================================\r\n
          \r\n
            // Check if moon phase data exists in object cache, if not, generate and cache\r\n
          \r\n
            // Source: https://codex.wordpress.org/Class_Reference/WP_Object_Cache\r\n
          \r\n
            $moonphaseDataCacheKey = \'moonphases_eclipses_data\';\r\n
          \r\n
            $moonphaseDataCache = get_transient( $moonphaseDataCacheKey );\r\n
          \r\n
            if ( false === $moonphaseDataCache ) {\r\n
          \r\n
              // Produce array of moon phases between 2018 to 2035 with corresponding unix timestamp and UTC date\r\n
              // Data source: https://www.somacon.com/p570.php\r\n
              // Data source: http://aa.usno.navy.mil/data/docs/MoonPhase.php\r\n
              \r\n
              $lines = explode( \&quot;\\n\&quot;, file_get_contents(\'https://new.theastrologer.com/wp-content/uploads/data/moon-phases-solarlunar-eclipses-2018-2035-UTC.csv\' ) );\r\n
          \r\n
              // Take out first line of CSV to use as array keys\r\n
              $headers = str_getcsv( array_shift( $lines ) );\r\n
          \r\n
              $data = array();\r\n
          \r\n
              foreach ( $lines as $line ) {\r\n
          \r\n
                $row = array();\r\n
          \r\n
                foreach ( str_getcsv( $line ) as $key =&gt; $field )\r\n
                  $row[ $headers[ $key ] ] = $field;\r\n
          \r\n
                $row = array_filter( $row );\r\n
          \r\n
                $data[] = $row;\r\n
          \r\n
              }\r\n
          \r\n
              $moonphaseDataCache = $data;\r\n
          \r\n
              set_transient( $moonphaseDataCacheKey, $moonphaseDataCache, 31556952 );\r\n
          \r\n
            } else {\r\n
          \r\n
              // $cachedDataCheck .= \'&lt;div&gt;Cached \'.$moonphaseDataCacheKey.\' data is used&lt;/div&gt;\';\r\n
          \r\n
              $data = $moonphaseDataCache;\r\n
          \r\n
            }\r\n
          \r\n
            // =========================================\r\n
          \r\n
              // Change moon phase and solar/moon eclipse data based on timezone\r\n
              // Use New York timezone (UTC-4) to begin with\r\n
          \r\n
              echo \'&lt;div class=\&quot;row\&quot;&gt;\';\r\n
              echo \'&lt;div class=\&quot;col-lg-6\&quot;&gt;\';\r\n
              // echo \'&lt;p&gt;Below is data in UTC:&lt;/p&gt;\';\r\n
              // echo \'&lt;pre&gt;\';\r\n
              // print_r($data[0]);\r\n
              // print_r($data[1]);\r\n
              // print_r($data[2]);\r\n
              // echo \'&lt;/pre&gt;\';\r\n
              echo \'&lt;/div&gt;\';\r\n
          \r\n
              if ( $utcOffset !== \'0\' ) {\r\n
          \r\n
                // https://stackoverflow.com/a/15472071\r\n
          \r\n
                foreach ($data as &amp;$dataline) {\r\n
          \r\n
                    $convertedTimestamp = $dataline[\'timestamp\'] + $utcOffset*60*60;\r\n
          \r\n
                    $dataline[\'timestamp\'] = $convertedTimestamp;\r\n
          \r\n
                    $convertedFriendlyDate = date(\&quot;F j, Y\&quot;,$convertedTimestamp);\r\n
          \r\n
                    $dataline[\'friendlydate\'] = $convertedFriendlyDate;\r\n
          \r\n
                }\r\n
          \r\n
              } else {}\r\n
          \r\n
              echo \'&lt;div class=\&quot;col-lg-6\&quot;&gt;\';\r\n
              // echo \'&lt;p&gt;Below is data in UTC\'.$utcOffsetString.\':&lt;/p&gt;\';\r\n
              // echo \'&lt;pre&gt;\';\r\n
              // print_r($data[0]);\r\n
              // // print_r($data[1]);\r\n
              // // print_r($data[2]);\r\n
              // echo \'&lt;/pre&gt;\';\r\n
              echo \'&lt;/div&gt;\';\r\n
              echo \'&lt;/div&gt;\';\r\n
          \r\n
              echo \'&lt;div class=\&quot;row\&quot;&gt;\';\r\n
              echo \'&lt;div class=\&quot;col-lg-6\&quot;&gt;\';\r\n
              // echo \'&lt;p&gt;Below is data in UTC:&lt;/p&gt;\';\r\n
              // // echo $planetUpdatePostsContent;\r\n
              // echo \'&lt;pre&gt;\';\r\n
              // print_r($planetUpdatePostsOriginal[0]);\r\n
              // // var_dump($theQueryArray);\r\n
              // echo \'&lt;/pre&gt;\';\r\n
              echo \'&lt;/div&gt;\';\r\n
          \r\n
              echo \'&lt;div class=\&quot;col-lg-6\&quot;&gt;\';\r\n
              // echo \'&lt;p&gt;Below is data in UTC\'.$utcOffsetString.\':&lt;/p&gt;\';\r\n
              // echo \'&lt;pre&gt;\';\r\n
              // print_r($planetUpdatePostsConverted[0]);\r\n
              // echo \'&lt;/pre&gt;\';\r\n
              echo \'&lt;/div&gt;\';\r\n
              echo \'&lt;/div&gt;\';    \r\n
          \r\n
            // =========================================\r\n
          \r\n
            // Turn month number into two digits, \r\n
            // e.g. 7 to 07, but keep 11 as 11\r\n
          \r\n
            $monthRel = str_pad($calendarCurrentMonth,2,\&quot;0\&quot;, STR_PAD_LEFT);\r\n
          \r\n
            // Loop through the days in the month and create cell content\r\n
          \r\n
            while ( $currentDay &lt;= $numberDays ) {\r\n
          \r\n
              // Seventh column (Saturday) reached. Start a new row\r\n
          \r\n
              if ( $dayOfWeek == 7 ) {\r\n
          \r\n
                $dayOfWeek = 0;\r\n
                $calendar .= \'&lt;/tr&gt;&lt;tr&gt;\';\r\n
          \r\n
              }\r\n
          \r\n
              // Turn day number into two digits, \r\n
              // e.g. 7 to 07, but keep 25 as 25\r\n
          \r\n
              $currentDayRel = str_pad($currentDay, 2, \&quot;0\&quot;, STR_PAD_LEFT);\r\n
          \r\n
              // Create date in loop in YYYY-MM-DD format\r\n
              $date = $year.\'-\'.$monthRel.\'-\'.$currentDayRel;\r\n
          \r\n
              $dayName = date(\&quot;l\&quot;, strtotime($date));\r\n
              $dateFriendly = date(\&quot;F j, Y\&quot;, strtotime($date));\r\n
          \r\n
              // Find matching friendly date and get moon phases\r\n
              foreach ($data as $dataline) {\r\n
          \r\n
                foreach ( $dataline as $key =&gt; $value ) {\r\n
          \r\n
                  if ( $key == \'friendlydate\' ) {\r\n
          \r\n
                    if ( $value == $dateFriendly ) {\r\n
                      // echo $value.\' matched! \';\r\n
                      $match = 1;\r\n
                    }\r\n
          \r\n
                  }\r\n
          \r\n
                  if ( ( $match == 1 ) &amp;&amp; ( $key == \'phase\' ) ) {\r\n
          \r\n
                    $moonphase = $value;\r\n
          \r\n
                    if ( $moonphase == \'New Moon\') {\r\n
                      $moonPhaseImgUrl = \'/wp-content/uploads/images/moonphases/new_moon.png\';\r\n
                    } elseif ( $moonphase == \'First Quarter\') {\r\n
                      $moonPhaseImgUrl = \'/wp-content/uploads/images/moonphases/right_quarter_moon.png\';\r\n
                    } elseif ( $moonphase == \'Full Moon\') {\r\n
                      $moonPhaseImgUrl = \'/wp-content/uploads/images/moonphases/full_moon.png\';\r\n
                    } elseif ( $moonphase == \'Last Quarter\') {\r\n
                      $moonPhaseImgUrl = \'/wp-content/uploads/images/moonphases/left_quarter_moon.png\';\r\n
                    } else {}\r\n
          \r\n
                  }\r\n
          \r\n
                  if ( ( $match == 1 ) &amp;&amp; ( $key == \'eclipse\' ) ) {\r\n
          \r\n
                    if ( !empty($value) ) {\r\n
          \r\n
                      $eclipse = $value;\r\n
          \r\n
                      $eclipseImgUrl = \'/wp-content/uploads/images/moonphases/eclipse.png\';\r\n
          \r\n
                    }\r\n
          \r\n
                  }\r\n
          \r\n
                  if ( ( $match == 1 ) &amp;&amp; ( $key == \'eclipse_type\' ) ) {\r\n
          \r\n
                    if ( !empty($value) ) {\r\n
          \r\n
                      $eclipseType = $value;\r\n
          \r\n
                    }\r\n
          \r\n
                  }\r\n
          \r\n
                }\r\n
          \r\n
                unset($match); \r\n
          \r\n
              }\r\n
          \r\n
              // =========================================\r\n
          \r\n
              // Content for each day as $dayContent\r\n
          \r\n
              // =========================================\r\n
          \r\n
              // Key transits from https://theastrologer.com/ical/month.php\r\n
          \r\n
              // =========================================\r\n
          \r\n
              $todaysDate = date(\&quot;n/d/Y\&quot;, strtotime($date));\r\n
              $todaysDateFormatted = date(\&quot;l, F j, Y\&quot;,strtotime($todaysDate));\r\n
              $todaysDateUnix = strtotime($todaysDate);\r\n
          \r\n
              $tomorrowsDate = date(\&quot;n/d/Y\&quot;, strtotime(\'+1 day\', strtotime($date)));\r\n
              $tomorrowsDateFormatted = date(\&quot;l, F j, Y\&quot;,strtotime($tomorrowsDate));\r\n
              $tomorrowsDateUnix = strtotime($tomorrowsDate);\r\n
          \r\n
              // Get VCal data from API #1059. \r\n
          \r\n
              // Convert Date of Birth format\r\n
          \r\n
              if ( !empty($dateOfBirth) ) {\r\n
          \r\n
                $dateOfBirth = date(\&quot;m/d/Y\&quot;, strtotime($dateOfBirth));\r\n
          \r\n
              } else {\r\n
          \r\n
                // Assume DOB of member is August 15, 1967\r\n
          \r\n
                $dateOfBirth = \'08/15/1967\';\r\n
          \r\n
              }\r\n
          \r\n
              $dateOfBirthString = str_replace(\&quot;/\&quot;,\&quot;\&quot;,$dateOfBirth); \r\n
          \r\n
              // Process and show key transits content only for paid calendar\r\n
          \r\n
              if ( $calType === \'paid\' ) {\r\n
          \r\n
                $dayContent = \'&lt;div class=\&quot;tdchild key-transits\&quot;&gt;\';\r\n
          \r\n
                // Define object cache key name using string of DOB and today\'s date in UNIX time\r\n
          \r\n
                $vcalDataCacheKeyname = \'vcal_data_\'.$dateOfBirthString.\'_\'.$todaysDateUnix;\r\n
          \r\n
                // Check if Vcal data exist in cache, if not, retrieve from API and store in cache. If it exist, use it.\r\n
          \r\n
                $vcalDataCache = get_transient( $vcalDataCacheKeyname );\r\n
          \r\n
                if ( false == $vcalDataCache ) {\r\n
          \r\n
                  $urlVcal = \'https://www.zdki.us/taReportsw/MakeReport.aspx?ReportID=37&amp;ReportVariation=rom&amp;ReportFormat=ICS&amp;Name1=John%20Doe&amp;BirthDate1=\'.$dateOfBirth.\'&amp;Name2=&amp;BirthDate2=&amp;StartDate=\'.$todaysDate.\'&amp;Length=1&amp;AccountID=cat_all&amp;AppID=CDS&amp;MemberID=1234567890\';\r\n
          \r\n
          \t\t$username = \'theastroweb\';\r\n
          \t\t$password = \'2Pq0^1IDvZjVs\';\r\n
          \r\n
          \t\t$args = array(\r\n
          \t\t  \'headers\' =&gt; array(\r\n
          \t\t    \'Authorization\' =&gt; \'Basic \' . base64_encode( $username . \':\' . $password )\r\n
          \t\t  )\r\n
          \t\t);\r\n
          \r\n
                  $vcalData = wp_remote_get( $urlVcal, $args );\r\n
          \r\n
                  set_transient( $vcalDataCacheKeyname, $vcalData, 2629746 );\r\n
          \r\n
                } else {\r\n
          \r\n
                  // $cachedDataCheck .= \'&lt;div&gt;Cached \'.$vcalDataCacheKeyname.\' data is used&lt;/div&gt;\';\r\n
          \r\n
                  $vcalData = $vcalDataCache;\r\n
          \r\n
                }\r\n
          \r\n
                if( is_wp_error( $vcalData ) ) {\r\n
                  return false; // Bail early\r\n
                }\r\n
          \r\n
                else {\r\n
          \r\n
                  // $dayContent .= $todaysDate.\'&lt;br /&gt;\';\r\n
          \r\n
                  // Fetch API data in VCalendar format and convert to PHP array\r\n
                  $icalendarData = wp_remote_retrieve_body( $vcalData );\r\n
          \r\n
                  // Remove BEGIN:VEVENT and END:VEVENT lines\r\n
                  $icalendarData = str_replace(\&quot;BEGIN:VEVENT\&quot;, \&quot;\&quot;, $icalendarData);\r\n
                  $icalendarData = str_replace(\&quot;END:VEVENT\&quot;, \&quot;\&quot;, $icalendarData);\r\n
          \r\n
                  // Remove empty lines left over by above string replacements\r\n
                  $icalendarData = preg_replace(\&quot;/^[ \\t]*[\\r\\n]+/m\&quot;, \&quot;\\n\&quot;, $icalendarData);\r\n
          \r\n
                  // Split API data by empty lines into array items\r\n
                  // https://stackoverflow.com/a/7368311\r\n
                  $icalDataArray = preg_split(\&quot;#\\n\\s*\\n#Uis\&quot;, $icalendarData);\r\n
          \r\n
                  // Remove first array containing VCal info\r\n
                  $icalDataArrayFirst = array_shift($icalDataArray);\r\n
          \r\n
                  // Remove last array containing VCal info close tag\r\n
                  $icalDataArrayLast = array_pop($icalDataArray); \r\n
          \r\n
                  // Initialize variable to store the aspects from key influences\r\n
                  $dayAspects = \'\';\r\n
          \r\n
                  // Turn each VEvent into an array of values\r\n
                  foreach ($icalDataArray as &amp;$icalDataArrayItem) {\r\n
          \r\n
                    $icalDataArrayItem = preg_split(\&quot;/((\\r?\\n)|(\\r\\n?))/\&quot;, $icalDataArrayItem);\r\n
          \r\n
                    $icalDataArrayItemLast = array_pop($icalDataArrayItem); \r\n
          \r\n
                    $dateStart = str_replace(\&quot;DTSTART:\&quot;,\&quot;\&quot;,$icalDataArrayItem[2]);\r\n
                    $dateStart = strtotime($dateStart);\r\n
          \r\n
                    $dateEnd = str_replace(\&quot;DTEND:\&quot;,\&quot;\&quot;,$icalDataArrayItem[4]);\r\n
                    $dateEnd = strtotime($dateEnd);\r\n
          \r\n
                    $planetAspect = str_replace(\&quot;SUMMARY:\&quot;,\&quot;\&quot;,$icalDataArrayItem[9]);\r\n
                    $planetAspect = explode(\&quot; \&quot;,$planetAspect);\r\n
                    $firstPlanet = $planetAspect[0];\r\n
                    $combinationAspect = $planetAspect[1];\r\n
                    $secondPlanet = $planetAspect[2];\r\n
                    $planetAspectGlyphs = \'&lt;img src=\&quot;/wp-content/uploads/images/glyphs/\'.$firstPlanet.\'.png\&quot; /&gt;&lt;img src=\&quot;/wp-content/uploads/images/glyphs/\'.$combinationAspect.\'.png\&quot; /&gt;&lt;img src=\&quot;/wp-content/uploads/images/glyphs/\'.$secondPlanet.\'.png\&quot; /&gt;\';\r\n
          \r\n
                    if ( ($todaysDateUnix &gt;= $dateStart) &amp;&amp; ($todaysDateUnix &lt;= $dateEnd) ) {\r\n
          \r\n
                      $categories = str_replace(\&quot;CATEGORIES:\&quot;,\&quot;\&quot;,$icalDataArrayItem[7]);\r\n
                      $categoriesLower = strtolower($categories);\r\n
                      $categoriesArray = explode(\&quot;,\&quot;,$categoriesLower);\r\n
          \r\n
                      $categoriesAvailable = array(\&quot;career\&quot;,\&quot;communication\&quot;,\&quot;diet\&quot;,\&quot;money\&quot;,\&quot;romantic\&quot;,\&quot;traveling\&quot;);\r\n
          \r\n
                      $summary = str_replace(\&quot;SUMMARY:\&quot;,\&quot;\&quot;,$icalDataArrayItem[9]);\r\n
                      $summaryLower = strtolower($summary);\r\n
                      $summaryString = str_replace(\&quot; \&quot;,\&quot;\&quot;,$summaryLower);\r\n
                      $summaryStringCurrentDay = $summaryString.\'\'.$currentDay;\r\n
                      $summaryArray = explode(\&quot; \&quot;,$summaryLower);\r\n
          \r\n
                      $heading = str_replace(\&quot;HEADING:\&quot;,\&quot;\&quot;,$icalDataArrayItem[10]);\r\n
          \r\n
                      $text = str_replace(\&quot;TEXT:\&quot;,\&quot;\&quot;,$icalDataArrayItem[11]);\r\n
          \r\n
                      $description = str_replace(\&quot;DESCRIPTION:\&quot;,\&quot;\&quot;,$icalDataArrayItem[12]);\r\n
          \r\n
                      $dateStart = date(\&quot;F j\&quot;,$dateStart);\r\n
                      $dateEnd = date(\&quot;F j\&quot;,$dateEnd);\r\n
          \r\n
                      // ---------------------------------\r\n
          \r\n
                      // Initialize category classes for $dayAspects after the foreach loop below\r\n
                      $categoryClasses = \'hideif-catempty \';\r\n
          \r\n
                      // Initialize category icons variable\r\n
                      $categoryIcons = \'\';\r\n
          \r\n
                      foreach ($categoriesArray as $categoriesArrayItem) {\r\n
          \r\n
                        if ( !in_array($categoriesArrayItem,$categoriesAvailable) ) {\r\n
          \r\n
                          $categoriesArrayItem = \'other\';\r\n
          \r\n
                        }\r\n
          \r\n
                        $categoryIcons .= \'&lt;img class=\&quot;category-icon \'.$categoriesArrayItem.\'-icon\&quot; src=\&quot;/wp-content/uploads/images/glyphs/\'.$categoriesArrayItem.\'.png\&quot; /&gt;\'; \r\n
          \r\n
                        $categoryClasses .= $categoriesArrayItem.\'-category \';\r\n
          \r\n
                      }\r\n
          \r\n
                      if ( ($firstPlanet == \'Sun\') || ($firstPlanet == \'Mercury\') || ($firstPlanet == \'Venus\') || ($firstPlanet == \'Mars\') ) {\r\n
          \r\n
                        $dayContent .= \'&lt;span class=\&quot;short-influence\&quot;&gt;\';\r\n
          \r\n
                      } else {\r\n
          \r\n
                        $dayContent .= \'&lt;span class=\&quot;long-influence\&quot; style=\&quot;display:none;\&quot;&gt;\';\r\n
          \r\n
                      }\r\n
          \r\n
                      $dayContent .= \'&lt;span class=\&quot;day-aspects \'.$summaryString.\' stooltip-gray stooltip \'.$categoryClasses.\'\&quot; data-toggle=\&quot;modal\&quot; data-target=\&quot;#\'.$summaryStringCurrentDay.\'\&quot; data-tooltip-pos=\&quot;top-center\&quot;&gt;\';\r\n
          \r\n
                      $dayContent .= \'&lt;div class=\&quot;cal-transit-glyphs\&quot;&gt;\'.$planetAspectGlyphs.\'&lt;/div&gt;&lt;div class=\&quot;cal-category-icons\&quot;&gt;\'.$categoryIcons.\'&lt;/div&gt;&lt;div class=\&quot;cal-transit-summary\&quot;&gt;\'.$summary.\'&lt;/div&gt;\';\r\n
          \r\n
                      $dayContent .= \'&lt;div class=\&quot;stooltip-content\&quot;&gt;\'.$dateStart.\' - \'.$dateEnd.\'&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;\';\r\n
          \r\n
                      $dayContent .= \'\r\n
                        &lt;div class=\&quot;modal fade\&quot; id=\&quot;\'.$summaryStringCurrentDay.\'\&quot; tabindex=\&quot;-1\&quot; role=\&quot;dialog\&quot; aria-labelledby=\&quot;\'.$summaryStringCurrentDay.\'Label\&quot;&gt;\r\n
                        &lt;div class=\&quot;modal-dialog\&quot; role=\&quot;document\&quot;&gt;\r\n
                          &lt;div class=\&quot;modal-content\&quot;&gt;\r\n
                            &lt;div class=\&quot;modal-header\&quot;&gt;\r\n
                              &lt;button type=\&quot;button\&quot; class=\&quot;close\&quot; data-dismiss=\&quot;modal\&quot; aria-label=\&quot;Close\&quot;&gt;&lt;span aria-hidden=\&quot;true\&quot;&gt;&amp;times;&lt;/span&gt;&lt;/button&gt;\r\n
                              &lt;h4 class=\&quot;modal-title\&quot; id=\&quot;\'.$summaryStringCurrentDay.\'Label\&quot;&gt;\'.$planetAspectGlyphs.\' \'.$summary.\': \'.$heading.\'&lt;/h4&gt;\r\n
                            &lt;/div&gt;\r\n
                            &lt;div class=\&quot;modal-body\&quot;&gt;\r\n
                              &lt;p class=\&quot;modal-date\&quot;&gt;\'.$dateStart.\' - \'.$dateEnd.\'&lt;/p&gt;\';\r\n
          \r\n
                      $dayContent .= \&quot;&lt;script type=\'text/javascript\'&gt;\r\n
                              jQuery(document).ready( function() {\r\n
                                jQuery(\'.\&quot; . $summaryStringCurrentDay . \&quot;\').on( \'click\', function() {\r\n
                                  jQuery(\'.modal-short-content-\&quot;.$summaryStringCurrentDay.\&quot;\').show();\r\n
                                  jQuery(\'.modal-readmore-\&quot;.$summaryStringCurrentDay.\&quot;\').show();\r\n
                                  jQuery(\'.modal-long-content-\&quot;.$summaryStringCurrentDay.\&quot;\').hide();\r\n
                                  jQuery(\'.modal-readless-\&quot;.$summaryStringCurrentDay.\&quot;\').hide();\r\n
                                });\r\n
                              });\r\n
                            &lt;/script&gt;\&quot;;\r\n
          \r\n
                      $dayContent .= \'\r\n
                              &lt;p class=\&quot;modal-short-content modal-short-content-\'.$summaryStringCurrentDay.\'\&quot;&gt;\'.$text.\'&lt;/p&gt;\r\n
                              &lt;p class=\&quot;modal-long-content modal-long-content-\'.$summaryStringCurrentDay.\'\&quot; style=\&quot;display:none\&quot;&gt;\'.$description.\'&lt;/p&gt;\r\n
                            &lt;/div&gt;\r\n
                            &lt;div class=\&quot;modal-footer\&quot;&gt;\r\n
                              &lt;button type=\&quot;button\&quot; class=\&quot;btn btn-primary modal-readmore-\'.$summaryStringCurrentDay.\'\&quot;&gt;Read more &amp;raquo;&lt;/button&gt;\r\n
                              &lt;button type=\&quot;button\&quot; class=\&quot;btn btn-primary modal-readless-\'.$summaryStringCurrentDay.\'\&quot; style=\&quot;display:none\&quot;&gt;&amp;laquo; Summary&lt;/button&gt;\';\r\n
          \r\n
                        $dayContent .= \&quot;&lt;script type=\'text/javascript\'&gt;\r\n
                          jQuery(document).ready( function() {\r\n
                            jQuery(\'.modal-readmore-\&quot;.$summaryStringCurrentDay.\&quot;\').on( \'click\', function() {\r\n
                              jQuery(\'.modal-short-content-\&quot;.$summaryStringCurrentDay.\&quot;\').hide( \'fast\' );\r\n
                              jQuery(\'.modal-readmore-\&quot;.$summaryStringCurrentDay.\&quot;\').hide( \'fast\' );\r\n
                              jQuery(\'.modal-long-content-\&quot;.$summaryStringCurrentDay.\&quot;\').show( \'fast\' );\r\n
                              jQuery(\'.modal-readless-\&quot;.$summaryStringCurrentDay.\&quot;\').show( \'fast\' );\r\n
                            });\r\n
                            jQuery(\'.modal-readless-\&quot;.$summaryStringCurrentDay.\&quot;\').on( \'click\', function() {\r\n
                              jQuery(\'.modal-short-content-\&quot;.$summaryStringCurrentDay.\&quot;\').show( \'fast\' );\r\n
                              jQuery(\'.modal-readmore-\&quot;.$summaryStringCurrentDay.\&quot;\').show( \'fast\' );\r\n
                              jQuery(\'.modal-long-content-\&quot;.$summaryStringCurrentDay.\&quot;\').hide( \'fast\' );\r\n
                              jQuery(\'.modal-readless-\&quot;.$summaryStringCurrentDay.\&quot;\').hide( \'fast\' );\r\n
                            });\r\n
                          });\r\n
                          &lt;/script&gt;\&quot;;\r\n
          \r\n
                        $dayContent .= \'\r\n
                            &lt;/div&gt;\r\n
                          &lt;/div&gt;\r\n
                        &lt;/div&gt;\r\n
                      &lt;/div&gt;\';\r\n
          \r\n
                      // $dayContent .= \'&lt;p title=\&quot;\'.$summary.\': \'.$heading.\'\&quot;&gt;&lt;img src=\&quot;/wp-content/uploads/images/glyphs/\'.$summaryArray[0].\'.png\&quot; /&gt;&lt;img src=\&quot;/wp-content/uploads/images/glyphs/\'.$summaryArray[1].\'.png\&quot; /&gt;&lt;img src=\&quot;/wp-content/uploads/images/glyphs/\'.$summaryArray[2].\'.png\&quot; /&gt;&lt;/p&gt;\';\r\n
          \r\n
                    } else {}\r\n
          \r\n
                  }\r\n
          \r\n
                }\r\n
          \r\n
                $dayContent .= \'&lt;/div&gt;\';\r\n
          \r\n
              } \r\n
          \r\n
              else {\r\n
          \r\n
                $dayContent = \'&lt;div class=\&quot;tdchild key-transits key-transits-free\&quot;&gt;\';\r\n
          \r\n
                $dayContent .= \'&lt;/div&gt;\';\r\n
          \r\n
              }\r\n
          \r\n
          \r\n
              // =========================================\r\n
          \r\n
              // $dayContent .= \'&lt;div class=\&quot;tdchild key-info\&quot;&gt;\';\r\n
          \r\n
              // End of key-info section\r\n
          \r\n
              // $dayContent .= \'&lt;/div&gt;\';\r\n
          \r\n
              // =========================================\r\n
          \r\n
              // $dayContent .= \'&lt;div class=\&quot;tdchild key-combos\&quot;&gt;\';\r\n
          \r\n
              // $dayContent .= $dayAspects;\r\n
          \r\n
              // $dayContent .= \'&lt;/div&gt;\';\r\n
          \r\n
              // =========================================\r\n
          \r\n
              $dayContent .= \'&lt;div class=\&quot;tdchild key-names\&quot;&gt;\';\r\n
          \r\n
              // Get moon in sign content\r\n
          \r\n
              // Check if cached data exist, otherwise, grab from API and cache it\r\n
          \r\n
              $todaysPlanetsCacheKey = \'todaysplanets_\'.$todaysDateUnix;\r\n
          \r\n
              $tomorrowsPlanetsCacheKey = \'tomorrowsplanets_\'.$tomorrowsDateUnix;\r\n
          \r\n
              $todays_planets_raw_cached = get_transient( $todaysPlanetsCacheKey );\r\n
          \r\n
              $tomorrows_planets_raw_cached = get_transient( $tomorrowsPlanetsCacheKey );\r\n
          \r\n
              if ( false === $todays_planets_raw_cached ) {\r\n
          \r\n
                $todaysPlanetsUrl = \&quot;https://www.zdki.us/taReportsw/DailyIntros.aspx?ReportType=TodaysPlanet&amp;DateFrom=\&quot;.$todaysDate.\&quot;&amp;DateTo=\&quot;.$todaysDate.\&quot;&amp;ReportFormat=XML&amp;NewsFlash=&amp;AccountID=theastrologerWP1&amp;AppID=website&amp;MemberID=1234567890&amp;V=2.5\&quot;;\r\n
          \r\n
          \t\t\t$username = \'theastroweb\';\r\n
          \t\t\t$password = \'2Pq0^1IDvZjVs\';\r\n
          \r\n
          \t\t\t$context = stream_context_create(array(\r\n
          \t\t\t        \'http\' =&gt; array(\r\n
          \t\t\t            \'header\'  =&gt; \&quot;Authorization: Basic \&quot; . base64_encode(\&quot;$username:$password\&quot;)\r\n
          \t\t\t        )\r\n
          \t\t\t    )\r\n
          \t\t\t);\r\n
          \t\t\t$data = file_get_contents($todaysPlanetsUrl, false, $context);\r\n
          \r\n
          \t\t\t$todays_planets_raw = simplexml_load_string($data);\r\n
          \r\n
                // https://stackoverflow.com/a/7797259\r\n
                set_transient( $todaysPlanetsCacheKey, $todays_planets_raw-&gt;asXML(), 2629746 );\r\n
          \r\n
              } else {\r\n
          \r\n
                // $cachedDataCheck .= \'&lt;div&gt;Cached \'.$todaysPlanetsCacheKey.\' data is used&lt;/div&gt;\';\r\n
          \r\n
                // https://stackoverflow.com/a/7797259\r\n
                $todays_planets_raw = simplexml_load_string($todays_planets_raw_cached);\r\n
          \r\n
              }\r\n
          \r\n
              if ( false === $tomorrows_planets_raw_cached ) {\r\n
          \r\n
                $tomorrowsPlanetsUrl = \&quot;https://www.zdki.us/taReportsw/DailyIntros.aspx?ReportType=TodaysPlanet&amp;DateFrom=\&quot;.$tomorrowsDate.\&quot;&amp;DateTo=\&quot;.$tomorrowsDate.\&quot;&amp;ReportFormat=XML&amp;NewsFlash=&amp;AccountID=theastrologerWP1&amp;AppID=website&amp;MemberID=1234567890&amp;V=2.5\&quot;;\r\n
          \r\n
          \t\t\t$username = \'theastroweb\';\r\n
          \t\t\t$password = \'2Pq0^1IDvZjVs\';\r\n
          \r\n
          \t\t\t$context = stream_context_create(array(\r\n
          \t\t\t        \'http\' =&gt; array(\r\n
          \t\t\t            \'header\'  =&gt; \&quot;Authorization: Basic \&quot; . base64_encode(\&quot;$username:$password\&quot;)\r\n
          \t\t\t        )\r\n
          \t\t\t    )\r\n
          \t\t\t);\r\n
          \t\t\t$data = file_get_contents($tomorrowsPlanetsUrl, false, $context);\r\n
          \r\n
          \t\t\t$tomorrows_planets_raw = simplexml_load_string($data);\r\n
          \r\n
                // https://stackoverflow.com/a/7797259\r\n
                set_transient( $tomorrowsPlanetsCacheKey, $tomorrows_planets_raw-&gt;asXML(), 2629746 );\r\n
          \r\n
              } else {\r\n
          \r\n
                // $cachedDataCheck .= \'&lt;div&gt;Cached \'.$tomorrowsPlanetsCacheKey.\' data is used&lt;/div&gt;\';\r\n
          \r\n
                // https://stackoverflow.com/a/7797259\r\n
                $tomorrows_planets_raw = simplexml_load_string($tomorrows_planets_raw_cached);\r\n
          \r\n
              }\r\n
          \r\n
              $datetoday_var = date(\'Ymd\',strtotime($todaysDate));\r\n
              $datetomorrow_var = date(\'Ymd\',strtotime(\'+1 day\',strtotime($todaysDate)));\r\n
          \r\n
              $combination1_name = $todays_planets_raw -&gt;{\'date-\'.$datetoday_var.\'\'}[0]-&gt;todaysplanet[0]-&gt;planet[0]-&gt;name;\r\n
              $combination1_name_lower = strtolower($combination1_name);\r\n
              $combination1_name_trimmed = str_replace(\' \', \'\', $combination1_name_lower);\r\n
          \r\n
              $combination1_sign = $todays_planets_raw -&gt;{\'date-\'.$datetoday_var.\'\'}[0]-&gt;todaysplanet[0]-&gt;planet[0]-&gt;sign;\r\n
              $combination1_sign_lower = strtolower($combination1_sign);\r\n
              $combination1_sign_trimmed = str_replace(\' \', \'\', $combination1_sign_lower);\r\n
          \r\n
              $combination1_sign_tomorrow = $tomorrows_planets_raw -&gt;{\'date-\'.$datetomorrow_var.\'\'}[0]-&gt;todaysplanet[0]-&gt;planet[0]-&gt;sign;\r\n
              $combination1_sign_tomorrow_lower = strtolower($combination1_sign_tomorrow);\r\n
              $combination1_sign_tomorrow_trimmed = str_replace(\' \', \'\', $combination1_sign_tomorrow_lower);\r\n
          \r\n
              $combination1_degree = $todays_planets_raw -&gt;{\'date-\'.$datetoday_var.\'\'}[0]-&gt;todaysplanet[0]-&gt;planet[0]-&gt;degree;\r\n
          \r\n
              $vars = explode(\&quot;.\&quot;,$combination1_degree);\r\n
              $deg = $vars[0];\r\n
              $tempma = \'0.\'.$vars[1];\r\n
              $tempma = $tempma * 3600;\r\n
              $min = floor($tempma / 60);\r\n
              $sec = $tempma - ($min*60);\r\n
              $degmin = $deg.\'\'.$min;\r\n
          \r\n
              $combination1_degree = $deg.\'&amp;deg;\'.$min.\'&amp;apos;\';\r\n
          \r\n
              $combination1_retro = $todays_planets_raw -&gt;{\'date-\'.$datetoday_var.\'\'}[0]-&gt;todaysplanet[0]-&gt;planet[0]-&gt;retro;\r\n
          \r\n
              if ( $combination1_retro == 1) {\r\n
          \r\n
                $combination1_retro_slug = \'rx\'; \r\n
          \r\n
                $retro_symbol = \' &lt;span class=\&quot;retro-symbol\&quot;&gt;Rx&lt;/span&gt;\'; \r\n
          \r\n
              } else {\r\n
          \r\n
                $combination1_retro_slug = \'norx\'; \r\n
          \r\n
                $retro_symbol = \'\'; \r\n
          \r\n
              }\r\n
          \r\n
              $combination1 = $combination1_name_trimmed.\'\'.$combination1_sign_lower.\'today\';\r\n
          \r\n
              $combination1slug =  $combination1_name_trimmed.\'-\'.$combination1_sign_lower.\'-\'.$combination1_retro_slug;\r\n
          \r\n
              $combination1degmin = $combination1.\'\'.$degmin;\r\n
          \r\n
              if ( ($combination1_name_trimmed == \'moon\' ) &amp;&amp; ( $combination1_sign_lower == \'aries\' ) &amp;&amp; ( $combination1_retro_slug == \'norx\' ) ) {\r\n
                $combination1_short_content = \&quot;The Aries Moon brings you energy to help you get things done, but this could be a challenging few days if tact and diplomacy are needed.\&quot;;\r\n
                $combination1_long_content = \&quot;The Aries Moon sends you a burst of energy, spurring you to launch new projects. Your passions are aroused: You\'re taking the initiative, being decisive, working independently and gaining self-confidence. If you take on a leadership role, be careful not to burn your bridges even before you build them! Overreactions are likely as certain feelings and behaviors -- impatience, impulsiveness, belligerence -- are stirred up. Remember, gentle hints can be just as effective as direct commands, if not more so. It\'s all too easy now to rile someone up or hurt their feelings. Of course, you\'re in the mood to provoke people, so you might actually welcome a good argument to clear the air! There\'s not much of a filter between your mind and your mouth at the moment, so if you say exactly what you\'re thinking, be forewarned -- you\'ll have to do damage control later. Even if you don\'t start any squabbles or upset any of your friends, your high energy could still present some challenges. You think you can tackle anything and everything now, plus you\'re more impulsive than usual. You might start several projects at once, only to abandon them all midstream. Try to be realistic about how much you can truly take on. You\'re also feeling adventurous; you may want to experience something -- or someone -- new. Be bold and have fun, but don\'t overcommit yourself. The enthusiasm you feel now could wane in just a few days.\&quot;;  \r\n
              }\r\n
          \r\n
              if ( ($combination1_name_trimmed == \'moon\' ) &amp;&amp; ( $combination1_sign_lower == \'taurus\' ) &amp;&amp; ( $combination1_retro_slug == \'norx\' ) ) {\r\n
                $combination1_short_content = \&quot;The Taurus Moon grounds you and helps you unwind. Throw your back into something important. Then relax and enjoy some good food and company!\&quot;;\r\n
                $combination1_long_content = \&quot;The Taurus Moon grounds your moods and feelings. Its down-to-earth energy helps you work through obstacles and take a more realistic view of your true abilities and limitations. Under the current lunar influence, the world could be falling apart around you, and you\'d stay calm and collected! But chances are good that during these few days, life will seem sweet and easy. In fact, your senses are more heightened than usual to life\'s natural beauty. You appreciate the earth\'s gifts more deeply, making this a great time to walk in the park or work in your garden. Patience, nurturing and strength all come more easily to you now, making you a lovely presence in any company. You\'re into creature comforts -- eating, napping, cuddling, lovemaking -- and you may be tempted to spend all your time indulging in leisurely, pleasurable activities. In fact, your appreciation for life\'s richer pleasures could lead to overindulgence. Heartburn, an expanding waistline and a diminished bank balance are all possible repercussions of this period. Stubbornness, willfulness and downright laziness will also run high now; you may be less willing than usual to compromise, be responsible or exert yourself physically. Other people may be frustrated with your insistence on moving at your own pace and on your own terms, and you could annoy them with your disregard for their schedules. Make sure your leisurely pace isn’t rooted in pure obstinacy!\&quot;;  \r\n
              }\r\n
          \r\n
              if ( ($combination1_name_trimmed == \'moon\' ) &amp;&amp; ( $combination1_sign_lower == \'gemini\' ) &amp;&amp; ( $combination1_retro_slug == \'norx\' ) ) {\r\n
                $combination1_short_content = \&quot;The Gemini Moon sharpens your mind along with your desire for intellectual conversation, but it can also inspire restlessness and anxiety.\&quot;;\r\n
                $combination1_long_content = \&quot;The Gemini Moon affects your powers of concentration and mental prowess. Your mind is sharper and more objective than usual, making this a wonderful time to rely on logic and reason to guide you through your decisions. You\'re thirsty for knowledge and full of imagination, and your ability to retain information is heightened. You might decide now to seek answers to long-standing issues that have been on the back burner for a while. Your curiosity is also stimulated by a desire to increase your general knowledge, and you\'re more talkative and entertaining than usual. Friends and strangers alike will get a kick out of your clever wit, and you’ll have lots to contribute to any conversation, even if you\'re mainly asking questions or playing devil\'s advocate. Any task requiring mental work comes easily to you, from crossword puzzles and Scrabble games to essay writing and research. You\'re mentally versatile, so many different subjects appeal to you now. At the same time, this energy can bring on incessant mental chatter if you\'re not careful. You might feel anxious, nervous or easily distracted, less able than usual to make progress toward your goals. Also, there\'s not much of a filter between your mind and your tongue now, which could lead to stream-of-consciousness chatter. Be sure to give other people equal airtime.\&quot;;  \r\n
              }\r\n
          \r\n
              if ( ($combination1_name_trimmed == \'moon\' ) &amp;&amp; ( $combination1_sign_lower == \'cancer\' ) &amp;&amp; ( $combination1_retro_slug == \'norx\' ) ) {\r\n
                $combination1_short_content = \&quot;A Cancer Moon quiets you down and sends you home for some needed rest. Try not to be sensitive around your roommates and family members.\&quot;;\r\n
                $combination1_long_content = \&quot;The Cancer Moon beckons you to soothe your frazzled nerves by seeking respite from the crazy world. Like a turtle, you might draw into your shell during these few days, refusing to emerge until it feels safe again. You\'ll find yourself a bit more emotional than usual; you might feel unusually touchy with other people, sensitive to their comments and reactions to you, even if they\'re well-intended. You may also be more aware of how your own words affect others. This heightened sense of reality could be overwhelming, leading you to spend some time where you feel safest -- in your own cozy home. Intuition, nurturing and sentimentality are heightened under this lunar energy. You might feel pulled to visit family members or surround yourself with children, or you might simply need a retreat from your daily grind. Nostalgia can lead to a wonderful trip down memory lane, but avoid the urge to romanticize the past, because the present is just as precious. This is not the best time to handle any task or crisis requiring lots of physical exertion. You might feel mired in insecurity, and irrational behavior is likely. You\'ll have to try hard not to let your feelings distort reality. Instead, let yourself spend a few days mulling things over. You can act when reason once again returns and your view of the world is clearer.\&quot;;  \r\n
              }\r\n
          \r\n
              if ( ($combination1_name_trimmed == \'moon\' ) &amp;&amp; ( $combination1_sign_lower == \'leo\' ) &amp;&amp; ( $combination1_retro_slug == \'norx\' ) ) {\r\n
                $combination1_short_content = \&quot;The Leo Moon reminds you to slot in some time for fun and recreation. Just don\'t get so carried away that you neglect your responsibilities!\&quot;;\r\n
                $combination1_long_content = \&quot;The Leo Moon’s playful vibrations ensure that you\'ll want to spend some time doing creative, fun-filled activities that satisfy your inner child. During these few days, you may not feel much of an urge to head for the office, but you\'ll definitely put effort into having a great time. Your friends and family are sure to enjoy your warmth and your vibrant energy. You\'ll find that your spirits, along with your creativity and resilience, are on high now. You\'re dynamic and expressive, enabling you to create beautiful works of art or put on a performance that will wow everyone in the audience. You\'ll be the life of any party you attend; you might even be in the mood to throw one yourself, because surrounding yourself with the people you love best is high on your current to-do list. And since your passions are on high at the moment, so, too, are your reactions and emotions, which may seem larger than life. You love more intensely, your hugs are warmer and more affectionate, and you\'re feeling more generous than usual. You won’t think twice about spending your hard-earned cash on something fleeting but fun, because life is just too short. But you may end up spending beyond your means. Even though you\'re tempted to blow everything off in the name of fun, be sure you can actually afford it. If you go too far overboard, your body -- or your bank account -- will rebel. And finally, remember that there\'s a fine line between passion and drama.\&quot;;  \r\n
              }\r\n
          \r\n
              if ( ($combination1_name_trimmed == \'moon\' ) &amp;&amp; ( $combination1_sign_lower == \'virgo\' ) &amp;&amp; ( $combination1_retro_slug == \'norx\' ) ) {\r\n
                $combination1_short_content = \&quot;The Virgo Moon puts you in an orderly mood. You\'ll scrutinize everything around you, but remember, there is such a thing as \'good enough\'!\&quot;;\r\n
                $combination1_long_content = \&quot;The Virgo Moon makes you more discriminating than usual. Your mind is sharp and you\'ve a keen eye for details, including flaws and imperfections. You\'re generally more objective and less emotional now, which enables you to conduct research, tally numbers or assess anything that requires an acute, dispassionate eye. You\'ll find that your ability to cut to the heart of the matter makes this lunar energy an asset for everything from zipping through technical manuals with greater ease to clearing out your pantry or balancing your checkbook. Critical thinking, detachment and mental stamina are all heightened during this period. Your analytic ability is a lens that filters all manner of distractions and superfluous details, allowing you to get to the point. The only problem is, life is filled with all kinds of tangents, diversions and contradictions! But you\'re so focused on practicality and feasibility that you may have little patience for anyone who doesn\'t grasp the obvious as quickly as you do. When this happens, your irritation will surface fast if you\'re not careful, and the people closest to you could get their feelings hurt as you lecture them on their shortcomings. Insensitivity and irritation are two of the less helpful qualities this lunar energy brings. Be careful not to alienate yourself from people you need. Remember, sometimes, good enough really is good enough!\&quot;;  \r\n
              }\r\n
          \r\n
              if ( ($combination1_name_trimmed == \'moon\' ) &amp;&amp; ( $combination1_sign_lower == \'libra\' ) &amp;&amp; ( $combination1_retro_slug == \'norx\' ) ) {\r\n
                $combination1_short_content = \&quot;The Libra Moon encourages you to exist harmoniously with others, although that may be more difficult during confrontational situations.\&quot;;\r\n
                $combination1_long_content = \&quot;The Libra Moon suffuses life with a peaceful, sociable energy. Suddenly, you feel the urge to cooperate and coexist harmoniously with others. You\'re kind and gracious during this period, and more attuned than normal to artistic beauty. You may be in the mood for a party, if it\'s held in a beautiful house or some other lush setting. But most of all, you want to work effectively with other people in a just and amicable way. You want everyone to get along and have their fair say -- in a calm, balanced manner, of course. Your efforts to make life more pleasant for everyone will sensitize you to others\' words and reactions. When people around you argue or behave aggressively, you might play to both sides or turn the other cheek in an attempt to pretend all is well, even though you know, deep inside, that real life necessarily includes the occasional conflict. But when you pretend otherwise, other people might think you\'re being superficial, two-faced or simply timid. You could have a hard time being decisive under the current energy, since you don\'t want to make a move that might hurt someone\'s feelings. It\'s understandable that you\'d want to force serenity in order to escape the harshness of a sometimes unfriendly and unjust world, but do be aware of this temptation and know that gentle honesty is often more important than any kind of pretense. Remember that you can be true to yourself and to others at the same time.\&quot;;  \r\n
              }\r\n
          \r\n
              if ( ($combination1_name_trimmed == \'moon\' ) &amp;&amp; ( $combination1_sign_lower == \'scorpio\' ) &amp;&amp; ( $combination1_retro_slug == \'norx\' ) ) {\r\n
                $combination1_short_content = \&quot;The Scorpio Moon heightens your perceptions and your emotions, including your passions. This could make for a very interesting few days!\&quot;;\r\n
                $combination1_long_content = \&quot;Under the Scorpio Moon, you\'re less interested in superficial encounters than in making deep emotional connections, whether with yourself, someone you love or the world around you. You’ll find that you experience deeper yearnings during this period, and stronger sensations in your interactions with others. Sensuality, pride and impulsiveness are all heightened now, as is intuition. Lovemaking feels more intense than usual, and your bonds with friends and loved ones deeper. On the more challenging side, arguments and suspicions are more intense during these few days, due to your increased sensitivity. But this quality may also improve your psychic awareness of other people’s motivations. You\'ll understand others well, and you won’t be easily fooled. Meditation could provide useful insight into your own psyche, and could also help you keep the more difficult emotions that arise now -- jealousy, anger, suspicion, impatience -- under control. Temper your reactions, if you can. If others accuse you of flying off the handle over every little thing, they may be right. It\'s easy to misjudge the depth or importance of a given situation during this period. Instead of venting your emotions, try to maintain some inner balance. If you feel yourself getting all worked up, take a deep breath. Getting a little alone time can help you tune in to yourself and channel this lunar power toward something more positive and self-aware.\&quot;;  \r\n
              }\r\n
          \r\n
              if ( ($combination1_name_trimmed == \'moon\' ) &amp;&amp; ( $combination1_sign_lower == \'sagittarius\' ) &amp;&amp; ( $combination1_retro_slug == \'norx\' ) ) {\r\n
                $combination1_short_content = \&quot;The Sagittarius Moon brings an optimistic mood that brightens your daily routine, but make sure your perceptions are grounded in reality.\&quot;;\r\n
                $combination1_long_content = \&quot;The Sagittarius Moon ushers in a period of positive thinking that can make your days joyful, exuberant and energetic. You\'re attracted to such lofty subjects as truth, faith and philosophy. You may feel the urge to travel, either physically or intellectually. \'Outward bound\' holds a lot of meaning for you now! You\'re not nearly as interested in sticking with your daily routine as you are in expanding your consciousness and seeking the answers to life\'s mysteries. These few days might propel you to go mountain climbing, to seek inner truth in a sweat lodge, to sample cuisines of another culture or to attend a documentary film festival that will expose you to brand-new subjects and perspectives. Indeed, your restlessness for activity and adventure isn\'t limited to your mind -- it extends to the rest of your physical being. You feel lucky during this period, and you\'re in such a positive frame of mind that luck may actually be on your side. People will enjoy your spirited company, as long as you stay open-minded. Your mood is so high that you might convince yourself you\'re truly on top of the world. If you try to \'enlighten\' other people with your wide scope of knowledge, you could just come across as fanatic or dogmatic! Impatience and competitiveness are also potential pitfalls during this time. Remember that many different truths have coexisted just fine for millenniums. Keep an open mind and the possibilities will reveal themselves.\&quot;;  \r\n
              }\r\n
          \r\n
              if ( ($combination1_name_trimmed == \'moon\' ) &amp;&amp; ( $combination1_sign_lower == \'capricorn\' ) &amp;&amp; ( $combination1_retro_slug == \'norx\' ) ) {\r\n
                $combination1_short_content = \&quot;The Capricorn Moon calls out your need for security, but remember that taking the safe, steady, practical route isn\'t always the best way.\&quot;;\r\n
                $combination1_long_content = \&quot;The Capricorn Moon triggers your need for comfort, stability and recognition. You have little tolerance now for frenzied energy or inefficient effort. Instead, you want control over your environment, so you can make sure all the potential risks are assessed and the variables contained. You aren\'t in the mood for unpleasant surprises; you want to know what\'s happening next and when, so you can plan around it. Since you\'re so grounded and linear, you can act as an anchor for others who may need your solid strength. This inner stability also brings you patience as you take measured steps toward your goals. You may feel more ambitious than usual, and desiring of others\' admiration and respect. In terms of your career or social standing, this powerful energy can drive you forward, but it\'s less helpful in your emotional connections with loved ones. In fact, you may be a bit cool and aloof during these few days, even with your closest friends in the world. From your perspective, it\'s simple: At the moment, drama queens and their soap opera lives don\'t interest you. Your practical, sensible outlook makes any hint of chaos seem like a foolish waste of time. Know, though, that some people may view you as cold, heartless or power-hungry at this time. Try to remember that no one can succeed in a vacuum. Life is full of surprises, some of which can benefit you. Sometimes, showing your humanity can be more effective than shutting others out.\&quot;;  \r\n
              }\r\n
          \r\n
              if ( ($combination1_name_trimmed == \'moon\' ) &amp;&amp; ( $combination1_sign_lower == \'aquarius\' ) &amp;&amp; ( $combination1_retro_slug == \'norx\' ) ) {\r\n
                $combination1_short_content = \&quot;The Moon in Aquarius brings a restless yet inventive energy. This may make you anxious, or it could help you make important breakthroughs.\&quot;;\r\n
                $combination1_long_content = \&quot;The Moon in Aquarius liberates your mind by activating your imagination. Brilliant insights and a strong desire for radical change are the wave of the present. Good thing the current, restless energy welcomes all manner of improvements and transformations, even drastic ones. A certain excitement is buzzing in the air, and you feel thrilled to be alive. A feeling of rebellion is welling up from within, begging you to jettison any system or situation that seems outmoded, defunct or unfair. Your appreciation for humanity is also heightened. You want to improve the world, to make it a better place for all earthly inhabitants. Or you may just want to make changes to shake things up. You have no patience for the status quo, because clearly, the status quo isn\'t working! This could be a wonderful time to reinvent yourself physically or to shatter outmoded patterns that no longer have any positive place in your life. You could also use this energy to make sweeping improvements at work or to volunteer your time at a charity organization. Do be aware, though, that your jazzed up mood may be difficult for others to be around, especially people who are feeling more sedate than you. Try not to judge them, even if they seem downright apathetic! After all, they\'re just as likely to view you as eccentric, scattered and self-righteous. Bottom line: It\'s wonderful to manifest positive change, but try not to hurt others in the process.\&quot;;  \r\n
              }\r\n
          \r\n
              if ( ($combination1_name_trimmed == \'moon\' ) &amp;&amp; ( $combination1_sign_lower == \'pisces\' ) &amp;&amp; ( $combination1_retro_slug == \'norx\' ) ) {\r\n
                $combination1_short_content = \&quot;The Moon in Pisces engulfs you in a sea of emotions. Try to float on top, caressed by her waves, instead of drowning within her depths!\&quot;;\r\n
                $combination1_long_content = \&quot;The Moon in Pisces draws your emotions to the fore. You\'re feeling things more intensely as you view life through a subjective lens of sensation and intuition. There\'s a sedate, meditative quality to this lunar influence that can be quite soothing. Sensations seem more acute now; colors are more vibrant and love more intoxicating. Your compassion for others is heightened, as well as your flair for romance. Dreaminess, empathy and warmth are all strong influences at the moment. You may feel like devoting yourself body, heart and soul to the person you love best, or submerging yourself in your favorite music or artwork, just to see what images and impressions come to you. This is a wonderful time to let your imagination wander, as the world seems full of possibility. You\'ll receive great inspiration if you open yourself up to it. The key to this period is receptivity -- to a certain extent. After all, there are some inherent challenges that come with this energy. For example, this isn\'t a good time for decisive action or initiative. You\'re emotionally much more pliable than normal, which means you\'re more easily manipulated. Apathy, weakness and escapism can envelop you if you aren\'t careful. You feel real empathy for others and you want to help them in any way you can. Still, don\'t be afraid to stand up for yourself. Silent forbearance isn\'t always the most honest or effective way to keep the peace.\&quot;;  \r\n
              }\r\n
          \r\n
                if ( $combination1_sign_lower == $combination1_sign_tomorrow_lower ) {\r\n
          \r\n
                  $dayContent .=  \'&lt;div class=\&quot;moon-in-sign stooltip-gray stooltip\&quot; data-tooltip-pos=\&quot;top-center\&quot;&gt;&lt;span href=\&quot;#\&quot; class=\&quot;\' . $combination1degmin . \'\&quot; data-toggle=\&quot;modal\&quot; data-target=\&quot;#\'.$combination1degmin.\'\&quot;&gt;&lt;img src=\&quot;/wp-content/uploads/images/glyphs/\'.$combination1_name_lower.\'.png\&quot; /&gt;in &lt;img src=\&quot;/wp-content/uploads/images/glyphs/\'.$combination1_sign_lower.\'.png\&quot; /&gt; \'.$retro_symbol.\'&lt;/span&gt;&lt;div class=\&quot;stooltip-content\&quot;&gt;\'.$combination1_name.\' in \'.$combination1_sign.\'&lt;/div&gt;&lt;/div&gt;\';\r\n
          \r\n
                } else {\r\n
          \r\n
                  $dayContent .=  \'&lt;div class=\&quot;moon-in-sign stooltip-gray stooltip\&quot; data-tooltip-pos=\&quot;top-center\&quot;&gt;&lt;span href=\&quot;#\&quot; class=\&quot;\' . $combination1degmin . \'\&quot; data-toggle=\&quot;modal\&quot; data-target=\&quot;#\'.$combination1degmin.\'\&quot;&gt;&lt;img src=\&quot;/wp-content/uploads/images/glyphs/\'.$combination1_name_lower.\'.png\&quot; /&gt;in &lt;img src=\&quot;/wp-content/uploads/images/glyphs/\'.$combination1_sign_lower.\'.png\&quot; /&gt; \'.$retro_symbol.\'&lt;img class=\&quot;rightarrow\&quot; src=\&quot;/wp-content/uploads/images/glyphs/rightarrow.png\&quot; /&gt;&lt;img src=\&quot;/wp-content/uploads/images/glyphs/\'.$combination1_sign_tomorrow_lower.\'.png\&quot; /&gt;&lt;/span&gt;&lt;div class=\&quot;stooltip-content\&quot;&gt;\'.$combination1_name.\' in \'.$combination1_sign.\' &amp;rArr; \'.$combination1_sign_tomorrow.\'&lt;/div&gt;&lt;/div&gt;\';\r\n
          \r\n
                } \r\n
          \r\n
              // =========================================\r\n
          \r\n
              // Get daily planet aspects content\r\n
          \r\n
              $todaysAspectsCacheKey = \'todaysaspects_\'.$todaysDateUnix;\r\n
          \r\n
              $todays_aspects_raw_cached = get_transient( $todaysAspectsCacheKey );\r\n
          \r\n
              if ( false === $todays_aspects_raw_cached ) {\r\n
          \r\n
                $todaysAspectsUrl = \&quot;https://www.zdki.us/taReportsw/DailyIntros.aspx?ReportType=TodaysAspect&amp;DateFrom=\&quot;.$todaysDate.\&quot;&amp;DateTo=\&quot;.$todaysDate.\&quot;&amp;ReportFormat=XML&amp;NewsFlash=&amp;AccountID=theastrologerWP1&amp;AppID=website&amp;MemberID=1234567890&amp;V=2\&quot;;\r\n
          \r\n
          \t\t\t$username = \'theastroweb\';\r\n
          \t\t\t$password = \'2Pq0^1IDvZjVs\';\r\n
          \r\n
          \t\t\t$context = stream_context_create(array(\r\n
          \t\t\t        \'http\' =&gt; array(\r\n
          \t\t\t            \'header\'  =&gt; \&quot;Authorization: Basic \&quot; . base64_encode(\&quot;$username:$password\&quot;)\r\n
          \t\t\t        )\r\n
          \t\t\t    )\r\n
          \t\t\t);\r\n
          \t\t\t$data = file_get_contents($todaysAspectsUrl, false, $context);\r\n
          \r\n
          \t\t\t$todays_aspects_raw = simplexml_load_string($data);\r\n
          \r\n
                // https://stackoverflow.com/a/7797259\r\n
          \r\n
                set_transient( $todaysAspectsCacheKey, $todays_aspects_raw-&gt;asXML(), 2629746 );\r\n
          \r\n
              } else {\r\n
          \r\n
                // $cachedDataCheck .= \'&lt;div&gt;Cached \'.$todaysAspectsCacheKey.\' data is used&lt;/div&gt;\';\r\n
          \r\n
                // https://stackoverflow.com/a/7797259\r\n
                $todays_aspects_raw = simplexml_load_string($todays_aspects_raw_cached);\r\n
          \r\n
              }\r\n
          \r\n
              $datetoday_var = date(\'Ymd\',strtotime($todaysDate));\r\n
          \r\n
            // First planet aspect combination\r\n
          \r\n
              $combination1_planet1 = $todays_aspects_raw -&gt;{\'date-\'.$datetoday_var.\'\'}[0]-&gt;todaysaspects[0]-&gt;aspect[0]-&gt;planet1;\r\n
          \r\n
              $combination1_planet1_lower = strtolower($combination1_planet1);\r\n
          \r\n
              $combination1_aspect = $todays_aspects_raw -&gt;{\'date-\'.$datetoday_var.\'\'}[0]-&gt;todaysaspects[0]-&gt;aspect[0]-&gt;aspect;\r\n
          \r\n
              $combination1_aspect_lower = strtolower($combination1_aspect);\r\n
          \r\n
              $combination1_planet2 = $todays_aspects_raw -&gt;{\'date-\'.$datetoday_var.\'\'}[0]-&gt;todaysaspects[0]-&gt;aspect[0]-&gt;planet2;\r\n
          \r\n
              $combination1_planet2_lower = strtolower($combination1_planet2);\r\n
          \r\n
              $planet11 = strval($combination1_planet1);\r\n
              $aspect1 = strval($combination1_aspect);\r\n
              $planet12 = strval($combination1_planet2);\r\n
          \r\n
              $combination1 = $combination1_planet1_lower.\'_\'.$combination1_aspect_lower.\'_\'.$combination1_planet2_lower;\r\n
          \r\n
              // Second planet aspect combination\r\n
          \r\n
              $combination2_planet1 = $todays_aspects_raw -&gt;{\'date-\'.$datetoday_var.\'\'}[0]-&gt;todaysaspects[0]-&gt;aspect[1]-&gt;planet1;\r\n
          \r\n
              $combination2_planet1_lower = strtolower($combination2_planet1);\r\n
          \r\n
              $combination2_aspect = $todays_aspects_raw -&gt;{\'date-\'.$datetoday_var.\'\'}[0]-&gt;todaysaspects[0]-&gt;aspect[1]-&gt;aspect;\r\n
          \r\n
              $combination2_aspect_lower = strtolower($combination2_aspect);\r\n
          \r\n
              $combination2_planet2 = $todays_aspects_raw -&gt;{\'date-\'.$datetoday_var.\'\'}[0]-&gt;todaysaspects[0]-&gt;aspect[1]-&gt;planet2;\r\n
          \r\n
              $combination2_planet2_lower = strtolower($combination2_planet2);\r\n
          \r\n
              $planet21 = strval($combination2_planet1);\r\n
              $aspect2 = strval($combination2_aspect);\r\n
              $planet22 = strval($combination2_planet2);\r\n
          \r\n
              $combination2 = $combination2_planet1_lower.\'_\'.$combination2_aspect_lower.\'_\'.$combination2_planet2_lower;\r\n
          \r\n
              // Planet aspects modal windows content\r\n
          \r\n
              if (!empty($combination1_planet1)) {\r\n
          \r\n
                $dayContent .= \'&lt;div class=\&quot;todays-aspect-cal-line stooltip-gray stooltip\&quot; data-tooltip-pos=\&quot;top-center\&quot;&gt;&lt;span class=\&quot;\'.$combination1.\'\&quot; data-toggle=\&quot;modal\&quot; data-target=\&quot;#\'.$combination1.\'\'.$monthRel.\'\'.$currentDay.\'\&quot;&gt;&lt;img src=\&quot;/wp-content/uploads/images/glyphs/\'.$combination1_planet1_lower.\'.png\&quot; /&gt;\';\r\n
          \r\n
                $dayContent .= \'&lt;img src=\&quot;/wp-content/uploads/images/glyphs/\'.$combination1_aspect_lower.\'.png\&quot; /&gt;\';\r\n
          \r\n
                $dayContent .= \'&lt;img src=\&quot;/wp-content/uploads/images/glyphs/\'.$combination1_planet2_lower.\'.png\&quot; /&gt;\';\r\n
          \r\n
                $dayContent .= \'&lt;/span&gt;&lt;div class=\&quot;stooltip-content\&quot;&gt;\'.$combination1_planet1.\' \'.$combination1_aspect.\' \'.$combination1_planet2.\'&lt;/div&gt;&lt;/div&gt;\';\r\n
          \r\n
                $args = array(\r\n
          \r\n
                  \'post_type\' =&gt; \'post\',\r\n
          \r\n
                  \'category_name\' =&gt; \'transit-to-transit\',\r\n
          \r\n
                  \'meta_query\' =&gt; array(\r\n
                      relation =&gt; \'AND\',\r\n
                      array(\r\n
                        \'key\' =&gt; \'wpcf-ta_report_planet1\',\r\n
                        \'value\' =&gt; $planet11\r\n
                      ),\r\n
                      array(\r\n
                        \'key\' =&gt; \'wpcf-ta_report_aspect\',\r\n
                        \'value\' =&gt; $aspect1\r\n
                      ),\r\n
                      array(\r\n
                        \'key\' =&gt; \'wpcf-ta_report_planet2\',\r\n
                        \'value\' =&gt; $planet12\r\n
                      )\r\n
                  )\r\n
          \r\n
                );\r\n
          \r\n
                $the_query = new WP_Query( $args );\r\n
          \r\n
                if ( $the_query-&gt;have_posts() ) {\r\n
          \r\n
                  while ( $the_query-&gt;have_posts() ) {\r\n
          \r\n
                    $the_query-&gt;the_post(); \r\n
          \r\n
                    $dayContent .= \'&lt;div class=\&quot;modal fade\&quot; id=\&quot;\'.$combination1.\'\'.$monthRel.\'\'.$currentDay.\'\&quot; tabindex=\&quot;-1\&quot; role=\&quot;dialog\&quot; aria-labelledby=\&quot;\'.$combination1.\'\'.$monthRel.\'\'.$currentDay.\'Label\&quot;&gt;\r\n
                      &lt;div class=\&quot;modal-dialog\&quot; role=\&quot;document\&quot;&gt;\r\n
                        &lt;div class=\&quot;modal-content todays-aspects-modal\&quot;&gt;\r\n
                          &lt;div class=\&quot;modal-header\&quot;&gt;\r\n
                            &lt;button type=\&quot;button\&quot; class=\&quot;close\&quot; data-dismiss=\&quot;modal\&quot; aria-label=\&quot;Close\&quot;&gt;&lt;span aria-hidden=\&quot;true\&quot;&gt;&amp;times;&lt;/span&gt;&lt;/button&gt;\r\n
                            &lt;h4 class=\&quot;modal-title\&quot; id=\&quot;\'.$combination1.\'\'.$monthRel.\'\'.$currentDay.\'Label\&quot;&gt;\r\n
                              &lt;img class=\&quot;todays-aspect-planet1\&quot; src=\&quot;/wp-content/uploads/images/glyphs/\'.$combination1_planet1_lower.\'.png\&quot; /&gt;\r\n
                              &lt;img class=\&quot;todays-aspect\&quot; src=\&quot;/wp-content/uploads/images/glyphs/\'.$combination1_aspect_lower.\'.png\&quot; /&gt;\r\n
                              &lt;img class=\&quot;todays-aspect-planet2\&quot; src=\&quot;/wp-content/uploads/images/glyphs/\'.$combination1_planet2_lower.\'.png\&quot; /&gt;\r\n
                              \'. $combination1_planet1 . \' \' . $combination1_aspect . \' \' . $combination1_planet2 .\'\r\n
                            &lt;/h4&gt;\r\n
                          &lt;/div&gt;\r\n
                          &lt;div class=\&quot;modal-body\&quot;&gt;\r\n
                            &lt;p class=\&quot;modal-date\&quot;&gt;\'.$todaysDateFormatted.\'&lt;/p&gt;\';\r\n
          \r\n
                            ob_start();\r\n
                            the_content();\r\n
                            $theContent = ob_get_clean();\r\n
          \r\n
                            $theContent = str_replace(\&quot;’\&quot;,\&quot;\'\&quot;,$theContent);\r\n
          \r\n
                            $dayContent .= $theContent;\r\n
          \r\n
                            // Add today\'s Planet Update post (if available)\r\n
                            // $dayContent .= $planetUpdatePosts;\r\n
          \r\n
                        $dayContent .= \'&lt;/div&gt;\r\n
                          &lt;div class=\&quot;modal-footer\&quot;&gt;\r\n
                            &lt;button type=\&quot;button\&quot; class=\&quot;btn btn-default\&quot; data-dismiss=\&quot;modal\&quot;&gt;Close&lt;/button&gt;\r\n
                          &lt;/div&gt;\r\n
                        &lt;/div&gt;\r\n
                      &lt;/div&gt;\r\n
                    &lt;/div&gt;\';\r\n
          \r\n
                  }\r\n
          \r\n
                  wp_reset_postdata();\r\n
          \r\n
                } else {}\r\n
          \r\n
              }\r\n
          \r\n
              if (!empty($combination2_planet1)) {\r\n
          \r\n
                $dayContent .= \'&lt;div class=\&quot;todays-aspect-cal-line stooltip-gray stooltip\&quot; data-tooltip-pos=\&quot;top-center\&quot;&gt;&lt;span class=\&quot;\'.$combination2.\'\&quot; data-toggle=\&quot;modal\&quot; data-target=\&quot;#\'.$combination2.\'\'.$monthRel.\'\'.$currentDay.\'\&quot;&gt;&lt;img src=\&quot;/wp-content/uploads/images/glyphs/\'.$combination2_planet1_lower.\'.png\&quot; /&gt;\';\r\n
          \r\n
                $dayContent .= \'&lt;img src=\&quot;/wp-content/uploads/images/glyphs/\'.$combination2_aspect_lower.\'.png\&quot; /&gt;\';\r\n
          \r\n
                $dayContent .= \'&lt;img src=\&quot;/wp-content/uploads/images/glyphs/\'.$combination2_planet2_lower.\'.png\&quot; /&gt;\';\r\n
          \r\n
                $dayContent .= \'&lt;/span&gt;&lt;div class=\&quot;stooltip-content\&quot;&gt;\'.$combination2_planet1.\' \'.$combination2_aspect.\' \'.$combination2_planet2.\'&lt;/div&gt;&lt;/div&gt;\';\r\n
          \r\n
                $args = array(\r\n
                  \'post_type\' =&gt; \'post\',\r\n
                  \'category_name\' =&gt; \'transit-to-transit\',\r\n
                  \'meta_query\' =&gt; array(\r\n
                      relation =&gt; \'AND\',\r\n
                      array(\r\n
                        \'key\' =&gt; \'wpcf-ta_report_planet1\',\r\n
                        \'value\' =&gt; $planet21\r\n
                      ),\r\n
                      array(\r\n
                        \'key\' =&gt; \'wpcf-ta_report_aspect\',\r\n
                        \'value\' =&gt; $aspect2\r\n
                      ),\r\n
                      array(\r\n
                        \'key\' =&gt; \'wpcf-ta_report_planet2\',\r\n
                        \'value\' =&gt; $planet22\r\n
                      )\r\n
                  )\r\n
          \r\n
                );\r\n
          \r\n
                $the_query = new WP_Query( $args );\r\n
          \r\n
                if ( $the_query-&gt;have_posts() ) {\r\n
          \r\n
                  while ( $the_query-&gt;have_posts() ) {\r\n
          \r\n
                    $the_query-&gt;the_post(); \r\n
          \r\n
                    $dayContent .= \'&lt;div class=\&quot;modal fade\&quot; id=\&quot;\'.$combination2.\'\'.$monthRel.\'\'.$currentDay.\'\&quot; tabindex=\&quot;-1\&quot; role=\&quot;dialog\&quot; aria-labelledby=\&quot;\'.$combination2.\'\'.$monthRel.\'\'.$currentDay.\'Label\&quot;&gt;\r\n
                      &lt;div class=\&quot;modal-dialog\&quot; role=\&quot;document\&quot;&gt;\r\n
                        &lt;div class=\&quot;modal-content todays-aspects-modal\&quot;&gt;\r\n
                          &lt;div class=\&quot;modal-header\&quot;&gt;\r\n
                            &lt;button type=\&quot;button\&quot; class=\&quot;close\&quot; data-dismiss=\&quot;modal\&quot; aria-label=\&quot;Close\&quot;&gt;&lt;span aria-hidden=\&quot;true\&quot;&gt;&amp;times;&lt;/span&gt;&lt;/button&gt;\r\n
                            &lt;h4 class=\&quot;modal-title\&quot; id=\&quot;\'.$combination2.\'\'.$monthRel.\'\'.$currentDay.\'Label\&quot;&gt;\r\n
                              &lt;img class=\&quot;todays-aspect-planet1\&quot; src=\&quot;/wp-content/uploads/images/glyphs/\'.$combination2_planet1_lower.\'.png\&quot; /&gt;\r\n
                              &lt;img class=\&quot;todays-aspect\&quot; src=\&quot;/wp-content/uploads/images/glyphs/\'.$combination2_aspect_lower.\'.png\&quot; /&gt;\r\n
                              &lt;img class=\&quot;todays-aspect-planet2\&quot; src=\&quot;/wp-content/uploads/images/glyphs/\'.$combination2_planet2_lower.\'.png\&quot; /&gt;\r\n
                              \'. $combination2_planet1 . \' \' . $combination2_aspect . \' \' . $combination2_planet2 .\'\r\n
                            &lt;/h4&gt;\r\n
                          &lt;/div&gt;\r\n
                          &lt;div class=\&quot;modal-body\&quot;&gt;\r\n
                            &lt;p class=\&quot;modal-date\&quot;&gt;\'.$todaysDateFormatted.\'&lt;/p&gt;\';\r\n
          \r\n
                            ob_start();\r\n
                            the_content();\r\n
                            $theContent = ob_get_clean();\r\n
          \r\n
                            $dayContent .= $theContent;\r\n
          \r\n
                            // Add today\'s Planet Update post (if available)\r\n
                            // $dayContent .= $planetUpdatePosts;\r\n
          \r\n
                        $dayContent .= \'&lt;/div&gt;\r\n
                          &lt;div class=\&quot;modal-footer\&quot;&gt;\r\n
                            &lt;button type=\&quot;button\&quot; class=\&quot;btn btn-default\&quot; data-dismiss=\&quot;modal\&quot;&gt;Close&lt;/button&gt;\r\n
                          &lt;/div&gt;\r\n
                        &lt;/div&gt;\r\n
                      &lt;/div&gt;\r\n
                    &lt;/div&gt;\';\r\n
          \r\n
                  }\r\n
          \r\n
                  wp_reset_postdata();\r\n
          \r\n
                } else {}\r\n
          \r\n
              }\r\n
          \r\n
              // =========================================\r\n
          \r\n
              // Display today\'s Planet Update post (if available)\r\n
          \r\n
              foreach ( $planetUpdatePosts as $postItem ) {\r\n
          \r\n
                foreach ( $postItem as $key =&gt; $value ) {\r\n
          \r\n
                  if ( $key == \'title\' ) {\r\n
          \r\n
                    $postTitle = $value;\r\n
          \r\n
                  }\r\n
          \r\n
                  if ( $key == \'link\' ) {\r\n
          \r\n
                    $postLink = $value;\r\n
          \r\n
                  }\r\n
          \r\n
                  if ( $key == \'glyph1\' ) {\r\n
          \r\n
                    $postGlyph1 = $value;              \r\n
          \r\n
                  }\r\n
          \r\n
                  if ( $key == \'glyph2\' ) {\r\n
          \r\n
                    $postGlyph2 = $value;              \r\n
          \r\n
                  }\r\n
          \r\n
                  if ( $key == \'glyph3\' ) {\r\n
          \r\n
                    $postGlyph3 = $value;              \r\n
          \r\n
                  }\r\n
          \r\n
                  if ( $key == \'publishdate\' ) {\r\n
          \r\n
                    $publishDateFormatted = date(\'j\', strtotime($value));\r\n
          \r\n
                    if ( $publishDateFormatted == $currentDay ) {\r\n
                      \r\n
                      $dayContent .= \'&lt;div class=\&quot;planet-updates-cal stooltip-gray stooltip\&quot; data-tooltip-pos=\&quot;top-center\&quot;&gt;&lt;a href=\&quot;\'.$postLink.\'\&quot; target=\&quot;_blank\&quot;&gt;\'.$postGlyph1.\'\'.$postGlyph2.\'\'.$postGlyph3.\'&lt;/a&gt;&lt;div class=\&quot;stooltip-content\&quot;&gt;\'.$postTitle.\'&lt;/div&gt;&lt;/div&gt;\';\r\n
          \r\n
                    }\r\n
          \r\n
                  }\r\n
          \r\n
                }\r\n
          \r\n
              }\r\n
          \r\n
              // =========================================\r\n
          \r\n
              // \&quot;Moon in sign\&quot; modal windows content\r\n
          \r\n
              $dayContent .= \'&lt;div class=\&quot;modal fade\&quot; id=\&quot;\' . $combination1degmin . \'\&quot; tabindex=\&quot;-1\&quot; role=\&quot;dialog\&quot; aria-labelledby=\&quot;\' .$combination1degmin . \'Label\&quot;&gt;\r\n
                &lt;div class=\&quot;modal-dialog\&quot; role=\&quot;document\&quot;&gt;\r\n
                  &lt;div class=\&quot;modal-content todays-planets-modal\&quot;&gt;\r\n
                    &lt;div class=\&quot;modal-header\&quot;&gt;\r\n
          \r\n
                      &lt;button type=\&quot;button\&quot; class=\&quot;close\&quot; data-dismiss=\&quot;modal\&quot; aria-label=\&quot;Close\&quot;&gt;&lt;span aria-hidden=\&quot;true\&quot;&gt;&amp;times;&lt;/span&gt;&lt;/button&gt;\r\n
          \r\n
                      &lt;h4 class=\&quot;modal-title\&quot; id=\&quot;\' . $combination1degmin . \'Label\&quot;&gt;\' . $combination1_name .  \' in \' .$combination1_sign . \'&lt;img class=\&quot;todays-planet-name\&quot; src=\&quot;/wp-content/uploads/images/glyphs/\' . $combination1_name_trimmed . \'.png\&quot; /&gt;&lt;img class=\&quot;todays-planet-sign\&quot; src=\&quot;/wp-content/uploads/images/glyphs/\' . $combination1_sign_trimmed . \'.png\&quot; /&gt;&lt;/h4&gt;\r\n
          \r\n
                    &lt;/div&gt;\r\n
          \r\n
                    &lt;div class=\&quot;modal-body\&quot;&gt;\r\n
                  &lt;p class=\&quot;modal-date\&quot;&gt;\'.$todaysDateFormatted.\'&lt;/p&gt;\r\n
                  &lt;div class=\&quot;dos-donts-\'.$combination1degmin.\'\&quot;&gt;&lt;/div&gt;\';\r\n
          \r\n
              $dayContent .= \&quot;&lt;script type=\'text/javascript\'&gt;\r\n
                  jQuery(document).ready( function() {\r\n
                    jQuery(\'.\&quot;.$combination1degmin.\&quot;\').on( \'click\', function() {\r\n
                      jQuery(\'.dos-donts-\&quot;.$combination1degmin.\&quot;\').load( \'/today/\&quot;.$combination1slug.\&quot;/\' );\r\n
                      jQuery(\'.modal-long-content-\&quot;.$combination1degmin.\&quot;\').hide();\r\n
                      jQuery(\'.modal-readless-\&quot;.$combination1degmin.\&quot;\').hide();\r\n
                    });\r\n
                  });\r\n
                  &lt;/script&gt;\&quot;;\r\n
          \r\n
              $dayContent .= \'&lt;p class=\&quot;modal-short-content-\'.$combination1degmin.\'\&quot;&gt;\' . $combination1_short_content . \'&lt;/p&gt;\r\n
                  &lt;p class=\&quot;modal-long-content-\'.$combination1degmin.\'\&quot;&gt;\' . $combination1_long_content . \'&lt;/p&gt;\r\n
                    &lt;/div&gt;\r\n
                    &lt;div class=\&quot;modal-footer\&quot;&gt;\r\n
                      &lt;button type=\&quot;button\&quot; class=\&quot;btn btn-primary modal-readmore-\'.$combination1degmin.\'\&quot;&gt;Read more &amp;raquo;&lt;/button&gt;\r\n
                      &lt;button type=\&quot;button\&quot; class=\&quot;btn btn-primary modal-readless-\'.$combination1degmin.\'\&quot;&gt;&amp;laquo; Summary&lt;/button&gt;\';\r\n
          \r\n
              $dayContent .= \&quot;&lt;script type=\'text/javascript\'&gt;\r\n
                  jQuery(document).ready( function() {\r\n
                    jQuery(\'.modal-readmore-\&quot;.$combination1degmin.\&quot;\').on( \'click\', function() {\r\n
                      jQuery(\'.modal-date\').hide( \'fast\' );\r\n
                      jQuery(\'.dos-donts-\&quot;.$combination1degmin.\&quot;\').hide( \'fast\' );\r\n
                      jQuery(\'.modal-short-content-\&quot;.$combination1degmin.\&quot;\').hide( \'fast\' );\r\n
                      jQuery(\'.modal-readmore-\&quot;.$combination1degmin.\&quot;\').hide( \'fast\' );\r\n
                      jQuery(\'.modal-long-content-\&quot;.$combination1degmin.\&quot;\').show( \'fast\' );\r\n
                      jQuery(\'.modal-readless-\&quot;.$combination1degmin.\&quot;\').show( \'fast\' );\r\n
                    });\r\n
                    jQuery(\'.modal-readless-\&quot;.$combination1degmin.\&quot;\').on( \'click\', function() {\r\n
                      jQuery(\'.modal-date\').show( \'fast\' );\r\n
                      jQuery(\'.dos-donts-\&quot;.$combination1degmin.\&quot;\').show( \'fast\' );\r\n
                      jQuery(\'.modal-short-content-\&quot;.$combination1degmin.\&quot;\').show( \'fast\' );\r\n
                      jQuery(\'.modal-readmore-\&quot;.$combination1degmin.\&quot;\').show( \'fast\' );\r\n
                      jQuery(\'.modal-long-content-\&quot;.$combination1degmin.\&quot;\').hide( \'fast\' );\r\n
                      jQuery(\'.modal-readless-\&quot;.$combination1degmin.\&quot;\').hide( \'fast\' );\r\n
                    });\r\n
                  });\r\n
                  &lt;/script&gt;\&quot;;\r\n
          \r\n
              $dayContent .= \'&lt;/div&gt;\r\n
                  &lt;/div&gt;\r\n
                &lt;/div&gt;\';\r\n
          \r\n
              $dayContent .= \'&lt;/div&gt;\';\r\n
          \r\n
              // =========================================\r\n
          \r\n
              // Get celebrity names having a birthday today\r\n
          \r\n
              $celebBdaysCacheKey = \'celebbdays_\'.$todaysDateUnix;\r\n
          \r\n
              $celeb_bdays_raw_cached = get_transient( $celebBdaysCacheKey );\r\n
          \r\n
              if ( false === $celeb_bdays_raw_cached ) {\r\n
          \r\n
                $celebBdaysUrl = \&quot;https://www.zdki.us/taReportsw/DailyIntros.aspx?ReportType=CelebBirthday&amp;DateFrom=\&quot;.$todaysDate.\&quot;&amp;DateTo=\&quot;.$todaysDate.\&quot;&amp;ReportFormat=XML&amp;NewsFlash=&amp;AccountID=theastrologerWP1&amp;AppID=website&amp;MemberID=1234567890&amp;V=2\&quot;;\r\n
          \r\n
          \t\t\t$username = \'theastroweb\';\r\n
          \t\t\t$password = \'2Pq0^1IDvZjVs\';\r\n
          \r\n
          \t\t\t$context = stream_context_create(array(\r\n
          \t\t\t        \'http\' =&gt; array(\r\n
          \t\t\t            \'header\'  =&gt; \&quot;Authorization: Basic \&quot; . base64_encode(\&quot;$username:$password\&quot;)\r\n
          \t\t\t        )\r\n
          \t\t\t    )\r\n
          \t\t\t);\r\n
          \t\t\t$data = file_get_contents($celebBdaysUrl, false, $context);\r\n
          \r\n
          \t\t\t$celeb_bday_raw = simplexml_load_string($data);\r\n
          \r\n
                // https://stackoverflow.com/a/7797259\r\n
          \r\n
                set_transient( $celebBdaysCacheKey, $celeb_bday_raw-&gt;asXML(), 2629746 );\r\n
          \r\n
              } else {\r\n
          \r\n
                // $cachedDataCheck .= \'&lt;div&gt;Cached \'.$celebBdaysCacheKey.\' data is used&lt;/div&gt;\';\r\n
          \r\n
                // https://stackoverflow.com/a/7797259\r\n
                $celeb_bday_raw = simplexml_load_string($celeb_bdays_raw_cached);\r\n
          \r\n
              }\r\n
          \r\n
              $datetoday_var = date(\'Ymd\',strtotime($todaysDate));\r\n
          \r\n
              // 1st celebrity data\r\n
          \r\n
              $celeb_name1 = $celeb_bday_raw -&gt;{\'date-\'.$datetoday_var.\'\'}[0]-&gt;celebbirthdays[0]-&gt;celeb[0]-&gt;celebname;\r\n
          \r\n
              $celeb_birthyear1 = $celeb_bday_raw -&gt;{\'date-\'.$datetoday_var.\'\'}[0]-&gt;celebbirthdays[0]-&gt;celeb[0]-&gt;celebbirthdate;\r\n
              $celeb_birthyear1 = date(\&quot;Y\&quot;,strtotime($celeb_birthyear1));\r\n
          \r\n
              // 2nd celebrity data\r\n
          \r\n
              $celeb_name2 = $celeb_bday_raw -&gt;{\'date-\'.$datetoday_var.\'\'}[0]-&gt;celebbirthdays[0]-&gt;celeb[1]-&gt;celebname;\r\n
          \r\n
              $celeb_birthyear2 = $celeb_bday_raw -&gt;{\'date-\'.$datetoday_var.\'\'}[0]-&gt;celebbirthdays[0]-&gt;celeb[1]-&gt;celebbirthdate;\r\n
              $celeb_birthyear2 = date(\&quot;Y\&quot;,strtotime($celeb_birthyear2));\r\n
          \r\n
              // 3rd celebrity data\r\n
          \r\n
              $celeb_name3 = $celeb_bday_raw -&gt;{\'date-\'.$datetoday_var.\'\'}[0]-&gt;celebbirthdays[0]-&gt;celeb[2]-&gt;celebname;\r\n
          \r\n
              $celeb_birthyear3 = $celeb_bday_raw -&gt;{\'date-\'.$datetoday_var.\'\'}[0]-&gt;celebbirthdays[0]-&gt;celeb[2]-&gt;celebbirthdate;\r\n
              $celeb_birthyear3 = date(\&quot;Y\&quot;,strtotime($celeb_birthyear3));\r\n
          \r\n
              // 1st celebrity conditional display\r\n
          \r\n
              if (!empty($celeb_name1)) {\r\n
          \r\n
                $celeb1Plain = $celeb_name1.\' \'.$celeb_birthyear1;\r\n
          \r\n
                // $celeb1Formatted = \'&lt;p class=\&quot;celeb-bday-cal\&quot;&gt;\'.$celeb_name1.\' \'.$celeb_birthyear1.\'&lt;/p&gt;\';\r\n
          \r\n
                // $dayContent .= $celeb1Formatted;\r\n
          \r\n
              }\r\n
          \r\n
              // 2nd celebrity conditional display\r\n
          \r\n
              if (!empty($celeb_name2)) {\r\n
          \r\n
                $celeb2Plain = $celeb_name2.\' \'.$celeb_birthyear2;\r\n
          \r\n
                // $celeb2Formatted = \'&lt;p class=\&quot;celeb-bday-cal\&quot;&gt;\'.$celeb_name2.\' \'.$celeb_birthyear2.\'&lt;/p&gt;\';\r\n
          \r\n
                // $dayContent .= $celeb2Formatted;\r\n
          \r\n
              }\r\n
          \r\n
              $dayContent .=  \'&lt;/div&gt;\';\r\n
          \r\n
              // =========================================\r\n
          \r\n
              // Add date cells incorporating today\'s css class and moon phase\r\n
          \r\n
              if ( ( $currentDay == $today) &amp;&amp; isset($moonphase) ) {\r\n
          \r\n
                $calendar .=\'&lt;td class=\&quot;day today\&quot; rel=\&quot;\'.$date.\'\&quot;&gt;\';\r\n
                \r\n
                if ( !empty($eclipse) ) {\r\n
          \r\n
                  $calendar .= \'&lt;div class=\&quot;tdchild date stooltip-gray stooltip\&quot; data-tooltip-pos=\&quot;top-center\&quot;&gt;&lt;div class=\&quot;moonphase-eclipse iseclipse\&quot;&gt;&lt;img src=\&quot;\'.$eclipseImgUrl.\'\&quot; /&gt;\';\r\n
          \r\n
                  $calendar .= \'&lt;span class=\&quot;eclipse\&quot; title=\&quot;\'.$eclipseType.\'\&quot;&gt;\'.$eclipse.\'&lt;/span&gt;\';\r\n
          \r\n
                } else {\r\n
          \r\n
                  $calendar .= \'&lt;div class=\&quot;tdchild date stooltip-gray stooltip\&quot; data-tooltip-pos=\&quot;top-center\&quot;&gt;&lt;div class=\&quot;moonphase-eclipse\&quot;&gt;&lt;img src=\&quot;\'.$moonPhaseImgUrl.\'\&quot; /&gt;\';\r\n
          \r\n
                }\r\n
          \r\n
                $calendar .= \'&lt;span class=\&quot;moonphase\&quot;&gt;\'.$moonphase.\'&lt;/span&gt;&lt;/div&gt;&lt;div class=\&quot;stooltip-content\&quot;&gt;\'.$celeb1Plain.\'&lt;br /&gt;\'.$celeb2Plain.\'&lt;/div&gt;&lt;/div&gt;\';\r\n
          \r\n
                $calendar .= $dayContent;\r\n
                \r\n
                $calendar .= \'&lt;/td&gt;\'; \r\n
          \r\n
              } elseif ( ( $currentDay !== $today) &amp;&amp; isset($moonphase) ) {\r\n
                \r\n
                $calendar .=\'&lt;td class=\&quot;day\&quot; rel=\&quot;\'.$date.\'\&quot;&gt;\';\r\n
                \r\n
                if ( !empty($eclipse) ) {\r\n
          \r\n
                  $calendar .= \'&lt;div class=\&quot;tdchild date stooltip-gray stooltip\&quot; data-tooltip-pos=\&quot;top-center\&quot;&gt;&lt;div class=\&quot;moonphase-eclipse iseclipse\&quot;&gt;&lt;img src=\&quot;\'.$eclipseImgUrl.\'\&quot; /&gt;\';\r\n
          \r\n
                  $calendar .= \'&lt;span class=\&quot;eclipse\&quot; title=\&quot;\'.$eclipseType.\'\&quot;&gt;\'.$eclipse.\'&lt;/span&gt;\';\r\n
          \r\n
                } else {\r\n
          \r\n
                  $calendar .= \'&lt;div class=\&quot;tdchild date stooltip-gray stooltip\&quot; data-tooltip-pos=\&quot;top-center\&quot;&gt;&lt;div class=\&quot;moonphase-eclipse\&quot;&gt;&lt;img src=\&quot;\'.$moonPhaseImgUrl.\'\&quot; /&gt;\';\r\n
          \r\n
                }\r\n
          \r\n
                $calendar .= \'&lt;span class=\&quot;moonphase\&quot;&gt;\'.$moonphase.\'&lt;/span&gt;&lt;/div&gt;&lt;div class=\&quot;stooltip-content\&quot;&gt;\'.$celeb1Plain.\'&lt;br /&gt;\'.$celeb2Plain.\'&lt;/div&gt;&lt;/div&gt;\';\r\n
          \r\n
                $calendar .= $dayContent;\r\n
                \r\n
                $calendar .= \'&lt;/td&gt;\';\r\n
          \r\n
              } elseif (  ( $currentDay == $today ) &amp;&amp; !isset($moonphase) ) {\r\n
          \r\n
                $calendar .=\'&lt;td class=\&quot;day today\&quot; rel=\&quot;\'.$date.\'\&quot;&gt;\';\r\n
                \r\n
                $calendar .= \'&lt;div class=\&quot;tdchild date stooltip-gray stooltip\&quot; data-tooltip-pos=\&quot;top-center\&quot;&gt;\'.$currentDay.\'&lt;div class=\&quot;dayname\&quot;&gt;\'.$dayName.\'&lt;/div&gt;&lt;div class=\&quot;stooltip-content\&quot;&gt;\'.$celeb1Plain.\'&lt;br /&gt;\'.$celeb2Plain.\'&lt;/div&gt;&lt;/div&gt;\';\r\n
          \r\n
                $calendar .= $dayContent;\r\n
                \r\n
                $calendar .= \'&lt;/td&gt;\';\r\n
          \r\n
              } else {\r\n
          \r\n
                $calendar .=\'&lt;td class=\&quot;day\&quot; rel=\&quot;\'.$date.\'\&quot;&gt;\';\r\n
                \r\n
                $calendar .= \'&lt;div class=\&quot;tdchild date nophaseeclipse stooltip-gray stooltip\&quot; data-tooltip-pos=\&quot;top-center\&quot;&gt;\'.$currentDay.\'&lt;div class=\&quot;dayname\&quot;&gt;\'.$dayName.\'&lt;/div&gt;&lt;div class=\&quot;stooltip-content\&quot;&gt;\'.$celeb1Plain.\'&lt;br /&gt;\'.$celeb2Plain.\'&lt;/div&gt;&lt;/div&gt;\';\r\n
          \r\n
                $calendar .= $dayContent;\r\n
          \r\n
                $calendar .= \'&lt;/td&gt;\';\r\n
          \r\n
              }\r\n
          \r\n
              // Increment counters\r\n
              $currentDay++;\r\n
              $dayOfWeek++;\r\n
          \r\n
              unset($dataline); \r\n
              unset($key); \r\n
              unset($value); \r\n
              unset($moonphase); \r\n
              unset($eclipse);\r\n
              unset($eclipseType); \r\n
              \r\n
            }\r\n
          \r\n
            // =========================================\r\n
          \r\n
            // Complete the row of the last week in month, if necessary,\r\n
            // when last day of the month is not on a Saturday (index = 6)\r\n
          \r\n
            if ( $dayOfWeek !=7 ) {\r\n
          \r\n
              $remainingDays = 7 - $dayOfWeek;\r\n
          \r\n
              $i = 0;\r\n
          \r\n
              while ( $i &lt; $remainingDays ) {\r\n
          \r\n
                // $calendar .= \'&lt;td colspan=\&quot;\'.$remainingDays.\'\&quot; class=\&quot;day other-month\&quot;&gt;&amp;nbsp;&lt;/td&gt;\';\r\n
                $calendar .= \'&lt;td class=\&quot;day other-month\&quot;&gt;&amp;nbsp;&lt;/td&gt;\';\r\n
          \r\n
                $i++;\r\n
          \r\n
              }\r\n
          \r\n
            }\r\n
          \r\n
            $calendar .= \'&lt;/tr&gt;\';\r\n
            $calendar .= \'&lt;/table&gt;\';\r\n
          \r\n
            // $cachedDataCheck .= \'&lt;/div&gt;\';\r\n
          \r\n
            echo $calendar;\r\n
            echo $calendarExtraHtml;\r\n
            // echo $cachedDataCheck;\r\n
          \r\n
            // =========================================\r\n
          \r\n
          } else {}
          """
        "custom_id" => "calendar-grid-responsive-dev"
        "type" => "php"
        "id" => 315
      ]
      "content" => """
        // Usage: [contentblock id=calendar-grid-responsive-dev cal_type=free month_year=October_2019]\r\n
        \r\n
        date_default_timezone_set('UTC');\r\n
        \r\n
        // =========================================\r\n
        \r\n
        // GET PARAMETERS / URL QUERY STRINGS\r\n
        \r\n
        $getUtcOffset = htmlspecialchars($_GET['utc']);\r\n
        \r\n
        $getPlusMonth = htmlspecialchars($_GET['pm']);\r\n
        \r\n
        $getBD = htmlspecialchars($_GET['id']);\r\n
        \r\n
        // USER META FIELDS\r\n
        \r\n
        // Get user first and last name\r\n
        \r\n
        $userInfo = wp_get_current_user();\r\n
        $userFullName = $userInfo->user_firstname.' '.$userInfo->user_lastname;\r\n
        \r\n
        // Get UTC offset from WP user meta via Toolset\r\n
        \r\n
        $userUtcOffset = types_render_usermeta( "utc-offset", array( "user_current" => true, "output" => "raw" ) );\r\n
        \r\n
        // Trim last character\r\n
        $userUtcOffset = substr($userUtcOffset, 0, -1);\r\n
        \r\n
        // Get Date of Birth from WP user meta via Toolset\r\n
        \r\n
        $dateOfBirth = types_render_usermeta( "date-of-birth", array( "user_current" => true ) );\r\n
         \r\n
        if ( empty($dateOfBirth) ) {\r\n
        \r\n
          // Assume DOB of member is August 15, 1967\r\n
        \r\n
          $dateOfBirth = '08/15/1967';\r\n
        \r\n
        } else {}\r\n
        \r\n
        if ( !empty( $getBD ) ) {\r\n
        \r\n
          $dateOfBirthUnix = $getBD;\r\n
          \r\n
        } else {\r\n
          \r\n
          $dateOfBirthUnix = strtotime($dateOfBirth);\r\n
          $dateOfBirthUnix = substr($dateOfBirthUnix, 0, -2);\r\n
          $dateOfBirthUnix = str_replace("-","b",$dateOfBirthUnix);\r\n
        \r\n
        }\r\n
        \r\n
        // SHORTCODE PARAMETERS\r\n
        \r\n
        // 'free' or 'paid'\r\n
        $calType = free;\r\n
        \r\n
        // e.g. 'August_2018'\r\n
        $monthYearInput = current;\r\n
        \r\n
        // $cachedDataCheck = '<div style="font-size:14px;">';\r\n
        \r\n
        // =========================================\r\n
        \r\n
        // If no UTC offset value is defined in user meta or in URL query parameter, present a form where users can choose one\r\n
        \r\n
        if ( ( empty($userUtcOffset) ) && ( empty($getUtcOffset) ) && ( $calType == 'free' ) ) {\r\n
        \r\n
          $calendarForm = '<form action="" method="GET">';\r\n
        \r\n
          if ( !empty($dateOfBirthUnix) ) {\r\n
        \r\n
            $calendarForm .= '<input id="id" type="hidden" name="id" value="'.$dateOfBirthUnix.'"/>';\r\n
        \r\n
          }\r\n
        \r\n
          $calendarForm .= '<div class="row fields-row">';\r\n
        \r\n
          $calendarForm .= '<div class="col-lg-6">';\r\n
          $calendarForm .= '<div class="form-group">';\r\n
          $calendarForm .= '<label for="utc">To view the calendar, please select your timezone:</label>';\r\n
          $calendarForm .= '<select id="utc" name="utc">\r\n
                              <option value="">Please choose</option>\r\n
                              <option value="-12">(UTC−12:00) International Date Line West</option>\r\n
                              <option value="-11">(UTC−11:00) Coordinated Universal Time-11</option>\r\n
                              <option value="-10">(UTC−10:00) Aleutian Islands</option>\r\n
                              <option value="-10">(UTC−10:00) Hawaii</option>\r\n
                              <option value="-9.5">(UTC−09:30) Marquesas Islands</option>\r\n
                              <option value="-9">(UTC−09:00) Alaska</option>\r\n
                              <option value="-9">(UTC−09:00) Coordinated Universal Time-09</option>\r\n
                              <option value="-8">(UTC−08:00) Baja California</option>\r\n
                              <option value="-8">(UTC−08:00) Coordinated Universal Time-08</option>\r\n
                              <option value="-8">(UTC−08:00) Pacific Time (US & Canada)</option>\r\n
                              <option value="-7">(UTC−07:00) Arizona</option>\r\n
                              <option value="-7">(UTC−07:00) Chihuahua, La Paz, Mazatlan</option>\r\n
                              <option value="-7">(UTC−07:00) Mountain Time (US & Canada)</option>\r\n
                              <option value="-6">(UTC−06:00) Central America</option>\r\n
                              <option value="-6">(UTC−06:00) Central Time (US & Canada)</option>\r\n
                              <option value="-6">(UTC−06:00) Easter Island</option>\r\n
                              <option value="-6">(UTC−06:00) Guadalajara, Mexico City, Monterrey</option>\r\n
                              <option value="-6">(UTC−06:00) Saskatchewan</option>\r\n
                              <option value="-5">(UTC−05:00) Bogota, Lima, Quito, Rio Branco</option>\r\n
                              <option value="-5">(UTC−05:00) Chetumal</option>\r\n
                              <option value="-5">(UTC−05:00) Eastern Time (US & Canada)</option>\r\n
                              <option value="-5">(UTC−05:00) Haiti</option>\r\n
                              <option value="-5">(UTC−05:00) Havana</option>\r\n
                              <option value="-5">(UTC−05:00) Indiana (East)</option>\r\n
                              <option value="-5">(UTC−05:00) Turks and Caicos</option>\r\n
                              <option value="-4">(UTC−04:00) Asuncion</option>\r\n
                              <option value="-4">(UTC−04:00) Atlantic Time (Canada)</option>\r\n
                              <option value="-4">(UTC−04:00) Caracas</option>\r\n
                              <option value="-4">(UTC−04:00) Cuiaba</option>\r\n
                              <option value="-4">(UTC−04:00) Georgetown, La Paz, Manaus, San Juan</option>\r\n
                              <option value="-4">(UTC−04:00) Santiago</option>\r\n
                              <option value="-3.5">(UTC−03:30) Newfoundland</option>\r\n
                              <option value="-3">(UTC−03:00) Araguaina</option>\r\n
                              <option value="-3">(UTC−03:00) Brasilia</option>\r\n
                              <option value="-3">(UTC−03:00) Cayenne, Fortaleza</option>\r\n
                              <option value="-3">(UTC−03:00) City of Buenos Aires</option>\r\n
                              <option value="-3">(UTC−03:00) Greenland</option>\r\n
                              <option value="-3">(UTC−03:00) Montevideo</option>\r\n
                              <option value="-3">(UTC−03:00) Punta Arenas</option>\r\n
                              <option value="-3">(UTC−03:00) Saint Pierre and Miquelon</option>\r\n
                              <option value="-3">(UTC−03:00) Salvador</option>\r\n
                              <option value="-2">(UTC−02:00) Coordinated Universal Time-02</option>\r\n
                              <option value="-1">(UTC−01:00) Azores</option>\r\n
                              <option value="-1">(UTC−01:00) Cabo Verde Is.</option>\r\n
                              <option value="0">(UTC) Coordinated Universal Time</option>\r\n
                              <option value="0">(UTC+00:00) Casablanca</option>\r\n
                              <option value="0">(UTC+00:00) Dublin, Edinburgh, Lisbon, London</option>\r\n
                              <option value="0">(UTC+00:00) Monrovia, Reykjavik</option>\r\n
                              <option value="1">(UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna</option>\r\n
                              <option value="1">(UTC+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague</option>\r\n
                              <option value="1">(UTC+01:00) Brussels, Copenhagen, Madrid, Paris</option>\r\n
                              <option value="1">(UTC+01:00) Sao Tome</option>\r\n
                              <option value="1">(UTC+01:00) Sarajevo, Skopje, Warsaw, Zagreb</option>\r\n
                              <option value="1">(UTC+01:00) West Central Africa</option>\r\n
                              <option value="2">(UTC+02:00) Amman</option>\r\n
                              <option value="2">(UTC+02:00) Athens, Bucharest</option>\r\n
                              <option value="2">(UTC+02:00) Beirut</option>\r\n
                              <option value="2">(UTC+02:00) Cairo</option>\r\n
                              <option value="2">(UTC+02:00) Chisinau</option>\r\n
                              <option value="2">(UTC+02:00) Damascus</option>\r\n
                              <option value="2">(UTC+02:00) Gaza, Hebron</option>\r\n
                              <option value="2">(UTC+02:00) Harare, Pretoria</option>\r\n
                              <option value="2">(UTC+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius</option>\r\n
                              <option value="2">(UTC+02:00) Jerusalem</option>\r\n
                              <option value="2">(UTC+02:00) Kaliningrad</option>\r\n
                              <option value="2">(UTC+02:00) Khartoum</option>\r\n
                              <option value="2">(UTC+02:00) Tripoli</option>\r\n
                              <option value="2">(UTC+02:00) Windhoek</option>\r\n
                              <option value="3">(UTC+03:00) Baghdad</option>\r\n
                              <option value="3">(UTC+03:00) Istanbul</option>\r\n
                              <option value="3">(UTC+03:00) Kuwait, Riyadh</option>\r\n
                              <option value="3">(UTC+03:00) Minsk</option>\r\n
                              <option value="3">(UTC+03:00) Moscow St. Petersburg, Volgograd</option>\r\n
                              <option value="3">(UTC+03:00) Nairobi</option>\r\n
                              <option value="3.5">(UTC+03:30) Tehran</option>\r\n
                              <option value="4">(UTC+04:00) Abu Dhabi, Muscat</option>\r\n
                              <option value="4">(UTC+04:00) Astrakhan, Ulyanovsk</option>\r\n
                              <option value="4">(UTC+04:00) Baku</option>\r\n
                              <option value="4">(UTC+04:00) Izhevsk, Samara</option>\r\n
                              <option value="4">(UTC+04:00) Port Louis</option>\r\n
                              <option value="4">(UTC+04:00) Saratov</option>\r\n
                              <option value="4">(UTC+04:00) Tbilisi</option>\r\n
                              <option value="4">(UTC+04:00) Yerevan</option>\r\n
                              <option value="4.5">(UTC+04:30) Kabul</option>\r\n
                              <option value="5">(UTC+05:00) Ashgabat, Tashkent</option>\r\n
                              <option value="5">(UTC+05:00) Ekaterinburg</option>\r\n
                              <option value="5">(UTC+05:00) Islamabad, Karachi</option>\r\n
                              <option value="5.5">(UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi</option>\r\n
                              <option value="5.5">(UTC+05:30) Sri Jayawardenepura</option>\r\n
                              <option value="5.75">(UTC+05:45) Kathmandu</option>\r\n
                              <option value="6">(UTC+06:00) Astana</option>\r\n
                              <option value="6">(UTC+06:00) Dhaka</option>\r\n
                              <option value="6">(UTC+06:00) Omsk</option>\r\n
                              <option value="6.5">(UTC+06:30) Yangon (Rangoon)</option>\r\n
                              <option value="7">(UTC+07:00) Bangkok, Hanoi, Jakarta</option>\r\n
                              <option value="7">(UTC+07:00) Barnaul, Gorno-Altaysk</option>\r\n
                              <option value="7">(UTC+07:00) Hovd</option>\r\n
                              <option value="7">(UTC+07:00) Krasnoyarsk</option>\r\n
                              <option value="7">(UTC+07:00) Novosibirsk</option>\r\n
                              <option value="7">(UTC+07:00) Tomsk</option>\r\n
                              <option value="8">(UTC+08:00) Beijing, Chongqing, Hong Kong, Urumqi</option>\r\n
                              <option value="8">(UTC+08:00) Irkutsk</option>\r\n
                              <option value="8">(UTC+08:00) Kuala Lumpur, Singapore</option>\r\n
                              <option value="8">(UTC+08:00) Perth</option>\r\n
                              <option value="8">(UTC+08:00) Taipei</option>\r\n
                              <option value="8">(UTC+08:00) Ulaanbaatar</option>\r\n
                              <option value="8.75">(UTC+08:45) Eucla</option>\r\n
                              <option value="9">(UTC+09:00) Chita</option>\r\n
                              <option value="9">(UTC+09:00) Osaka, Sapporo, Tokyo</option>\r\n
                              <option value="9">(UTC+09:00) Pyongyang</option>\r\n
                              <option value="9">(UTC+09:00) Seoul</option>\r\n
                              <option value="9">(UTC+09:00) Yakutsk</option>\r\n
                              <option value="9.5">(UTC+09:30) Adelaide</option>\r\n
                              <option value="9.5">(UTC+09:30) Darwin</option>\r\n
                              <option value="10">(UTC+10:00) Brisbane</option>\r\n
                              <option value="10">(UTC+10:00) Canberra, Melbourne, Sydney</option>\r\n
                              <option value="10">(UTC+10:00) Guam, Port Moresby</option>\r\n
                              <option value="10">(UTC+10:00) Hobart</option>\r\n
                              <option value="10">(UTC+10:00) Vladivostok</option>\r\n
                              <option value="10.5">(UTC+10:30) Lord Howe Island</option>\r\n
                              <option value="11">(UTC+11:00) Bougainville Island</option>\r\n
                              <option value="11">(UTC+11:00) Chokurdakh</option>\r\n
                              <option value="11">(UTC+11:00) Magadan</option>\r\n
                              <option value="11">(UTC+11:00) Norfolk Island</option>\r\n
                              <option value="11">(UTC+11:00) Sakhalin</option>\r\n
                              <option value="11">(UTC+11:00) Solomon Is., New Caledonia</option>\r\n
                              <option value="12">(UTC+12:00) Anadyr, Petrapavlovsk-Kamchatsky</option>\r\n
                              <option value="12">(UTC+12:00) Auckland, Wellington</option>\r\n
                              <option value="12">(UTC+12:00) Coordinated Universal Time+12</option>\r\n
                              <option value="12">(UTC+12:00) Fiji</option>\r\n
                              <option value="12.75">(UTC+12:45) Chatham Islands</option>\r\n
                              <option value="13">(UTC+13:00) Coordinated Universal Time+13</option>\r\n
                              <option value="13">(UTC+13:00) Nuku\'alofa</option>\r\n
                              <option value="13">(UTC+13:00) Samoa</option>\r\n
                              <option value="14">(UTC+14:00) Kiritimati Island</option>\r\n
                            </select>';\r\n
          $calendarForm .= '<span class="help-block with-errors"></span>';\r\n
          $calendarForm .= '</div>';\r\n
          $calendarForm .= '</div>';\r\n
        \r\n
          $calendarForm .= '<div class="col-lg-6">';\r\n
        \r\n
          $calendarForm .= '<input id="pm" type="hidden" name="pm" value="0"/>';\r\n
        \r\n
          $calendarForm .= '</div>';\r\n
        \r\n
          $calendarForm .= '</div>';\r\n
        \r\n
          $calendarForm .= '<div class="row fields-row">';\r\n
        \r\n
          $calendarForm .= '<div class="col-lg-12">\r\n
                            <div class="form-notes"><a href="https://www.timeanddate.com/worldclock/search.html" target="_blank">Search here</a> to find the timezone (UTC offset) for your city/location.</div>';\r\n
          $calendarForm .= '<div class="form-group">';\r\n
          $calendarForm .= '<input type="submit" class="btn btn-primary" value="View now" />';\r\n
          $calendarForm .= '</div>';\r\n
          $calendarForm .= '</div>';\r\n
        \r\n
          $calendarForm .= '</div>';\r\n
        \r\n
          $calendarForm .= '</form>';\r\n
        \r\n
          echo $calendarForm;\r\n
          \r\n
        } if ( ( empty($userUtcOffset) ) && ( empty($getUtcOffset) ) && ( $calType == 'paid' ) ) {\r\n
          \r\n
          echo do_shortcode( "[cred_user_form form='personal-details']" );\r\n
        \r\n
        } elseif ( ( !empty($userUtcOffset) ) || ( !empty($getUtcOffset) ) ) {\r\n
        \r\n
          // Prioritize UTC offset defined in URL query string over user's chosen offset\r\n
        \r\n
          if ( !empty($getUtcOffset) ) {\r\n
        \r\n
            $utcOffset = $getUtcOffset;\r\n
        \r\n
          } else {\r\n
        \r\n
            $utcOffset = $userUtcOffset;\r\n
        \r\n
          }\r\n
        \r\n
          $currentTime = time();\r\n
        \r\n
          $currentTimeUtcOffset = time() + ($utcOffset*60*60);\r\n
          \r\n
          // =========================================\r\n
        \r\n
          // Create array containing abbreviations of days of week.\r\n
        \r\n
          $daysOfWeek = array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');\r\n
        \r\n
          // =========================================\r\n
        \r\n
          // Decide which calendar to display, previous, current or next month's\r\n
        \r\n
          // Get month and year\r\n
        \r\n
          $calendarCurrentMonth = date("n", $currentTimeUtcOffset);\r\n
          $year = date("Y", $currentTimeUtcOffset);\r\n
        \r\n
          $currentMonthYear = date("F Y", $currentTimeUtcOffset);\r\n
        \r\n
          // http://id1.php.net/manual/en/function.strtotime.php#107331 add "first day of" to work around Jan 30-31 bug skipping to March\r\n
        \r\n
          $currentMonthYear_pm1 = date("F Y", strtotime('first day of +1 month', $currentTimeUtcOffset));\r\n
        \r\n
          $currentMonthYear_pm2 = date("F Y", strtotime('first day of +2 month', $currentTimeUtcOffset));\r\n
        \r\n
          $currentMonthYear_pm3 = date("F Y", strtotime('first day of +3 month', $currentTimeUtcOffset));\r\n
        \r\n
          $currentMonthYear_pm4 = date("F Y", strtotime('first day of +4 month', $currentTimeUtcOffset));\r\n
        \r\n
          $currentMonthYear_pm5 = date("F Y", strtotime('first day of +5 month', $currentTimeUtcOffset));\r\n
        \r\n
          $currentMonthYear_pm6 = date("F Y", strtotime('first day of +6 month', $currentTimeUtcOffset));\r\n
        \r\n
          $currentMonthYear_pm7 = date("F Y", strtotime('first day of +7 month', $currentTimeUtcOffset));\r\n
        \r\n
          $currentMonthYear_pm8 = date("F Y", strtotime('first day of +8 month', $currentTimeUtcOffset));\r\n
        \r\n
          $currentMonthYear_pm9 = date("F Y", strtotime('first day of +9 month', $currentTimeUtcOffset));\r\n
        \r\n
          $currentMonthYear_pm10 = date("F Y", strtotime('first day of +10 month', $currentTimeUtcOffset));\r\n
        \r\n
          $currentMonthYear_pm11 = date("F Y", strtotime('first day of +11 month', $currentTimeUtcOffset));\r\n
        \r\n
          $currentMonthYear_pm12 = date("F Y", strtotime('first day of +12 month', $currentTimeUtcOffset));\r\n
        \r\n
          if ( $monthYearInput == 'previous' ) {\r\n
        \r\n
            if ( $calendarCurrentMonth == '1' ) { \r\n
        \r\n
              $calendarCurrentMonth = 12;\r\n
              $year = $year - 1;\r\n
        \r\n
            } else {\r\n
        \r\n
              $calendarCurrentMonth = $calendarCurrentMonth - 1;\r\n
        \r\n
            }\r\n
            \r\n
          } elseif ( $monthYearInput == 'current' ) {\r\n
        \r\n
            if ( $getPlusMonth == '1' ) {\r\n
        \r\n
              $calendarCurrentMonth = date("n", strtotime('first day of +1 month', $currentTimeUtcOffset));\r\n
        \r\n
              $year = date("Y", strtotime('first day of +1 month', $currentTimeUtcOffset));\r\n
        \r\n
            } elseif ( $getPlusMonth == '2' ) {\r\n
        \r\n
              $calendarCurrentMonth = date("n", strtotime('first day of +2 month', $currentTimeUtcOffset));\r\n
        \r\n
              $year = date("Y", strtotime('first day of +2 month', $currentTimeUtcOffset));\r\n
        \r\n
            } elseif ( $getPlusMonth == '3' ) {\r\n
        \r\n
              $calendarCurrentMonth = date("n", strtotime('first day of +3 month', $currentTimeUtcOffset));\r\n
        \r\n
              $year = date("Y", strtotime('first day of +3 month', $currentTimeUtcOffset));\r\n
        \r\n
            } elseif ( $getPlusMonth == '4' ) {\r\n
        \r\n
              $calendarCurrentMonth = date("n", strtotime('first day of +4 month', $currentTimeUtcOffset));\r\n
        \r\n
              $year = date("Y", strtotime('first day of +4 month', $currentTimeUtcOffset));\r\n
        \r\n
            } elseif ( $getPlusMonth == '5' ) {\r\n
        \r\n
              $calendarCurrentMonth = date("n", strtotime('first day of +5 month', $currentTimeUtcOffset));\r\n
        \r\n
              $year = date("Y", strtotime('first day of +5 month', $currentTimeUtcOffset));\r\n
        \r\n
            } elseif ( $getPlusMonth == '6' ) {\r\n
        \r\n
              $calendarCurrentMonth = date("n", strtotime('first day of +6 month', $currentTimeUtcOffset));\r\n
        \r\n
              $year = date("Y", strtotime('first day of +6 month', $currentTimeUtcOffset));\r\n
        \r\n
            } elseif ( $getPlusMonth == '7' ) {\r\n
        \r\n
              $calendarCurrentMonth = date("n", strtotime('first day of +7 month', $currentTimeUtcOffset));\r\n
        \r\n
              $year = date("Y", strtotime('first day of +7 month', $currentTimeUtcOffset));\r\n
        \r\n
            } elseif ( $getPlusMonth == '8' ) {\r\n
        \r\n
              $calendarCurrentMonth = date("n", strtotime('first day of +8 month', $currentTimeUtcOffset));\r\n
        \r\n
              $year = date("Y", strtotime('first day of +8 month', $currentTimeUtcOffset));\r\n
        \r\n
            } elseif ( $getPlusMonth == '9' ) {\r\n
        \r\n
              $calendarCurrentMonth = date("n", strtotime('first day of +9 month', $currentTimeUtcOffset));\r\n
        \r\n
              $year = date("Y", strtotime('first day of +9 month', $currentTimeUtcOffset));\r\n
        \r\n
            } elseif ( $getPlusMonth == '10' ) {\r\n
        \r\n
              $calendarCurrentMonth = date("n", strtotime('first day of +10 month', $currentTimeUtcOffset));\r\n
        \r\n
              $year = date("Y", strtotime('first day of +10 month', $currentTimeUtcOffset));\r\n
        \r\n
            } elseif ( $getPlusMonth == '11' ) {\r\n
        \r\n
              $calendarCurrentMonth = date("n", strtotime('first day of +11 month', $currentTimeUtcOffset));\r\n
        \r\n
              $year = date("Y", strtotime('first day of +11 month', $currentTimeUtcOffset));\r\n
        \r\n
            } elseif ( $getPlusMonth == '12' ) {\r\n
        \r\n
              $calendarCurrentMonth = date("n", strtotime('first day of +12 month', $currentTimeUtcOffset));\r\n
        \r\n
              $year = date("Y", strtotime('first day of +12 month', $currentTimeUtcOffset));\r\n
        \r\n
            } else {}\r\n
        \r\n
          } elseif ( $monthYearInput == 'next' ) {\r\n
        \r\n
            if ( $calendarCurrentMonth == '12' ) {\r\n
        \r\n
              $calendarCurrentMonth = 1;\r\n
              $year = $year + 1;\r\n
        \r\n
            } else {\r\n
        \r\n
              $calendarCurrentMonth = $calendarCurrentMonth + 1;\r\n
        \r\n
            }\r\n
        \r\n
            \r\n
          } else {\r\n
        \r\n
            $monthYearInput = explode("_",$monthYearInput);\r\n
            $whichMonth = $monthYearInput[0];\r\n
            $whichYear = $monthYearInput[1];\r\n
            $MonthYear = $whichMonth.' '.$whichYear;\r\n
        \r\n
            $calendarCurrentMonth = date("n",strtotime($MonthYear));\r\n
            $year = date("Y",strtotime($MonthYear));\r\n
            \r\n
          }\r\n
        \r\n
          // =========================================\r\n
        \r\n
          // Define date info variables\r\n
        \r\n
          // What is the first day of the month in question?\r\n
          $firstDayOfMonth = mktime(0,0,0,$calendarCurrentMonth,1,$year);\r\n
          $firstDayOfMonthName = date("l", $firstDayOfMonth); \r\n
        \r\n
          // How many days does this month contain?\r\n
          $numberDays = date('t',$firstDayOfMonth);\r\n
        \r\n
          // Retrieve some information about the first day of\r\n
          // the month in question\r\n
          $dateComponents = getdate($firstDayOfMonth);\r\n
        \r\n
          // What is the name of the month in question?\r\n
          $monthName = $dateComponents['month'];\r\n
          $monthNameNum = date('n',$firstDayOfMonth);\r\n
        \r\n
          // What is the (week's) index value (0-6) of the first day of\r\n
          // the month in question\r\n
          $dayOfWeek = $dateComponents['wday'];\r\n
        \r\n
          $yearTwoDigits = date('y',$firstDayOfMonth);\r\n
        \r\n
          // $utcOffset = (int)$utcOffset;\r\n
        \r\n
          if ( $utcOffset == '-12' ) { $utcOffsetString = '-12:00'; } \r\n
          elseif ( $utcOffset == '-12' ) { $utcOffsetString = '-12:00'; }\r\n
          elseif ( $utcOffset == '-11' ) { $utcOffsetString = '-11:00'; }\r\n
          elseif ( $utcOffset == '-10' ) { $utcOffsetString = '-10:00'; }\r\n
          elseif ( $utcOffset == '-9.5' ) { $utcOffsetString = '-09:30'; }\r\n
          elseif ( $utcOffset == '-9' ) { $utcOffsetString = '-09:00'; }\r\n
          elseif ( $utcOffset == '-8' ) { $utcOffsetString = '-08:00'; }\r\n
          elseif ( $utcOffset == '-7' ) { $utcOffsetString = '-07:00'; }\r\n
          elseif ( $utcOffset == '-6' ) { $utcOffsetString = '-06:00'; }\r\n
          elseif ( $utcOffset == '-5' ) { $utcOffsetString = '-05:00'; }\r\n
          elseif ( $utcOffset == '-4' ) { $utcOffsetString = '-04:00'; }\r\n
          elseif ( $utcOffset == '-3.5' ) { $utcOffsetString = '-03:30'; }\r\n
          elseif ( $utcOffset == '-3' ) { $utcOffsetString = '-03:00'; }\r\n
          elseif ( $utcOffset == '-2' ) { $utcOffsetString = '-02:00'; }\r\n
          elseif ( $utcOffset == '-1' ) { $utcOffsetString = '-01:00'; }\r\n
          elseif ( $utcOffset == '-0' ) { $utcOffsetString = '±00:00'; }\r\n
          elseif ( $utcOffset == '1' ) { $utcOffsetString = '+01:00'; }\r\n
          elseif ( $utcOffset == '2' ) { $utcOffsetString = '+02:00'; }\r\n
          elseif ( $utcOffset == '3' ) { $utcOffsetString = '+03:00'; }\r\n
          elseif ( $utcOffset == '3.5' ) { $utcOffsetString = '+03:30'; }\r\n
          elseif ( $utcOffset == '4' ) { $utcOffsetString = '+04:00'; }\r\n
          elseif ( $utcOffset == '4.5' ) { $utcOffsetString = '+04:30'; }\r\n
          elseif ( $utcOffset == '5' ) { $utcOffsetString = '+05:00'; }\r\n
          elseif ( $utcOffset == '5.5' ) { $utcOffsetString = '+05:30'; }\r\n
          elseif ( $utcOffset == '5.75' ) { $utcOffsetString = '+05:45'; }\r\n
          elseif ( $utcOffset == '6' ) { $utcOffsetString = '+06:00'; }\r\n
          elseif ( $utcOffset == '6.5' ) { $utcOffsetString = '+06:30'; }\r\n
          elseif ( $utcOffset == '7' ) { $utcOffsetString = '+07:00'; }\r\n
          elseif ( $utcOffset == '8' ) { $utcOffsetString = '+08:00'; }\r\n
          elseif ( $utcOffset == '8.75' ) { $utcOffsetString = '+08:45'; }\r\n
          elseif ( $utcOffset == '9' ) { $utcOffsetString = '+09:00'; }\r\n
          elseif ( $utcOffset == '9.5' ) { $utcOffsetString = '+09:30'; }\r\n
          elseif ( $utcOffset == '10' ) { $utcOffsetString = '+10:00'; }\r\n
          elseif ( $utcOffset == '10.5' ) { $utcOffsetString = '+10:30'; }\r\n
          elseif ( $utcOffset == '11' ) { $utcOffsetString = '+11:00'; }\r\n
          elseif ( $utcOffset == '12' ) { $utcOffsetString = '+12:00'; }\r\n
          elseif ( $utcOffset == '12.75' ) { $utcOffsetString = '+12:45'; }\r\n
          elseif ( $utcOffset == '13' ) { $utcOffsetString = '+13:00'; }\r\n
          elseif ( $utcOffset == '14' ) { $utcOffsetString = '+14:00'; }\r\n
          else {}\r\n
        \r\n
          // =========================================\r\n
        \r\n
          if ( $calType === 'free' ) {\r\n
        \r\n
            $calURLstring = '/forecast-calendar/free/';\r\n
        \r\n
          } else {\r\n
        \r\n
            $calURLstring = '/account/edit-account/';\r\n
        \r\n
          }\r\n
        \r\n
        \r\n
          $calendar = '<div class="row">\r\n
                        <div class="col-sm-4 calendar-header">';\r\n
        \r\n
          $calendar .= '<h2 class="calendar-period">' . $monthName . ' ' . $year . ' <span>(<a href="'.$calURLstring.'">UTC'.$utcOffsetString.'</a>)</span></h2>';\r\n
        \r\n
          // $calendar .= '<h4 style="margin-top: -36px; margin-bottom: 0;">UTC offset is '.$utcOffsetString.' hours</h4>';\r\n
        \r\n
        \r\n
          // =========================================\r\n
        \r\n
          // Query this month's Planet Update post put data into array. Check existence of cached data for the queried month first.\r\n
          // https://codex.wordpress.org/Class_Reference/WP_Query#Date_Parameters\r\n
        \r\n
          $planetUpdatePostsCacheKey = 'planet_update_posts_'.$monthName.'_'.$year;\r\n
        \r\n
          $planetUpdatePosts = get_transient( $planetUpdatePostsCacheKey );\r\n
        \r\n
          if ( false === $planetUpdatePosts ) {\r\n
        \r\n
            $planetUpdatePostsContent = '';\r\n
            \r\n
            $args = array(\r\n
              'post_type' => 'post',\r\n
              'post_status' => 'publish',\r\n
              'category_name' => 'planet-update',\r\n
              'date_query' => array(\r\n
                  array(\r\n
                      'year' => $year,\r\n
                      'month' => $monthNameNum        \r\n
                      )\r\n
              ),\r\n
              'posts_per_page' => -1\r\n
            );\r\n
        \r\n
            $the_query = new WP_Query( $args );\r\n
        \r\n
            $theQueryArray = (array)$the_query;\r\n
        \r\n
            if ( $the_query->have_posts() ) {\r\n
        \r\n
              while ( $the_query->have_posts() ) {\r\n
        \r\n
                $the_query->the_post();\r\n
        \r\n
                $planetUpdateTitle = get_the_title();\r\n
        \r\n
                $planetUpdateLink = get_permalink();\r\n
        \r\n
                $planetUpdateDate = get_the_date( 'Y-m-d H:i:s' );\r\n
        \r\n
                $planetUpdateDateGmt = get_gmt_from_date( $planetUpdateDate, 'Y-m-d H:i:s' );\r\n
        \r\n
                if (!empty(get_post_custom_values('wpcf-planet-update-glyph-1')[0])) {\r\n
        \r\n
                  if ( get_post_custom_values('wpcf-planet-update-glyph-1')[0] == 'solstice' ) {\r\n
        \r\n
                    $planetUpdateGlyph1 = 'Solstice';\r\n
        \r\n
                  } elseif ( get_post_custom_values('wpcf-planet-update-glyph-1')[0] == 'equinox' ) {\r\n
        \r\n
                    $planetUpdateGlyph1 = 'Equinox';\r\n
        \r\n
                  } else {\r\n
        \r\n
                    $planetUpdateGlyph1 = '<img src="/wp-content/uploads/images/glyphs/'.get_post_custom_values('wpcf-planet-update-glyph-1')[0].'.png">';\r\n
        \r\n
                  }\r\n
        \r\n
                }\r\n
        \r\n
                if ( (!empty(get_post_custom_values('wpcf-planet-update-glyph-2')[0])) && ( get_post_custom_values('wpcf-planet-update-glyph-2')[0] !== 'in' ) ) {\r\n
        \r\n
                  $planetUpdateGlyph2 = '<img src="/wp-content/uploads/images/glyphs/'.get_post_custom_values('wpcf-planet-update-glyph-2')[0].'.png">';\r\n
        \r\n
                }\r\n
        \r\n
                if ( (!empty(get_post_custom_values('wpcf-planet-update-glyph-2')[0])) && ( get_post_custom_values('wpcf-planet-update-glyph-2')[0] == 'in' ) ) {\r\n
        \r\n
                  $planetUpdateGlyph2 = '<span class="aspect-in">in</span>';\r\n
        \r\n
                }\r\n
        \r\n
                if (!empty(get_post_custom_values('wpcf-planet-update-glyph-3')[0])) {\r\n
        \r\n
                  $planetUpdateGlyph3 = '<img src="/wp-content/uploads/images/glyphs/'.get_post_custom_values('wpcf-planet-update-glyph-3')[0].'.png">';\r\n
        \r\n
                }\r\n
        \r\n
                // Create an array from the WP query data above\r\n
        \r\n
                $planetUpdatePosts[] = array('title' => $planetUpdateTitle, 'link' => $planetUpdateLink, 'publishdate' => $planetUpdateDateGmt, 'glyph1' => $planetUpdateGlyph1, 'glyph2' => $planetUpdateGlyph2, 'glyph3' => $planetUpdateGlyph3 );\r\n
        \r\n
                // Create string from WP query data above. For testing only.\r\n
        \r\n
                // $planetUpdatePostsContent .= '<a href="'.$planetUpdateLink.'">'.$planetUpdateTitle.'</a>, '.$planetUpdateDate.' - '.$planetUpdateDateGmt.' | '.$planetUpdateGlyph1.' '.$planetUpdateGlyph2.' '.$planetUpdateGlyph3.'<br />';\r\n
        \r\n
              }\r\n
        \r\n
              set_transient( $planetUpdatePostsCacheKey, $planetUpdatePosts, 2629746 );\r\n
        \r\n
              wp_reset_postdata();\r\n
        \r\n
            } else {}\r\n
        \r\n
          } else {\r\n
        \r\n
            // $cachedDataCheck .= '<div>Cached '.$planetUpdatePostsCacheKey.' data is used</div>';\r\n
        \r\n
          }\r\n
        \r\n
        \r\n
          $planetUpdatePostsOriginal = $planetUpdatePosts;\r\n
        \r\n
          if ( $utcOffset !== '0' ) {\r\n
        \r\n
            // https://stackoverflow.com/a/15472071\r\n
            \r\n
            foreach ($planetUpdatePosts as &$planetUpdatePost) {\r\n
        \r\n
              $convertedPublishdate = strtotime( $planetUpdatePost['publishdate'] ) + $utcOffset*60*60;\r\n
        \r\n
              $planetUpdatePost['publishdate'] = date( 'Y-m-d H:i:s', $convertedPublishdate );\r\n
        \r\n
            }\r\n
        \r\n
          $planetUpdatePostsConverted = $planetUpdatePosts;\r\n
        \r\n
          }\r\n
        \r\n
          // =========================================\r\n
        \r\n
          // Detect if calendar type is 'Paid'\r\n
        \r\n
          if ( $calType === 'paid' ) {\r\n
        \r\n
            $calendar .= '<p>For '.$userFullName.', born on <a href="/account/edit-account/">'.$dateOfBirth.'</a></p>';\r\n
        \r\n
          } else {}\r\n
        \r\n
          $calendar .= '</div>\r\n
                        <div class="col-sm-4 plusmonth-selection">';\r\n
        \r\n
            // =====================================\r\n
        \r\n
            if ( $calType === 'paid' ) {\r\n
        \r\n
              // =====================================\r\n
        \r\n
              // Add dropdown to select an upcoming month's calendar\r\n
        \r\n
              $plusmonthForm = '<form action="" method="GET">';\r\n
        \r\n
              if ( !empty($dateOfBirthUnix) ) {\r\n
        \r\n
                $plusmonthForm .= '<input id="id" type="hidden" name="id" value="'.$dateOfBirthUnix.'"/>';\r\n
        \r\n
              }\r\n
        \r\n
              if ( !empty($getUtcOffset) ) {\r\n
        \r\n
                $plusmonthForm .= '<input id="utc" type="hidden" name="utc" value="'.$getUtcOffset.'"/>';\r\n
        \r\n
              } else {\r\n
        \r\n
                $plusmonthForm .= '<input id="utc" type="hidden" name="utc" value="'.$userUtcOffset.'"/>';        \r\n
        \r\n
              }\r\n
        \r\n
              $monthYearParam = $calendarCurrentMonth.''.$yearTwoDigits;\r\n
        \r\n
              $plusmonthForm .= '<div class="row plusmonth-row">';\r\n
        \r\n
              $plusmonthForm .= '<div class="col-lg-12">';\r\n
              $plusmonthForm .= '<div class="form-group">';\r\n
              $plusmonthForm .= '<label for="pm">View calendar for a different month</label>';\r\n
              $plusmonthForm .= '<select id="pm" name="pm">\r\n
                                  <option value="">Pick a month</option>';\r\n
        \r\n
                                  if ( !empty( $getPlusMonth ) ) {\r\n
                                  \r\n
                                    $plusmonthForm .= '<option value="0">'.$currentMonthYear.'</option>';\r\n
                                  \r\n
                                  }\r\n
        \r\n
                                  if ( $getPlusMonth !== '1' ) {\r\n
        \r\n
                                    $plusmonthForm .= '<option value="1">'.$currentMonthYear_pm1.'</option>';\r\n
        \r\n
                                  }\r\n
        \r\n
                                  if ( $getPlusMonth !== '2' ) {\r\n
        \r\n
                                    $plusmonthForm .= '<option value="2">'.$currentMonthYear_pm2.'</option>';\r\n
        \r\n
                                  }\r\n
        \r\n
                                  if ( $getPlusMonth !== '3' ) {\r\n
        \r\n
                                    $plusmonthForm .= '<option value="3">'.$currentMonthYear_pm3.'</option>';\r\n
        \r\n
                                  }\r\n
        \r\n
                                  if ( $getPlusMonth !== '4' ) {\r\n
        \r\n
                                    $plusmonthForm .= '<option value="4">'.$currentMonthYear_pm4.'</option>';\r\n
        \r\n
                                  }\r\n
        \r\n
                                  if ( $getPlusMonth !== '5' ) {\r\n
        \r\n
                                    $plusmonthForm .= '<option value="5">'.$currentMonthYear_pm5.'</option>';\r\n
        \r\n
                                  }\r\n
        \r\n
                                  if ( $getPlusMonth !== '6' ) {\r\n
        \r\n
                                    $plusmonthForm .= '<option value="6">'.$currentMonthYear_pm6.'</option>';\r\n
        \r\n
                                  }\r\n
        \r\n
                                  if ( $getPlusMonth !== '7' ) {\r\n
        \r\n
                                    $plusmonthForm .= '<option value="7">'.$currentMonthYear_pm7.'</option>';\r\n
        \r\n
                                  }\r\n
        \r\n
                                  if ( $getPlusMonth !== '8' ) {\r\n
        \r\n
                                    $plusmonthForm .= '<option value="8">'.$currentMonthYear_pm8.'</option>';\r\n
        \r\n
                                  }\r\n
        \r\n
                                  if ( $getPlusMonth !== '9' ) {\r\n
        \r\n
                                    $plusmonthForm .= '<option value="9">'.$currentMonthYear_pm9.'</option>';\r\n
        \r\n
                                  }\r\n
        \r\n
                                  if ( $getPlusMonth !== '10' ) {\r\n
        \r\n
                                    $plusmonthForm .= '<option value="10">'.$currentMonthYear_pm10.'</option>';\r\n
        \r\n
                                  }\r\n
        \r\n
                                  if ( $getPlusMonth !== '11' ) {\r\n
        \r\n
                                    $plusmonthForm .= '<option value="11">'.$currentMonthYear_pm11.'</option>';\r\n
        \r\n
                                  }\r\n
        \r\n
                                  if ( $getPlusMonth !== '12' ) {\r\n
        \r\n
                                    $plusmonthForm .= '<option value="12">'.$currentMonthYear_pm12.'</option>';\r\n
        \r\n
                                  }\r\n
        \r\n
              $plusmonthForm .= '</select>';\r\n
              $plusmonthForm .= '<input type="submit" class="btn btn-primary" value="View now" />';\r\n
              $plusmonthForm .= '<span class="help-block with-errors"></span>';\r\n
              $plusmonthForm .= '</div>';\r\n
              $plusmonthForm .= '</div>';\r\n
              $plusmonthForm .= '</div>';\r\n
        \r\n
              $plusmonthForm .= '</form>';\r\n
        \r\n
              $calendar .= $plusmonthForm;\r\n
        \r\n
              $calendar .= '</div>\r\n
                            <div class="col-sm-4 dictionary-ephemeris">';\r\n
        \r\n
              $monthYearString = $monthName.' '.$year;\r\n
              $mm = date('n', strtotime($monthYearString));\r\n
              $yy = date('Y', strtotime($monthYearString));\r\n
        \r\n
              $ephemerisUrlString = '?mm='.$mm.'&yy='.$yy;\r\n
        \r\n
              $calendar .= '<a href="/ephemeris/'.$ephemerisUrlString.'" target="_blank">View '.$monthName.' '.$year.' ephemeris &raquo;</a><br /><a href="/astro-dictionary/" target="_blank">View Astro Dictionary &raquo;</a>';\r\n
        \r\n
              $calendar .= '</div>    \r\n
                            </div>';\r\n
        \r\n
              // =====================================\r\n
        \r\n
              // Add toggles for category icons in calendar\r\n
        \r\n
              $calendar .= '<p class="influence-togglers"><span class="icon-toggles icon-show short-term-show" style="display:none;"><img class="icon-checkbox" src="/wp-content/uploads/images/glyphs/checkbox_empty.png" />Short-Term Influences</span><span class="icon-toggles short-term-hide"><img class="icon-checkbox" src="/wp-content/uploads/images/glyphs/checkbox_checked.png" />Short-Term Influences</span><span class="icon-toggles icon-show long-term-show"><img class="icon-checkbox" src="/wp-content/uploads/images/glyphs/checkbox_empty.png" />Long-Term Influences</span><span class="icon-toggles long-term-hide" style="display:none;"><img class="icon-checkbox" src="/wp-content/uploads/images/glyphs/checkbox_checked.png" />Long-Term Influences</span></p>';\r\n
        \r\n
              $calendar .= '<div class="icon-togglers"><span class="icon-toggles icon-hide career-icons-hide"><img class="icon-checkbox" src="/wp-content/uploads/images/glyphs/checkbox_checked.png" /><img src="/wp-content/uploads/images/glyphs/career.png" />Career</span><span class="icon-toggles icon-show career-icons-show" style="display:none;"><img class="icon-checkbox" src="/wp-content/uploads/images/glyphs/checkbox_empty.png" /><img src="/wp-content/uploads/images/glyphs/career.png" />Career</span>';\r\n
        \r\n
              $calendar .= '<span class="icon-toggles icon-hide communication-icons-hide"><img class="icon-checkbox" src="/wp-content/uploads/images/glyphs/checkbox_checked.png" /><img src="/wp-content/uploads/images/glyphs/communication.png" />Communication</span><span class="icon-toggles icon-show communication-icons-show" style="display:none;"><img class="icon-checkbox" src="/wp-content/uploads/images/glyphs/checkbox_empty.png" /><img src="/wp-content/uploads/images/glyphs/communication.png" />Communication</span>';\r\n
        \r\n
              $calendar .= '<span class="icon-toggles icon-hide diet-icons-hide"><img class="icon-checkbox" src="/wp-content/uploads/images/glyphs/checkbox_checked.png" /><img src="/wp-content/uploads/images/glyphs/diet.png" />Fitness</span><span class="icon-toggles icon-show diet-icons-show" style="display:none;"><img class="icon-checkbox" src="/wp-content/uploads/images/glyphs/checkbox_empty.png" /><img src="/wp-content/uploads/images/glyphs/diet.png" />Fitness</span>';\r\n
        \r\n
              $calendar .= '<span class="icon-toggles icon-hide money-icons-hide"><img class="icon-checkbox" src="/wp-content/uploads/images/glyphs/checkbox_checked.png" /><img src="/wp-content/uploads/images/glyphs/money.png" />Money</span><span class="icon-toggles icon-show money-icons-show" style="display:none;"><img class="icon-checkbox" src="/wp-content/uploads/images/glyphs/checkbox_empty.png" /><img src="/wp-content/uploads/images/glyphs/money.png" />Money</span>';\r\n
        \r\n
              $calendar .= '<span class="icon-toggles icon-hide romance-icons-hide"><img class="icon-checkbox" src="/wp-content/uploads/images/glyphs/checkbox_checked.png" /><img src="/wp-content/uploads/images/glyphs/romance.png" />Romance</span><span class="icon-toggles icon-show romance-icons-show" style="display:none;"><img class="icon-checkbox" src="/wp-content/uploads/images/glyphs/checkbox_empty.png" /><img src="/wp-content/uploads/images/glyphs/romance.png" />Romance</span>';\r\n
        \r\n
              $calendar .= '<span class="icon-toggles icon-hide traveling-icons-hide"><img class="icon-checkbox" src="/wp-content/uploads/images/glyphs/checkbox_checked.png" /><img src="/wp-content/uploads/images/glyphs/traveling.png" />Travel</span><span class="icon-toggles icon-show traveling-icons-show" style="display:none;"><img class="icon-checkbox" src="/wp-content/uploads/images/glyphs/checkbox_empty.png" /><img src="/wp-content/uploads/images/glyphs/traveling.png" />Travel</span>';\r\n
        \r\n
              $calendar .= '<span class="icon-toggles icon-hide other-icons-hide" style="display:none;"><img class="icon-checkbox" src="/wp-content/uploads/images/glyphs/checkbox_checked.png" /><img src="/wp-content/uploads/images/glyphs/other.png" />Other</span><span class="icon-toggles icon-show other-icons-show"><img class="icon-checkbox" src="/wp-content/uploads/images/glyphs/checkbox_empty.png" /><img src="/wp-content/uploads/images/glyphs/other.png" />Other</span>';\r\n
        \r\n
              $calendar .= '</div>';\r\n
        \r\n
              // JQuery for the toggles\r\n
        \r\n
              $calendarExtraHtml = "\r\n
                  <script type='text/javascript'>\r\n
                    jQuery(document).ready( function() {\r\n
        \r\n
                      jQuery('.other-category').addClass('other-category-temp');\r\n
                      jQuery('.day-aspects').removeClass('other-category');\r\n
        \r\n
                      jQuery('.short-term-show').on( 'click', function() {\r\n
                        jQuery('.short-influence').show();\r\n
                        jQuery('.short-term-show').hide();\r\n
                        jQuery('.short-term-hide').show();\r\n
                      });\r\n
        \r\n
                      jQuery('.short-term-hide').on( 'click', function() {\r\n
                        jQuery('.short-influence').hide();\r\n
                        jQuery('.short-term-hide').hide();\r\n
                        jQuery('.short-term-show').show();\r\n
                      });\r\n
        \r\n
                      jQuery('.long-term-show').on( 'click', function() {\r\n
                        jQuery('.long-influence').show();\r\n
                        jQuery('.long-term-show').hide();\r\n
                        jQuery('.long-term-hide').show();\r\n
                        jQuery('.other-icons-show').click();\r\n
                      });\r\n
        \r\n
                      jQuery('.long-term-hide').on( 'click', function() {\r\n
                        jQuery('.long-influence').hide();\r\n
                        jQuery('.long-term-hide').hide();\r\n
                        jQuery('.long-term-show').show();\r\n
                      });\r\n
        \r\n
                      jQuery('.career-icons-hide').on( 'click', function() {\r\n
                        jQuery('.career-icon').hide();\r\n
                        jQuery('.career-category').addClass('career-category-temp');\r\n
                        jQuery('.day-aspects').removeClass('career-category');\r\n
                        jQuery('.career-icons-hide').hide();\r\n
                        jQuery('.career-icons-show').show();\r\n
                      });\r\n
        \r\n
                      jQuery('.career-icons-show').on( 'click', function() {\r\n
                        jQuery('.career-icon').show();\r\n
                        jQuery('.career-category-temp').addClass('career-category');\r\n
                        jQuery('.day-aspects').removeClass('career-category-temp');\r\n
                        jQuery('.career-icons-hide').show();\r\n
                        jQuery('.career-icons-show').hide();\r\n
                      });\r\n
        \r\n
                      jQuery('.communication-icons-hide').on( 'click', function() {\r\n
                        jQuery('.communication-icon').hide();\r\n
                        jQuery('.communication-category').addClass('communication-category-temp');\r\n
                        jQuery('.day-aspects').removeClass('communication-category');\r\n
                        jQuery('.communication-icons-hide').hide();\r\n
                        jQuery('.communication-icons-show').show();\r\n
                      });\r\n
        \r\n
                      jQuery('.communication-icons-show').on( 'click', function() {\r\n
                        jQuery('.communication-icon').show();\r\n
                        jQuery('.communication-category-temp').addClass('communication-category');\r\n
                        jQuery('.day-aspects').removeClass('communication-category-temp');\r\n
                        jQuery('.communication-icons-hide').show();\r\n
                        jQuery('.communication-icons-show').hide();\r\n
                      });\r\n
        \r\n
                      jQuery('.diet-icons-hide').on( 'click', function() {\r\n
                        jQuery('.diet-icon').hide();\r\n
                        jQuery('.diet-category').addClass('diet-category-temp');\r\n
                        jQuery('.day-aspects').removeClass('diet-category');\r\n
                        jQuery('.diet-icons-hide').hide();\r\n
                        jQuery('.diet-icons-show').show();\r\n
                      });\r\n
        \r\n
                      jQuery('.diet-icons-show').on( 'click', function() {\r\n
                        jQuery('.diet-icon').show();\r\n
                        jQuery('.diet-category-temp').addClass('diet-category');\r\n
                        jQuery('.day-aspects').removeClass('diet-category-temp');\r\n
                        jQuery('.diet-icons-hide').show();\r\n
                        jQuery('.diet-icons-show').hide();\r\n
                      });\r\n
        \r\n
                      jQuery('.money-icons-hide').on( 'click', function() {\r\n
                        jQuery('.money-icon').hide();\r\n
                        jQuery('.money-category').addClass('money-category-temp');\r\n
                        jQuery('.day-aspects').removeClass('money-category');\r\n
                        jQuery('.money-icons-hide').hide();\r\n
                        jQuery('.money-icons-show').show();\r\n
                      });\r\n
        \r\n
                      jQuery('.money-icons-show').on( 'click', function() {\r\n
                        jQuery('.money-icon').show();\r\n
                        jQuery('.money-category-temp').addClass('money-category');\r\n
                        jQuery('.day-aspects').removeClass('money-category-temp');\r\n
                        jQuery('.money-icons-hide').show();\r\n
                        jQuery('.money-icons-show').hide();\r\n
                      });\r\n
        \r\n
                      jQuery('.romance-icons-hide').on( 'click', function() {\r\n
                        jQuery('.romantic-icon').hide();\r\n
                        jQuery('.romantic-category').addClass('romantic-category-temp');\r\n
                        jQuery('.day-aspects').removeClass('romantic-category');\r\n
                        jQuery('.romance-icons-hide').hide();\r\n
                        jQuery('.romance-icons-show').show();\r\n
                      });\r\n
        \r\n
                      jQuery('.romance-icons-show').on( 'click', function() {\r\n
                        jQuery('.romantic-icon').show();\r\n
                        jQuery('.romantic-category-temp').addClass('romantic-category');\r\n
                        jQuery('.day-aspects').removeClass('romantic-category-temp');\r\n
                        jQuery('.romance-icons-hide').show();\r\n
                        jQuery('.romance-icons-show').hide();\r\n
                      });\r\n
        \r\n
                      jQuery('.traveling-icons-hide').on( 'click', function() {\r\n
                        jQuery('.traveling-icon').hide();\r\n
                        jQuery('.traveling-category').addClass('traveling-category-temp');\r\n
                        jQuery('.day-aspects').removeClass('traveling-category');\r\n
                        jQuery('.traveling-icons-hide').hide();\r\n
                        jQuery('.traveling-icons-show').show();\r\n
                      });\r\n
        \r\n
                      jQuery('.traveling-icons-show').on( 'click', function() {\r\n
                        jQuery('.traveling-icon').show();\r\n
                        jQuery('.traveling-category-temp').addClass('traveling-category');\r\n
                        jQuery('.day-aspects').removeClass('traveling-category-temp');\r\n
                        jQuery('.traveling-icons-hide').show();\r\n
                        jQuery('.traveling-icons-show').hide();\r\n
                      });\r\n
        \r\n
                      jQuery('.other-icons-hide').on( 'click', function() {\r\n
                        jQuery('.other-icon').hide();\r\n
                        jQuery('.other-category').addClass('other-category-temp');\r\n
                        jQuery('.day-aspects').removeClass('other-category');\r\n
                        jQuery('.other-icons-hide').hide();\r\n
                        jQuery('.other-icons-show').show();\r\n
                      });\r\n
        \r\n
                      jQuery('.other-icons-show').on( 'click', function() {\r\n
                        jQuery('.other-icon').show();\r\n
                        jQuery('.other-category-temp').addClass('other-category');\r\n
                        jQuery('.day-aspects').removeClass('other-category-temp');\r\n
                        jQuery('.other-icons-hide').show();\r\n
                        jQuery('.other-icons-show').hide();\r\n
                      });\r\n
                    });\r\n
                  </script>";\r\n
        \r\n
            } else {\r\n
        \r\n
              $calendar .= '</div>\r\n
                            </div>';\r\n
        \r\n
            }\r\n
        \r\n
          // =========================================\r\n
        \r\n
          $calendar .= '<p class="toggle-notes">(Click/tap on the calendar icons to show more information)</p>';\r\n
        \r\n
        \r\n
          // Create the table tag opener and day headers\r\n
          $calendar .= '<table id="calendar">';\r\n
          $calendar .= '<tr class="weekdays">';\r\n
        \r\n
          // Create the calendar headers\r\n
          foreach ( $daysOfWeek as $day ) {\r\n
            $calendar .= '<th>' . $day . '</th>';\r\n
          }\r\n
        \r\n
          // Compare today's month (real) with inputted month\r\n
          // Get current date (1-31) only if real month is the same as inputted month\r\n
        \r\n
          $realCurrentMonth = date("n", $currentTimeUtcOffset);\r\n
        \r\n
          if ( $realCurrentMonth == $calendarCurrentMonth ) {\r\n
        \r\n
            $today = date("j", $currentTimeUtcOffset);\r\n
        \r\n
          } else {\r\n
        \r\n
            $today = 0;\r\n
        \r\n
          }\r\n
        \r\n
        \r\n
          // Create the rest of the calendar\r\n
          // Initiate the day counter, starting with the 1st.\r\n
          $currentDay = 1;\r\n
        \r\n
          $calendar .= '</tr><tr class="days">';\r\n
        \r\n
          // The variable $dayOfWeek is used to ensure that the \r\n
          // calendar display consists of exactly 7 columns\r\n
        \r\n
          // =========================================\r\n
        \r\n
          // Create calendar cells for days from previous month\r\n
        \r\n
          if ( $dayOfWeek > 0 ) {\r\n
        \r\n
            $i = 0;\r\n
        \r\n
            while ( $i < $dayOfWeek) {\r\n
        \r\n
            // Create merged table cells at the beginning of \r\n
            // first row in the calendar\r\n
            // $calendar .= '<td colspan="'.$dayOfWeek.'" class="day other-month">&nbsp;</td>';\r\n
        \r\n
            $calendar .= '<td class="day other-month">&nbsp;</td>';\r\n
        \r\n
            $i++;\r\n
        \r\n
            } \r\n
        \r\n
          }\r\n
        \r\n
          // =========================================\r\n
        \r\n
          // Check if moon phase data exists in object cache, if not, generate and cache\r\n
        \r\n
          // Source: https://codex.wordpress.org/Class_Reference/WP_Object_Cache\r\n
        \r\n
          $moonphaseDataCacheKey = 'moonphases_eclipses_data';\r\n
        \r\n
          $moonphaseDataCache = get_transient( $moonphaseDataCacheKey );\r\n
        \r\n
          if ( false === $moonphaseDataCache ) {\r\n
        \r\n
            // Produce array of moon phases between 2018 to 2035 with corresponding unix timestamp and UTC date\r\n
            // Data source: https://www.somacon.com/p570.php\r\n
            // Data source: http://aa.usno.navy.mil/data/docs/MoonPhase.php\r\n
            \r\n
            $lines = explode( "\n", file_get_contents('https://new.theastrologer.com/wp-content/uploads/data/moon-phases-solarlunar-eclipses-2018-2035-UTC.csv' ) );\r\n
        \r\n
            // Take out first line of CSV to use as array keys\r\n
            $headers = str_getcsv( array_shift( $lines ) );\r\n
        \r\n
            $data = array();\r\n
        \r\n
            foreach ( $lines as $line ) {\r\n
        \r\n
              $row = array();\r\n
        \r\n
              foreach ( str_getcsv( $line ) as $key => $field )\r\n
                $row[ $headers[ $key ] ] = $field;\r\n
        \r\n
              $row = array_filter( $row );\r\n
        \r\n
              $data[] = $row;\r\n
        \r\n
            }\r\n
        \r\n
            $moonphaseDataCache = $data;\r\n
        \r\n
            set_transient( $moonphaseDataCacheKey, $moonphaseDataCache, 31556952 );\r\n
        \r\n
          } else {\r\n
        \r\n
            // $cachedDataCheck .= '<div>Cached '.$moonphaseDataCacheKey.' data is used</div>';\r\n
        \r\n
            $data = $moonphaseDataCache;\r\n
        \r\n
          }\r\n
        \r\n
          // =========================================\r\n
        \r\n
            // Change moon phase and solar/moon eclipse data based on timezone\r\n
            // Use New York timezone (UTC-4) to begin with\r\n
        \r\n
            echo '<div class="row">';\r\n
            echo '<div class="col-lg-6">';\r\n
            // echo '<p>Below is data in UTC:</p>';\r\n
            // echo '<pre>';\r\n
            // print_r($data[0]);\r\n
            // print_r($data[1]);\r\n
            // print_r($data[2]);\r\n
            // echo '</pre>';\r\n
            echo '</div>';\r\n
        \r\n
            if ( $utcOffset !== '0' ) {\r\n
        \r\n
              // https://stackoverflow.com/a/15472071\r\n
        \r\n
              foreach ($data as &$dataline) {\r\n
        \r\n
                  $convertedTimestamp = $dataline['timestamp'] + $utcOffset*60*60;\r\n
        \r\n
                  $dataline['timestamp'] = $convertedTimestamp;\r\n
        \r\n
                  $convertedFriendlyDate = date("F j, Y",$convertedTimestamp);\r\n
        \r\n
                  $dataline['friendlydate'] = $convertedFriendlyDate;\r\n
        \r\n
              }\r\n
        \r\n
            } else {}\r\n
        \r\n
            echo '<div class="col-lg-6">';\r\n
            // echo '<p>Below is data in UTC'.$utcOffsetString.':</p>';\r\n
            // echo '<pre>';\r\n
            // print_r($data[0]);\r\n
            // // print_r($data[1]);\r\n
            // // print_r($data[2]);\r\n
            // echo '</pre>';\r\n
            echo '</div>';\r\n
            echo '</div>';\r\n
        \r\n
            echo '<div class="row">';\r\n
            echo '<div class="col-lg-6">';\r\n
            // echo '<p>Below is data in UTC:</p>';\r\n
            // // echo $planetUpdatePostsContent;\r\n
            // echo '<pre>';\r\n
            // print_r($planetUpdatePostsOriginal[0]);\r\n
            // // var_dump($theQueryArray);\r\n
            // echo '</pre>';\r\n
            echo '</div>';\r\n
        \r\n
            echo '<div class="col-lg-6">';\r\n
            // echo '<p>Below is data in UTC'.$utcOffsetString.':</p>';\r\n
            // echo '<pre>';\r\n
            // print_r($planetUpdatePostsConverted[0]);\r\n
            // echo '</pre>';\r\n
            echo '</div>';\r\n
            echo '</div>';    \r\n
        \r\n
          // =========================================\r\n
        \r\n
          // Turn month number into two digits, \r\n
          // e.g. 7 to 07, but keep 11 as 11\r\n
        \r\n
          $monthRel = str_pad($calendarCurrentMonth,2,"0", STR_PAD_LEFT);\r\n
        \r\n
          // Loop through the days in the month and create cell content\r\n
        \r\n
          while ( $currentDay <= $numberDays ) {\r\n
        \r\n
            // Seventh column (Saturday) reached. Start a new row\r\n
        \r\n
            if ( $dayOfWeek == 7 ) {\r\n
        \r\n
              $dayOfWeek = 0;\r\n
              $calendar .= '</tr><tr>';\r\n
        \r\n
            }\r\n
        \r\n
            // Turn day number into two digits, \r\n
            // e.g. 7 to 07, but keep 25 as 25\r\n
        \r\n
            $currentDayRel = str_pad($currentDay, 2, "0", STR_PAD_LEFT);\r\n
        \r\n
            // Create date in loop in YYYY-MM-DD format\r\n
            $date = $year.'-'.$monthRel.'-'.$currentDayRel;\r\n
        \r\n
            $dayName = date("l", strtotime($date));\r\n
            $dateFriendly = date("F j, Y", strtotime($date));\r\n
        \r\n
            // Find matching friendly date and get moon phases\r\n
            foreach ($data as $dataline) {\r\n
        \r\n
              foreach ( $dataline as $key => $value ) {\r\n
        \r\n
                if ( $key == 'friendlydate' ) {\r\n
        \r\n
                  if ( $value == $dateFriendly ) {\r\n
                    // echo $value.' matched! ';\r\n
                    $match = 1;\r\n
                  }\r\n
        \r\n
                }\r\n
        \r\n
                if ( ( $match == 1 ) && ( $key == 'phase' ) ) {\r\n
        \r\n
                  $moonphase = $value;\r\n
        \r\n
                  if ( $moonphase == 'New Moon') {\r\n
                    $moonPhaseImgUrl = '/wp-content/uploads/images/moonphases/new_moon.png';\r\n
                  } elseif ( $moonphase == 'First Quarter') {\r\n
                    $moonPhaseImgUrl = '/wp-content/uploads/images/moonphases/right_quarter_moon.png';\r\n
                  } elseif ( $moonphase == 'Full Moon') {\r\n
                    $moonPhaseImgUrl = '/wp-content/uploads/images/moonphases/full_moon.png';\r\n
                  } elseif ( $moonphase == 'Last Quarter') {\r\n
                    $moonPhaseImgUrl = '/wp-content/uploads/images/moonphases/left_quarter_moon.png';\r\n
                  } else {}\r\n
        \r\n
                }\r\n
        \r\n
                if ( ( $match == 1 ) && ( $key == 'eclipse' ) ) {\r\n
        \r\n
                  if ( !empty($value) ) {\r\n
        \r\n
                    $eclipse = $value;\r\n
        \r\n
                    $eclipseImgUrl = '/wp-content/uploads/images/moonphases/eclipse.png';\r\n
        \r\n
                  }\r\n
        \r\n
                }\r\n
        \r\n
                if ( ( $match == 1 ) && ( $key == 'eclipse_type' ) ) {\r\n
        \r\n
                  if ( !empty($value) ) {\r\n
        \r\n
                    $eclipseType = $value;\r\n
        \r\n
                  }\r\n
        \r\n
                }\r\n
        \r\n
              }\r\n
        \r\n
              unset($match); \r\n
        \r\n
            }\r\n
        \r\n
            // =========================================\r\n
        \r\n
            // Content for each day as $dayContent\r\n
        \r\n
            // =========================================\r\n
        \r\n
            // Key transits from https://theastrologer.com/ical/month.php\r\n
        \r\n
            // =========================================\r\n
        \r\n
            $todaysDate = date("n/d/Y", strtotime($date));\r\n
            $todaysDateFormatted = date("l, F j, Y",strtotime($todaysDate));\r\n
            $todaysDateUnix = strtotime($todaysDate);\r\n
        \r\n
            $tomorrowsDate = date("n/d/Y", strtotime('+1 day', strtotime($date)));\r\n
            $tomorrowsDateFormatted = date("l, F j, Y",strtotime($tomorrowsDate));\r\n
            $tomorrowsDateUnix = strtotime($tomorrowsDate);\r\n
        \r\n
            // Get VCal data from API #1059. \r\n
        \r\n
            // Convert Date of Birth format\r\n
        \r\n
            if ( !empty($dateOfBirth) ) {\r\n
        \r\n
              $dateOfBirth = date("m/d/Y", strtotime($dateOfBirth));\r\n
        \r\n
            } else {\r\n
        \r\n
              // Assume DOB of member is August 15, 1967\r\n
        \r\n
              $dateOfBirth = '08/15/1967';\r\n
        \r\n
            }\r\n
        \r\n
            $dateOfBirthString = str_replace("/","",$dateOfBirth); \r\n
        \r\n
            // Process and show key transits content only for paid calendar\r\n
        \r\n
            if ( $calType === 'paid' ) {\r\n
        \r\n
              $dayContent = '<div class="tdchild key-transits">';\r\n
        \r\n
              // Define object cache key name using string of DOB and today's date in UNIX time\r\n
        \r\n
              $vcalDataCacheKeyname = 'vcal_data_'.$dateOfBirthString.'_'.$todaysDateUnix;\r\n
        \r\n
              // Check if Vcal data exist in cache, if not, retrieve from API and store in cache. If it exist, use it.\r\n
        \r\n
              $vcalDataCache = get_transient( $vcalDataCacheKeyname );\r\n
        \r\n
              if ( false == $vcalDataCache ) {\r\n
        \r\n
                $urlVcal = 'https://www.zdki.us/taReportsw/MakeReport.aspx?ReportID=37&ReportVariation=rom&ReportFormat=ICS&Name1=John%20Doe&BirthDate1='.$dateOfBirth.'&Name2=&BirthDate2=&StartDate='.$todaysDate.'&Length=1&AccountID=cat_all&AppID=CDS&MemberID=1234567890';\r\n
        \r\n
        \t\t$username = 'theastroweb';\r\n
        \t\t$password = '2Pq0^1IDvZjVs';\r\n
        \r\n
        \t\t$args = array(\r\n
        \t\t  'headers' => array(\r\n
        \t\t    'Authorization' => 'Basic ' . base64_encode( $username . ':' . $password )\r\n
        \t\t  )\r\n
        \t\t);\r\n
        \r\n
                $vcalData = wp_remote_get( $urlVcal, $args );\r\n
        \r\n
                set_transient( $vcalDataCacheKeyname, $vcalData, 2629746 );\r\n
        \r\n
              } else {\r\n
        \r\n
                // $cachedDataCheck .= '<div>Cached '.$vcalDataCacheKeyname.' data is used</div>';\r\n
        \r\n
                $vcalData = $vcalDataCache;\r\n
        \r\n
              }\r\n
        \r\n
              if( is_wp_error( $vcalData ) ) {\r\n
                return false; // Bail early\r\n
              }\r\n
        \r\n
              else {\r\n
        \r\n
                // $dayContent .= $todaysDate.'<br />';\r\n
        \r\n
                // Fetch API data in VCalendar format and convert to PHP array\r\n
                $icalendarData = wp_remote_retrieve_body( $vcalData );\r\n
        \r\n
                // Remove BEGIN:VEVENT and END:VEVENT lines\r\n
                $icalendarData = str_replace("BEGIN:VEVENT", "", $icalendarData);\r\n
                $icalendarData = str_replace("END:VEVENT", "", $icalendarData);\r\n
        \r\n
                // Remove empty lines left over by above string replacements\r\n
                $icalendarData = preg_replace("/^[ \t]*[\r\n]+/m", "\n", $icalendarData);\r\n
        \r\n
                // Split API data by empty lines into array items\r\n
                // https://stackoverflow.com/a/7368311\r\n
                $icalDataArray = preg_split("#\n\s*\n#Uis", $icalendarData);\r\n
        \r\n
                // Remove first array containing VCal info\r\n
                $icalDataArrayFirst = array_shift($icalDataArray);\r\n
        \r\n
                // Remove last array containing VCal info close tag\r\n
                $icalDataArrayLast = array_pop($icalDataArray); \r\n
        \r\n
                // Initialize variable to store the aspects from key influences\r\n
                $dayAspects = '';\r\n
        \r\n
                // Turn each VEvent into an array of values\r\n
                foreach ($icalDataArray as &$icalDataArrayItem) {\r\n
        \r\n
                  $icalDataArrayItem = preg_split("/((\r?\n)|(\r\n?))/", $icalDataArrayItem);\r\n
        \r\n
                  $icalDataArrayItemLast = array_pop($icalDataArrayItem); \r\n
        \r\n
                  $dateStart = str_replace("DTSTART:","",$icalDataArrayItem[2]);\r\n
                  $dateStart = strtotime($dateStart);\r\n
        \r\n
                  $dateEnd = str_replace("DTEND:","",$icalDataArrayItem[4]);\r\n
                  $dateEnd = strtotime($dateEnd);\r\n
        \r\n
                  $planetAspect = str_replace("SUMMARY:","",$icalDataArrayItem[9]);\r\n
                  $planetAspect = explode(" ",$planetAspect);\r\n
                  $firstPlanet = $planetAspect[0];\r\n
                  $combinationAspect = $planetAspect[1];\r\n
                  $secondPlanet = $planetAspect[2];\r\n
                  $planetAspectGlyphs = '<img src="/wp-content/uploads/images/glyphs/'.$firstPlanet.'.png" /><img src="/wp-content/uploads/images/glyphs/'.$combinationAspect.'.png" /><img src="/wp-content/uploads/images/glyphs/'.$secondPlanet.'.png" />';\r\n
        \r\n
                  if ( ($todaysDateUnix >= $dateStart) && ($todaysDateUnix <= $dateEnd) ) {\r\n
        \r\n
                    $categories = str_replace("CATEGORIES:","",$icalDataArrayItem[7]);\r\n
                    $categoriesLower = strtolower($categories);\r\n
                    $categoriesArray = explode(",",$categoriesLower);\r\n
        \r\n
                    $categoriesAvailable = array("career","communication","diet","money","romantic","traveling");\r\n
        \r\n
                    $summary = str_replace("SUMMARY:","",$icalDataArrayItem[9]);\r\n
                    $summaryLower = strtolower($summary);\r\n
                    $summaryString = str_replace(" ","",$summaryLower);\r\n
                    $summaryStringCurrentDay = $summaryString.''.$currentDay;\r\n
                    $summaryArray = explode(" ",$summaryLower);\r\n
        \r\n
                    $heading = str_replace("HEADING:","",$icalDataArrayItem[10]);\r\n
        \r\n
                    $text = str_replace("TEXT:","",$icalDataArrayItem[11]);\r\n
        \r\n
                    $description = str_replace("DESCRIPTION:","",$icalDataArrayItem[12]);\r\n
        \r\n
                    $dateStart = date("F j",$dateStart);\r\n
                    $dateEnd = date("F j",$dateEnd);\r\n
        \r\n
                    // ---------------------------------\r\n
        \r\n
                    // Initialize category classes for $dayAspects after the foreach loop below\r\n
                    $categoryClasses = 'hideif-catempty ';\r\n
        \r\n
                    // Initialize category icons variable\r\n
                    $categoryIcons = '';\r\n
        \r\n
                    foreach ($categoriesArray as $categoriesArrayItem) {\r\n
        \r\n
                      if ( !in_array($categoriesArrayItem,$categoriesAvailable) ) {\r\n
        \r\n
                        $categoriesArrayItem = 'other';\r\n
        \r\n
                      }\r\n
        \r\n
                      $categoryIcons .= '<img class="category-icon '.$categoriesArrayItem.'-icon" src="/wp-content/uploads/images/glyphs/'.$categoriesArrayItem.'.png" />'; \r\n
        \r\n
                      $categoryClasses .= $categoriesArrayItem.'-category ';\r\n
        \r\n
                    }\r\n
        \r\n
                    if ( ($firstPlanet == 'Sun') || ($firstPlanet == 'Mercury') || ($firstPlanet == 'Venus') || ($firstPlanet == 'Mars') ) {\r\n
        \r\n
                      $dayContent .= '<span class="short-influence">';\r\n
        \r\n
                    } else {\r\n
        \r\n
                      $dayContent .= '<span class="long-influence" style="display:none;">';\r\n
        \r\n
                    }\r\n
        \r\n
                    $dayContent .= '<span class="day-aspects '.$summaryString.' stooltip-gray stooltip '.$categoryClasses.'" data-toggle="modal" data-target="#'.$summaryStringCurrentDay.'" data-tooltip-pos="top-center">';\r\n
        \r\n
                    $dayContent .= '<div class="cal-transit-glyphs">'.$planetAspectGlyphs.'</div><div class="cal-category-icons">'.$categoryIcons.'</div><div class="cal-transit-summary">'.$summary.'</div>';\r\n
        \r\n
                    $dayContent .= '<div class="stooltip-content">'.$dateStart.' - '.$dateEnd.'</div></span></span>';\r\n
        \r\n
                    $dayContent .= '\r\n
                      <div class="modal fade" id="'.$summaryStringCurrentDay.'" tabindex="-1" role="dialog" aria-labelledby="'.$summaryStringCurrentDay.'Label">\r\n
                      <div class="modal-dialog" role="document">\r\n
                        <div class="modal-content">\r\n
                          <div class="modal-header">\r\n
                            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>\r\n
                            <h4 class="modal-title" id="'.$summaryStringCurrentDay.'Label">'.$planetAspectGlyphs.' '.$summary.': '.$heading.'</h4>\r\n
                          </div>\r\n
                          <div class="modal-body">\r\n
                            <p class="modal-date">'.$dateStart.' - '.$dateEnd.'</p>';\r\n
        \r\n
                    $dayContent .= "<script type='text/javascript'>\r\n
                            jQuery(document).ready( function() {\r\n
                              jQuery('." . $summaryStringCurrentDay . "').on( 'click', function() {\r\n
                                jQuery('.modal-short-content-".$summaryStringCurrentDay."').show();\r\n
                                jQuery('.modal-readmore-".$summaryStringCurrentDay."').show();\r\n
                                jQuery('.modal-long-content-".$summaryStringCurrentDay."').hide();\r\n
                                jQuery('.modal-readless-".$summaryStringCurrentDay."').hide();\r\n
                              });\r\n
                            });\r\n
                          </script>";\r\n
        \r\n
                    $dayContent .= '\r\n
                            <p class="modal-short-content modal-short-content-'.$summaryStringCurrentDay.'">'.$text.'</p>\r\n
                            <p class="modal-long-content modal-long-content-'.$summaryStringCurrentDay.'" style="display:none">'.$description.'</p>\r\n
                          </div>\r\n
                          <div class="modal-footer">\r\n
                            <button type="button" class="btn btn-primary modal-readmore-'.$summaryStringCurrentDay.'">Read more &raquo;</button>\r\n
                            <button type="button" class="btn btn-primary modal-readless-'.$summaryStringCurrentDay.'" style="display:none">&laquo; Summary</button>';\r\n
        \r\n
                      $dayContent .= "<script type='text/javascript'>\r\n
                        jQuery(document).ready( function() {\r\n
                          jQuery('.modal-readmore-".$summaryStringCurrentDay."').on( 'click', function() {\r\n
                            jQuery('.modal-short-content-".$summaryStringCurrentDay."').hide( 'fast' );\r\n
                            jQuery('.modal-readmore-".$summaryStringCurrentDay."').hide( 'fast' );\r\n
                            jQuery('.modal-long-content-".$summaryStringCurrentDay."').show( 'fast' );\r\n
                            jQuery('.modal-readless-".$summaryStringCurrentDay."').show( 'fast' );\r\n
                          });\r\n
                          jQuery('.modal-readless-".$summaryStringCurrentDay."').on( 'click', function() {\r\n
                            jQuery('.modal-short-content-".$summaryStringCurrentDay."').show( 'fast' );\r\n
                            jQuery('.modal-readmore-".$summaryStringCurrentDay."').show( 'fast' );\r\n
                            jQuery('.modal-long-content-".$summaryStringCurrentDay."').hide( 'fast' );\r\n
                            jQuery('.modal-readless-".$summaryStringCurrentDay."').hide( 'fast' );\r\n
                          });\r\n
                        });\r\n
                        </script>";\r\n
        \r\n
                      $dayContent .= '\r\n
                          </div>\r\n
                        </div>\r\n
                      </div>\r\n
                    </div>';\r\n
        \r\n
                    // $dayContent .= '<p title="'.$summary.': '.$heading.'"><img src="/wp-content/uploads/images/glyphs/'.$summaryArray[0].'.png" /><img src="/wp-content/uploads/images/glyphs/'.$summaryArray[1].'.png" /><img src="/wp-content/uploads/images/glyphs/'.$summaryArray[2].'.png" /></p>';\r\n
        \r\n
                  } else {}\r\n
        \r\n
                }\r\n
        \r\n
              }\r\n
        \r\n
              $dayContent .= '</div>';\r\n
        \r\n
            } \r\n
        \r\n
            else {\r\n
        \r\n
              $dayContent = '<div class="tdchild key-transits key-transits-free">';\r\n
        \r\n
              $dayContent .= '</div>';\r\n
        \r\n
            }\r\n
        \r\n
        \r\n
            // =========================================\r\n
        \r\n
            // $dayContent .= '<div class="tdchild key-info">';\r\n
        \r\n
            // End of key-info section\r\n
        \r\n
            // $dayContent .= '</div>';\r\n
        \r\n
            // =========================================\r\n
        \r\n
            // $dayContent .= '<div class="tdchild key-combos">';\r\n
        \r\n
            // $dayContent .= $dayAspects;\r\n
        \r\n
            // $dayContent .= '</div>';\r\n
        \r\n
            // =========================================\r\n
        \r\n
            $dayContent .= '<div class="tdchild key-names">';\r\n
        \r\n
            // Get moon in sign content\r\n
        \r\n
            // Check if cached data exist, otherwise, grab from API and cache it\r\n
        \r\n
            $todaysPlanetsCacheKey = 'todaysplanets_'.$todaysDateUnix;\r\n
        \r\n
            $tomorrowsPlanetsCacheKey = 'tomorrowsplanets_'.$tomorrowsDateUnix;\r\n
        \r\n
            $todays_planets_raw_cached = get_transient( $todaysPlanetsCacheKey );\r\n
        \r\n
            $tomorrows_planets_raw_cached = get_transient( $tomorrowsPlanetsCacheKey );\r\n
        \r\n
            if ( false === $todays_planets_raw_cached ) {\r\n
        \r\n
              $todaysPlanetsUrl = "https://www.zdki.us/taReportsw/DailyIntros.aspx?ReportType=TodaysPlanet&DateFrom=".$todaysDate."&DateTo=".$todaysDate."&ReportFormat=XML&NewsFlash=&AccountID=theastrologerWP1&AppID=website&MemberID=1234567890&V=2.5";\r\n
        \r\n
        \t\t\t$username = 'theastroweb';\r\n
        \t\t\t$password = '2Pq0^1IDvZjVs';\r\n
        \r\n
        \t\t\t$context = stream_context_create(array(\r\n
        \t\t\t        'http' => array(\r\n
        \t\t\t            'header'  => "Authorization: Basic " . base64_encode("$username:$password")\r\n
        \t\t\t        )\r\n
        \t\t\t    )\r\n
        \t\t\t);\r\n
        \t\t\t$data = file_get_contents($todaysPlanetsUrl, false, $context);\r\n
        \r\n
        \t\t\t$todays_planets_raw = simplexml_load_string($data);\r\n
        \r\n
              // https://stackoverflow.com/a/7797259\r\n
              set_transient( $todaysPlanetsCacheKey, $todays_planets_raw->asXML(), 2629746 );\r\n
        \r\n
            } else {\r\n
        \r\n
              // $cachedDataCheck .= '<div>Cached '.$todaysPlanetsCacheKey.' data is used</div>';\r\n
        \r\n
              // https://stackoverflow.com/a/7797259\r\n
              $todays_planets_raw = simplexml_load_string($todays_planets_raw_cached);\r\n
        \r\n
            }\r\n
        \r\n
            if ( false === $tomorrows_planets_raw_cached ) {\r\n
        \r\n
              $tomorrowsPlanetsUrl = "https://www.zdki.us/taReportsw/DailyIntros.aspx?ReportType=TodaysPlanet&DateFrom=".$tomorrowsDate."&DateTo=".$tomorrowsDate."&ReportFormat=XML&NewsFlash=&AccountID=theastrologerWP1&AppID=website&MemberID=1234567890&V=2.5";\r\n
        \r\n
        \t\t\t$username = 'theastroweb';\r\n
        \t\t\t$password = '2Pq0^1IDvZjVs';\r\n
        \r\n
        \t\t\t$context = stream_context_create(array(\r\n
        \t\t\t        'http' => array(\r\n
        \t\t\t            'header'  => "Authorization: Basic " . base64_encode("$username:$password")\r\n
        \t\t\t        )\r\n
        \t\t\t    )\r\n
        \t\t\t);\r\n
        \t\t\t$data = file_get_contents($tomorrowsPlanetsUrl, false, $context);\r\n
        \r\n
        \t\t\t$tomorrows_planets_raw = simplexml_load_string($data);\r\n
        \r\n
              // https://stackoverflow.com/a/7797259\r\n
              set_transient( $tomorrowsPlanetsCacheKey, $tomorrows_planets_raw->asXML(), 2629746 );\r\n
        \r\n
            } else {\r\n
        \r\n
              // $cachedDataCheck .= '<div>Cached '.$tomorrowsPlanetsCacheKey.' data is used</div>';\r\n
        \r\n
              // https://stackoverflow.com/a/7797259\r\n
              $tomorrows_planets_raw = simplexml_load_string($tomorrows_planets_raw_cached);\r\n
        \r\n
            }\r\n
        \r\n
            $datetoday_var = date('Ymd',strtotime($todaysDate));\r\n
            $datetomorrow_var = date('Ymd',strtotime('+1 day',strtotime($todaysDate)));\r\n
        \r\n
            $combination1_name = $todays_planets_raw ->{'date-'.$datetoday_var.''}[0]->todaysplanet[0]->planet[0]->name;\r\n
            $combination1_name_lower = strtolower($combination1_name);\r\n
            $combination1_name_trimmed = str_replace(' ', '', $combination1_name_lower);\r\n
        \r\n
            $combination1_sign = $todays_planets_raw ->{'date-'.$datetoday_var.''}[0]->todaysplanet[0]->planet[0]->sign;\r\n
            $combination1_sign_lower = strtolower($combination1_sign);\r\n
            $combination1_sign_trimmed = str_replace(' ', '', $combination1_sign_lower);\r\n
        \r\n
            $combination1_sign_tomorrow = $tomorrows_planets_raw ->{'date-'.$datetomorrow_var.''}[0]->todaysplanet[0]->planet[0]->sign;\r\n
            $combination1_sign_tomorrow_lower = strtolower($combination1_sign_tomorrow);\r\n
            $combination1_sign_tomorrow_trimmed = str_replace(' ', '', $combination1_sign_tomorrow_lower);\r\n
        \r\n
            $combination1_degree = $todays_planets_raw ->{'date-'.$datetoday_var.''}[0]->todaysplanet[0]->planet[0]->degree;\r\n
        \r\n
            $vars = explode(".",$combination1_degree);\r\n
            $deg = $vars[0];\r\n
            $tempma = '0.'.$vars[1];\r\n
            $tempma = $tempma * 3600;\r\n
            $min = floor($tempma / 60);\r\n
            $sec = $tempma - ($min*60);\r\n
            $degmin = $deg.''.$min;\r\n
        \r\n
            $combination1_degree = $deg.'&deg;'.$min.'&apos;';\r\n
        \r\n
            $combination1_retro = $todays_planets_raw ->{'date-'.$datetoday_var.''}[0]->todaysplanet[0]->planet[0]->retro;\r\n
        \r\n
            if ( $combination1_retro == 1) {\r\n
        \r\n
              $combination1_retro_slug = 'rx'; \r\n
        \r\n
              $retro_symbol = ' <span class="retro-symbol">Rx</span>'; \r\n
        \r\n
            } else {\r\n
        \r\n
              $combination1_retro_slug = 'norx'; \r\n
        \r\n
              $retro_symbol = ''; \r\n
        \r\n
            }\r\n
        \r\n
            $combination1 = $combination1_name_trimmed.''.$combination1_sign_lower.'today';\r\n
        \r\n
            $combination1slug =  $combination1_name_trimmed.'-'.$combination1_sign_lower.'-'.$combination1_retro_slug;\r\n
        \r\n
            $combination1degmin = $combination1.''.$degmin;\r\n
        \r\n
            if ( ($combination1_name_trimmed == 'moon' ) && ( $combination1_sign_lower == 'aries' ) && ( $combination1_retro_slug == 'norx' ) ) {\r\n
              $combination1_short_content = "The Aries Moon brings you energy to help you get things done, but this could be a challenging few days if tact and diplomacy are needed.";\r\n
              $combination1_long_content = "The Aries Moon sends you a burst of energy, spurring you to launch new projects. Your passions are aroused: You're taking the initiative, being decisive, working independently and gaining self-confidence. If you take on a leadership role, be careful not to burn your bridges even before you build them! Overreactions are likely as certain feelings and behaviors -- impatience, impulsiveness, belligerence -- are stirred up. Remember, gentle hints can be just as effective as direct commands, if not more so. It's all too easy now to rile someone up or hurt their feelings. Of course, you're in the mood to provoke people, so you might actually welcome a good argument to clear the air! There's not much of a filter between your mind and your mouth at the moment, so if you say exactly what you're thinking, be forewarned -- you'll have to do damage control later. Even if you don't start any squabbles or upset any of your friends, your high energy could still present some challenges. You think you can tackle anything and everything now, plus you're more impulsive than usual. You might start several projects at once, only to abandon them all midstream. Try to be realistic about how much you can truly take on. You're also feeling adventurous; you may want to experience something -- or someone -- new. Be bold and have fun, but don't overcommit yourself. The enthusiasm you feel now could wane in just a few days.";  \r\n
            }\r\n
        \r\n
            if ( ($combination1_name_trimmed == 'moon' ) && ( $combination1_sign_lower == 'taurus' ) && ( $combination1_retro_slug == 'norx' ) ) {\r\n
              $combination1_short_content = "The Taurus Moon grounds you and helps you unwind. Throw your back into something important. Then relax and enjoy some good food and company!";\r\n
              $combination1_long_content = "The Taurus Moon grounds your moods and feelings. Its down-to-earth energy helps you work through obstacles and take a more realistic view of your true abilities and limitations. Under the current lunar influence, the world could be falling apart around you, and you'd stay calm and collected! But chances are good that during these few days, life will seem sweet and easy. In fact, your senses are more heightened than usual to life's natural beauty. You appreciate the earth's gifts more deeply, making this a great time to walk in the park or work in your garden. Patience, nurturing and strength all come more easily to you now, making you a lovely presence in any company. You're into creature comforts -- eating, napping, cuddling, lovemaking -- and you may be tempted to spend all your time indulging in leisurely, pleasurable activities. In fact, your appreciation for life's richer pleasures could lead to overindulgence. Heartburn, an expanding waistline and a diminished bank balance are all possible repercussions of this period. Stubbornness, willfulness and downright laziness will also run high now; you may be less willing than usual to compromise, be responsible or exert yourself physically. Other people may be frustrated with your insistence on moving at your own pace and on your own terms, and you could annoy them with your disregard for their schedules. Make sure your leisurely pace isn’t rooted in pure obstinacy!";  \r\n
            }\r\n
        \r\n
            if ( ($combination1_name_trimmed == 'moon' ) && ( $combination1_sign_lower == 'gemini' ) && ( $combination1_retro_slug == 'norx' ) ) {\r\n
              $combination1_short_content = "The Gemini Moon sharpens your mind along with your desire for intellectual conversation, but it can also inspire restlessness and anxiety.";\r\n
              $combination1_long_content = "The Gemini Moon affects your powers of concentration and mental prowess. Your mind is sharper and more objective than usual, making this a wonderful time to rely on logic and reason to guide you through your decisions. You're thirsty for knowledge and full of imagination, and your ability to retain information is heightened. You might decide now to seek answers to long-standing issues that have been on the back burner for a while. Your curiosity is also stimulated by a desire to increase your general knowledge, and you're more talkative and entertaining than usual. Friends and strangers alike will get a kick out of your clever wit, and you’ll have lots to contribute to any conversation, even if you're mainly asking questions or playing devil's advocate. Any task requiring mental work comes easily to you, from crossword puzzles and Scrabble games to essay writing and research. You're mentally versatile, so many different subjects appeal to you now. At the same time, this energy can bring on incessant mental chatter if you're not careful. You might feel anxious, nervous or easily distracted, less able than usual to make progress toward your goals. Also, there's not much of a filter between your mind and your tongue now, which could lead to stream-of-consciousness chatter. Be sure to give other people equal airtime.";  \r\n
            }\r\n
        \r\n
            if ( ($combination1_name_trimmed == 'moon' ) && ( $combination1_sign_lower == 'cancer' ) && ( $combination1_retro_slug == 'norx' ) ) {\r\n
              $combination1_short_content = "A Cancer Moon quiets you down and sends you home for some needed rest. Try not to be sensitive around your roommates and family members.";\r\n
              $combination1_long_content = "The Cancer Moon beckons you to soothe your frazzled nerves by seeking respite from the crazy world. Like a turtle, you might draw into your shell during these few days, refusing to emerge until it feels safe again. You'll find yourself a bit more emotional than usual; you might feel unusually touchy with other people, sensitive to their comments and reactions to you, even if they're well-intended. You may also be more aware of how your own words affect others. This heightened sense of reality could be overwhelming, leading you to spend some time where you feel safest -- in your own cozy home. Intuition, nurturing and sentimentality are heightened under this lunar energy. You might feel pulled to visit family members or surround yourself with children, or you might simply need a retreat from your daily grind. Nostalgia can lead to a wonderful trip down memory lane, but avoid the urge to romanticize the past, because the present is just as precious. This is not the best time to handle any task or crisis requiring lots of physical exertion. You might feel mired in insecurity, and irrational behavior is likely. You'll have to try hard not to let your feelings distort reality. Instead, let yourself spend a few days mulling things over. You can act when reason once again returns and your view of the world is clearer.";  \r\n
            }\r\n
        \r\n
            if ( ($combination1_name_trimmed == 'moon' ) && ( $combination1_sign_lower == 'leo' ) && ( $combination1_retro_slug == 'norx' ) ) {\r\n
              $combination1_short_content = "The Leo Moon reminds you to slot in some time for fun and recreation. Just don't get so carried away that you neglect your responsibilities!";\r\n
              $combination1_long_content = "The Leo Moon’s playful vibrations ensure that you'll want to spend some time doing creative, fun-filled activities that satisfy your inner child. During these few days, you may not feel much of an urge to head for the office, but you'll definitely put effort into having a great time. Your friends and family are sure to enjoy your warmth and your vibrant energy. You'll find that your spirits, along with your creativity and resilience, are on high now. You're dynamic and expressive, enabling you to create beautiful works of art or put on a performance that will wow everyone in the audience. You'll be the life of any party you attend; you might even be in the mood to throw one yourself, because surrounding yourself with the people you love best is high on your current to-do list. And since your passions are on high at the moment, so, too, are your reactions and emotions, which may seem larger than life. You love more intensely, your hugs are warmer and more affectionate, and you're feeling more generous than usual. You won’t think twice about spending your hard-earned cash on something fleeting but fun, because life is just too short. But you may end up spending beyond your means. Even though you're tempted to blow everything off in the name of fun, be sure you can actually afford it. If you go too far overboard, your body -- or your bank account -- will rebel. And finally, remember that there's a fine line between passion and drama.";  \r\n
            }\r\n
        \r\n
            if ( ($combination1_name_trimmed == 'moon' ) && ( $combination1_sign_lower == 'virgo' ) && ( $combination1_retro_slug == 'norx' ) ) {\r\n
              $combination1_short_content = "The Virgo Moon puts you in an orderly mood. You'll scrutinize everything around you, but remember, there is such a thing as 'good enough'!";\r\n
              $combination1_long_content = "The Virgo Moon makes you more discriminating than usual. Your mind is sharp and you've a keen eye for details, including flaws and imperfections. You're generally more objective and less emotional now, which enables you to conduct research, tally numbers or assess anything that requires an acute, dispassionate eye. You'll find that your ability to cut to the heart of the matter makes this lunar energy an asset for everything from zipping through technical manuals with greater ease to clearing out your pantry or balancing your checkbook. Critical thinking, detachment and mental stamina are all heightened during this period. Your analytic ability is a lens that filters all manner of distractions and superfluous details, allowing you to get to the point. The only problem is, life is filled with all kinds of tangents, diversions and contradictions! But you're so focused on practicality and feasibility that you may have little patience for anyone who doesn't grasp the obvious as quickly as you do. When this happens, your irritation will surface fast if you're not careful, and the people closest to you could get their feelings hurt as you lecture them on their shortcomings. Insensitivity and irritation are two of the less helpful qualities this lunar energy brings. Be careful not to alienate yourself from people you need. Remember, sometimes, good enough really is good enough!";  \r\n
            }\r\n
        \r\n
            if ( ($combination1_name_trimmed == 'moon' ) && ( $combination1_sign_lower == 'libra' ) && ( $combination1_retro_slug == 'norx' ) ) {\r\n
              $combination1_short_content = "The Libra Moon encourages you to exist harmoniously with others, although that may be more difficult during confrontational situations.";\r\n
              $combination1_long_content = "The Libra Moon suffuses life with a peaceful, sociable energy. Suddenly, you feel the urge to cooperate and coexist harmoniously with others. You're kind and gracious during this period, and more attuned than normal to artistic beauty. You may be in the mood for a party, if it's held in a beautiful house or some other lush setting. But most of all, you want to work effectively with other people in a just and amicable way. You want everyone to get along and have their fair say -- in a calm, balanced manner, of course. Your efforts to make life more pleasant for everyone will sensitize you to others' words and reactions. When people around you argue or behave aggressively, you might play to both sides or turn the other cheek in an attempt to pretend all is well, even though you know, deep inside, that real life necessarily includes the occasional conflict. But when you pretend otherwise, other people might think you're being superficial, two-faced or simply timid. You could have a hard time being decisive under the current energy, since you don't want to make a move that might hurt someone's feelings. It's understandable that you'd want to force serenity in order to escape the harshness of a sometimes unfriendly and unjust world, but do be aware of this temptation and know that gentle honesty is often more important than any kind of pretense. Remember that you can be true to yourself and to others at the same time.";  \r\n
            }\r\n
        \r\n
            if ( ($combination1_name_trimmed == 'moon' ) && ( $combination1_sign_lower == 'scorpio' ) && ( $combination1_retro_slug == 'norx' ) ) {\r\n
              $combination1_short_content = "The Scorpio Moon heightens your perceptions and your emotions, including your passions. This could make for a very interesting few days!";\r\n
              $combination1_long_content = "Under the Scorpio Moon, you're less interested in superficial encounters than in making deep emotional connections, whether with yourself, someone you love or the world around you. You’ll find that you experience deeper yearnings during this period, and stronger sensations in your interactions with others. Sensuality, pride and impulsiveness are all heightened now, as is intuition. Lovemaking feels more intense than usual, and your bonds with friends and loved ones deeper. On the more challenging side, arguments and suspicions are more intense during these few days, due to your increased sensitivity. But this quality may also improve your psychic awareness of other people’s motivations. You'll understand others well, and you won’t be easily fooled. Meditation could provide useful insight into your own psyche, and could also help you keep the more difficult emotions that arise now -- jealousy, anger, suspicion, impatience -- under control. Temper your reactions, if you can. If others accuse you of flying off the handle over every little thing, they may be right. It's easy to misjudge the depth or importance of a given situation during this period. Instead of venting your emotions, try to maintain some inner balance. If you feel yourself getting all worked up, take a deep breath. Getting a little alone time can help you tune in to yourself and channel this lunar power toward something more positive and self-aware.";  \r\n
            }\r\n
        \r\n
            if ( ($combination1_name_trimmed == 'moon' ) && ( $combination1_sign_lower == 'sagittarius' ) && ( $combination1_retro_slug == 'norx' ) ) {\r\n
              $combination1_short_content = "The Sagittarius Moon brings an optimistic mood that brightens your daily routine, but make sure your perceptions are grounded in reality.";\r\n
              $combination1_long_content = "The Sagittarius Moon ushers in a period of positive thinking that can make your days joyful, exuberant and energetic. You're attracted to such lofty subjects as truth, faith and philosophy. You may feel the urge to travel, either physically or intellectually. 'Outward bound' holds a lot of meaning for you now! You're not nearly as interested in sticking with your daily routine as you are in expanding your consciousness and seeking the answers to life's mysteries. These few days might propel you to go mountain climbing, to seek inner truth in a sweat lodge, to sample cuisines of another culture or to attend a documentary film festival that will expose you to brand-new subjects and perspectives. Indeed, your restlessness for activity and adventure isn't limited to your mind -- it extends to the rest of your physical being. You feel lucky during this period, and you're in such a positive frame of mind that luck may actually be on your side. People will enjoy your spirited company, as long as you stay open-minded. Your mood is so high that you might convince yourself you're truly on top of the world. If you try to 'enlighten' other people with your wide scope of knowledge, you could just come across as fanatic or dogmatic! Impatience and competitiveness are also potential pitfalls during this time. Remember that many different truths have coexisted just fine for millenniums. Keep an open mind and the possibilities will reveal themselves.";  \r\n
            }\r\n
        \r\n
            if ( ($combination1_name_trimmed == 'moon' ) && ( $combination1_sign_lower == 'capricorn' ) && ( $combination1_retro_slug == 'norx' ) ) {\r\n
              $combination1_short_content = "The Capricorn Moon calls out your need for security, but remember that taking the safe, steady, practical route isn't always the best way.";\r\n
              $combination1_long_content = "The Capricorn Moon triggers your need for comfort, stability and recognition. You have little tolerance now for frenzied energy or inefficient effort. Instead, you want control over your environment, so you can make sure all the potential risks are assessed and the variables contained. You aren't in the mood for unpleasant surprises; you want to know what's happening next and when, so you can plan around it. Since you're so grounded and linear, you can act as an anchor for others who may need your solid strength. This inner stability also brings you patience as you take measured steps toward your goals. You may feel more ambitious than usual, and desiring of others' admiration and respect. In terms of your career or social standing, this powerful energy can drive you forward, but it's less helpful in your emotional connections with loved ones. In fact, you may be a bit cool and aloof during these few days, even with your closest friends in the world. From your perspective, it's simple: At the moment, drama queens and their soap opera lives don't interest you. Your practical, sensible outlook makes any hint of chaos seem like a foolish waste of time. Know, though, that some people may view you as cold, heartless or power-hungry at this time. Try to remember that no one can succeed in a vacuum. Life is full of surprises, some of which can benefit you. Sometimes, showing your humanity can be more effective than shutting others out.";  \r\n
            }\r\n
        \r\n
            if ( ($combination1_name_trimmed == 'moon' ) && ( $combination1_sign_lower == 'aquarius' ) && ( $combination1_retro_slug == 'norx' ) ) {\r\n
              $combination1_short_content = "The Moon in Aquarius brings a restless yet inventive energy. This may make you anxious, or it could help you make important breakthroughs.";\r\n
              $combination1_long_content = "The Moon in Aquarius liberates your mind by activating your imagination. Brilliant insights and a strong desire for radical change are the wave of the present. Good thing the current, restless energy welcomes all manner of improvements and transformations, even drastic ones. A certain excitement is buzzing in the air, and you feel thrilled to be alive. A feeling of rebellion is welling up from within, begging you to jettison any system or situation that seems outmoded, defunct or unfair. Your appreciation for humanity is also heightened. You want to improve the world, to make it a better place for all earthly inhabitants. Or you may just want to make changes to shake things up. You have no patience for the status quo, because clearly, the status quo isn't working! This could be a wonderful time to reinvent yourself physically or to shatter outmoded patterns that no longer have any positive place in your life. You could also use this energy to make sweeping improvements at work or to volunteer your time at a charity organization. Do be aware, though, that your jazzed up mood may be difficult for others to be around, especially people who are feeling more sedate than you. Try not to judge them, even if they seem downright apathetic! After all, they're just as likely to view you as eccentric, scattered and self-righteous. Bottom line: It's wonderful to manifest positive change, but try not to hurt others in the process.";  \r\n
            }\r\n
        \r\n
            if ( ($combination1_name_trimmed == 'moon' ) && ( $combination1_sign_lower == 'pisces' ) && ( $combination1_retro_slug == 'norx' ) ) {\r\n
              $combination1_short_content = "The Moon in Pisces engulfs you in a sea of emotions. Try to float on top, caressed by her waves, instead of drowning within her depths!";\r\n
              $combination1_long_content = "The Moon in Pisces draws your emotions to the fore. You're feeling things more intensely as you view life through a subjective lens of sensation and intuition. There's a sedate, meditative quality to this lunar influence that can be quite soothing. Sensations seem more acute now; colors are more vibrant and love more intoxicating. Your compassion for others is heightened, as well as your flair for romance. Dreaminess, empathy and warmth are all strong influences at the moment. You may feel like devoting yourself body, heart and soul to the person you love best, or submerging yourself in your favorite music or artwork, just to see what images and impressions come to you. This is a wonderful time to let your imagination wander, as the world seems full of possibility. You'll receive great inspiration if you open yourself up to it. The key to this period is receptivity -- to a certain extent. After all, there are some inherent challenges that come with this energy. For example, this isn't a good time for decisive action or initiative. You're emotionally much more pliable than normal, which means you're more easily manipulated. Apathy, weakness and escapism can envelop you if you aren't careful. You feel real empathy for others and you want to help them in any way you can. Still, don't be afraid to stand up for yourself. Silent forbearance isn't always the most honest or effective way to keep the peace.";  \r\n
            }\r\n
        \r\n
              if ( $combination1_sign_lower == $combination1_sign_tomorrow_lower ) {\r\n
        \r\n
                $dayContent .=  '<div class="moon-in-sign stooltip-gray stooltip" data-tooltip-pos="top-center"><span href="#" class="' . $combination1degmin . '" data-toggle="modal" data-target="#'.$combination1degmin.'"><img src="/wp-content/uploads/images/glyphs/'.$combination1_name_lower.'.png" />in <img src="/wp-content/uploads/images/glyphs/'.$combination1_sign_lower.'.png" /> '.$retro_symbol.'</span><div class="stooltip-content">'.$combination1_name.' in '.$combination1_sign.'</div></div>';\r\n
        \r\n
              } else {\r\n
        \r\n
                $dayContent .=  '<div class="moon-in-sign stooltip-gray stooltip" data-tooltip-pos="top-center"><span href="#" class="' . $combination1degmin . '" data-toggle="modal" data-target="#'.$combination1degmin.'"><img src="/wp-content/uploads/images/glyphs/'.$combination1_name_lower.'.png" />in <img src="/wp-content/uploads/images/glyphs/'.$combination1_sign_lower.'.png" /> '.$retro_symbol.'<img class="rightarrow" src="/wp-content/uploads/images/glyphs/rightarrow.png" /><img src="/wp-content/uploads/images/glyphs/'.$combination1_sign_tomorrow_lower.'.png" /></span><div class="stooltip-content">'.$combination1_name.' in '.$combination1_sign.' &rArr; '.$combination1_sign_tomorrow.'</div></div>';\r\n
        \r\n
              } \r\n
        \r\n
            // =========================================\r\n
        \r\n
            // Get daily planet aspects content\r\n
        \r\n
            $todaysAspectsCacheKey = 'todaysaspects_'.$todaysDateUnix;\r\n
        \r\n
            $todays_aspects_raw_cached = get_transient( $todaysAspectsCacheKey );\r\n
        \r\n
            if ( false === $todays_aspects_raw_cached ) {\r\n
        \r\n
              $todaysAspectsUrl = "https://www.zdki.us/taReportsw/DailyIntros.aspx?ReportType=TodaysAspect&DateFrom=".$todaysDate."&DateTo=".$todaysDate."&ReportFormat=XML&NewsFlash=&AccountID=theastrologerWP1&AppID=website&MemberID=1234567890&V=2";\r\n
        \r\n
        \t\t\t$username = 'theastroweb';\r\n
        \t\t\t$password = '2Pq0^1IDvZjVs';\r\n
        \r\n
        \t\t\t$context = stream_context_create(array(\r\n
        \t\t\t        'http' => array(\r\n
        \t\t\t            'header'  => "Authorization: Basic " . base64_encode("$username:$password")\r\n
        \t\t\t        )\r\n
        \t\t\t    )\r\n
        \t\t\t);\r\n
        \t\t\t$data = file_get_contents($todaysAspectsUrl, false, $context);\r\n
        \r\n
        \t\t\t$todays_aspects_raw = simplexml_load_string($data);\r\n
        \r\n
              // https://stackoverflow.com/a/7797259\r\n
        \r\n
              set_transient( $todaysAspectsCacheKey, $todays_aspects_raw->asXML(), 2629746 );\r\n
        \r\n
            } else {\r\n
        \r\n
              // $cachedDataCheck .= '<div>Cached '.$todaysAspectsCacheKey.' data is used</div>';\r\n
        \r\n
              // https://stackoverflow.com/a/7797259\r\n
              $todays_aspects_raw = simplexml_load_string($todays_aspects_raw_cached);\r\n
        \r\n
            }\r\n
        \r\n
            $datetoday_var = date('Ymd',strtotime($todaysDate));\r\n
        \r\n
          // First planet aspect combination\r\n
        \r\n
            $combination1_planet1 = $todays_aspects_raw ->{'date-'.$datetoday_var.''}[0]->todaysaspects[0]->aspect[0]->planet1;\r\n
        \r\n
            $combination1_planet1_lower = strtolower($combination1_planet1);\r\n
        \r\n
            $combination1_aspect = $todays_aspects_raw ->{'date-'.$datetoday_var.''}[0]->todaysaspects[0]->aspect[0]->aspect;\r\n
        \r\n
            $combination1_aspect_lower = strtolower($combination1_aspect);\r\n
        \r\n
            $combination1_planet2 = $todays_aspects_raw ->{'date-'.$datetoday_var.''}[0]->todaysaspects[0]->aspect[0]->planet2;\r\n
        \r\n
            $combination1_planet2_lower = strtolower($combination1_planet2);\r\n
        \r\n
            $planet11 = strval($combination1_planet1);\r\n
            $aspect1 = strval($combination1_aspect);\r\n
            $planet12 = strval($combination1_planet2);\r\n
        \r\n
            $combination1 = $combination1_planet1_lower.'_'.$combination1_aspect_lower.'_'.$combination1_planet2_lower;\r\n
        \r\n
            // Second planet aspect combination\r\n
        \r\n
            $combination2_planet1 = $todays_aspects_raw ->{'date-'.$datetoday_var.''}[0]->todaysaspects[0]->aspect[1]->planet1;\r\n
        \r\n
            $combination2_planet1_lower = strtolower($combination2_planet1);\r\n
        \r\n
            $combination2_aspect = $todays_aspects_raw ->{'date-'.$datetoday_var.''}[0]->todaysaspects[0]->aspect[1]->aspect;\r\n
        \r\n
            $combination2_aspect_lower = strtolower($combination2_aspect);\r\n
        \r\n
            $combination2_planet2 = $todays_aspects_raw ->{'date-'.$datetoday_var.''}[0]->todaysaspects[0]->aspect[1]->planet2;\r\n
        \r\n
            $combination2_planet2_lower = strtolower($combination2_planet2);\r\n
        \r\n
            $planet21 = strval($combination2_planet1);\r\n
            $aspect2 = strval($combination2_aspect);\r\n
            $planet22 = strval($combination2_planet2);\r\n
        \r\n
            $combination2 = $combination2_planet1_lower.'_'.$combination2_aspect_lower.'_'.$combination2_planet2_lower;\r\n
        \r\n
            // Planet aspects modal windows content\r\n
        \r\n
            if (!empty($combination1_planet1)) {\r\n
        \r\n
              $dayContent .= '<div class="todays-aspect-cal-line stooltip-gray stooltip" data-tooltip-pos="top-center"><span class="'.$combination1.'" data-toggle="modal" data-target="#'.$combination1.''.$monthRel.''.$currentDay.'"><img src="/wp-content/uploads/images/glyphs/'.$combination1_planet1_lower.'.png" />';\r\n
        \r\n
              $dayContent .= '<img src="/wp-content/uploads/images/glyphs/'.$combination1_aspect_lower.'.png" />';\r\n
        \r\n
              $dayContent .= '<img src="/wp-content/uploads/images/glyphs/'.$combination1_planet2_lower.'.png" />';\r\n
        \r\n
              $dayContent .= '</span><div class="stooltip-content">'.$combination1_planet1.' '.$combination1_aspect.' '.$combination1_planet2.'</div></div>';\r\n
        \r\n
              $args = array(\r\n
        \r\n
                'post_type' => 'post',\r\n
        \r\n
                'category_name' => 'transit-to-transit',\r\n
        \r\n
                'meta_query' => array(\r\n
                    relation => 'AND',\r\n
                    array(\r\n
                      'key' => 'wpcf-ta_report_planet1',\r\n
                      'value' => $planet11\r\n
                    ),\r\n
                    array(\r\n
                      'key' => 'wpcf-ta_report_aspect',\r\n
                      'value' => $aspect1\r\n
                    ),\r\n
                    array(\r\n
                      'key' => 'wpcf-ta_report_planet2',\r\n
                      'value' => $planet12\r\n
                    )\r\n
                )\r\n
        \r\n
              );\r\n
        \r\n
              $the_query = new WP_Query( $args );\r\n
        \r\n
              if ( $the_query->have_posts() ) {\r\n
        \r\n
                while ( $the_query->have_posts() ) {\r\n
        \r\n
                  $the_query->the_post(); \r\n
        \r\n
                  $dayContent .= '<div class="modal fade" id="'.$combination1.''.$monthRel.''.$currentDay.'" tabindex="-1" role="dialog" aria-labelledby="'.$combination1.''.$monthRel.''.$currentDay.'Label">\r\n
                    <div class="modal-dialog" role="document">\r\n
                      <div class="modal-content todays-aspects-modal">\r\n
                        <div class="modal-header">\r\n
                          <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>\r\n
                          <h4 class="modal-title" id="'.$combination1.''.$monthRel.''.$currentDay.'Label">\r\n
                            <img class="todays-aspect-planet1" src="/wp-content/uploads/images/glyphs/'.$combination1_planet1_lower.'.png" />\r\n
                            <img class="todays-aspect" src="/wp-content/uploads/images/glyphs/'.$combination1_aspect_lower.'.png" />\r\n
                            <img class="todays-aspect-planet2" src="/wp-content/uploads/images/glyphs/'.$combination1_planet2_lower.'.png" />\r\n
                            '. $combination1_planet1 . ' ' . $combination1_aspect . ' ' . $combination1_planet2 .'\r\n
                          </h4>\r\n
                        </div>\r\n
                        <div class="modal-body">\r\n
                          <p class="modal-date">'.$todaysDateFormatted.'</p>';\r\n
        \r\n
                          ob_start();\r\n
                          the_content();\r\n
                          $theContent = ob_get_clean();\r\n
        \r\n
                          $theContent = str_replace("’","'",$theContent);\r\n
        \r\n
                          $dayContent .= $theContent;\r\n
        \r\n
                          // Add today's Planet Update post (if available)\r\n
                          // $dayContent .= $planetUpdatePosts;\r\n
        \r\n
                      $dayContent .= '</div>\r\n
                        <div class="modal-footer">\r\n
                          <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>\r\n
                        </div>\r\n
                      </div>\r\n
                    </div>\r\n
                  </div>';\r\n
        \r\n
                }\r\n
        \r\n
                wp_reset_postdata();\r\n
        \r\n
              } else {}\r\n
        \r\n
            }\r\n
        \r\n
            if (!empty($combination2_planet1)) {\r\n
        \r\n
              $dayContent .= '<div class="todays-aspect-cal-line stooltip-gray stooltip" data-tooltip-pos="top-center"><span class="'.$combination2.'" data-toggle="modal" data-target="#'.$combination2.''.$monthRel.''.$currentDay.'"><img src="/wp-content/uploads/images/glyphs/'.$combination2_planet1_lower.'.png" />';\r\n
        \r\n
              $dayContent .= '<img src="/wp-content/uploads/images/glyphs/'.$combination2_aspect_lower.'.png" />';\r\n
        \r\n
              $dayContent .= '<img src="/wp-content/uploads/images/glyphs/'.$combination2_planet2_lower.'.png" />';\r\n
        \r\n
              $dayContent .= '</span><div class="stooltip-content">'.$combination2_planet1.' '.$combination2_aspect.' '.$combination2_planet2.'</div></div>';\r\n
        \r\n
              $args = array(\r\n
                'post_type' => 'post',\r\n
                'category_name' => 'transit-to-transit',\r\n
                'meta_query' => array(\r\n
                    relation => 'AND',\r\n
                    array(\r\n
                      'key' => 'wpcf-ta_report_planet1',\r\n
                      'value' => $planet21\r\n
                    ),\r\n
                    array(\r\n
                      'key' => 'wpcf-ta_report_aspect',\r\n
                      'value' => $aspect2\r\n
                    ),\r\n
                    array(\r\n
                      'key' => 'wpcf-ta_report_planet2',\r\n
                      'value' => $planet22\r\n
                    )\r\n
                )\r\n
        \r\n
              );\r\n
        \r\n
              $the_query = new WP_Query( $args );\r\n
        \r\n
              if ( $the_query->have_posts() ) {\r\n
        \r\n
                while ( $the_query->have_posts() ) {\r\n
        \r\n
                  $the_query->the_post(); \r\n
        \r\n
                  $dayContent .= '<div class="modal fade" id="'.$combination2.''.$monthRel.''.$currentDay.'" tabindex="-1" role="dialog" aria-labelledby="'.$combination2.''.$monthRel.''.$currentDay.'Label">\r\n
                    <div class="modal-dialog" role="document">\r\n
                      <div class="modal-content todays-aspects-modal">\r\n
                        <div class="modal-header">\r\n
                          <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>\r\n
                          <h4 class="modal-title" id="'.$combination2.''.$monthRel.''.$currentDay.'Label">\r\n
                            <img class="todays-aspect-planet1" src="/wp-content/uploads/images/glyphs/'.$combination2_planet1_lower.'.png" />\r\n
                            <img class="todays-aspect" src="/wp-content/uploads/images/glyphs/'.$combination2_aspect_lower.'.png" />\r\n
                            <img class="todays-aspect-planet2" src="/wp-content/uploads/images/glyphs/'.$combination2_planet2_lower.'.png" />\r\n
                            '. $combination2_planet1 . ' ' . $combination2_aspect . ' ' . $combination2_planet2 .'\r\n
                          </h4>\r\n
                        </div>\r\n
                        <div class="modal-body">\r\n
                          <p class="modal-date">'.$todaysDateFormatted.'</p>';\r\n
        \r\n
                          ob_start();\r\n
                          the_content();\r\n
                          $theContent = ob_get_clean();\r\n
        \r\n
                          $dayContent .= $theContent;\r\n
        \r\n
                          // Add today's Planet Update post (if available)\r\n
                          // $dayContent .= $planetUpdatePosts;\r\n
        \r\n
                      $dayContent .= '</div>\r\n
                        <div class="modal-footer">\r\n
                          <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>\r\n
                        </div>\r\n
                      </div>\r\n
                    </div>\r\n
                  </div>';\r\n
        \r\n
                }\r\n
        \r\n
                wp_reset_postdata();\r\n
        \r\n
              } else {}\r\n
        \r\n
            }\r\n
        \r\n
            // =========================================\r\n
        \r\n
            // Display today's Planet Update post (if available)\r\n
        \r\n
            foreach ( $planetUpdatePosts as $postItem ) {\r\n
        \r\n
              foreach ( $postItem as $key => $value ) {\r\n
        \r\n
                if ( $key == 'title' ) {\r\n
        \r\n
                  $postTitle = $value;\r\n
        \r\n
                }\r\n
        \r\n
                if ( $key == 'link' ) {\r\n
        \r\n
                  $postLink = $value;\r\n
        \r\n
                }\r\n
        \r\n
                if ( $key == 'glyph1' ) {\r\n
        \r\n
                  $postGlyph1 = $value;              \r\n
        \r\n
                }\r\n
        \r\n
                if ( $key == 'glyph2' ) {\r\n
        \r\n
                  $postGlyph2 = $value;              \r\n
        \r\n
                }\r\n
        \r\n
                if ( $key == 'glyph3' ) {\r\n
        \r\n
                  $postGlyph3 = $value;              \r\n
        \r\n
                }\r\n
        \r\n
                if ( $key == 'publishdate' ) {\r\n
        \r\n
                  $publishDateFormatted = date('j', strtotime($value));\r\n
        \r\n
                  if ( $publishDateFormatted == $currentDay ) {\r\n
                    \r\n
                    $dayContent .= '<div class="planet-updates-cal stooltip-gray stooltip" data-tooltip-pos="top-center"><a href="'.$postLink.'" target="_blank">'.$postGlyph1.''.$postGlyph2.''.$postGlyph3.'</a><div class="stooltip-content">'.$postTitle.'</div></div>';\r\n
        \r\n
                  }\r\n
        \r\n
                }\r\n
        \r\n
              }\r\n
        \r\n
            }\r\n
        \r\n
            // =========================================\r\n
        \r\n
            // "Moon in sign" modal windows content\r\n
        \r\n
            $dayContent .= '<div class="modal fade" id="' . $combination1degmin . '" tabindex="-1" role="dialog" aria-labelledby="' .$combination1degmin . 'Label">\r\n
              <div class="modal-dialog" role="document">\r\n
                <div class="modal-content todays-planets-modal">\r\n
                  <div class="modal-header">\r\n
        \r\n
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>\r\n
        \r\n
                    <h4 class="modal-title" id="' . $combination1degmin . 'Label">' . $combination1_name .  ' in ' .$combination1_sign . '<img class="todays-planet-name" src="/wp-content/uploads/images/glyphs/' . $combination1_name_trimmed . '.png" /><img class="todays-planet-sign" src="/wp-content/uploads/images/glyphs/' . $combination1_sign_trimmed . '.png" /></h4>\r\n
        \r\n
                  </div>\r\n
        \r\n
                  <div class="modal-body">\r\n
                <p class="modal-date">'.$todaysDateFormatted.'</p>\r\n
                <div class="dos-donts-'.$combination1degmin.'"></div>';\r\n
        \r\n
            $dayContent .= "<script type='text/javascript'>\r\n
                jQuery(document).ready( function() {\r\n
                  jQuery('.".$combination1degmin."').on( 'click', function() {\r\n
                    jQuery('.dos-donts-".$combination1degmin."').load( '/today/".$combination1slug."/' );\r\n
                    jQuery('.modal-long-content-".$combination1degmin."').hide();\r\n
                    jQuery('.modal-readless-".$combination1degmin."').hide();\r\n
                  });\r\n
                });\r\n
                </script>";\r\n
        \r\n
            $dayContent .= '<p class="modal-short-content-'.$combination1degmin.'">' . $combination1_short_content . '</p>\r\n
                <p class="modal-long-content-'.$combination1degmin.'">' . $combination1_long_content . '</p>\r\n
                  </div>\r\n
                  <div class="modal-footer">\r\n
                    <button type="button" class="btn btn-primary modal-readmore-'.$combination1degmin.'">Read more &raquo;</button>\r\n
                    <button type="button" class="btn btn-primary modal-readless-'.$combination1degmin.'">&laquo; Summary</button>';\r\n
        \r\n
            $dayContent .= "<script type='text/javascript'>\r\n
                jQuery(document).ready( function() {\r\n
                  jQuery('.modal-readmore-".$combination1degmin."').on( 'click', function() {\r\n
                    jQuery('.modal-date').hide( 'fast' );\r\n
                    jQuery('.dos-donts-".$combination1degmin."').hide( 'fast' );\r\n
                    jQuery('.modal-short-content-".$combination1degmin."').hide( 'fast' );\r\n
                    jQuery('.modal-readmore-".$combination1degmin."').hide( 'fast' );\r\n
                    jQuery('.modal-long-content-".$combination1degmin."').show( 'fast' );\r\n
                    jQuery('.modal-readless-".$combination1degmin."').show( 'fast' );\r\n
                  });\r\n
                  jQuery('.modal-readless-".$combination1degmin."').on( 'click', function() {\r\n
                    jQuery('.modal-date').show( 'fast' );\r\n
                    jQuery('.dos-donts-".$combination1degmin."').show( 'fast' );\r\n
                    jQuery('.modal-short-content-".$combination1degmin."').show( 'fast' );\r\n
                    jQuery('.modal-readmore-".$combination1degmin."').show( 'fast' );\r\n
                    jQuery('.modal-long-content-".$combination1degmin."').hide( 'fast' );\r\n
                    jQuery('.modal-readless-".$combination1degmin."').hide( 'fast' );\r\n
                  });\r\n
                });\r\n
                </script>";\r\n
        \r\n
            $dayContent .= '</div>\r\n
                </div>\r\n
              </div>';\r\n
        \r\n
            $dayContent .= '</div>';\r\n
        \r\n
            // =========================================\r\n
        \r\n
            // Get celebrity names having a birthday today\r\n
        \r\n
            $celebBdaysCacheKey = 'celebbdays_'.$todaysDateUnix;\r\n
        \r\n
            $celeb_bdays_raw_cached = get_transient( $celebBdaysCacheKey );\r\n
        \r\n
            if ( false === $celeb_bdays_raw_cached ) {\r\n
        \r\n
              $celebBdaysUrl = "https://www.zdki.us/taReportsw/DailyIntros.aspx?ReportType=CelebBirthday&DateFrom=".$todaysDate."&DateTo=".$todaysDate."&ReportFormat=XML&NewsFlash=&AccountID=theastrologerWP1&AppID=website&MemberID=1234567890&V=2";\r\n
        \r\n
        \t\t\t$username = 'theastroweb';\r\n
        \t\t\t$password = '2Pq0^1IDvZjVs';\r\n
        \r\n
        \t\t\t$context = stream_context_create(array(\r\n
        \t\t\t        'http' => array(\r\n
        \t\t\t            'header'  => "Authorization: Basic " . base64_encode("$username:$password")\r\n
        \t\t\t        )\r\n
        \t\t\t    )\r\n
        \t\t\t);\r\n
        \t\t\t$data = file_get_contents($celebBdaysUrl, false, $context);\r\n
        \r\n
        \t\t\t$celeb_bday_raw = simplexml_load_string($data);\r\n
        \r\n
              // https://stackoverflow.com/a/7797259\r\n
        \r\n
              set_transient( $celebBdaysCacheKey, $celeb_bday_raw->asXML(), 2629746 );\r\n
        \r\n
            } else {\r\n
        \r\n
              // $cachedDataCheck .= '<div>Cached '.$celebBdaysCacheKey.' data is used</div>';\r\n
        \r\n
              // https://stackoverflow.com/a/7797259\r\n
              $celeb_bday_raw = simplexml_load_string($celeb_bdays_raw_cached);\r\n
        \r\n
            }\r\n
        \r\n
            $datetoday_var = date('Ymd',strtotime($todaysDate));\r\n
        \r\n
            // 1st celebrity data\r\n
        \r\n
            $celeb_name1 = $celeb_bday_raw ->{'date-'.$datetoday_var.''}[0]->celebbirthdays[0]->celeb[0]->celebname;\r\n
        \r\n
            $celeb_birthyear1 = $celeb_bday_raw ->{'date-'.$datetoday_var.''}[0]->celebbirthdays[0]->celeb[0]->celebbirthdate;\r\n
            $celeb_birthyear1 = date("Y",strtotime($celeb_birthyear1));\r\n
        \r\n
            // 2nd celebrity data\r\n
        \r\n
            $celeb_name2 = $celeb_bday_raw ->{'date-'.$datetoday_var.''}[0]->celebbirthdays[0]->celeb[1]->celebname;\r\n
        \r\n
            $celeb_birthyear2 = $celeb_bday_raw ->{'date-'.$datetoday_var.''}[0]->celebbirthdays[0]->celeb[1]->celebbirthdate;\r\n
            $celeb_birthyear2 = date("Y",strtotime($celeb_birthyear2));\r\n
        \r\n
            // 3rd celebrity data\r\n
        \r\n
            $celeb_name3 = $celeb_bday_raw ->{'date-'.$datetoday_var.''}[0]->celebbirthdays[0]->celeb[2]->celebname;\r\n
        \r\n
            $celeb_birthyear3 = $celeb_bday_raw ->{'date-'.$datetoday_var.''}[0]->celebbirthdays[0]->celeb[2]->celebbirthdate;\r\n
            $celeb_birthyear3 = date("Y",strtotime($celeb_birthyear3));\r\n
        \r\n
            // 1st celebrity conditional display\r\n
        \r\n
            if (!empty($celeb_name1)) {\r\n
        \r\n
              $celeb1Plain = $celeb_name1.' '.$celeb_birthyear1;\r\n
        \r\n
              // $celeb1Formatted = '<p class="celeb-bday-cal">'.$celeb_name1.' '.$celeb_birthyear1.'</p>';\r\n
        \r\n
              // $dayContent .= $celeb1Formatted;\r\n
        \r\n
            }\r\n
        \r\n
            // 2nd celebrity conditional display\r\n
        \r\n
            if (!empty($celeb_name2)) {\r\n
        \r\n
              $celeb2Plain = $celeb_name2.' '.$celeb_birthyear2;\r\n
        \r\n
              // $celeb2Formatted = '<p class="celeb-bday-cal">'.$celeb_name2.' '.$celeb_birthyear2.'</p>';\r\n
        \r\n
              // $dayContent .= $celeb2Formatted;\r\n
        \r\n
            }\r\n
        \r\n
            $dayContent .=  '</div>';\r\n
        \r\n
            // =========================================\r\n
        \r\n
            // Add date cells incorporating today's css class and moon phase\r\n
        \r\n
            if ( ( $currentDay == $today) && isset($moonphase) ) {\r\n
        \r\n
              $calendar .='<td class="day today" rel="'.$date.'">';\r\n
              \r\n
              if ( !empty($eclipse) ) {\r\n
        \r\n
                $calendar .= '<div class="tdchild date stooltip-gray stooltip" data-tooltip-pos="top-center"><div class="moonphase-eclipse iseclipse"><img src="'.$eclipseImgUrl.'" />';\r\n
        \r\n
                $calendar .= '<span class="eclipse" title="'.$eclipseType.'">'.$eclipse.'</span>';\r\n
        \r\n
              } else {\r\n
        \r\n
                $calendar .= '<div class="tdchild date stooltip-gray stooltip" data-tooltip-pos="top-center"><div class="moonphase-eclipse"><img src="'.$moonPhaseImgUrl.'" />';\r\n
        \r\n
              }\r\n
        \r\n
              $calendar .= '<span class="moonphase">'.$moonphase.'</span></div><div class="stooltip-content">'.$celeb1Plain.'<br />'.$celeb2Plain.'</div></div>';\r\n
        \r\n
              $calendar .= $dayContent;\r\n
              \r\n
              $calendar .= '</td>'; \r\n
        \r\n
            } elseif ( ( $currentDay !== $today) && isset($moonphase) ) {\r\n
              \r\n
              $calendar .='<td class="day" rel="'.$date.'">';\r\n
              \r\n
              if ( !empty($eclipse) ) {\r\n
        \r\n
                $calendar .= '<div class="tdchild date stooltip-gray stooltip" data-tooltip-pos="top-center"><div class="moonphase-eclipse iseclipse"><img src="'.$eclipseImgUrl.'" />';\r\n
        \r\n
                $calendar .= '<span class="eclipse" title="'.$eclipseType.'">'.$eclipse.'</span>';\r\n
        \r\n
              } else {\r\n
        \r\n
                $calendar .= '<div class="tdchild date stooltip-gray stooltip" data-tooltip-pos="top-center"><div class="moonphase-eclipse"><img src="'.$moonPhaseImgUrl.'" />';\r\n
        \r\n
              }\r\n
        \r\n
              $calendar .= '<span class="moonphase">'.$moonphase.'</span></div><div class="stooltip-content">'.$celeb1Plain.'<br />'.$celeb2Plain.'</div></div>';\r\n
        \r\n
              $calendar .= $dayContent;\r\n
              \r\n
              $calendar .= '</td>';\r\n
        \r\n
            } elseif (  ( $currentDay == $today ) && !isset($moonphase) ) {\r\n
        \r\n
              $calendar .='<td class="day today" rel="'.$date.'">';\r\n
              \r\n
              $calendar .= '<div class="tdchild date stooltip-gray stooltip" data-tooltip-pos="top-center">'.$currentDay.'<div class="dayname">'.$dayName.'</div><div class="stooltip-content">'.$celeb1Plain.'<br />'.$celeb2Plain.'</div></div>';\r\n
        \r\n
              $calendar .= $dayContent;\r\n
              \r\n
              $calendar .= '</td>';\r\n
        \r\n
            } else {\r\n
        \r\n
              $calendar .='<td class="day" rel="'.$date.'">';\r\n
              \r\n
              $calendar .= '<div class="tdchild date nophaseeclipse stooltip-gray stooltip" data-tooltip-pos="top-center">'.$currentDay.'<div class="dayname">'.$dayName.'</div><div class="stooltip-content">'.$celeb1Plain.'<br />'.$celeb2Plain.'</div></div>';\r\n
        \r\n
              $calendar .= $dayContent;\r\n
        \r\n
              $calendar .= '</td>';\r\n
        \r\n
            }\r\n
        \r\n
            // Increment counters\r\n
            $currentDay++;\r\n
            $dayOfWeek++;\r\n
        \r\n
            unset($dataline); \r\n
            unset($key); \r\n
            unset($value); \r\n
            unset($moonphase); \r\n
            unset($eclipse);\r\n
            unset($eclipseType); \r\n
            \r\n
          }\r\n
        \r\n
          // =========================================\r\n
        \r\n
          // Complete the row of the last week in month, if necessary,\r\n
          // when last day of the month is not on a Saturday (index = 6)\r\n
        \r\n
          if ( $dayOfWeek !=7 ) {\r\n
        \r\n
            $remainingDays = 7 - $dayOfWeek;\r\n
        \r\n
            $i = 0;\r\n
        \r\n
            while ( $i < $remainingDays ) {\r\n
        \r\n
              // $calendar .= '<td colspan="'.$remainingDays.'" class="day other-month">&nbsp;</td>';\r\n
              $calendar .= '<td class="day other-month">&nbsp;</td>';\r\n
        \r\n
              $i++;\r\n
        \r\n
            }\r\n
        \r\n
          }\r\n
        \r\n
          $calendar .= '</tr>';\r\n
          $calendar .= '</table>';\r\n
        \r\n
          // $cachedDataCheck .= '</div>';\r\n
        \r\n
          echo $calendar;\r\n
          echo $calendarExtraHtml;\r\n
          // echo $cachedDataCheck;\r\n
        \r\n
          // =========================================\r\n
        \r\n
        } else {}
        """
      "attribute_value" => "free"
      "attribute_key" => "cal_type"
      "getUtcOffset" => ""
      "getPlusMonth" => ""
      "getBD" => ""
      "userInfo" => WP_User {}
      "userFullName" => " "
      "userUtcOffset" => false
      "dateOfBirth" => "08/15/1967"
      "dateOfBirthUnix" => "b751680"
    ]
    
/
www
/
newtheastrologercom_455
/
public
/
wp-content
/
plugins
/
global-content-blocks-bk
/
global-content-blocks.php
        if(is_numeric($id)) {     
            $entry = gcb::get_entry_by_id(intval($id));
        } else {
            $entry = gcb::get_entry_by_custom_id($id);
        }        
    
        if(is_array($entry)) {            
            $content = htmlspecialchars_decode(stripslashes($entry['value']));
            
            //process the attributes
            if(is_array($attributes)&& count($attributes)){
                foreach($attributes as $attribute_key=>$attribute_value){
                    $content = str_replace("%%".$attribute_key."%%",$attribute_value,$content);
                }
            }            
            
            if($entry['type'] == "php") {
                //execute the php code
                ob_start();
                $result = eval(" ".$content);
                $output = ob_get_contents();
                ob_end_clean();
                
                return apply_filters('gcb_block_output', do_shortcode($output . $result));//run the shortcodes as well
            }
            elseif($entry['type'] == "html") {   // alloyphoto: enable PHP code in < ?php ... ? > tags inside blocks
                ob_start();
                eval("?>$content<?php ");
                $output = ob_get_contents();
                ob_end_clean();
                
                return apply_filters('gcb_block_output', do_shortcode($output));//run the shortcodes as well
            }
            else {
                return apply_filters('gcb_block_output', do_shortcode($content));//make sure we also run the shortcodes in here
            }
        }
        else
        {   return "";    }
    }
/
www
/
newtheastrologercom_455
/
public
/
wp-content
/
plugins
/
global-content-blocks-bk
/
global-content-blocks.php
                    $entries[count($entries)-1]["custom_id"] = (sanitize_title_with_dashes(base64_decode($row[4])));
                } else {
                $entries[count($entries)-1]["custom_id"] = "";
                }      
            }        
            foreach($entries as $e) {      
                gcb::add_entry($e);       
            }            
            return "Imported ".count($entries)." blocks.";            
        } else {
            return "Please Make sure you have a file uploaded.";
        }
    }
    
    function gcb_shortcode_replacer($atts, $content=null, $code="") {
        $a = shortcode_atts( array('id' => 0), $atts );
        
        if((is_numeric($a["id"]) && $a["id"]==0) || (!strlen($a["id"]))) return "";
        
        return gcb($a["id"],$atts);
    }
    
    /*
        * The processing function can also receive a number of arbitrary parameters, that we'll pass along and replace into the content
    */
    function gcb($id,$attributes=array()) {        
        //determine condition, since we can fetch blocks by 2 types of ids
        if(is_numeric($id)) {     
            $entry = gcb::get_entry_by_id(intval($id));
        } else {
            $entry = gcb::get_entry_by_custom_id($id);
        }        
    
        if(is_array($entry)) {            
            $content = htmlspecialchars_decode(stripslashes($entry['value']));
            
            //process the attributes
            if(is_array($attributes)&& count($attributes)){
                foreach($attributes as $attribute_key=>$attribute_value){
                    $content = str_replace("%%".$attribute_key."%%",$attribute_value,$content);
Arguments
  1. "calendar-grid-responsive-dev"
    
  2. array:3 [
      "id" => "calendar-grid-responsive-dev"
      "month_year" => "current"
      "cal_type" => "free"
    ]
    
/
www
/
newtheastrologercom_455
/
public
/
wp-includes
/
shortcodes.php
     * Filters whether to call a shortcode callback.
     *
     * Passing a truthy value to the filter will effectively short-circuit the
     * shortcode generation process, returning that value instead.
     *
     * @since 4.7.0
     *
     * @param bool|string $return      Short-circuit return value. Either false or the value to replace the shortcode with.
     * @param string       $tag         Shortcode name.
     * @param array|string $attr        Shortcode attributes array or empty string.
     * @param array        $m           Regular expression match array.
     */
    $return = apply_filters( 'pre_do_shortcode_tag', false, $tag, $attr, $m );
    if ( false !== $return ) {
        return $return;
    }
 
    $content = isset( $m[5] ) ? $m[5] : null;
 
    $output = $m[1] . call_user_func( $shortcode_tags[ $tag ], $attr, $content, $tag ) . $m[6];
 
    /**
     * Filters the output created by a shortcode callback.
     *
     * @since 4.7.0
     *
     * @param string       $output Shortcode output.
     * @param string       $tag    Shortcode name.
     * @param array|string $attr   Shortcode attributes array or empty string.
     * @param array        $m      Regular expression match array.
     */
    return apply_filters( 'do_shortcode_tag', $output, $tag, $attr, $m );
}
 
/**
 * Search only inside HTML elements for shortcodes and process them.
 *
 * Any [ or ] characters remaining inside elements will be HTML encoded
 * to prevent interference with shortcodes that are outside the elements.
 * Assumes $content processed by KSES already.  Users with unfiltered_html
Arguments
  1. array:3 [
      "id" => "calendar-grid-responsive-dev"
      "month_year" => "current"
      "cal_type" => "free"
    ]
    
  2. ""
    
  3. "contentblock"
    
[internal]
Arguments
  1. array:7 [
      0 => "[contentblock id="calendar-grid-responsive-dev" month_year="current" cal_type="free"]"
      1 => ""
      2 => "contentblock"
      3 => " id="calendar-grid-responsive-dev" month_year="current" cal_type="free""
      4 => ""
      5 => ""
      6 => ""
    ]
    
/
www
/
newtheastrologercom_455
/
public
/
wp-includes
/
shortcodes.php
 
    if ( false === strpos( $content, '[' ) ) {
        return $content;
    }
 
    if (empty($shortcode_tags) || !is_array($shortcode_tags))
        return $content;
 
    // Find all registered tag names in $content.
    preg_match_all( '@\[([^<>&/\[\]\x00-\x20=]++)@', $content, $matches );
    $tagnames = array_intersect( array_keys( $shortcode_tags ), $matches[1] );
 
    if ( empty( $tagnames ) ) {
        return $content;
    }
 
    $content = do_shortcodes_in_html_tags( $content, $ignore_html, $tagnames );
 
    $pattern = get_shortcode_regex( $tagnames );
    $content = preg_replace_callback( "/$pattern/", 'do_shortcode_tag', $content );
 
    // Always restore square braces so we don't break things like <!--[if IE ]>
    $content = unescape_invalid_shortcodes( $content );
 
    return $content;
}
 
/**
 * Retrieve the shortcode regular expression for searching.
 *
 * The regular expression combines the shortcode tags in the regular expression
 * in a regex class.
 *
 * The regular expression contains 6 different sub matches to help with parsing.
 *
 * 1 - An extra [ to allow for escaping shortcodes with double [[]]
 * 2 - The shortcode name
 * 3 - The shortcode argument list
 * 4 - The self closing /
 * 5 - The content of a shortcode when it wraps some content.
Arguments
  1. "/\[(\[?)(contentblock)(?![\w-])([^\]\/]*(?:\/(?!\])[^\]\/]*)*?)(?:(\/)\]|\](?:([^\[]*+(?:\[(?!\/\2\])[^\[]*+)*+)\[\/\2\])?)(\]?)/"
    
  2. "do_shortcode_tag"
    
  3. "[contentblock id="calendar-grid-responsive-dev" month_year="current" cal_type="free"]\n"
    
/
www
/
newtheastrologercom_455
/
public
/
wp-includes
/
class-wp-hook.php
        }
 
        $nesting_level = $this->nesting_level++;
 
        $this->iterations[ $nesting_level ] = array_keys( $this->callbacks );
        $num_args = count( $args );
 
        do {
            $this->current_priority[ $nesting_level ] = $priority = current( $this->iterations[ $nesting_level ] );
 
            foreach ( $this->callbacks[ $priority ] as $the_ ) {
                if( ! $this->doing_action ) {
                    $args[ 0 ] = $value;
                }
 
                // Avoid the array_slice if possible.
                if ( $the_['accepted_args'] == 0 ) {
                    $value = call_user_func_array( $the_['function'], array() );
                } elseif ( $the_['accepted_args'] >= $num_args ) {
                    $value = call_user_func_array( $the_['function'], $args );
                } else {
                    $value = call_user_func_array( $the_['function'], array_slice( $args, 0, (int)$the_['accepted_args'] ) );
                }
            }
        } while ( false !== next( $this->iterations[ $nesting_level ] ) );
 
        unset( $this->iterations[ $nesting_level ] );
        unset( $this->current_priority[ $nesting_level ] );
 
        $this->nesting_level--;
 
        return $value;
    }
 
    /**
     * Executes the callback functions hooked on a specific action hook.
     *
     * @since 4.7.0
     *
     * @param mixed $args Arguments to pass to the hook callbacks.
Arguments
  1. "[contentblock id="calendar-grid-responsive-dev" month_year="current" cal_type="free"]\n"
    
/
www
/
newtheastrologercom_455
/
public
/
wp-includes
/
plugin.php
        $args = func_get_args();
        _wp_call_all_hook($args);
    }
 
    if ( !isset($wp_filter[$tag]) ) {
        if ( isset($wp_filter['all']) )
            array_pop($wp_current_filter);
        return $value;
    }
 
    if ( !isset($wp_filter['all']) )
        $wp_current_filter[] = $tag;
 
    if ( empty($args) )
        $args = func_get_args();
 
    // don't pass the tag name to WP_Hook
    array_shift( $args );
 
    $filtered = $wp_filter[ $tag ]->apply_filters( $value, $args );
 
    array_pop( $wp_current_filter );
 
    return $filtered;
}
 
/**
 * Execute functions hooked on a specific filter hook, specifying arguments in an array.
 *
 * @since 3.0.0
 *
 * @see apply_filters() This function is identical, but the arguments passed to the
 * functions hooked to `$tag` are supplied using an array.
 *
 * @global array $wp_filter         Stores all of the filters
 * @global array $wp_current_filter Stores the list of current filters with the current one last
 *
 * @param string $tag  The name of the filter hook.
 * @param array  $args The arguments supplied to the functions hooked to $tag.
 * @return mixed The filtered value after all hooked functions are applied to it.
Arguments
  1. "[contentblock id="calendar-grid-responsive-dev" month_year="current" cal_type="free"]\n"
    
  2. array:1 [
      0 => "[contentblock id="calendar-grid-responsive-dev" month_year="current" cal_type="free"]\n"
    ]
    
/
www
/
newtheastrologercom_455
/
public
/
wp-includes
/
post-template.php
 
/**
 * Display the post content.
 *
 * @since 0.71
 *
 * @param string $more_link_text Optional. Content for when there is more text.
 * @param bool   $strip_teaser   Optional. Strip teaser content before the more text. Default is false.
 */
function the_content( $more_link_text = null, $strip_teaser = false) {
    $content = get_the_content( $more_link_text, $strip_teaser );
 
    /**
     * Filters the post content.
     *
     * @since 0.71
     *
     * @param string $content Content of the current post.
     */
    $content = apply_filters( 'the_content', $content );
    $content = str_replace( ']]>', ']]&gt;', $content );
    echo $content;
}
 
/**
 * Retrieve the post content.
 *
 * @since 0.71
 *
 * @global int   $page      Page number of a single post/page.
 * @global int   $more      Boolean indicator for whether single post/page is being viewed.
 * @global bool  $preview   Whether post/page is in preview mode.
 * @global array $pages     Array of all pages in post/page. Each array element contains part of the content separated by the <!--nextpage--> tag.
 * @global int   $multipage Boolean indicator for whether multiple pages are in play.
 *
 * @param string $more_link_text Optional. Content for when there is more text.
 * @param bool   $strip_teaser   Optional. Strip teaser content before the more text. Default is false.
 * @return string
 */
function get_the_content( $more_link_text = null, $strip_teaser = false ) {
Arguments
  1. "the_content"
    
  2. "[contentblock id="calendar-grid-responsive-dev" month_year="current" cal_type="free"]"
    
/
www
/
newtheastrologercom_455
/
public
/
wp-content
/
themes
/
bb-theme-child
/
content-page.php
        <?php if (is_front_page()) : ?>
        <h1 class="fl-post-title" itemprop="headline"><?php the_title(); ?></h1>
        <?php edit_post_link(__('Edit', 'fl-automator')); ?>
        <?php endif; ?>
        <?php if ( ! is_page( array( 55088, 62301, 62302, 62303, 62304, 62313, 62314 ) ) ) : ?>
            <?php
            global $mobile_smart;
            if ($mobile_smart->switcher_isMobile()) : ?>
                <?php echo gcb(110); ?>
            <?php endif; ?>
        <?php endif; ?>
        <?php if (!is_front_page()) : ?>
        <h1 class="fl-post-title" itemprop="headline"><?php the_title(); ?></h1>
        <?php edit_post_link(__('Edit', 'fl-automator')); ?>
        <?php endif; ?>
    </header><!-- .fl-post-header -->
    
    <div class="fl-post-content clearfix" itemprop="text">
        <?php 
            the_content(); 
        
            wp_link_pages(array(
                'before' => '<div class="fl-post-page-nav">' . __('Pages:', 'fl-automator'), 
                'after' => '</div>', 
                'next_or_number' => 'number'
            ));
        ?>
    </div><!-- .fl-post-content -->
 
    <div class="row">
        <div class="col-md-8">    
            <?php comments_template(); ?>
        </div>
        <div class="col-md-4">    
        </div>
    </div>
    
</article>
<!-- .fl-post -->
/
www
/
newtheastrologercom_455
/
public
/
wp-includes
/
template.php
 * @global int        $user_ID
 *
 * @param string $_template_file Path to template file.
 * @param bool   $require_once   Whether to require_once or require. Default true.
 */
function load_template( $_template_file, $require_once = true ) {
    global $posts, $post, $wp_did_header, $wp_query, $wp_rewrite, $wpdb, $wp_version, $wp, $id, $comment, $user_ID;
 
    if ( is_array( $wp_query->query_vars ) ) {
        extract( $wp_query->query_vars, EXTR_SKIP );
    }
 
    if ( isset( $s ) ) {
        $s = esc_attr( $s );
    }
 
    if ( $require_once ) {
        require_once( $_template_file );
    } else {
        require( $_template_file );
    }
}
 
Arguments
  1. "/www/newtheastrologercom_455/public/wp-content/themes/bb-theme-child/content-page.php"
    
/
www
/
newtheastrologercom_455
/
public
/
wp-includes
/
template.php
 */
function locate_template($template_names, $load = false, $require_once = true ) {
    $located = '';
    foreach ( (array) $template_names as $template_name ) {
        if ( !$template_name )
            continue;
        if ( file_exists(STYLESHEETPATH . '/' . $template_name)) {
            $located = STYLESHEETPATH . '/' . $template_name;
            break;
        } elseif ( file_exists(TEMPLATEPATH . '/' . $template_name) ) {
            $located = TEMPLATEPATH . '/' . $template_name;
            break;
        } elseif ( file_exists( ABSPATH . WPINC . '/theme-compat/' . $template_name ) ) {
            $located = ABSPATH . WPINC . '/theme-compat/' . $template_name;
            break;
        }
    }
 
    if ( $load && '' != $located )
        load_template( $located, $require_once );
 
    return $located;
}
 
/**
 * Require the template file with WordPress environment.
 *
 * The globals are set up for the template file to ensure that the WordPress
 * environment is available from within the function. The query variables are
 * also available.
 *
 * @since 1.5.0
 *
 * @global array      $posts
 * @global WP_Post    $post
 * @global bool       $wp_did_header
 * @global WP_Query   $wp_query
 * @global WP_Rewrite $wp_rewrite
 * @global wpdb       $wpdb
 * @global string     $wp_version
Arguments
  1. "/www/newtheastrologercom_455/public/wp-content/themes/bb-theme-child/content-page.php"
    
  2. false
    
/
www
/
newtheastrologercom_455
/
public
/
wp-includes
/
general-template.php
     * Fires before the specified template part file is loaded.
     *
     * The dynamic portion of the hook name, `$slug`, refers to the slug name
     * for the generic template part.
     *
     * @since 3.0.0
     *
     * @param string      $slug The slug name for the generic template.
     * @param string|null $name The name of the specialized template.
     */
    do_action( "get_template_part_{$slug}", $slug, $name );
 
    $templates = array();
    $name = (string) $name;
    if ( '' !== $name )
        $templates[] = "{$slug}-{$name}.php";
 
    $templates[] = "{$slug}.php";
 
    locate_template($templates, true, false);
}
 
/**
 * Display search form.
 *
 * Will first attempt to locate the searchform.php file in either the child or
 * the parent, then load it. If it doesn't exist, then the default search form
 * will be displayed. The default search form is HTML, which will be displayed.
 * There is a filter applied to the search form HTML in order to edit or replace
 * it. The filter is {@see 'get_search_form'}.
 *
 * This function is primarily used by themes which want to hardcode the search
 * form into the sidebar and also by the search widget in WordPress.
 *
 * There is also an action that is called whenever the function is run called,
 * {@see 'pre_get_search_form'}. This can be useful for outputting JavaScript that the
 * search relies on or various formatting that applies to the beginning of the
 * search. To give a few examples of what it can be used for.
 *
 * @since 2.7.0
Arguments
  1. array:2 [
      0 => "content-page.php"
      1 => "content.php"
    ]
    
  2. true
    
  3. false
    
/
www
/
newtheastrologercom_455
/
public
/
wp-content
/
themes
/
bb-theme
/
tpl-no-header-footer.php
<?php
 
/*
Template Name: No Header/Footer
Template Post Type: post, page
*/
 
add_filter( 'fl_topbar_enabled', '__return_false' );
add_filter( 'fl_fixed_header_enabled', '__return_false' );
add_filter( 'fl_header_enabled', '__return_false' );
add_filter( 'fl_footer_enabled', '__return_false' );
get_header();
 
?>
 
<div class="fl-content-full container">
    <div class="row">
        <div class="fl-content col-md-12">
            <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
                <?php get_template_part( 'content', 'page' ); ?>
            <?php endwhile;
endif; ?>
        </div>
    </div>
</div>
 
<?php get_footer(); ?>
 
Arguments
  1. "content"
    
  2. "page"
    
/
www
/
newtheastrologercom_455
/
public
/
wp-includes
/
template-loader.php
    elseif ( is_single()         && $template = get_single_template()         ) :
    elseif ( is_page()           && $template = get_page_template()           ) :
    elseif ( is_singular()       && $template = get_singular_template()       ) :
    elseif ( is_category()       && $template = get_category_template()       ) :
    elseif ( is_tag()            && $template = get_tag_template()            ) :
    elseif ( is_author()         && $template = get_author_template()         ) :
    elseif ( is_date()           && $template = get_date_template()           ) :
    elseif ( is_archive()        && $template = get_archive_template()        ) :
    else :
        $template = get_index_template();
    endif;
    /**
     * Filters the path of the current template before including it.
     *
     * @since 3.0.0
     *
     * @param string $template The path of the template to include.
     */
    if ( $template = apply_filters( 'template_include', $template ) ) {
        include( $template );
    } elseif ( current_user_can( 'switch_themes' ) ) {
        $theme = wp_get_theme();
        if ( $theme->errors() ) {
            wp_die( $theme->errors() );
        }
    }
    return;
endif;
 
Arguments
  1. "/www/newtheastrologercom_455/public/wp-content/themes/bb-theme/tpl-no-header-footer.php"
    
/
www
/
newtheastrologercom_455
/
public
/
wp-blog-header.php
<?php
/**
 * Loads the WordPress environment and template.
 *
 * @package WordPress
 */
 
if ( !isset($wp_did_header) ) {
 
    $wp_did_header = true;
 
    // Load the WordPress library.
    require_once( dirname(__FILE__) . '/wp-load.php' );
 
    // Set up the WordPress query.
    wp();
 
    // Load the theme template.
    require_once( ABSPATH . WPINC . '/template-loader.php' );
 
}
 
Arguments
  1. "/www/newtheastrologercom_455/public/wp-includes/template-loader.php"
    
/
www
/
newtheastrologercom_455
/
public
/
index.php
<?php
/**
 * Front to the WordPress application. This file doesn't do anything, but loads
 * wp-blog-header.php which does and tells WordPress to load the theme.
 *
 * @package WordPress
 */
 
/**
 * Tells WordPress to load the WordPress theme and output it.
 *
 * @var bool
 */
define('WP_USE_THEMES', true);
 
/** Loads the WordPress Environment and Template */
require( dirname( __FILE__ ) . '/wp-blog-header.php' );
 
Arguments
  1. "/www/newtheastrologercom_455/public/wp-blog-header.php"
    

Environment & details:

empty
empty
empty
empty
empty
Key Value
SERVER_SOFTWARE
"nginx/1.21.5"
REQUEST_URI
"/tests/forecast-calendar-subscription/monthly-calendars/current/free-cal/"
USER
"newtheastrologercom"
HOME
"/www/newtheastrologercom_455"
HTTP_CF_WORKER
"kinsta.cloud"
HTTP_X_KINSTA_EDGE_LB
"KCW"
HTTP_X_KINSTA_EDGE_INCOMINGIP
"44.192.25.113"
HTTP_CF_CONNECTING_IP
"44.192.25.113"
HTTP_USER_AGENT
"CCBot/2.0 (https://commoncrawl.org/faq/)"
HTTP_ACCEPT
"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
HTTP_ACCEPT_LANGUAGE
"en-US,en;q=0.5"
HTTP_CDN_LOOP
"cloudflare; subreqs=1"
HTTP_CF_EW_VIA
"15"
HTTP_CF_VISITOR
"{\"scheme\":\"https\"}"
HTTP_X_FORWARDED_PROTO
"https"
HTTP_CF_RAY
"710d6d8eb3e181c7-IAD"
HTTP_X_FORWARDED_FOR
"44.192.25.113"
HTTP_CF_IPCOUNTRY
"US"
HTTP_ACCEPT_ENCODING
"gzip"
HTTP_CONNECTION
"Keep-Alive"
SCRIPT_FILENAME
"/www/newtheastrologercom_455/public/index.php"
REDIRECT_STATUS
"200"
WP_ENVIRONMENT_TYPE
"production"
KINSTA_CACHE_ZONE
"KINSTAWP"
SERVER_NAME
"new.theastrologer.com"
SERVER_PORT
"443"
SERVER_ADDR
"10.0.10.34"
REMOTE_PORT
""
REMOTE_ADDR
"44.192.25.113"
GATEWAY_INTERFACE
"CGI/1.1"
HTTP_HOST
"new.theastrologer.com"
HTTPS
"on"
SERVER_PROTOCOL
"HTTP/1.1"
DOCUMENT_ROOT
"/www/newtheastrologercom_455/public"
DOCUMENT_URI
"/index.php"
SCRIPT_NAME
"/index.php"
CONTENT_LENGTH
""
CONTENT_TYPE
""
REQUEST_METHOD
"GET"
QUERY_STRING
""
FCGI_ROLE
"RESPONDER"
PHP_SELF
"/index.php"
REQUEST_TIME_FLOAT
"1653472867.7771"
REQUEST_TIME
"1653472867"
empty
0. Whoops\Handler\PrettyPageHandler