Changeset 55081
- Timestamp:
- 01/17/2023 02:05:38 PM (23 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/hooks/addFilter.php
r53942 r55081 1 1 <?php 2 3 2 4 3 /** … … 190 189 } 191 190 192 public function _filter_remove_and_add1( $ string) {193 return $ string. '1';194 } 195 196 public function _filter_remove_and_add2( $ string) {191 public function _filter_remove_and_add1( $value ) { 192 return $value . '1'; 193 } 194 195 public function _filter_remove_and_add2( $value ) { 197 196 $this->hook->remove_filter( 'remove_and_add', array( $this, '_filter_remove_and_add2' ), 11 ); 198 197 $this->hook->add_filter( 'remove_and_add', array( $this, '_filter_remove_and_add2' ), 11, 1 ); 199 198 200 return $ string. '2';201 } 202 203 public function _filter_remove_and_recurse_and_add2( $ string) {199 return $value . '2'; 200 } 201 202 public function _filter_remove_and_recurse_and_add2( $value ) { 204 203 $this->hook->remove_filter( 'remove_and_add', array( $this, '_filter_remove_and_recurse_and_add2' ), 11 ); 205 204 206 $ string.= '-' . $this->hook->apply_filters( '', array() ) . '-';205 $value .= '-' . $this->hook->apply_filters( '', array() ) . '-'; 207 206 208 207 $this->hook->add_filter( 'remove_and_add', array( $this, '_filter_remove_and_recurse_and_add2' ), 11, 1 ); 209 208 210 return $ string. '2';211 } 212 213 public function _filter_remove_and_add3( $ string) {214 return $ string. '3';215 } 216 217 public function _filter_remove_and_add4( $ string) {218 return $ string. '4';209 return $value . '2'; 210 } 211 212 public function _filter_remove_and_add3( $value ) { 213 return $value . '3'; 214 } 215 216 public function _filter_remove_and_add4( $value ) { 217 return $value . '4'; 219 218 } 220 219
Note: See TracChangeset
for help on using the changeset viewer.