Changeset 25054
- Timestamp:
- 08/20/2013 05:56:22 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/formatting.php
r24986 r25054 2571 2571 * @access private 2572 2572 * 2573 * @param string|array $search 2574 * @param string $subject 2575 * @return string The processed string2573 * @param string|array $search The value being searched for, otherwise known as the needle. An array may be used to designate multiple needles. 2574 * @param string $subject The string being searched and replaced on, otherwise known as the haystack. 2575 * @return string The string with the replaced svalues. 2576 2576 */ 2577 2577 function _deep_replace( $search, $subject ) { 2578 $found = true;2579 2578 $subject = (string) $subject; 2580 while ( $found ) { 2581 $found = false; 2582 foreach ( (array) $search as $val ) { 2583 while ( strpos( $subject, $val ) !== false ) { 2584 $found = true; 2585 $subject = str_replace( $val, '', $subject ); 2586 } 2587 } 2579 2580 $count = 1; 2581 while ( $count ) { 2582 $subject = str_replace( $search, '', $subject, $count ); 2588 2583 } 2589 2584
Note: See TracChangeset
for help on using the changeset viewer.