PHP
6 days ago
class-convertedurl.php
6 days ago
class-cssurlprocessor.php
6 days ago
class-nativeurlintextprocessorwrapper.php
6 days ago
class-urlintextprocessor.php
6 days ago
class-urlrewritecache.php
6 days ago
class-wpurl.php
6 days ago
class-wpwhatwgurl.php
6 days ago
class-wpwhatwgurlsearchparams.php
6 days ago
functions.php
6 days ago
public-suffix-list.php
6 days ago
class-urlintextprocessor.php
32 lines
| 1 | <?php |
| 2 | // phpcs:disable Generic.Classes.DuplicateClassName.Found,Generic.Files.OneObjectStructurePerFile.MultipleFound |
| 3 | |
| 4 | namespace WordPress\DataLiberation\URL; |
| 5 | |
| 6 | $wp_url_in_text_use_native = |
| 7 | class_exists( 'WordPress\\DataLiberation\\URL\\NativeURLInTextProcessor', false ) && |
| 8 | method_exists( 'WordPress\\DataLiberation\\URL\\NativeURLInTextProcessor', 'supports_public_api' ) && |
| 9 | ( ! defined( 'WP_NATIVE_APIS_DISABLE_DEFAULTS' ) || ! WP_NATIVE_APIS_DISABLE_DEFAULTS ); |
| 10 | |
| 11 | $wp_url_in_text_use_native_scanner = |
| 12 | class_exists( 'WordPress\\DataLiberation\\URL\\NativeURLInTextProcessor', false ) && |
| 13 | method_exists( 'WordPress\\DataLiberation\\URL\\NativeURLInTextProcessor', 'next_url' ) && |
| 14 | method_exists( 'WordPress\\DataLiberation\\URL\\NativeURLInTextProcessor', 'get_raw_url' ) && |
| 15 | ( ! defined( 'WP_NATIVE_APIS_DISABLE_DEFAULTS' ) || ! WP_NATIVE_APIS_DISABLE_DEFAULTS ); |
| 16 | |
| 17 | if ( $wp_url_in_text_use_native ) { |
| 18 | class URLInTextProcessor extends NativeURLInTextProcessor {} |
| 19 | } elseif ( $wp_url_in_text_use_native_scanner ) { |
| 20 | require_once __DIR__ . '/PHP/class-phpurlintextprocessor.php'; |
| 21 | require_once __DIR__ . '/class-nativeurlintextprocessorwrapper.php'; |
| 22 | |
| 23 | class URLInTextProcessor extends NativeURLInTextProcessorWrapper {} |
| 24 | } else { |
| 25 | require_once __DIR__ . '/PHP/class-phpurlintextprocessor.php'; |
| 26 | |
| 27 | class URLInTextProcessor extends PHPURLInTextProcessor {} |
| 28 | } |
| 29 | |
| 30 | unset( $wp_url_in_text_use_native ); |
| 31 | unset( $wp_url_in_text_use_native_scanner ); |
| 32 |