Edit File by line
/home/barbar84/www/wp-conte.../themes/Divi/includes
File: theme-builder.php
<?php
[0] Fix | Delete
// Prevent file from being loaded directly
[1] Fix | Delete
if ( ! defined( 'ABSPATH' ) ) {
[2] Fix | Delete
die( '-1' );
[3] Fix | Delete
}
[4] Fix | Delete
[5] Fix | Delete
/**
[6] Fix | Delete
* Output the opening page container div.
[7] Fix | Delete
*
[8] Fix | Delete
* @since ??
[9] Fix | Delete
*
[10] Fix | Delete
* @return void
[11] Fix | Delete
*/
[12] Fix | Delete
function et_divi_filter_theme_builder_template_before_page_wrappers() {
[13] Fix | Delete
get_template_part( 'theme-before-wrappers' );
[14] Fix | Delete
}
[15] Fix | Delete
add_action( 'et_theme_builder_template_before_page_wrappers', 'et_divi_filter_theme_builder_template_before_page_wrappers' );
[16] Fix | Delete
[17] Fix | Delete
/**
[18] Fix | Delete
* Output the header if necessary.
[19] Fix | Delete
*
[20] Fix | Delete
* @since ??
[21] Fix | Delete
*
[22] Fix | Delete
* @param integer $layout_id
[23] Fix | Delete
* @param bool $layout_enabled
[24] Fix | Delete
*
[25] Fix | Delete
* @return void
[26] Fix | Delete
*/
[27] Fix | Delete
function et_divi_filter_theme_builder_template_before_header( $layout_id, $layout_enabled ) {
[28] Fix | Delete
if ( 0 === $layout_id && $layout_enabled ) {
[29] Fix | Delete
get_template_part( 'theme-header' );
[30] Fix | Delete
}
[31] Fix | Delete
}
[32] Fix | Delete
add_action( 'et_theme_builder_template_before_header', 'et_divi_filter_theme_builder_template_before_header', 10, 2 );
[33] Fix | Delete
[34] Fix | Delete
/**
[35] Fix | Delete
* Output the opening page container div.
[36] Fix | Delete
*
[37] Fix | Delete
* @since ??
[38] Fix | Delete
*
[39] Fix | Delete
* @return void
[40] Fix | Delete
*/
[41] Fix | Delete
function et_divi_filter_theme_builder_template_after_header() {
[42] Fix | Delete
get_template_part( 'theme-after-header' );
[43] Fix | Delete
}
[44] Fix | Delete
add_action( 'et_theme_builder_template_after_header', 'et_divi_filter_theme_builder_template_after_header' );
[45] Fix | Delete
[46] Fix | Delete
/**
[47] Fix | Delete
* Output the opening main content div.
[48] Fix | Delete
*
[49] Fix | Delete
* @since ??
[50] Fix | Delete
*
[51] Fix | Delete
* @return void
[52] Fix | Delete
*/
[53] Fix | Delete
function et_divi_filter_theme_builder_template_before_body() {
[54] Fix | Delete
?>
[55] Fix | Delete
<div id="main-content">
[56] Fix | Delete
<?php
[57] Fix | Delete
}
[58] Fix | Delete
add_action( 'et_theme_builder_template_before_body', 'et_divi_filter_theme_builder_template_before_body' );
[59] Fix | Delete
[60] Fix | Delete
/**
[61] Fix | Delete
* Output the closing main content div.
[62] Fix | Delete
*
[63] Fix | Delete
* @since ??
[64] Fix | Delete
*
[65] Fix | Delete
* @return void
[66] Fix | Delete
*/
[67] Fix | Delete
function et_divi_filter_theme_builder_template_after_body() {
[68] Fix | Delete
?>
[69] Fix | Delete
</div>
[70] Fix | Delete
<?php
[71] Fix | Delete
}
[72] Fix | Delete
add_action( 'et_theme_builder_template_after_body', 'et_divi_filter_theme_builder_template_after_body' );
[73] Fix | Delete
[74] Fix | Delete
/**
[75] Fix | Delete
* Output the footer if necessary.
[76] Fix | Delete
*
[77] Fix | Delete
* @since ??
[78] Fix | Delete
*
[79] Fix | Delete
* @param integer $layout_id
[80] Fix | Delete
* @param bool $layout_enabled
[81] Fix | Delete
*
[82] Fix | Delete
* @return void
[83] Fix | Delete
*/
[84] Fix | Delete
function et_divi_filter_theme_builder_template_after_footer( $layout_id, $layout_enabled ) {
[85] Fix | Delete
if ( 0 === $layout_id && $layout_enabled ) {
[86] Fix | Delete
get_template_part( 'theme-footer' );
[87] Fix | Delete
}
[88] Fix | Delete
[89] Fix | Delete
get_template_part( 'theme-after-footer' );
[90] Fix | Delete
}
[91] Fix | Delete
add_action( 'et_theme_builder_template_after_footer', 'et_divi_filter_theme_builder_template_after_footer', 10, 2 );
[92] Fix | Delete
[93] Fix | Delete
/**
[94] Fix | Delete
* Output the closing page container div.
[95] Fix | Delete
*
[96] Fix | Delete
* @since ??
[97] Fix | Delete
*
[98] Fix | Delete
* @return void
[99] Fix | Delete
*/
[100] Fix | Delete
function et_divi_filter_theme_builder_template_after_page_wrappers() {
[101] Fix | Delete
get_template_part( 'theme-after-wrappers' );
[102] Fix | Delete
}
[103] Fix | Delete
add_action( 'et_theme_builder_template_after_page_wrappers', 'et_divi_filter_theme_builder_template_after_page_wrappers' );
[104] Fix | Delete
[105] Fix | Delete
/**
[106] Fix | Delete
* Disable TB hooks in order to be compatible with LearnDash's Focus mode.
[107] Fix | Delete
*
[108] Fix | Delete
* @since ??
[109] Fix | Delete
*/
[110] Fix | Delete
function et_divi_action_theme_builder_compatibility_learndash_focus_mode() {
[111] Fix | Delete
remove_action( 'et_theme_builder_template_before_page_wrappers', 'et_divi_filter_theme_builder_template_before_page_wrappers' );
[112] Fix | Delete
remove_action( 'et_theme_builder_template_before_header', 'et_divi_filter_theme_builder_template_before_header' );
[113] Fix | Delete
remove_action( 'et_theme_builder_template_after_header', 'et_divi_filter_theme_builder_template_after_header' );
[114] Fix | Delete
remove_action( 'et_theme_builder_template_before_body', 'et_divi_filter_theme_builder_template_before_body' );
[115] Fix | Delete
remove_action( 'et_theme_builder_template_after_body', 'et_divi_filter_theme_builder_template_after_body' );
[116] Fix | Delete
remove_action( 'et_theme_builder_template_after_footer', 'et_divi_filter_theme_builder_template_after_footer' );
[117] Fix | Delete
remove_action( 'et_theme_builder_template_after_page_wrappers', 'et_divi_filter_theme_builder_template_after_page_wrappers' );
[118] Fix | Delete
}
[119] Fix | Delete
add_action( 'et_theme_builder_compatibility_learndash_focus_mode', 'et_divi_action_theme_builder_compatibility_learndash_focus_mode' );
[120] Fix | Delete
[121] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function