Hijri
3 years ago
Processors
1 month ago
QuranADay
2 months ago
StartTime
1 year ago
design
1 month ago
AdminMenu.php
2 years ago
AssetsLoader.php
1 year ago
CustomPluginSettings.php
4 years ago
DPTAjaxHandler.php
4 years ago
DPTHelper.php
1 month ago
DSTemplateLoader.php
2 years ago
DailyShortCode.php
2 months ago
DigitalScreen.php
1 month ago
HijriDate.php
3 years ago
Init.php
4 years ago
MonthlyShortCode.php
2 years ago
MonthlyTimeTable.php
3 years ago
Shortcodes.php
2 months ago
Translator.php
4 years ago
UpdateStyles.php
1 month ago
Validator.php
3 years ago
db.php
2 months ago
dptWidget.php
4 years ago
DPTAjaxHandler.php
34 lines
| 1 | <?php |
| 2 | |
| 3 | class DPTAjaxHandler extends DailyShortCode |
| 4 | { |
| 5 | public function __construct() |
| 6 | { |
| 7 | $this->addAjaxActions(); |
| 8 | parent::__construct(); |
| 9 | } |
| 10 | |
| 11 | public function get_ds_next_prayer() |
| 12 | { |
| 13 | echo do_shortcode("[daily_next_prayer]"); |
| 14 | die(); |
| 15 | } |
| 16 | |
| 17 | public function get_ds_quran_verse() |
| 18 | { |
| 19 | echo do_shortcode("[quran_verse]"); |
| 20 | die(); |
| 21 | } |
| 22 | |
| 23 | private function addAjaxActions() |
| 24 | { |
| 25 | $f = new ReflectionClass('DPTAjaxHandler'); |
| 26 | |
| 27 | foreach ($f->getMethods() as $m) { |
| 28 | if ($m->class == 'DPTAjaxHandler') { |
| 29 | add_action( 'wp_ajax_'.$m->name, array( $this, $m->name) ); |
| 30 | add_action( 'wp_ajax_nopriv_'.$m->name, array( $this, $m->name) ); |
| 31 | } |
| 32 | } |
| 33 | } |
| 34 | } |