Changeset 34745 for trunk/src/wp-includes/shortcodes.php
- Timestamp:
- 10/01/2015 05:33:58 PM (10 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/shortcodes.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/shortcodes.php
r34744 r34745 89 89 function add_shortcode($tag, $func) { 90 90 global $shortcode_tags; 91 92 if ( '' == trim( $tag ) ) { 93 $message = __( 'Invalid shortcode name. Empty name given.' ); 94 _doing_it_wrong( __FUNCTION__, $message, '4.4.0' ); 95 return; 96 } 97 98 if ( 0 !== preg_match( '@[<>&/\[\]\x00-\x20]@', $tag ) ) { 99 $message = sprintf( __( 'Invalid shortcode name: %s Do not use spaces or reserved chars: & / < > [ ]' ), $tag ); 100 _doing_it_wrong( __FUNCTION__, $message, '4.4.0' ); 101 return; 102 } 103 91 104 $shortcode_tags[ $tag ] = $func; 92 105 }
Note: See TracChangeset
for help on using the changeset viewer.