Skip to content

Instantly share code, notes, and snippets.

@argiepiano
Created August 6, 2023 14:50
Show Gist options
  • Save argiepiano/e7d0035bc0173b5f6d90cb00f329da41 to your computer and use it in GitHub Desktop.
Save argiepiano/e7d0035bc0173b5f6d90cb00f329da41 to your computer and use it in GitHub Desktop.
Testing stuff module - download both files and put in same folder inside the modules folder
name = Testing stuff
description = Just to test stuff
backdrop = 1.x
type = module
<?php
function testing_stuff_menu() {
$items['test-link'] = array(
'title' => 'Test link',
'page callback' => 'testing_stuff_test_link_page',
'access callback' => TRUE,
'type' => MENU_CALLBACK,
);
return $items;
}
function testing_stuff_test_link_page() {
$my_link = theme('link', array('text' => 'Link', 'path' => '<front>'));
return $my_link;
}
function testing_stuff_preprocess_link(&$variables) {
debug($variables);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment