Make WordPress Core

Ticket #50767: 50767-dont-use-alias-functions.patch

File 50767-dont-use-alias-functions.patch, 56.7 KB (added by jrf, 4 years ago)

QA: don't use alias functions 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

  • src/wp-admin/edit-comments.php

    From 802ef884981a1f1b3c7c470fc2183b9bcb375ffd Mon Sep 17 00:00:00 2001
    From: jrfnl <jrfnl@users.noreply.github.com>
    Date: Sun, 18 Oct 2020 07:17:43 +0200
    Subject: [PATCH] QA: don't use alias functions
    
    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
    ---
     src/wp-admin/edit-comments.php                 |  2 +-
     src/wp-admin/edit.php                          |  4 ++--
     src/wp-admin/includes/ajax-actions.php         |  2 +-
     .../includes/class-wp-comments-list-table.php  |  2 +-
     src/wp-admin/includes/class-wp-importer.php    |  2 +-
     src/wp-admin/includes/class-wp-list-table.php  |  4 ++--
     .../includes/class-wp-media-list-table.php     |  2 +-
     .../includes/class-wp-posts-list-table.php     |  2 +-
     src/wp-admin/includes/class-wp-site-health.php |  4 ++--
     src/wp-admin/includes/export.php               |  2 +-
     src/wp-admin/includes/file.php                 |  2 +-
     src/wp-admin/includes/media.php                | 12 ++++++------
     src/wp-admin/includes/misc.php                 |  2 +-
     src/wp-admin/includes/revision.php             |  2 +-
     src/wp-admin/includes/taxonomy.php             |  2 +-
     src/wp-admin/includes/upgrade.php              |  2 +-
     src/wp-admin/link.php                          |  2 +-
     src/wp-admin/menu-header.php                   |  4 ++--
     src/wp-admin/network/themes.php                |  2 +-
     src/wp-admin/plugin-editor.php                 |  6 +++---
     src/wp-admin/plugins.php                       |  2 +-
     src/wp-admin/theme-editor.php                  |  4 ++--
     src/wp-admin/upload.php                        |  2 +-
     .../twentytwenty/inc/starter-content.php       |  2 +-
     src/wp-includes/bookmark-template.php          |  2 +-
     src/wp-includes/category-template.php          |  6 +++---
     src/wp-includes/class-walker-nav-menu.php      |  4 ++--
     src/wp-includes/class-wp-customize-manager.php |  2 +-
     src/wp-includes/class-wp-query.php             | 16 ++++++++--------
     .../class-wp-text-diff-renderer-table.php      |  2 +-
     src/wp-includes/class-wp-user-query.php        |  2 +-
     src/wp-includes/comment-template.php           |  2 +-
     src/wp-includes/comment.php                    |  2 +-
     src/wp-includes/compat.php                     |  2 +-
     src/wp-includes/embed.php                      |  6 +++---
     src/wp-includes/formatting.php                 |  8 ++++----
     src/wp-includes/functions.php                  | 10 +++++-----
     src/wp-includes/general-template.php           |  4 ++--
     src/wp-includes/l10n.php                       |  2 +-
     src/wp-includes/media.php                      |  6 +++---
     src/wp-includes/meta.php                       |  2 +-
     src/wp-includes/ms-network.php                 |  2 +-
     src/wp-includes/ms-site.php                    |  2 +-
     src/wp-includes/pluggable.php                  |  2 +-
     src/wp-includes/post-template.php              |  4 ++--
     src/wp-includes/post.php                       |  4 ++--
     src/wp-includes/shortcodes.php                 |  2 +-
     src/wp-includes/taxonomy.php                   |  6 +++---
     src/wp-includes/theme.php                      |  2 +-
     .../widgets/class-wp-widget-custom-html.php    |  2 +-
     .../widgets/class-wp-widget-media-image.php    |  2 +-
     .../widgets/class-wp-widget-media.php          |  4 ++--
     tests/phpunit/includes/utils.php               |  6 +++---
     tests/phpunit/tests/customize/manager.php      |  2 +-
     tests/phpunit/tests/db.php                     |  2 +-
     tests/phpunit/tests/formatting/Autop.php       | 18 +++++++++---------
     tests/phpunit/tests/media.php                  |  8 ++++----
     tests/phpunit/tests/post/bodyClass.php         |  4 ++--
     tests/phpunit/tests/post/postClass.php         |  4 ++--
     tests/phpunit/tests/post/template.php          |  2 +-
     .../tests/widgets/media-gallery-widget.php     |  2 +-
     61 files changed, 115 insertions(+), 115 deletions(-)
    
    diff --git a/src/wp-admin/edit-comments.php b/src/wp-admin/edit-comments.php
    index c2a16eef0b..0dde8df01a 100644
    a b if ( $doaction ) { 
    120120                $redirect_to = add_query_arg( 'deleted', $deleted, $redirect_to );
    121121        }
    122122        if ( $trashed || $spammed ) {
    123                 $redirect_to = add_query_arg( 'ids', join( ',', $comment_ids ), $redirect_to );
     123                $redirect_to = add_query_arg( 'ids', implode( ',', $comment_ids ), $redirect_to );
    124124        }
    125125
    126126        wp_safe_redirect( $redirect_to );
  • src/wp-admin/edit.php

    diff --git a/src/wp-admin/edit.php b/src/wp-admin/edit.php
    index bf54037451..40bc41c512 100644
    a b if ( $doaction ) { 
    126126                        $sendback = add_query_arg(
    127127                                array(
    128128                                        'trashed' => $trashed,
    129                                         'ids'     => join( ',', $post_ids ),
     129                                        'ids'     => implode( ',', $post_ids ),
    130130                                        'locked'  => $locked,
    131131                                ),
    132132                                $sendback
    foreach ( $bulk_counts as $message => $count ) { 
    442442}
    443443
    444444if ( $messages ) {
    445         echo '<div id="message" class="updated notice is-dismissible"><p>' . join( ' ', $messages ) . '</p></div>';
     445        echo '<div id="message" class="updated notice is-dismissible"><p>' . implode( ' ', $messages ) . '</p></div>';
    446446}
    447447unset( $messages );
    448448
  • src/wp-admin/includes/ajax-actions.php

    diff --git a/src/wp-admin/includes/ajax-actions.php b/src/wp-admin/includes/ajax-actions.php
    index f359732b15..6ff2d2d9fd 100644
    a b function wp_ajax_ajax_tag_search() { 
    162162                )
    163163        );
    164164
    165         echo join( "\n", $results );
     165        echo implode( "\n", $results );
    166166        wp_die();
    167167}
    168168
  • src/wp-admin/includes/class-wp-comments-list-table.php

    diff --git a/src/wp-admin/includes/class-wp-comments-list-table.php b/src/wp-admin/includes/class-wp-comments-list-table.php
    index 1c7ac384ae..563187ffe4 100644
    a b class WP_Comments_List_Table extends WP_List_Table { 
    615615                if ( ! $the_comment_class ) {
    616616                        $the_comment_class = '';
    617617                }
    618                 $the_comment_class = join( ' ', get_comment_class( $the_comment_class, $comment, $comment->comment_post_ID ) );
     618                $the_comment_class = implode( ' ', get_comment_class( $the_comment_class, $comment, $comment->comment_post_ID ) );
    619619
    620620                if ( $comment->comment_post_ID > 0 ) {
    621621                        $post = get_post( $comment->comment_post_ID );
  • src/wp-admin/includes/class-wp-importer.php

    diff --git a/src/wp-admin/includes/class-wp-importer.php b/src/wp-admin/includes/class-wp-importer.php
    index b60c783c90..d189061d5b 100644
    a b function get_cli_args( $param, $required = false ) { 
    291291        $last_arg = null;
    292292        $return   = null;
    293293
    294         $il = sizeof( $args );
     294        $il = count( $args );
    295295
    296296        for ( $i = 1, $il; $i < $il; $i++ ) {
    297297                if ( (bool) preg_match( '/^--(.+)/', $args[ $i ], $match ) ) {
  • src/wp-admin/includes/class-wp-list-table.php

    diff --git a/src/wp-admin/includes/class-wp-list-table.php b/src/wp-admin/includes/class-wp-list-table.php
    index 485338e630..5363cc9e98 100644
    a b class WP_List_Table { 
    947947                if ( ! empty( $infinite_scroll ) ) {
    948948                        $pagination_links_class .= ' hide-if-js';
    949949                }
    950                 $output .= "\n<span class='$pagination_links_class'>" . join( "\n", $page_links ) . '</span>';
     950                $output .= "\n<span class='$pagination_links_class'>" . implode( "\n", $page_links ) . '</span>';
    951951
    952952                if ( $total_pages ) {
    953953                        $page_class = $total_pages < 2 ? ' one-page' : '';
    class WP_List_Table { 
    12131213                        $id    = $with_id ? "id='$column_key'" : '';
    12141214
    12151215                        if ( ! empty( $class ) ) {
    1216                                 $class = "class='" . join( ' ', $class ) . "'";
     1216                                $class = "class='" . implode( ' ', $class ) . "'";
    12171217                        }
    12181218
    12191219                        echo "<$tag $scope $id $class>$column_display_name</$tag>";
  • src/wp-admin/includes/class-wp-media-list-table.php

    diff --git a/src/wp-admin/includes/class-wp-media-list-table.php b/src/wp-admin/includes/class-wp-media-list-table.php
    index e5988ed3c9..031f306987 100644
    a b class WP_Media_List_Table extends WP_List_Table { 
    614614                                        );
    615615                                }
    616616                                /* translators: Used between list items, there is a space after the comma. */
    617                                 echo join( __( ', ' ), $out );
     617                                echo implode( __( ', ' ), $out );
    618618                        } else {
    619619                                echo '<span aria-hidden="true">&#8212;</span><span class="screen-reader-text">' . get_taxonomy( $taxonomy )->labels->no_terms . '</span>';
    620620                        }
  • src/wp-admin/includes/class-wp-posts-list-table.php

    diff --git a/src/wp-admin/includes/class-wp-posts-list-table.php b/src/wp-admin/includes/class-wp-posts-list-table.php
    index 08e2ff58ec..67e7a279d4 100644
    a b class WP_Posts_List_Table extends WP_List_Table { 
    12191219                                $term_links = apply_filters( 'post_column_taxonomy_links', $term_links, $taxonomy, $terms );
    12201220
    12211221                                /* translators: Used between list items, there is a space after the comma. */
    1222                                 echo join( __( ', ' ), $term_links );
     1222                                echo implode( __( ', ' ), $term_links );
    12231223                        } else {
    12241224                                echo '<span aria-hidden="true">&#8212;</span><span class="screen-reader-text">' . $taxonomy_object->labels->no_terms . '</span>';
    12251225                        }
  • src/wp-admin/includes/class-wp-site-health.php

    diff --git a/src/wp-admin/includes/class-wp-site-health.php b/src/wp-admin/includes/class-wp-site-health.php
    index 6070a57b9b..aa9d794095 100644
    a b class WP_Site_Health { 
    18551855                        $hosts = explode( ',', WP_ACCESSIBLE_HOSTS );
    18561856                }
    18571857
    1858                 if ( $blocked && 0 === sizeof( $hosts ) ) {
     1858                if ( $blocked && 0 === count( $hosts ) ) {
    18591859                        $result['status'] = 'critical';
    18601860
    18611861                        $result['label'] = __( 'HTTP requests are blocked' );
    class WP_Site_Health { 
    18701870                        );
    18711871                }
    18721872
    1873                 if ( $blocked && 0 < sizeof( $hosts ) ) {
     1873                if ( $blocked && 0 < count( $hosts ) ) {
    18741874                        $result['status'] = 'recommended';
    18751875
    18761876                        $result['label'] = __( 'HTTP requests are partially blocked' );
  • src/wp-admin/includes/export.php

    diff --git a/src/wp-admin/includes/export.php b/src/wp-admin/includes/export.php
    index 03b7f4ccfa..74d7c5f823 100644
    a b function export_wp( $args = array() ) { 
    534534
    535535                // Fetch 20 posts at a time rather than loading the entire table into memory.
    536536                while ( $next_posts = array_splice( $post_ids, 0, 20 ) ) {
    537                         $where = 'WHERE ID IN (' . join( ',', $next_posts ) . ')';
     537                        $where = 'WHERE ID IN (' . implode( ',', $next_posts ) . ')';
    538538                        $posts = $wpdb->get_results( "SELECT * FROM {$wpdb->posts} $where" );
    539539
    540540                        // Begin Loop.
  • src/wp-admin/includes/file.php

    diff --git a/src/wp-admin/includes/file.php b/src/wp-admin/includes/file.php
    index 88ac0cae2f..cfb40529a6 100644
    a b function wp_edit_theme_plugin_file( $args ) { 
    489489
    490490        $previous_content = file_get_contents( $real_file );
    491491
    492         if ( ! is_writeable( $real_file ) ) {
     492        if ( ! is_writable( $real_file ) ) {
    493493                return new WP_Error( 'file_not_writable' );
    494494        }
    495495
  • src/wp-admin/includes/media.php

    diff --git a/src/wp-admin/includes/media.php b/src/wp-admin/includes/media.php
    index b23900961a..e2f21426dd 100644
    a b function image_align_input_fields( $post, $checked = '' ) { 
    11181118                        " /><label for='image-align-{$name}-{$post->ID}' class='align image-align-{$name}-label'>$label</label>";
    11191119        }
    11201120
    1121         return join( "\n", $out );
     1121        return implode( "\n", $out );
    11221122}
    11231123
    11241124/**
    function image_size_input_fields( $post, $check = '' ) { 
    11951195        return array(
    11961196                'label' => __( 'Size' ),
    11971197                'input' => 'html',
    1198                 'html'  => join( "\n", $out ),
     1198                'html'  => implode( "\n", $out ),
    11991199        );
    12001200}
    12011201
    function get_attachment_fields_to_edit( $post, $errors = null ) { 
    14241424                        $values[] = $term->slug;
    14251425                }
    14261426
    1427                 $t['value'] = join( ', ', $values );
     1427                $t['value'] = implode( ', ', $values );
    14281428
    14291429                $form_fields[ $taxonomy ] = $t;
    14301430        }
    function get_media_item( $attachment_id, $args = null ) { 
    17841784                }
    17851785
    17861786                if ( ! empty( $field['helps'] ) ) {
    1787                         $item .= "<p class='help'>" . join( "</p>\n<p class='help'>", array_unique( (array) $field['helps'] ) ) . '</p>';
     1787                        $item .= "<p class='help'>" . implode( "</p>\n<p class='help'>", array_unique( (array) $field['helps'] ) ) . '</p>';
    17881788                }
    17891789                $item .= "</td>\n\t\t</tr>\n";
    17901790
    function get_compat_media_markup( $attachment_id, $args = null ) { 
    18831883                                $values[] = $term->slug;
    18841884                        }
    18851885
    1886                         $t['value']    = join( ', ', $values );
     1886                        $t['value']    = implode( ', ', $values );
    18871887                        $t['taxonomy'] = true;
    18881888
    18891889                        $form_fields[ $taxonomy ] = $t;
    function get_compat_media_markup( $attachment_id, $args = null ) { 
    19761976                }
    19771977
    19781978                if ( ! empty( $field['helps'] ) ) {
    1979                         $item .= "<p class='help'>" . join( "</p>\n<p class='help'>", array_unique( (array) $field['helps'] ) ) . '</p>';
     1979                        $item .= "<p class='help'>" . implode( "</p>\n<p class='help'>", array_unique( (array) $field['helps'] ) ) . '</p>';
    19801980                }
    19811981
    19821982                $item .= "</td>\n\t\t</tr>\n";
  • src/wp-admin/includes/misc.php

    diff --git a/src/wp-admin/includes/misc.php b/src/wp-admin/includes/misc.php
    index 74ac6cec27..e13a46bc91 100644
    a b function insert_with_markers( $filename, $marker, $insertion ) { 
    121121                if ( $perms ) {
    122122                        chmod( $filename, $perms | 0644 );
    123123                }
    124         } elseif ( ! is_writeable( $filename ) ) {
     124        } elseif ( ! is_writable( $filename ) ) {
    125125                return false;
    126126        }
    127127
  • src/wp-admin/includes/revision.php

    diff --git a/src/wp-admin/includes/revision.php b/src/wp-admin/includes/revision.php
    index 52600dce06..7718a831e4 100644
    a b function wp_prepare_revisions_for_js( $post, $selected_revision_id, $from = null 
    275275         * If we only have one revision, the initial revision is missing; This happens
    276276         * when we have an autsosave and the user has clicked 'View the Autosave'
    277277         */
    278         if ( 1 === sizeof( $revisions ) ) {
     278        if ( 1 === count( $revisions ) ) {
    279279                $revisions[ $post->ID ] = array(
    280280                        'id'         => $post->ID,
    281281                        'title'      => get_the_title( $post->ID ),
  • src/wp-admin/includes/taxonomy.php

    diff --git a/src/wp-admin/includes/taxonomy.php b/src/wp-admin/includes/taxonomy.php
    index 7f7e60952c..de76917cd0 100644
    a b function get_terms_to_edit( $post_id, $taxonomy = 'post_tag' ) { 
    278278                $term_names[] = $term->name;
    279279        }
    280280
    281         $terms_to_edit = esc_attr( join( ',', $term_names ) );
     281        $terms_to_edit = esc_attr( implode( ',', $term_names ) );
    282282
    283283        /**
    284284         * Filters the comma-separated list of terms available to edit.
  • src/wp-admin/includes/upgrade.php

    diff --git a/src/wp-admin/includes/upgrade.php b/src/wp-admin/includes/upgrade.php
    index 0a65659492..f68ee0b9ff 100644
    a b function upgrade_130() { 
    11121112                        $limit    = $option->dupes - 1;
    11131113                        $dupe_ids = $wpdb->get_col( $wpdb->prepare( "SELECT option_id FROM $wpdb->options WHERE option_name = %s LIMIT %d", $option->option_name, $limit ) );
    11141114                        if ( $dupe_ids ) {
    1115                                 $dupe_ids = join( ',', $dupe_ids );
     1115                                $dupe_ids = implode( ',', $dupe_ids );
    11161116                                $wpdb->query( "DELETE FROM $wpdb->options WHERE option_id IN ($dupe_ids)" );
    11171117                        }
    11181118                }
  • src/wp-admin/link.php

    diff --git a/src/wp-admin/link.php b/src/wp-admin/link.php
    index 1824f80144..5494f9f15f 100644
    a b switch ( $action ) { 
    6060                        wp_redirect( $this_file );
    6161                        exit;
    6262                }
    63                 $all_links = join( ',', $linkcheck );
     63                $all_links = implode( ',', $linkcheck );
    6464                /*
    6565                 * Should now have an array of links we can change:
    6666                 *     $q = $wpdb->query("update $wpdb->links SET link_category='$category' WHERE link_id IN ($all_links)");
  • src/wp-admin/menu-header.php

    diff --git a/src/wp-admin/menu-header.php b/src/wp-admin/menu-header.php
    index 3e81e0bea7..1f481f8634 100644
    a b function _wp_menu_output( $menu, $submenu, $submenu_as_parent = true ) { 
    106106                        $class[] = esc_attr( $item[4] );
    107107                }
    108108
    109                 $class     = $class ? ' class="' . join( ' ', $class ) . '"' : '';
     109                $class     = $class ? ' class="' . implode( ' ', $class ) . '"' : '';
    110110                $id        = ! empty( $item[5] ) ? ' id="' . preg_replace( '|[^a-zA-Z0-9_:.]|', '-', $item[5] ) . '"' : '';
    111111                $img       = '';
    112112                $img_style = '';
    function _wp_menu_output( $menu, $submenu, $submenu_as_parent = true ) { 
    240240                                        $class[] = esc_attr( $sub_item[4] );
    241241                                }
    242242
    243                                 $class = $class ? ' class="' . join( ' ', $class ) . '"' : '';
     243                                $class = $class ? ' class="' . implode( ' ', $class ) . '"' : '';
    244244
    245245                                $menu_hook = get_plugin_page_hook( $sub_item[2], $item[2] );
    246246                                $sub_file  = $sub_item[2];
  • src/wp-admin/network/themes.php

    diff --git a/src/wp-admin/network/themes.php b/src/wp-admin/network/themes.php
    index 730ab906b1..84fbdf3106 100644
    a b if ( $action ) { 
    8989                        echo '<div class="wrap">';
    9090                        echo '<h1>' . esc_html( $title ) . '</h1>';
    9191
    92                         $url = self_admin_url( 'update.php?action=update-selected-themes&amp;themes=' . urlencode( join( ',', $themes ) ) );
     92                        $url = self_admin_url( 'update.php?action=update-selected-themes&amp;themes=' . urlencode( implode( ',', $themes ) ) );
    9393                        $url = wp_nonce_url( $url, 'bulk-update-themes' );
    9494
    9595                        echo "<iframe src='$url' style='width: 100%; height:100%; min-height:850px;'></iframe>";
  • src/wp-admin/plugin-editor.php

    diff --git a/src/wp-admin/plugin-editor.php b/src/wp-admin/plugin-editor.php
    index 50d5acee4f..7467ace6aa 100644
    a b $content = esc_textarea( $content ); 
    195195<h2>
    196196        <?php
    197197        if ( is_plugin_active( $plugin ) ) {
    198                 if ( is_writeable( $real_file ) ) {
     198                if ( is_writable( $real_file ) ) {
    199199                        /* translators: %s: Plugin file name. */
    200200                        printf( __( 'Editing %s (active)' ), '<strong>' . esc_html( $file ) . '</strong>' );
    201201                } else {
    $content = esc_textarea( $content ); 
    203203                        printf( __( 'Browsing %s (active)' ), '<strong>' . esc_html( $file ) . '</strong>' );
    204204                }
    205205        } else {
    206                 if ( is_writeable( $real_file ) ) {
     206                if ( is_writable( $real_file ) ) {
    207207                        /* translators: %s: Plugin file name. */
    208208                        printf( __( 'Editing %s (inactive)' ), '<strong>' . esc_html( $file ) . '</strong>' );
    209209                } else {
    $content = esc_textarea( $content ); 
    275275                </div>
    276276        <?php endif; ?>
    277277
    278         <?php if ( is_writeable( $real_file ) ) : ?>
     278        <?php if ( is_writable( $real_file ) ) : ?>
    279279                <div class="editor-notices">
    280280                <?php if ( in_array( $plugin, (array) get_option( 'active_plugins', array() ), true ) ) { ?>
    281281                        <div class="notice notice-warning inline active-plugin-edit-warning">
  • src/wp-admin/plugins.php

    diff --git a/src/wp-admin/plugins.php b/src/wp-admin/plugins.php
    index fe8ea41fb2..96d0b2cba9 100644
    a b if ( $action ) { 
    162162                        echo '<div class="wrap">';
    163163                        echo '<h1>' . esc_html( $title ) . '</h1>';
    164164
    165                         $url = self_admin_url( 'update.php?action=update-selected&amp;plugins=' . urlencode( join( ',', $plugins ) ) );
     165                        $url = self_admin_url( 'update.php?action=update-selected&amp;plugins=' . urlencode( implode( ',', $plugins ) ) );
    166166                        $url = wp_nonce_url( $url, 'bulk-update-plugins' );
    167167
    168168                        echo "<iframe src='$url' style='width: 100%; height:100%; min-height:850px;'></iframe>";
  • src/wp-admin/theme-editor.php

    diff --git a/src/wp-admin/theme-editor.php b/src/wp-admin/theme-editor.php
    index 61e15e4bcd..3cf24cc77e 100644
    a b else : 
    301301                                <?php if ( is_child_theme() && $theme->get_stylesheet() === get_template() ) : ?>
    302302                                        <div class="notice notice-warning inline">
    303303                                                <p>
    304                                                         <?php if ( is_writeable( $file ) ) : ?>
     304                                                        <?php if ( is_writable( $file ) ) : ?>
    305305                                                                <strong><?php _e( 'Caution:' ); ?></strong>
    306306                                                        <?php endif; ?>
    307307                                                        <?php _e( 'This is a file in your current parent theme.' ); ?>
    else : 
    309309                                        </div>
    310310                                <?php endif; ?>
    311311                        </div>
    312                         <?php if ( is_writeable( $file ) ) : ?>
     312                        <?php if ( is_writable( $file ) ) : ?>
    313313                                <p class="submit">
    314314                                        <?php submit_button( __( 'Update File' ), 'primary', 'submit', false ); ?>
    315315                                        <span class="spinner"></span>
  • src/wp-admin/upload.php

    diff --git a/src/wp-admin/upload.php b/src/wp-admin/upload.php
    index 3917ece191..2eb29da17d 100644
    a b if ( $doaction ) { 
    162162                        $location = add_query_arg(
    163163                                array(
    164164                                        'trashed' => count( $post_ids ),
    165                                         'ids'     => join( ',', $post_ids ),
     165                                        'ids'     => implode( ',', $post_ids ),
    166166                                ),
    167167                                $location
    168168                        );
  • src/wp-content/themes/twentytwenty/inc/starter-content.php

    diff --git a/src/wp-content/themes/twentytwenty/inc/starter-content.php b/src/wp-content/themes/twentytwenty/inc/starter-content.php
    index 95f7bc57aa..89be38bbe8 100644
    a b function twentytwenty_get_starter_content() { 
    4848                                'post_title'   => __( 'The New UMoMA Opens its Doors', 'twentytwenty' ),
    4949                                // Use the above featured image with the predefined about page.
    5050                                'thumbnail'    => '{{image-opening}}',
    51                                 'post_content' => join(
     51                                'post_content' => implode(
    5252                                        '',
    5353                                        array(
    5454                                                '<!-- wp:group {"align":"wide"} -->',
  • src/wp-includes/bookmark-template.php

    diff --git a/src/wp-includes/bookmark-template.php b/src/wp-includes/bookmark-template.php
    index 2db315b034..0a3840502a 100644
    a b function wp_list_bookmarks( $args = '' ) { 
    234234                $parsed_args['class'] = explode( ' ', $parsed_args['class'] );
    235235        }
    236236        $parsed_args['class'] = array_map( 'sanitize_html_class', $parsed_args['class'] );
    237         $parsed_args['class'] = trim( join( ' ', $parsed_args['class'] ) );
     237        $parsed_args['class'] = trim( implode( ' ', $parsed_args['class'] ) );
    238238
    239239        if ( $parsed_args['categorize'] ) {
    240240                $cats = get_terms(
  • src/wp-includes/category-template.php

    diff --git a/src/wp-includes/category-template.php b/src/wp-includes/category-template.php
    index df4ee350a9..e2f0cb0115 100644
    a b function wp_generate_tag_cloud( $tags, $args = '' ) { 
    10101010                         * Note: this is redundant but doesn't harm.
    10111011                         */
    10121012                        $return  = "<ul class='wp-tag-cloud' role='list'>\n\t<li>";
    1013                         $return .= join( "</li>\n\t<li>", $a );
     1013                        $return .= implode( "</li>\n\t<li>", $a );
    10141014                        $return .= "</li>\n</ul>\n";
    10151015                        break;
    10161016                default:
    1017                         $return = join( $args['separator'], $a );
     1017                        $return = implode( $args['separator'], $a );
    10181018                        break;
    10191019        }
    10201020
    function get_the_term_list( $post_id, $taxonomy, $before = '', $sep = '', $after 
    13491349         */
    13501350        $term_links = apply_filters( "term_links-{$taxonomy}", $links );  // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
    13511351
    1352         return $before . join( $sep, $term_links ) . $after;
     1352        return $before . implode( $sep, $term_links ) . $after;
    13531353}
    13541354
    13551355/**
  • src/wp-includes/class-walker-nav-menu.php

    diff --git a/src/wp-includes/class-walker-nav-menu.php b/src/wp-includes/class-walker-nav-menu.php
    index 5f4a53691c..66ba424da4 100644
    a b class Walker_Nav_Menu extends Walker { 
    7272                 * @param stdClass $args    An object of `wp_nav_menu()` arguments.
    7373                 * @param int      $depth   Depth of menu item. Used for padding.
    7474                 */
    75                 $class_names = join( ' ', apply_filters( 'nav_menu_submenu_css_class', $classes, $args, $depth ) );
     75                $class_names = implode( ' ', apply_filters( 'nav_menu_submenu_css_class', $classes, $args, $depth ) );
    7676                $class_names = $class_names ? ' class="' . esc_attr( $class_names ) . '"' : '';
    7777
    7878                $output .= "{$n}{$indent}<ul$class_names>{$n}";
    class Walker_Nav_Menu extends Walker { 
    150150                 * @param stdClass $args    An object of wp_nav_menu() arguments.
    151151                 * @param int      $depth   Depth of menu item. Used for padding.
    152152                 */
    153                 $class_names = join( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $item, $args, $depth ) );
     153                $class_names = implode( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $item, $args, $depth ) );
    154154                $class_names = $class_names ? ' class="' . esc_attr( $class_names ) . '"' : '';
    155155
    156156                /**
  • src/wp-includes/class-wp-customize-manager.php

    diff --git a/src/wp-includes/class-wp-customize-manager.php b/src/wp-includes/class-wp-customize-manager.php
    index 88a8128acd..a46b97fa5a 100644
    a b final class WP_Customize_Manager { 
    23972397                        $notification = array();
    23982398                        foreach ( $validity->errors as $error_code => $error_messages ) {
    23992399                                $notification[ $error_code ] = array(
    2400                                         'message' => join( ' ', $error_messages ),
     2400                                        'message' => implode( ' ', $error_messages ),
    24012401                                        'data'    => $validity->get_error_data( $error_code ),
    24022402                                );
    24032403                        }
  • src/wp-includes/class-wp-query.php

    diff --git a/src/wp-includes/class-wp-query.php b/src/wp-includes/class-wp-query.php
    index 34d0a5de96..98f5c3c25b 100644
    a b class WP_Query { 
    24202420                        if ( empty( $in_search_post_types ) ) {
    24212421                                $where .= ' AND 1=0 ';
    24222422                        } else {
    2423                                 $where .= " AND {$wpdb->posts}.post_type IN ('" . join( "', '", array_map( 'esc_sql', $in_search_post_types ) ) . "')";
     2423                                $where .= " AND {$wpdb->posts}.post_type IN ('" . implode( "', '", array_map( 'esc_sql', $in_search_post_types ) ) . "')";
    24242424                        }
    24252425                } elseif ( ! empty( $post_type ) && is_array( $post_type ) ) {
    2426                         $where .= " AND {$wpdb->posts}.post_type IN ('" . join( "', '", esc_sql( $post_type ) ) . "')";
     2426                        $where .= " AND {$wpdb->posts}.post_type IN ('" . implode( "', '", esc_sql( $post_type ) ) . "')";
    24272427                } elseif ( ! empty( $post_type ) ) {
    24282428                        $where           .= $wpdb->prepare( " AND {$wpdb->posts}.post_type = %s", $post_type );
    24292429                        $post_type_object = get_post_type_object( $post_type );
    class WP_Query { 
    24852485                        }
    24862486
    24872487                        if ( ! empty( $e_status ) ) {
    2488                                 $statuswheres[] = '(' . join( ' AND ', $e_status ) . ')';
     2488                                $statuswheres[] = '(' . implode( ' AND ', $e_status ) . ')';
    24892489                        }
    24902490                        if ( ! empty( $r_status ) ) {
    24912491                                if ( ! empty( $q['perm'] ) && 'editable' === $q['perm'] && ! current_user_can( $edit_others_cap ) ) {
    2492                                         $statuswheres[] = "({$wpdb->posts}.post_author = $user_id " . 'AND (' . join( ' OR ', $r_status ) . '))';
     2492                                        $statuswheres[] = "({$wpdb->posts}.post_author = $user_id " . 'AND (' . implode( ' OR ', $r_status ) . '))';
    24932493                                } else {
    2494                                         $statuswheres[] = '(' . join( ' OR ', $r_status ) . ')';
     2494                                        $statuswheres[] = '(' . implode( ' OR ', $r_status ) . ')';
    24952495                                }
    24962496                        }
    24972497                        if ( ! empty( $p_status ) ) {
    24982498                                if ( ! empty( $q['perm'] ) && 'readable' === $q['perm'] && ! current_user_can( $read_private_cap ) ) {
    2499                                         $statuswheres[] = "({$wpdb->posts}.post_author = $user_id " . 'AND (' . join( ' OR ', $p_status ) . '))';
     2499                                        $statuswheres[] = "({$wpdb->posts}.post_author = $user_id " . 'AND (' . implode( ' OR ', $p_status ) . '))';
    25002500                                } else {
    2501                                         $statuswheres[] = '(' . join( ' OR ', $p_status ) . ')';
     2501                                        $statuswheres[] = '(' . implode( ' OR ', $p_status ) . ')';
    25022502                                }
    25032503                        }
    25042504                        if ( $post_status_join ) {
    class WP_Query { 
    26692669                                $post_ids[] = (int) $comment->comment_post_ID;
    26702670                        }
    26712671
    2672                         $post_ids = join( ',', $post_ids );
     2672                        $post_ids = implode( ',', $post_ids );
    26732673                        $join     = '';
    26742674                        if ( $post_ids ) {
    26752675                                $where = "AND {$wpdb->posts}.ID IN ($post_ids) ";
  • src/wp-includes/class-wp-text-diff-renderer-table.php

    diff --git a/src/wp-includes/class-wp-text-diff-renderer-table.php b/src/wp-includes/class-wp-text-diff-renderer-table.php
    index 4bc02d3750..c55add4885 100644
    a b class WP_Text_Diff_Renderer_Table extends Text_Diff_Renderer { 
    274274                                // If they're too different, don't include any <ins> or <del>'s.
    275275                                if ( preg_match_all( '!(<ins>.*?</ins>|<del>.*?</del>)!', $diff, $diff_matches ) ) {
    276276                                        // Length of all text between <ins> or <del>.
    277                                         $stripped_matches = strlen( strip_tags( join( ' ', $diff_matches[0] ) ) );
     277                                        $stripped_matches = strlen( strip_tags( implode( ' ', $diff_matches[0] ) ) );
    278278                                        // Since we count length of text between <ins> or <del> (instead of picking just one),
    279279                                        // we double the length of chars not in those tags.
    280280                                        $stripped_diff = strlen( strip_tags( $diff ) ) * 2 - $stripped_matches;
  • src/wp-includes/class-wp-user-query.php

    diff --git a/src/wp-includes/class-wp-user-query.php b/src/wp-includes/class-wp-user-query.php
    index d33f6fb624..967c6b6b05 100644
    a b class WP_User_Query { 
    279279                        }
    280280
    281281                        $posts_table        = $wpdb->get_blog_prefix( $blog_id ) . 'posts';
    282                         $this->query_where .= " AND $wpdb->users.ID IN ( SELECT DISTINCT $posts_table.post_author FROM $posts_table WHERE $posts_table.post_status = 'publish' AND $posts_table.post_type IN ( " . join( ', ', $post_types ) . ' ) )';
     282                        $this->query_where .= " AND $wpdb->users.ID IN ( SELECT DISTINCT $posts_table.post_author FROM $posts_table WHERE $posts_table.post_status = 'publish' AND $posts_table.post_type IN ( " . implode( ', ', $post_types ) . ' ) )';
    283283                }
    284284
    285285                // nicename
  • src/wp-includes/comment-template.php

    diff --git a/src/wp-includes/comment-template.php b/src/wp-includes/comment-template.php
    index 89be475034..e3cfdef312 100644
    a b function comment_author_url_link( $linktext = '', $before = '', $after = '', $co 
    432432 */
    433433function comment_class( $class = '', $comment = null, $post_id = null, $echo = true ) {
    434434        // Separates classes with a single space, collates classes for comment DIV.
    435         $class = 'class="' . join( ' ', get_comment_class( $class, $comment, $post_id ) ) . '"';
     435        $class = 'class="' . implode( ' ', get_comment_class( $class, $comment, $post_id ) ) . '"';
    436436
    437437        if ( $echo ) {
    438438                echo $class;
  • src/wp-includes/comment.php

    diff --git a/src/wp-includes/comment.php b/src/wp-includes/comment.php
    index cde13af806..71471eed12 100644
    a b function _prime_comment_caches( $comment_ids, $update_meta_cache = true ) { 
    32353235
    32363236        $non_cached_ids = _get_non_cached_ids( $comment_ids, 'comment' );
    32373237        if ( ! empty( $non_cached_ids ) ) {
    3238                 $fresh_comments = $wpdb->get_results( sprintf( "SELECT $wpdb->comments.* FROM $wpdb->comments WHERE comment_ID IN (%s)", join( ',', array_map( 'intval', $non_cached_ids ) ) ) );
     3238                $fresh_comments = $wpdb->get_results( sprintf( "SELECT $wpdb->comments.* FROM $wpdb->comments WHERE comment_ID IN (%s)", implode( ',', array_map( 'intval', $non_cached_ids ) ) ) );
    32393239
    32403240                update_comment_cache( $fresh_comments, $update_meta_cache );
    32413241        }
  • src/wp-includes/compat.php

    diff --git a/src/wp-includes/compat.php b/src/wp-includes/compat.php
    index e322dd26de..7f6c59f03c 100644
    a b function _mb_substr( $str, $start, $length = null, $encoding = null ) { 
    127127                // If there's anything left over, repeat the loop.
    128128        } while ( count( $pieces ) > 1 && $str = array_pop( $pieces ) );
    129129
    130         return join( '', array_slice( $chars, $start, $length ) );
     130        return implode( '', array_slice( $chars, $start, $length ) );
    131131}
    132132
    133133if ( ! function_exists( 'mb_strlen' ) ) :
  • src/wp-includes/embed.php

    diff --git a/src/wp-includes/embed.php b/src/wp-includes/embed.php
    index 449c08bf5d..a9704b7872 100644
    a b function wp_maybe_load_embeds() { 
    204204         *
    205205         * @param callable $handler Audio embed handler callback function.
    206206         */
    207         wp_embed_register_handler( 'audio', '#^https?://.+?\.(' . join( '|', wp_get_audio_extensions() ) . ')$#i', apply_filters( 'wp_audio_embed_handler', 'wp_embed_handler_audio' ), 9999 );
     207        wp_embed_register_handler( 'audio', '#^https?://.+?\.(' . implode( '|', wp_get_audio_extensions() ) . ')$#i', apply_filters( 'wp_audio_embed_handler', 'wp_embed_handler_audio' ), 9999 );
    208208
    209209        /**
    210210         * Filters the video embed handler callback.
    function wp_maybe_load_embeds() { 
    213213         *
    214214         * @param callable $handler Video embed handler callback function.
    215215         */
    216         wp_embed_register_handler( 'video', '#^https?://.+?\.(' . join( '|', wp_get_video_extensions() ) . ')$#i', apply_filters( 'wp_video_embed_handler', 'wp_embed_handler_video' ), 9999 );
     216        wp_embed_register_handler( 'video', '#^https?://.+?\.(' . implode( '|', wp_get_video_extensions() ) . ')$#i', apply_filters( 'wp_video_embed_handler', 'wp_embed_handler_video' ), 9999 );
    217217}
    218218
    219219/**
    function wp_filter_oembed_iframe_title_attribute( $result, $data, $url ) { 
    841841
    842842        if ( isset( $attrs['title'] ) ) {
    843843                unset( $attrs['title'] );
    844                 $attr_string = join( ' ', wp_list_pluck( $attrs, 'whole' ) );
     844                $attr_string = implode( ' ', wp_list_pluck( $attrs, 'whole' ) );
    845845                $result      = str_replace( $matches[0], '<iframe ' . trim( $attr_string ) . '>', $result );
    846846        }
    847847        return str_ireplace( '<iframe ', sprintf( '<iframe title="%s" ', esc_attr( $title ) ), $result );
  • src/wp-includes/formatting.php

    diff --git a/src/wp-includes/formatting.php b/src/wp-includes/formatting.php
    index a9bb603868..f73105bda1 100644
    a b function _get_wptexturize_split_regex( $shortcode_regex = '' ) { 
    722722 * @return string The regular expression
    723723 */
    724724function _get_wptexturize_shortcode_regex( $tagnames ) {
    725         $tagregexp = join( '|', array_map( 'preg_quote', $tagnames ) );
     725        $tagregexp = implode( '|', array_map( 'preg_quote', $tagnames ) );
    726726        $tagregexp = "(?:$tagregexp)(?=[\\s\\]\\/])"; // Excerpt of get_shortcode_regex().
    727727        // phpcs:disable Squiz.Strings.ConcatenationSpacing.PaddingFound -- don't remove regex indentation
    728728        $regex =
    function shortcode_unautop( $pee ) { 
    824824                return $pee;
    825825        }
    826826
    827         $tagregexp = join( '|', array_map( 'preg_quote', array_keys( $shortcode_tags ) ) );
     827        $tagregexp = implode( '|', array_map( 'preg_quote', array_keys( $shortcode_tags ) ) );
    828828        $spaces    = wp_spaces_regexp();
    829829
    830830        // phpcs:disable Squiz.Strings.ConcatenationSpacing.PaddingFound,WordPress.WhiteSpace.PrecisionAlignment.Found -- don't remove regex indentation
    function wp_targeted_link_rel_callback( $matches ) { 
    32323232        }
    32333233
    32343234        $atts['rel']['whole'] = 'rel="' . esc_attr( $rel ) . '"';
    3235         $link_html            = join( ' ', array_column( $atts, 'whole' ) );
     3235        $link_html            = implode( ' ', array_column( $atts, 'whole' ) );
    32363236
    32373237        if ( $is_escaped ) {
    32383238                $link_html = preg_replace( '/[\'"]/', '\\\\$0', $link_html );
    function sanitize_email( $email ) { 
    36963696        }
    36973697
    36983698        // Join valid subs into the new domain.
    3699         $domain = join( '.', $new_subs );
     3699        $domain = implode( '.', $new_subs );
    37003700
    37013701        // Put the email back together.
    37023702        $sanitized_email = $local . '@' . $domain;
  • src/wp-includes/functions.php

    diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php
    index e3f9896211..0d034a5b08 100644
    a b function size_format( $bytes, $decimals = 0 ) { 
    467467        }
    468468
    469469        foreach ( $quant as $unit => $mag ) {
    470                 if ( doubleval( $bytes ) >= $mag ) {
     470                if ( (float) $bytes >= $mag ) {
    471471                        return number_format_i18n( $bytes / $mag, $decimals ) . ' ' . $unit;
    472472                }
    473473        }
    function _default_wp_die_handler( $message, $title = '', $args = array() ) { 
    34313431                                array( $message ),
    34323432                                wp_list_pluck( $parsed_args['additional_errors'], 'message' )
    34333433                        );
    3434                         $message = "<ul>\n\t\t<li>" . join( "</li>\n\t\t<li>", $message ) . "</li>\n\t</ul>";
     3434                        $message = "<ul>\n\t\t<li>" . implode( "</li>\n\t\t<li>", $message ) . "</li>\n\t</ul>";
    34353435                }
    34363436
    34373437                $message = sprintf(
    function wp_timezone_choice( $selected_zone, $locale = null ) { 
    58805880                }
    58815881
    58825882                // Build the value.
    5883                 $value    = join( '/', $value );
     5883                $value    = implode( '/', $value );
    58845884                $selected = '';
    58855885                if ( $value === $selected_zone ) {
    58865886                        $selected = 'selected="selected" ';
    function wp_timezone_choice( $selected_zone, $locale = null ) { 
    59815981        }
    59825982        $structure[] = '</optgroup>';
    59835983
    5984         return join( "\n", $structure );
     5984        return implode( "\n", $structure );
    59855985}
    59865986
    59875987/**
    function wp_debug_backtrace_summary( $ignore_class = null, $skip_frames = 0, $pr 
    64196419                }
    64206420        }
    64216421        if ( $pretty ) {
    6422                 return join( ', ', array_reverse( $caller ) );
     6422                return implode( ', ', array_reverse( $caller ) );
    64236423        } else {
    64246424                return $caller;
    64256425        }
  • src/wp-includes/general-template.php

    diff --git a/src/wp-includes/general-template.php b/src/wp-includes/general-template.php
    index dc5b374121..15c4974304 100644
    a b function paginate_links( $args = '' ) { 
    43454345
    43464346                case 'list':
    43474347                        $r .= "<ul class='page-numbers'>\n\t<li>";
    4348                         $r .= join( "</li>\n\t<li>", $page_links );
     4348                        $r .= implode( "</li>\n\t<li>", $page_links );
    43494349                        $r .= "</li>\n</ul>\n";
    43504350                        break;
    43514351
    43524352                default:
    4353                         $r = join( "\n", $page_links );
     4353                        $r = implode( "\n", $page_links );
    43544354                        break;
    43554355        }
    43564356
  • src/wp-includes/l10n.php

    diff --git a/src/wp-includes/l10n.php b/src/wp-includes/l10n.php
    index 226cc2d8fd..0c6b75ea24 100644
    a b function wp_dropdown_languages( $args = array() ) { 
    16171617
    16181618        // Combine the output string.
    16191619        $output  = sprintf( '<select name="%s" id="%s">', esc_attr( $parsed_args['name'] ), esc_attr( $parsed_args['id'] ) );
    1620         $output .= join( "\n", $structure );
     1620        $output .= implode( "\n", $structure );
    16211621        $output .= '</select>';
    16221622
    16231623        if ( $parsed_args['echo'] ) {
  • src/wp-includes/media.php

    diff --git a/src/wp-includes/media.php b/src/wp-includes/media.php
    index ab33c88c04..383ad9930f 100644
    a b function wp_get_attachment_image( $attachment_id, $size = 'thumbnail', $icon = f 
    10351035                $size_class = $size;
    10361036
    10371037                if ( is_array( $size_class ) ) {
    1038                         $size_class = join( 'x', $size_class );
     1038                        $size_class = implode( 'x', $size_class );
    10391039                }
    10401040
    10411041                $default_attr = array(
    function wp_audio_shortcode( $attr, $content = '' ) { 
    29502950                $html .= "<!--[if lt IE 9]><script>document.createElement('audio');</script><![endif]-->\n";
    29512951        }
    29522952
    2953         $html .= sprintf( '<audio %s controls="controls">', join( ' ', $attr_strings ) );
     2953        $html .= sprintf( '<audio %s controls="controls">', implode( ' ', $attr_strings ) );
    29542954
    29552955        $fileurl = '';
    29562956        $source  = '<source type="%s" src="%s" />';
    function wp_video_shortcode( $attr, $content = '' ) { 
    32183218                $html .= "<!--[if lt IE 9]><script>document.createElement('video');</script><![endif]-->\n";
    32193219        }
    32203220
    3221         $html .= sprintf( '<video %s controls="controls">', join( ' ', $attr_strings ) );
     3221        $html .= sprintf( '<video %s controls="controls">', implode( ' ', $attr_strings ) );
    32223222
    32233223        $fileurl = '';
    32243224        $source  = '<source type="%s" src="%s" />';
  • src/wp-includes/meta.php

    diff --git a/src/wp-includes/meta.php b/src/wp-includes/meta.php
    index 3cef8c1363..e1c1f92e48 100644
    a b function update_meta_cache( $meta_type, $object_ids ) { 
    10551055        }
    10561056
    10571057        // Get meta info.
    1058         $id_list   = join( ',', $non_cached_ids );
     1058        $id_list   = implode( ',', $non_cached_ids );
    10591059        $id_column = ( 'user' === $meta_type ) ? 'umeta_id' : 'meta_id';
    10601060
    10611061        $meta_list = $wpdb->get_results( "SELECT $column, meta_key, meta_value FROM $table WHERE $column IN ($id_list) ORDER BY $id_column ASC", ARRAY_A );
  • src/wp-includes/ms-network.php

    diff --git a/src/wp-includes/ms-network.php b/src/wp-includes/ms-network.php
    index 0434fa8acb..91001ab9a0 100644
    a b function _prime_network_caches( $network_ids ) { 
    131131
    132132        $non_cached_ids = _get_non_cached_ids( $network_ids, 'networks' );
    133133        if ( ! empty( $non_cached_ids ) ) {
    134                 $fresh_networks = $wpdb->get_results( sprintf( "SELECT $wpdb->site.* FROM $wpdb->site WHERE id IN (%s)", join( ',', array_map( 'intval', $non_cached_ids ) ) ) ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
     134                $fresh_networks = $wpdb->get_results( sprintf( "SELECT $wpdb->site.* FROM $wpdb->site WHERE id IN (%s)", implode( ',', array_map( 'intval', $non_cached_ids ) ) ) ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
    135135
    136136                update_network_cache( $fresh_networks );
    137137        }
  • src/wp-includes/ms-site.php

    diff --git a/src/wp-includes/ms-site.php b/src/wp-includes/ms-site.php
    index b90dde3cd0..31d1c7ce99 100644
    a b function _prime_site_caches( $ids, $update_meta_cache = true ) { 
    352352
    353353        $non_cached_ids = _get_non_cached_ids( $ids, 'sites' );
    354354        if ( ! empty( $non_cached_ids ) ) {
    355                 $fresh_sites = $wpdb->get_results( sprintf( "SELECT * FROM $wpdb->blogs WHERE blog_id IN (%s)", join( ',', array_map( 'intval', $non_cached_ids ) ) ) ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
     355                $fresh_sites = $wpdb->get_results( sprintf( "SELECT * FROM $wpdb->blogs WHERE blog_id IN (%s)", implode( ',', array_map( 'intval', $non_cached_ids ) ) ) ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
    356356
    357357                update_site_cache( $fresh_sites, $update_meta_cache );
    358358        }
  • src/wp-includes/pluggable.php

    diff --git a/src/wp-includes/pluggable.php b/src/wp-includes/pluggable.php
    index a822ff3bea..68187fcf05 100644
    a b if ( ! function_exists( 'get_avatar' ) ) : 
    27232723                        esc_attr( $args['alt'] ),
    27242724                        esc_url( $url ),
    27252725                        esc_url( $url2x ) . ' 2x',
    2726                         esc_attr( join( ' ', $class ) ),
     2726                        esc_attr( implode( ' ', $class ) ),
    27272727                        (int) $args['height'],
    27282728                        (int) $args['width'],
    27292729                        $extra_attr
  • src/wp-includes/post-template.php

    diff --git a/src/wp-includes/post-template.php b/src/wp-includes/post-template.php
    index c65b2e473b..0aff64d119 100644
    a b function has_excerpt( $post = 0 ) { 
    456456 */
    457457function post_class( $class = '', $post_id = null ) {
    458458        // Separates classes with a single space, collates classes for post DIV.
    459         echo 'class="' . esc_attr( join( ' ', get_post_class( $class, $post_id ) ) ) . '"';
     459        echo 'class="' . esc_attr( implode( ' ', get_post_class( $class, $post_id ) ) ) . '"';
    460460}
    461461
    462462/**
    function get_post_class( $class = '', $post_id = null ) { 
    592592 */
    593593function body_class( $class = '' ) {
    594594        // Separates class names with a single space, collates class names for body element.
    595         echo 'class="' . esc_attr( join( ' ', get_body_class( $class ) ) ) . '"';
     595        echo 'class="' . esc_attr( implode( ' ', get_body_class( $class ) ) ) . '"';
    596596}
    597597
    598598/**
  • src/wp-includes/post.php

    diff --git a/src/wp-includes/post.php b/src/wp-includes/post.php
    index 32bfb1cac8..6e968f3f9f 100644
    a b function wp_post_mime_type_where( $post_mime_types, $table_alias = '' ) { 
    29552955        }
    29562956
    29572957        if ( ! empty( $wheres ) ) {
    2958                 $where = ' AND (' . join( ' OR ', $wheres ) . ') ';
     2958                $where = ' AND (' . implode( ' OR ', $wheres ) . ') ';
    29592959        }
    29602960
    29612961        return $where;
    function _prime_post_caches( $ids, $update_term_cache = true, $update_meta_cache 
    74667466
    74677467        $non_cached_ids = _get_non_cached_ids( $ids, 'posts' );
    74687468        if ( ! empty( $non_cached_ids ) ) {
    7469                 $fresh_posts = $wpdb->get_results( sprintf( "SELECT $wpdb->posts.* FROM $wpdb->posts WHERE ID IN (%s)", join( ',', $non_cached_ids ) ) );
     7469                $fresh_posts = $wpdb->get_results( sprintf( "SELECT $wpdb->posts.* FROM $wpdb->posts WHERE ID IN (%s)", implode( ',', $non_cached_ids ) ) );
    74707470
    74717471                update_post_caches( $fresh_posts, 'any', $update_term_cache, $update_meta_cache );
    74727472        }
  • src/wp-includes/shortcodes.php

    diff --git a/src/wp-includes/shortcodes.php b/src/wp-includes/shortcodes.php
    index d821caee9e..90ca735dae 100644
    a b function get_shortcode_regex( $tagnames = null ) { 
    252252        if ( empty( $tagnames ) ) {
    253253                $tagnames = array_keys( $shortcode_tags );
    254254        }
    255         $tagregexp = join( '|', array_map( 'preg_quote', $tagnames ) );
     255        $tagregexp = implode( '|', array_map( 'preg_quote', $tagnames ) );
    256256
    257257        // WARNING! Do not change this regex without changing do_shortcode_tag() and strip_shortcode_tag().
    258258        // Also, see shortcode_unautop() and shortcode.js.
  • src/wp-includes/taxonomy.php

    diff --git a/src/wp-includes/taxonomy.php b/src/wp-includes/taxonomy.php
    index e891af68d8..06fa0a0f47 100644
    a b function wp_set_object_terms( $object_id, $terms, $taxonomy, $append = false ) { 
    27082708                }
    27092709
    27102710                if ( $values ) {
    2711                         if ( false === $wpdb->query( "INSERT INTO $wpdb->term_relationships (object_id, term_taxonomy_id, term_order) VALUES " . join( ',', $values ) . ' ON DUPLICATE KEY UPDATE term_order = VALUES(term_order)' ) ) {
     2711                        if ( false === $wpdb->query( "INSERT INTO $wpdb->term_relationships (object_id, term_taxonomy_id, term_order) VALUES " . implode( ',', $values ) . ' ON DUPLICATE KEY UPDATE term_order = VALUES(term_order)' ) ) {
    27122712                                return new WP_Error( 'db_insert_error', __( 'Could not insert term relationship into the database.' ), $wpdb->last_error );
    27132713                        }
    27142714                }
    function _prime_term_caches( $term_ids, $update_meta_cache = true ) { 
    40584058
    40594059        $non_cached_ids = _get_non_cached_ids( $term_ids, 'terms' );
    40604060        if ( ! empty( $non_cached_ids ) ) {
    4061                 $fresh_terms = $wpdb->get_results( sprintf( "SELECT t.*, tt.* FROM $wpdb->terms AS t INNER JOIN $wpdb->term_taxonomy AS tt ON t.term_id = tt.term_id WHERE t.term_id IN (%s)", join( ',', array_map( 'intval', $non_cached_ids ) ) ) );
     4061                $fresh_terms = $wpdb->get_results( sprintf( "SELECT t.*, tt.* FROM $wpdb->terms AS t INNER JOIN $wpdb->term_taxonomy AS tt ON t.term_id = tt.term_id WHERE t.term_id IN (%s)", implode( ',', array_map( 'intval', $non_cached_ids ) ) ) );
    40624062
    40634063                update_term_cache( $fresh_terms, $update_meta_cache );
    40644064
    function the_taxonomies( $args = array() ) { 
    47084708
    47094709        $parsed_args = wp_parse_args( $args, $defaults );
    47104710
    4711         echo $parsed_args['before'] . join( $parsed_args['sep'], get_the_taxonomies( $parsed_args['post'], $parsed_args ) ) . $parsed_args['after'];
     4711        echo $parsed_args['before'] . implode( $parsed_args['sep'], get_the_taxonomies( $parsed_args['post'], $parsed_args ) ) . $parsed_args['after'];
    47124712}
    47134713
    47144714/**
  • src/wp-includes/theme.php

    diff --git a/src/wp-includes/theme.php b/src/wp-includes/theme.php
    index 5fa7a23146..a6ecad3ffe 100644
    a b function get_theme_starter_content() { 
    21492149                                'text',
    21502150                                array(
    21512151                                        'title'  => _x( 'Find Us', 'Theme starter content' ),
    2152                                         'text'   => join(
     2152                                        'text'   => implode(
    21532153                                                '',
    21542154                                                array(
    21552155                                                        '<strong>' . _x( 'Address', 'Theme starter content' ) . "</strong>\n",
  • src/wp-includes/widgets/class-wp-widget-custom-html.php

    diff --git a/src/wp-includes/widgets/class-wp-widget-custom-html.php b/src/wp-includes/widgets/class-wp-widget-custom-html.php
    index a3314280b3..8412a4d371 100644
    a b class WP_Widget_Custom_HTML extends WP_Widget { 
    281281                                        <# if ( data.codeEditorDisabled ) { #>
    282282                                                <p>
    283283                                                        <?php _e( 'Some HTML tags are not permitted, including:' ); ?>
    284                                                         <code><?php echo join( '</code>, <code>', $disallowed_html ); ?></code>
     284                                                        <code><?php echo implode( '</code>, <code>', $disallowed_html ); ?></code>
    285285                                                </p>
    286286                                        <# } #>
    287287                                <?php endif; ?>
  • src/wp-includes/widgets/class-wp-widget-media-image.php

    diff --git a/src/wp-includes/widgets/class-wp-widget-media-image.php b/src/wp-includes/widgets/class-wp-widget-media-image.php
    index 01b7bae394..5ce3c9019a 100644
    a b class WP_Widget_Media_Image extends WP_Widget_Media { 
    219219                                $width        = empty( $caption_size[0] ) ? 0 : $caption_size[0];
    220220                        }
    221221
    222                         $image_attributes['class'] .= sprintf( ' attachment-%1$s size-%1$s', is_array( $size ) ? join( 'x', $size ) : $size );
     222                        $image_attributes['class'] .= sprintf( ' attachment-%1$s size-%1$s', is_array( $size ) ? implode( 'x', $size ) : $size );
    223223
    224224                        $image = wp_get_attachment_image( $attachment->ID, $size, false, $image_attributes );
    225225
  • src/wp-includes/widgets/class-wp-widget-media.php

    diff --git a/src/wp-includes/widgets/class-wp-widget-media.php b/src/wp-includes/widgets/class-wp-widget-media.php
    index 9c0dc05275..59aeeeacdb 100644
    a b abstract class WP_Widget_Media extends WP_Widget { 
    208208                }
    209209                $tokens = array_map( 'sanitize_html_class', $tokens );
    210210                $tokens = array_filter( $tokens );
    211                 return join( ' ', $tokens );
     211                return implode( ' ', $tokens );
    212212        }
    213213
    214214        /**
    abstract class WP_Widget_Media extends WP_Widget { 
    343343                                class="media-widget-instance-property"
    344344                                name="<?php echo esc_attr( $this->get_field_name( $name ) ); ?>"
    345345                                id="<?php echo esc_attr( $this->get_field_id( $name ) ); // Needed specifically by wpWidgets.appendTitle(). ?>"
    346                                 value="<?php echo esc_attr( is_array( $value ) ? join( ',', $value ) : (string) $value ); ?>"
     346                                value="<?php echo esc_attr( is_array( $value ) ? implode( ',', $value ) : (string) $value ); ?>"
    347347                        />
    348348                        <?php
    349349                endforeach;
  • tests/phpunit/includes/utils.php

    diff --git a/tests/phpunit/includes/utils.php b/tests/phpunit/includes/utils.php
    index 1546d4e973..b178418de7 100644
    a b function strip_ws( $txt ) { 
    2828                }
    2929        }
    3030
    31         return trim( join( "\n", $result ) );
     31        return trim( implode( "\n", $result ) );
    3232}
    3333
    3434/*
    function xml_join_atts( $atts ) { 
    275275        foreach ( $atts as $k => $v ) {
    276276                $a[] = $k . '="' . $v . '"';
    277277        }
    278         return join( ' ', $a );
     278        return implode( ' ', $a );
    279279}
    280280
    281281function xml_array_dumbdown( &$data ) {
    function gen_tests_array( $name, $array ) { 
    332332                        $out[] = gen_tests_array( "{$name}[{$index}]", $v );
    333333                }
    334334        }
    335         return join( "\n", $out ) . "\n";
     335        return implode( "\n", $out ) . "\n";
    336336}
    337337
    338338/**
  • tests/phpunit/tests/customize/manager.php

    diff --git a/tests/phpunit/tests/customize/manager.php b/tests/phpunit/tests/customize/manager.php
    index 015037012f..520e6683fd 100644
    a b class Tests_WP_Customize_Manager extends WP_UnitTestCase { 
    27192719                foreach ( $error->errors as $code => $messages ) {
    27202720                        $this->assertArrayHasKey( $code, $validity );
    27212721                        $this->assertInternalType( 'array', $validity[ $code ] );
    2722                         $this->assertSame( join( ' ', $messages ), $validity[ $code ]['message'] );
     2722                        $this->assertSame( implode( ' ', $messages ), $validity[ $code ]['message'] );
    27232723                        $this->assertArrayHasKey( 'data', $validity[ $code ] );
    27242724                        $this->assertSame( $validity[ $code ]['data'], $error->get_error_data( $code ) );
    27252725                }
  • tests/phpunit/tests/db.php

    diff --git a/tests/phpunit/tests/db.php b/tests/phpunit/tests/db.php
    index 2ff9c65889..a75371636b 100644
    a b class Tests_DB extends WP_UnitTestCase { 
    489489                global $wpdb;
    490490                $str    = $wpdb->get_caller();
    491491                $calls  = explode( ', ', $str );
    492                 $called = join( '->', array( __CLASS__, __FUNCTION__ ) );
     492                $called = implode( '->', array( __CLASS__, __FUNCTION__ ) );
    493493                $this->assertSame( $called, end( $calls ) );
    494494        }
    495495
  • tests/phpunit/tests/formatting/Autop.php

    diff --git a/tests/phpunit/tests/formatting/Autop.php b/tests/phpunit/tests/formatting/Autop.php
    index 25e09d4c88..8a77c6879e 100644
    a b Paragraph two.'; 
    337337                        $content[] = "<$block>foo</$block>";
    338338                }
    339339
    340                 $expected = join( "\n", $content );
    341                 $input    = join( "\n\n", $content ); // Whitespace difference.
     340                $expected = implode( "\n", $content );
     341                $input    = implode( "\n\n", $content ); // Whitespace difference.
    342342
    343343                $this->assertSame( $expected, trim( wpautop( $input ) ) );
    344344
    345                 $input = join( '', $content ); // Whitespace difference.
     345                $input = implode( '', $content ); // Whitespace difference.
    346346
    347347                $this->assertSame( $expected, trim( wpautop( $input ) ) );
    348348
    Paragraph two.'; 
    353353                        $content[] = "<$block/>";
    354354                }
    355355
    356                 $expected = join( "\n", $content );
    357                 $input    = join( '', $content );
     356                $expected = implode( "\n", $content );
     357                $input    = implode( '', $content );
    358358
    359359                $this->assertSame( $expected, trim( wpautop( $input ) ) );
    360360
    Paragraph two.'; 
    365365                        $content[] = "<$block attr='value'>foo</$block>";
    366366                }
    367367
    368                 $expected = join( "\n", $content );
    369                 $input    = join( '', $content );
     368                $expected = implode( "\n", $content );
     369                $input    = implode( '', $content );
    370370
    371371                $this->assertSame( $expected, trim( wpautop( $input ) ) );
    372372        }
    Paragraph two.'; 
    426426                        $expected[] = "<p><$inline>foo</$inline></p>";
    427427                }
    428428
    429                 $content  = join( "\n\n", $content );
    430                 $expected = join( "\n", $expected );
     429                $content  = implode( "\n\n", $content );
     430                $expected = implode( "\n", $expected );
    431431
    432432                $this->assertSame( $expected, trim( wpautop( $content ) ) );
    433433        }
  • tests/phpunit/tests/media.php

    diff --git a/tests/phpunit/tests/media.php b/tests/phpunit/tests/media.php
    index 622ce7289b..32d62f6efd 100644
    a b https://w.org</a>', 
    512512                        $ids2_srcs[] = 'http://' . WP_TESTS_DOMAIN . '/wp-content/uploads/' . "image$i.jpg";
    513513                }
    514514
    515                 $ids1_joined = join( ',', $ids1 );
    516                 $ids2_joined = join( ',', $ids2 );
     515                $ids1_joined = implode( ',', $ids1 );
     516                $ids2_joined = implode( ',', $ids2 );
    517517
    518518                $blob    = <<<BLOB
    519519[gallery ids="$ids1_joined"]
    BLOB; 
    662662                        $ids2_srcs[] = 'http://' . WP_TESTS_DOMAIN . '/wp-content/uploads/' . "image$i.jpg";
    663663                }
    664664
    665                 $ids1_joined = join( ',', $ids1 );
    666                 $ids2_joined = join( ',', $ids2 );
     665                $ids1_joined = implode( ',', $ids1 );
     666                $ids2_joined = implode( ',', $ids2 );
    667667
    668668                $blob    = <<<BLOB
    669669[gallery ids="$ids1_joined"]
  • tests/phpunit/tests/post/bodyClass.php

    diff --git a/tests/phpunit/tests/post/bodyClass.php b/tests/phpunit/tests/post/bodyClass.php
    index dbe65fcd1a..aee0e1c8cd 100644
    a b class Tests_Post_BodyClass extends WP_UnitTestCase { 
    1313        }
    1414
    1515        public function test_body_class() {
    16                 $expected = 'class="' . join( ' ', get_body_class( '', $this->post_id ) ) . '"';
     16                $expected = 'class="' . implode( ' ', get_body_class( '', $this->post_id ) ) . '"';
    1717                $this->expectOutputString( $expected );
    1818                body_class( '', $this->post_id );
    1919        }
    class Tests_Post_BodyClass extends WP_UnitTestCase { 
    2121        public function test_body_class_extra_esc_attr() {
    2222                $classes              = get_body_class( '', $this->post_id );
    2323                $escaped_again        = array_map( 'esc_attr', $classes );
    24                 $escaped_another_time = 'class="' . esc_attr( join( ' ', $escaped_again ) ) . '"';
     24                $escaped_another_time = 'class="' . esc_attr( implode( ' ', $escaped_again ) ) . '"';
    2525
    2626                $this->expectOutputString( $escaped_another_time );
    2727                body_class( '', $this->post_id );
  • tests/phpunit/tests/post/postClass.php

    diff --git a/tests/phpunit/tests/post/postClass.php b/tests/phpunit/tests/post/postClass.php
    index f8501e9dc1..3236e68e26 100644
    a b class Tests_Post_PostClass extends WP_UnitTestCase { 
    1313        }
    1414
    1515        public function test_post_class() {
    16                 $expected = 'class="' . join( ' ', get_post_class( '', $this->post_id ) ) . '"';
     16                $expected = 'class="' . implode( ' ', get_post_class( '', $this->post_id ) ) . '"';
    1717                $this->expectOutputString( $expected );
    1818                post_class( '', $this->post_id );
    1919        }
    class Tests_Post_PostClass extends WP_UnitTestCase { 
    2121        public function test_post_class_extra_esc_attr() {
    2222                $classes              = get_post_class( '', $this->post_id );
    2323                $escaped_again        = array_map( 'esc_attr', $classes );
    24                 $escaped_another_time = 'class="' . esc_attr( join( ' ', $escaped_again ) ) . '"';
     24                $escaped_another_time = 'class="' . esc_attr( implode( ' ', $escaped_again ) ) . '"';
    2525
    2626                $this->expectOutputString( $escaped_another_time );
    2727                post_class( '', $this->post_id );
  • tests/phpunit/tests/post/template.php

    diff --git a/tests/phpunit/tests/post/template.php b/tests/phpunit/tests/post/template.php
    index dad6bf1d11..f1bcaebcf0 100644
    a b class Tests_Post_Template extends WP_UnitTestCase { 
    77
    88        function test_wp_link_pages() {
    99                $contents = array( 'One', 'Two', 'Three' );
    10                 $content  = join( '<!--nextpage-->', $contents );
     10                $content  = implode( '<!--nextpage-->', $contents );
    1111                $post_id  = self::factory()->post->create( array( 'post_content' => $content ) );
    1212
    1313                $this->go_to( '?p=' . $post_id );
  • tests/phpunit/tests/widgets/media-gallery-widget.php

    diff --git a/tests/phpunit/tests/widgets/media-gallery-widget.php b/tests/phpunit/tests/widgets/media-gallery-widget.php
    index 091b3b3c5f..d3ca909bcb 100644
    a b class Test_WP_Widget_Media_Gallery extends WP_UnitTestCase { 
    101101
    102102                $this->assertTrue( wp_script_is( 'media-gallery-widget' ) );
    103103
    104                 $after = join( '', wp_scripts()->registered['media-gallery-widget']->extra['after'] );
     104                $after = implode( '', wp_scripts()->registered['media-gallery-widget']->extra['after'] );
    105105                $this->assertContains( 'wp.mediaWidgets.modelConstructors[ "media_gallery" ].prototype', $after );
    106106        }
    107107