Skip to content

Commit 616bffc

Browse files
committed
Remove unneeded WP polyfills, rename class to CSSURLProcessor
1 parent 3817238 commit 616bffc

File tree

2 files changed

+2
-30
lines changed

2 files changed

+2
-30
lines changed

components/DataLiberation/URL/class-cssurlprocessor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
/**
88
* Provides URL specific helpers on top of the CSSProcessor tokenizer.
99
*/
10-
class CSSUrlProcessor {
10+
class CSSURLProcessor {
1111
/**
1212
* @var CSSProcessor
1313
*/

components/Polyfill/wordpress.php

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,7 @@ function __( $input ) {
7575

7676
if ( ! function_exists( 'esc_attr' ) ) {
7777
function esc_attr( $input ) {
78-
$safe_text = htmlspecialchars( $input, ENT_QUOTES, 'UTF-8' );
79-
80-
return apply_filters( 'attribute_escape', $safe_text, $input );
78+
return htmlspecialchars( $input );
8179
}
8280
}
8381

@@ -114,32 +112,6 @@ function add_filter( $hook_name, $callback, $priority = 10, $accepted_args = 1 )
114112
}
115113
}
116114

117-
if ( ! function_exists( 'remove_filter' ) ) {
118-
function remove_filter( $hook_name, $callback, $priority = 10 ) {
119-
global $wp_filter;
120-
if (
121-
! isset( $wp_filter[ $hook_name ] ) ||
122-
! isset( $wp_filter[ $hook_name ][ $priority ] )
123-
) {
124-
return false;
125-
}
126-
127-
foreach ( $wp_filter[ $hook_name ][ $priority ] as $index => $function ) {
128-
if ( $function['function'] === $callback ) {
129-
unset( $wp_filter[ $hook_name ][ $priority ][ $index ] );
130-
131-
if ( empty( $wp_filter[ $hook_name ][ $priority ] ) ) {
132-
unset( $wp_filter[ $hook_name ][ $priority ] );
133-
}
134-
135-
return true;
136-
}
137-
}
138-
139-
return false;
140-
}
141-
}
142-
143115
if ( ! function_exists( 'add_action' ) ) {
144116
function add_action( $hook_name, $callback, $priority = 10, $accepted_args = 1 ) {
145117
return add_filter( $hook_name, $callback, $priority, $accepted_args );

0 commit comments

Comments
 (0)