Skip to content

s2_remote_embed_host

  • Subscribe2
  • Updated Nov 23, 2023
  • 1 min read

This hook allows control over embedding of images from remote hosts when generating emails. In some circumstances you may not want to embed the remote image – perhaps due to slow performance from the remote server.

function disallowed_host( $allowed, $host ) {
// return false; // if you want to link rather than embed all remote images
if ( 's.w.org' === $host ) {
$allowed = false;
}
return $allowed;
}
add_filter( 's2_remote_embed_host', 'disallowed_host', 10, 2 );

Last updated on

Filed under Hooks, API & Customization

Still stuck?

Our support team can walk you through it.