Make WordPress Core


Ignore:
Timestamp:
05/08/2026 02:03:18 PM (7 weeks ago)
Author:
ellatrix
Message:

Remove real-time collaboration.

Removes all RTC related code from core. There will still be RTC related code in Gutenberg, but effectively disabled for core since nothing turns it on. The wp.sync global has also been hidden by bundling in https://github.com/WordPress/gutenberg/pull/78085.

Developed in: https://github.com/WordPress/wordpress-develop/pull/11774.

Props maxschmeling, ellatrix, mukesh27.
Fixes #65205.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-posts-list-table.php

    r62186 r62334  
    11201120
    11211121            if ( $lock_holder ) {
    1122                 if ( get_option( 'wp_collaboration_enabled' ) ) {
    1123                     $locked_avatar = '';
    1124                     /* translators: Collaboration status message for a singular post in the post list. Can be any type of post. */
    1125                     $locked_text   = esc_html_x( 'Currently being edited', 'post list' );
    1126                 } else {
    1127                     $lock_holder   = get_userdata( $lock_holder );
    1128                     $locked_avatar = get_avatar( $lock_holder->ID, 18 );
    1129                     /* translators: %s: User's display name. */
    1130                     $locked_text = esc_html( sprintf( __( '%s is currently editing' ), $lock_holder->display_name ) );
    1131                 }
     1122                $lock_holder   = get_userdata( $lock_holder );
     1123                $locked_avatar = get_avatar( $lock_holder->ID, 18 );
     1124                /* translators: %s: User's display name. */
     1125                $locked_text = esc_html( sprintf( __( '%s is currently editing' ), $lock_holder->display_name ) );
    11321126            } else {
    11331127                $locked_avatar = '';
     
    14341428
    14351429        if ( $lock_holder ) {
    1436             if ( get_option( 'wp_collaboration_enabled' ) ) {
    1437                 $classes .= ' wp-collaborative-editing';
    1438             } else {
    1439                 $classes .= ' wp-locked';
    1440             }
     1430            $classes .= ' wp-locked';
    14411431        }
    14421432
     
    14921482
    14931483        if ( $can_edit_post && 'trash' !== $post->post_status ) {
    1494             $is_rtc_enabled = (bool) get_option( 'wp_collaboration_enabled' );
    1495 
    1496             /*
    1497              * When RTC is enabled, both "Edit" and "Join" labels are rendered.
    1498              * The visible label is toggled by CSS based on the row's
    1499              * `wp-collaborative-editing` class, which is added or removed by
    1500              * inline-edit-post.js in response to heartbeat ticks.
    1501              */
    1502             if ( $is_rtc_enabled ) {
    1503                 $actions['edit'] = sprintf(
    1504                     '<a href="%1$s">'
    1505                     . '<span class="edit-action-text">'
    1506                     . '<span aria-hidden="true">%2$s</span>'
    1507                     . '<span class="screen-reader-text">%3$s</span>'
    1508                     . '</span>'
    1509                     . '<span class="join-action-text">'
    1510                     . '<span aria-hidden="true">%4$s</span>'
    1511                     . '<span class="screen-reader-text">%5$s</span>'
    1512                     . '</span>'
    1513                     . '</a>',
    1514                     get_edit_post_link( $post->ID ),
    1515                     __( 'Edit' ),
    1516                     /* translators: %s: Post title. */
    1517                     sprintf( __( 'Edit &#8220;%s&#8221;' ), $title ),
    1518                     /* translators: Action link text for a singular post in the post list. Can be any type of post. */
    1519                     _x( 'Join', 'post list' ),
    1520                     /* translators: %s: Post title. */
    1521                     sprintf( __( 'Join editing &#8220;%s&#8221;', 'post list' ), $title )
    1522                 );
    1523             } else {
    1524                 $actions['edit'] = sprintf(
    1525                     '<a href="%s" aria-label="%s">%s</a>',
    1526                     get_edit_post_link( $post->ID ),
    1527                     /* translators: %s: Post title. */
    1528                     esc_attr( sprintf( __( 'Edit &#8220;%s&#8221;' ), $title ) ),
    1529                     __( 'Edit' )
    1530                 );
    1531             }
     1484            $actions['edit'] = sprintf(
     1485                '<a href="%s" aria-label="%s">%s</a>',
     1486                get_edit_post_link( $post->ID ),
     1487                /* translators: %s: Post title. */
     1488                esc_attr( sprintf( __( 'Edit &#8220;%s&#8221;' ), $title ) ),
     1489                __( 'Edit' )
     1490            );
    15321491
    15331492            /**
Note: See TracChangeset for help on using the changeset viewer.