-
-
Save mikka23/4a44d5851849e039edfa49523a781d14 to your computer and use it in GitHub Desktop.
Customize embed example.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Change available embeds. | |
* | |
* @param array $embeds Current embeds. | |
* @return array | |
*/ | |
function my_embeds( $embeds ) { | |
// I don't want YouTube appearing as an option in TO for privacy embeds. | |
if ( isset( $embeds['youtube'] ) ) { | |
unset( $embeds['youtube'] ); | |
} | |
// Adding a new embed type to TO. Search should match string within iframe src. | |
$embeds['my_embed'] = array( | |
'search' => array( | |
'my-embed.com', | |
'my-embedded', | |
), | |
'label' => esc_attr__( 'My Embed', 'Avada' ), | |
); | |
return $embeds; | |
} | |
add_filter( 'fusion_privacy_embeds', 'my_embeds' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment