true, 'margin' => true, '__experimentalDefaultControls' => array( 'padding' => true, 'margin' => true ) ); // Add color support $args['supports']['color'] = array( 'text' => true, 'background' => true, '__experimentalDefaultControls' => array( 'text' => true, 'background' => true ) ); // Add border support $args['supports']['border'] = array( 'radius' => true, '__experimentalDefaultControls' => array( 'radius' => true ) ); } return $args; }, 10, 2); } add_action('init', 'blynex_enable_image_block_supports', 5); /** * Debug function to verify block supports are enabled * Add ?debug_blocks=1 to any admin URL to see block configurations */ function blynex_debug_block_supports() { if (isset($_GET['debug_blocks']) && $_GET['debug_blocks'] == '1' && current_user_can('manage_options')) { echo '
'; echo '

Image Block Registration Debug

'; $registry = WP_Block_Type_Registry::get_instance(); $image_block = $registry->get_registered('core/image'); $cover_block = $registry->get_registered('core/cover'); echo '

Core/Image Block Supports:

'; echo '
' . print_r($image_block->supports ?? 'No supports found', true) . '
'; echo '

Core/Cover Block Supports:

'; echo '
' . print_r($cover_block->supports ?? 'No supports found', true) . '
'; echo '

Current Theme JSON Settings:

'; $theme_json = WP_Theme_JSON_Resolver::get_merged_data(); $settings = $theme_json->get_settings(); echo '
Global Color Settings:
'; echo '
' . print_r($settings['color'] ?? 'No color settings', true) . '
'; echo '
Global Spacing Settings:
'; echo '
' . print_r($settings['spacing'] ?? 'No spacing settings', true) . '
'; echo '
'; } } add_action('admin_notices', 'blynex_debug_block_supports');