Changeset 51154 for trunk/src/wp-includes/shortcodes.php
- Timestamp:
- 06/15/2021 03:21:50 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/shortcodes.php
r49963 r51154 65 65 66 66 if ( '' === trim( $tag ) ) { 67 $message = __( 'Invalid shortcode name: Empty name given.' ); 68 _doing_it_wrong( __FUNCTION__, $message, '4.4.0' ); 67 _doing_it_wrong( 68 __FUNCTION__, 69 __( 'Invalid shortcode name: Empty name given.' ), 70 '4.4.0' 71 ); 69 72 return; 70 73 } 71 74 72 75 if ( 0 !== preg_match( '@[<>&/\[\]\x00-\x20=]@', $tag ) ) { 73 /* translators: 1: Shortcode name, 2: Space-separated list of reserved characters. */ 74 $message = sprintf( __( 'Invalid shortcode name: %1$s. Do not use spaces or reserved characters: %2$s' ), $tag, '& / < > [ ] =' ); 75 _doing_it_wrong( __FUNCTION__, $message, '4.4.0' ); 76 _doing_it_wrong( 77 __FUNCTION__, 78 sprintf( 79 /* translators: 1: Shortcode name, 2: Space-separated list of reserved characters. */ 80 __( 'Invalid shortcode name: %1$s. Do not use spaces or reserved characters: %2$s' ), 81 $tag, 82 '& / < > [ ] =' 83 ), 84 '4.4.0' 85 ); 76 86 return; 77 87 } … … 315 325 316 326 if ( ! is_callable( $shortcode_tags[ $tag ] ) ) { 317 /* translators: %s: Shortcode tag. */ 318 $message = sprintf( __( 'Attempting to parse a shortcode without a valid callback: %s' ), $tag ); 319 _doing_it_wrong( __FUNCTION__, $message, '4.3.0' ); 327 _doing_it_wrong( 328 __FUNCTION__, 329 /* translators: %s: Shortcode tag. */ 330 sprintf( __( 'Attempting to parse a shortcode without a valid callback: %s' ), $tag ), 331 '4.3.0' 332 ); 320 333 return $m[0]; 321 334 }
Note: See TracChangeset
for help on using the changeset viewer.