feat: Divi 5.14.0 freigeben, Version 0.6.1
Divi 5.14.0 ändert SyncToServerController::update(): Vorlieben und Workspace werden nicht mehr dort gespeichert, der Haupt-Post nur noch bei singulären Builder-Speicherungen geschrieben. Die drei nachgebauten Builder-Kennzeichen (_et_pb_use_divi_5, _et_pb_use_builder, _et_pb_show_page_creation) werden unverändert gesetzt – Referenz und Fingerabdruck per `wp lit-mcp divi-check --update-reference` nachgezogen, Prüfung und divi-write-smoke.sh gegen 5.14.0 grün. 5.14.0 steht damit in DiviReleases::TESTED. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
1b73f0652a
commit
e5f0c65eb0
+5
-1
@@ -4,7 +4,7 @@ Tags: mcp, ai, divi, pods, oauth
|
||||
Requires at least: 6.9
|
||||
Tested up to: 7.1
|
||||
Requires PHP: 8.1
|
||||
Stable tag: 0.6.0
|
||||
Stable tag: 0.6.1
|
||||
License: GPL-2.0-or-later
|
||||
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
@@ -196,6 +196,10 @@ LIT MCP schreibt nur mit Divi-Versionen, die für diese Plugin-Version geprüft
|
||||
|
||||
== Changelog ==
|
||||
|
||||
= 0.6.1 =
|
||||
* Divi 5.14.0 geprüft und freigegeben (Referenz von SyncToServerController::update() nachgezogen; die Builder-Kennzeichen werden unverändert gesetzt).
|
||||
* Admin: Gruppenschalter im Reiter „Tools“ wirken sofort sichtbar; Protokollfilter auch auf Telefonen; „Protokoll leeren“ nur bei Einträgen und mit Anzahl; Hinweis zur Divi-Prüfung; Rückfrage vor dem Aussperren im Reiter „Zugriff“.
|
||||
|
||||
= 0.6.0 =
|
||||
* Divi-Absicherung: Divi-Zugriffe gebündelt in Adaptern mit Manifest; Fingerabdrücke der nachgebildeten Divi-Funktionen.
|
||||
* Ungetestete oder veränderte Divi-Versionen sperren alle schreibenden Divi-Wege (divi_untested / divi_incompatible); lesende Divi-Werkzeuge melden es in warnings.
|
||||
|
||||
@@ -12,5 +12,5 @@ defined('ABSPATH') || exit;
|
||||
*/
|
||||
final class DiviReleases
|
||||
{
|
||||
public const TESTED = ['5.2.1'];
|
||||
public const TESTED = ['5.2.1', '5.14.0'];
|
||||
}
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
"tb-api-save": "7ba452f4d73c9b676281ca6ddcfddd669502965db868bf478ef7804937e5bfc4",
|
||||
"tb-load-setting-options": "2ea0a6925a1da5522489a417104b384b2bd77a16b25f4122b9503873a4c8a24e",
|
||||
"tb-store-template": "3bf4ac6028ed99ed8ac3523c659392a5fce7818ef8a80ea226e01f5404eb441d",
|
||||
"vb-sync-flags": "f8e85421197b0f823219dad6081af7e47f9b4e388c45e162e9188f892766fde9"
|
||||
"vb-sync-flags": "6f290c0b8024ec2d391de22ca8dcdb7f58954ddeeaded64134245a0941864924"
|
||||
}
|
||||
|
||||
+1
-1
@@ -51,7 +51,7 @@ defined('ABSPATH') || exit;
|
||||
*/
|
||||
final class Plugin
|
||||
{
|
||||
public const VERSION = '0.6.0';
|
||||
public const VERSION = '0.6.1';
|
||||
|
||||
private static string $pluginFile = '';
|
||||
private static ?SettingsPage $settingsPage = null;
|
||||
|
||||
@@ -2,11 +2,9 @@ function update( WP_REST_Request $request ) {
|
||||
$post_id = (int) $request->get_param( 'post_id' );
|
||||
$post_status = $request->get_param( 'post_status' );
|
||||
$content = $request->get_param( 'content' );
|
||||
$preferences = $request->get_param( 'preferences' );
|
||||
$page_settings_by_layout = $request->get_param( 'pageSettingsByLayout' );
|
||||
$sync_type = $request->get_param( 'syncType' );
|
||||
$options = $request->get_param( 'options' );
|
||||
$workspace = $request->get_param( 'workspace' );
|
||||
$prime_cache_url = $request->get_param( 'prime_cache_url' );
|
||||
$main_loop_type = $request->get_param( 'mainLoopType' );
|
||||
$main_loop_type = is_string( $main_loop_type ) ? $main_loop_type : 'singular';
|
||||
@@ -48,9 +46,9 @@ function update( WP_REST_Request $request ) {
|
||||
: [];
|
||||
|
||||
// Guardrail: never allow empty placeholder-only payloads to overwrite Theme Builder layouts.
|
||||
$header_has_content = self::_has_meaningful_layout_content( $header_content );
|
||||
$body_has_content = self::_has_meaningful_layout_content( $body_content );
|
||||
$footer_has_content = self::_has_meaningful_layout_content( $footer_content );
|
||||
$header_has_content = SavingUtility::has_meaningful_layout_content( $header_content );
|
||||
$body_has_content = SavingUtility::has_meaningful_layout_content( $body_content );
|
||||
$footer_has_content = SavingUtility::has_meaningful_layout_content( $footer_content );
|
||||
|
||||
if ( ! $header_has_content ) {
|
||||
$header_post_id = 0;
|
||||
@@ -194,9 +192,12 @@ function update( WP_REST_Request $request ) {
|
||||
}
|
||||
}
|
||||
|
||||
$main_post = get_post( $post_id );
|
||||
$has_main_post_context = $main_post instanceof \WP_Post;
|
||||
$update = $has_main_post_context ? wp_update_post( $post_update_data ) : 0;
|
||||
// Persist main post content/meta only for singular VB saves.
|
||||
// On non-singular pages (home/archive), request post_id may be the first
|
||||
// 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;
|
||||
$update = $should_persist_main_post ? wp_update_post( $post_update_data ) : 0;
|
||||
|
||||
$layout_updates = [
|
||||
[
|
||||
@@ -321,9 +322,9 @@ function update( WP_REST_Request $request ) {
|
||||
// all post meta (including appended canvas content) is available.
|
||||
SavingUtility::prime_page_cache_on_save( $post_id, $prime_cache_url );
|
||||
|
||||
if ( ( $update && ! is_wp_error( $update ) ) || ( ! $has_main_post_context && ! is_wp_error( $update ) ) ) {
|
||||
if ( ( $update && ! is_wp_error( $update ) ) || ( ! $should_persist_main_post && ! is_wp_error( $update ) ) ) {
|
||||
// Update post meta so we know D5 is used and Readiness migrator will skip it.
|
||||
if ( $has_main_post_context ) {
|
||||
if ( $should_persist_main_post ) {
|
||||
update_post_meta( $post_id, '_et_pb_use_divi_5', 'on' );
|
||||
// Also set the legacy meta for backward compatibility with D4 components.
|
||||
update_post_meta( $post_id, '_et_pb_use_builder', 'on' );
|
||||
@@ -350,17 +351,6 @@ function update( WP_REST_Request $request ) {
|
||||
update_post_meta( $layout_id, '_et_pb_use_builder', 'on' );
|
||||
}
|
||||
|
||||
$preferences = SavingUtility::sanitize_app_preferences( $preferences );
|
||||
foreach ( $preferences as $preference_key => $preference_value ) {
|
||||
$option_name = 'et_fb_pref_' . $preference_key;
|
||||
et_update_option( $option_name, $preference_value );
|
||||
}
|
||||
|
||||
// Updated last used workspace.
|
||||
$last_used_workspace = $workspace['last-used'] ?? [];
|
||||
|
||||
Workspace::update_item( 'builtIn', 'last-used', $last_used_workspace );
|
||||
|
||||
/**
|
||||
* Action hook to fire when the Post is updated.
|
||||
*
|
||||
@@ -385,8 +375,8 @@ function update( WP_REST_Request $request ) {
|
||||
*/
|
||||
do_action( 'divi_visual_builder_rest_update_post', $post_id );
|
||||
|
||||
$saved_post_content = $has_main_post_context ? get_post_field( 'post_content', $update ) : $post_content;
|
||||
$verification = $has_main_post_context
|
||||
$saved_post_content = $should_persist_main_post ? get_post_field( 'post_content', $update ) : $post_content;
|
||||
$verification = $should_persist_main_post
|
||||
? self::_verify_post_content_matches_after_sanitization( $post_content, $saved_post_content )
|
||||
: true;
|
||||
|
||||
@@ -417,7 +407,7 @@ function update( WP_REST_Request $request ) {
|
||||
|
||||
$return_rendered_content = $options['return_rendered_content'] ?? false;
|
||||
|
||||
if ( $return_rendered_content && $has_main_post_context ) {
|
||||
if ( $return_rendered_content && $should_persist_main_post ) {
|
||||
// Replace dynamic data in the content with the actual value.
|
||||
$normalized_content = DynamicData::get_processed_dynamic_data( $saved_post_content, $post_id, true );
|
||||
|
||||
@@ -429,7 +419,7 @@ function update( WP_REST_Request $request ) {
|
||||
|
||||
return self::response_success(
|
||||
[
|
||||
'post_status' => $has_main_post_context ? get_post_status( $update ) : $post_status,
|
||||
'post_status' => $should_persist_main_post ? get_post_status( $update ) : $post_status,
|
||||
'save_verification' => $save_verification_filtered,
|
||||
'rendered_content' => $rendered_content,
|
||||
]
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
/**
|
||||
* Plugin Name: WP-LIT-MCP
|
||||
* Description: MCP-Server für WordPress, Divi 5 und Pods – mit OAuth für KI-Assistenten.
|
||||
* Version: 0.6.0
|
||||
* Version: 0.6.1
|
||||
* Requires at least: 6.9
|
||||
* Requires PHP: 8.1
|
||||
* Tested up to: 7.1
|
||||
|
||||
Reference in New Issue
Block a user