thismonth, 1, $thisyear); $last_day = gmdate('t', $unixmonth); $previous = $wpdb->get_row("SELECT MONTH(post_date) AS month, YEAR(post_date) AS year FROM $wpdb->posts WHERE post_date < '$thisyear-$thismonth-01 00:00:00' AND post_type = 'post' AND post_status = 'publish' ORDER BY post_date DESC LIMIT 1"); $next = $wpdb->get_row("SELECT MONTH(post_date) AS month, YEAR(post_date) AS year FROM $wpdb->posts WHERE post_date > '$thisyear-$thismonth-{$last_day} 23:59:58' AND post_type = 'post' AND post_status = 'publish' ORDER BY post_date ASC LIMIT 1"); $calendar_caption = _x('%1$s %2$s', 'calendar caption'); $mstamp = mktime(0, 0, 0, $thismonth, 1, $thisyear); $famonth = $this->shamsi(null, 'F', $mstamp); $calendar_output = ''; $myweek = array(); for ($wdcount = 0; $wdcount <= 6; $wdcount++) { $myweek[] = $wp_locale->get_weekday(($wdcount + $week_begins) % 7); } foreach ($myweek as $wd) { $day_name = $initial ? $wp_locale->get_weekday_initial($wd) : $wp_locale->get_weekday_abbrev($wd); $wd = esc_attr($wd); $calendar_output .= "\n\t\t"; } $calendar_output .= ' '; $daywithpost = array(); $dayswithposts = $wpdb->get_results("SELECT DISTINCT DAYOFMONTH(post_date) FROM $wpdb->posts WHERE post_date >= '{$thisyear}-{$thismonth}-01 00:00:01' AND post_type = 'post' AND post_status = 'publish' AND post_date <= '{$thisyear}-{$thismonth}-{$last_day} 23:59:59'", ARRAY_N); if ($dayswithposts) { foreach ((array)$dayswithposts as $daywith) { $daywithpost[] = (int)$daywith[0]; } } $pad = calendar_week_mod(gmdate('w', $unixmonth) - $week_begins); if (0 != $pad) { $calendar_output .= "\n\t\t" . ''; } $monthnum = ($this->shamsi(null, 'm', $mstamp) < 7) ? 31 : 30; $newrow = false; $daysinmonth = $monthnum; for ($day = 1; $day <= $daysinmonth; ++$day) { $jstamp = mktime(0, 0, 0, $thismonth, $day, $thisyear); $faday = $this->shamsi(null, 'd', $jstamp); if (isset($newrow) && $newrow) { $calendar_output .= "\n\t\n\t\n\t\t"; } $newrow = false; if (current_time('j') == $day && current_time('m') == $thismonth && current_time('Y') == $thisyear) { $calendar_output .= ''; if (6 == calendar_week_mod(gmdate('w', mktime(0, 0, 0, $thismonth, $day, $thisyear)) - $week_begins)) { $newrow = true; } } $pad = 7 - calendar_week_mod(gmdate('w', mktime(0, 0, 0, $thismonth, $day, $thisyear)) - $week_begins); if (0 != $pad && 7 != $pad) { $calendar_output .= "\n\t\t" . ''; } $calendar_output .= "\n\t\n\t"; $calendar_output .= "\n\t
' . sprintf($calendar_caption, $famonth, $this->shamsi(gmdate('Y', $unixmonth), 'Y')) . '
$day_name
 
'; } else { $calendar_output .= ''; } if (in_array($day, $daywithpost, true)) { $date_format = gmdate(_x('F j, Y', 'daily archives date format'), strtotime("{$thisyear}-{$thismonth}-{$day}")); $label = sprintf(__('Posts published on %s'), $this->shamsi($date_format, _x('F j, Y', 'daily archives date format'))); $calendar_output .= sprintf('%s', get_day_link($thisyear, $thismonth, $day), esc_attr($label), $faday); } else { $calendar_output .= $faday; } $calendar_output .= ' 
"; $calendar_output .= ''; $cache[$key] = $calendar_output; wp_cache_set('get_jcalendar', $cache, 'calendar'); if ($echo) { /** * Filters the HTML Shamsi calendar output. * * @since 2.0.0 * * @param string $calendar_output HTML output of the calendar. */ echo wp_kses_post(apply_filters('get_jcalendar', $calendar_output)); return; } return apply_filters('get_jcalendar', $calendar_output); } }
Fatal error: Uncaught Error: Class 'WPSH_Calendar' not found in /home/arasetne/public_html/wp-content/plugins/wp-shamsi/inc/autoload.php:32 Stack trace: #0 /home/arasetne/public_html/wp-content/plugins/wp-shamsi/wp-shamsi.php(28): require_once() #1 /home/arasetne/public_html/wp-settings.php(517): include_once('/home/arasetne/...') #2 /home/arasetne/public_html/wp-config.php(188): require_once('/home/arasetne/...') #3 /home/arasetne/public_html/wp-load.php(50): require_once('/home/arasetne/...') #4 /home/arasetne/public_html/wp-blog-header.php(13): require_once('/home/arasetne/...') #5 /home/arasetne/public_html/index.php(17): require('/home/arasetne/...') #6 {main} thrown in /home/arasetne/public_html/wp-content/plugins/wp-shamsi/inc/autoload.php on line 32