verted date. */ public function gregorian($date, $format = null) { $date = $this->normalize_date($date); if ($format == null) { $format = 'Y m d H:i:s'; } $date = new WPSH_Jalali($date, $this->timezone()); $date = $date->tog() ->format($format); return $date; } /** * Latin numbers to Farsi * * Before showing dates converts its latin numbers to farsi. * * @deprecated 2.0.0 * * @param int $content Number to convert. * @return int Converted number. */ private function persian_num($content) // Display dates in persian numbers evein if jQuery is not available or dates displayed in admin area { if (!$this->option('persian-num', true, true)) { return $content; } $fa = array( '۰', '۱', '۲', '۳', '۴', '۵', '۶', '۷', '۸', '۹' ); $en = array( '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' ); $result = str_replace($en, $fa, $content); return $result; } /** * Validate pro * * Pro version validation. * * @since 3.0.0 * * @return bool true if is validated. */ protected function pro($soft = false) { $shamsi = WPSH_PLUGINS_PATH . '/wp-shamsi-pro/wp-shamsi-pro.php'; $exists = file_exists($shamsi) ? true : false; if (in_array('wp-shamsi-pro/wp-shamsi-pro.php', apply_filters('active_plugins', get_option('active_plugins'))) && $exists) { return true; } else { return false; } // @deprecated 4.3.0 /* $serial = !empty(get_option('wpsh_pro_license')) ? get_option('wpsh_pro_license') : false; $status = !empty(get_option('wpsh_pro_license_status')) && get_option('wpsh_pro_license_status') == 1 ? true : false; $due = !empty(get_option('wpsh_pro_license_due')) && get_option('wpsh_pro_license_due') > current_time('timestamp', false) ? true : false; if ($soft) { if ($serial && $status && $due) { return true; } else { return false; } } else { if (!in_array('wp-shamsi-pro/wp-shamsi-pro.php', apply_filters('active_plugins', get_option('active_plugins')))) { return false; } if ($serial && $status && $due && $exists) { return true; } else { return false; } } */ } /** * Validate VIP * * VIP version validation. * * @since 3.0.0 * * @return bool true if is validated. */ protected function vip() { if (!$this->pro()) { return false; } else { return true; // Since 4.3.0 } $vip = get_option('wpsh_pro_is_vip'); if (!empty($vip) && $vip == 1) { return true; } return false; } /** * Validate due * * Pro version due date. * * @since 3.0.0 * * @return mixed Return in dayas or bool. */ protected function pro_due($int = false) { if (!$this->pro()) { return null; } $reminder = 30; $due = get_option('wpsh_pro_license_due'); $days = 60 * 60 * 24; $now = current_time('timestamp', false); $remain = floor(($due - $now) / $days); if ($int) { return $remain; } else { if ($remain < $reminder) { return true; } else { return false; } } } /** * $_GET Mask * * Mask and escape $_GET * * @since 2.1.0 * * @param string $key Key of $_GET. * @param string $mode String or boolean. * @return mixed Escaped result or boolean. */ protected function get($key, $mode = 'string') { if ($mode == 'string') { $get = (isset($_GET[$key])) ? wp_kses_post($_GET[$key]) : null; } if ($mode == 'bool') { $get = (isset($_GET[$key])) ? true : false; } return $get; } /** * $_POST Mask * * Mask and escape $_POST * * @since 2.1.0 * * @param string $key Key of $_POST. * @param string $mode String or boolean. * @return mixed Escaped result or boolean. */ protected function post($key, $mode = 'string') { if ($mode == 'string') { $post = (isset($_POST[$key])) ? wp_kses_post($_POST[$key]) : null; } if ($mode == 'bool') { $post = (isset($_POST[$key])) ? true : false; } return $post; } }
Fatal error: Uncaught Error: Class 'WPSH_Core' not found in /home/arasetne/public_html/wp-content/plugins/wp-shamsi/inc/autoload.php:20 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 20