---
title: "lzb_pro/plugin_url"
description: "PHP filter `lzb_pro/plugin_url` of the Lazy Blocks Pro WordPress plugin."
url: "https://www.lazyblocks.com/docs/php-filters/lzb_pro-plugin_url/"
source: "php-filters/lzb_pro-plugin_url.mdx"
---
# lzb_pro/plugin_url [Pro]

Filters the URL the Pro editor scripts and styles are loaded from.

Lazy Blocks Pro shipped inside a theme or another plugin sits at a URL `plugin_dir_url()` cannot work out, because WordPress only knows about files under the plugins directory. Point this filter at the real location and the Pro editor assets resolve again.

## Attributes

| Name          | Type       | Description                                                                  |
| ------------- | ---------- | ---------------------------------------------------------------------------- |
| `$plugin_url` | **String** | `plugin_dir_url( __FILE__ )` of `lazy-blocks-pro.php`, with a trailing slash |

`Lazy_Blocks_Pro_Assets::register_script()` and `register_style()` are the only readers. Each one appends the build path and the extension, so `build/component-rich-text` becomes `<plugin_url>build/component-rich-text.js`.

## Usage

```php title="PHP"
function my_lzb_pro_plugin_url( $plugin_url ) {
  return get_stylesheet_directory_uri() . '/vendor/lazy-blocks-pro/';
}

add_filter( 'lzb_pro/plugin_url', 'my_lzb_pro_plugin_url' );
```

`lazyblocks()->include_within( $url )` already registers this filter along with `lzb/plugin_url`, so a theme following [Include Lazy Blocks within theme or plugin](https://www.lazyblocks.com/docs/examples/include-lazy-blocks-within-theme-or-plugin/) does not need to add it by hand.

A wrong URL is quiet. The scripts still register and enqueue, the browser gets a 404 for each one, and the block builder loads without the Pro panels: no Rich Text component, no conditional logic, no collections. Keep the trailing slash, because the build path is concatenated straight onto the value.

The path counterpart is [lzb_pro/plugin_path](https://www.lazyblocks.com/docs/php-filters/lzb_pro-plugin_path/).

## Documentation Index
> Fetch the complete documentation index at: https://www.lazyblocks.com/llms.txt
> Fetch every page in a single file at: https://www.lazyblocks.com/llms-full.txt
