mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
Coding Standards: Use more meaningful variable names for output in the admin.
This renames some variables for clarity, per the [https://developer.wordpress.org/coding-standards/wordpress-coding-standards/php/#naming-conventions Naming Conventions]: > Don’t abbreviate variable names unnecessarily; let the code be unambiguous and self-documenting. * `$out` is renamed to `$output` in various list table methods and admin functions. * `$sep` is renamed to `$separator` in various list table methods and admin functions. This affects: * `WP_Comments_List_Table::handle_row_actions()` * `WP_List_Table::row_actions()` * `WP_Media_List_Table::column_default()` * `WP_MS_Sites_List_Table::site_states()` * `WP_MS_Users_List_Table::column_blogs()` * `WP_Terms_List_Table::column_name()` * `_wp_dashboard_recent_comments_row()` * `image_align_input_fields()` * `image_size_input_fields()` * `wp_doc_link_parse()` * `_post_states()` * `_media_states()` Follow-up to [8653], [8692], [8864], [8910], [8911], [8916], [9103], [9153], [10607], [15491], [17793], [32644], [54070]. Props mukesh27, costdev. See #56448, #55647. git-svn-id: https://develop.svn.wordpress.org/trunk@54071 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -2168,9 +2168,9 @@ function _post_states( $post, $display = true ) {
|
||||
foreach ( $post_states as $state ) {
|
||||
++$i;
|
||||
|
||||
$sep = ( $i < $state_count ) ? ', ' : '';
|
||||
$separator = ( $i < $state_count ) ? ', ' : '';
|
||||
|
||||
$post_states_string .= "<span class='post-state'>$state$sep</span>";
|
||||
$post_states_string .= "<span class='post-state'>{$state}{$separator}</span>";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2282,9 +2282,9 @@ function _media_states( $post, $display = true ) {
|
||||
foreach ( $media_states as $state ) {
|
||||
++$i;
|
||||
|
||||
$sep = ( $i < $state_count ) ? ', ' : '';
|
||||
$separator = ( $i < $state_count ) ? ', ' : '';
|
||||
|
||||
$media_states_string .= "<span class='post-state'>$state$sep</span>";
|
||||
$media_states_string .= "<span class='post-state'>{$state}{$separator}</span>";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user