Skip to content

Conversation

@fajardoleo
Copy link
Contributor

…network.

@fajardoleo fajardoleo self-assigned this May 18, 2025
@fajardoleo fajardoleo force-pushed the feature/leo/multisite-site-info-enhancements branch 3 times, most recently from e62f937 to 2f18daa Compare July 10, 2025 14:56
public function remove( $hook ) {
global $wp_filter;

if ( isset( $wp_filter[ $hook ] ) ) {
Copy link
Collaborator

@DanieleAlessandra DanieleAlessandra Jul 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In normal WP context this is good enough, but in edge cases it could be useful to safe check the existence of $wp_filter:

if ( isset( $wp_filter ) && isset( $wp_filter[ $hook ] ) ) {

This makes the code more robust in edge cases, such as when the file is loaded outside of the standard WordPress environment or during automated tests.
In normal WordPress usage, this is rarely necessary, but it helps prevent potential errors in atypical scenarios.

Copy link
Collaborator

@DanieleAlessandra DanieleAlessandra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look good enough to me, only read the one comment and think about it (we have to deal with tons of different use cases).

@fajardoleo fajardoleo force-pushed the feature/leo/multisite-site-info-enhancements branch from 2f18daa to 99d55b6 Compare July 14, 2025 15:37
Copy link
Contributor

@swashata swashata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see my only question

}
}

$current_blog_id = get_current_blog_id();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not fully aware of the mechanism, but don't we want to call this before even switching on line 7854?

$info[ 'registration_date' ] = $registration_date;
}

if ( $switched ) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fajardoleo why are we removing this? Don't we want to restore the blog like before?

…ure/swas/restore_blog_fix_alt_exploration` branch.
@fajardoleo fajardoleo force-pushed the feature/leo/multisite-site-info-enhancements branch from 99d55b6 to a8e7e4b Compare July 23, 2025 14:26
Copy link
Contributor

@swashata swashata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice addition

@fajardoleo fajardoleo merged commit a75b873 into develop Jul 24, 2025
5 checks passed
@fajardoleo fajardoleo deleted the feature/leo/multisite-site-info-enhancements branch July 24, 2025 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants