Title: Code Patch
Last modified: August 30, 2016

---

# Code Patch

 *  Resolved [Michael Angstadt](https://wordpress.org/support/users/mangstadt83/)
 * (@mangstadt83)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/code-patch/)
 * Hello,
 * We are using your plugin for our WordPress website, but we had to tweak it a 
   bit for our purposes. In doing so, I made some improvements to the code which
   you might be interested in.
    - Changed the order of some of the checks to improve performance.
    - Used “return” statements to reduce the amount of code indentation.
    - Used booleans instead of 0/1
 * Patch: [https://www.dropbox.com/s/5htsxhfqntnipmc/addfunc-mobile-detect.php.patch?dl=0](https://www.dropbox.com/s/5htsxhfqntnipmc/addfunc-mobile-detect.php.patch?dl=0)
 * [https://wordpress.org/plugins/addfunc-mobile-detect/](https://wordpress.org/plugins/addfunc-mobile-detect/)

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

 *  Plugin Author [Joe Rhoney](https://wordpress.org/support/users/joerhoney/)
 * (@joerhoney)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/code-patch/#post-6312218)
 * Thanks so much! I will examine your suggestions when I get a chance and see what
   I can use to improve the plugin.
 *  Plugin Author [Joe Rhoney](https://wordpress.org/support/users/joerhoney/)
 * (@joerhoney)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/code-patch/#post-6312219)
 * Your code cleanup is definitely an improvement and I’ll be implementing it into
   the next release of the plugin (2.1). Thanks again!
 *  Thread Starter [Michael Angstadt](https://wordpress.org/support/users/mangstadt83/)
 * (@mangstadt83)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/code-patch/#post-6312220)
 * You’re welcome!

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

The topic ‘Code Patch’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/addfunc-mobile-detect_1c0d1e.svg)
 * [AddFunc Mobile Detect](https://wordpress.org/plugins/addfunc-mobile-detect/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/addfunc-mobile-detect/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/addfunc-mobile-detect/)
 * [Active Topics](https://wordpress.org/support/plugin/addfunc-mobile-detect/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/addfunc-mobile-detect/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/addfunc-mobile-detect/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Michael Angstadt](https://wordpress.org/support/users/mangstadt83/)
 * Last activity: [10 years, 11 months ago](https://wordpress.org/support/topic/code-patch/#post-6312220)
 * Status: resolved