mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
I18N: Add translator comments to three _doing_it_wrong() messages added for 4.3 and 4.4.
Also adds a full-stop to an invalid taxonomy message introduced in [34745] and later modified in [35428] for `wp_insert_post()`. Props pavelevap. Fixes #34249. git-svn-id: https://develop.svn.wordpress.org/trunk@35542 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -3235,7 +3235,8 @@ function wp_insert_post( $postarr, $wp_error = false ) {
|
||||
foreach ( $postarr['tax_input'] as $taxonomy => $tags ) {
|
||||
$taxonomy_obj = get_taxonomy($taxonomy);
|
||||
if ( ! $taxonomy_obj ) {
|
||||
_doing_it_wrong( __FUNCTION__, sprintf( __( 'Invalid taxonomy: %s' ), $taxonomy ), '4.4.0' );
|
||||
/* translators: 1: taxonomy name */
|
||||
_doing_it_wrong( __FUNCTION__, sprintf( __( 'Invalid taxonomy: %s.' ), $taxonomy ), '4.4.0' );
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -96,6 +96,7 @@ function add_shortcode($tag, $func) {
|
||||
}
|
||||
|
||||
if ( 0 !== preg_match( '@[<>&/\[\]\x00-\x20]@', $tag ) ) {
|
||||
/* translators 1: shortcode name */
|
||||
$message = sprintf( __( 'Invalid shortcode name: %s. Do not use spaces or reserved characters: & / < > [ ]' ), $tag );
|
||||
_doing_it_wrong( __FUNCTION__, $message, '4.4.0' );
|
||||
return;
|
||||
@@ -314,6 +315,7 @@ function do_shortcode_tag( $m ) {
|
||||
$attr = shortcode_parse_atts( $m[3] );
|
||||
|
||||
if ( ! is_callable( $shortcode_tags[ $tag ] ) ) {
|
||||
/* translators: 1: shortcode tag */
|
||||
$message = sprintf( __( 'Attempting to parse a shortcode without a valid callback: %s' ), $tag );
|
||||
_doing_it_wrong( __FUNCTION__, $message, '4.3.0' );
|
||||
return $m[0];
|
||||
|
||||
Reference in New Issue
Block a user