Last active
March 9, 2021 21:08
-
-
Save gdarko/5c6302c821efb6ab930c23f0d7875a29 to your computer and use it in GitHub Desktop.
Filter the output of [dgv_vimeo_video] shortcode and print a Vimeo link only instead of embed code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Print vimeo.com link instead of embed link using the [dgv_vimeo_video] shortcode | |
* @param string $content | |
* @param string $vimeo_id | |
* @return string | |
*/ | |
function dgv_shortcode_output_891281($content, $vimeo_id) { | |
return sprintf('https://vimeo.com/%s', $vimeo_id); | |
} | |
add_filter('dgv_shortcode_output', 'dgv_shortcode_output_891281', 15, 2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment