Title: Disable PHP snippets
Last modified: August 21, 2016

---

# Disable PHP snippets

 *  Resolved [wasanajones](https://wordpress.org/support/users/wasanajones/)
 * (@wasanajones)
 * [13 years ago](https://wordpress.org/support/topic/disable-php-snippets/)
 * nice plugin, thanks
 * I run a multisite network and I don’t want admin/authors to execute PHP code.
 * is there a way to not include PHP code in snippets? or restrict to superadmin?
 * as a last resort I suppose I could edit admin-snippets.php to remove the visible
   option, but that wouldn’t be very elegant to say the least
 * thanks
 * [http://wordpress.org/extend/plugins/post-snippets/](http://wordpress.org/extend/plugins/post-snippets/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [Johan Steen](https://wordpress.org/support/users/artstorm/)
 * (@artstorm)
 * [13 years ago](https://wordpress.org/support/topic/disable-php-snippets/#post-3778165)
 * Hi,
 * You can disable the PHP code functionality by using the `post_snippets_php_execution_enabled`
   filter.
    Hope this helps.
 * Cheers,
    Johan
 *  [Johan Steen](https://wordpress.org/support/users/artstorm/)
 * (@artstorm)
 * [13 years ago](https://wordpress.org/support/topic/disable-php-snippets/#post-3778167)
 * Btw, look here for a usage example:
    [https://github.com/artstorm/post-snippets/pull/1](https://github.com/artstorm/post-snippets/pull/1)
 *  Thread Starter [wasanajones](https://wordpress.org/support/users/wasanajones/)
 * (@wasanajones)
 * [13 years ago](https://wordpress.org/support/topic/disable-php-snippets/#post-3778169)
 * outstanding
 * thank you
 *  [Johan Steen](https://wordpress.org/support/users/artstorm/)
 * (@artstorm)
 * [13 years ago](https://wordpress.org/support/topic/disable-php-snippets/#post-3778287)
 * I’ve just added an additional way to this.
 * Simply add this line of code to the theme’s functions.php or to wp-config.php
   to disable the PHP functionality of the plugin:
 * `define('POST_SNIPPETS_DISABLE_PHP', true);`
 *  Thread Starter [wasanajones](https://wordpress.org/support/users/wasanajones/)
 * (@wasanajones)
 * [13 years ago](https://wordpress.org/support/topic/disable-php-snippets/#post-3778288)
 * changing wp-config will really help because of multiple themes, thanks

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Disable PHP snippets’ is closed to new replies.

 * ![](https://ps.w.org/post-snippets/assets/icon-128x128.gif?rev=2545587)
 * [Post Snippets - Custom WordPress Code Snippets Customizer](https://wordpress.org/plugins/post-snippets/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/post-snippets/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/post-snippets/)
 * [Active Topics](https://wordpress.org/support/plugin/post-snippets/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/post-snippets/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/post-snippets/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [wasanajones](https://wordpress.org/support/users/wasanajones/)
 * Last activity: [13 years ago](https://wordpress.org/support/topic/disable-php-snippets/#post-3778288)
 * Status: resolved