Reverse order shortcode
-
Hi,
Wanted to reverse the order of a shortcode, does anyone know what the default order is within this function? And is there a way to reverse the order inside this function?
Example now:
1
2
3
4
5
6Wanted result
6
5
4
3
2
1add_shortcode( 'pers', function ( $atts, $content=NULL ) { extract(shortcode_atts(array( 'position' => '', 'content' => '' ), $atts ) ); return esc_attr($position) . ': ' . esc_attr($content); }); // Example usage: // [pers position="1" content="something here"]
Thanks
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Reverse order shortcode’ is closed to new replies.