{"id":1947,"date":"2013-05-05T10:00:50","date_gmt":"2013-05-05T15:00:50","guid":{"rendered":"https:\/\/2013.austin.wordcamp.org\/?post_type=wcb_session&#038;p=1947"},"modified":"2013-05-09T15:20:47","modified_gmt":"2013-05-09T20:20:47","slug":"managing-themes-and-server-environments-with-extensible-configuration-arrays","status":"publish","type":"wcb_session","link":"https:\/\/austin.wordcamp.org\/2013\/session\/managing-themes-and-server-environments-with-extensible-configuration-arrays\/","title":{"rendered":"(Developer) Managing Themes and Server Environments with Extensible Configuration Arrays"},"content":{"rendered":"<p>The standard pattern for configuring a server environment and its sites\u2019 themes is to define several constants, set a bunch of global variables, call a few functions, and sprinkle in a few filters into the wp-config.php and functions.php. This methodology to configure WordPress makes it burdensome to allow child themes to override settings in parent themes and for there to be environment-specific configurations across servers, from development to production.<\/p>\n<p>My talk will delve into how we have tackled this problem for large multisite installs by using multidimensional configuration arrays that can be merged and extended before being converted into the constants, global variables, and filters that WordPress relies on. Beyond the increased consistency and convenience of a central configuration registry, we\u2019ll see how using such extensible arrays allows for mixin configurations and \u201cstep-parent\u201d themes. We\u2019ll also see how storing all configuration in data arrays (as opposed to code) allows our code to be aware of its larger environment.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The standard pattern for configuring a server environment and its sites\u2019 themes is to define several constants, set a bunch of global variables, call a few functions, and sprinkle in a few filters into the wp-config.php and functions.php. This methodology to configure WordPress makes it burdensome to allow child themes to override settings in parent [&hellip;]<\/p>\n","protected":false},"author":291867,"featured_media":0,"template":"","meta":{"_crdt_document":"","jetpack_post_was_ever_published":false,"_wcpt_session_time":1368939600,"_wcpt_session_duration":3000,"_wcpt_session_type":"","_wcpt_session_slides":"","_wcpt_session_video":"","_wcpt_speaker_id":[1945],"footnotes":""},"session_track":[156343],"session_category":[],"class_list":["post-1947","wcb_session","type-wcb_session","status-publish","hentry","wcb_track-devday"],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p3740D-vp","session_date_time":{"date":"May 19, 2013","time":"12:00 am"},"session_speakers":[{"id":"1945","slug":"chris-olbekson-devday","name":"Chris Olbekson &#8211; DevDay","link":"https:\/\/austin.wordcamp.org\/2013\/speaker\/chris-olbekson-devday\/"}],"session_cats_rendered":null,"_links":{"self":[{"href":"https:\/\/austin.wordcamp.org\/2013\/wp-json\/wp\/v2\/sessions\/1947","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/austin.wordcamp.org\/2013\/wp-json\/wp\/v2\/sessions"}],"about":[{"href":"https:\/\/austin.wordcamp.org\/2013\/wp-json\/wp\/v2\/types\/wcb_session"}],"author":[{"embeddable":true,"href":"https:\/\/austin.wordcamp.org\/2013\/wp-json\/wp\/v2\/users\/291867"}],"version-history":[{"count":2,"href":"https:\/\/austin.wordcamp.org\/2013\/wp-json\/wp\/v2\/sessions\/1947\/revisions"}],"predecessor-version":[{"id":2066,"href":"https:\/\/austin.wordcamp.org\/2013\/wp-json\/wp\/v2\/sessions\/1947\/revisions\/2066"}],"speakers":[{"embeddable":true,"href":"https:\/\/austin.wordcamp.org\/2013\/wp-json\/wp\/v2\/speakers\/1945"}],"wp:attachment":[{"href":"https:\/\/austin.wordcamp.org\/2013\/wp-json\/wp\/v2\/media?parent=1947"}],"wp:term":[{"taxonomy":"wcb_track","embeddable":true,"href":"https:\/\/austin.wordcamp.org\/2013\/wp-json\/wp\/v2\/session_track?post=1947"},{"taxonomy":"wcb_session_category","embeddable":true,"href":"https:\/\/austin.wordcamp.org\/2013\/wp-json\/wp\/v2\/session_category?post=1947"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}