| @@ -102,24 +102,8 @@ | ||
| 102 | 102 | return $is_nginx; |
| 103 | 103 | } |
| 104 | 104 | |
| 105 | 105 | /** |
| 106 | - * @see wp_using_ext_object_cache | |
| 107 | - */ | |
| 108 | - public function isUsingExtObjectCache(): bool | |
| 109 | - { | |
| 110 | - return function_exists('wp_using_ext_object_cache') && wp_using_ext_object_cache() === true; | |
| 111 | - } | |
| 112 | - | |
| 113 | - /** | |
| 114 | - * @see apache_get_modules | |
| 115 | - */ | |
| 116 | - public function isApacheModuleLoaded(string $module): bool | |
| 117 | - { | |
| 118 | - return function_exists('apache_get_modules') && in_array($module, apache_get_modules(), true); | |
| 119 | - } | |
| 120 | - | |
| 121 | - /** | |
| 122 | 106 | * @see is_post_type_hierarchical |
| 123 | 107 | */ |
| 124 | 108 | public function isPostTypeHierarchical(string $postType): bool |
| 125 | 109 | { |
| @@ -136,9 +120,9 @@ | ||
| 136 | 120 | |
| 137 | 121 | /** |
| 138 | 122 | * @see get_userdata |
| 139 | 123 | */ |
| 140 | - public function getUserData(int|string|null $id): WP_User|bool | |
| 124 | + public function getUserData(int|string $id): WP_User|bool | |
| 141 | 125 | { |
| 142 | 126 | return get_userdata($id); |
| 143 | 127 | } |
| 144 | 128 | |
| @@ -145,9 +129,9 @@ | ||
| 145 | 129 | /** |
| 146 | 130 | * @see get_post_types |
| 147 | 131 | */ |
| 148 | 132 | public function getPostTypes( |
| 149 | - array|string|int $arguments = [], | |
| 133 | + array|string $arguments = [], | |
| 150 | 134 | string $output = 'names', |
| 151 | 135 | string $operator = 'and' |
| 152 | 136 | ): array { |
| 153 | 137 | return get_post_types($arguments, $output, $operator); |
| @@ -172,13 +156,10 @@ | ||
| 172 | 156 | |
| 173 | 157 | /** |
| 174 | 158 | * @see get_post |
| 175 | 159 | */ |
| 176 | - public function getPost( | |
| 177 | - int|string|null $id, | |
| 178 | - string $output = OBJECT, | |
| 179 | - string $filter = 'raw' | |
| 180 | - ): WP_Post|array|bool|null { | |
| 160 | + public function getPost(int|string $id, string $output = OBJECT, string $filter = 'raw'): array|WP_Post|null | |
| 161 | + { | |
| 181 | 162 | return get_post($id, $output, $filter); |
| 182 | 163 | } |
| 183 | 164 | |
| 184 | 165 | /** |
| @@ -196,9 +177,9 @@ | ||
| 196 | 177 | int|string $id, |
| 197 | 178 | string $taxonomy = '', |
| 198 | 179 | string $output = OBJECT, |
| 199 | 180 | string $filter = 'raw' |
| 200 | - ): WP_Term|WP_Error|array|bool|null { | |
| 181 | + ): WP_Term|WP_Error|array|null { | |
| 201 | 182 | return get_term($id, $taxonomy, $output, $filter); |
| 202 | 183 | } |
| 203 | 184 | |
| 204 | 185 | |
| @@ -216,9 +197,9 @@ | ||
| 216 | 197 | |
| 217 | 198 | /** |
| 218 | 199 | * @see switch_to_blog |
| 219 | 200 | */ |
| 220 | - public function switchToBlog(int|string|null $blogId): bool | |
| 201 | + public function switchToBlog(int $blogId): bool | |
| 221 | 202 | { |
| 222 | 203 | if (function_exists('\switch_to_blog') === true) { |
| 223 | 204 | return switch_to_blog($blogId); |
| 224 | 205 | } |
| @@ -294,16 +275,8 @@ | ||
| 294 | 275 | return add_filter($tag, $functionToAdd, $priority, $acceptedArguments); |
| 295 | 276 | } |
| 296 | 277 | |
| 297 | 278 | /** |
| 298 | - * @see WP_Error | |
| 299 | - */ | |
| 300 | - public function getWpError(string|int $code = '', string $message = '', mixed $data = ''): WP_Error | |
| 301 | - { | |
| 302 | - return new WP_Error($code, $message, $data); | |
| 303 | - } | |
| 304 | - | |
| 305 | - /** | |
| 306 | 279 | * @see remove_filter |
| 307 | 280 | */ |
| 308 | 281 | public function removeFilter(string $tag, callable $functionToRemove, int $priority = 10): bool |
| 309 | 282 | { |
| @@ -348,9 +321,9 @@ | ||
| 348 | 321 | |
| 349 | 322 | /** |
| 350 | 323 | * @see is_super_admin |
| 351 | 324 | */ |
| 352 | - public function isSuperAdmin(bool|int|string|null $userId = false): bool | |
| 325 | + public function isSuperAdmin(bool|int|string $userId = false): bool | |
| 353 | 326 | { |
| 354 | 327 | return is_super_admin($userId); |
| 355 | 328 | } |
| 356 | 329 | |
| @@ -368,9 +341,9 @@ | ||
| 368 | 341 | |
| 369 | 342 | /** |
| 370 | 343 | * @see get_allowed_mime_types |
| 371 | 344 | */ |
| 372 | - public function getAllowedMimeTypes(WP_User|int|string|null $user = null): array | |
| 345 | + public function getAllowedMimeTypes(WP_User|int|string $user = null): array | |
| 373 | 346 | { |
| 374 | 347 | return get_allowed_mime_types($user); |
| 375 | 348 | } |
| 376 | 349 | |
| @@ -376,9 +349,9 @@ | ||
| 376 | 349 | |
| 377 | 350 | /** |
| 378 | 351 | * @see wp_upload_dir |
| 379 | 352 | */ |
| 380 | - public function getUploadDir(?string $time = null, bool $createDir = true, bool $refreshCache = false): array | |
| 353 | + public function getUploadDir(string $time = null, bool $createDir = true, bool $refreshCache = false): array | |
| 381 | 354 | { |
| 382 | 355 | return wp_upload_dir($time, $createDir, $refreshCache); |
| 383 | 356 | } |
| 384 | 357 | |
| @@ -384,9 +357,9 @@ | ||
| 384 | 357 | |
| 385 | 358 | /** |
| 386 | 359 | * @see home_url |
| 387 | 360 | */ |
| 388 | - public function getHomeUrl(string $path = '', ?string $scheme = null): string | |
| 361 | + public function getHomeUrl(string $path = '', string $scheme = null): string | |
| 389 | 362 | { |
| 390 | 363 | return home_url($path, $scheme); |
| 391 | 364 | } |
| 392 | 365 | |
| @@ -392,9 +365,9 @@ | ||
| 392 | 365 | |
| 393 | 366 | /** |
| 394 | 367 | * @see site_url |
| 395 | 368 | */ |
| 396 | - public function getSiteUrl(string $path = '', ?string $scheme = null): string | |
| 369 | + public function getSiteUrl(string $path = '', string $scheme = null): string | |
| 397 | 370 | { |
| 398 | 371 | return site_url($path, $scheme); |
| 399 | 372 | } |
| 400 | 373 | |
| @@ -412,9 +385,9 @@ | ||
| 412 | 385 | |
| 413 | 386 | /** |
| 414 | 387 | * @see wp_parse_id_list |
| 415 | 388 | */ |
| 416 | - public function parseIdList(array|string|int $list): array | |
| 389 | + public function parseIdList(array|string $list): array | |
| 417 | 390 | { |
| 418 | 391 | return wp_parse_id_list($list); |
| 419 | 392 | } |
| 420 | 393 | |
| @@ -429,9 +402,9 @@ | ||
| 429 | 402 | |
| 430 | 403 | /** |
| 431 | 404 | * @see is_feed |
| 432 | 405 | */ |
| 433 | - public function isFeed(array|string|int $feeds = ''): bool | |
| 406 | + public function isFeed(array|string $feeds = ''): bool | |
| 434 | 407 | { |
| 435 | 408 | return is_feed($feeds); |
| 436 | 409 | } |
| 437 | 410 | |
| @@ -461,16 +434,8 @@ | ||
| 461 | 434 | { |
| 462 | 435 | return wp_redirect($location, $status); |
| 463 | 436 | } |
| 464 | 437 | |
| 465 | - /** | |
| 466 | - * @see wp_get_referer | |
| 467 | - */ | |
| 468 | - public function getReferer(): string|false | |
| 469 | - { | |
| 470 | - return wp_get_referer(); | |
| 471 | - } | |
| 472 | - | |
| 473 | 438 | public function getPageLink( |
| 474 | 439 | bool|int|string|WP_Post $post = false, |
| 475 | 440 | bool $leaveName = false, |
| 476 | 441 | bool $sample = false |
| @@ -581,9 +546,9 @@ | ||
| 581 | 546 | |
| 582 | 547 | /** |
| 583 | 548 | * @see get_pages |
| 584 | 549 | */ |
| 585 | - public function getPages(array|string|int $arguments): bool|array | |
| 550 | + public function getPages(array|string $arguments): bool|array | |
| 586 | 551 | { |
| 587 | 552 | return get_pages($arguments); |
| 588 | 553 | } |
| 589 | 554 | |
| @@ -603,13 +568,13 @@ | ||
| 603 | 568 | /** |
| 604 | 569 | * @see wp_register_script |
| 605 | 570 | */ |
| 606 | 571 | public function registerScript( |
| 607 | - string $handle, | |
| 608 | - string $source, | |
| 609 | - array $depends = [], | |
| 572 | + string $handle, | |
| 573 | + string $source, | |
| 574 | + array $depends = [], | |
| 610 | 575 | bool|string|null $version = false, |
| 611 | - bool $inFooter = false | |
| 576 | + bool $inFooter = false | |
| 612 | 577 | ): bool { |
| 613 | 578 | return wp_register_script($handle, $source, $depends, $version, $inFooter); |
| 614 | 579 | } |
| 615 | 580 | |
| @@ -689,9 +654,9 @@ | ||
| 689 | 654 | |
| 690 | 655 | /** |
| 691 | 656 | * @see is_single |
| 692 | 657 | */ |
| 693 | - public function isSingle(array|string|int $post = ''): bool | |
| 658 | + public function isSingle(int|array|string $post = ''): bool | |
| 694 | 659 | { |
| 695 | 660 | return is_single($post); |
| 696 | 661 | } |
| 697 | 662 | |
| @@ -697,9 +662,9 @@ | ||
| 697 | 662 | |
| 698 | 663 | /** |
| 699 | 664 | * @see is_page |
| 700 | 665 | */ |
| 701 | - public function isPage(array|string|int $page = ''): bool | |
| 666 | + public function isPage(int|array|string $page = ''): bool | |
| 702 | 667 | { |
| 703 | 668 | return is_page($page); |
| 704 | 669 | } |
| 705 | 670 | |