diff --git a/EmbedVideo.i18n.magic.php b/EmbedVideo.i18n.magic.php index 46559a6..9f6629c 100644 --- a/EmbedVideo.i18n.magic.php +++ b/EmbedVideo.i18n.magic.php @@ -12,6 +12,7 @@ $magicWords['en'] = [ 'ev' => [ 0, 'ev' ], + 'evt' => [ 0, 'evt' ], 'evu' => [ 0, 'evu' ], 'evl' => [ 0, 'evl' ], 'vlink' => [ 0, 'vlink' ], diff --git a/includes/EmbedVideo.php b/includes/EmbedVideo.php index 5340930..761b84c 100644 --- a/includes/EmbedVideo.php +++ b/includes/EmbedVideo.php @@ -354,7 +354,7 @@ private function parseArgs( array $args, bool $fromTag ): array { $keys = array_keys( $supportedArgs ); - $serviceName = array_shift( $args ); + $serviceName = str_replace( 'service=', '', array_shift( $args ) ?? '' ); $counter = 0; @@ -387,7 +387,7 @@ private function parseArgs( array $args, bool $fromTag ): array { ++$counter; } - $supportedArgs['service'] = $serviceName ?? false; + $supportedArgs['service'] = empty( $serviceName ) ? false : $serviceName; // An intentional weak check if ( $supportedArgs['autoresize'] == true ) { diff --git a/includes/EmbedVideoHooks.php b/includes/EmbedVideoHooks.php index ea4d533..08db34f 100644 --- a/includes/EmbedVideoHooks.php +++ b/includes/EmbedVideoHooks.php @@ -113,6 +113,12 @@ public function onParserFirstCallInit( $parser ): void { Parser::SFH_OBJECT_ARGS ); + $parser->setFunctionHook( + 'evt', + [ EmbedVideo::class, 'parseEV' ], + Parser::SFH_OBJECT_ARGS + ); + $parser->setFunctionHook( 'evu', [ EmbedVideo::class, 'parseEVU' ],