volbraakzakje
Aangemaakte reacties
3 reacties aan het bekijken - 1 tot 3 (van in totaal 3)
-
Forum: Installatie WordPress
In antwoord op: WordPress van Submap naar hoofdmap?Bedankt, het is gelukt met Duplicator
Heeft iemand enig idee? Ik weet echt niet meer wat ik moet doen nu. Alles lijkt te kloppen, maar het werkt gewoon niet…
Herstel: hieronder de complete lijnen 229 t/m 299:
preg_match_all( '@\[/?([^<>&/\[\]\x00-\x20=]++)@', $text, $matches ); $tagnames = array_intersect( array_keys( $shortcode_tags ), $matches[1] ); $found_shortcodes = ! empty( $tagnames ); $shortcode_regex = $found_shortcodes ? _get_wptexturize_shortcode_regex( $tagnames ) : ''; $regex = _get_wptexturize_split_regex( $shortcode_regex ); $textarr = preg_split( $regex, $text, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY ); foreach ( $textarr as &$curl ) { // Only call _wptexturize_pushpop_element if $curl is a delimiter. $first = $curl[0]; if ( '<' === $first ) { if ( '<!--' === substr( $curl, 0, 4 ) ) { // This is an HTML comment delimiter. continue; } else { // This is an HTML element delimiter. // Replace each & with & unless it already looks like an entity. $curl = preg_replace( '/&(?!#(?:\d+|x[a-f0-9]+);|[a-z1-4]{1,8};)/i', '&', $curl ); _wptexturize_pushpop_element( $curl, $no_texturize_tags_stack, $no_texturize_tags ); } } elseif ( '' === trim( $curl ) ) { // This is a newline between delimiters. Performance improves when we check this. continue; } elseif ( '[' === $first && $found_shortcodes && 1 === preg_match( '/^' . $shortcode_regex . '$/', $curl ) ) { // This is a shortcode delimiter. if ( '[[' !== substr( $curl, 0, 2 ) && ']]' !== substr( $curl, -2 ) ) { // Looks like a normal shortcode. _wptexturize_pushpop_element( $curl, $no_texturize_shortcodes_stack, $no_texturize_shortcodes ); } else { // Looks like an escaped shortcode. continue; } } elseif ( empty( $no_texturize_shortcodes_stack ) && empty( $no_texturize_tags_stack ) ) { // This is neither a delimiter, nor is this content inside of no_texturize pairs. Do texturize. $curl = str_replace( $static_characters, $static_replacements, $curl ); if ( false !== strpos( $curl, "'" ) ) { $curl = preg_replace( $dynamic_characters['apos'], $dynamic_replacements['apos'], $curl ); $curl = wptexturize_primes( $curl, "'", $prime, $open_sq_flag, $closing_single_quote ); $curl = str_replace( $apos_flag, $apos, $curl ); $curl = str_replace( $open_sq_flag, $opening_single_quote, $curl ); } if ( false !== strpos( $curl, '"' ) ) { $curl = preg_replace( $dynamic_characters['quote'], $dynamic_replacements['quote'], $curl ); $curl = wptexturize_primes( $curl, '"', $double_prime, $open_q_flag, $closing_quote ); $curl = str_replace( $open_q_flag, $opening_quote, $curl ); } if ( false !== strpos( $curl, '-' ) ) { $curl = preg_replace( $dynamic_characters['dash'], $dynamic_replacements['dash'], $curl ); } // 9x9 (times), but never 0x9999 if ( 1 === preg_match( '/(?<=\d)x\d/', $curl ) ) { // Searching for a digit is 10 times more expensive than for the x, so we avoid doing this one! $curl = preg_replace( '/\b(\d(?(?<=0)[\d\.,]+|[\d\.,]*))x(\d[\d\.,]*)\b/', '$1×$2', $curl ); } // Replace each & with & unless it already looks like an entity. $curl = preg_replace( '/&(?!#(?:\d+|x[a-f0-9]+);|[a-z1-4]{1,8};)/i', '&', $curl ); } } return implode( '', $textarr ); }
3 reacties aan het bekijken - 1 tot 3 (van in totaal 3)