Plugin Directory

Changeset 3296352


Ignore:
Timestamp:
05/19/2025 10:24:16 AM (8 months ago)
Author:
alexacrm
Message:

Release 2.78

Location:
integration-cds/trunk
Files:
11 added
1 deleted
13 edited

Legend:

Unmodified
Added
Removed
  • integration-cds/trunk/core.php

    r3232488 r3296352  
    5757    if ( !$storedVersion || version_compare( $storedVersion, ICDS_VERSION, '==' ) ) {
    5858        return;
    59     }
     59    }
    6060
    6161    if ( version_compare( $storedVersion, '2.26', '<' ) ) {
     
    6666        UpdateManager::updateCustomButtonLabels();
    6767    }
    68 
    6968
    7069    update_option( 'icds_version', ICDS_VERSION );
     
    126125 * Register advanced settings.
    127126 */
    128 add_filter( 'integration-cds/settings/advanced', function( $settings ){
     127add_filter( 'integration-cds/settings/advanced', function( $settings ) {
    129128    $advSetting = new AdvancedSetting( 'ICDS_COMPATIBLE_BINDING' );
    130129    $advSetting->type = AdvancedSetting::TYPE_BOOLEAN;
     
    269268    $settingsMap['recaptcha'] = $settingsType;
    270269
     270    $settingsType = new SettingsType( 'webhooks' );
     271    $settingsType->storageKey = 'icds_webhooks';
     272    $settingsType->className = WebhookSettings::class;
     273    $settingsMap['webhooks'] = $settingsType;
     274
    271275    $settingsType = new SettingsType( AdvancedSettings::SETTINGS_TYPE_NAME );
    272276    $settingsType->storageKey = AdvancedSettings::STORAGE_KEY;
     
    392396 * Registers resources for Admin UI.
    393397 */
    394 function registerAdminScripts(){
     398function registerAdminScripts() {
    395399    static $touched = false;
    396400
     
    469473            ],
    470474        ] );
    471     }else{
    472         $scripts = array_merge($scripts, [
     475    } else {
     476        $scripts = array_merge( $scripts, [
    473477            'icds/gutenberg-monaco-block' => [
    474478                'src' => ICDS_URL . 'assets/js/gutenberg-text-block.js',
     
    482486                'inFooter' => true,
    483487            ],
    484         ]);
     488        ] );
    485489    }
    486490
     
    854858            'entityrecords' => 'Table Records',
    855859            '__misc' => 'Misc',
     860            'boundrecords' => 'Bound records',
    856861        ],
    857862    ];
     
    910915        }
    911916
    912         LoggerProvider::instance()->getLogger()->debug( 'Register special \'data-name\' attribute for Monaco editor style tag.', [ $tag, $handle, $href, $media, ] );
     917        LoggerProvider::instance()->getLogger()->debug( 'Register special \'data-name\' attribute for Monaco editor style tag.', [
     918            $tag,
     919            $handle,
     920            $href,
     921            $media,
     922        ] );
    913923
    914924        return sprintf( '<link rel="stylesheet" data-name="vs/editor/editor.main" id="%1$s-css"  href="%2$s" media="%3$s">', $handle, $href, $media );
     
    922932    ] );
    923933
    924     LoggerProvider::instance()->getLogger()->debug( 'Register Monaco editor block for Gutenberg.');
     934    LoggerProvider::instance()->getLogger()->debug( 'Register Monaco editor block for Gutenberg.' );
    925935    register_block_type( 'icds/gutenberg-monaco-block', [
    926936        'editor_script' => 'icds/gutenberg-monaco-block',
     
    963973    if ( !InformationProvider::instance()->isSolutionInstalled() ) {
    964974        ?>
    965       <div class="notice notice-warning">
    966         <p>
    967             <?php printf(
    968                 __( 'Thank you for using the free version of Dataverse Integration. Try our <a href="%s" class="alert-link" target="_blank">Power Platform solution</a> to unlock more exciting features.', 'integration-cds' ),
    969                 InformationProvider::SOLUTION_MARKETPLACE_URL
    970             ); ?>
    971         </p>
    972       </div>
     975        <div class="notice notice-warning">
     976            <p>
     977                <?php printf(
     978                    __( 'Thank you for using the free version of Dataverse Integration. Try our <a href="%s" class="alert-link" target="_blank">Power Platform solution</a> to unlock more exciting features.', 'integration-cds' ),
     979                    InformationProvider::SOLUTION_MARKETPLACE_URL
     980                ); ?>
     981            </p>
     982        </div>
    973983        <?php
    974984        return;
     
    978988        $nonce = wp_create_nonce( 'install-plugin_integration-cds-premium' );
    979989        ?>
    980       <div class="notice notice-warning">
    981         <p>
    982             <?php printf(
    983                 __( 'Thank you for using the free version of Dataverse Integration. <a href="%s" class="alert-link">Download & install</a> the premium add-on to unlock more exciting features.', 'integration-cds' ),
    984                 admin_url( 'update.php?action=install-plugin&plugin=integration-cds-premium&_wpnonce=' . $nonce )
    985             ); ?>
    986         </p>
    987       </div>
     990        <div class="notice notice-warning">
     991            <p>
     992                <?php printf(
     993                    __( 'Thank you for using the free version of Dataverse Integration. <a href="%s" class="alert-link">Download & install</a> the premium add-on to unlock more exciting features.', 'integration-cds' ),
     994                    admin_url( 'update.php?action=install-plugin&plugin=integration-cds-premium&_wpnonce=' . $nonce )
     995                ); ?>
     996            </p>
     997        </div>
    988998        <?php
    989999    }
  • integration-cds/trunk/front/admin/index.html

    r3274314 r3296352  
    1 <!DOCTYPE html><html lang="en" class="h-100"><head><base href="__ICDS_BASE_URL__"><meta charset="utf-8"><title>Dataverse Integration Settings</title><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="wp-content/plugins/integration-cds/front/admin/favicon.ico"><title></title><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-0b65ffb6.0581547d.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0a3196.2767fb51.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0a3577.d49dd877.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0a40c8.9d44158a.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0a43df.01950eda.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0aa90c.da8bb1b7.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0aab07.7d89f0aa.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0abc00.c87aa4af.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0ae937.e9d597f6.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0aeb45.30e41831.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0af08c.8bfc3337.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0afa49.8be77e90.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0b2762.9a3ef9c1.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0b6187.bb482c4a.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0ba136.f4db86fb.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0bb267.3b653658.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0bcec1.f4b0cdc8.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0bdf38.4e0f5394.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0bff92.61ff6812.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0c0494.8d2a802b.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0c0a09.4f675a04.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0c4313.44c897a0.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0c46d1.e54af410.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0c512b.13860129.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0c86e3.cafb52de.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0cf16e.d2fd45c4.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0d056d.5f8e5612.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0d0645.5a3cc879.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0d2f22.3a8b0702.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0d61fd.e655ebd2.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0d7e63.211649e0.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0dda4e.c83fb4ec.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0de971.737087c5.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0e1b57.410577ab.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0e1fbe.fb479130.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0e22d6.655d1080.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0e4fe5.80bff59d.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0e542a.d4c2210e.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0e57ec.abe5dc3a.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0e6553.1db13875.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0e6c86.7aa1aee7.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0ea098.1c1a63b4.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0f0a11.a12b9a60.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d208ac5.1b947dcc.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d209408.37ced34d.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d20f745.b79ac6a5.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d20ff23.9aa317e8.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d2138c7.09676ac5.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d216f3b.06a226d7.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d217e5b.f64c3699.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d21b84a.7ee44ed7.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d21dcd2.a87cc32c.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d21f327.d4a7a131.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d2214b3.09d0507d.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d221799.9ae3b728.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d221814.c6889716.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d221a34.a72781ab.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d22502a.82ddfe1a.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d226775.f405ccaa.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d229411.2f4d293d.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d2295e9.ce277453.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d22c171.dbd4c691.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d22c2b8.29707b7f.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d22ca58.8bd185bb.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d2311f7.aae84ba6.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d237ee7.532c2ff8.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d238465.223c7726.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-30597b4a.1f4d1e00.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-7532b3ea.7dae515a.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-e13e4362.3e9684d3.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/css/chunk-vendors.6b879ace.css" rel="preload" as="style"><link href="wp-content/plugins/integration-cds/front/admin/css/main.076b1dad.css" rel="preload" as="style"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-vendors.3b8a2693.js" rel="preload" as="script"><link href="wp-content/plugins/integration-cds/front/admin/js/main.e2c424a2.js" rel="preload" as="script"><link href="wp-content/plugins/integration-cds/front/admin/css/chunk-vendors.6b879ace.css" rel="stylesheet"><link href="wp-content/plugins/integration-cds/front/admin/css/main.076b1dad.css" rel="stylesheet"></head><body class="h-100 bg-light"><noscript><strong>We're sorry but doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="wp-content/plugins/integration-cds/front/admin/js/chunk-vendors.3b8a2693.js"></script><script src="wp-content/plugins/integration-cds/front/admin/js/main.e2c424a2.js"></script></body></html>
     1<!DOCTYPE html><html lang="en" class="h-100"><head><base href="__ICDS_BASE_URL__"><meta charset="utf-8"><title>Dataverse Integration Settings</title><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="wp-content/plugins/integration-cds/front/admin/favicon.ico"><title></title><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-0b65ffb6.0581547d.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0a3196.2767fb51.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0a3577.d49dd877.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0a40c8.9d44158a.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0a43df.01950eda.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0aa90c.da8bb1b7.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0aab07.7d89f0aa.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0abc00.c87aa4af.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0ae937.e9d597f6.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0aeb45.30e41831.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0af08c.8bfc3337.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0afa49.8be77e90.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0b2762.9a3ef9c1.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0b6187.bb482c4a.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0ba136.f4db86fb.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0bb267.3b653658.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0bcec1.f4b0cdc8.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0bdf38.4e0f5394.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0bff92.61ff6812.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0c0494.8d2a802b.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0c0a09.4f675a04.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0c4313.44c897a0.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0c46d1.e54af410.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0c512b.13860129.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0c86e3.cafb52de.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0cf16e.d2fd45c4.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0d056d.5f8e5612.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0d0645.5a3cc879.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0d2f22.3a8b0702.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0d61fd.e655ebd2.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0d7e63.211649e0.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0dda4e.c83fb4ec.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0de971.737087c5.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0e1b57.410577ab.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0e1fbe.fb479130.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0e22d6.655d1080.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0e4fe5.80bff59d.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0e542a.d4c2210e.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0e57ec.abe5dc3a.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0e6553.1db13875.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0e6c86.7aa1aee7.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0ea098.1c1a63b4.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0f0a11.a12b9a60.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d208ac5.1b947dcc.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d209408.37ced34d.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d20f745.b79ac6a5.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d20ff23.9aa317e8.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d2138c7.09676ac5.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d216f3b.06a226d7.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d217e5b.f64c3699.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d21b84a.7ee44ed7.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d21dcd2.a87cc32c.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d21f327.d4a7a131.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d2214b3.09d0507d.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d221799.9ae3b728.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d221814.c6889716.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d221a34.a72781ab.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d22502a.82ddfe1a.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d226775.f405ccaa.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d229411.2f4d293d.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d2295e9.ce277453.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d22c171.dbd4c691.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d22c2b8.29707b7f.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d22ca58.8bd185bb.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d2311f7.aae84ba6.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d237ee7.532c2ff8.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d238465.223c7726.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-30597b4a.1f4d1e00.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-7532b3ea.7dae515a.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-e13e4362.3e9684d3.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/css/chunk-vendors.6b879ace.css" rel="preload" as="style"><link href="wp-content/plugins/integration-cds/front/admin/css/main.076b1dad.css" rel="preload" as="style"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-vendors.3b8a2693.js" rel="preload" as="script"><link href="wp-content/plugins/integration-cds/front/admin/js/main.5b99fde2.js" rel="preload" as="script"><link href="wp-content/plugins/integration-cds/front/admin/css/chunk-vendors.6b879ace.css" rel="stylesheet"><link href="wp-content/plugins/integration-cds/front/admin/css/main.076b1dad.css" rel="stylesheet"></head><body class="h-100 bg-light"><noscript><strong>We're sorry but doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="wp-content/plugins/integration-cds/front/admin/js/chunk-vendors.3b8a2693.js"></script><script src="wp-content/plugins/integration-cds/front/admin/js/main.5b99fde2.js"></script></body></html>
  • integration-cds/trunk/integration-cds.php

    r3274314 r3296352  
    44Plugin URI:         https://alexacrm.com/
    55Description:        Integrate Microsoft Dataverse organizations with WordPress.
    6 Version:            2.77
     6Version:            2.78
    77Requires at least:  6.1
    88Requires PHP:       8.2
     
    8686 * Plugin version.
    8787 */
    88 define( 'ICDS_VERSION', '2.77' );
     88define( 'ICDS_VERSION', '2.78' );
    8989
    9090/**
  • integration-cds/trunk/readme.txt

    r3274314 r3296352  
    6262== Changelog ==
    6363
     64= 2.78 =
     65
     66* Implemented webhooks management
     67* Made 'Verify Connection' button always visible
     68
    6469= 2.77 =
    6570
  • integration-cds/trunk/src/API/CreatedResponse.php

    r2481802 r3296352  
    3131     * Constructor.
    3232     *
     33     * @param array $data
     34     * @param array|null $headers Optional. HTTP header map. Default empty array.
     35     *
    3336     * @since 4.4.0
    3437     *
    35      * @param array $headers Optional. HTTP header map. Default empty array.
    3638     */
    37     public function __construct( array $headers = [] ) {
    38         parent::__construct( null, 201, $headers );
     39    public function __construct(array $data, ?array $headers = [] ) {
     40        parent::__construct( $data, 201, $headers );
    3941    }
    4042
  • integration-cds/trunk/src/API/Endpoints/DeleteCache.php

    r3013079 r3296352  
    6161        $cacheHandlers = apply_filters( 'integration-cds/cache/delete-handlers', [
    6262            'fetchxml' => [ $this, 'clearFetchxmlCache' ],
     63            'boundrecords' => [ $this, 'clearBoundRecordsCache' ],
    6364            'entityrecords' => [ $this, 'clearEntityRecordsCache' ],
    6465        ] );
     
    9697
    9798        return new NoContentResponse();
     99    }
     100
     101    /**
     102     * Deletes specified item from 'boundrecords' cache pool.
     103     *
     104     * @param $cacheItem
     105     *
     106     * @return bool
     107     */
     108    protected function clearBoundRecordsCache( $cacheItem ): bool {
     109        return $this->clearPool( 'boundrecords', $cacheItem );
    98110    }
    99111
  • integration-cds/trunk/src/API/Registrar.php

    r3010565 r3296352  
    7171            \AlexaCRM\Nextgen\API\Endpoints\CheckRecaptcha::class,
    7272            \AlexaCRM\Nextgen\API\Endpoints\GetRecaptchaSettings::class,
    73             \AlexaCRM\Nextgen\API\Endpoints\GetWebhooks::class,
    74             \AlexaCRM\Nextgen\API\Endpoints\RegisterWebhook::class,
    75             \AlexaCRM\Nextgen\API\Endpoints\DeleteWebhook::class,
    76             \AlexaCRM\Nextgen\API\Endpoints\UpdateWebhook::class,
     73            \AlexaCRM\Nextgen\API\Endpoints\WebhookList::class,
     74            \AlexaCRM\Nextgen\API\Endpoints\WebhookAdd::class,
     75            \AlexaCRM\Nextgen\API\Endpoints\WebhookDelete::class,
     76            \AlexaCRM\Nextgen\API\Endpoints\WebhookUpdate::class,
     77            \AlexaCRM\Nextgen\API\Endpoints\WebhookGet::class,
    7778            \AlexaCRM\Nextgen\API\Endpoints\InstallAddon::class,
    7879            \AlexaCRM\Nextgen\API\Endpoints\ActivateAddon::class,
     
    8384            \AlexaCRM\Nextgen\API\Endpoints\GetFile::class,
    8485            \AlexaCRM\Nextgen\API\Endpoints\GetImage::class,
     86            \AlexaCRM\Nextgen\API\Endpoints\WebhookUpdateSettings::class,
     87            \AlexaCRM\Nextgen\API\Endpoints\WebhookGetSettings::class,
    8588
    8689            // V2 endpoints
  • integration-cds/trunk/src/CacheProvider.php

    r3274314 r3296352  
    202202            'data',
    203203            'fetchxml',
     204            'boundrecords',
    204205            'entityrecords',
    205206        ] );
  • integration-cds/trunk/src/Forms/CustomFormModel.php

    r3274314 r3296352  
    3131use AlexaCRM\Nextgen\MetadataService;
    3232use AlexaCRM\Nextgen\Twig\Util;
     33use AlexaCRM\Nextgen\Webhooks\Runner;
     34use AlexaCRM\Nextgen\Webhooks\WebhookForm;
    3335use AlexaCRM\WebAPI\OData\AuthenticationException;
    3436use AlexaCRM\WebAPI\OrganizationException;
     
    215217     */
    216218    public function submitData( array $data, ?EntityReference $entityReference = null ): SubmissionResult {
    217         $formEntity = new Entity($this->formSettings->entity);
     219        $formEntity = new Entity( $this->formSettings->entity );
    218220        $logger = LoggerProvider::instance()->getLogger();
    219221        $formClone = clone $this;
     
    248250
    249251                if ( $this->formSettings->mode === CustomFormAttributes::MODE_UPDATE && $entityReference instanceof EntityReference ) {
     252                    $formActionType = Runner::FORM_UPDATE;
    250253                    $record->Id = $entityReference->Id;
    251254                    $client->Update( $record );
     
    256259                    ] );
    257260                } else {
     261                    $formActionType = Runner::FORM_CREATE;
    258262                    $id = $client->Create( $record );
    259263                    $record->Id = $id;
     
    274278                 */
    275279                do_action( 'integration-cds/forms/submit-success', $formClone, $record );
     280
     281                $webhookForm = new WebhookForm( $formActionType, Runner::FORM_TYPE_CUSTOM );
     282                $runner = new Runner( $webhookForm );
     283                $runner->trigger( $record->Attributes );
    276284            } catch ( \Exception $e ) {
    277                 $logger->error( __('Failed to submit custom form', 'integration-cds'), [
     285                $logger->error( __( 'Failed to submit custom form', 'integration-cds' ), [
    278286                    'record' => $record,
    279287                    'error' => $e,
     
    307315     * @return SubmissionResult
    308316     */
    309     private function setCustomValidationResult(array $validationResult, Logger $logger, XrmEntity $record): SubmissionResult {
     317    private function setCustomValidationResult( array $validationResult, Logger $logger, XrmEntity $record ): SubmissionResult {
    310318        $errorMessage = $validationResult['payload'] ?? '';
    311319        $logger->error( __( 'Failed to submit custom form', 'integration-cds' ), [
     
    317325        $result->errorMessage = $errorMessage;
    318326        $result->exception = null;
     327
    319328        return $result;
    320329    }
     
    368377        }
    369378
    370         $recaptcha = $this->formSettings->recaptcha? 'recaptcha' : 'norecaptcha';
     379        $recaptcha = $this->formSettings->recaptcha ? 'recaptcha' : 'norecaptcha';
    371380
    372381        $str = sprintf( '%s,%s,%s(%s)', $this->formSettings->mode, $this->formSettings->entity, $recaptcha, $id );
  • integration-cds/trunk/src/Webhooks/Runner.php

    r2628653 r3296352  
    2323use AlexaCRM\Nextgen\ConnectionService;
    2424use AlexaCRM\Nextgen\LoggerProvider;
     25use AlexaCRM\Nextgen\SingletonTrait;
    2526use Exception;
    2627use GuzzleHttp\Client;
    27 use WP_Query;
     28use GuzzleHttp\Promise;
    2829
    2930/**
     
    3132 */
    3233class Runner {
     34
     35    use SingletonTrait;
    3336
    3437    /**
     
    4851
    4952    /**
     53     * Meta key to store the webhook description.
     54     */
     55    public const TARGET_DESCRIPTION = 'icds_webhook_description';
     56
     57    /**
     58     * Meta key to store the webhook form.
     59     */
     60    public const TARGET_FORM_TYPE = 'icds_webhook_form_type';
     61
     62    /**
     63     * Meta key to store the webhook form name.
     64     */
     65    public const TARGET_FORM_NAME = 'icds_webhook_form_name';
     66
     67    /**
     68     * Meta key to store the webhook form name.
     69     */
     70    public const TARGET_FORM_ID = 'icds_webhook_form_id';
     71
     72    /**
    5073     * Wodpress 'post_status' field value for enabled webhook.
    5174     */
     
    5780    public const DISABLED_STATUS = 'private';
    5881
     82    const FORM_CREATE = 'form/created';
     83
     84    const FORM_UPDATE = 'form/updated';
     85
     86    const USER_CREATE = 'user/created';
     87
     88    const USER_UPDATE = 'user/updated';
     89
     90    const USER_DELETE = 'user/deleted';
     91
     92    const FORM_TYPE_ALL = 'all';
     93
     94    const FORM_TYPE_GRAVITY = 'gravity';
     95
     96    const FORM_TYPE_ELEMENTOR = 'elementor';
     97
     98    const FORM_TYPE_PREMIUM = 'premium';
     99
     100    const FORM_TYPE_CUSTOM = 'custom';
     101
    59102    protected string $topic;
    60103
    61     /**
    62      * @var string[]
    63      */
    64     protected array $webhooks = [];
     104    protected WebhooksRunnerInterface $webhookRunner;
    65105
    66     public function __construct( string $topic ) {
    67         $this->topic = $topic;
    68 
    69         $q = new WP_Query( [
    70             'post_type' => Runner::POST_TYPE,
    71             'post_status' => Runner::ENABLED_STATUS,
    72             'meta_key' => Runner::TOPIC_KEY,
    73             'meta_value' => $topic,
    74             'fields' => 'ids',
    75             'nopaging' => true,
    76         ] );
    77 
    78         foreach ( $q->posts as $id ) {
    79             $target = trim( get_post_meta( $id, static::TARGET_KEY, true ) );
    80             if ( $target === '' ) {
    81                 continue;
    82             }
    83 
    84             $this->webhooks[] = $target;
    85         }
     106    public function __construct( WebhooksRunnerInterface $webhookRunner, array $params = [] ) {
     107        $this->webhookRunner = $webhookRunner;
    86108    }
    87109
     
    90112     *
    91113     * @param $payload
     114     *
     115     * @throws \Throwable
    92116     */
    93117    public function trigger( $payload ): void {
    94         if ( count( $this->webhooks ) === 0 ) {
     118
     119        $webhooks = $this->webhookRunner->findWebhooks();
     120
     121        if ( count( $webhooks ) === 0 ) {
    95122            return;
    96123        }
     
    99126        $logger = LoggerProvider::instance()->getLogger();
    100127
    101         foreach ( $this->webhooks as $target ) {
     128        $promises = [];
     129        foreach ( $webhooks as $target ) {
    102130            try {
    103                 $client->post( $target, [
     131                $promises[] = $client->postAsync( $target, [
    104132                    'json' => $payload,
    105133                ] );
     
    109137                ] );
    110138            }
     139        }
     140        // Wait for all the requests to complete.
     141        try {
     142            Promise\Utils::unwrap( $promises );
     143        }
     144        catch ( Exception $e ) {
     145            return;
    111146        }
    112147    }
     
    122157        return new Client( [
    123158            'verify' => $verify,
     159            'timeout' => 30,
    124160        ] );
    125161    }
  • integration-cds/trunk/vendor/composer/autoload_classmap.php

    r3274314 r3296352  
    4646    'AlexaCRM\\Nextgen\\API\\Endpoints\\SubmitCustomForm' => $baseDir . '/src/API/Endpoints/SubmitCustomForm.php',
    4747    'AlexaCRM\\Nextgen\\API\\Endpoints\\UpdateWebhook' => $baseDir . '/src/API/Endpoints/UpdateWebhook.php',
     48    'AlexaCRM\\Nextgen\\API\\Endpoints\\WebhookAdd' => $baseDir . '/src/API/Endpoints/WebhookAdd.php',
     49    'AlexaCRM\\Nextgen\\API\\Endpoints\\WebhookDelete' => $baseDir . '/src/API/Endpoints/WebhookDelete.php',
     50    'AlexaCRM\\Nextgen\\API\\Endpoints\\WebhookGet' => $baseDir . '/src/API/Endpoints/WebhookGet.php',
     51    'AlexaCRM\\Nextgen\\API\\Endpoints\\WebhookGetSettings' => $baseDir . '/src/API/Endpoints/WebhookGetSettings.php',
     52    'AlexaCRM\\Nextgen\\API\\Endpoints\\WebhookList' => $baseDir . '/src/API/Endpoints/WebhookList.php',
     53    'AlexaCRM\\Nextgen\\API\\Endpoints\\WebhookUpdate' => $baseDir . '/src/API/Endpoints/WebhookUpdate.php',
     54    'AlexaCRM\\Nextgen\\API\\Endpoints\\WebhookUpdateSettings' => $baseDir . '/src/API/Endpoints/WebhookUpdateSettings.php',
    4855    'AlexaCRM\\Nextgen\\API\\NoContentResponse' => $baseDir . '/src/API/NoContentResponse.php',
    4956    'AlexaCRM\\Nextgen\\API\\Registrar' => $baseDir . '/src/API/Registrar.php',
     
    143150    'AlexaCRM\\Nextgen\\WebApiClient' => $baseDir . '/src/WebApiClient.php',
    144151    'AlexaCRM\\Nextgen\\WebApi\\EndpointAccessType' => $baseDir . '/src/WebApi/EndpointAccessType.php',
     152    'AlexaCRM\\Nextgen\\WebhookSettings' => $baseDir . '/src/WebhookSettings.php',
    145153    'AlexaCRM\\Nextgen\\Webhooks\\Runner' => $baseDir . '/src/Webhooks/Runner.php',
     154    'AlexaCRM\\Nextgen\\Webhooks\\WebhookForm' => $baseDir . '/src/Webhooks/WebhookForm.php',
     155    'AlexaCRM\\Nextgen\\Webhooks\\WebhooksRunnerInterface' => $baseDir . '/src/Webhooks/WebhooksRunnerInterface.php',
    146156    'AlexaCRM\\Nextgen\\WpServices' => $baseDir . '/src/WpServices.php',
    147157    'AlexaCRM\\StrongSerializer\\Deserializer' => $vendorDir . '/alexacrm/strong-serializer/src/Deserializer.php',
  • integration-cds/trunk/vendor/composer/autoload_static.php

    r3274314 r3296352  
    269269        'AlexaCRM\\Nextgen\\API\\Endpoints\\SubmitCustomForm' => __DIR__ . '/../..' . '/src/API/Endpoints/SubmitCustomForm.php',
    270270        'AlexaCRM\\Nextgen\\API\\Endpoints\\UpdateWebhook' => __DIR__ . '/../..' . '/src/API/Endpoints/UpdateWebhook.php',
     271        'AlexaCRM\\Nextgen\\API\\Endpoints\\WebhookAdd' => __DIR__ . '/../..' . '/src/API/Endpoints/WebhookAdd.php',
     272        'AlexaCRM\\Nextgen\\API\\Endpoints\\WebhookDelete' => __DIR__ . '/../..' . '/src/API/Endpoints/WebhookDelete.php',
     273        'AlexaCRM\\Nextgen\\API\\Endpoints\\WebhookGet' => __DIR__ . '/../..' . '/src/API/Endpoints/WebhookGet.php',
     274        'AlexaCRM\\Nextgen\\API\\Endpoints\\WebhookGetSettings' => __DIR__ . '/../..' . '/src/API/Endpoints/WebhookGetSettings.php',
     275        'AlexaCRM\\Nextgen\\API\\Endpoints\\WebhookList' => __DIR__ . '/../..' . '/src/API/Endpoints/WebhookList.php',
     276        'AlexaCRM\\Nextgen\\API\\Endpoints\\WebhookUpdate' => __DIR__ . '/../..' . '/src/API/Endpoints/WebhookUpdate.php',
     277        'AlexaCRM\\Nextgen\\API\\Endpoints\\WebhookUpdateSettings' => __DIR__ . '/../..' . '/src/API/Endpoints/WebhookUpdateSettings.php',
    271278        'AlexaCRM\\Nextgen\\API\\NoContentResponse' => __DIR__ . '/../..' . '/src/API/NoContentResponse.php',
    272279        'AlexaCRM\\Nextgen\\API\\Registrar' => __DIR__ . '/../..' . '/src/API/Registrar.php',
     
    366373        'AlexaCRM\\Nextgen\\WebApiClient' => __DIR__ . '/../..' . '/src/WebApiClient.php',
    367374        'AlexaCRM\\Nextgen\\WebApi\\EndpointAccessType' => __DIR__ . '/../..' . '/src/WebApi/EndpointAccessType.php',
     375        'AlexaCRM\\Nextgen\\WebhookSettings' => __DIR__ . '/../..' . '/src/WebhookSettings.php',
    368376        'AlexaCRM\\Nextgen\\Webhooks\\Runner' => __DIR__ . '/../..' . '/src/Webhooks/Runner.php',
     377        'AlexaCRM\\Nextgen\\Webhooks\\WebhookForm' => __DIR__ . '/../..' . '/src/Webhooks/WebhookForm.php',
     378        'AlexaCRM\\Nextgen\\Webhooks\\WebhooksRunnerInterface' => __DIR__ . '/../..' . '/src/Webhooks/WebhooksRunnerInterface.php',
    369379        'AlexaCRM\\Nextgen\\WpServices' => __DIR__ . '/../..' . '/src/WpServices.php',
    370380        'AlexaCRM\\StrongSerializer\\Deserializer' => __DIR__ . '/..' . '/alexacrm/strong-serializer/src/Deserializer.php',
  • integration-cds/trunk/vendor/composer/installed.php

    r3274314 r3296352  
    44        'pretty_version' => 'dev-master',
    55        'version' => 'dev-master',
    6         'reference' => 'd84b9e07847e9d42817167943b53eb178d6174a9',
     6        'reference' => 'bafc8cfa87c77c8784dd07e40d108a05d7710c5e',
    77        'type' => 'wordpress-plugin',
    88        'install_path' => __DIR__ . '/../../',
     
    2323            'pretty_version' => 'dev-master',
    2424            'version' => 'dev-master',
    25             'reference' => 'd84b9e07847e9d42817167943b53eb178d6174a9',
     25            'reference' => 'bafc8cfa87c77c8784dd07e40d108a05d7710c5e',
    2626            'type' => 'wordpress-plugin',
    2727            'install_path' => __DIR__ . '/../../',
Note: See TracChangeset for help on using the changeset viewer.