Skip to content

Instantly share code, notes, and snippets.

@farookibrahim
Created July 22, 2020 14:28
Show Gist options
  • Save farookibrahim/c3f1fb1f6a41718b8434642b952ef251 to your computer and use it in GitHub Desktop.
Save farookibrahim/c3f1fb1f6a41718b8434642b952ef251 to your computer and use it in GitHub Desktop.
Vodi - Single Movie v3 move Sources below title from tabs
if( ! function_exists( 'vi_child_movie_v3_add_sources_below_title' ) ) {
function vi_child_movie_v3_add_sources_below_title() {
$style = vodi_get_single_movie_style();
if ( $style == 'v3' ) {
global $movie;
if ( $movie && ( $movie->has_sources() ) ) {
echo '<div class="movie-sources-wrap">';
echo '<h4>' . esc_html__( 'Sources', 'masvideos' ) . '</h4>';
masvideos_template_single_movie_sources();
echo '</div>';
}
}
}
}
add_action( 'masvideos_single_movie_summary', 'vi_child_movie_v3_add_sources_below_title', 78 );
if ( ! function_exists( 'vi_child_movie_v3_remove_sources_from_tabs' ) ) {
function vi_child_movie_v3_remove_sources_from_tabs( $tabs ) {
$style = vodi_get_single_movie_style();
if ( $style == 'v3' && isset( $tabs['sources'] ) ) {
unset( $tabs['sources'] );
}
return $tabs;
}
}
add_filter( 'masvideos_template_single_movie_tabs', 'vi_child_movie_v3_remove_sources_from_tabs', 20 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment