$et_active_sidebar = array( 2, 3, 4 );
$et_active_sidebar = array( 2, 3, 4, 5 );
return $et_active_sidebar;
* Check if the theme has boxed layout enabled
function et_divi_is_boxed_layout() {
return true === et_get_option( 'boxed_layout', false );
* Get current theme content container width
function et_divi_get_content_width() {
$value = absint( et_get_option( 'content_width', 1080 ) );
return ( 1080 === $value && et_divi_is_boxed_layout() ) ? 1200 : $value;
* Disable Theme Builder header and footer layouts, if any, on the blank page template.
function et_divi_disable_theme_builder_header_footer_on_blank_template( $layouts ) {
if ( ! is_page_template('page-template-blank.php') || empty( $layouts ) ) {
$layouts[ ET_THEME_BUILDER_HEADER_LAYOUT_POST_TYPE ]['id'] = 0;
$layouts[ ET_THEME_BUILDER_HEADER_LAYOUT_POST_TYPE ]['enabled'] = false;
$layouts[ ET_THEME_BUILDER_HEADER_LAYOUT_POST_TYPE ]['override'] = false;
$layouts[ ET_THEME_BUILDER_FOOTER_LAYOUT_POST_TYPE ]['id'] = 0;
$layouts[ ET_THEME_BUILDER_FOOTER_LAYOUT_POST_TYPE ]['enabled'] = false;
$layouts[ ET_THEME_BUILDER_FOOTER_LAYOUT_POST_TYPE ]['override'] = false;
add_filter( 'et_theme_builder_template_layouts', 'et_divi_disable_theme_builder_header_footer_on_blank_template' );
* Remove invalid `frameborder` attribute from YouTube oEmbed iframe tags.
* @param string $html HTML string returned from oEmbed process.
* @param object $data Payload returned for oEmded processing.
* @param string $url URL originally passed to oEmbed process.
* @return string The iframe HTML snippet (modified or unmodified).
function et_divi_oembed_dataparse_remove_yt_frameborder( $html, $data, $url ) {
// Array of possible matches for known YouTube domain names.
foreach ( $matches as $match ) {
// If we find a matching domain, strip out any frameborder attr before returning.
if ( false !== strpos( $url, $match ) ) {
return str_replace( 'frameborder="0"', '', $html );
// If there's no URL match, return the HTML string without modification.
add_filter( 'oembed_dataparse', 'et_divi_oembed_dataparse_remove_yt_frameborder', 10, 3 );