Edit File by line
/home/barbar84/www/wp-conte.../themes/Divi/includes/builder
File: functions.php
*
[5500] Fix | Delete
* @param array $matches found matches.
[5501] Fix | Delete
*
[5502] Fix | Delete
* @return mixed
[5503] Fix | Delete
*/
[5504] Fix | Delete
function et_builder_get_global_code_replacement( $matches ) {
[5505] Fix | Delete
global $et_pb_global_code_replacements;
[5506] Fix | Delete
[5507] Fix | Delete
return array_shift( $et_pb_global_code_replacements );
[5508] Fix | Delete
}
[5509] Fix | Delete
}
[5510] Fix | Delete
[5511] Fix | Delete
[5512] Fix | Delete
if ( ! function_exists( 'et_builder_activate_bfb_auto_draft' ) ) {
[5513] Fix | Delete
/**
[5514] Fix | Delete
* Force activate post_id which has auto-draft status
[5515] Fix | Delete
*/
[5516] Fix | Delete
function et_builder_activate_bfb_auto_draft() {
[5517] Fix | Delete
et_core_security_check( 'edit_posts', 'et_enable_bfb_nonce' );
[5518] Fix | Delete
[5519] Fix | Delete
$post_id = ! empty( $_POST['et_post_id'] ) ? absint( $_POST['et_post_id'] ) : 0;
[5520] Fix | Delete
[5521] Fix | Delete
if ( 0 === $post_id || ! current_user_can( 'edit_post', $post_id ) ) {
[5522] Fix | Delete
die();
[5523] Fix | Delete
}
[5524] Fix | Delete
[5525] Fix | Delete
// et_builder_activate_bfb_auto_draft() is executed when post title and content empty which means post_status is still lik. ely
[5526] Fix | Delete
// to be "auto-draft". "auto-draft" status returns 404 page; thus post status needs to be updated to "draft".
[5527] Fix | Delete
wp_update_post(
[5528] Fix | Delete
array(
[5529] Fix | Delete
'ID' => $post_id,
[5530] Fix | Delete
'post_status' => 'draft',
[5531] Fix | Delete
)
[5532] Fix | Delete
);
[5533] Fix | Delete
[5534] Fix | Delete
update_post_meta( $post_id, '_et_pb_use_builder', 'on' );
[5535] Fix | Delete
die();
[5536] Fix | Delete
}
[5537] Fix | Delete
}
[5538] Fix | Delete
add_action( 'wp_ajax_et_builder_activate_bfb_auto_draft', 'et_builder_activate_bfb_auto_draft' );
[5539] Fix | Delete
[5540] Fix | Delete
if ( ! function_exists( 'et_builder_ajax_toggle_bfb' ) ) {
[5541] Fix | Delete
/**
[5542] Fix | Delete
* Ajax Callback :: Switch To The New Divi Builder.
[5543] Fix | Delete
*/
[5544] Fix | Delete
function et_builder_ajax_toggle_bfb() {
[5545] Fix | Delete
et_core_security_check( 'manage_options', 'et_builder_toggle_bfb', 'nonce', '_GET' );
[5546] Fix | Delete
$enable = isset( $_GET['enable'] ) && '1' === $_GET['enable'];
[5547] Fix | Delete
$redirect = isset( $_GET['redirect'] ) ? esc_url_raw( $_GET['redirect'] ) : '';
[5548] Fix | Delete
if ( empty( $redirect ) && isset( $_SERVER['HTTP_REFERER'] ) ) {
[5549] Fix | Delete
$redirect = esc_url_raw( $_SERVER['HTTP_REFERER'] );
[5550] Fix | Delete
}
[5551] Fix | Delete
[5552] Fix | Delete
if ( empty( $redirect ) ) {
[5553] Fix | Delete
$redirect = esc_url_raw( admin_url( '/' ) );
[5554] Fix | Delete
}
[5555] Fix | Delete
et_builder_toggle_bfb( $enable );
[5556] Fix | Delete
[5557] Fix | Delete
set_transient( 'et_builder_show_bfb_welcome_modal', true, 0 );
[5558] Fix | Delete
[5559] Fix | Delete
wp_safe_redirect( $redirect );
[5560] Fix | Delete
exit;
[5561] Fix | Delete
}
[5562] Fix | Delete
}
[5563] Fix | Delete
add_action( 'wp_ajax_et_builder_toggle_bfb', 'et_builder_ajax_toggle_bfb' );
[5564] Fix | Delete
[5565] Fix | Delete
/**
[5566] Fix | Delete
* Return font weight select input element html.
[5567] Fix | Delete
*
[5568] Fix | Delete
* @return string
[5569] Fix | Delete
*/
[5570] Fix | Delete
function et_generate_font_weight_select_output() {
[5571] Fix | Delete
$all_weights = et_builder_get_font_weight_list();
[5572] Fix | Delete
$output = '';
[5573] Fix | Delete
[5574] Fix | Delete
foreach ( $all_weights as $number => $name ) {
[5575] Fix | Delete
$output .= sprintf(
[5576] Fix | Delete
'<label><input type="checkbox" name="et_font_weight[]" value="%1$s" />%2$s %3$s</label>',
[5577] Fix | Delete
esc_attr( $number ),
[5578] Fix | Delete
esc_html( $name ),
[5579] Fix | Delete
esc_html( $number )
[5580] Fix | Delete
);
[5581] Fix | Delete
}
[5582] Fix | Delete
[5583] Fix | Delete
return $output;
[5584] Fix | Delete
}
[5585] Fix | Delete
[5586] Fix | Delete
/**
[5587] Fix | Delete
* Return regular and specialty layouts.
[5588] Fix | Delete
*
[5589] Fix | Delete
* @return mixed|void
[5590] Fix | Delete
*/
[5591] Fix | Delete
function et_builder_get_columns() {
[5592] Fix | Delete
$columns = array(
[5593] Fix | Delete
'specialty' => array(
[5594] Fix | Delete
'1_2,1_2' => array(
[5595] Fix | Delete
'position' => '1,0',
[5596] Fix | Delete
'columns' => '3',
[5597] Fix | Delete
),
[5598] Fix | Delete
'1_2,1_2' => array(
[5599] Fix | Delete
'position' => '0,1',
[5600] Fix | Delete
'columns' => '3',
[5601] Fix | Delete
),
[5602] Fix | Delete
'1_4,3_4' => array(
[5603] Fix | Delete
'position' => '0,1',
[5604] Fix | Delete
'columns' => '3',
[5605] Fix | Delete
),
[5606] Fix | Delete
'3_4,1_4' => array(
[5607] Fix | Delete
'position' => '1,0',
[5608] Fix | Delete
'columns' => '3',
[5609] Fix | Delete
),
[5610] Fix | Delete
'1_4,1_4,1_2' => array(
[5611] Fix | Delete
'position' => '0,0,1',
[5612] Fix | Delete
'columns' => '3',
[5613] Fix | Delete
),
[5614] Fix | Delete
'1_2,1_4,1_4' => array(
[5615] Fix | Delete
'position' => '1,0,0',
[5616] Fix | Delete
'columns' => '3',
[5617] Fix | Delete
),
[5618] Fix | Delete
'1_4,1_2,1_4' => array(
[5619] Fix | Delete
'position' => '0,1,0',
[5620] Fix | Delete
'columns' => '3',
[5621] Fix | Delete
),
[5622] Fix | Delete
'1_3,2_3' => array(
[5623] Fix | Delete
'position' => '0,1',
[5624] Fix | Delete
'columns' => '4',
[5625] Fix | Delete
),
[5626] Fix | Delete
'2_3,1_3' => array(
[5627] Fix | Delete
'position' => '1,0',
[5628] Fix | Delete
'columns' => '4',
[5629] Fix | Delete
),
[5630] Fix | Delete
),
[5631] Fix | Delete
'regular' => array(
[5632] Fix | Delete
'4_4',
[5633] Fix | Delete
'1_2,1_2',
[5634] Fix | Delete
'1_3,1_3,1_3',
[5635] Fix | Delete
'1_4,1_4,1_4,1_4',
[5636] Fix | Delete
'1_5,1_5,1_5,1_5,1_5',
[5637] Fix | Delete
'1_6,1_6,1_6,1_6,1_6,1_6',
[5638] Fix | Delete
'2_5,3_5',
[5639] Fix | Delete
'3_5,2_5',
[5640] Fix | Delete
'1_3,2_3',
[5641] Fix | Delete
'2_3,1_3',
[5642] Fix | Delete
'1_4,3_4',
[5643] Fix | Delete
'3_4,1_4',
[5644] Fix | Delete
'1_4,1_2,1_4',
[5645] Fix | Delete
'1_5,3_5,1_5',
[5646] Fix | Delete
'1_4,1_4,1_2',
[5647] Fix | Delete
'1_2,1_4,1_4',
[5648] Fix | Delete
'1_5,1_5,3_5',
[5649] Fix | Delete
'3_5,1_5,1_5',
[5650] Fix | Delete
'1_6,1_6,1_6,1_2',
[5651] Fix | Delete
'1_2,1_6,1_6,1_6',
[5652] Fix | Delete
),
[5653] Fix | Delete
);
[5654] Fix | Delete
[5655] Fix | Delete
return apply_filters( 'et_builder_get_columns', $columns );
[5656] Fix | Delete
}
[5657] Fix | Delete
[5658] Fix | Delete
/**
[5659] Fix | Delete
* Return columns layout.
[5660] Fix | Delete
*
[5661] Fix | Delete
* @return mixed|void
[5662] Fix | Delete
*/
[5663] Fix | Delete
function et_builder_get_columns_layout() {
[5664] Fix | Delete
$layout_columns =
[5665] Fix | Delete
'<% if ( typeof et_pb_specialty !== \'undefined\' && et_pb_specialty === \'on\' ) { %>
[5666] Fix | Delete
<li data-layout="1_2,1_2" data-specialty="1,0" data-specialty_columns="3">
[5667] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_2 et_pb_variations et_pb_3_variations">
[5668] Fix | Delete
<div class="et_pb_variation et_pb_variation_full"></div>
[5669] Fix | Delete
<div class="et_pb_variation_row">
[5670] Fix | Delete
<div class="et_pb_variation et_pb_variation_1_2"></div>
[5671] Fix | Delete
<div class="et_pb_variation et_pb_variation_1_2"></div>
[5672] Fix | Delete
</div>
[5673] Fix | Delete
<div class="et_pb_variation_row">
[5674] Fix | Delete
<div class="et_pb_variation et_pb_variation_1_3"></div>
[5675] Fix | Delete
<div class="et_pb_variation et_pb_variation_1_3"></div>
[5676] Fix | Delete
<div class="et_pb_variation et_pb_variation_1_3"></div>
[5677] Fix | Delete
</div>
[5678] Fix | Delete
</div>
[5679] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_2 et_pb_specialty_column"></div>
[5680] Fix | Delete
</li>
[5681] Fix | Delete
[5682] Fix | Delete
<li data-layout="1_2,1_2" data-specialty="0,1" data-specialty_columns="3">
[5683] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_2 et_pb_specialty_column"></div>
[5684] Fix | Delete
[5685] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_2 et_pb_variations et_pb_3_variations">
[5686] Fix | Delete
<div class="et_pb_variation et_pb_variation_full"></div>
[5687] Fix | Delete
<div class="et_pb_variation_row">
[5688] Fix | Delete
<div class="et_pb_variation et_pb_variation_1_2"></div>
[5689] Fix | Delete
<div class="et_pb_variation et_pb_variation_1_2"></div>
[5690] Fix | Delete
</div>
[5691] Fix | Delete
<div class="et_pb_variation_row">
[5692] Fix | Delete
<div class="et_pb_variation et_pb_variation_1_3"></div>
[5693] Fix | Delete
<div class="et_pb_variation et_pb_variation_1_3"></div>
[5694] Fix | Delete
<div class="et_pb_variation et_pb_variation_1_3"></div>
[5695] Fix | Delete
</div>
[5696] Fix | Delete
</div>
[5697] Fix | Delete
</li>
[5698] Fix | Delete
[5699] Fix | Delete
<li data-layout="1_4,3_4" data-specialty="0,1" data-specialty_columns="3">
[5700] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_4 et_pb_specialty_column"></div>
[5701] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_3_4 et_pb_variations et_pb_3_variations">
[5702] Fix | Delete
<div class="et_pb_variation et_pb_variation_full"></div>
[5703] Fix | Delete
<div class="et_pb_variation_row">
[5704] Fix | Delete
<div class="et_pb_variation et_pb_variation_1_2"></div>
[5705] Fix | Delete
<div class="et_pb_variation et_pb_variation_1_2"></div>
[5706] Fix | Delete
</div>
[5707] Fix | Delete
<div class="et_pb_variation_row">
[5708] Fix | Delete
<div class="et_pb_variation et_pb_variation_1_3"></div>
[5709] Fix | Delete
<div class="et_pb_variation et_pb_variation_1_3"></div>
[5710] Fix | Delete
<div class="et_pb_variation et_pb_variation_1_3"></div>
[5711] Fix | Delete
</div>
[5712] Fix | Delete
</div>
[5713] Fix | Delete
</li>
[5714] Fix | Delete
[5715] Fix | Delete
<li data-layout="3_4,1_4" data-specialty="1,0" data-specialty_columns="3">
[5716] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_3_4 et_pb_variations et_pb_3_variations">
[5717] Fix | Delete
<div class="et_pb_variation et_pb_variation_full"></div>
[5718] Fix | Delete
<div class="et_pb_variation_row">
[5719] Fix | Delete
<div class="et_pb_variation et_pb_variation_1_2"></div>
[5720] Fix | Delete
<div class="et_pb_variation et_pb_variation_1_2"></div>
[5721] Fix | Delete
</div>
[5722] Fix | Delete
<div class="et_pb_variation_row">
[5723] Fix | Delete
<div class="et_pb_variation et_pb_variation_1_3"></div>
[5724] Fix | Delete
<div class="et_pb_variation et_pb_variation_1_3"></div>
[5725] Fix | Delete
<div class="et_pb_variation et_pb_variation_1_3"></div>
[5726] Fix | Delete
</div>
[5727] Fix | Delete
</div>
[5728] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_4 et_pb_specialty_column"></div>
[5729] Fix | Delete
</li>
[5730] Fix | Delete
[5731] Fix | Delete
<li data-layout="1_4,1_2,1_4" data-specialty="0,1,0" data-specialty_columns="3">
[5732] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_4 et_pb_specialty_column"></div>
[5733] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_2 et_pb_variations et_pb_3_variations">
[5734] Fix | Delete
<div class="et_pb_variation et_pb_variation_full"></div>
[5735] Fix | Delete
<div class="et_pb_variation_row">
[5736] Fix | Delete
<div class="et_pb_variation et_pb_variation_1_2"></div>
[5737] Fix | Delete
<div class="et_pb_variation et_pb_variation_1_2"></div>
[5738] Fix | Delete
</div>
[5739] Fix | Delete
<div class="et_pb_variation_row">
[5740] Fix | Delete
<div class="et_pb_variation et_pb_variation_1_3"></div>
[5741] Fix | Delete
<div class="et_pb_variation et_pb_variation_1_3"></div>
[5742] Fix | Delete
<div class="et_pb_variation et_pb_variation_1_3"></div>
[5743] Fix | Delete
</div>
[5744] Fix | Delete
</div>
[5745] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_4 et_pb_specialty_column"></div>
[5746] Fix | Delete
</li>
[5747] Fix | Delete
[5748] Fix | Delete
<li data-layout="1_2,1_4,1_4" data-specialty="1,0,0" data-specialty_columns="3">
[5749] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_2 et_pb_variations et_pb_3_variations">
[5750] Fix | Delete
<div class="et_pb_variation et_pb_variation_full"></div>
[5751] Fix | Delete
<div class="et_pb_variation_row">
[5752] Fix | Delete
<div class="et_pb_variation et_pb_variation_1_2"></div>
[5753] Fix | Delete
<div class="et_pb_variation et_pb_variation_1_2"></div>
[5754] Fix | Delete
</div>
[5755] Fix | Delete
<div class="et_pb_variation_row">
[5756] Fix | Delete
<div class="et_pb_variation et_pb_variation_1_3"></div>
[5757] Fix | Delete
<div class="et_pb_variation et_pb_variation_1_3"></div>
[5758] Fix | Delete
<div class="et_pb_variation et_pb_variation_1_3"></div>
[5759] Fix | Delete
</div>
[5760] Fix | Delete
</div>
[5761] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_4 et_pb_specialty_column"></div>
[5762] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_4 et_pb_specialty_column"></div>
[5763] Fix | Delete
</li>
[5764] Fix | Delete
[5765] Fix | Delete
<li data-layout="1_4,1_4,1_2" data-specialty="0,0,1" data-specialty_columns="3">
[5766] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_4 et_pb_specialty_column"></div>
[5767] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_4 et_pb_specialty_column"></div>
[5768] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_2 et_pb_variations et_pb_3_variations">
[5769] Fix | Delete
<div class="et_pb_variation et_pb_variation_full"></div>
[5770] Fix | Delete
<div class="et_pb_variation_row">
[5771] Fix | Delete
<div class="et_pb_variation et_pb_variation_1_2"></div>
[5772] Fix | Delete
<div class="et_pb_variation et_pb_variation_1_2"></div>
[5773] Fix | Delete
</div>
[5774] Fix | Delete
<div class="et_pb_variation_row">
[5775] Fix | Delete
<div class="et_pb_variation et_pb_variation_1_3"></div>
[5776] Fix | Delete
<div class="et_pb_variation et_pb_variation_1_3"></div>
[5777] Fix | Delete
<div class="et_pb_variation et_pb_variation_1_3"></div>
[5778] Fix | Delete
</div>
[5779] Fix | Delete
</div>
[5780] Fix | Delete
</li>
[5781] Fix | Delete
[5782] Fix | Delete
<li data-layout="1_3,2_3" data-specialty="0,1" data-specialty_columns="4">
[5783] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_3 et_pb_specialty_column"></div>
[5784] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_2_3 et_pb_variations et_pb_3_variations">
[5785] Fix | Delete
<div class="et_pb_variation et_pb_variation_full"></div>
[5786] Fix | Delete
<div class="et_pb_variation_row">
[5787] Fix | Delete
<div class="et_pb_variation et_pb_variation_1_2"></div>
[5788] Fix | Delete
<div class="et_pb_variation et_pb_variation_1_2"></div>
[5789] Fix | Delete
</div>
[5790] Fix | Delete
<div class="et_pb_variation_row">
[5791] Fix | Delete
<div class="et_pb_variation et_pb_variation_1_4"></div>
[5792] Fix | Delete
<div class="et_pb_variation et_pb_variation_1_4"></div>
[5793] Fix | Delete
<div class="et_pb_variation et_pb_variation_1_4"></div>
[5794] Fix | Delete
<div class="et_pb_variation et_pb_variation_1_4"></div>
[5795] Fix | Delete
</div>
[5796] Fix | Delete
</div>
[5797] Fix | Delete
</li>
[5798] Fix | Delete
[5799] Fix | Delete
<li data-layout="2_3,1_3" data-specialty="1,0" data-specialty_columns="4">
[5800] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_2_3 et_pb_variations et_pb_3_variations">
[5801] Fix | Delete
<div class="et_pb_variation et_pb_variation_full"></div>
[5802] Fix | Delete
<div class="et_pb_variation_row">
[5803] Fix | Delete
<div class="et_pb_variation et_pb_variation_1_2"></div>
[5804] Fix | Delete
<div class="et_pb_variation et_pb_variation_1_2"></div>
[5805] Fix | Delete
</div>
[5806] Fix | Delete
<div class="et_pb_variation_row">
[5807] Fix | Delete
<div class="et_pb_variation et_pb_variation_1_4"></div>
[5808] Fix | Delete
<div class="et_pb_variation et_pb_variation_1_4"></div>
[5809] Fix | Delete
<div class="et_pb_variation et_pb_variation_1_4"></div>
[5810] Fix | Delete
<div class="et_pb_variation et_pb_variation_1_4"></div>
[5811] Fix | Delete
</div>
[5812] Fix | Delete
</div>
[5813] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_3 et_pb_specialty_column"></div>
[5814] Fix | Delete
</li>
[5815] Fix | Delete
<% } else if ( typeof view !== \'undefined\' && typeof view.model.attributes.specialty_columns !== \'undefined\' ) { %>
[5816] Fix | Delete
<li data-layout="4_4">
[5817] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_fullwidth"></div>
[5818] Fix | Delete
</li>
[5819] Fix | Delete
<li data-layout="1_2,1_2">
[5820] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_2"></div>
[5821] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_2"></div>
[5822] Fix | Delete
</li>
[5823] Fix | Delete
<% if ( view.model.attributes.layout === "2_3" ) { %>
[5824] Fix | Delete
<li data-layout="1_4,1_4,1_4,1_4">
[5825] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_4"></div>
[5826] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_4"></div>
[5827] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_4"></div>
[5828] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_4"></div>
[5829] Fix | Delete
</li>
[5830] Fix | Delete
<% } else { %>
[5831] Fix | Delete
<li data-layout="1_3,1_3,1_3">
[5832] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_3"></div>
[5833] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_3"></div>
[5834] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_3"></div>
[5835] Fix | Delete
</li>
[5836] Fix | Delete
<% } %>
[5837] Fix | Delete
<% } else { %>
[5838] Fix | Delete
<li data-layout="4_4">
[5839] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_fullwidth"></div>
[5840] Fix | Delete
</li>
[5841] Fix | Delete
<li data-layout="1_2,1_2">
[5842] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_2"></div>
[5843] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_2"></div>
[5844] Fix | Delete
</li>
[5845] Fix | Delete
<li data-layout="1_3,1_3,1_3">
[5846] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_3"></div>
[5847] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_3"></div>
[5848] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_3"></div>
[5849] Fix | Delete
</li>
[5850] Fix | Delete
<li data-layout="1_4,1_4,1_4,1_4">
[5851] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_4"></div>
[5852] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_4"></div>
[5853] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_4"></div>
[5854] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_4"></div>
[5855] Fix | Delete
</li>
[5856] Fix | Delete
<li data-layout="1_5,1_5,1_5,1_5,1_5">
[5857] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_5"></div>
[5858] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_5"></div>
[5859] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_5"></div>
[5860] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_5"></div>
[5861] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_5"></div>
[5862] Fix | Delete
</li>
[5863] Fix | Delete
<li data-layout="1_6,1_6,1_6,1_6,1_6,1_6">
[5864] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_6"></div>
[5865] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_6"></div>
[5866] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_6"></div>
[5867] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_6"></div>
[5868] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_6"></div>
[5869] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_6"></div>
[5870] Fix | Delete
</li>
[5871] Fix | Delete
<li data-layout="2_5,3_5">
[5872] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_2_5"></div>
[5873] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_3_5"></div>
[5874] Fix | Delete
</li>
[5875] Fix | Delete
<li data-layout="3_5,2_5">
[5876] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_3_5"></div>
[5877] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_2_5"></div>
[5878] Fix | Delete
</li>
[5879] Fix | Delete
<li data-layout="1_3,2_3">
[5880] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_3"></div>
[5881] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_2_3"></div>
[5882] Fix | Delete
</li>
[5883] Fix | Delete
<li data-layout="2_3,1_3">
[5884] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_2_3"></div>
[5885] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_3"></div>
[5886] Fix | Delete
</li>
[5887] Fix | Delete
<li data-layout="1_4,3_4">
[5888] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_4"></div>
[5889] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_3_4"></div>
[5890] Fix | Delete
</li>
[5891] Fix | Delete
<li data-layout="3_4,1_4">
[5892] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_3_4"></div>
[5893] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_4"></div>
[5894] Fix | Delete
</li>
[5895] Fix | Delete
<li data-layout="1_4,1_2,1_4">
[5896] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_4"></div>
[5897] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_2"></div>
[5898] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_4"></div>
[5899] Fix | Delete
</li>
[5900] Fix | Delete
<li data-layout="1_5,3_5,1_5">
[5901] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_5"></div>
[5902] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_3_5"></div>
[5903] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_5"></div>
[5904] Fix | Delete
</li>
[5905] Fix | Delete
<li data-layout="1_4,1_4,1_2">
[5906] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_4"></div>
[5907] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_4"></div>
[5908] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_2"></div>
[5909] Fix | Delete
</li>
[5910] Fix | Delete
<li data-layout="1_2,1_4,1_4">
[5911] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_2"></div>
[5912] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_4"></div>
[5913] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_4"></div>
[5914] Fix | Delete
</li>
[5915] Fix | Delete
<li data-layout="1_5,1_5,3_5">
[5916] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_5"></div>
[5917] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_5"></div>
[5918] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_3_5"></div>
[5919] Fix | Delete
</li>
[5920] Fix | Delete
<li data-layout="3_5,1_5,1_5">
[5921] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_3_5"></div>
[5922] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_5"></div>
[5923] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_5"></div>
[5924] Fix | Delete
</li>
[5925] Fix | Delete
<li data-layout="1_6,1_6,1_6,1_2">
[5926] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_6"></div>
[5927] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_6"></div>
[5928] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_6"></div>
[5929] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_2"></div>
[5930] Fix | Delete
</li>
[5931] Fix | Delete
<li data-layout="1_2,1_6,1_6,1_6">
[5932] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_2"></div>
[5933] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_6"></div>
[5934] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_6"></div>
[5935] Fix | Delete
<div class="et_pb_layout_column et_pb_column_layout_1_6"></div>
[5936] Fix | Delete
</li>
[5937] Fix | Delete
<%
[5938] Fix | Delete
}
[5939] Fix | Delete
%>';
[5940] Fix | Delete
[5941] Fix | Delete
return apply_filters( 'et_builder_layout_columns', $layout_columns );
[5942] Fix | Delete
}
[5943] Fix | Delete
[5944] Fix | Delete
/**
[5945] Fix | Delete
* Display meta box in admin screen.
[5946] Fix | Delete
*/
[5947] Fix | Delete
function et_pb_pagebuilder_meta_box() {
[5948] Fix | Delete
global $typenow, $post;
[5949] Fix | Delete
[5950] Fix | Delete
do_action( 'et_pb_before_page_builder' );
[5951] Fix | Delete
[5952] Fix | Delete
if ( et_builder_bfb_enabled() ) {
[5953] Fix | Delete
$new_page_url = false;
[5954] Fix | Delete
$is_new_page = false;
[5955] Fix | Delete
$edit_page_id = get_the_ID();
[5956] Fix | Delete
$no_rtl_class = is_rtl() && 'on' === et_get_option( 'divi_disable_translations', 'off' ) ? 'et-fb-no-rtl' : '';
[5957] Fix | Delete
[5958] Fix | Delete
// Polylang creates copy of page and BFB should be loaded on page which is not saved yet and cannot be loaded on FE
[5959] Fix | Delete
// Therefore load the homepage and replace the content for BFB to make it load with content from other post.
[5960] Fix | Delete
if ( 'add' === get_current_screen()->action || (int) get_option( 'page_for_posts' ) === $edit_page_id ) {
[5961] Fix | Delete
$new_page_url = get_home_url();
[5962] Fix | Delete
$is_new_page = true;
[5963] Fix | Delete
}
[5964] Fix | Delete
[5965] Fix | Delete
$bfb_url = et_core_intentionally_unescaped( et_fb_get_bfb_url( $new_page_url, $is_new_page, $edit_page_id ), 'fixed_string' );
[5966] Fix | Delete
// If Admin is SSL but FE is not, we need to fix VB url or it won't work
[5967] Fix | Delete
// because trying to load insecure resource.
[5968] Fix | Delete
$bfb_url = set_url_scheme( $bfb_url, is_ssl() ? 'https' : 'http' );
[5969] Fix | Delete
[5970] Fix | Delete
// phpcs:disable WordPress.Security.EscapeOutput -- XSS safe.
[5971] Fix | Delete
echo "
[5972] Fix | Delete
<div class='et_divi_builder et-bfb-page-preloading et_divi_builder_bottom_margin'>
[5973] Fix | Delete
<script>
[5974] Fix | Delete
var iframe = document.body.appendChild(document.createElement('iframe'));
[5975] Fix | Delete
[5976] Fix | Delete
iframe.id = 'et-bfb-app-frame';
[5977] Fix | Delete
[5978] Fix | Delete
document.body.classList.add('et-db');
[5979] Fix | Delete
document.body.classList.add('et-bfb');
[5980] Fix | Delete
[5981] Fix | Delete
if ('' !== '{$no_rtl_class}') {
[5982] Fix | Delete
document.body.classList.add('{$no_rtl_class}');
[5983] Fix | Delete
}
[5984] Fix | Delete
[5985] Fix | Delete
document.addEventListener('DOMContentLoaded', function() {
[5986] Fix | Delete
var outer = jQuery('<div>', {id: 'et-boc', class: 'et-boc'});
[5987] Fix | Delete
var inner = jQuery('<div>', {class: 'et-l'});
[5988] Fix | Delete
var app = jQuery('<div>', {id: 'et-fb-app'});
[5989] Fix | Delete
[5990] Fix | Delete
inner.append(app);
[5991] Fix | Delete
outer.append(inner);
[5992] Fix | Delete
jQuery('#wpwrap').wrap(outer);
[5993] Fix | Delete
[5994] Fix | Delete
jQuery('#et-bfb-app-frame').appendTo('#et_pb_layout .et_divi_builder');
[5995] Fix | Delete
iframe.src = '{$bfb_url}';
[5996] Fix | Delete
[5997] Fix | Delete
// Add first-visible classname to first visible metabox on #normal-sortables
[5998] Fix | Delete
jQuery('#et_pb_layout')
[5999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function