Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/clone/wp-conte.../themes/Divi/includes/builder/feature/gutenber.../blocks
File: Layout.php
return $value;
[500] Fix | Delete
}
[501] Fix | Delete
[502] Fix | Delete
/**
[503] Fix | Delete
* Modify raw post content for visual builder for layout content edit screen
[504] Fix | Delete
*
[505] Fix | Delete
* @since 4.1.0
[506] Fix | Delete
*
[507] Fix | Delete
* @param string $post_content
[508] Fix | Delete
*
[509] Fix | Delete
* @return string modified post content
[510] Fix | Delete
*/
[511] Fix | Delete
public function modify_layout_content_visual_builder_raw_post_content( $post_content ) {
[512] Fix | Delete
if ( self::is_layout_block_preview() ) {
[513] Fix | Delete
// Explicitly set post_id value based on query string because layout block's edit
[514] Fix | Delete
// window of CPT that has no frontend page such as reusable block's `wp_block` CPT
[515] Fix | Delete
// might use other / last post loop for rendering visual builder structure since its
[516] Fix | Delete
// own post data isn't publicly queryable
[517] Fix | Delete
$post_id = intval( et_()->array_get( $_GET, 'et_post_id', get_the_ID() ) );
[518] Fix | Delete
$block_id = sanitize_title( et_()->array_get( $_GET, 'blockId' ) );
[519] Fix | Delete
[520] Fix | Delete
$key = "_et_block_layout_preview_{$block_id}";
[521] Fix | Delete
$post_content = wp_unslash( get_post_meta( $post_id, $key, true ) );
[522] Fix | Delete
}
[523] Fix | Delete
[524] Fix | Delete
return $post_content;
[525] Fix | Delete
}
[526] Fix | Delete
[527] Fix | Delete
/**
[528] Fix | Delete
* Modify Theme Builder body layout that is used on layout block preview
[529] Fix | Delete
*
[530] Fix | Delete
* @since 4.3.4
[531] Fix | Delete
*
[532] Fix | Delete
* @param string $content
[533] Fix | Delete
*
[534] Fix | Delete
* @return string
[535] Fix | Delete
*/
[536] Fix | Delete
public function modify_theme_builder_body_layout( $content ) {
[537] Fix | Delete
// Skip if current request isn't layout block preview
[538] Fix | Delete
if ( ! self::is_layout_block_preview() ) {
[539] Fix | Delete
return $content;
[540] Fix | Delete
}
[541] Fix | Delete
[542] Fix | Delete
// Get `et_pb_post_content` shortcode inside layout by pulling regex and matching it.
[543] Fix | Delete
// `et_pb_post_content` has to exist, otherwise `the_content()` won't be rendered; Return
[544] Fix | Delete
// plain `et_pb_post_content` shortcode if current layout doesn't have any
[545] Fix | Delete
$post_content_regex = get_shortcode_regex( et_theme_builder_get_post_content_modules() );
[546] Fix | Delete
[547] Fix | Delete
preg_match_all( "/$post_content_regex/", $content, $post_content_module, PREG_SET_ORDER );
[548] Fix | Delete
[549] Fix | Delete
$post_content_shortcode = et_()->array_get(
[550] Fix | Delete
$post_content_module,
[551] Fix | Delete
'0.0',
[552] Fix | Delete
'[et_pb_post_content][/et_pb_post_content]'
[553] Fix | Delete
);
[554] Fix | Delete
[555] Fix | Delete
// Return `et_pb_post_content` wrapped by section > row > column which has no unwanted
[556] Fix | Delete
// styling. TB body layout might have any module imaginable while in context of layout block
[557] Fix | Delete
// preview, only `et_pb_post_content` matters because its typography setting can override
[558] Fix | Delete
// default typography styling
[559] Fix | Delete
return '[et_pb_section admin_label="section" custom_padding="0px|0px|0px|0px"]
[560] Fix | Delete
[et_pb_row admin_label="row" custom_padding="0px|0px|0px|0px" custom_margin="0px|0px|0px|0px" width="100%"]
[561] Fix | Delete
[et_pb_column type="4_4"]'. $post_content_shortcode .'[/et_pb_column]
[562] Fix | Delete
[/et_pb_row]
[563] Fix | Delete
[/et_pb_section]';
[564] Fix | Delete
}
[565] Fix | Delete
}
[566] Fix | Delete
[567] Fix | Delete
// Initialize ET_GB_Block_Layout
[568] Fix | Delete
ET_GB_Block_Layout::instance();
[569] Fix | Delete
[570] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function