refactor: Divi pages adapter replaces DiviFlags
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -6,6 +6,7 @@ namespace LIT\MCP\Integrations\WordPress\Content;
|
||||
|
||||
use LIT\MCP\Abilities\JsonMap;
|
||||
use LIT\MCP\Abilities\Rev;
|
||||
use LIT\MCP\Integrations\Divi\Pages\DiviPages;
|
||||
use LIT\MCP\Integrations\Divi\Schema\DiviModules;
|
||||
use LIT\MCP\Integrations\WordPress\Schema\ContentSchema;
|
||||
use LIT\MCP\Integrations\WordPress\Schema\FieldDefinition;
|
||||
@@ -95,7 +96,7 @@ class PostPresenter
|
||||
|
||||
public static function usesDivi(WP_Post $post): bool
|
||||
{
|
||||
return get_post_meta((int) $post->ID, '_et_pb_use_builder', true) === 'on'
|
||||
return DiviPages::usesBuilder((int) $post->ID)
|
||||
|| str_contains((string) $post->post_content, '<!-- wp:divi/');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user