Make WordPress Core


Ignore:
Timestamp:
10/21/2025 07:11:53 AM (3 months ago)
Author:
ellatrix
Message:

Editor: update packages.

Updates the packages to match Gutenberg version 21.9.0 RC2.

Also updates the sync script to work with the new package-lock.json format.
Some reusable block tests were adjusted to work with more render arguments.
Added core-data to the ignore list for verify:source-maps because Yjs has been bundled by accident. To be removed in a follow-up. See https://core.trac.wordpress.org/ticket/64120. See https://github.com/WordPress/gutenberg/pull/72503.

See: https://github.com/WordPress/wordpress-develop/pull/10355.
See: https://core.trac.wordpress.org/ticket/64117.

Props ellatrix, dmsnell.
Fixes #64117.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/blocks/loginout.php

    r58187 r61009  
    1717function render_block_core_loginout( $attributes ) {
    1818
    19     // Build the redirect URL.
     19    /*
     20     * Build the redirect URL. This current url fetching logic matches with the core.
     21     *
     22     * @see https://github.com/WordPress/wordpress-develop/blob/6bf62e58d21739938f3bb3f9e16ba702baf9c2cc/src/wp-includes/general-template.php#L528.
     23     */
    2024    $current_url = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
    2125
    22     $classes  = is_user_logged_in() ? 'logged-in' : 'logged-out';
     26    $user_logged_in = is_user_logged_in();
     27
     28    $classes  = $user_logged_in ? 'logged-in' : 'logged-out';
    2329    $contents = wp_loginout(
    2430        isset( $attributes['redirectToCurrent'] ) && $attributes['redirectToCurrent'] ? $current_url : '',
     
    2733
    2834    // If logged-out and displayLoginAsForm is true, show the login form.
    29     if ( ! is_user_logged_in() && ! empty( $attributes['displayLoginAsForm'] ) ) {
     35    if ( ! $user_logged_in && ! empty( $attributes['displayLoginAsForm'] ) ) {
    3036        // Add a class.
    3137        $classes .= ' has-login-form';
Note: See TracChangeset for help on using the changeset viewer.