Skip to content

Commit d6308ca

Browse files
committed
Initial commit
0 parents  commit d6308ca

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

index.php

Whitespace-only changes.

main.php

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?php
2+
/*
3+
* Plugin Name: Vimeo Videos - single video embed shortocde
4+
* Plugin URI: https://codeflavors.com/vimeo-video-post/
5+
* Description: Adds shortcode "cvm_embed_video_shortcode" to plugin Vimeo Video Post that allows embedding the video in video posts into a certain position.
6+
* Author: CodeFlavors
7+
* Version: 1.0
8+
* Author URI: https://codeflavors.com
9+
*/
10+
11+
if( !function_exists( 'cvm_embed_video_shortcode' ) ) {
12+
/**
13+
* Shortcode callback that displays the video into a video post into
14+
* the exact position where the shortode is.
15+
* @return string|void
16+
*/
17+
function cvm_embed_video_shortcode() {
18+
if ( ! is_singular() || ! cvm_is_video() ) {
19+
return;
20+
}
21+
global $post;
22+
23+
return cvm_get_video_embed_html( $post, false );
24+
}
25+
26+
add_shortcode( 'cvm_video_embed', 'cvm_embed_video_shortcode' );
27+
}
28+
29+
/**
30+
* Prevent Vimeo Video Post from embedding automatically
31+
*/
32+
add_filter('cvm_automatic_video_embed', '__return_false');

0 commit comments

Comments
 (0)