Making WordPress.org


Ignore:
Timestamp:
01/23/2026 04:13:33 AM (10 months ago)
Author:
dd32
Message:

Add a helper method to allow other WordPress.org sites to add a note to a user, or block (disable) a user.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-audit-log.php

    r14301 r14640  
    113113                $where_from = ! ms_is_switched() ? home_url( '/' ) : $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
    114114                $where_from = explode( '?', $where_from )[0];
    115                 $where_from = preg_replace( '!^(?:https?://)?(.+?)/?[^/]*$!i', '$1', $where_from );
     115                $where_from = wp_parse_url( $where_from, PHP_URL_HOST ) ?: $where_from;
    116116
    117117                // Add a user note about this action.
    … …  
    123123                );
    124124
    125                 // Used in wporg-login to add context.
     125                // Used in wporg-login & user-helpers to add context.
    126126                $note_text = apply_filters( 'wporg_bbp_forum_role_changed_note_text', $note_text, $user );
    127127
Note: See TracChangeset for help on using the changeset viewer.