runeveryday Posted July 9, 2010 Share Posted July 9, 2010 function annotate_menu() { $items['admin/settings/annotate'] = array( 'title' => 'Annotation settings', 'description' => 'Change how annotations behave.', 'page callback' => 'drupal_get_form', 'page arguments' => array('annotate_admin_settings'), 'access arguments' => array('administer site configuration'), 'type' => MENU_NORMAL_ITEM, 'file' => 'annotate.admin.inc', ); return $items; } function annotate_admin_settings() { $options = node_get_types('names'); $form['annotate_node_types'] = array( '#type' => 'checkboxes', '#title' => t('Users may annotate these content types'), '#options' => $options, '#default_value' => variable_get('annotate_node_types', array('page')), '#description' => t('A text field will be available on these content types to make user-specific notes.'), ); return system_settings_form($form); } one the above ,there are two functions and each have a return value. but the return value all irregularly, now if i want to design a function how to write the function's return. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.