---
title: "fswa_glue_capability — Filter Hook"
description: "Sets the WordPress capability required to write Code Glue snippets."
url: "https://wpwebhooks.org/docs/fswa-glue-capability/"
---

[WP Webhooks](https://wpwebhooks.org/) / [Docs](https://wpwebhooks.org/docs/) / fswa\_glue\_capability

Filter since v3.0.0

# fswa\_glue\_capability

Sets the WordPress capability required to write Code Glue snippets.

/ Signature

```
apply_filters( 'fswa_glue_capability', $capability )
```

/ When it fires

Fires whenever the plugin checks whether the current user may write a Code Glue snippet. Users without the capability are told to ask an administrator.

/ Parameters

| Name | In | Type | Req | Description |
| --- | --- | --- | --- | --- |
| $capability | param | string | yes | Capability name. Default: \`edit\_plugins\` — the capability WordPress uses for editing plugin code, because snippets run as PHP on the site. |

/ Returns

`string` The capability a user must have to create or change a snippet.

/ Examples

Allow site administrators when plugin editing is disabled

```
// DISALLOW_FILE_EDIT removes edit_plugins from every role.
// Only lower the gate on a site where you trust everyone it lets in.
add_filter( 'fswa_glue_capability', function ( $capability ) {
    return 'manage_options';
} );
```

/ Related

[Code Glue](https://wpwebhooks.org/docs/code-glue/)[fswa\_glue\_error](https://wpwebhooks.org/docs/fswa-glue-error/)

/Ready

## Your next automation is  
one sentence away.

[Try the Live Preview](https://playground.wordpress.net/?blueprint-url=https://wpwebhooks.org/blueprint.json) [See the Plugin →](https://wpwebhooks.org/wordpress-webhook-plugin/)

$ wp plugin install flowsystems-webhook-actions --activate

## Structured data

```json
{"@context":"https://schema.org","@type":"TechArticle","name":"fswa_glue_capability — Filter Hook — Webhook Actions Docs","description":"Sets the WordPress capability required to write Code Glue snippets.","url":"https://wpwebhooks.org/docs/fswa-glue-capability/","isPartOf":{"@type":"WebSite","name":"WP Webhooks","url":"https://wpwebhooks.org"},"about":{"@type":"SoftwareApplication","name":"Webhook Actions","applicationCategory":"WordPress Plugin"}}
```
