{"id":1411267,"date":"2010-03-04T08:23:46","date_gmt":"2010-03-04T08:23:46","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/share-code-library-across-plugins\/"},"modified":"2016-08-19T16:10:30","modified_gmt":"2016-08-19T16:10:30","slug":"share-code-library-across-plugins","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/share-code-library-across-plugins\/","title":{"rendered":"Share Code Library across Plugins"},"content":{"rendered":"<p>I have multiple plugins for numerous different functionalities. I have modularized my code to have comm functions in a file. How should I install my plugins so as to not get a fata error because of redefinition of the same file across various plugins?<\/p>\n<p>I&#8217;m doing it the brain-dead way of<br \/>\n  wp-content\/plugins\/my1STplugin\/mylib.php<br \/>\n  wp-content\/plugins\/my2NDplugin\/mylib.php<br \/>\n  wp-content\/plugins\/my3RDplugin\/mylib.php<\/p>\n<p>Thanks for your ideas,<\/p>\n","protected":false},"template":"","class_list":["post-1411267","topic","type-topic","status-closed","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/1411267","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\/1411267\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=1411267"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}