@ 2016-01-08T13:53:05Z <?php
function shortcode_parse_atts($text) {
$atts = array();
$pattern = get_shortcode_atts_regex();
$text = preg_replace("/[\x{00a0}\x{200b}]+/u", " ", $text);
if ( preg_match_all($pattern, $text, $match, PREG_SET_ORDER) ) {
foreach ($match as $m) {
if (!empty($m[1]))
$atts[strtolower($m[1])] = stripcslashes($m[2]);
elseif (!empty($m[3]))
$atts[strtolower($m[3])] = stripcslashes($m[4]);
elseif (!empty($m[5]))
$atts[strtolower($m[5])] = stripcslashes($m[6]);
elseif (isset($m[7]) && strlen($m[7]))
$atts[] = stripcslashes($m[7]);
elseif (isset($m[8]))
$atts[] = stripcslashes($m[8]);
}
// Reject any unclosed HTML elements
foreach( $atts as &$value ) {
if ( false !== strpos( $value, '<' ) ) {
if ( 1 !== preg_match( '/^[^<]*+(?:<[^>]*+>[^<]*+)*+$/', $value ) ) {
$value = '';
}
}
}
} else {
$atts = ltrim($text);
}
return $atts;
}
var_dump(shortcode_parse_atts(':http://localhost:8888/lusa/audio/1310seg02.mp3'));
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Output for 7.0.0 - 7.0.33 , 7.1.0 - 7.1.33 , 7.2.0 - 7.2.33 , 7.3.0 - 7.3.33 , 7.4.0 - 7.4.33 , 8.0.0 - 8.0.30 , 8.1.0 - 8.1.28 , 8.2.0 - 8.2.19 , 8.3.0 - 8.3.7 Fatal error: Uncaught Error: Call to undefined function get_shortcode_atts_regex() in /in/0rY1W:4
Stack trace:
#0 /in/0rY1W(34): shortcode_parse_atts(':http://localho...')
#1 {main}
thrown in /in/0rY1W on line 4
Process exited with code 255 . Output for 5.5.0 - 5.5.38 , 5.6.0 - 5.6.40 Fatal error: Call to undefined function get_shortcode_atts_regex() in /in/0rY1W on line 4
Process exited with code 255 . preferences:dark mode live preview
218.96 ms | 402 KiB | 332 Q