REDROOM
PHP 8.0.30
Path:
Logout
Edit File
Size: 2.17 KB
Close
/proc/thread-self/cwd/wp/wp-content/plugins/wordpress-importer/php-toolkit/DataLiberation/URL/class-cssurlprocessor.php
Text
Base64
<?php namespace WordPress\DataLiberation\URL; use WordPress\DataLiberation\CSS\CSSProcessor; /** * Provides URL specific helpers on top of the CSSProcessor tokenizer. */ class CSSURLProcessor { /** * @var CSSProcessor */ private $processor; /** * @param string $css CSS source without wrapping braces. */ public function __construct( string $css ) { $this->processor = CSSProcessor::create( $css ); } /** * Moves the cursor to the next URL token, if available. * * @return bool */ public function next_url(): bool { while ( $this->processor->next_token() ) { $type = $this->processor->get_token_type(); // Direct URL token. if ( CSSProcessor::TOKEN_URL === $type ) { return true; } // url() function with STRING token. if ( CSSProcessor::TOKEN_FUNCTION === $type && 0 === strcasecmp( $this->processor->get_token_value(), 'url' ) ) { // Look ahead for STRING token, skipping whitespace. while ( $this->processor->next_token() ) { $inner_type = $this->processor->get_token_type(); if ( CSSProcessor::TOKEN_WHITESPACE === $inner_type ) { continue; // Skip whitespace. } if ( CSSProcessor::TOKEN_STRING === $inner_type ) { return true; // Found the URL string. } // Hit something else (like RIGHT_PAREN or another token). break; } } } return false; } /** * Returns the raw (decoded) URL for the current match. * * @return string|false */ public function get_raw_url() { $value = $this->processor->get_token_value(); return false !== $value ? $value : false; } /** * Replaces the currently matched URL with a new value. * * @param string $new_url Replacement URL without quoting. * @return bool */ public function set_raw_url( string $new_url ): bool { return $this->processor->set_token_value( $new_url ); } /** * Returns the updated CSS with all replacements applied. * * @return string */ public function get_updated_css(): string { return $this->processor->get_updated_css(); } /** * Determines whether the current URL is a data URI. * * @return bool */ public function is_data_uri(): bool { return $this->processor->is_data_uri(); } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 6
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
class-convertedurl.php
752 B
lrw-r--r--
2026-04-02 06:14:57
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
class-cssurlprocessor.php
2.17 KB
lrw-r--r--
2026-04-02 06:14:57
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
class-urlintextprocessor.php
14.16 KB
lrw-r--r--
2026-04-02 06:14:57
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
class-wpurl.php
9.45 KB
lrw-r--r--
2026-04-02 06:14:57
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
functions.php
4.55 KB
lrw-r--r--
2026-04-02 06:14:57
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
public-suffix-list.php
40.65 KB
lrw-r--r--
2026-04-02 06:14:57
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).