| @@ -6,8 +6,13 @@ | ||
| 6 | 6 | */ |
| 7 | 7 | |
| 8 | 8 | namespace MainWP\Dashboard; |
| 9 | 9 | |
| 10 | +// Exit if accessed directly. | |
| 11 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 12 | + exit; | |
| 13 | +} | |
| 14 | + | |
| 10 | 15 | /** |
| 11 | 16 | * Class MainWP_Post_Base_Handler |
| 12 | 17 | * |
| 13 | 18 | * @package MainWP\Dashboard |
| @@ -113,9 +118,9 @@ | ||
| 113 | 118 | * |
| 114 | 119 | * Add ajax action. |
| 115 | 120 | * |
| 116 | 121 | * @param string $action Action to perform. |
| 117 | - * @param string $callback Callback to perform. | |
| 122 | + * @param mixed $callback Callback to perform. | |
| 118 | 123 | * @param int $priority priority aciton. |
| 119 | 124 | * @param int $accepted number args. |
| 120 | 125 | */ |
| 121 | 126 | public function add_action( $action, $callback, $priority = 10, $accepted = 2 ) { |