Title: Disabling PHP Code functionality
Last modified: August 20, 2016

---

# Disabling PHP Code functionality

 *  Resolved [James Collins](https://wordpress.org/support/users/jamescollins/)
 * (@jamescollins)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/disabling-php-code-functionality/)
 * Hi,
 * Thanks for the great plugin.
 * Have you considered adding a filter/hook/setting that allows people to disable
   the “PHP Code” functionality?
 * In our case, we develop websites for clients, and we don’t want to allow them
   to use the “PHP Code” functionality.
 * If I sent you a patch, would you be interested in adding this into the plugin
   so that developers such as us can use the hook/filter to:
    – remove the “PHP 
   Code” checkbox on the post snippets screen. – disable the PHP Code execution (
   eval) functionality so that snippets aren’t executed as PHP code.
 * Thanks.
 * James
 * [http://wordpress.org/extend/plugins/post-snippets/](http://wordpress.org/extend/plugins/post-snippets/)

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

 *  Thread Starter [James Collins](https://wordpress.org/support/users/jamescollins/)
 * (@jamescollins)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/disabling-php-code-functionality/#post-3460605)
 * I just noticed you’re using github as well, so I’m happy to send you a pull request.
 * It should be a pretty straight-forward feature to add to the plugin.
 *  Thread Starter [James Collins](https://wordpress.org/support/users/jamescollins/)
 * (@jamescollins)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/disabling-php-code-functionality/#post-3460723)
 * Hi artstorm,
 * I have gone ahead and submitted a pull request for this: [https://github.com/artstorm/post-snippets/pull/1](https://github.com/artstorm/post-snippets/pull/1)
 * James
 *  [Johan Steen](https://wordpress.org/support/users/artstorm/)
 * (@artstorm)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/disabling-php-code-functionality/#post-3460728)
 * James!
 * That is awesome, and a very nice addition! I will include your contribution in
   the next update!
 * Thanks! 🙂
 * Cheers,
    Johan
 *  Thread Starter [James Collins](https://wordpress.org/support/users/jamescollins/)
 * (@jamescollins)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/disabling-php-code-functionality/#post-3460770)
 * For anyone reading this, the latest version (v2.1.1) includes this feature.
 *  [Johan Steen](https://wordpress.org/support/users/artstorm/)
 * (@artstorm)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/disabling-php-code-functionality/#post-3460771)
 * Thanks for contributing code! 🙂
 * Cheers,
    Johan
 *  [Johan Steen](https://wordpress.org/support/users/artstorm/)
 * (@artstorm)
 * [13 years ago](https://wordpress.org/support/topic/disabling-php-code-functionality/#post-3460830)
 * 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);`

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

The topic ‘Disabling PHP Code functionality’ 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/)

 * 6 replies
 * 2 participants
 * Last reply from: [Johan Steen](https://wordpress.org/support/users/artstorm/)
 * Last activity: [13 years ago](https://wordpress.org/support/topic/disabling-php-code-functionality/#post-3460830)
 * Status: resolved