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