Skip to content

Conversation

@westonruter
Copy link
Member

@westonruter westonruter commented Aug 15, 2024

Fixes #1473.

With the following plugin code active:

add_filter( 
	'pre_http_request',
	static function ( $pre, $args, $url ) {
		if ( strpos( $url, 'wordpress.org' ) ) {
			return true;
		} else {
			return $pre;
		}
	}, 
	10,
	3 
);

Before:

image

After:

image

@westonruter westonruter added [Type] Bug An existing feature is broken [Plugin] Performance Lab Issue relates to work in the Performance Lab Plugin only labels Aug 15, 2024
@westonruter westonruter added this to the performance-lab 3.4.0 milestone Aug 15, 2024
@westonruter westonruter requested a review from swissspidy August 15, 2024 19:26
@github-actions
Copy link

github-actions bot commented Aug 15, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Unlinked Accounts

The following contributors have not linked their GitHub and WordPress.org accounts: @chimok.

Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Unlinked contributors: chimok.

Co-authored-by: westonruter <[email protected]>
Co-authored-by: mukeshpanchal27 <[email protected]>
Co-authored-by: felixarntz <[email protected]>
Co-authored-by: swissspidy <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Copy link
Member

@felixarntz felixarntz left a comment

Choose a reason for hiding this comment

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

@westonruter +1 to this nice little UX improvement for when things are broken :)

This reminds me that it would be great to avoid all these individual requests. The more plugins we add, the more of a bottleneck / failure risk they'll become.

I don't think wordpress.org has an API endpoint to get the same data for multiple plugins in bulk, but exploring Requests::request_multiple() might be a good idea. On the other hand, this would require some hacks because the way WordPress core wraps the regular Request::request() method makes for different behavior. I wish WordPress core just had wp_request_multiple()... 😮‍💨

@mukeshpanchal27
Copy link
Member

@westonruter The wp_admin_notice return empty <p></p> tag as the default is true forparagraph_wrap parameter. In 96ab82b i have set false for that parameter and add <p> tag in last message.

@mukeshpanchal27 mukeshpanchal27 merged commit ab56ad0 into trunk Aug 16, 2024
@mukeshpanchal27 mukeshpanchal27 deleted the fix/features-screen-when-requests-fail branch August 16, 2024 05:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Plugin] Performance Lab Issue relates to work in the Performance Lab Plugin only [Type] Bug An existing feature is broken

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Option Page now completely broke without remote access

4 participants