This mapping has 1 multi-map group: several pairings are equally correct there. The code view shows one arbitrary valid pairing, not the only one.

Before

…lines 1–1130 unchanged (1130 lines)
1131 * @param array $data The $_POST data sent.
1132 * @param string $screen_id The screen ID.
1133 * @return array The Heartbeat response.
1134 */
1135function wp_check_locked_posts( $response, $data, $screen_id ) {
1136 $checked = array();
1137
1138 if ( array_key_exists( 'wp-check-locked-posts', $data ) && is_array( $data['wp-check-locked-posts'] ) ) {
1139 foreach ( $data['wp-check-locked-posts'] as $key ) {
1140 $post_id = absint( substr( $key, 5 ) );
1141
1142 if ( ! $post_id ) {
1143 continue;
1144 }
1145
1146 $user_id = wp_check_post_lock( $post_id );
1147
1148 if ( $user_id ) {
1149 $user = get_userdata( $user_id );
1150
1151 if ( $user && current_user_can( 'edit_post', $post_id ) ) {
1152 $send = array(
1153 'name' => $user->display_name,
1154 /* translators: %s: User's display name. */
1155 'text' => sprintf( __( '%s is currently editing' ), $user->display_name ),
1156 );
1157
1158 if ( get_option( 'show_avatars' ) ) {
1159 $send['avatar_src'] = get_avatar_url( $user->ID, array( 'size' => 18 ) );
1160 $send['avatar_src_2x'] = get_avatar_url( $user->ID, array( 'size' => 36 ) );
1161 }
1162
1163 $checked[ $key ] = $send;
1164 }
1165 }
1166 }
1167 }
…lines 1168–1637 unchanged (470 lines)

After

…lines 1–1130 unchanged (1130 lines)
1131 * @param array $data The $_POST data sent.
1132 * @param string $screen_id The screen ID.
1133 * @return array The Heartbeat response.
1134 */
1135function wp_check_locked_posts( $response, $data, $screen_id ) {
1136 $checked = array();
1137 $is_rtc_enabled = (bool) get_option( 'wp_collaboration_enabled' );
1138
1139 if ( array_key_exists( 'wp-check-locked-posts', $data ) && is_array( $data['wp-check-locked-posts'] ) ) {
1140 foreach ( $data['wp-check-locked-posts'] as $key ) {
1141 $post_id = absint( substr( $key, 5 ) );
1142
1143 if ( ! $post_id ) {
1144 continue;
1145 }
1146
1147 $user_id = wp_check_post_lock( $post_id );
1148
1149 if ( $user_id ) {
1150 $user = get_userdata( $user_id );
1151
1152 if ( $user && current_user_can( 'edit_post', $post_id ) ) {
1153 if ( $is_rtc_enabled ) {
1154 $send = array(
1155 /* translators: Collaboration status message for a singular post in the post list. Can be any type of post. */
1156 'text' => _x( 'Currently being edited', 'post list' ),
1157 'collaborative' => true,
1158 );
1159 } else {
1160 $send = array(
1161 'name' => $user->display_name,
1162 /* translators: %s: User's display name. */
1163 'text' => sprintf( __( '%s is currently editing' ), $user->display_name ),
1164 );
1165
1166 if ( get_option( 'show_avatars' ) ) {
1167 $send['avatar_src'] = get_avatar_url( $user->ID, array( 'size' => 18 ) );
1168 $send['avatar_src_2x'] = get_avatar_url( $user->ID, array( 'size' => 36 ) );
1169 }
1170 }
1171
1172 $checked[ $key ] = $send;
1173 }
1174 }
1175 }
1176 }
…lines 1177–1646 unchanged (470 lines)

Before

program
php_tag "<?php"
comment "/**\n * Misc WordPress Administration API.\n *\n * @package Wor"...
comment "/**\n * Returns whether the server is running Apache with the"...
function_definition (+48 nodes collapsed)
comment "/**\n * Returns whether the server supports URL rewriting.\n *"...
function_definition (+74 nodes collapsed)
comment "/**\n * Extracts strings from between the BEGIN and END marke"...
function_definition (+243 nodes collapsed)
comment "/**\n * Inserts an array of strings into a file (.htaccess), "...
function_definition (+962 nodes collapsed)
comment "/**\n * Updates the htaccess file with the current rules if i"...
function_definition (+193 nodes collapsed)
comment "/**\n * Updates the IIS web.config file with the current rule"...
function_definition (+210 nodes collapsed)
comment "/**\n * Updates the \"recently-edited\" file for the plugin or "...
function_definition (+172 nodes collapsed)
comment "/**\n * Makes a tree structure for the theme file editor's fi"...
function_definition (+123 nodes collapsed)
comment "/**\n * Outputs the formatted file list for the theme file ed"...
function_definition (+616 nodes collapsed)
comment "/**\n * Makes a tree structure for the plugin file editor's f"...
function_definition (+135 nodes collapsed)
comment "/**\n * Outputs the formatted file list for the plugin file e"...
function_definition (+555 nodes collapsed)
comment "/**\n * Flushes rewrite rules if `siteurl`, `home` or `page_o"...
function_definition (+78 nodes collapsed)
comment "/**\n * Resets global variables based on `$_GET` and `$_POST`"...
function_definition (+143 nodes collapsed)
comment "/**\n * Displays the given administration message.\n *\n * @sin"...
function_definition (+144 nodes collapsed)
comment "/**\n * @since 2.8.0\n *\n * @param string $content\n * @return "...
function_definition (+568 nodes collapsed)
comment "/**\n * Saves option for number of rows when listing posts, p"...
function_definition (+780 nodes collapsed)
comment "/**\n * Checks if rewrite rule for WordPress already exists i"...
function_definition (+175 nodes collapsed)
comment "/**\n * Deletes WordPress rewrite rule from web.config file i"...
function_definition (+256 nodes collapsed)
comment "/**\n * Adds WordPress rewrite rule to the IIS 7+ configurati"...
function_definition (+760 nodes collapsed)
comment "/**\n * Saves the XML document into a file.\n *\n * @since 2.8."...
function_definition (+118 nodes collapsed)
comment "/**\n * Displays the default administration color scheme pick"...
function_definition (+461 nodes collapsed)
comment "/**\n *\n * @since 3.8.0\n *\n * @global array $_wp_admin_css_co"...
function_definition (+254 nodes collapsed)
comment "/**\n * Displays the viewport meta in the admin.\n *\n * @since"...
function_definition (+77 nodes collapsed)
comment "/**\n * Adds viewport meta for mobile in Customizer.\n *\n * Ho"...
function_definition (+37 nodes collapsed)
comment "/**\n * Checks lock status for posts displayed on the Posts s"...
function_definition
function "function"
name "wp_check_locked_posts"
formal_parameters
( "("
simple_parameter
variable_name
$ "$"
name "response"
, ","
simple_parameter
variable_name
$ "$"
name "data"
, ","
simple_parameter
variable_name
$ "$"
name "screen_id"
) ")"
compound_statement
{ "{"
expression_statement
assignment_expression
variable_name
$ "$"
name "checked"
= "="
array_creation_expression
array "array"
( "("
) ")"
; ";"
if_statement
if "if"
parenthesized_expression (+36 nodes collapsed)
compound_statement
{ "{"
foreach_statement
foreach "foreach"
( "("
subscript_expression
variable_name
$ "$"
name "data"
[ "["
string
' "'"
string_content "wp-check-locked-posts"
' "'"
] "]"
as "as"
variable_name
$ "$"
name "key"
) ")"
compound_statement
{ "{"
expression_statement (+25 nodes collapsed)
if_statement
if "if"
parenthesized_expression
( "("
unary_op_expression
! "!"
variable_name
$ "$"
name "post_id"
) ")"
compound_statement
{ "{"
continue_statement
continue "continue"
; ";"
} "}"
expression_statement
assignment_expression
variable_name
$ "$"
name "user_id"
= "="
function_call_expression
name "wp_check_post_lock"
arguments
( "("
argument
variable_name
$ "$"
name "post_id"
) ")"
; ";"
if_statement
if "if"
parenthesized_expression
( "("
variable_name
$ "$"
name "user_id"
) ")"
compound_statement
{ "{"
expression_statement
assignment_expression
variable_name
$ "$"
name "user"
= "="
function_call_expression
name "get_userdata"
arguments
( "("
argument
variable_name
$ "$"
name "user_id"
) ")"
; ";"
if_statement
if "if"
parenthesized_expression (+23 nodes collapsed)
compound_statement any 1:2
{ "{"
expression_statement (+56 nodes collapsed)
if_statement (+96 nodes collapsed)
expression_statement
assignment_expression
subscript_expression
variable_name
$ "$"
name "checked"
[ "["
variable_name
$ "$"
name "key"
] "]"
= "="
variable_name
$ "$"
name "send"
; ";"
} "}"
} "}"
} "}"
} "}"
if_statement (+36 nodes collapsed)
return_statement
return "return"
variable_name
$ "$"
name "response"
; ";"
} "}"
comment "/**\n * Checks lock status on the New/Edit Post screen and re"...
function_definition (+443 nodes collapsed)
comment "/**\n * Checks nonce expiration on the New/Edit Post screen a"...
function_definition (+286 nodes collapsed)
comment "/**\n * Refresh nonces used with meta boxes in the block edit"...
function_definition (+210 nodes collapsed)
comment "/**\n * Adds the latest Heartbeat and REST API nonce to the H"...
function_definition (+69 nodes collapsed)
comment "/**\n * Disables suspension of Heartbeat on the Add/Edit Post"...
function_definition (+71 nodes collapsed)
comment "/**\n * Performs autosave with heartbeat.\n *\n * @since 3.9.0\n"...
function_definition (+276 nodes collapsed)
comment "/**\n * Removes single-use URL parameters and create canonica"...
function_definition (+147 nodes collapsed)
comment "/**\n * Outputs JS that reloads the page if the user navigate"...
function_definition
function "function"
name "wp_page_reload_on_back_button_js"
formal_parameters
( "("
) ")"
compound_statement
{ "{"
text_interpolation
php_end_tag "?>"
text "<script>\n\t\tif ( typeof performance !== 'undefined' && perfor"...
php_tag "<?php"
} "}"
comment "/**\n * Sends a confirmation request email when a change of s"...
function_definition (+554 nodes collapsed)
comment "/**\n * Appends '(Draft)' to draft page titles in the privacy"...
function_definition (+89 nodes collapsed)
comment "/**\n * Checks if the user needs to update PHP.\n *\n * @since "...
function_definition (+431 nodes collapsed)

After

program
php_tag "<?php"
comment "/**\n * Misc WordPress Administration API.\n *\n * @package Wor"...
comment "/**\n * Returns whether the server is running Apache with the"...
function_definition (+48 nodes collapsed)
comment "/**\n * Returns whether the server supports URL rewriting.\n *"...
function_definition (+74 nodes collapsed)
comment "/**\n * Extracts strings from between the BEGIN and END marke"...
function_definition (+243 nodes collapsed)
comment "/**\n * Inserts an array of strings into a file (.htaccess), "...
function_definition (+962 nodes collapsed)
comment "/**\n * Updates the htaccess file with the current rules if i"...
function_definition (+193 nodes collapsed)
comment "/**\n * Updates the IIS web.config file with the current rule"...
function_definition (+210 nodes collapsed)
comment "/**\n * Updates the \"recently-edited\" file for the plugin or "...
function_definition (+172 nodes collapsed)
comment "/**\n * Makes a tree structure for the theme file editor's fi"...
function_definition (+123 nodes collapsed)
comment "/**\n * Outputs the formatted file list for the theme file ed"...
function_definition (+616 nodes collapsed)
comment "/**\n * Makes a tree structure for the plugin file editor's f"...
function_definition (+135 nodes collapsed)
comment "/**\n * Outputs the formatted file list for the plugin file e"...
function_definition (+555 nodes collapsed)
comment "/**\n * Flushes rewrite rules if `siteurl`, `home` or `page_o"...
function_definition (+78 nodes collapsed)
comment "/**\n * Resets global variables based on `$_GET` and `$_POST`"...
function_definition (+143 nodes collapsed)
comment "/**\n * Displays the given administration message.\n *\n * @sin"...
function_definition (+144 nodes collapsed)
comment "/**\n * @since 2.8.0\n *\n * @param string $content\n * @return "...
function_definition (+568 nodes collapsed)
comment "/**\n * Saves option for number of rows when listing posts, p"...
function_definition (+780 nodes collapsed)
comment "/**\n * Checks if rewrite rule for WordPress already exists i"...
function_definition (+175 nodes collapsed)
comment "/**\n * Deletes WordPress rewrite rule from web.config file i"...
function_definition (+256 nodes collapsed)
comment "/**\n * Adds WordPress rewrite rule to the IIS 7+ configurati"...
function_definition (+760 nodes collapsed)
comment "/**\n * Saves the XML document into a file.\n *\n * @since 2.8."...
function_definition (+118 nodes collapsed)
comment "/**\n * Displays the default administration color scheme pick"...
function_definition (+461 nodes collapsed)
comment "/**\n *\n * @since 3.8.0\n *\n * @global array $_wp_admin_css_co"...
function_definition (+254 nodes collapsed)
comment "/**\n * Displays the viewport meta in the admin.\n *\n * @since"...
function_definition (+77 nodes collapsed)
comment "/**\n * Adds viewport meta for mobile in Customizer.\n *\n * Ho"...
function_definition (+37 nodes collapsed)
comment "/**\n * Checks lock status for posts displayed on the Posts s"...
function_definition
function "function"
name "wp_check_locked_posts"
formal_parameters
( "("
simple_parameter
variable_name
$ "$"
name "response"
, ","
simple_parameter
variable_name
$ "$"
name "data"
, ","
simple_parameter
variable_name
$ "$"
name "screen_id"
) ")"
compound_statement
{ "{"
expression_statement
assignment_expression
variable_name
$ "$"
name "checked"
= "="
array_creation_expression
array "array"
( "("
) ")"
; ";"
expression_statement
assignment_expression
variable_name
$ "$"
name "is_rtc_enabled"
= "="
cast_expression
( "("
cast_type "bool"
) ")"
function_call_expression
name "get_option"
arguments
( "("
argument
string
' "'"
string_content "wp_collaboration_enabled"
' "'"
) ")"
; ";"
if_statement
if "if"
parenthesized_expression (+36 nodes collapsed)
compound_statement
{ "{"
foreach_statement
foreach "foreach"
( "("
subscript_expression
variable_name
$ "$"
name "data"
[ "["
string
' "'"
string_content "wp-check-locked-posts"
' "'"
] "]"
as "as"
variable_name
$ "$"
name "key"
) ")"
compound_statement
{ "{"
expression_statement (+25 nodes collapsed)
if_statement
if "if"
parenthesized_expression
( "("
unary_op_expression
! "!"
variable_name
$ "$"
name "post_id"
) ")"
compound_statement
{ "{"
continue_statement
continue "continue"
; ";"
} "}"
expression_statement
assignment_expression
variable_name
$ "$"
name "user_id"
= "="
function_call_expression
name "wp_check_post_lock"
arguments
( "("
argument
variable_name
$ "$"
name "post_id"
) ")"
; ";"
if_statement
if "if"
parenthesized_expression
( "("
variable_name
$ "$"
name "user_id"
) ")"
compound_statement
{ "{"
expression_statement
assignment_expression
variable_name
$ "$"
name "user"
= "="
function_call_expression
name "get_userdata"
arguments
( "("
argument
variable_name
$ "$"
name "user_id"
) ")"
; ";"
if_statement
if "if"
parenthesized_expression (+23 nodes collapsed)
compound_statement any 1:2
{ "{"
if_statement
if "if"
parenthesized_expression
( "("
variable_name
$ "$"
name "is_rtc_enabled"
) ")"
compound_statement
{ "{"
expression_statement
assignment_expression
variable_name
$ "$"
name "send"
= "="
array_creation_expression
array "array"
( "("
comment "/* translators: Collaboration status message for a singular "...
array_element_initializer
string
' "'"
string_content "text"
' "'"
=> "=>"
function_call_expression
name "_x"
arguments
( "("
argument
string
' "'"
string_content "Currently being edited"
' "'"
, ","
argument
string
' "'"
string_content "post list"
' "'"
) ")"
, ","
array_element_initializer
string
' "'"
string_content "collaborative"
' "'"
=> "=>"
boolean "true"
, ","
) ")"
; ";"
} "}"
else_clause
else "else"
compound_statement any 1:2
{ "{"
expression_statement (+56 nodes collapsed)
if_statement (+96 nodes collapsed)
} "}"
expression_statement
assignment_expression
subscript_expression
variable_name
$ "$"
name "checked"
[ "["
variable_name
$ "$"
name "key"
] "]"
= "="
variable_name
$ "$"
name "send"
; ";"
} "}"
} "}"
} "}"
} "}"
if_statement (+36 nodes collapsed)
return_statement
return "return"
variable_name
$ "$"
name "response"
; ";"
} "}"
comment "/**\n * Checks lock status on the New/Edit Post screen and re"...
function_definition (+443 nodes collapsed)
comment "/**\n * Checks nonce expiration on the New/Edit Post screen a"...
function_definition (+286 nodes collapsed)
comment "/**\n * Refresh nonces used with meta boxes in the block edit"...
function_definition (+210 nodes collapsed)
comment "/**\n * Adds the latest Heartbeat and REST API nonce to the H"...
function_definition (+69 nodes collapsed)
comment "/**\n * Disables suspension of Heartbeat on the Add/Edit Post"...
function_definition (+71 nodes collapsed)
comment "/**\n * Performs autosave with heartbeat.\n *\n * @since 3.9.0\n"...
function_definition (+276 nodes collapsed)
comment "/**\n * Removes single-use URL parameters and create canonica"...
function_definition (+147 nodes collapsed)
comment "/**\n * Outputs JS that reloads the page if the user navigate"...
function_definition
function "function"
name "wp_page_reload_on_back_button_js"
formal_parameters
( "("
) ")"
compound_statement
{ "{"
text_interpolation
php_end_tag "?>"
text "<script>\n\t\tif ( typeof performance !== 'undefined' && perfor"...
php_tag "<?php"
} "}"
comment "/**\n * Sends a confirmation request email when a change of s"...
function_definition (+554 nodes collapsed)
comment "/**\n * Appends '(Draft)' to draft page titles in the privacy"...
function_definition (+89 nodes collapsed)
comment "/**\n * Checks if the user needs to update PHP.\n *\n * @since "...
function_definition (+431 nodes collapsed)