# give/4.18.0/src/ThirdPartyCompatibility/Divi/DeregisterEntityScripts.php

GiveWP – Donation Plugin and Fundraising Platform, version 4.18.0. 29 lines.

- Page: https://pluginprobe.com/plugins/give/4.18.0/code/src/ThirdPartyCompatibility/Divi/DeregisterEntityScripts.php
- Raw: https://pluginprobe.com/plugins/give/4.18.0/raw/src/ThirdPartyCompatibility/Divi/DeregisterEntityScripts.php
- Modified: 2025-11-05T14:00:32+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/give/4.18.0/code/src/ThirdPartyCompatibility/Divi/DeregisterEntityScripts.php#L10-L20`.

```php
<?php

namespace Give\ThirdPartyCompatibility\Divi;

/**
 * @since 4.13.0 include divi options page
 * @since 4.5.0
 */
class DeregisterEntityScripts
{
    public function __invoke()
    {
        if ( ! isset($_GET['page']) || ! in_array($_GET['page'], ['et_theme_builder', 'et_divi_options'])) {
            return;
        }

        global $wp_scripts;

        $registered_scripts = $wp_scripts->registered;

        foreach ($registered_scripts as $handle => $script) {
            if (preg_match('/^givewp-.*-entity$/', $handle)) {
                wp_dequeue_script($handle);
                wp_deregister_script($handle);
            }
        }
    }
}

```
