Skip to content

Instantly share code, notes, and snippets.

@farookibrahim
Created June 30, 2020 07:39
Show Gist options
  • Select an option

  • Save farookibrahim/ffbfa136d163ef3cfd2d05f56a0387de to your computer and use it in GitHub Desktop.

Select an option

Save farookibrahim/ffbfa136d163ef3cfd2d05f56a0387de to your computer and use it in GitHub Desktop.
Vodi - Video v1 add custom content before & after sidebar
if ( ! function_exists( 'vodi_child_single_video_custom_sidebar_before_content' ) ) {
function vodi_child_single_video_custom_sidebar_before_content() {
?>
Your custom before content
<?php
}
}
if ( ! function_exists( 'vodi_child_single_video_custom_sidebar_after_content' ) ) {
function vodi_child_single_video_custom_sidebar_after_content() {
?>
Your custom after content
<?php
}
}
if ( ! function_exists( 'vodi_child_toggle_single_video_hooks' ) ) {
function vodi_child_toggle_single_video_hooks() {
$style = vodi_get_single_video_style();
if ( 'v1' === $style ) {
add_action( 'masvideos_after_single_video_summary', 'vodi_child_single_video_custom_sidebar_before_content', 31 );
add_action( 'masvideos_after_single_video_summary', 'vodi_child_single_video_custom_sidebar_after_content', 39 );
}
}
}
add_action( 'masvideos_before_single_video', 'vodi_child_toggle_single_video_hooks', 11 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment