---
title: "Hooks – Whitelist Scripts or Styles"
description: "Hooks – Whitelist Scripts or Styles"
url: https://docs.optimizepress.com/en/articles/23-hooks-whitelist-scripts-or-styles
collection: "Developer Docs"
updated: 2026-06-17
language: en
---

# Hooks – Whitelist Scripts or Styles

Hooks – Whitelist Scripts or Styles

In order to have the fastest loading landing pages, sales pages, and other pages, we disable most 3rd party plugin/theme scripts when using the Blank OptimizePress template.

Usually, these can be enabled by [following instructions in this article](https://kepjxtumb.gleap.help/en/articles/23-hooks-whitelist-scripts-or-styles).

But, if 3rd party plugin is using a unconventional handle or way to enqueue their scripts, we added a few helpful filters to allow 3rd party developers to whitelist their scripts or styles.

## **Scripts**

The filter for scripts is:

```javascript
return apply_filters('op3_script_is_allowed_in_blank_template', false, $handle);
```

Below is an example usage of the above:

```javascript
// Paid Membership Pro fix for Stripe
if (defined('PMPRO_VERSION')) {
    add_filter('op3_script_is_allowed_in_blank_template', [$this, 'allowPmproScripts'], 10, 2);
}
```

And the code inside allowPmproScripts is below:

```javascript
public function allowPmproScripts($value, $handle)
    {
        if ($handle == 'stripe') {
            return true;
        }

        return $value;
    }
```

As you can see, the method uses a script’s handle and if it is matched, it simply returns true.

## **Styles**

We have a similar filter for Styles as well:

```javascript
return apply_filters('op3_style_is_allowed_in_blank_template', false, $handle);
```

And the simple example of usage:

```javascript
if (class_exists(\AccessAlly::class)) {
    add_filter('op3_style_is_allowed_in_blank_template', [$this, 'allowAccessAllyFrontendStyles'], 10, 2);
    }
```

And the code inside allowAccessAllyFrontendStyle is below:

```javascript
public function allowAccessAllyFrontendStyles($value, $handle)
    {
        if ($handle == 'accessally-frontend-styling') {
            return true;
        }

        return $value;
    }
```

Again, looking for style’s handle and if it is matched, it will return true, thus including the style in the blank template.
