feat: Divi 5.15.1 freigeben
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
47090621c7
commit
aa1c8b42de
@@ -197,6 +197,20 @@ function update( WP_REST_Request $request ) {
|
||||
// main-query loop post and must not be converted to Divi (#49679).
|
||||
$main_post = get_post( $post_id );
|
||||
$should_persist_main_post = $main_post instanceof \WP_Post && 'singular' === $main_loop_type;
|
||||
|
||||
if (
|
||||
$should_persist_main_post
|
||||
&& $has_post_content_payload
|
||||
&& GlobalLayout::is_global_layout_template( $post_id )
|
||||
&& GlobalLayout::has_component_reference_cycle( $post_id, $post_content )
|
||||
) {
|
||||
return self::response_error(
|
||||
'divi_component_reference_cycle',
|
||||
esc_html__( 'A Component cannot be placed inside itself.', 'et_builder_5' ),
|
||||
[ 'status' => 400 ]
|
||||
);
|
||||
}
|
||||
|
||||
$update = $should_persist_main_post ? wp_update_post( $post_update_data ) : 0;
|
||||
|
||||
$layout_updates = [
|
||||
|
||||
Reference in New Issue
Block a user