Title: [Plugin: WP Code Prettify] Patch for depricated has_cap argument
Last modified: August 20, 2016

---

# [Plugin: WP Code Prettify] Patch for depricated has_cap argument

 *  Resolved [ydm](https://wordpress.org/support/users/ydm/)
 * (@ydm)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-wp-code-prettify-patch-for-depricated-has_cap-argument/)
 * Hello!
 * Thanks for your plugin, it’s really great!
    One small thing is that it’s throwing
   and error message when used with newer versions of WP. The problem is that the
   $user->has_cap method is being called with depricated int argument while setting
   up the settings page (wp-code-prettify-page.php at line 156).
 * Here is a tiny patch for that file that solves the problem:
    [http://4web.bg/wp-content/plugins/wp-code-prettify/patch.txt](http://4web.bg/wp-content/plugins/wp-code-prettify/patch.txt)
 * [http://wordpress.org/extend/plugins/wp-code-prettify/](http://wordpress.org/extend/plugins/wp-code-prettify/)

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

 *  Plugin Author [Soli](https://wordpress.org/support/users/allnull/)
 * (@allnull)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-wp-code-prettify-patch-for-depricated-has_cap-argument/#post-3038710)
 * Thanks for your patch.
 * new version is released.
 * please let me know if it works or not.
 *  Thread Starter [ydm](https://wordpress.org/support/users/ydm/)
 * (@ydm)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-wp-code-prettify-patch-for-depricated-has_cap-argument/#post-3038715)
 * It’s working great! Thank you!

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

The topic ‘[Plugin: WP Code Prettify] Patch for depricated has_cap argument’ is 
closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-code-prettify.svg)
 * [WP Code Prettify](https://wordpress.org/plugins/wp-code-prettify/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-code-prettify/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-code-prettify/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-code-prettify/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-code-prettify/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-code-prettify/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [ydm](https://wordpress.org/support/users/ydm/)
 * Last activity: [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-wp-code-prettify-patch-for-depricated-has_cap-argument/#post-3038715)
 * Status: resolved