{"id":341,"date":"2013-05-13T20:42:24","date_gmt":"2013-05-14T00:42:24","guid":{"rendered":"https:\/\/2013-fr.montreal.wordcamp.org\/?post_type=wcb_session&#038;p=341"},"modified":"2013-07-01T18:07:05","modified_gmt":"2013-07-01T22:07:05","slug":"keep-your-code-organized-templates-functions-php-and-custom-plugins","status":"publish","type":"wcb_session","link":"https:\/\/montreal.wordcamp.org\/2013-fr\/session\/keep-your-code-organized-templates-functions-php-and-custom-plugins\/","title":{"rendered":"Keep Your Code Organized! Templates, functions.php and Custom Plugins"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-411\" alt=\"Jeremy Clarke\" src=\"https:\/\/2013-fr.montreal.wordcamp.org\/files\/2013\/05\/jeremy-clarke.jpeg\" width=\"102\" height=\"102\" \/>If you&rsquo;ve written PHP for a theme you should know by now that you need to keep anything complicated outside the templates. Functions.php can be a good place for this but there are many pitfalls and considerations you should keep in mind before (over)using it. This talk will examine your choices for organizing the code that makes up a WP site, ensuring you have plugin code in plugins and theme code in themes (it&rsquo;s not hard!).<\/p>\n<p><strong>Prerequisites:<\/strong>\u00a0This talk is for people already prepared to write themes and plugins. For best results PHP\/HTML\/CSS awareness are recommended.<\/p>\n<p><strong><a href=\"http:\/\/www.slideshare.net\/jeremyclarke\/jeremyclarke-wcmtl2013keepyourcodeorganized\">View the slides.<\/a><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you&rsquo;ve written PHP for a theme you should know by now that you need to keep anything complicated outside the templates. Functions.php can be a good place for this but there are many pitfalls and considerations you should keep &hellip; <a href=\"https:\/\/montreal.wordcamp.org\/2013-fr\/session\/keep-your-code-organized-templates-functions-php-and-custom-plugins\/\">Continuer la lecture <span class=\"screen-reader-text\">Keep Your Code Organized! Templates, functions.php and Custom Plugins<\/span>  <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":4229527,"featured_media":0,"template":"","meta":{"jetpack_post_was_ever_published":false,"_wcpt_session_time":1582047032,"_wcpt_session_duration":3000,"_wcpt_session_type":"session","_wcpt_session_slides":"","_wcpt_session_video":"","_wcpt_speaker_id":[272],"footnotes":""},"session_track":[166022],"session_category":[],"class_list":["post-341","wcb_session","type-wcb_session","status-publish","hentry","wcb_track-developpeur-de-themes"],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p3ejmN-5v","session_date_time":{"date":"02\/18\/2020","time":"12:30"},"session_speakers":[{"id":"272","slug":"jeremy-clarke","name":"Jeremy Clarke","link":"https:\/\/montreal.wordcamp.org\/2013-fr\/speaker\/jeremy-clarke\/"}],"session_cats_rendered":null,"_links":{"self":[{"href":"https:\/\/montreal.wordcamp.org\/2013-fr\/wp-json\/wp\/v2\/sessions\/341","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/montreal.wordcamp.org\/2013-fr\/wp-json\/wp\/v2\/sessions"}],"about":[{"href":"https:\/\/montreal.wordcamp.org\/2013-fr\/wp-json\/wp\/v2\/types\/wcb_session"}],"author":[{"embeddable":true,"href":"https:\/\/montreal.wordcamp.org\/2013-fr\/wp-json\/wp\/v2\/users\/4229527"}],"version-history":[{"count":5,"href":"https:\/\/montreal.wordcamp.org\/2013-fr\/wp-json\/wp\/v2\/sessions\/341\/revisions"}],"predecessor-version":[{"id":40915,"href":"https:\/\/montreal.wordcamp.org\/2013-fr\/wp-json\/wp\/v2\/sessions\/341\/revisions\/40915"}],"speakers":[{"embeddable":true,"href":"https:\/\/montreal.wordcamp.org\/2013-fr\/wp-json\/wp\/v2\/speakers\/272"}],"wp:attachment":[{"href":"https:\/\/montreal.wordcamp.org\/2013-fr\/wp-json\/wp\/v2\/media?parent=341"}],"wp:term":[{"taxonomy":"wcb_track","embeddable":true,"href":"https:\/\/montreal.wordcamp.org\/2013-fr\/wp-json\/wp\/v2\/session_track?post=341"},{"taxonomy":"wcb_session_category","embeddable":true,"href":"https:\/\/montreal.wordcamp.org\/2013-fr\/wp-json\/wp\/v2\/session_category?post=341"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}