Edit File by line
/home/barbar84/www/wp-conte.../themes/Divi
File: functions.php
case '_1_2__1_4':
[8500] Fix | Delete
case '_1_5__3_5':
[8501] Fix | Delete
case '_3_5__1_5':
[8502] Fix | Delete
case '_1_4_1_2_1_4':
[8503] Fix | Delete
case '_1_5_3_5_1_5':
[8504] Fix | Delete
$et_active_sidebar = array( 2, 3, 4 );
[8505] Fix | Delete
break;
[8506] Fix | Delete
case '_1_2__1_6':
[8507] Fix | Delete
case '_1_6__1_2':
[8508] Fix | Delete
$et_active_sidebar = array( 2, 3, 4, 5 );
[8509] Fix | Delete
break;
[8510] Fix | Delete
}
[8511] Fix | Delete
}
[8512] Fix | Delete
[8513] Fix | Delete
return $et_active_sidebar;
[8514] Fix | Delete
}
[8515] Fix | Delete
endif;
[8516] Fix | Delete
[8517] Fix | Delete
/**
[8518] Fix | Delete
* Check if the theme has boxed layout enabled
[8519] Fix | Delete
*
[8520] Fix | Delete
* @return bool
[8521] Fix | Delete
*/
[8522] Fix | Delete
function et_divi_is_boxed_layout() {
[8523] Fix | Delete
return true === et_get_option( 'boxed_layout', false );
[8524] Fix | Delete
}
[8525] Fix | Delete
[8526] Fix | Delete
/**
[8527] Fix | Delete
* Get current theme content container width
[8528] Fix | Delete
*
[8529] Fix | Delete
* @return int
[8530] Fix | Delete
*/
[8531] Fix | Delete
function et_divi_get_content_width() {
[8532] Fix | Delete
$value = absint( et_get_option( 'content_width', 1080 ) );
[8533] Fix | Delete
[8534] Fix | Delete
return ( 1080 === $value && et_divi_is_boxed_layout() ) ? 1200 : $value;
[8535] Fix | Delete
}
[8536] Fix | Delete
[8537] Fix | Delete
/**
[8538] Fix | Delete
* Disable Theme Builder header and footer layouts, if any, on the blank page template.
[8539] Fix | Delete
*
[8540] Fix | Delete
* @since ??
[8541] Fix | Delete
*
[8542] Fix | Delete
* @param array $layouts
[8543] Fix | Delete
*
[8544] Fix | Delete
* @return array
[8545] Fix | Delete
*/
[8546] Fix | Delete
function et_divi_disable_theme_builder_header_footer_on_blank_template( $layouts ) {
[8547] Fix | Delete
if ( ! is_page_template('page-template-blank.php') || empty( $layouts ) ) {
[8548] Fix | Delete
return $layouts;
[8549] Fix | Delete
}
[8550] Fix | Delete
[8551] Fix | Delete
$layouts[ ET_THEME_BUILDER_HEADER_LAYOUT_POST_TYPE ]['id'] = 0;
[8552] Fix | Delete
$layouts[ ET_THEME_BUILDER_HEADER_LAYOUT_POST_TYPE ]['enabled'] = false;
[8553] Fix | Delete
$layouts[ ET_THEME_BUILDER_HEADER_LAYOUT_POST_TYPE ]['override'] = false;
[8554] Fix | Delete
[8555] Fix | Delete
$layouts[ ET_THEME_BUILDER_FOOTER_LAYOUT_POST_TYPE ]['id'] = 0;
[8556] Fix | Delete
$layouts[ ET_THEME_BUILDER_FOOTER_LAYOUT_POST_TYPE ]['enabled'] = false;
[8557] Fix | Delete
$layouts[ ET_THEME_BUILDER_FOOTER_LAYOUT_POST_TYPE ]['override'] = false;
[8558] Fix | Delete
[8559] Fix | Delete
return $layouts;
[8560] Fix | Delete
}
[8561] Fix | Delete
add_filter( 'et_theme_builder_template_layouts', 'et_divi_disable_theme_builder_header_footer_on_blank_template' );
[8562] Fix | Delete
[8563] Fix | Delete
/**
[8564] Fix | Delete
* Remove invalid `frameborder` attribute from YouTube oEmbed iframe tags.
[8565] Fix | Delete
*
[8566] Fix | Delete
* @since ?.?
[8567] Fix | Delete
*
[8568] Fix | Delete
* @param string $html HTML string returned from oEmbed process.
[8569] Fix | Delete
* @param object $data Payload returned for oEmded processing.
[8570] Fix | Delete
* @param string $url URL originally passed to oEmbed process.
[8571] Fix | Delete
* @return string The iframe HTML snippet (modified or unmodified).
[8572] Fix | Delete
*/
[8573] Fix | Delete
function et_divi_oembed_dataparse_remove_yt_frameborder( $html, $data, $url ) {
[8574] Fix | Delete
// Array of possible matches for known YouTube domain names.
[8575] Fix | Delete
$matches = array(
[8576] Fix | Delete
'youtube.com',
[8577] Fix | Delete
'youtu.be',
[8578] Fix | Delete
'youtube-nocookie.com',
[8579] Fix | Delete
'.youtube.',
[8580] Fix | Delete
);
[8581] Fix | Delete
[8582] Fix | Delete
foreach ( $matches as $match ) {
[8583] Fix | Delete
// If we find a matching domain, strip out any frameborder attr before returning.
[8584] Fix | Delete
if ( false !== strpos( $url, $match ) ) {
[8585] Fix | Delete
return str_replace( 'frameborder="0"', '', $html );
[8586] Fix | Delete
}
[8587] Fix | Delete
}
[8588] Fix | Delete
[8589] Fix | Delete
// If there's no URL match, return the HTML string without modification.
[8590] Fix | Delete
return $html;
[8591] Fix | Delete
}
[8592] Fix | Delete
add_filter( 'oembed_dataparse', 'et_divi_oembed_dataparse_remove_yt_frameborder', 10, 3 );
[8593] Fix | Delete
[8594] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function