$header) { $data[$key] = ''; } return $data; } } if (!function_exists('get_option')) { function get_option(string $key, $default = false) { return $default; } } if (!function_exists('update_option')) { function update_option(string $key, $value, $autoload = null): bool { return true; } } if (!function_exists('set_transient')) { function set_transient(string $key, $value, int $expiry = 0): bool { return true; } } if (!function_exists('get_transient')) { function get_transient(string $key) { return false; } } if (!function_exists('delete_transient')) { function delete_transient(string $key): bool { return true; } } if (!function_exists('wp_next_scheduled')) { function wp_next_scheduled(string $hook, array $args = []) { return false; } } if (!function_exists('wp_schedule_event')) { function wp_schedule_event(int $timestamp, string $recurrence, string $hook, array $args = []): bool { return true; } } if (!function_exists('is_wp_error')) { function is_wp_error($thing): bool { return false; } } if (!function_exists('plugin_basename')) { function plugin_basename(string $file): string { return basename(dirname($file)) . '/' . basename($file); } } if (!function_exists('register_deactivation_hook')) { function register_deactivation_hook(string $file, $cb): void {} } if (!function_exists('register_activation_hook')) { function register_activation_hook(string $file, $cb): void {} } if (!function_exists('wp_remote_get')) { function wp_remote_get(string $url, array $args = []) { return false; } } if (!function_exists('wp_remote_post')) { function wp_remote_post(string $url, array $args = []) { return false; } } require_once __DIR__ . '/../includes/class-plugin.php'; \WPMultiCity\Plugin::register_autoloader(); if (!class_exists('WP_Term', false)) { eval('class WP_Term { public int $term_id = 0; public string $slug = ""; public string $taxonomy = ""; }'); } if (!class_exists('WP_Query', false)) { eval('class WP_Query { public array $constructor_args = []; public bool $is_page = false; public bool $is_front_page = false; public bool $is_404 = false; public function __construct($args = []) { $this->constructor_args = is_array($args) ? $args : []; } public function set_404(): void { $this->is_404 = true; } public function set($k, $v): void {} }'); }