From 131808ed204725baf7456808538e85be7e8fd1fc Mon Sep 17 00:00:00 2001 From: danixland Date: Wed, 4 Jul 2018 15:21:19 +0200 Subject: initial import --- danixland-asciinema.php | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 danixland-asciinema.php (limited to 'danixland-asciinema.php') diff --git a/danixland-asciinema.php b/danixland-asciinema.php new file mode 100644 index 0000000..a59ad69 --- /dev/null +++ b/danixland-asciinema.php @@ -0,0 +1,42 @@ +asciinema.org +Plugin URI: http://danixland.net/?p=3525 +Version: 0.1 +Author: Danilo 'danix' Macrì +Author URI: http://danixland.net +License: GPL2 +License URI: https://www.gnu.org/licenses/gpl-2.0.html +*/ + +/* + * The actual video displayed using a shortcode + * @since 0.1 + */ +function dnxasc_display_video( $atts ) { + // Attributes + extract( shortcode_atts( + array( + 'video' => '22124', + 'time' => '0', + 'autoplay' => false, + 'loop' => false, + 'speed' => 1, + 'theme' => 'monokai' + ), $atts ) + ); + + $autoplay = ( 0 != $time ) ? true : false; + $videoscript = ''; + + return $videoscript; +} +add_shortcode( 'asciinema', 'dnxasc_display_video' ); -- cgit v1.2.3