Make WordPress Core

Opened 4 weeks ago

Closed 3 weeks ago

Last modified 3 weeks ago

#65082 closed defect (bug) (invalid)

WP_oEmbed()->fetch() uses wp_embed_defaults() incorrectly

Reported by: sanchothefat's profile sanchothefat Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Embeds Keywords: has-patch has-unit-tests
Focuses: Cc:

Description

In the fetch() method of WP_oEmbed() it's expecting an array with width and height keys however wp_embed_defaults() returns a compacted numerically indexed array.

The net result is that the provider always has maxwidth and maxheight values of 0, and embeds come out very small.

Another compounding problem is that block themes don't necessarily declare $contentwidth either, so the net result is small embeds that don't fill their containers.

Offending code:

	public function fetch( $provider, $url, $args = '' ) {
		$args = wp_parse_args( $args, wp_embed_defaults( $url ) );

		$provider = add_query_arg( 'maxwidth', (int) $args['width'], $provider );
		$provider = add_query_arg( 'maxheight', (int) $args['height'], $provider );

Change History (6)

This ticket was mentioned in PR #11591 on WordPress/wordpress-develop by @sanchothefat.


4 weeks ago
#1

  • Keywords has-patch has-unit-tests added

Trac ticket: https://core.trac.wordpress.org/ticket/65082

## Use of AI Tools

AI assistance: No

#2 @sanchothefat
3 weeks ago

  • Resolution set to invalid
  • Status changed from new to closed

#3 @sanchothefat
3 weeks ago

There's something else going on making the defaults 0. But there is a separate issue wherein the default embed sizes are coming out at 500px I'm looking into.

gclapps0612-cmd commented on PR #11591:


3 weeks ago
#4

I BEEN HAVKED FOR MY .GOV INFORMATION. IT HAS BEEN REPORTED .DLL MY DAD IS
A GOV. DOGWACHER SO I HIPE WERE NOT BAD PEOPLE STEELING GOV PROJECT
MONEY.,?
AMY WAY PLEASE HELP I GAVE MULTI SPACE IAM GRCSPACE LIGHT STAR RING LIGHT

George Ralph

On Thu, Apr 16, 2026, 18:01 roborourke *@*.*> wrote:

Trac ticket: https://core.trac.wordpress.org/ticket/65082
Use of AI Tools

AI assistance: No


*This Pull Request is for code review only. Please keep all other
discussion in the Trac ticket. Do not merge this Pull Request. See GitHub
Pull Requests for Code Review
<https://make.wordpress.org/core/handbook/contribute/git/github-pull-requests-for-code-review/>
in the Core Handbook for more details.*


You can view, comment on, or merge this pull request online at:

https://github.com/WordPress/wordpress-develop/pull/11591

Commit Summary

File Changes

(2 files <https://github.com/WordPress/wordpress-develop/pull/11591/files>
)

Patch Links:


Reply to this email directly, view it on GitHub
<https://github.com/WordPress/wordpress-develop/pull/11591>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/BXZWJXEN3N2HAFCAGIYORAT4WFJ4ZAVCNFSM6AAAAACX4FGNK6VHI2DSMVQWIX3LMV43ASLTON2WKOZUGI3TQNZWGE2DGNA>
.
You are receiving this because you are subscribed to this thread.Message
ID: *@*.*>

gclapps0612-cmd commented on PR #11591:


3 weeks ago
#5

George Ralph

On Thu, Apr 16, 2026, 21:54 George R Clapps III *@*.*>
wrote:

I BEEN HAVKED FOR MY .GOV INFORMATION. IT HAS BEEN REPORTED .DLL MY DAD
IS A GOV. DOGWACHER SO I HIPE WERE NOT BAD PEOPLE STEELING GOV PROJECT
MONEY.,?
AMY WAY PLEASE HELP I GAVE MULTI SPACE IAM GRCSPACE LIGHT STAR RING LIGHT

George Ralph

On Thu, Apr 16, 2026, 18:01 roborourke *@*.*> wrote:

Trac ticket: https://core.trac.wordpress.org/ticket/65082
Use of AI Tools

AI assistance: No


*This Pull Request is for code review only. Please keep all other
discussion in the Trac ticket. Do not merge this Pull Request. See GitHub
Pull Requests for Code Review
<https://make.wordpress.org/core/handbook/contribute/git/github-pull-requests-for-code-review/>
in the Core Handbook for more details.*


You can view, comment on, or merge this pull request online at:

https://github.com/WordPress/wordpress-develop/pull/11591

Commit Summary

File Changes

(2 files
<https://github.com/WordPress/wordpress-develop/pull/11591/files>)

Patch Links:


Reply to this email directly, view it on GitHub
<https://github.com/WordPress/wordpress-develop/pull/11591>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/BXZWJXEN3N2HAFCAGIYORAT4WFJ4ZAVCNFSM6AAAAACX4FGNK6VHI2DSMVQWIX3LMV43ASLTON2WKOZUGI3TQNZWGE2DGNA>
.
You are receiving this because you are subscribed to this thread.Message
ID: *@*.*>

gclapps0612-cmd commented on PR #11591:


3 weeks ago
#6

-

George Ralph

On Thu, Apr 16, 2026, 18:01 roborourke *@*.*> wrote:

Trac ticket: https://core.trac.wordpress.org/ticket/65082
Use of AI Tools

AI assistance: No


*This Pull Request is for code review only. Please keep all other
discussion in the Trac ticket. Do not merge this Pull Request. See GitHub
Pull Requests for Code Review
<https://make.wordpress.org/core/handbook/contribute/git/github-pull-requests-for-code-review/>
in the Core Handbook for more details.*


You can view, comment on, or merge this pull request online at:

https://github.com/WordPress/wordpress-develop/pull/11591

Commit Summary

File Changes

(2 files <https://github.com/WordPress/wordpress-develop/pull/11591/files>
)

Patch Links:


Reply to this email directly, view it on GitHub
<https://github.com/WordPress/wordpress-develop/pull/11591>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/BXZWJXEN3N2HAFCAGIYORAT4WFJ4ZAVCNFSM6AAAAACX4FGNK6VHI2DSMVQWIX3LMV43ASLTON2WKOZUGI3TQNZWGE2DGNA>
.
You are receiving this because you are subscribed to this thread.Message
ID: *@*.*>

Note: See TracTickets for help on using tickets.