mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 15:50:09 +00:00
Coding Standards: Replace alias PHP functions with the canonical names.
Using the canonical function name for PHP functions is strongly recommended, as aliases may be deprecated or removed without (much) warning. This replaces all uses of the following: * `join()` with `implode()` * `sizeof()` with `count()` * `is_writeable()` with `is_writable()` * `doubleval()` with a `(float)` cast In part, this is a follow-up to #47746. Props jrf. See #50767. git-svn-id: https://develop.svn.wordpress.org/trunk@49193 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1118,7 +1118,7 @@ function image_align_input_fields( $post, $checked = '' ) {
|
||||
" /><label for='image-align-{$name}-{$post->ID}' class='align image-align-{$name}-label'>$label</label>";
|
||||
}
|
||||
|
||||
return join( "\n", $out );
|
||||
return implode( "\n", $out );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1195,7 +1195,7 @@ function image_size_input_fields( $post, $check = '' ) {
|
||||
return array(
|
||||
'label' => __( 'Size' ),
|
||||
'input' => 'html',
|
||||
'html' => join( "\n", $out ),
|
||||
'html' => implode( "\n", $out ),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1424,7 +1424,7 @@ function get_attachment_fields_to_edit( $post, $errors = null ) {
|
||||
$values[] = $term->slug;
|
||||
}
|
||||
|
||||
$t['value'] = join( ', ', $values );
|
||||
$t['value'] = implode( ', ', $values );
|
||||
|
||||
$form_fields[ $taxonomy ] = $t;
|
||||
}
|
||||
@@ -1784,7 +1784,7 @@ function get_media_item( $attachment_id, $args = null ) {
|
||||
}
|
||||
|
||||
if ( ! empty( $field['helps'] ) ) {
|
||||
$item .= "<p class='help'>" . join( "</p>\n<p class='help'>", array_unique( (array) $field['helps'] ) ) . '</p>';
|
||||
$item .= "<p class='help'>" . implode( "</p>\n<p class='help'>", array_unique( (array) $field['helps'] ) ) . '</p>';
|
||||
}
|
||||
$item .= "</td>\n\t\t</tr>\n";
|
||||
|
||||
@@ -1883,7 +1883,7 @@ function get_compat_media_markup( $attachment_id, $args = null ) {
|
||||
$values[] = $term->slug;
|
||||
}
|
||||
|
||||
$t['value'] = join( ', ', $values );
|
||||
$t['value'] = implode( ', ', $values );
|
||||
$t['taxonomy'] = true;
|
||||
|
||||
$form_fields[ $taxonomy ] = $t;
|
||||
@@ -1976,7 +1976,7 @@ function get_compat_media_markup( $attachment_id, $args = null ) {
|
||||
}
|
||||
|
||||
if ( ! empty( $field['helps'] ) ) {
|
||||
$item .= "<p class='help'>" . join( "</p>\n<p class='help'>", array_unique( (array) $field['helps'] ) ) . '</p>';
|
||||
$item .= "<p class='help'>" . implode( "</p>\n<p class='help'>", array_unique( (array) $field['helps'] ) ) . '</p>';
|
||||
}
|
||||
|
||||
$item .= "</td>\n\t\t</tr>\n";
|
||||
|
||||
Reference in New Issue
Block a user