{"id":6311912,"date":"2015-07-09T14:55:27","date_gmt":"2015-07-09T14:55:27","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/code-patch\/"},"modified":"2016-08-30T15:18:31","modified_gmt":"2016-08-30T15:18:31","slug":"code-patch","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/code-patch\/","title":{"rendered":"Code Patch"},"content":{"rendered":"<p>Hello,<\/p>\n<p>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.<\/p>\n<ul>\n<li>Changed the order of some of the checks to improve performance.<\/li>\n<li>Used &#8220;return&#8221; statements to reduce the amount of code indentation.<\/li>\n<li>Used booleans instead of 0\/1<\/li>\n<\/ul>\n<p>Patch: https:\/\/www.dropbox.com\/s\/5htsxhfqntnipmc\/addfunc-mobile-detect.php.patch?dl=0<\/p>\n<p>https:\/\/wordpress.org\/plugins\/addfunc-mobile-detect\/<\/p>\n","protected":false},"template":"","class_list":["post-6311912","topic","type-topic","status-closed","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/6311912","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/6311912\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=6311912"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}