AVRIL_START_JANCOKALIVEAVRIL_END_JANCOK
| Server IP : 146.190.157.162 / Your IP : 216.73.216.175 Web Server : Apache System : Linux ubuntu-s-2vcpu-4gb-amd-sfo3-01-KIT-DIGITAL 6.5.0-44-generic #44-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 7 15:10:09 UTC 2024 x86_64 User : vergeskit ( 679) PHP Version : 8.2.10-2ubuntu2.2 Disable Function : exec,passthru,shell_exec,system,proc_open,popen,pcntl_exec,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_signal,pcntl_signal_dispatch,pcntl_getpriority,pcntl_setpriority,dl,putenv,parse_ini_file,show_source MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/html/vergeskit/wp-content/themes/top-1785235710/modules/admin-home/rest/ |
Upload File : |
<?php
namespace HelloTheme\Modules\AdminHome\Rest;
use HelloTheme\Modules\AdminHome\Module;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
class Whats_New extends Rest_Base {
public function get_notifications() {
$notificator = Module::instance()->get_component( 'Notificator' );
return $notificator->get_notifications_by_conditions();
}
public function register_routes() {
register_rest_route(
self::ROUTE_NAMESPACE,
'/whats-new',
[
'methods' => \WP_REST_Server::READABLE,
'callback' => [ $this, 'get_notifications' ],
'permission_callback' => [ $this, 'permission_callback' ],
]
);
}
}