-
Notifications
You must be signed in to change notification settings - Fork 800
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shortcode: Get rid of custom shortcodes for YouTube and Vimeo in favor of Core #39096
Changes from all commits
c608921
ecdd534
4c73a05
e2c350e
bbafe54
c6c4bde
b753546
4588624
0bf1767
82dfc89
2cc018e
0dbdff6
12433e4
c0176f8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: patch | ||
Type: compat | ||
|
||
Embeds: prioritize YouTube and Vimeo embeds provided by WordPress itself, over Jetpack's embedding solution. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -175,7 +175,7 @@ public function get_vimeo_urls() { | |
* @param string $url The URL to test. | ||
* @param string $video_id The expected video ID. | ||
*/ | ||
public function test_replace_url_with_iframe_in_the_content( $url, $video_id ) { | ||
public function test_shortcodes_vimeo_replace_url_with_iframe_in_the_content( $url, $video_id ) { | ||
if ( | ||
( defined( 'IS_WPCOM' ) && IS_WPCOM ) | ||
|| ( defined( 'IS_ATOMIC' ) && IS_ATOMIC ) | ||
|
@@ -186,7 +186,7 @@ public function test_replace_url_with_iframe_in_the_content( $url, $video_id ) { | |
|
||
global $post; | ||
|
||
$post = self::factory()->post->create_and_get( array( 'post_content' => $url ) ); | ||
$post = self::factory()->post->create_and_get( array( 'post_content' => "[vimeo $url]" ) ); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since the content goes from just a URL to a shortcode with a URL, should the function name be updated accordingly? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Renamed to |
||
|
||
do_action( 'init' ); | ||
setup_postdata( $post ); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of just removing the function, I would recommend marking it as deprecated first, and only remove it in a few releases. Since Vimeo embeds have been around for a long time, it's possible that third-parties currently do something with those functions.
Same for other functions in this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated!