Skip to content

Instantly share code, notes, and snippets.

@mikka23
Created May 28, 2018 09:57
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikka23/4a44d5851849e039edfa49523a781d14 to your computer and use it in GitHub Desktop.
Save mikka23/4a44d5851849e039edfa49523a781d14 to your computer and use it in GitHub Desktop.
Customize embed example.
<?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