Home / Admin / WpPages_DIR_AB_ACF – WordPress Pages Sync ACF Fields (ENHANCED)
Duplicate Snippet

Embed Snippet on Your Site

WpPages_DIR_AB_ACF – WordPress Pages Sync ACF Fields (ENHANCED)

Description: Comprehensive ACF fields for page data with ALL metadata for WhaleSync/Airtable
* Location: Run Everywhere
* Priority: 10

ismail daugherty PRO
<10
Code Preview
php
<?php
/**
 * WPCode Snippet: WordPress Pages Sync ACF Fields (ENHANCED)
 * Description: Comprehensive ACF fields for page data with ALL metadata for WhaleSync/Airtable
 * Location: Run Everywhere
 * Priority: 10
 * 
 * INCLUDES:
 * - URLs & Permalinks (page_url, page_slug)
 * - Author Information (ID, name, email, role)
 * - Date/Time Data (created, modified, published)
 * - RankMath SEO (title, description, keywords, OG, schema)
 * - Access & Visibility (password, comments, visibility)
 * - Custom Taxonomies
 * - Theme Settings
 * - All Special Content Detection (GravityView, Gravity Forms, LifterLMS, iFrames, WP Fusion, Shortcodes, HTML)
 */
defined( 'ABSPATH' ) || exit;
add_action( 'acf/init', function() {
    if ( ! function_exists( 'acf_add_local_field_group' ) ) {
        return;
    }
    acf_add_local_field_group( array(
        'key' => 'group_wp_pages_sync_meta',
        'title' => 'Page Content Analysis',
        'fields' => array(
            
            // ==========================================
            // TAB 1: PAGE OVERVIEW
            // ==========================================
            array(
                'key' => 'field_tab_page_overview',
                'label' => 'Page Overview',
                'name' => '',
                'type' => 'tab',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'placement' => 'top',
                'endpoint' => 0,
            ),
            
            // Quick Access Links
            array(
                'key' => 'field_wp_page_edit_link',
                'label' => '🔗 Edit Original Page',
                'name' => 'wp_page_edit_link',
                'type' => 'url',
                'instructions' => 'Direct link to edit the original WordPress page',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '50',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'prepend' => '',
                'append' => '',
                'maxlength' => '',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_wp_page_view_link',
                'label' => '👁️ View Live Page',
                'name' => 'wp_page_view_link',
                'type' => 'url',
                'instructions' => 'Link to view the page on the frontend',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '50',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'prepend' => '',
                'append' => '',
                'maxlength' => '',
                'readonly' => 1,
            ),
            
            // URLs & Permalinks - CRITICAL FOR AIRTABLE
            array(
                'key' => 'field_wp_page_url',
                'label' => '🌐 Full Page URL',
                'name' => 'page_url',
                'type' => 'url',
                'instructions' => 'Complete permalink to the live page (CRITICAL for Airtable)',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '70',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'prepend' => '',
                'append' => '',
                'maxlength' => '',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_wp_page_slug',
                'label' => 'Page Slug',
                'name' => 'page_slug',
                'type' => 'text',
                'instructions' => 'URL-friendly slug',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '30',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'prepend' => '',
                'append' => '',
                'maxlength' => '',
                'readonly' => 1,
            ),
            
            // Basic Page Info
            array(
                'key' => 'field_wp_page_id',
                'label' => 'Page ID',
                'name' => 'page_id',
                'type' => 'number',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '20',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'prepend' => '',
                'append' => '',
                'min' => '',
                'max' => '',
                'step' => '',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_wp_page_status',
                'label' => 'Page Status',
                'name' => 'page_status',
                'type' => 'select',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '20',
                    'class' => '',
                    'id' => '',
                ),
                'choices' => array(
                    'publish' => 'Published',
                    'draft' => 'Draft',
                    'pending' => 'Pending',
                    'private' => 'Private',
                    'future' => 'Scheduled',
                ),
                'default_value' => false,
                'allow_null' => 0,
                'multiple' => 0,
                'ui' => 0,
                'return_format' => 'value',
                'ajax' => 0,
                'placeholder' => '',
                'disabled' => 1,
                'readonly' => 1,
            ),
            array(
                'key' => 'field_wp_page_template',
                'label' => 'Page Template',
                'name' => 'page_template',
                'type' => 'text',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '30',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'prepend' => '',
                'append' => '',
                'maxlength' => '',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_wp_page_parent_id',
                'label' => 'Parent Page ID',
                'name' => 'page_parent_id',
                'type' => 'number',
                'instructions' => '0 = Top-level page',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '15',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => 0,
                'placeholder' => '',
                'prepend' => '',
                'append' => '',
                'min' => '',
                'max' => '',
                'step' => '',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_wp_page_order',
                'label' => 'Menu Order',
                'name' => 'page_order',
                'type' => 'number',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '15',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => 0,
                'placeholder' => '',
                'prepend' => '',
                'append' => '',
                'min' => '',
                'max' => '',
                'step' => '',
                'readonly' => 1,
            ),
            
            // Author Information
            array(
                'key' => 'field_wp_page_author_id',
                'label' => 'Author ID',
                'name' => 'page_author_id',
                'type' => 'number',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '25',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => 0,
                'placeholder' => '',
                'prepend' => '',
                'append' => '',
                'min' => '',
                'max' => '',
                'step' => '',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_wp_page_author_name',
                'label' => 'Author Name',
                'name' => 'page_author_name',
                'type' => 'text',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '25',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'prepend' => '',
                'append' => '',
                'maxlength' => '',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_wp_page_author_email',
                'label' => 'Author Email',
                'name' => 'page_author_email',
                'type' => 'email',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '25',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'prepend' => '',
                'append' => '',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_wp_page_author_role',
                'label' => 'Author Role',
                'name' => 'page_author_role',
                'type' => 'text',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '25',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'prepend' => '',
                'append' => '',
                'maxlength' => '',
                'readonly' => 1,
            ),
            
            // Date/Time Information
            array(
                'key' => 'field_wp_page_date_created',
                'label' => 'Date Created',
                'name' => 'page_date_created',
                'type' => 'date_time_picker',
                'instructions' => 'When page was first created',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '33',
                    'class' => '',
                    'id' => '',
                ),
                'display_format' => 'F j, Y g:i a',
                'return_format' => 'Y-m-d H:i:s',
                'first_day' => 1,
                'readonly' => 1,
            ),
            array(
                'key' => 'field_wp_page_date_modified',
                'label' => 'Date Modified',
                'name' => 'page_date_modified',
                'type' => 'date_time_picker',
                'instructions' => 'Last modified date',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '33',
                    'class' => '',
                    'id' => '',
                ),
                'display_format' => 'F j, Y g:i a',
                'return_format' => 'Y-m-d H:i:s',
                'first_day' => 1,
                'readonly' => 1,
            ),
            array(
                'key' => 'field_wp_page_date_published',
                'label' => 'Date Published',
                'name' => 'page_date_published',
                'type' => 'date_time_picker',
                'instructions' => 'When page went live (if published)',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '34',
                    'class' => '',
                    'id' => '',
                ),
                'display_format' => 'F j, Y g:i a',
                'return_format' => 'Y-m-d H:i:s',
                'first_day' => 1,
                'readonly' => 1,
            ),
            
            // Access & Visibility
            array(
                'key' => 'field_wp_page_visibility',
                'label' => 'Page Visibility',
                'name' => 'page_visibility',
                'type' => 'select',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '33',
                    'class' => '',
                    'id' => '',
                ),
                'choices' => array(
                    'public' => 'Public',
                    'private' => 'Private',
                    'password' => 'Password Protected',
                ),
                'default_value' => 'public',
                'allow_null' => 0,
                'multiple' => 0,
                'ui' => 0,
                'return_format' => 'value',
                'ajax' => 0,
                'placeholder' => '',
                'disabled' => 1,
                'readonly' => 1,
            ),
            array(
                'key' => 'field_wp_page_password',
                'label' => 'Password',
                'name' => 'page_password',
                'type' => 'text',
                'instructions' => 'Password if protected',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '33',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'prepend' => '',
                'append' => '',
                'maxlength' => '',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_wp_comment_status',
                'label' => 'Comments',
                'name' => 'comment_status',
                'type' => 'select',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '34',
                    'class' => '',
                    'id' => '',
                ),
                'choices' => array(
                    'open' => 'Open',
                    'closed' => 'Closed',
                ),
                'default_value' => 'closed',
                'allow_null' => 0,
                'multiple' => 0,
                'ui' => 0,
                'return_format' => 'value',
                'ajax' => 0,
                'placeholder' => '',
                'disabled' => 1,
                'readonly' => 1,
            ),
            
            // Block Counts Summary
            array(
                'key' => 'field_wp_blocks_count',
                'label' => 'Total Blocks',
                'name' => 'blocks_count',
                'type' => 'number',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '20',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => 0,
                'placeholder' => '',
                'prepend' => '',
                'append' => '',
                'min' => '',
                'max' => '',
                'step' => '',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_wp_gravityview_count',
                'label' => 'GravityView Blocks',
                'name' => 'gravityview_blocks_count',
                'type' => 'number',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '20',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => 0,
                'placeholder' => '',
                'prepend' => '',
                'append' => '',
                'min' => '',
                'max' => '',
                'step' => '',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_wp_gravityforms_count',
                'label' => 'Gravity Forms Blocks',
                'name' => 'gravity_forms_blocks_count',
                'type' => 'number',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '20',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => 0,
                'placeholder' => '',
                'prepend' => '',
                'append' => '',
                'min' => '',
                'max' => '',
                'step' => '',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_wp_lifterlms_count',
                'label' => 'LifterLMS Blocks',
                'name' => 'lifterlms_blocks_count',
                'type' => 'number',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '20',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => 0,
                'placeholder' => '',
                'prepend' => '',
                'append' => '',
                'min' => '',
                'max' => '',
                'step' => '',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_wp_iframes_count',
                'label' => 'iFrames/Embeds',
                'name' => 'iframes_count',
                'type' => 'number',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '20',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => 0,
                'placeholder' => '',
                'prepend' => '',
                'append' => '',
                'min' => '',
                'max' => '',
                'step' => '',
                'readonly' => 1,
            ),
            
            // Featured Image
            array(
                'key' => 'field_wp_featured_image_url',
                'label' => 'Featured Image URL',
                'name' => 'featured_image_url',
                'type' => 'url',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '50',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'prepend' => '',
                'append' => '',
                'maxlength' => '',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_wp_featured_image_id',
                'label' => 'Featured Image ID',
                'name' => 'featured_image_id',
                'type' => 'number',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '50',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => 0,
                'placeholder' => '',
                'prepend' => '',
                'append' => '',
                'min' => '',
                'max' => '',
                'step' => '',
                'readonly' => 1,
            ),
            
            // Custom Taxonomies
            array(
                'key' => 'field_wp_custom_taxonomies',
                'label' => 'Custom Taxonomies',
                'name' => 'custom_taxonomies',
                'type' => 'textarea',
                'instructions' => 'All custom taxonomy terms assigned to this page',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => 'field-details-monospace',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => 'Custom taxonomy data will appear here after sync...',
                'maxlength' => '',
                'rows' => 8,
                'new_lines' => '',
                'readonly' => 1,
            ),
            
            // Theme-Specific Settings
            array(
                'key' => 'field_wp_theme_settings',
                'label' => 'Theme Settings',
                'name' => 'theme_settings',
                'type' => 'textarea',
                'instructions' => 'Theme-specific page settings (layouts, sidebars, custom CSS, etc.)',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => 'field-details-monospace',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => 'Theme-specific settings will appear here after sync...',
                'maxlength' => '',
                'rows' => 8,
                'new_lines' => '',
                'readonly' => 1,
            ),
            
            // Last Sync
            array(
                'key' => 'field_wp_last_sync',
                'label' => 'Last Synced',
                'name' => 'last_sync',
                'type' => 'date_time_picker',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'display_format' => 'F j, Y g:i a',
                'return_format' => 'Y-m-d H:i:s',
                'first_day' => 1,
                'readonly' => 1,
            ),
            
            // ==========================================
            // TAB 2: RANKMATH SEO
            // ==========================================
            array(
                'key' => 'field_tab_rankmath_seo',
                'label' => 'RankMath SEO',
                'name' => '',
                'type' => 'tab',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'placement' => 'top',
                'endpoint' => 0,
            ),
            
            array(
                'key' => 'field_wp_seo_enabled',
                'label' => 'RankMath Enabled',
                'name' => 'seo_enabled',
                'type' => 'true_false',
                'instructions' => 'Is RankMath SEO configured for this page?',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'message' => '',
                'default_value' => 0,
                'ui' => 1,
                'ui_on_text' => 'Yes',
                'ui_off_text' => 'No',
                'readonly' => 1,
            ),
            
            // SEO Title & Description
            array(
                'key' => 'field_wp_seo_title',
                'label' => 'SEO Title',
                'name' => 'seo_title',
                'type' => 'text',
                'instructions' => 'RankMath meta title',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'prepend' => '',
                'append' => '',
                'maxlength' => '',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_wp_seo_description',
                'label' => 'SEO Description',
                'name' => 'seo_description',
                'type' => 'textarea',
                'instructions' => 'RankMath meta description',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'maxlength' => '',
                'rows' => 3,
                'new_lines' => '',
                'readonly' => 1,
            ),
            
            // Focus Keywords
            array(
                'key' => 'field_wp_seo_focus_keyword',
                'label' => 'Focus Keyword',
                'name' => 'seo_focus_keyword',
                'type' => 'text',
                'instructions' => 'Primary focus keyword',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '50',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'prepend' => '',
                'append' => '',
                'maxlength' => '',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_wp_seo_score',
                'label' => 'SEO Score',
                'name' => 'seo_score',
                'type' => 'text',
                'instructions' => 'RankMath SEO score',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '50',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'prepend' => '',
                'append' => '',
                'maxlength' => '',
                'readonly' => 1,
            ),
            
            // Canonical URL
            array(
                'key' => 'field_wp_seo_canonical',
                'label' => 'Canonical URL',
                'name' => 'seo_canonical_url',
                'type' => 'url',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'prepend' => '',
                'append' => '',
                'maxlength' => '',
                'readonly' => 1,
            ),
            
            // Open Graph Data
            array(
                'key' => 'field_wp_og_title',
                'label' => 'Open Graph Title',
                'name' => 'og_title',
                'type' => 'text',
                'instructions' => 'Social sharing title',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'prepend' => '',
                'append' => '',
                'maxlength' => '',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_wp_og_description',
                'label' => 'Open Graph Description',
                'name' => 'og_description',
                'type' => 'textarea',
                'instructions' => 'Social sharing description',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'maxlength' => '',
                'rows' => 3,
                'new_lines' => '',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_wp_og_image',
                'label' => 'Open Graph Image',
                'name' => 'og_image_url',
                'type' => 'url',
                'instructions' => 'Social sharing image URL',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'prepend' => '',
                'append' => '',
                'maxlength' => '',
                'readonly' => 1,
            ),
            
            // Schema/Robots
            array(
                'key' => 'field_wp_seo_robots',
                'label' => 'Robots Meta',
                'name' => 'seo_robots',
                'type' => 'text',
                'instructions' => 'Robots directives (index, follow, etc.)',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '50',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'prepend' => '',
                'append' => '',
                'maxlength' => '',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_wp_seo_schema_type',
                'label' => 'Schema Type',
                'name' => 'seo_schema_type',
                'type' => 'text',
                'instructions' => 'RankMath schema markup type',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '50',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'prepend' => '',
                'append' => '',
                'maxlength' => '',
                'readonly' => 1,
            ),
            
            // Complete SEO Data
            array(
                'key' => 'field_wp_seo_complete_data',
                'label' => 'Complete SEO Data',
                'name' => 'seo_complete_data',
                'type' => 'textarea',
                'instructions' => 'All RankMath metadata in formatted detail',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => 'field-details-monospace',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => 'Complete RankMath SEO data will appear here after sync...',
                'maxlength' => '',
                'rows' => 15,
                'new_lines' => '',
                'readonly' => 1,
            ),
            
            // ==========================================
            // TAB 3: GRAVITYVIEW BLOCKS
            // ==========================================
            array(
                'key' => 'field_tab_gravityview',
                'label' => 'GravityView Blocks',
                'name' => '',
                'type' => 'tab',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'placement' => 'top',
                'endpoint' => 0,
            ),
            
            array(
                'key' => 'field_wp_has_gravityview',
                'label' => 'Has GravityView Blocks',
                'name' => 'has_gravityview_blocks',
                'type' => 'true_false',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'message' => '',
                'default_value' => 0,
                'ui' => 1,
                'ui_on_text' => 'Yes',
                'ui_off_text' => 'No',
                'readonly' => 1,
            ),
            
            array(
                'key' => 'field_wp_gravityview_details',
                'label' => 'GravityView Block Details',
                'name' => 'gravityview_blocks_details',
                'type' => 'textarea',
                'instructions' => 'Comprehensive GravityView block information including view IDs, titles, connected forms, filters, sort settings, and all special parameters.',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => 'field-details-monospace',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => 'GravityView block details will appear here after sync...',
                'maxlength' => '',
                'rows' => 20,
                'new_lines' => '',
                'readonly' => 1,
            ),
            
            // ==========================================
            // TAB 4: GRAVITY FORMS BLOCKS
            // ==========================================
            array(
                'key' => 'field_tab_gravityforms',
                'label' => 'Gravity Forms Blocks',
                'name' => '',
                'type' => 'tab',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'placement' => 'top',
                'endpoint' => 0,
            ),
            
            array(
                'key' => 'field_wp_has_gravityforms',
                'label' => 'Has Gravity Forms Blocks',
                'name' => 'has_gravity_forms_blocks',
                'type' => 'true_false',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'message' => '',
                'default_value' => 0,
                'ui' => 1,
                'ui_on_text' => 'Yes',
                'ui_off_text' => 'No',
                'readonly' => 1,
            ),
            
            array(
                'key' => 'field_wp_gravityforms_details',
                'label' => 'Gravity Forms Block Details',
                'name' => 'gravity_forms_blocks_details',
                'type' => 'textarea',
                'instructions' => 'Complete Gravity Forms information including form IDs, titles, AJAX settings, confirmations, notifications, and custom CSS.',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => 'field-details-monospace',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => 'Gravity Forms block details will appear here after sync...',
                'maxlength' => '',
                'rows' => 20,
                'new_lines' => '',
                'readonly' => 1,
            ),
            
            // ==========================================
            // TAB 5: LIFTERLMS BLOCKS
            // ==========================================
            array(
                'key' => 'field_tab_lifterlms',
                'label' => 'LifterLMS Blocks',
                'name' => '',
                'type' => 'tab',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'placement' => 'top',
                'endpoint' => 0,
            ),
            
            array(
                'key' => 'field_wp_has_lifterlms',
                'label' => 'Has LifterLMS Blocks',
                'name' => 'has_lifterlms_blocks',
                'type' => 'true_false',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'message' => '',
                'default_value' => 0,
                'ui' => 1,
                'ui_on_text' => 'Yes',
                'ui_off_text' => 'No',
                'readonly' => 1,
            ),
            
            array(
                'key' => 'field_wp_lifterlms_details',
                'label' => 'LifterLMS Block Details',
                'name' => 'lifterlms_blocks_details',
                'type' => 'textarea',
                'instructions' => 'Complete LifterLMS information including block types (course/lesson/quiz/membership), IDs, enrollment requirements, pricing, and access restrictions.',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => 'field-details-monospace',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => 'LifterLMS block details will appear here after sync...',
                'maxlength' => '',
                'rows' => 20,
                'new_lines' => '',
                'readonly' => 1,
            ),
            
            // ==========================================
            // TAB 6: IFRAMES & EMBEDS
            // ==========================================
            array(
                'key' => 'field_tab_iframes',
                'label' => 'iFrames & Embeds',
                'name' => '',
                'type' => 'tab',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'placement' => 'top',
                'endpoint' => 0,
            ),
            
            array(
                'key' => 'field_wp_has_iframes',
                'label' => 'Has iFrames/Embeds',
                'name' => 'has_iframes',
                'type' => 'true_false',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'message' => '',
                'default_value' => 0,
                'ui' => 1,
                'ui_on_text' => 'Yes',
                'ui_off_text' => 'No',
                'readonly' => 1,
            ),
            
            array(
                'key' => 'field_wp_iframes_details',
                'label' => 'iFrame & Embed Details',
                'name' => 'iframes_details',
                'type' => 'textarea',
                'instructions' => 'All iFrame and embed information with special focus on Google Docs, Google Sheets, Google Forms, and Google Drive embeds. Includes source URLs, dimensions, and full iframe HTML.',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => 'field-details-monospace',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => 'iFrame and embed details will appear here after sync...',
                'maxlength' => '',
                'rows' => 20,
                'new_lines' => '',
                'readonly' => 1,
            ),
            
            // ==========================================
            // TAB 7: WP FUSION PROTECTION
            // ==========================================
            array(
                'key' => 'field_tab_wp_fusion',
                'label' => 'WP Fusion Protection',
                'name' => '',
                'type' => 'tab',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'placement' => 'top',
                'endpoint' => 0,
            ),
            
            array(
                'key' => 'field_wp_fusion_protected',
                'label' => 'WP Fusion Protected',
                'name' => 'wp_fusion_protected',
                'type' => 'true_false',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '50',
                    'class' => '',
                    'id' => '',
                ),
                'message' => '',
                'default_value' => 0,
                'ui' => 1,
                'ui_on_text' => 'Protected',
                'ui_off_text' => 'Public',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_wp_fusion_tags_count',
                'label' => 'Required Tags Count',
                'name' => 'wp_fusion_tags_count',
                'type' => 'number',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '50',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => 0,
                'placeholder' => '',
                'prepend' => '',
                'append' => '',
                'min' => '',
                'max' => '',
                'step' => '',
                'readonly' => 1,
            ),
            
            array(
                'key' => 'field_wp_fusion_details',
                'label' => 'WP Fusion Protection Details',
                'name' => 'wp_fusion_details',
                'type' => 'textarea',
                'instructions' => 'Complete WP Fusion protection information including page-level and block-level protection, required tags, access behavior, redirect URLs, and custom messages.',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => 'field-details-monospace',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => 'WP Fusion protection details will appear here after sync...',
                'maxlength' => '',
                'rows' => 20,
                'new_lines' => '',
                'readonly' => 1,
            ),
            
            // ==========================================
            // TAB 8: SHORTCODES
            // ==========================================
            array(
                'key' => 'field_tab_shortcodes',
                'label' => 'Shortcodes',
                'name' => '',
                'type' => 'tab',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'placement' => 'top',
                'endpoint' => 0,
            ),
            
            array(
                'key' => 'field_wp_has_shortcodes',
                'label' => 'Has Shortcodes',
                'name' => 'has_shortcodes',
                'type' => 'true_false',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '50',
                    'class' => '',
                    'id' => '',
                ),
                'message' => '',
                'default_value' => 0,
                'ui' => 1,
                'ui_on_text' => 'Yes',
                'ui_off_text' => 'No',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_wp_shortcodes_count',
                'label' => 'Shortcodes Count',
                'name' => 'shortcodes_count',
                'type' => 'number',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '50',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => 0,
                'placeholder' => '',
                'prepend' => '',
                'append' => '',
                'min' => '',
                'max' => '',
                'step' => '',
                'readonly' => 1,
            ),
            
            array(
                'key' => 'field_wp_shortcodes_details',
                'label' => 'Shortcode Details',
                'name' => 'shortcodes_details',
                'type' => 'textarea',
                'instructions' => 'All shortcodes detected and categorized with full shortcode text, parameters, and count per shortcode type.',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => 'field-details-monospace',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => 'Shortcode details will appear here after sync...',
                'maxlength' => '',
                'rows' => 20,
                'new_lines' => '',
                'readonly' => 1,
            ),
            
            // ==========================================
            // TAB 9: HTML BLOCKS
            // ==========================================
            array(
                'key' => 'field_tab_html_blocks',
                'label' => 'HTML Blocks',
                'name' => '',
                'type' => 'tab',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'placement' => 'top',
                'endpoint' => 0,
            ),
            
            array(
                'key' => 'field_wp_has_html_blocks',
                'label' => 'Has HTML Blocks',
                'name' => 'has_html_blocks',
                'type' => 'true_false',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '50',
                    'class' => '',
                    'id' => '',
                ),
                'message' => '',
                'default_value' => 0,
                'ui' => 1,
                'ui_on_text' => 'Yes',
                'ui_off_text' => 'No',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_wp_html_blocks_count',
                'label' => 'HTML Blocks Count',
                'name' => 'html_blocks_count',
                'type' => 'number',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '50',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => 0,
                'placeholder' => '',
                'prepend' => '',
                'append' => '',
                'min' => '',
                'max' => '',
                'step' => '',
                'readonly' => 1,
            ),
            
            array(
                'key' => 'field_wp_html_blocks_details',
                'label' => 'HTML Block Details',
                'name' => 'html_blocks_details',
                'type' => 'textarea',
                'instructions' => 'Complete HTML content from Custom HTML blocks and Classic Editor blocks. Full HTML is preserved including scripts, styles, and external resources.',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => 'field-details-monospace',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => 'HTML block details will appear here after sync...',
                'maxlength' => '',
                'rows' => 20,
                'new_lines' => '',
                'readonly' => 1,
            ),
            
            // ==========================================
            // TAB 10: BLOCK ANALYSIS
            // ==========================================
            array(
                'key' => 'field_tab_block_analysis',
                'label' => 'Block Analysis',
                'name' => '',
                'type' => 'tab',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'placement' => 'top',
                'endpoint' => 0,
            ),
            
            array(
                'key' => 'field_wp_block_analysis',
                'label' => 'Complete Block Analysis',
                'name' => 'block_analysis',
                'type' => 'textarea',
                'instructions' => 'Comprehensive breakdown of ALL Gutenberg blocks on this page including block types, attributes, inner blocks, and nested structure.',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => 'field-details-monospace',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => 'Complete block analysis will appear here after sync...',
                'maxlength' => '',
                'rows' => 25,
                'new_lines' => '',
                'readonly' => 1,
            ),
            
            // ==========================================
            // TAB 11: PAGE CONTENT
            // ==========================================
            array(
                'key' => 'field_tab_page_content',
                'label' => 'Page Content',
                'name' => '',
                'type' => 'tab',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'placement' => 'top',
                'endpoint' => 0,
            ),
            
            array(
                'key' => 'field_wp_page_content',
                'label' => 'Full Page Content',
                'name' => 'page_content',
                'type' => 'textarea',
                'instructions' => 'Complete page content for reference (raw HTML/blocks)',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => 'field-details-monospace',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => 'Full page content will appear here after sync...',
                'maxlength' => '',
                'rows' => 25,
                'new_lines' => '',
                'readonly' => 1,
            ),
            
            array(
                'key' => 'field_wp_page_excerpt',
                'label' => 'Page Excerpt',
                'name' => 'page_excerpt',
                'type' => 'textarea',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'maxlength' => '',
                'rows' => 4,
                'new_lines' => '',
                'readonly' => 1,
            ),
            
        ),
        'location' => array(
            array(
                array(
                    'param' => 'post_type',
                    'operator' => '==',
    'value' => 'wp_pages_sync',
                ),
            ),
        ),
        'menu_order' => 0,
        'position' => 'normal',
        'style' => 'default',
        'label_placement' => 'top',
        'instruction_placement' => 'label',
        'hide_on_screen' => array(
            0 => 'the_content',
            1 => 'excerpt',
            2 => 'discussion',
            3 => 'comments',
            4 => 'revisions',
            5 => 'slug',
            6 => 'author',
            7 => 'format',
            8 => 'page_attributes',
            9 => 'featured_image',
            10 => 'categories',
            11 => 'tags',
            12 => 'send-trackbacks',
        ),
        'active' => true,
        'description' => 'Comprehensive page content analysis with ALL metadata for WhaleSync/Airtable sync',
        'show_in_rest' => 1,
    ) );
} );
/**
 * Add custom CSS for monospace field display
 */
add_action( 'acf/input/admin_head', function() {
    ?>
    <style>
        .field-details-monospace textarea {
            font-family: 'Courier New', Courier, monospace !important;
            font-size: 12px !important;
            line-height: 1.6 !important;
            background: #f8f9fa !important;
            border: 1px solid #ddd !important;
            padding: 15px !important;
        }
    </style>
    <?php
} );

Comments

Add a Comment