Skip to content

Commit

Permalink
Merge pull request Snugug#30 from rabellamy/preprocess-parameters
Browse files Browse the repository at this point in the history
changes parameters in preprocess functions to match api documentation
  • Loading branch information
iamcarrico committed Jan 31, 2014
2 parents 2845f3d + 63a327a commit 8a52e78
Showing 1 changed file with 8 additions and 24 deletions.
32 changes: 8 additions & 24 deletions templates/shared/template.php.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@
*
* @param $vars
* An array of variables to pass to the theme template.
* @param $hook
* The name of the template being rendered ("maintenance_page" in this case.)
*/
function <%= project_name %>_preprocess_maintenance_page(&$vars, $hook) {
function <%= project_name %>_preprocess_maintenance_page(&$vars) {
// When a variable is manipulated or added in preprocess_html or
// preprocess_page, that same work is probably needed for the maintenance page
// as well, so we can just re-use those functions to do that work here.
// <%= project_name %>_preprocess_html($variables, $hook);
// <%= project_name %>_preprocess_page($variables, $hook);
// <%= project_name %>_preprocess_html($vars);
// <%= project_name %>_preprocess_page($vars);

// This preprocessor will also be used if the db is inactive. To ensure your
// theme is used, add the following line to your settings.php file:
Expand All @@ -37,8 +35,6 @@ function <%= project_name %>_modernizr_load_alter(&$load) {
*
* @param $vars
* An array of variables to pass to the theme template.
* @param $hook
* The name of the template being rendered ("html" in this case.)
*/
/* -- Delete this line if you want to use this function
function <%= project_name %>_preprocess_html(&$vars) {
Expand All @@ -50,8 +46,6 @@ function <%= project_name %>_preprocess_html(&$vars) {
*
* @param $vars
* An array of variables to pass to the theme template.
* @param $hook
* The name of the template being rendered ("page" in this case.)
*/
/* -- Delete this line if you want to use this function
function <%= project_name %>_preprocess_page(&$vars) {
Expand All @@ -63,11 +57,9 @@ function <%= project_name %>_preprocess_page(&$vars) {
*
* @param $vars
* An array of variables to pass to the theme template.
* @param $hook
* The name of the template being rendered ("region" in this case.)
*/
/* -- Delete this line if you want to use this function
function <%= project_name %>_preprocess_region(&$vars, $hook) {
function <%= project_name %>_preprocess_region(&$vars) {

}
// */
Expand All @@ -77,11 +69,9 @@ function <%= project_name %>_preprocess_region(&$vars, $hook) {
*
* @param $vars
* An array of variables to pass to the theme template.
* @param $hook
* The name of the template being rendered ("block" in this case.)
*/
/* -- Delete this line if you want to use this function
function <%= project_name %>_preprocess_block(&$vars, $hook) {
function <%= project_name %>_preprocess_block(&$vars) {

}
// */
Expand All @@ -91,11 +81,9 @@ function <%= project_name %>_preprocess_block(&$vars, $hook) {
*
* @param $vars
* An array of variables to pass to the theme template.
* @param $hook
* The name of the template being rendered ("entity" in this case.)
*/
/* -- Delete this line if you want to use this function
function <%= project_name %>_preprocess_entity(&$vars, $hook) {
function <%= project_name %>_preprocess_entity(&$vars) {

}
// */
Expand All @@ -105,11 +93,9 @@ function <%= project_name %>_preprocess_entity(&$vars, $hook) {
*
* @param $vars
* An array of variables to pass to the theme template.
* @param $hook
* The name of the template being rendered ("node" in this case.)
*/
/* -- Delete this line if you want to use this function
function <%= project_name %>_preprocess_node(&$vars, $hook) {
function <%= project_name %>_preprocess_node(&$vars) {
$node = $vars['node'];
}
// */
Expand All @@ -133,11 +119,9 @@ function <%= project_name %>_preprocess_field(&$vars, $hook) {
*
* @param $vars
* An array of variables to pass to the theme template.
* @param $hook
* The name of the template being rendered ("comment" in this case.)
*/
/* -- Delete this line if you want to use this function
function <%= project_name %>_preprocess_comment(&$vars, $hook) {
function <%= project_name %>_preprocess_comment(&$vars) {
$comment = $vars['comment'];
}
// */
Expand Down

0 comments on commit 8a52e78

Please sign in to comment.