Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
<?php function _phptemplate_variables($hook, $vars = array()) { switch ($hook) { /* === NODE VARIABLES === */ case 'node': { // Look, only node variables enter here, can set/unset. $vars['a_variable_for_tpl'] = 'hello'; break; } /* === COMMENT VARIABLES === */ case 'comment': { // etc.. break; } /* === BLOCK VARIABLES === */ case 'block': { break; } /* === BOX VARIABLES === */ //case 'box': { // Just a place holder. //break; } /* === PAGE VARIABLES === */ case 'page': { break; } } // END SWITCH CASE!! return $vars; }
This paste will be private.
From the Design Piracy series on my blog: