@@ -75,9 +75,7 @@ function __( $input ) {
7575
7676if ( ! 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-
143115if ( ! 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