WordPress.org

Make WordPress Core

Opened 2 years ago

Closed 12 days ago

#20151 closed enhancement (fixed)

Add parameter for wp_embed_defaults()

Reported by: wpsmith Owned by: SergeyBiryukov
Milestone: 4.0 Priority: normal
Severity: normal Version:
Component: Media Keywords: has-patch good-first-bug commit
Focuses: Cc:

Description

If we can add a parameter (like $url) to wp_embed_defaults(), then people can filter more intelligently as WordPress extends to allow more and more oEmbed.

Attachments (5)

wp_embed_defaults.patch (2.6 KB) - added by wpsmith 2 years ago.
20151.diff (2.6 KB) - added by sabreuse 2 years ago.
20151.1.diff (2.1 KB) - added by jacobdubail 13 days ago.
20151.2.diff (2.1 KB) - added by jacobdubail 13 days ago.
20151.3.diff (2.6 KB) - added by JasonM4563 13 days ago.
reapplied changes into existing code and added some documentation

Download all attachments as: .zip

Change History (15)

wpsmith2 years ago

comment:1 ocean902 years ago

Could you please make your patch relative to the root dir?

comment:2 follow-up: wpsmith2 years ago

I'm sorry but I am unsure how to do that. The files are located in wordpress/wp-includes/

sabreuse2 years ago

comment:3 sabreuse2 years ago

20151.diff is a refresh of wpsmith's patch, fixed to be relative to root and with trailing CR's removed.

comment:4 in reply to: ↑ 2 DrewAPicture2 years ago

Replying to wpsmith:

I'm sorry but I am unsure how to do that. The files are located in wordpress/wp-includes/

You would generate the diff/patch from the site root (in your case wordpress/) rather than from within wp-includes.

Last edited 2 years ago by DrewAPicture (previous) (diff)

comment:5 wonderboymusic2 weeks ago

  • Keywords needs-refresh needs-docs added
  • Milestone changed from Awaiting Review to Future Release

could go in 4.0 with refresh/docs

comment:6 follow-up: DrewAPicture2 weeks ago

  • Keywords good-first-bug added

Marking good-first-bug for WC Seattle contributor day. See comment:5

jacobdubail13 days ago

jacobdubail13 days ago

comment:7 in reply to: ↑ 6 jacobdubail13 days ago

Replying to DrewAPicture:

Marking good-first-bug for WC Seattle contributor day. See comment:5

Updated docs. Ready for review. Thanks!

comment:8 follow-up: DrewAPicture13 days ago

  • Keywords commit added; needs-refresh needs-docs removed
  • Milestone changed from Future Release to 4.0

Docs look good.

JasonM456313 days ago

reapplied changes into existing code and added some documentation

comment:9 in reply to: ↑ 8 jacobdubail13 days ago

dh-shredder and I removed the code changes to comment-template.php because we couldn't figure out why they were relevant to this ticket. Could you explain why they were re-added?

Last edited 13 days ago by jacobdubail (previous) (diff)

comment:10 SergeyBiryukov12 days ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 28923:

Pass $url parameter to wp_embed_defaults() and 'embed_defaults' filter.

props wpsmith, sabreuse, jacobdubail.
fixes #20151.

Note: See TracTickets for help on using tickets.