PHP 8.2.31
Preview: WordPress.php Size: 905 B
/home/nshryvcy/himaltourism.com/wp-content/plugins/mailpoet/lib/Automation/Engine/WordPress.php

<?php declare(strict_types = 1);

namespace MailPoet\Automation\Engine;

if (!defined('ABSPATH')) exit;


use WP_User;

class WordPress {
  public function addAction(string $hookName, callable $callback, int $priority = 10, int $acceptedArgs = 1): bool {
    return add_action($hookName, $callback, $priority, $acceptedArgs);
  }

  /** @param mixed ...$arg */
  public function doAction(string $hookName, ...$arg): void {
    do_action($hookName, ...$arg);
  }

  public function wpGetCurrentUser(): WP_User {
    return wp_get_current_user();
  }

  /** @param mixed ...$args */
  public function currentUserCan(string $capability, ...$args): bool {
    return current_user_can($capability, ...$args);
  }

  public function registerRestRoute(string $namespace, string $route, array $args = [], bool $override = false): bool {
    return register_rest_route($namespace, $route, $args, $override);
  }
}

Directory Contents

Dirs: 11 × Files: 7

Name Size Perms Modified Actions
API DIR
- drwxr-xr-x 2023-04-04 05:35:40
Edit Download
Builder DIR
- drwxr-xr-x 2023-04-04 05:35:40
Edit Download
Control DIR
- drwxr-xr-x 2023-04-04 05:35:40
Edit Download
Data DIR
- drwxr-xr-x 2023-04-04 05:35:40
Edit Download
Endpoints DIR
- drwxr-xr-x 2023-04-04 05:35:40
Edit Download
- drwxr-xr-x 2023-04-04 05:35:40
Edit Download
- drwxr-xr-x 2023-04-04 05:35:40
Edit Download
Mappers DIR
- drwxr-xr-x 2023-04-04 05:35:40
Edit Download
Storage DIR
- drwxr-xr-x 2023-04-04 05:35:40
Edit Download
Utils DIR
- drwxr-xr-x 2023-04-04 05:35:40
Edit Download
- drwxr-xr-x 2023-04-04 05:35:40
Edit Download
3.13 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
12.02 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
1.84 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
0 B lrw-r--r-- 2023-04-04 05:35:40
Edit Download
186 B lrw-r--r-- 2023-04-04 05:35:40
Edit Download
3.53 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
905 B lrw-r--r-- 2023-04-04 05:35:40
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).