| @@ -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 | } |
| @@ -340,9 +321,9 @@ | ||
| 340 | 321 | |
| 341 | 322 | /** |
| 342 | 323 | * @see is_super_admin |
| 343 | 324 | */ |
| 344 | - public function isSuperAdmin(bool|int|string|null $userId = false): bool | |
| 325 | + public function isSuperAdmin(bool|int|string $userId = false): bool | |
| 345 | 326 | { |
| 346 | 327 | return is_super_admin($userId); |
| 347 | 328 | } |
| 348 | 329 | |
| @@ -360,9 +341,9 @@ | ||
| 360 | 341 | |
| 361 | 342 | /** |
| 362 | 343 | * @see get_allowed_mime_types |
| 363 | 344 | */ |
| 364 | - public function getAllowedMimeTypes(WP_User|int|string|null $user = null): array | |
| 345 | + public function getAllowedMimeTypes(WP_User|int|string $user = null): array | |
| 365 | 346 | { |
| 366 | 347 | return get_allowed_mime_types($user); |
| 367 | 348 | } |
| 368 | 349 | |
| @@ -368,9 +349,9 @@ | ||
| 368 | 349 | |
| 369 | 350 | /** |
| 370 | 351 | * @see wp_upload_dir |
| 371 | 352 | */ |
| 372 | - 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 | |
| 373 | 354 | { |
| 374 | 355 | return wp_upload_dir($time, $createDir, $refreshCache); |
| 375 | 356 | } |
| 376 | 357 | |
| @@ -376,9 +357,9 @@ | ||
| 376 | 357 | |
| 377 | 358 | /** |
| 378 | 359 | * @see home_url |
| 379 | 360 | */ |
| 380 | - public function getHomeUrl(string $path = '', ?string $scheme = null): string | |
| 361 | + public function getHomeUrl(string $path = '', string $scheme = null): string | |
| 381 | 362 | { |
| 382 | 363 | return home_url($path, $scheme); |
| 383 | 364 | } |
| 384 | 365 | |
| @@ -384,9 +365,9 @@ | ||
| 384 | 365 | |
| 385 | 366 | /** |
| 386 | 367 | * @see site_url |
| 387 | 368 | */ |
| 388 | - public function getSiteUrl(string $path = '', ?string $scheme = null): string | |
| 369 | + public function getSiteUrl(string $path = '', string $scheme = null): string | |
| 389 | 370 | { |
| 390 | 371 | return site_url($path, $scheme); |
| 391 | 372 | } |
| 392 | 373 | |
| @@ -404,9 +385,9 @@ | ||
| 404 | 385 | |
| 405 | 386 | /** |
| 406 | 387 | * @see wp_parse_id_list |
| 407 | 388 | */ |
| 408 | - public function parseIdList(array|string|int $list): array | |
| 389 | + public function parseIdList(array|string $list): array | |
| 409 | 390 | { |
| 410 | 391 | return wp_parse_id_list($list); |
| 411 | 392 | } |
| 412 | 393 | |
| @@ -421,9 +402,9 @@ | ||
| 421 | 402 | |
| 422 | 403 | /** |
| 423 | 404 | * @see is_feed |
| 424 | 405 | */ |
| 425 | - public function isFeed(array|string|int $feeds = ''): bool | |
| 406 | + public function isFeed(array|string $feeds = ''): bool | |
| 426 | 407 | { |
| 427 | 408 | return is_feed($feeds); |
| 428 | 409 | } |
| 429 | 410 | |
| @@ -565,9 +546,9 @@ | ||
| 565 | 546 | |
| 566 | 547 | /** |
| 567 | 548 | * @see get_pages |
| 568 | 549 | */ |
| 569 | - public function getPages(array|string|int $arguments): bool|array | |
| 550 | + public function getPages(array|string $arguments): bool|array | |
| 570 | 551 | { |
| 571 | 552 | return get_pages($arguments); |
| 572 | 553 | } |
| 573 | 554 | |
| @@ -587,13 +568,13 @@ | ||
| 587 | 568 | /** |
| 588 | 569 | * @see wp_register_script |
| 589 | 570 | */ |
| 590 | 571 | public function registerScript( |
| 591 | - string $handle, | |
| 592 | - string $source, | |
| 593 | - array $depends = [], | |
| 572 | + string $handle, | |
| 573 | + string $source, | |
| 574 | + array $depends = [], | |
| 594 | 575 | bool|string|null $version = false, |
| 595 | - bool $inFooter = false | |
| 576 | + bool $inFooter = false | |
| 596 | 577 | ): bool { |
| 597 | 578 | return wp_register_script($handle, $source, $depends, $version, $inFooter); |
| 598 | 579 | } |
| 599 | 580 | |
| @@ -673,9 +654,9 @@ | ||
| 673 | 654 | |
| 674 | 655 | /** |
| 675 | 656 | * @see is_single |
| 676 | 657 | */ |
| 677 | - public function isSingle(array|string|int $post = ''): bool | |
| 658 | + public function isSingle(int|array|string $post = ''): bool | |
| 678 | 659 | { |
| 679 | 660 | return is_single($post); |
| 680 | 661 | } |
| 681 | 662 | |
| @@ -681,9 +662,9 @@ | ||
| 681 | 662 | |
| 682 | 663 | /** |
| 683 | 664 | * @see is_page |
| 684 | 665 | */ |
| 685 | - public function isPage(array|string|int $page = ''): bool | |
| 666 | + public function isPage(int|array|string $page = ''): bool | |
| 686 | 667 | { |
| 687 | 668 | return is_page($page); |
| 688 | 669 | } |
| 689 | 670 | |