Last active
July 24, 2019 12:26
-
-
Save vishnukumarpv/c23ed70734473f75b6a8251675a0d1e9 to your computer and use it in GitHub Desktop.
module configuration form Drupal 7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function HOOK_menu(){ | |
$items = []; | |
$items['admin/config/content/HOOK_custom'] = array( | |
'title' => 'Meta tags', | |
'description' => 'Configuration for Meta tags module', | |
'page callback' => 'drupal_get_form', | |
'page arguments' => array('HOOK_custom_form'), | |
'access arguments' => array('access administration pages'), | |
'type' => MENU_NORMAL_ITEM, | |
); | |
return $items; | |
} | |
function HOOK_custom_form($form, &$form_state) { | |
$form['HOOK_custom_meta_desc'] = array( | |
'#type' => 'textarea', | |
'#title' => t('Meta tag: Description'), | |
'#default_value' => variable_get('HOOK_custom_meta_desc', ""), | |
'#description' => t('Meata description for home page'), | |
'#required' => FALSE, | |
); | |
return system_settings_form($form); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name = Custom | |
description = | |
core = 7.x | |
package = TNM Custom | |
configure = admin/config/content/HOOK_custom |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment