Skip to content

Instantly share code, notes, and snippets.

@gdarko
Last active March 9, 2021 21:08
Show Gist options
  • Save gdarko/5c6302c821efb6ab930c23f0d7875a29 to your computer and use it in GitHub Desktop.
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
<?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