Duplicate get_youtube_id() necessary? #664
Labels
[Feature] Shortcodes / Embeds
[Type] Enhancement
Changes to an existing feature — removing, adding, or changing parts of it
Milestone
There are 2 instances of get_youtube_id() in Jetpack. Both functions are the same.
jetpack/functions.compat.php
Line 22 in 2f6f4a4
jetpack/modules/shortcodes/youtube.php
Line 154 in d4534c9
There is additionally a function
jetpack_shortcode_get_youtube_id
That contains the comment:Same as get_youtube_id(), but with the prefix that function should've had.
So functionally 3 places to call the same thing.
Outside of the shortcode
get_youtube_id()
is used in two places:jetpack/modules/publicize/enhanced-open-graph.php
Line 93 in 4a22379
jetpack/modules/publicize/enhanced-open-graph.php
Line 93 in 4a22379
It looks like @mdawaffe created the function in the shortcode and @justinshreve created the function in the functions.compat file.
We should not be running both of these. Because the function needs to be callable outside of the shortcode can we leave the function in the functions.compat file and remove it from the shortcode?
The text was updated successfully, but these errors were encountered: