AdhanProcessor.php
1 year ago
CsvProcessor.php
2 months ago
DebugProcessor.php
1 year ago
DigitalScreenProcessor.php
1 month ago
HijriProcessor.php
3 years ago
LanguageProcessor.php
4 years ago
OtherProcessor.php
2 months ago
QuickUpdateProcessor.php
3 years ago
StartTimeProcessor.php
1 year ago
ThemeSettingsProcessor.php
1 year ago
HijriProcessor.php
53 lines
| 1 | <?php |
| 2 | if ( !class_exists('DPTHijriProcessor')) { |
| 3 | class DPTHijriProcessor |
| 4 | { |
| 5 | /** |
| 6 | * @var array |
| 7 | */ |
| 8 | private $data; |
| 9 | |
| 10 | /** |
| 11 | * @param array $data |
| 12 | */ |
| 13 | public function __construct(array $data) |
| 14 | { |
| 15 | $this->data = $data; |
| 16 | } |
| 17 | |
| 18 | public function process() |
| 19 | { |
| 20 | $hijri = sanitize_text_field($this->data['hijri-chbox']); |
| 21 | delete_option('hijri-chbox'); |
| 22 | add_option('hijri-chbox', $hijri); |
| 23 | |
| 24 | $hijriUmmulQura = sanitize_text_field($this->data['hijri-ummul-qura']); |
| 25 | delete_option('hijri-ummul-qura'); |
| 26 | add_option('hijri-ummul-qura', $hijriUmmulQura); |
| 27 | |
| 28 | $hijriArabic = sanitize_text_field($this->data['hijri-arabic-chbox']); |
| 29 | delete_option('hijri-arabic-chbox'); |
| 30 | add_option('hijri-arabic-chbox', $hijriArabic); |
| 31 | |
| 32 | $hijriAdjust = sanitize_text_field($this->data['hijri-adjust']); |
| 33 | delete_option('hijri-adjust'); |
| 34 | add_option('hijri-adjust', $hijriAdjust); |
| 35 | |
| 36 | $isRamadan = $this->data['ramadan_chbox'] ?? ''; |
| 37 | $isRamadan = sanitize_text_field($isRamadan); |
| 38 | delete_option('ramadan_chbox'); |
| 39 | add_option('ramadan_chbox', $isRamadan); |
| 40 | |
| 41 | $taraweehDim = sanitize_text_field($this->data['taraweehDim'] ?? ''); |
| 42 | delete_option('taraweehDim'); |
| 43 | add_option('taraweehDim', $taraweehDim); |
| 44 | |
| 45 | $imsaq = $this->data['imsaq'] ?? ''; |
| 46 | $imsaq = sanitize_text_field($imsaq); |
| 47 | delete_option('imsaq'); |
| 48 | add_option('imsaq', $imsaq); |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | } |
| 53 |