├── Drupal7.php ├── Devel │ ├── dargs │ ├── devel_render │ ├── ddebug_backtrace │ ├── dd │ ├── dpm │ ├── dpq │ ├── dpr │ ├── dsm │ ├── dvm │ ├── dvr │ ├── kpr │ ├── sdpm │ ├── dprint_r │ ├── kprint_r │ └── drupal_debug ├── Functions │ ├── get_t │ ├── drupal_is_cli │ ├── drupal_cron_run │ ├── drupal_get_title │ ├── drupal_not_found │ ├── drupal_common_theme │ ├── drupal_cron_cleanup │ ├── drupal_error_levels │ ├── drupal_get_profile │ ├── drupal_get_updaters │ ├── drupal_load_updates │ ├── drupal_multilingual │ ├── drupal_page_footer │ ├── drupal_page_header │ ├── drupal_site_offline │ ├── drupal_access_denied │ ├── drupal_anonymous_user │ ├── drupal_clear_css_cache │ ├── drupal_clear_js_cache │ ├── drupal_get_breadcrumb │ ├── drupal_get_destination │ ├── drupal_get_hash_salt │ ├── drupal_get_html_head │ ├── drupal_get_private_key │ ├── drupal_install_system │ ├── drupal_is_front_page │ ├── drupal_language_types │ ├── drupal_page_set_cache │ ├── drupal_path_initialize │ ├── drupal_session_commit │ ├── drupal_session_start │ ├── drupal_theme_rebuild │ ├── drupal_valid_test_ua │ ├── drupal_array_merge_deep │ ├── drupal_flush_all_caches │ ├── drupal_get_user_timezone │ ├── drupal_maintenance_theme │ ├── drupal_required_modules │ ├── drupal_theme_initialize │ ├── drupal_cache_system_paths │ ├── drupal_get_bootstrap_phase │ ├── drupal_get_database_types │ ├── drupal_get_rdf_namespaces │ ├── drupal_language_initialize │ ├── drupal_session_initialize │ ├── drupal_session_regenerate │ ├── drupal_settings_initialize │ ├── hide │ ├── show │ ├── check_url │ ├── drupal_detect_database_types │ ├── drupal_environment_initialize │ ├── drupal_get_filetransfer_info │ ├── drupal_installation_attempted │ ├── render │ ├── check_plain │ ├── variable_del │ ├── drupal_dirname │ ├── drupal_html_id │ ├── drupal_strlen │ ├── drupal_ucfirst │ ├── drupal_get_form │ ├── drupal_group_css │ ├── drupal_is_denied │ ├── drupal_parse_url │ ├── drupal_realpath │ ├── drupal_render │ ├── drupal_block_denied │ ├── drupal_encode_path │ ├── drupal_exit │ ├── drupal_explode_tags │ ├── drupal_get_token │ ├── drupal_hash_base64 │ ├── drupal_html_class │ ├── drupal_implode_tags │ ├── drupal_json_decode │ ├── drupal_json_encode │ ├── drupal_placeholder │ ├── drupal_render_page │ ├── drupal_strtolower │ ├── drupal_strtoupper │ ├── filter_xss_admin │ ├── drupal_autoload_class │ ├── drupal_build_css_cache │ ├── drupal_build_js_cache │ ├── drupal_check_module │ ├── drupal_check_profile │ ├── drupal_help_arg │ ├── drupal_install_profile_distribution_name │ ├── drupal_js_defaults │ ├── drupal_json_output │ ├── drupal_random_bytes │ ├── drupal_region_class │ ├── drupal_theme_access │ ├── drupal_validate_utf8 │ ├── drupal_aggregate_css │ ├── drupal_generate_test_ua │ ├── drupal_get_feeds │ ├── drupal_get_query_array │ ├── drupal_install_schema │ ├── drupal_parse_info_file │ ├── drupal_parse_info_format │ ├── drupal_pre_render_link │ ├── drupal_process_states │ ├── drupal_redirect_form │ ├── drupal_save_session │ ├── drupal_set_time_limit │ ├── drupal_static_reset │ ├── drupal_uninstall_schema │ ├── drupal_valid_http_host │ ├── drupal_delete_file_if_stale │ ├── drupal_depth_first_search │ ├── drupal_get_http_header │ ├── drupal_parse_dependency │ ├── drupal_pre_render_links │ ├── drupal_pre_render_markup │ ├── drupal_pre_render_styles │ ├── drupal_render_cache_get │ ├── drupal_render_cid_create │ ├── drupal_session_destroy_uid │ ├── drupal_session_started │ ├── drupal_verify_profile │ ├── drupal_xml_parser_create │ ├── drupal_attributes │ ├── drupal_autoload_interface │ ├── drupal_clear_path_cache │ ├── drupal_detect_baseurl │ ├── drupal_get_schema_versions │ ├── drupal_page_get_cache │ ├── drupal_set_breadcrumb │ ├── drupal_set_page_content │ ├── drupal_array_merge_deep_array │ ├── drupal_render_cid_parts │ ├── drupal_strip_dangerous_protocols │ ├── arg │ ├── drupal_deliver_html_page │ ├── drupal_load │ ├── drupal_page_is_cacheable │ ├── drupal_requirements_severity │ ├── drupal_serve_page_from_cache │ ├── theme │ ├── variable_set │ ├── drupal_chmod │ ├── drupal_get_path │ ├── drupal_sort_css_js │ ├── drupal_sort_title │ ├── drupal_sort_weight │ ├── drupal_hmac_base64 │ ├── drupal_rmdir │ ├── drupal_tempnam │ ├── drupal_unlink │ ├── drupal_unpack │ ├── url │ ├── variable_get │ ├── drupal_http_header_attributes │ ├── drupal_mail_system │ ├── drupal_match_path │ ├── drupal_override_server_variables │ ├── drupal_path_alias_whitelist_rebuild │ ├── drupal_pre_render_conditional_comments │ ├── drupal_var_export │ ├── drupal_wrap_mail │ ├── drupal_add_css │ ├── drupal_add_feed │ ├── drupal_add_js │ ├── drupal_build_form │ ├── drupal_get_library │ ├── drupal_map_assoc │ ├── drupal_truncate_bytes │ ├── drupal_convert_to_utf8 │ ├── drupal_form_submit │ ├── drupal_get_css │ ├── drupal_retrieve_form │ ├── drupal_add_html_head │ ├── drupal_bootstrap │ ├── drupal_get_schema │ ├── drupal_html_to_text │ ├── drupal_render_cache_set │ ├── drupal_valid_path │ ├── drupal_find_theme_functions │ ├── drupal_get_messages │ ├── drupal_get_normal_path │ ├── drupal_http_build_query │ ├── drupal_http_request │ ├── drupal_schema_fields_sql │ ├── drupal_set_title │ ├── drupal_check_incompatibility │ ├── drupal_get_path_alias │ ├── drupal_render_children │ ├── l │ ├── drupal_add_html_head_link │ ├── drupal_add_region_content │ ├── drupal_get_region_content │ ├── drupal_get_schema_unprocessed │ ├── drupal_rewrite_settings │ ├── drupal_render_collect_attached │ ├── drupal_send_headers │ ├── drupal_set_installed_schema_version │ ├── drupal_array_nested_key_exists │ ├── drupal_load_stylesheet_content │ ├── drupal_substr │ ├── drupal_deliver_page │ ├── t │ ├── drupal_uninstall_modules │ ├── module_load_include │ ├── drupal_add_library │ ├── drupal_get_filename │ ├── drupal_install_mkdir │ ├── drupal_prepare_form │ ├── drupal_process_form │ ├── drupal_validate_form │ ├── drupal_add_http_header │ ├── drupal_install_fix_file │ ├── menu_get_object │ ├── drupal_find_theme_templates │ ├── drupal_lookup_path │ ├── drupal_rebuild_form │ ├── drupal_valid_token │ ├── drupal_write_record │ ├── drupal_get_js │ ├── drupal_goto │ ├── drupal_set_message │ ├── drupal_load_stylesheet │ ├── drupal_verify_install_file │ ├── filter_xss │ ├── drupal_alter │ ├── drupal_array_get_nested_value │ ├── drupal_get_installed_schema_version │ ├── check_markup │ ├── drupal_get_query_parameters │ ├── drupal_mkdir │ ├── drupal_system_listing │ ├── drupal_array_set_nested_value │ ├── drupal_process_attached │ ├── drupal_render_cache_by_query │ ├── watchdog │ ├── drupal_mail │ ├── drupal_clean_css_identifier │ └── drupal_add_tabledrag ├── Snippets │ ├── doxygen │ ├── doxygen-file │ ├── function-definition-d │ └── doxygen-param ├── Control Structures │ ├── while-d │ ├── foreach-d │ ├── ifonly-d │ ├── for-d │ ├── foreachArrayKeyValue-d │ ├── if-d │ ├── switch-d │ ├── ifelseif-d │ └── forSizeOfArray-d ├── Hooks │ ├── hook_file_insert │ ├── hook_file_update │ ├── hook_file_copy │ ├── hook_file_move │ ├── hook_test_finished │ ├── hook_disable │ ├── hook_enable │ ├── hook_node_type_insert │ ├── hook_test_group_started │ ├── hook_test_group_finished │ ├── hook_uninstall │ ├── hook_flush_caches │ ├── hook_search_access │ ├── hook_field_read_field │ ├── hook_taxonomy_term_presave │ ├── hook_aggregator_remove │ ├── hook_entity_presave │ ├── hook_field_create_field │ ├── hook_field_delete_field │ ├── hook_filter_format_insert │ ├── hook_filter_format_update │ ├── hook_node_type_delete │ ├── hook_process_HOOK │ ├── hook_field_read_instance │ ├── hook_filter_format_disable │ ├── hook_archiver_info_alter │ ├── hook_field_create_instance │ ├── hook_field_delete_instance │ ├── hook_search_preprocess │ ├── hook_aggregator_fetch │ ├── hook_field_attach_delete │ ├── hook_field_attach_insert │ ├── hook_field_attach_update │ ├── hook_delete │ ├── hook_field_attach_presave │ ├── hook_multilingual_settings_changed │ ├── hook_entity_query_alter │ ├── hook_taxonomy_vocabulary_presave │ ├── hook_field_attach_load │ ├── hook_field_update_instance │ ├── hook_file_presave │ ├── hook_themes_disabled │ ├── hook_field_attach_validate │ ├── hook_menu_alter │ ├── hook_node_delete │ ├── hook_path_delete │ ├── hook_taxonomy_term_delete │ ├── hook_comment_insert │ ├── hook_comment_update │ ├── hook_css_alter │ ├── hook_element_info │ ├── hook_field_attach_delete_revision │ ├── hook_field_attach_preprocess_alter │ ├── hook_locale │ ├── hook_trigger_info_alter │ ├── hook_user_delete │ ├── hook_actions_delete │ ├── hook_aggregator_process │ ├── hook_field_widget_error │ ├── hook_comment_view │ ├── hook_query_alter │ ├── hook_themes_enabled │ ├── hook_action_info_alter │ ├── hook_block_info_alter │ ├── hook_comment_delete │ ├── hook_field_storage_pre_load │ ├── hook_comment_publish │ ├── hook_countries_alter │ ├── hook_exit │ ├── hook_file_delete │ ├── hook_modules_disabled │ ├── hook_node_revision_delete │ ├── hook_admin_paths │ ├── hook_drupal_goto_alter │ ├── hook_entity_load │ ├── hook_field_purge_field │ ├── hook_comment_presave │ ├── hook_comment_unpublish │ ├── hook_date_format_types_alter │ ├── hook_date_formats_alter │ ├── hook_openid │ ├── hook_update │ ├── hook_image_style_flush │ ├── hook_node_prepare │ ├── hook_openid_discovery_method_info │ ├── hook_openid_discovery_method_info_alter │ ├── hook_openid_response │ ├── hook_field_is_empty │ ├── hook_file_download_access │ ├── hook_insert │ ├── hook_node_update │ ├── hook_overlay_parent_initialize │ ├── hook_path_update │ ├── hook_search_reset │ ├── hook_user_categories │ ├── hook_dashboard_regions_alter │ ├── hook_modules_installed │ ├── hook_overlay_child_initialize │ ├── hook_custom_theme │ ├── hook_language_fallback_candidates_alter │ ├── hook_openid_normalization_method_info │ ├── hook_stream_wrappers_alter │ ├── hook_user_logout │ ├── hook_aggregator_parse │ ├── hook_boot │ ├── hook_cron_queue_info │ ├── hook_menu_link_delete │ ├── hook_node_insert │ ├── hook_openid_normalization_method_info_alter │ ├── hook_path_insert │ ├── hook_search_info │ ├── hook_hook_info │ ├── hook_js_alter │ ├── hook_mail_alter │ ├── hook_user_role_presave │ ├── hook_archiver_info │ ├── hook_field_purge_field_instance │ ├── hook_aggregator_parse_info │ ├── hook_element_info_alter │ ├── hook_field_update_field │ ├── hook_taxonomy_vocabulary_insert │ ├── hook_user_role_delete │ ├── hook_aggregator_fetch_info │ ├── hook_ajax_render_alter │ ├── hook_username_alter │ ├── hook_node_presave │ ├── hook_user_update │ ├── hook_aggregator_process_info │ ├── hook_date_format_types │ ├── hook_field_storage_purge_field_instance │ ├── hook_translated_menu_link_alter │ ├── hook_update_last_removed │ ├── hook_user_insert │ ├── hook_block_save │ ├── hook_filter_FILTER_process │ ├── hook_load │ ├── hook_node_grants │ ├── hook_updater_info_alter │ ├── hook_menu_delete │ ├── hook_node_view │ ├── hook_permission │ ├── hook_preprocess_HOOK │ ├── hook_taxonomy_vocabulary_load │ ├── hook_field_storage_info_alter │ ├── hook_init │ ├── hook_modules_enabled │ ├── hook_taxonomy_vocabulary_delete │ ├── hook_validate │ ├── hook_cron_queue_info_alter │ ├── hook_field_access │ ├── hook_modules_uninstalled │ ├── hook_user_load │ ├── hook_contextual_links_view_alter │ ├── hook_entity_view │ ├── hook_node_info │ ├── hook_system_info_alter │ ├── hook_node_load │ ├── hook_node_validate │ ├── hook_entity_info_alter │ ├── hook_field_attach_create_bundle │ ├── hook_filetransfer_info │ ├── hook_taxonomy_vocabulary_update │ ├── hook_user_presave │ ├── hook_comment_load │ ├── hook_field_display_ENTITY_TYPE_alter │ ├── hook_field_extra_fields_display_alter │ ├── hook_field_storage_create_field │ ├── hook_language_types_info_alter │ ├── hook_menu_insert │ ├── hook_menu_update │ ├── hook_field_attach_prepare_translation_alter │ ├── hook_hook_info_alter │ ├── hook_page_alter │ ├── hook_filter_FILTER_prepare │ ├── hook_taxonomy_term_load │ ├── hook_admin_paths_alter │ ├── hook_field_storage_purge_field │ ├── hook_node_search_result │ ├── hook_field_attach_purge │ ├── hook_image_effect_info_alter │ ├── hook_schema_alter │ ├── hook_shortcut_default_set │ ├── hook_simpletest_alter │ ├── hook_xmlrpc │ ├── hook_file_download_access_alter │ ├── hook_language_init │ ├── hook_user_role_insert │ ├── hook_field_available_languages_alter │ ├── hook_field_info_max_weight │ ├── hook_field_widget_form │ ├── hook_user_role_update │ ├── hook_field_storage_info │ ├── hook_menu_get_item_alter │ ├── hook_dashboard_regions │ ├── hook_install_tasks_alter │ ├── hook_node_type_update │ ├── hook_filetransfer_info_alter │ ├── hook_install │ ├── hook_language_negotiation_info_alter │ ├── hook_url_inbound_alter │ ├── hook_field_extra_fields_alter │ ├── hook_menu_site_status_alter │ ├── hook_verify_update_archive │ ├── hook_entity_delete │ ├── hook_image_toolkits │ ├── hook_block_info │ ├── hook_language_switch_links_alter │ ├── hook_language_types_info │ ├── hook_updater_info │ ├── hook_entity_prepare_view │ ├── hook_field_widget_info_alter │ ├── hook_html_head_alter │ ├── hook_menu_link_insert │ ├── hook_field_formatter_info_alter │ ├── hook_image_style_delete │ ├── hook_node_view_alter │ ├── hook_image_style_save │ ├── hook_page_build │ ├── hook_field_attach_form │ ├── hook_file_validate │ ├── hook_search_status │ ├── hook_entity_view_alter │ ├── hook_field_widget_properties_ENTITY_TYPE_alter │ ├── hook_field_widget_properties_alter │ ├── hook_file_load │ ├── hook_node_submit │ ├── hook_search_page │ ├── hook_field_attach_submit │ ├── hook_taxonomy_term_view_alter │ ├── hook_field_delete_revision │ ├── hook_filter_FILTER_settings │ ├── hook_user_view_alter │ ├── hook_entity_update │ ├── hook_filter_info_alter │ ├── hook_theme_registry_alter │ ├── hook_entity_insert │ ├── hook_field_attach_delete_bundle │ ├── hook_file_mimetype_mapping_alter │ ├── hook_filter_FILTER_tips │ ├── hook_image_effect_info │ ├── hook_menu │ ├── hook_taxonomy_term_insert │ ├── hook_field_info_alter │ ├── hook_node_update_index │ ├── hook_comment_view_alter │ ├── hook_field_presave │ ├── hook_menu_contextual_links_alter │ ├── hook_field_formatter_settings_summary │ ├── hook_form_alter │ ├── hook_system_themes_page_alter │ ├── hook_field_language_alter │ ├── hook_field_storage_delete │ ├── hook_form_system_theme_settings_alter │ ├── hook_image_styles_alter │ ├── hook_menu_link_update │ ├── hook_user_login │ ├── hook_taxonomy_term_update │ ├── hook_batch_alter │ ├── hook_xmlrpc_alter │ ├── hook_block_view_MODULE_DELTA_alter │ ├── hook_date_formats │ ├── hook_view │ ├── hook_user_operations │ ├── hook_page_delivery_callback_alter │ ├── hook_field_display_alter │ ├── hook_form_FORM_ID_alter │ ├── hook_menu_breadcrumb_alter │ ├── hook_field_settings_form │ ├── hook_user_view │ ├── hook_field_prepare_translation │ ├── hook_prepare │ ├── hook_url_outbound_alter │ ├── hook_block_configure │ ├── hook_field_storage_details_alter │ ├── hook_form_BASE_FORM_ID_alter │ ├── hook_registry_files_alter │ ├── hook_block_view_alter │ ├── hook_image_default_styles │ ├── hook_rdf_namespaces │ ├── hook_file_download │ ├── hook_field_storage_purge │ ├── hook_module_implements_alter │ ├── hook_field_attach_rename_bundle │ ├── hook_field_storage_delete_revision │ ├── hook_field_prepare_view │ ├── hook_process │ └── hook_library_alter └── Theme │ ├── theme_menu_tree │ ├── theme_more_link │ ├── theme_mark │ └── theme_menu_link └── Drupal7.php.tar.gz /Drupal7.php/Devel/dargs: -------------------------------------------------------------------------------- 1 | dargs(); 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/get_t: -------------------------------------------------------------------------------- 1 | $t = get_t(); 2 | -------------------------------------------------------------------------------- /Drupal7.php/Devel/devel_render: -------------------------------------------------------------------------------- 1 | devel_render(); 2 | -------------------------------------------------------------------------------- /Drupal7.php/Devel/ddebug_backtrace: -------------------------------------------------------------------------------- 1 | ddebug_backtrace(); 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_is_cli: -------------------------------------------------------------------------------- 1 | drupal_is_cli() 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_cron_run: -------------------------------------------------------------------------------- 1 | drupal_cron_run() 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_get_title: -------------------------------------------------------------------------------- 1 | drupal_get_title() 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_not_found: -------------------------------------------------------------------------------- 1 | drupal_not_found() 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_common_theme: -------------------------------------------------------------------------------- 1 | drupal_common_theme() 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_cron_cleanup: -------------------------------------------------------------------------------- 1 | drupal_cron_cleanup() 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_error_levels: -------------------------------------------------------------------------------- 1 | drupal_error_levels() 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_get_profile: -------------------------------------------------------------------------------- 1 | drupal_get_profile() 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_get_updaters: -------------------------------------------------------------------------------- 1 | drupal_get_updaters() 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_load_updates: -------------------------------------------------------------------------------- 1 | drupal_load_updates() 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_multilingual: -------------------------------------------------------------------------------- 1 | drupal_multilingual() 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_page_footer: -------------------------------------------------------------------------------- 1 | drupal_page_footer() 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_page_header: -------------------------------------------------------------------------------- 1 | drupal_page_header() 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_site_offline: -------------------------------------------------------------------------------- 1 | drupal_site_offline() 2 | -------------------------------------------------------------------------------- /Drupal7.php/Devel/dd: -------------------------------------------------------------------------------- 1 | dd($#placeholderstart# data #placeholderend#); 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_access_denied: -------------------------------------------------------------------------------- 1 | drupal_access_denied() 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_anonymous_user: -------------------------------------------------------------------------------- 1 | drupal_anonymous_user() 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_clear_css_cache: -------------------------------------------------------------------------------- 1 | drupal_clear_css_cache() 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_clear_js_cache: -------------------------------------------------------------------------------- 1 | drupal_clear_js_cache() 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_get_breadcrumb: -------------------------------------------------------------------------------- 1 | drupal_get_breadcrumb() 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_get_destination: -------------------------------------------------------------------------------- 1 | drupal_get_destination() 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_get_hash_salt: -------------------------------------------------------------------------------- 1 | drupal_get_hash_salt() 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_get_html_head: -------------------------------------------------------------------------------- 1 | drupal_get_html_head() 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_get_private_key: -------------------------------------------------------------------------------- 1 | drupal_get_private_key() 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_install_system: -------------------------------------------------------------------------------- 1 | drupal_install_system() 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_is_front_page: -------------------------------------------------------------------------------- 1 | drupal_is_front_page() 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_language_types: -------------------------------------------------------------------------------- 1 | drupal_language_types() 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_page_set_cache: -------------------------------------------------------------------------------- 1 | drupal_page_set_cache() 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_path_initialize: -------------------------------------------------------------------------------- 1 | drupal_path_initialize() 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_session_commit: -------------------------------------------------------------------------------- 1 | drupal_session_commit() 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_session_start: -------------------------------------------------------------------------------- 1 | drupal_session_start() 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_theme_rebuild: -------------------------------------------------------------------------------- 1 | drupal_theme_rebuild() 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_valid_test_ua: -------------------------------------------------------------------------------- 1 | drupal_valid_test_ua() 2 | -------------------------------------------------------------------------------- /Drupal7.php/Devel/dpm: -------------------------------------------------------------------------------- 1 | dpm($#placeholderstart# input #placeholderend#); 2 | -------------------------------------------------------------------------------- /Drupal7.php/Devel/dpq: -------------------------------------------------------------------------------- 1 | dpq($#placeholderstart# query #placeholderend#); 2 | -------------------------------------------------------------------------------- /Drupal7.php/Devel/dpr: -------------------------------------------------------------------------------- 1 | dpr($#placeholderstart# input #placeholderend#); 2 | -------------------------------------------------------------------------------- /Drupal7.php/Devel/dsm: -------------------------------------------------------------------------------- 1 | dsm($#placeholderstart# input #placeholderend#); 2 | -------------------------------------------------------------------------------- /Drupal7.php/Devel/dvm: -------------------------------------------------------------------------------- 1 | dvm($#placeholderstart# input #placeholderend#); 2 | -------------------------------------------------------------------------------- /Drupal7.php/Devel/dvr: -------------------------------------------------------------------------------- 1 | dvr($#placeholderstart# input #placeholderend#); 2 | -------------------------------------------------------------------------------- /Drupal7.php/Devel/kpr: -------------------------------------------------------------------------------- 1 | kpr($#placeholderstart# input #placeholderend#); 2 | -------------------------------------------------------------------------------- /Drupal7.php/Devel/sdpm: -------------------------------------------------------------------------------- 1 | sdpm($#placeholderstart# input #placeholderend#); 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_array_merge_deep: -------------------------------------------------------------------------------- 1 | drupal_array_merge_deep() 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_flush_all_caches: -------------------------------------------------------------------------------- 1 | drupal_flush_all_caches() 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_get_user_timezone: -------------------------------------------------------------------------------- 1 | drupal_get_user_timezone() 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_maintenance_theme: -------------------------------------------------------------------------------- 1 | drupal_maintenance_theme() 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_required_modules: -------------------------------------------------------------------------------- 1 | drupal_required_modules() 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_theme_initialize: -------------------------------------------------------------------------------- 1 | drupal_theme_initialize() 2 | -------------------------------------------------------------------------------- /Drupal7.php/Snippets/doxygen: -------------------------------------------------------------------------------- 1 | #indent# 2 | /** 3 | * #insertion# 4 | */ 5 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_cache_system_paths: -------------------------------------------------------------------------------- 1 | drupal_cache_system_paths() 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_get_bootstrap_phase: -------------------------------------------------------------------------------- 1 | drupal_get_bootstrap_phase() 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_get_database_types: -------------------------------------------------------------------------------- 1 | drupal_get_database_types() 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_get_rdf_namespaces: -------------------------------------------------------------------------------- 1 | drupal_get_rdf_namespaces() 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_language_initialize: -------------------------------------------------------------------------------- 1 | drupal_language_initialize() 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_session_initialize: -------------------------------------------------------------------------------- 1 | drupal_session_initialize() 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_session_regenerate: -------------------------------------------------------------------------------- 1 | drupal_session_regenerate() 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_settings_initialize: -------------------------------------------------------------------------------- 1 | drupal_settings_initialize() 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/hide: -------------------------------------------------------------------------------- 1 | hide(#placeholderstart# $element #placeholderend#); 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/show: -------------------------------------------------------------------------------- 1 | show(#placeholderstart# $element #placeholderend#); 2 | -------------------------------------------------------------------------------- /Drupal7.php/Devel/dprint_r: -------------------------------------------------------------------------------- 1 | dprint_r($#placeholderstart# input #placeholderend#); 2 | -------------------------------------------------------------------------------- /Drupal7.php/Devel/kprint_r: -------------------------------------------------------------------------------- 1 | kprint_r($#placeholderstart# input #placeholderend#); 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/check_url: -------------------------------------------------------------------------------- 1 | check_url(#placeholderstart# $uri #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_detect_database_types: -------------------------------------------------------------------------------- 1 | drupal_detect_database_types() 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_environment_initialize: -------------------------------------------------------------------------------- 1 | drupal_environment_initialize() 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_get_filetransfer_info: -------------------------------------------------------------------------------- 1 | drupal_get_filetransfer_info() 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_installation_attempted: -------------------------------------------------------------------------------- 1 | drupal_installation_attempted() 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/render: -------------------------------------------------------------------------------- 1 | render(#placeholderstart# $element #placeholderend#); 2 | -------------------------------------------------------------------------------- /Drupal7.php/Devel/drupal_debug: -------------------------------------------------------------------------------- 1 | drupal_debug($#placeholderstart# data #placeholderend#); 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/check_plain: -------------------------------------------------------------------------------- 1 | check_plain(#placeholderstart# $text #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/variable_del: -------------------------------------------------------------------------------- 1 | variable_del('#placeholderstart# $name #placeholderend#') -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_dirname: -------------------------------------------------------------------------------- 1 | drupal_dirname(#placeholderstart# $uri #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_html_id: -------------------------------------------------------------------------------- 1 | drupal_html_id(#placeholderstart# $id #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_strlen: -------------------------------------------------------------------------------- 1 | drupal_strlen(#placeholderstart# $text #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_ucfirst: -------------------------------------------------------------------------------- 1 | drupal_ucfirst(#placeholderstart# $text #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Snippets/doxygen-file: -------------------------------------------------------------------------------- 1 | #indent# 2 | /** 3 | * @file 4 | * #insertion# 5 | */ 6 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_get_form: -------------------------------------------------------------------------------- 1 | drupal_get_form(#placeholderstart# $form_id #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_group_css: -------------------------------------------------------------------------------- 1 | drupal_group_css(#placeholderstart# $css #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_is_denied: -------------------------------------------------------------------------------- 1 | drupal_is_denied(#placeholderstart# $ip #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_parse_url: -------------------------------------------------------------------------------- 1 | drupal_parse_url(#placeholderstart# $url #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_realpath: -------------------------------------------------------------------------------- 1 | drupal_realpath(#placeholderstart# $uri #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_render: -------------------------------------------------------------------------------- 1 | drupal_render(#placeholderstart# &$elements #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frjo/BBEdit-Clippings-for-Drupal/HEAD/Drupal7.php.tar.gz -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_block_denied: -------------------------------------------------------------------------------- 1 | drupal_block_denied(#placeholderstart# $ip #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_encode_path: -------------------------------------------------------------------------------- 1 | drupal_encode_path(#placeholderstart# $path #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_exit: -------------------------------------------------------------------------------- 1 | drupal_exit(#placeholderstart# $destination = NULL #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_explode_tags: -------------------------------------------------------------------------------- 1 | drupal_explode_tags(#placeholderstart# $tags #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_get_token: -------------------------------------------------------------------------------- 1 | drupal_get_token(#placeholderstart# $value = '' #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_hash_base64: -------------------------------------------------------------------------------- 1 | drupal_hash_base64(#placeholderstart# $data #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_html_class: -------------------------------------------------------------------------------- 1 | drupal_html_class(#placeholderstart# $class #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_implode_tags: -------------------------------------------------------------------------------- 1 | drupal_implode_tags(#placeholderstart# $tags #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_json_decode: -------------------------------------------------------------------------------- 1 | drupal_json_decode(#placeholderstart# $var #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_json_encode: -------------------------------------------------------------------------------- 1 | drupal_json_encode(#placeholderstart# $var #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_placeholder: -------------------------------------------------------------------------------- 1 | drupal_placeholder(#placeholderstart# $text #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_render_page: -------------------------------------------------------------------------------- 1 | drupal_render_page(#placeholderstart# $page #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_strtolower: -------------------------------------------------------------------------------- 1 | drupal_strtolower(#placeholderstart# $text #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_strtoupper: -------------------------------------------------------------------------------- 1 | drupal_strtoupper(#placeholderstart# $text #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/filter_xss_admin: -------------------------------------------------------------------------------- 1 | filter_xss_admin(#placeholderstart# $string #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_autoload_class: -------------------------------------------------------------------------------- 1 | drupal_autoload_class(#placeholderstart# $class #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_build_css_cache: -------------------------------------------------------------------------------- 1 | drupal_build_css_cache(#placeholderstart# $css #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_build_js_cache: -------------------------------------------------------------------------------- 1 | drupal_build_js_cache(#placeholderstart# $files #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_check_module: -------------------------------------------------------------------------------- 1 | drupal_check_module(#placeholderstart# $module #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_check_profile: -------------------------------------------------------------------------------- 1 | drupal_check_profile(#placeholderstart# $profile #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_help_arg: -------------------------------------------------------------------------------- 1 | drupal_help_arg(#placeholderstart# $arg = array() #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_install_profile_distribution_name: -------------------------------------------------------------------------------- 1 | drupal_install_profile_distribution_name() 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_js_defaults: -------------------------------------------------------------------------------- 1 | drupal_js_defaults(#placeholderstart# $data = NULL #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_json_output: -------------------------------------------------------------------------------- 1 | drupal_json_output(#placeholderstart# $var = NULL #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_random_bytes: -------------------------------------------------------------------------------- 1 | drupal_random_bytes(#placeholderstart# $count #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_region_class: -------------------------------------------------------------------------------- 1 | drupal_region_class(#placeholderstart# $region #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_theme_access: -------------------------------------------------------------------------------- 1 | drupal_theme_access(#placeholderstart# $theme #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_validate_utf8: -------------------------------------------------------------------------------- 1 | drupal_validate_utf8(#placeholderstart# $text #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_aggregate_css: -------------------------------------------------------------------------------- 1 | drupal_aggregate_css(#placeholderstart# &$css_groups #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_generate_test_ua: -------------------------------------------------------------------------------- 1 | drupal_generate_test_ua(#placeholderstart# $prefix #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_get_feeds: -------------------------------------------------------------------------------- 1 | drupal_get_feeds(#placeholderstart# $delimiter = "\n" #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_get_query_array: -------------------------------------------------------------------------------- 1 | drupal_get_query_array(#placeholderstart# $query #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_install_schema: -------------------------------------------------------------------------------- 1 | drupal_install_schema(#placeholderstart# $module #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_parse_info_file: -------------------------------------------------------------------------------- 1 | drupal_parse_info_file(#placeholderstart# $filename #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_parse_info_format: -------------------------------------------------------------------------------- 1 | drupal_parse_info_format(#placeholderstart# $data #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_pre_render_link: -------------------------------------------------------------------------------- 1 | drupal_pre_render_link(#placeholderstart# $element #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_process_states: -------------------------------------------------------------------------------- 1 | drupal_process_states(#placeholderstart# &$elements #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_redirect_form: -------------------------------------------------------------------------------- 1 | drupal_redirect_form(#placeholderstart# $form_state #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_save_session: -------------------------------------------------------------------------------- 1 | drupal_save_session(#placeholderstart# $status = NULL #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_set_time_limit: -------------------------------------------------------------------------------- 1 | drupal_set_time_limit(#placeholderstart# $time_limit #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_static_reset: -------------------------------------------------------------------------------- 1 | drupal_static_reset(#placeholderstart# $name = NULL #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_uninstall_schema: -------------------------------------------------------------------------------- 1 | drupal_uninstall_schema(#placeholderstart# $module #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_valid_http_host: -------------------------------------------------------------------------------- 1 | drupal_valid_http_host(#placeholderstart# $host #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Control Structures/while-d: -------------------------------------------------------------------------------- 1 | #indent# 2 | while (#selstart#true expression#selend#) { 3 | #insertion# 4 | } 5 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_delete_file_if_stale: -------------------------------------------------------------------------------- 1 | drupal_delete_file_if_stale(#placeholderstart# $uri #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_depth_first_search: -------------------------------------------------------------------------------- 1 | drupal_depth_first_search(#placeholderstart# &$graph #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_get_http_header: -------------------------------------------------------------------------------- 1 | drupal_get_http_header(#placeholderstart# $name = NULL #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_parse_dependency: -------------------------------------------------------------------------------- 1 | drupal_parse_dependency(#placeholderstart# $dependency #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_pre_render_links: -------------------------------------------------------------------------------- 1 | drupal_pre_render_links(#placeholderstart# $element #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_pre_render_markup: -------------------------------------------------------------------------------- 1 | drupal_pre_render_markup(#placeholderstart# $elements #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_pre_render_styles: -------------------------------------------------------------------------------- 1 | drupal_pre_render_styles(#placeholderstart# $elements #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_render_cache_get: -------------------------------------------------------------------------------- 1 | drupal_render_cache_get(#placeholderstart# $elements #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_render_cid_create: -------------------------------------------------------------------------------- 1 | drupal_render_cid_create(#placeholderstart# $elements #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_session_destroy_uid: -------------------------------------------------------------------------------- 1 | drupal_session_destroy_uid(#placeholderstart# $uid #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_session_started: -------------------------------------------------------------------------------- 1 | drupal_session_started(#placeholderstart# $set = NULL #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_verify_profile: -------------------------------------------------------------------------------- 1 | drupal_verify_profile(#placeholderstart# $install_state #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_xml_parser_create: -------------------------------------------------------------------------------- 1 | drupal_xml_parser_create(#placeholderstart# &$data #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Control Structures/foreach-d: -------------------------------------------------------------------------------- 1 | #indent# 2 | foreach (#selstart#array#selend# as $item) { 3 | #insertion# 4 | } 5 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_attributes: -------------------------------------------------------------------------------- 1 | drupal_attributes(#placeholderstart# array $attributes = array() #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_autoload_interface: -------------------------------------------------------------------------------- 1 | drupal_autoload_interface(#placeholderstart# $interface #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_clear_path_cache: -------------------------------------------------------------------------------- 1 | drupal_clear_path_cache(#placeholderstart# $source = NULL #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_detect_baseurl: -------------------------------------------------------------------------------- 1 | drupal_detect_baseurl(#placeholderstart# $file = 'install.php' #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_get_schema_versions: -------------------------------------------------------------------------------- 1 | drupal_get_schema_versions(#placeholderstart# $module #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_page_get_cache: -------------------------------------------------------------------------------- 1 | drupal_page_get_cache(#placeholderstart# $check_only = FALSE #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_set_breadcrumb: -------------------------------------------------------------------------------- 1 | drupal_set_breadcrumb(#placeholderstart# $breadcrumb = NULL #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_set_page_content: -------------------------------------------------------------------------------- 1 | drupal_set_page_content(#placeholderstart# $content = NULL #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Control Structures/ifonly-d: -------------------------------------------------------------------------------- 1 | #indent# 2 | if (#placeholderstart#$x == $y#placeholderend#) { 3 | #insertion# 4 | } 5 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_array_merge_deep_array: -------------------------------------------------------------------------------- 1 | drupal_array_merge_deep_array(#placeholderstart# $arrays #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_render_cid_parts: -------------------------------------------------------------------------------- 1 | drupal_render_cid_parts(#placeholderstart# $granularity = NULL #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_strip_dangerous_protocols: -------------------------------------------------------------------------------- 1 | drupal_strip_dangerous_protocols(#placeholderstart# $uri #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Control Structures/for-d: -------------------------------------------------------------------------------- 1 | #indent# 2 | for ($i = 0; $i < #selstart#$someNumber#selend#; $i++) { 3 | #insertion# 4 | } 5 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/arg: -------------------------------------------------------------------------------- 1 | arg(#placeholderstart# $index = NULL #placeholderend#, #placeholderstart# $path = NULL #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_deliver_html_page: -------------------------------------------------------------------------------- 1 | drupal_deliver_html_page(#placeholderstart# $page_callback_result #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_load: -------------------------------------------------------------------------------- 1 | drupal_load(#placeholderstart# $type #placeholderend#, #placeholderstart# $name #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_page_is_cacheable: -------------------------------------------------------------------------------- 1 | drupal_page_is_cacheable(#placeholderstart# $allow_caching = NULL #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_requirements_severity: -------------------------------------------------------------------------------- 1 | drupal_requirements_severity(#placeholderstart# &$requirements #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_serve_page_from_cache: -------------------------------------------------------------------------------- 1 | drupal_serve_page_from_cache(#placeholderstart# stdClass $cache #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/theme: -------------------------------------------------------------------------------- 1 | theme(#placeholderstart# $hook #placeholderend#, #placeholderstart# $variables = array() #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/variable_set: -------------------------------------------------------------------------------- 1 | variable_set('#placeholderstart# $name #placeholderend#', #placeholderstart# $value #placeholderend#) -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_chmod: -------------------------------------------------------------------------------- 1 | drupal_chmod(#placeholderstart# $uri #placeholderend#, #placeholderstart# $mode = NULL #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_get_path: -------------------------------------------------------------------------------- 1 | drupal_get_path(#placeholderstart# $type #placeholderend#, #placeholderstart# $name #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_sort_css_js: -------------------------------------------------------------------------------- 1 | drupal_sort_css_js(#placeholderstart# $a #placeholderend#, #placeholderstart# $b #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_sort_title: -------------------------------------------------------------------------------- 1 | drupal_sort_title(#placeholderstart# $a #placeholderend#, #placeholderstart# $b #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_sort_weight: -------------------------------------------------------------------------------- 1 | drupal_sort_weight(#placeholderstart# $a #placeholderend#, #placeholderstart# $b #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Control Structures/foreachArrayKeyValue-d: -------------------------------------------------------------------------------- 1 | #indent# 2 | foreach (#selstart#array#selend# as $key => $value) { 3 | #insertion# 4 | } 5 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_hmac_base64: -------------------------------------------------------------------------------- 1 | drupal_hmac_base64(#placeholderstart# $data #placeholderend#, #placeholderstart# $key #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_rmdir: -------------------------------------------------------------------------------- 1 | drupal_rmdir(#placeholderstart# $uri #placeholderend#, #placeholderstart# $context = NULL #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_tempnam: -------------------------------------------------------------------------------- 1 | drupal_tempnam(#placeholderstart# $directory #placeholderend#, #placeholderstart# $prefix #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_unlink: -------------------------------------------------------------------------------- 1 | drupal_unlink(#placeholderstart# $uri #placeholderend#, #placeholderstart# $context = NULL #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_unpack: -------------------------------------------------------------------------------- 1 | drupal_unpack(#placeholderstart# $obj #placeholderend#, #placeholderstart# $field = 'data' #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/url: -------------------------------------------------------------------------------- 1 | url(#placeholderstart# $path = NULL #placeholderend#, #placeholderstart# array $options = array() #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/variable_get: -------------------------------------------------------------------------------- 1 | variable_get('#placeholderstart# $name #placeholderend#', #placeholderstart# $default = NULL #placeholderend#) -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_http_header_attributes: -------------------------------------------------------------------------------- 1 | drupal_http_header_attributes(#placeholderstart# array $attributes = array() #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_mail_system: -------------------------------------------------------------------------------- 1 | drupal_mail_system(#placeholderstart# $module #placeholderend#, #placeholderstart# $key #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_match_path: -------------------------------------------------------------------------------- 1 | drupal_match_path(#placeholderstart# $path #placeholderend#, #placeholderstart# $patterns #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_override_server_variables: -------------------------------------------------------------------------------- 1 | drupal_override_server_variables(#placeholderstart# $variables = array() #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_path_alias_whitelist_rebuild: -------------------------------------------------------------------------------- 1 | drupal_path_alias_whitelist_rebuild(#placeholderstart# $source = NULL #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_pre_render_conditional_comments: -------------------------------------------------------------------------------- 1 | drupal_pre_render_conditional_comments(#placeholderstart# $elements #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_var_export: -------------------------------------------------------------------------------- 1 | drupal_var_export(#placeholderstart# $var #placeholderend#, #placeholderstart# $prefix = '' #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_wrap_mail: -------------------------------------------------------------------------------- 1 | drupal_wrap_mail(#placeholderstart# $text #placeholderend#, #placeholderstart# $indent = '' #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_file_insert: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_file_insert(). 4 | */ 5 | function #BASENAME#_file_insert($file) { 6 | } 7 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_file_update: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_file_update(). 4 | */ 5 | function #BASENAME#_file_update($file) { 6 | } 7 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_add_css: -------------------------------------------------------------------------------- 1 | drupal_add_css(#placeholderstart# $data = NULL #placeholderend#, #placeholderstart# $options = NULL #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_add_feed: -------------------------------------------------------------------------------- 1 | drupal_add_feed(#placeholderstart# $url = NULL #placeholderend#, #placeholderstart# $title = '' #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_add_js: -------------------------------------------------------------------------------- 1 | drupal_add_js(#placeholderstart# $data = NULL #placeholderend#, #placeholderstart# $options = NULL #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_build_form: -------------------------------------------------------------------------------- 1 | drupal_build_form(#placeholderstart# $form_id #placeholderend#, #placeholderstart# &$form_state #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_get_library: -------------------------------------------------------------------------------- 1 | drupal_get_library(#placeholderstart# $module #placeholderend#, #placeholderstart# $name = NULL #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_map_assoc: -------------------------------------------------------------------------------- 1 | drupal_map_assoc(#placeholderstart# $array #placeholderend#, #placeholderstart# $function = NULL #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_truncate_bytes: -------------------------------------------------------------------------------- 1 | drupal_truncate_bytes(#placeholderstart# $string #placeholderend#, #placeholderstart# $len #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_file_copy: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_file_copy(). 4 | */ 5 | function #BASENAME#_file_copy($file, $source) { 6 | } 7 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_file_move: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_file_move(). 4 | */ 5 | function #BASENAME#_file_move($file, $source) { 6 | } 7 | -------------------------------------------------------------------------------- /Drupal7.php/Control Structures/if-d: -------------------------------------------------------------------------------- 1 | #indent# 2 | if (#placeholderstart#$x == $y#placeholderend#) { 3 | #insertion# 4 | } 5 | else { 6 | #insertion# 7 | } 8 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_convert_to_utf8: -------------------------------------------------------------------------------- 1 | drupal_convert_to_utf8(#placeholderstart# $data #placeholderend#, #placeholderstart# $encoding #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_form_submit: -------------------------------------------------------------------------------- 1 | drupal_form_submit(#placeholderstart# $form_id #placeholderend#, #placeholderstart# &$form_state #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_get_css: -------------------------------------------------------------------------------- 1 | drupal_get_css(#placeholderstart# $css = NULL #placeholderend#, #placeholderstart# $skip_alter = FALSE #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_retrieve_form: -------------------------------------------------------------------------------- 1 | drupal_retrieve_form(#placeholderstart# $form_id #placeholderend#, #placeholderstart# &$form_state #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_test_finished: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_test_finished(). 4 | */ 5 | function #BASENAME#_test_finished($results) { 6 | } 7 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_add_html_head: -------------------------------------------------------------------------------- 1 | drupal_add_html_head(#placeholderstart# $data = NULL #placeholderend#, #placeholderstart# $key = NULL #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_bootstrap: -------------------------------------------------------------------------------- 1 | drupal_bootstrap(#placeholderstart# $phase = NULL #placeholderend#, #placeholderstart# $new_phase = TRUE #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_get_schema: -------------------------------------------------------------------------------- 1 | drupal_get_schema(#placeholderstart# $table = NULL #placeholderend#, #placeholderstart# $rebuild = FALSE #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_html_to_text: -------------------------------------------------------------------------------- 1 | drupal_html_to_text(#placeholderstart# $string #placeholderend#, #placeholderstart# $allowed_tags = NULL #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_render_cache_set: -------------------------------------------------------------------------------- 1 | drupal_render_cache_set(#placeholderstart# &$markup #placeholderend#, #placeholderstart# $elements #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_valid_path: -------------------------------------------------------------------------------- 1 | drupal_valid_path(#placeholderstart# $path #placeholderend#, #placeholderstart# $dynamic_allowed = FALSE #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_disable: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_disable(). 4 | */ 5 | function #BASENAME#_disable() { 6 | mymodule_cache_rebuild(); 7 | } 8 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_enable: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_enable(). 4 | */ 5 | function #BASENAME#_enable() { 6 | mymodule_cache_rebuild(); 7 | } 8 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_node_type_insert: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_node_type_insert(). 4 | */ 5 | function #BASENAME#_node_type_insert($info) { 6 | } 7 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_test_group_started: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_test_group_started(). 4 | */ 5 | function #BASENAME#_test_group_started() { 6 | } 7 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_find_theme_functions: -------------------------------------------------------------------------------- 1 | drupal_find_theme_functions(#placeholderstart# $cache #placeholderend#, #placeholderstart# $prefixes #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_get_messages: -------------------------------------------------------------------------------- 1 | drupal_get_messages(#placeholderstart# $type = NULL #placeholderend#, #placeholderstart# $clear_queue = TRUE #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_get_normal_path: -------------------------------------------------------------------------------- 1 | drupal_get_normal_path(#placeholderstart# $path #placeholderend#, #placeholderstart# $path_language = NULL #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_http_build_query: -------------------------------------------------------------------------------- 1 | drupal_http_build_query(#placeholderstart# array $query #placeholderend#, #placeholderstart# $parent = '' #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_http_request: -------------------------------------------------------------------------------- 1 | drupal_http_request(#placeholderstart# $url #placeholderend#, #placeholderstart# array $options = array() #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_schema_fields_sql: -------------------------------------------------------------------------------- 1 | drupal_schema_fields_sql(#placeholderstart# $table #placeholderend#, #placeholderstart# $prefix = NULL #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_set_title: -------------------------------------------------------------------------------- 1 | drupal_set_title(#placeholderstart# $title = NULL #placeholderend#, #placeholderstart# $output = CHECK_PLAIN #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_test_group_finished: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_test_group_finished(). 4 | */ 5 | function #BASENAME#_test_group_finished() { 6 | } 7 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_check_incompatibility: -------------------------------------------------------------------------------- 1 | drupal_check_incompatibility(#placeholderstart# $v #placeholderend#, #placeholderstart# $current_version #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_get_path_alias: -------------------------------------------------------------------------------- 1 | drupal_get_path_alias(#placeholderstart# $path = NULL #placeholderend#, #placeholderstart# $path_language = NULL #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_render_children: -------------------------------------------------------------------------------- 1 | drupal_render_children(#placeholderstart# &$element #placeholderend#, #placeholderstart# $children_keys = NULL #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/l: -------------------------------------------------------------------------------- 1 | l(#placeholderstart# $text #placeholderend#, #placeholderstart# $path #placeholderend#, #placeholderstart# array $options = array() #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Control Structures/switch-d: -------------------------------------------------------------------------------- 1 | #indent# 2 | switch (#insertion#) { 3 | case #insertion#: 4 | #insertion# 5 | break; 6 | default: 7 | #insertion# 8 | } 9 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_add_html_head_link: -------------------------------------------------------------------------------- 1 | drupal_add_html_head_link(#placeholderstart# $attributes #placeholderend#, #placeholderstart# $header = FALSE #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_add_region_content: -------------------------------------------------------------------------------- 1 | drupal_add_region_content(#placeholderstart# $region = NULL #placeholderend#, #placeholderstart# $data = NULL #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_get_region_content: -------------------------------------------------------------------------------- 1 | drupal_get_region_content(#placeholderstart# $region = NULL #placeholderend#, #placeholderstart# $delimiter = ' ' #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_get_schema_unprocessed: -------------------------------------------------------------------------------- 1 | drupal_get_schema_unprocessed(#placeholderstart# $module #placeholderend#, #placeholderstart# $table = NULL #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_rewrite_settings: -------------------------------------------------------------------------------- 1 | drupal_rewrite_settings(#placeholderstart# $settings = array() #placeholderend#, #placeholderstart# $prefix = '' #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_uninstall: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_uninstall(). 4 | */ 5 | function #BASENAME#_uninstall() { 6 | variable_del('upload_file_types'); 7 | } 8 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_render_collect_attached: -------------------------------------------------------------------------------- 1 | drupal_render_collect_attached(#placeholderstart# $elements #placeholderend#, #placeholderstart# $return = FALSE #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_send_headers: -------------------------------------------------------------------------------- 1 | drupal_send_headers(#placeholderstart# $default_headers = array() #placeholderend#, #placeholderstart# $only_default = FALSE #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_set_installed_schema_version: -------------------------------------------------------------------------------- 1 | drupal_set_installed_schema_version(#placeholderstart# $module #placeholderend#, #placeholderstart# $version #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_flush_caches: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_flush_caches(). 4 | */ 5 | function #BASENAME#_flush_caches() { 6 | return array('cache_example'); 7 | } 8 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_array_nested_key_exists: -------------------------------------------------------------------------------- 1 | drupal_array_nested_key_exists(#placeholderstart# array $array #placeholderend#, #placeholderstart# array $parents #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_load_stylesheet_content: -------------------------------------------------------------------------------- 1 | drupal_load_stylesheet_content(#placeholderstart# $contents #placeholderend#, #placeholderstart# $optimize = FALSE #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_substr: -------------------------------------------------------------------------------- 1 | drupal_substr(#placeholderstart# $text #placeholderend#, #placeholderstart# $start #placeholderend#, #placeholderstart# $length = NULL #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_deliver_page: -------------------------------------------------------------------------------- 1 | drupal_deliver_page(#placeholderstart# $page_callback_result #placeholderend#, #placeholderstart# $default_delivery_callback = NULL #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/t: -------------------------------------------------------------------------------- 1 | t('#placeholderstart# $string #placeholderend#', #placeholderstart# array $args = array() #placeholderend#, #placeholderstart# array $options = array() #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_search_access: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_search_access(). 4 | */ 5 | function #BASENAME#_search_access() { 6 | return user_access('access content'); 7 | } 8 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_uninstall_modules: -------------------------------------------------------------------------------- 1 | drupal_uninstall_modules(#placeholderstart# $module_list = array() #placeholderend#, #placeholderstart# $uninstall_dependents = TRUE #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/module_load_include: -------------------------------------------------------------------------------- 1 | module_load_include(#placeholderstart# $type #placeholderend#, #placeholderstart# $module #placeholderend#, #placeholderstart# $name = NULL #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_add_library: -------------------------------------------------------------------------------- 1 | drupal_add_library(#placeholderstart# $module #placeholderend#, #placeholderstart# $name #placeholderend#, #placeholderstart# $every_page = NULL #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_get_filename: -------------------------------------------------------------------------------- 1 | drupal_get_filename(#placeholderstart# $type #placeholderend#, #placeholderstart# $name #placeholderend#, #placeholderstart# $filename = NULL #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_install_mkdir: -------------------------------------------------------------------------------- 1 | drupal_install_mkdir(#placeholderstart# $file #placeholderend#, #placeholderstart# $mask #placeholderend#, #placeholderstart# $message = TRUE #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_prepare_form: -------------------------------------------------------------------------------- 1 | drupal_prepare_form(#placeholderstart# $form_id #placeholderend#, #placeholderstart# &$form #placeholderend#, #placeholderstart# &$form_state #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_process_form: -------------------------------------------------------------------------------- 1 | drupal_process_form(#placeholderstart# $form_id #placeholderend#, #placeholderstart# &$form #placeholderend#, #placeholderstart# &$form_state #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_validate_form: -------------------------------------------------------------------------------- 1 | drupal_validate_form(#placeholderstart# $form_id #placeholderend#, #placeholderstart# &$form #placeholderend#, #placeholderstart# &$form_state #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_field_read_field: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_field_read_field(). 4 | */ 5 | function #BASENAME#_field_read_field($field) { 6 | // @todo Needs function body. 7 | } 8 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_taxonomy_term_presave: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_taxonomy_term_presave(). 4 | */ 5 | function #BASENAME#_taxonomy_term_presave($term) { 6 | $term->foo = 'bar'; 7 | } 8 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_add_http_header: -------------------------------------------------------------------------------- 1 | drupal_add_http_header(#placeholderstart# $name #placeholderend#, #placeholderstart# $value #placeholderend#, #placeholderstart# $append = FALSE #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_install_fix_file: -------------------------------------------------------------------------------- 1 | drupal_install_fix_file(#placeholderstart# $file #placeholderend#, #placeholderstart# $mask #placeholderend#, #placeholderstart# $message = TRUE #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/menu_get_object: -------------------------------------------------------------------------------- 1 | menu_get_object(#placeholderstart# $type = 'node' #placeholderend#, #placeholderstart# $position = 1 #placeholderend#, #placeholderstart# $path = NULL #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_aggregator_remove: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_aggregator_remove(). 4 | */ 5 | function #BASENAME#_aggregator_remove($feed) { 6 | mymodule_remove_items($feed->fid); 7 | } 8 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_entity_presave: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_entity_presave(). 4 | */ 5 | function #BASENAME#_entity_presave($entity, $type) { 6 | $entity->changed = REQUEST_TIME; 7 | } 8 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_field_create_field: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_field_create_field(). 4 | */ 5 | function #BASENAME#_field_create_field($field) { 6 | // @todo Needs function body. 7 | } 8 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_field_delete_field: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_field_delete_field(). 4 | */ 5 | function #BASENAME#_field_delete_field($field) { 6 | // @todo Needs function body. 7 | } 8 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_filter_format_insert: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_filter_format_insert(). 4 | */ 5 | function #BASENAME#_filter_format_insert($format) { 6 | mymodule_cache_rebuild(); 7 | } 8 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_filter_format_update: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_filter_format_update(). 4 | */ 5 | function #BASENAME#_filter_format_update($format) { 6 | mymodule_cache_rebuild(); 7 | } 8 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_node_type_delete: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_node_type_delete(). 4 | */ 5 | function #BASENAME#_node_type_delete($info) { 6 | variable_del('comment_' . $info->type); 7 | } 8 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_process_HOOK: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_process_HOOK(). 4 | */ 5 | function #BASENAME#_process_HOOK(&$variables) { 6 | $variables['classes'] .= ' my_added_class'; 7 | } 8 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_find_theme_templates: -------------------------------------------------------------------------------- 1 | drupal_find_theme_templates(#placeholderstart# $cache #placeholderend#, #placeholderstart# $extension #placeholderend#, #placeholderstart# $path #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_lookup_path: -------------------------------------------------------------------------------- 1 | drupal_lookup_path(#placeholderstart# $action #placeholderend#, #placeholderstart# $path = '' #placeholderend#, #placeholderstart# $path_language = NULL #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_rebuild_form: -------------------------------------------------------------------------------- 1 | drupal_rebuild_form(#placeholderstart# $form_id #placeholderend#, #placeholderstart# &$form_state #placeholderend#, #placeholderstart# $old_form = NULL #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_valid_token: -------------------------------------------------------------------------------- 1 | drupal_valid_token(#placeholderstart# $token #placeholderend#, #placeholderstart# $value = '' #placeholderend#, #placeholderstart# $skip_anonymous = FALSE #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_write_record: -------------------------------------------------------------------------------- 1 | drupal_write_record(#placeholderstart# $table #placeholderend#, #placeholderstart# &$record #placeholderend#, #placeholderstart# $primary_keys = array() #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_field_read_instance: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_field_read_instance(). 4 | */ 5 | function #BASENAME#_field_read_instance($instance) { 6 | // @todo Needs function body. 7 | } 8 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_filter_format_disable: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_filter_format_disable(). 4 | */ 5 | function #BASENAME#_filter_format_disable($format) { 6 | mymodule_cache_rebuild(); 7 | } 8 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_get_js: -------------------------------------------------------------------------------- 1 | drupal_get_js(#placeholderstart# $scope = 'header' #placeholderend#, #placeholderstart# $javascript = NULL #placeholderend#, #placeholderstart# $skip_alter = FALSE #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_goto: -------------------------------------------------------------------------------- 1 | drupal_goto(#placeholderstart# $path = '' #placeholderend#, #placeholderstart# array $options = array() #placeholderend#, #placeholderstart# $http_response_code = 302 #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_set_message: -------------------------------------------------------------------------------- 1 | drupal_set_message(#placeholderstart# $message = NULL #placeholderend#, #placeholderstart# $type = 'status' #placeholderend#, #placeholderstart# $repeat = TRUE #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_archiver_info_alter: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_archiver_info_alter(). 4 | */ 5 | function #BASENAME#_archiver_info_alter(&$info) { 6 | $info['tar']['extensions'][] = 'tgz'; 7 | } 8 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_field_create_instance: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_field_create_instance(). 4 | */ 5 | function #BASENAME#_field_create_instance($instance) { 6 | // @todo Needs function body. 7 | } 8 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_field_delete_instance: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_field_delete_instance(). 4 | */ 5 | function #BASENAME#_field_delete_instance($instance) { 6 | // @todo Needs function body. 7 | } 8 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_search_preprocess: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_search_preprocess(). 4 | */ 5 | function #BASENAME#_search_preprocess($text) { 6 | // Do processing on $text 7 | return $text; 8 | } 9 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_load_stylesheet: -------------------------------------------------------------------------------- 1 | drupal_load_stylesheet(#placeholderstart# $file #placeholderend#, #placeholderstart# $optimize = NULL #placeholderend#, #placeholderstart# $reset_basepath = TRUE #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_verify_install_file: -------------------------------------------------------------------------------- 1 | drupal_verify_install_file(#placeholderstart# $file #placeholderend#, #placeholderstart# $mask = NULL #placeholderend#, #placeholderstart# $type = 'file' #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_aggregator_fetch: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_aggregator_fetch(). 4 | */ 5 | function #BASENAME#_aggregator_fetch($feed) { 6 | $feed->source_string = mymodule_fetch($feed->url); 7 | } 8 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_field_attach_delete: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_field_attach_delete(). 4 | */ 5 | function #BASENAME#_field_attach_delete($entity_type, $entity) { 6 | // @todo Needs function body. 7 | } 8 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_field_attach_insert: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_field_attach_insert(). 4 | */ 5 | function #BASENAME#_field_attach_insert($entity_type, $entity) { 6 | // @todo Needs function body. 7 | } 8 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_field_attach_update: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_field_attach_update(). 4 | */ 5 | function #BASENAME#_field_attach_update($entity_type, $entity) { 6 | // @todo Needs function body. 7 | } 8 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/filter_xss: -------------------------------------------------------------------------------- 1 | filter_xss(#placeholderstart# $string #placeholderend#, #placeholderstart# $allowed_tags = array('a', 'em', 'strong', 'cite', 'blockquote', 'code', 'ul', 'ol', 'li', 'dl', 'dt', 'dd') #placeholderend#) -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_delete: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_delete(). 4 | */ 5 | function #BASENAME#_delete($node) { 6 | db_delete('mytable') 7 | ->condition('nid', $nid->nid) 8 | ->execute(); 9 | } 10 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_field_attach_presave: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_field_attach_presave(). 4 | */ 5 | function #BASENAME#_field_attach_presave($entity_type, $entity) { 6 | // @todo Needs function body. 7 | } 8 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_multilingual_settings_changed: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_multilingual_settings_changed(). 4 | */ 5 | function #BASENAME#_multilingual_settings_changed() { 6 | field_info_cache_clear(); 7 | } 8 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_entity_query_alter: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_entity_query_alter(). 4 | */ 5 | function #BASENAME#_entity_query_alter($query) { 6 | $query->executeCallback = 'my_module_query_callback'; 7 | } 8 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_taxonomy_vocabulary_presave: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_taxonomy_vocabulary_presave(). 4 | */ 5 | function #BASENAME#_taxonomy_vocabulary_presave($vocabulary) { 6 | $vocabulary->foo = 'bar'; 7 | } 8 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_field_attach_load: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_field_attach_load(). 4 | */ 5 | function #BASENAME#_field_attach_load($entity_type, &$entities, $age, $options) { 6 | // @todo Needs function body. 7 | } 8 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_field_update_instance: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_field_update_instance(). 4 | */ 5 | function #BASENAME#_field_update_instance($instance, $prior_instance) { 6 | // @todo Needs function body. 7 | } 8 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_file_presave: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_file_presave(). 4 | */ 5 | function #BASENAME#_file_presave($file) { 6 | // Change the file timestamp to an hour prior. 7 | $file->timestamp -= 3600; 8 | } 9 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_themes_disabled: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_themes_disabled(). 4 | */ 5 | function #BASENAME#_themes_disabled($theme_list) { 6 | // Clear all update module caches. 7 | _update_cache_clear(); 8 | } 9 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_alter: -------------------------------------------------------------------------------- 1 | drupal_alter(#placeholderstart# $type #placeholderend#, #placeholderstart# &$data #placeholderend#, #placeholderstart# &$context1 = NULL #placeholderend#, #placeholderstart# &$context2 = NULL #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_array_get_nested_value: -------------------------------------------------------------------------------- 1 | drupal_array_get_nested_value(#placeholderstart# array &$array #placeholderend#, #placeholderstart# array $parents #placeholderend#, #placeholderstart# &$key_exists = NULL #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_get_installed_schema_version: -------------------------------------------------------------------------------- 1 | drupal_get_installed_schema_version(#placeholderstart# $module #placeholderend#, #placeholderstart# $reset = FALSE #placeholderend#, #placeholderstart# $array = FALSE #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_field_attach_validate: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_field_attach_validate(). 4 | */ 5 | function #BASENAME#_field_attach_validate($entity_type, $entity, &$errors) { 6 | // @todo Needs function body. 7 | } 8 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/check_markup: -------------------------------------------------------------------------------- 1 | check_markup(#placeholderstart# $text #placeholderend#, #placeholderstart# $format_id = NULL #placeholderend#, #placeholderstart# $langcode = '' #placeholderend#, #placeholderstart# $cache = FALSE #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_get_query_parameters: -------------------------------------------------------------------------------- 1 | drupal_get_query_parameters(#placeholderstart# array $query = NULL #placeholderend#, #placeholderstart# array $exclude = array('q' #placeholderend#), #placeholderstart# $parent = '' #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_mkdir: -------------------------------------------------------------------------------- 1 | drupal_mkdir(#placeholderstart# $uri #placeholderend#, #placeholderstart# $mode = NULL #placeholderend#, #placeholderstart# $recursive = FALSE #placeholderend#, #placeholderstart# $context = NULL #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_menu_alter: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_menu_alter(). 4 | */ 5 | function #BASENAME#_menu_alter(&$items) { 6 | // Example - disable the page at node/add 7 | $items['node/add']['access callback'] = FALSE; 8 | } 9 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_node_delete: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_node_delete(). 4 | */ 5 | function #BASENAME#_node_delete($node) { 6 | db_delete('mytable') 7 | ->condition('nid', $node->nid) 8 | ->execute(); 9 | } 10 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_path_delete: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_path_delete(). 4 | */ 5 | function #BASENAME#_path_delete($path) { 6 | db_delete('mytable') 7 | ->condition('pid', $path['pid']) 8 | ->execute(); 9 | } 10 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_taxonomy_term_delete: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_taxonomy_term_delete(). 4 | */ 5 | function #BASENAME#_taxonomy_term_delete($term) { 6 | db_delete('term_synoynm')->condition('tid', $term->tid)->execute(); 7 | } 8 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_comment_insert: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_comment_insert(). 4 | */ 5 | function #BASENAME#_comment_insert($comment) { 6 | // Reindex the node when comments are added. 7 | search_touch_node($comment->nid); 8 | } 9 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_comment_update: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_comment_update(). 4 | */ 5 | function #BASENAME#_comment_update($comment) { 6 | // Reindex the node when comments are updated. 7 | search_touch_node($comment->nid); 8 | } 9 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_css_alter: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_css_alter(). 4 | */ 5 | function #BASENAME#_css_alter(&$css) { 6 | // Remove defaults.css file. 7 | unset($css[drupal_get_path('module', 'system') . '/defaults.css']); 8 | } 9 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_element_info: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_element_info(). 4 | */ 5 | function #BASENAME#_element_info() { 6 | $types['filter_format'] = array( 7 | '#input' => TRUE, 8 | ); 9 | return $types; 10 | } 11 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_field_attach_delete_revision: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_field_attach_delete_revision(). 4 | */ 5 | function #BASENAME#_field_attach_delete_revision($entity_type, $entity) { 6 | // @todo Needs function body. 7 | } 8 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_field_attach_preprocess_alter: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_field_attach_preprocess_alter(). 4 | */ 5 | function #BASENAME#_field_attach_preprocess_alter(&$variables, $context) { 6 | // @todo Needs function body. 7 | } 8 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_locale: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_locale(). 4 | */ 5 | function #BASENAME#_locale($op = 'groups') { 6 | switch ($op) { 7 | case 'groups': 8 | return array('custom' => t('Custom')); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_trigger_info_alter: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_trigger_info_alter(). 4 | */ 5 | function #BASENAME#_trigger_info_alter(&$triggers) { 6 | $triggers['node']['node_insert']['label'] = t('When content is saved'); 7 | } 8 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_user_delete: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_user_delete(). 4 | */ 5 | function #BASENAME#_user_delete($account) { 6 | db_delete('mytable') 7 | ->condition('uid', $account->uid) 8 | ->execute(); 9 | } 10 | -------------------------------------------------------------------------------- /Drupal7.php/Control Structures/ifelseif-d: -------------------------------------------------------------------------------- 1 | #indent# 2 | if (#placeholderstart#$x == $y#placeholderend#) { 3 | #insertion# 4 | } 5 | elseif (#placeholderstart#$x == $y#placeholderend#) { 6 | #insertion# 7 | } 8 | else { 9 | #insertion# 10 | } 11 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_system_listing: -------------------------------------------------------------------------------- 1 | drupal_system_listing(#placeholderstart# $mask #placeholderend#, #placeholderstart# $directory #placeholderend#, #placeholderstart# $key = 'name' #placeholderend#, #placeholderstart# $min_depth = 1 #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_actions_delete: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_actions_delete(). 4 | */ 5 | function #BASENAME#_actions_delete($aid) { 6 | db_delete('actions_assignments') 7 | ->condition('aid', $aid) 8 | ->execute(); 9 | } 10 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_aggregator_process: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_aggregator_process(). 4 | */ 5 | function #BASENAME#_aggregator_process($feed) { 6 | foreach ($feed->items as $item) { 7 | mymodule_save($item); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_field_widget_error: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_field_widget_error(). 4 | */ 5 | function #BASENAME#_field_widget_error($element, $error, $form, &$form_state) { 6 | form_error($element['value'], $error['message']); 7 | } 8 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_comment_view: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_comment_view(). 4 | */ 5 | function #BASENAME#_comment_view($comment, $view_mode, $langcode) { 6 | // how old is the comment 7 | $comment->time_ago = time() - $comment->changed; 8 | } 9 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_query_alter: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_query_alter(). 4 | */ 5 | function #BASENAME#_query_alter(QueryAlterableInterface $query) { 6 | if ($query->hasTag('micro_limit')) { 7 | $query->range(0, 2); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_themes_enabled: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_themes_enabled(). 4 | */ 5 | function #BASENAME#_themes_enabled($theme_list) { 6 | foreach ($theme_list as $theme) { 7 | block_theme_initialize($theme); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_action_info_alter: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_action_info_alter(). 4 | */ 5 | function #BASENAME#_action_info_alter(&$actions) { 6 | $actions['node_unpublish_action']['label'] = t('Unpublish and remove from public view.'); 7 | } 8 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_block_info_alter: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_block_info_alter(). 4 | */ 5 | function #BASENAME#_block_info_alter(&$blocks, $theme, $code_blocks) { 6 | // Disable the login block. 7 | $blocks['user']['login']['status'] = 0; 8 | } 9 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_comment_delete: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_comment_delete(). 4 | */ 5 | function #BASENAME#_comment_delete($comment) { 6 | drupal_set_message(t('Comment: @subject has been deleted', array('@subject' => $comment->subject))); 7 | } 8 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_field_storage_pre_load: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_field_storage_pre_load(). 4 | */ 5 | function #BASENAME#_field_storage_pre_load($entity_type, $entities, $age, &$skip_fields, $options) { 6 | // @todo Needs function body. 7 | } 8 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_comment_publish: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_comment_publish(). 4 | */ 5 | function #BASENAME#_comment_publish($comment) { 6 | drupal_set_message(t('Comment: @subject has been published', array('@subject' => $comment->subject))); 7 | } 8 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_countries_alter: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_countries_alter(). 4 | */ 5 | function #BASENAME#_countries_alter(&$countries) { 6 | // Elbonia is now independent, so add it to the country list. 7 | $countries['EB'] = 'Elbonia'; 8 | } 9 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_exit: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_exit(). 4 | */ 5 | function #BASENAME#_exit($destination = NULL) { 6 | db_update('counter') 7 | ->expression('hits', 'hits + 1') 8 | ->condition('type', 1) 9 | ->execute(); 10 | } 11 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_file_delete: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_file_delete(). 4 | */ 5 | function #BASENAME#_file_delete($file) { 6 | // Delete all information associated with the file. 7 | db_delete('upload')->condition('fid', $file->fid)->execute(); 8 | } 9 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_modules_disabled: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_modules_disabled(). 4 | */ 5 | function #BASENAME#_modules_disabled($modules) { 6 | if (in_array('lousy_module', $modules)) { 7 | mymodule_enable_functionality(); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_node_revision_delete: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_node_revision_delete(). 4 | */ 5 | function #BASENAME#_node_revision_delete($node) { 6 | db_delete('mytable') 7 | ->condition('vid', $node->vid) 8 | ->execute(); 9 | } 10 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_admin_paths: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_admin_paths(). 4 | */ 5 | function #BASENAME#_admin_paths() { 6 | $paths = array( 7 | 'mymodule/*/add' => TRUE, 8 | 'mymodule/*/edit' => TRUE, 9 | ); 10 | return $paths; 11 | } 12 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_drupal_goto_alter: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_drupal_goto_alter(). 4 | */ 5 | function #BASENAME#_drupal_goto_alter(&$path, &$options, &$http_response_code) { 6 | // A good addition to misery module. 7 | $http_response_code = 500; 8 | } 9 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_entity_load: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_entity_load(). 4 | */ 5 | function #BASENAME#_entity_load($entities, $type) { 6 | foreach ($entities as $entity) { 7 | $entity->foo = mymodule_add_something($entity, $type); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_field_purge_field: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_field_purge_field(). 4 | */ 5 | function #BASENAME#_field_purge_field($field) { 6 | db_delete('my_module_field_info') 7 | ->condition('id', $field['id']) 8 | ->execute(); 9 | } 10 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_array_set_nested_value: -------------------------------------------------------------------------------- 1 | drupal_array_set_nested_value(#placeholderstart# array &$array #placeholderend#, #placeholderstart# array $parents #placeholderend#, #placeholderstart# $value #placeholderend#, #placeholderstart# $force = FALSE #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_comment_presave: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_comment_presave(). 4 | */ 5 | function #BASENAME#_comment_presave($comment) { 6 | // Remove leading & trailing spaces from the comment subject. 7 | $comment->subject = trim($comment->subject); 8 | } 9 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_comment_unpublish: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_comment_unpublish(). 4 | */ 5 | function #BASENAME#_comment_unpublish($comment) { 6 | drupal_set_message(t('Comment: @subject has been unpublished', array('@subject' => $comment->subject))); 7 | } 8 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_date_format_types_alter: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_date_format_types_alter(). 4 | */ 5 | function #BASENAME#_date_format_types_alter(&$types) { 6 | foreach ($types as $name => $type) { 7 | $types[$name]['locked'] = 1; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_date_formats_alter: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_date_formats_alter(). 4 | */ 5 | function #BASENAME#_date_formats_alter(&$formats) { 6 | foreach ($formats as $id => $format) { 7 | $formats[$id]['locales'][] = 'en-ca'; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_openid: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_openid(). 4 | */ 5 | function #BASENAME#_openid($op, $request) { 6 | if ($op == 'request') { 7 | $request['openid.identity'] = 'http://myname.myopenid.com/'; 8 | } 9 | return $request; 10 | } 11 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_update: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_update(). 4 | */ 5 | function #BASENAME#_update($node) { 6 | db_update('mytable') 7 | ->fields(array('extra' => $node->extra)) 8 | ->condition('nid', $node->nid) 9 | ->execute(); 10 | } 11 | -------------------------------------------------------------------------------- /Drupal7.php/Snippets/function-definition-d: -------------------------------------------------------------------------------- 1 | #indent# 2 | /** 3 | * #placeholderstart# Documentation #placeholderend# 4 | */ 5 | function #BASENAME#_#placeholderstart#function name#placeholderend#() { 6 | $output = ''; 7 | #insertion# 8 | 9 | return $output; 10 | } 11 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_image_style_flush: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_image_style_flush(). 4 | */ 5 | function #BASENAME#_image_style_flush($style) { 6 | // Empty cached data that contains information about the style. 7 | cache_clear_all('*', 'cache_mymodule', TRUE); 8 | } 9 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_node_prepare: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_node_prepare(). 4 | */ 5 | function #BASENAME#_node_prepare($node) { 6 | if (!isset($node->comment)) { 7 | $node->comment = variable_get("comment_$node->type", COMMENT_NODE_OPEN); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_openid_discovery_method_info: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_openid_discovery_method_info(). 4 | */ 5 | function #BASENAME#_openid_discovery_method_info() { 6 | return array( 7 | 'new_discovery_idea' => '_my_discovery_method', 8 | ); 9 | } 10 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_openid_discovery_method_info_alter: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_openid_discovery_method_info_alter(). 4 | */ 5 | function #BASENAME#_openid_discovery_method_info_alter(&$methods) { 6 | // Remove XRI discovery scheme. 7 | unset($methods['xri']); 8 | } 9 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_process_attached: -------------------------------------------------------------------------------- 1 | drupal_process_attached(#placeholderstart# $elements #placeholderend#, #placeholderstart# $group = JS_DEFAULT #placeholderend#, #placeholderstart# $dependency_check = FALSE #placeholderend#, #placeholderstart# $every_page = NULL #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_render_cache_by_query: -------------------------------------------------------------------------------- 1 | drupal_render_cache_by_query(#placeholderstart# $query #placeholderend#, #placeholderstart# $function #placeholderend#, #placeholderstart# $expire = CACHE_TEMPORARY #placeholderend#, #placeholderstart# $granularity = NULL #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_openid_response: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_openid_response(). 4 | */ 5 | function #BASENAME#_openid_response($response, $account) { 6 | if (isset($response['openid.ns.ax'])) { 7 | _mymodule_store_ax_fields($response, $account); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_field_is_empty: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_field_is_empty(). 4 | */ 5 | function #BASENAME#_field_is_empty($item, $field) { 6 | if (empty($item['value']) && (string) $item['value'] !== '0') { 7 | return TRUE; 8 | } 9 | return FALSE; 10 | } 11 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_file_download_access: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_file_download_access(). 4 | */ 5 | function #BASENAME#_file_download_access($field, $entity_type, $entity) { 6 | if ($entity_type == 'node') { 7 | return node_access('view', $entity); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_insert: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_insert(). 4 | */ 5 | function #BASENAME#_insert($node) { 6 | db_insert('mytable') 7 | ->fields(array( 8 | 'nid' => $node->nid, 9 | 'extra' => $node->extra, 10 | )) 11 | ->execute(); 12 | } 13 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_node_update: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_node_update(). 4 | */ 5 | function #BASENAME#_node_update($node) { 6 | db_update('mytable') 7 | ->fields(array('extra' => $node->extra)) 8 | ->condition('nid', $node->nid) 9 | ->execute(); 10 | } 11 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_overlay_parent_initialize: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_overlay_parent_initialize(). 4 | */ 5 | function #BASENAME#_overlay_parent_initialize() { 6 | // Add our custom JavaScript. 7 | drupal_add_js(drupal_get_path('module', 'hook') . '/hook-overlay.js'); 8 | } 9 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_path_update: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_path_update(). 4 | */ 5 | function #BASENAME#_path_update($path) { 6 | db_update('mytable') 7 | ->fields(array('alias' => $path['alias'])) 8 | ->condition('pid', $path['pid']) 9 | ->execute(); 10 | } 11 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_search_reset: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_search_reset(). 4 | */ 5 | function #BASENAME#_search_reset() { 6 | db_update('search_dataset') 7 | ->fields(array('reindex' => REQUEST_TIME)) 8 | ->condition('type', 'node') 9 | ->execute(); 10 | } 11 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_user_categories: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_user_categories(). 4 | */ 5 | function #BASENAME#_user_categories() { 6 | return array(array( 7 | 'name' => 'account', 8 | 'title' => t('Account settings'), 9 | 'weight' => 1, 10 | )); 11 | } 12 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/watchdog: -------------------------------------------------------------------------------- 1 | watchdog(#placeholderstart# $type #placeholderend#, #placeholderstart# $message #placeholderend#, #placeholderstart# $variables = array() #placeholderend#, #placeholderstart# $severity = WATCHDOG_NOTICE #placeholderend#, #placeholderstart# $link = NULL #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_dashboard_regions_alter: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_dashboard_regions_alter(). 4 | */ 5 | function #BASENAME#_dashboard_regions_alter($regions) { 6 | // Remove the sidebar region defined by the core dashboard module. 7 | unset($regions['dashboard_sidebar']); 8 | } 9 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_modules_installed: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_modules_installed(). 4 | */ 5 | function #BASENAME#_modules_installed($modules) { 6 | if (in_array('lousy_module', $modules)) { 7 | variable_set('lousy_module_conflicting_variable', FALSE); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_overlay_child_initialize: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_overlay_child_initialize(). 4 | */ 5 | function #BASENAME#_overlay_child_initialize() { 6 | // Add our custom JavaScript. 7 | drupal_add_js(drupal_get_path('module', 'hook') . '/hook-overlay-child.js'); 8 | } 9 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_custom_theme: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_custom_theme(). 4 | */ 5 | function #BASENAME#_custom_theme() { 6 | // Allow the user to request a particular theme via a query parameter. 7 | if (isset($_GET['theme'])) { 8 | return $_GET['theme']; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_language_fallback_candidates_alter: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_language_fallback_candidates_alter(). 4 | */ 5 | function #BASENAME#_language_fallback_candidates_alter(array &$fallback_candidates) { 6 | $fallback_candidates = array_reverse($fallback_candidates); 7 | } 8 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_openid_normalization_method_info: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_openid_normalization_method_info(). 4 | */ 5 | function #BASENAME#_openid_normalization_method_info() { 6 | return array( 7 | 'new_normalization_idea' => '_my_normalization_method', 8 | ); 9 | } 10 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_stream_wrappers_alter: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_stream_wrappers_alter(). 4 | */ 5 | function #BASENAME#_stream_wrappers_alter(&$wrappers) { 6 | // Change the name of private files to reflect the performance. 7 | $wrappers['private']['name'] = t('Slow files'); 8 | } 9 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_user_logout: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_user_logout(). 4 | */ 5 | function #BASENAME#_user_logout($account) { 6 | db_insert('logouts') 7 | ->fields(array( 8 | 'uid' => $account->uid, 9 | 'time' => time(), 10 | )) 11 | ->execute(); 12 | } 13 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_aggregator_parse: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_aggregator_parse(). 4 | */ 5 | function #BASENAME#_aggregator_parse($feed) { 6 | if ($items = mymodule_parse($feed->source_string)) { 7 | $feed->items = $items; 8 | return TRUE; 9 | } 10 | return FALSE; 11 | } 12 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_boot: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_boot(). 4 | */ 5 | function #BASENAME#_boot() { 6 | // we need user_access() in the shutdown function. make sure it gets loaded 7 | drupal_load('module', 'user'); 8 | drupal_register_shutdown_function('devel_shutdown'); 9 | } 10 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_cron_queue_info: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_cron_queue_info(). 4 | */ 5 | function #BASENAME#_cron_queue_info() { 6 | $queues['aggregator_feeds'] = array( 7 | 'worker callback' => 'aggregator_refresh', 8 | 'time' => 60, 9 | ); 10 | return $queues; 11 | } 12 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_menu_link_delete: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_menu_link_delete(). 4 | */ 5 | function #BASENAME#_menu_link_delete($link) { 6 | // Delete the record from our table. 7 | db_delete('menu_example') 8 | ->condition('mlid', $link['mlid']) 9 | ->execute(); 10 | } 11 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_node_insert: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_node_insert(). 4 | */ 5 | function #BASENAME#_node_insert($node) { 6 | db_insert('mytable') 7 | ->fields(array( 8 | 'nid' => $node->nid, 9 | 'extra' => $node->extra, 10 | )) 11 | ->execute(); 12 | } 13 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_openid_normalization_method_info_alter: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_openid_normalization_method_info_alter(). 4 | */ 5 | function #BASENAME#_openid_normalization_method_info_alter(&$methods) { 6 | // Remove Google IDP normalization. 7 | unset($methods['google_idp']); 8 | } 9 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_path_insert: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_path_insert(). 4 | */ 5 | function #BASENAME#_path_insert($path) { 6 | db_insert('mytable') 7 | ->fields(array( 8 | 'alias' => $path['alias'], 9 | 'pid' => $path['pid'], 10 | )) 11 | ->execute(); 12 | } 13 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_search_info: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_search_info(). 4 | */ 5 | function #BASENAME#_search_info() { 6 | return array( 7 | 'title' => 'Content', 8 | 'path' => 'node', 9 | 'conditions_callback' => 'sample_search_conditions_callback', 10 | ); 11 | } 12 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_hook_info: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_hook_info(). 4 | */ 5 | function #BASENAME#_hook_info() { 6 | $hooks['token_info'] = array( 7 | 'group' => 'tokens', 8 | ); 9 | $hooks['tokens'] = array( 10 | 'group' => 'tokens', 11 | ); 12 | return $hooks; 13 | } 14 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_js_alter: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_js_alter(). 4 | */ 5 | function #BASENAME#_js_alter(&$javascript) { 6 | // Swap out jQuery to use an updated version of the library. 7 | $javascript['misc/jquery.js']['data'] = drupal_get_path('module', 'jquery_update') . '/jquery.js'; 8 | } 9 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_mail_alter: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_mail_alter(). 4 | */ 5 | function #BASENAME#_mail_alter(&$message) { 6 | if ($message['id'] == 'modulename_messagekey') { 7 | $message['body'][] = "--\nMail sent out from " . variable_get('sitename', t('Drupal')); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_user_role_presave: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_user_role_presave(). 4 | */ 5 | function #BASENAME#_user_role_presave($role) { 6 | // Set a UUID for the user role if it doesn't already exist 7 | if (empty($role->uuid)) { 8 | $role->uuid = uuid_uuid(); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Drupal7.php/Snippets/doxygen-param: -------------------------------------------------------------------------------- 1 | #indent# 2 | /** 3 | * #placeholderstart# Documentation #placeholderend# 4 | * 5 | * @param #placeholderstart# $param #placeholderend# 6 | * #placeholderstart# Description #placeholderend# 7 | * @return 8 | * #placeholderstart# Description #placeholderend# 9 | */ 10 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_archiver_info: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_archiver_info(). 4 | */ 5 | function #BASENAME#_archiver_info() { 6 | return array( 7 | 'tar' => array( 8 | 'class' => 'ArchiverTar', 9 | 'extensions' => array('tar', 'tar.gz', 'tar.bz2'), 10 | ), 11 | ); 12 | } 13 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_field_purge_field_instance: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_field_purge_field_instance(). 4 | */ 5 | function #BASENAME#_field_purge_field_instance($instance) { 6 | db_delete('my_module_field_instance_info') 7 | ->condition('id', $instance['id']) 8 | ->execute(); 9 | } 10 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_aggregator_parse_info: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_aggregator_parse_info(). 4 | */ 5 | function #BASENAME#_aggregator_parse_info() { 6 | return array( 7 | 'title' => t('Default parser'), 8 | 'description' => t('Default parser for RSS, Atom and RDF feeds.'), 9 | ); 10 | } 11 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_element_info_alter: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_element_info_alter(). 4 | */ 5 | function #BASENAME#_element_info_alter(&$type) { 6 | // Decrease the default size of textfields. 7 | if (isset($type['textfield']['#size'])) { 8 | $type['textfield']['#size'] = 40; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_field_update_field: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_field_update_field(). 4 | */ 5 | function #BASENAME#_field_update_field($field, $prior_field, $has_data) { 6 | // Reset the static value that keeps track of allowed values for list fields. 7 | drupal_static_reset('list_allowed_values'); 8 | } 9 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_taxonomy_vocabulary_insert: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_taxonomy_vocabulary_insert(). 4 | */ 5 | function #BASENAME#_taxonomy_vocabulary_insert($vocabulary) { 6 | if ($vocabulary->synonyms) { 7 | variable_set('taxonomy_' . $vocabulary->vid . '_synonyms', TRUE); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_user_role_delete: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_user_role_delete(). 4 | */ 5 | function #BASENAME#_user_role_delete($role) { 6 | // Delete existing instances of the deleted role. 7 | db_delete('my_module_table') 8 | ->condition('rid', $role->rid) 9 | ->execute(); 10 | } 11 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_aggregator_fetch_info: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_aggregator_fetch_info(). 4 | */ 5 | function #BASENAME#_aggregator_fetch_info() { 6 | return array( 7 | 'title' => t('Default fetcher'), 8 | 'description' => t('Default fetcher for resources available by URL.'), 9 | ); 10 | } 11 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_ajax_render_alter: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_ajax_render_alter(). 4 | */ 5 | function #BASENAME#_ajax_render_alter($commands) { 6 | // Inject any new status messages into the content area. 7 | $commands[] = ajax_command_prepend('#block-system-main .content', theme('status_messages')); 8 | } 9 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_username_alter: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_username_alter(). 4 | */ 5 | function #BASENAME#_username_alter(&$name, $account) { 6 | // Display the user's uid instead of name. 7 | if (isset($account->uid)) { 8 | $name = t('User !uid', array('!uid' => $account->uid)); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_node_presave: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_node_presave(). 4 | */ 5 | function #BASENAME#_node_presave($node) { 6 | if ($node->nid && $node->moderate) { 7 | // Reset votes when node is updated: 8 | $node->score = 0; 9 | $node->users = ''; 10 | $node->votes = 0; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_user_update: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_user_update(). 4 | */ 5 | function #BASENAME#_user_update(&$edit, $account, $category) { 6 | db_insert('user_changes') 7 | ->fields(array( 8 | 'uid' => $account->uid, 9 | 'changed' => time(), 10 | )) 11 | ->execute(); 12 | } 13 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_aggregator_process_info: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_aggregator_process_info(). 4 | */ 5 | function #BASENAME#_aggregator_process_info($feed) { 6 | return array( 7 | 'title' => t('Default processor'), 8 | 'description' => t('Creates lightweight records of feed items.'), 9 | ); 10 | } 11 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_date_format_types: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_date_format_types(). 4 | */ 5 | function #BASENAME#_date_format_types() { 6 | // Define the core date format types. 7 | return array( 8 | 'long' => t('Long'), 9 | 'medium' => t('Medium'), 10 | 'short' => t('Short'), 11 | ); 12 | } 13 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_field_storage_purge_field_instance: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_field_storage_purge_field_instance(). 4 | */ 5 | function #BASENAME#_field_storage_purge_field_instance($instance) { 6 | db_delete('my_module_field_instance_info') 7 | ->condition('id', $instance['id']) 8 | ->execute(); 9 | } 10 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_translated_menu_link_alter: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_translated_menu_link_alter(). 4 | */ 5 | function #BASENAME#_translated_menu_link_alter(&$item, $map) { 6 | if ($item['href'] == 'devel/cache/clear') { 7 | $item['localized_options']['query'] = drupal_get_destination(); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_update_last_removed: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_update_last_removed(). 4 | */ 5 | function #BASENAME#_update_last_removed() { 6 | // We've removed the 5.x-1.x version of mymodule, including database updates. 7 | // The next update function is mymodule_update_5200(). 8 | return 5103; 9 | } 10 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_user_insert: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_user_insert(). 4 | */ 5 | function #BASENAME#_user_insert(&$edit, $account, $category) { 6 | db_insert('mytable') 7 | ->fields(array( 8 | 'myfield' => $edit['myfield'], 9 | 'uid' => $account->uid, 10 | )) 11 | ->execute(); 12 | } 13 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_block_save: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_block_save(). 4 | */ 5 | function #BASENAME#_block_save($delta = '', $edit = array()) { 6 | // This example comes from node.module. 7 | if ($delta == 'recent') { 8 | variable_set('node_recent_block_count', $edit['node_recent_block_count']); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_filter_FILTER_process: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_filter_FILTER_process(). 4 | */ 5 | function #BASENAME#_filter_FILTER_process($text, $filter, $format, $langcode, $cache, $cache_id) { 6 | $text = preg_replace('|\[codefilter_code\](.+?)\[/codefilter_code\]|se', "
$1", $text); 7 | return $text; 8 | } 9 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_load: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_load(). 4 | */ 5 | function #BASENAME#_load($nodes) { 6 | $result = db_query('SELECT nid, foo FROM {mytable} WHERE nid IN (:nids)', array(':nids' => array_keys($nodes))); 7 | foreach ($result as $record) { 8 | $nodes[$record->nid]->foo = $record->foo; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_node_grants: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_node_grants(). 4 | */ 5 | function #BASENAME#_node_grants($account, $op) { 6 | if (user_access('access private content', $account)) { 7 | $grants['example'] = array(1); 8 | } 9 | $grants['example_owner'] = array($account->uid); 10 | return $grants; 11 | } 12 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_updater_info_alter: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_updater_info_alter(). 4 | */ 5 | function #BASENAME#_updater_info_alter(&$updaters) { 6 | // Adjust weight so that the theme Updater gets a chance to handle a given 7 | // update task before module updaters. 8 | $updaters['theme']['weight'] = -1; 9 | } 10 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_menu_delete: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_menu_delete(). 4 | */ 5 | function #BASENAME#_menu_delete($menu) { 6 | // Delete the record from our variable. 7 | $my_menus = variable_get('my_module_menus', array()); 8 | unset($my_menus[$menu['menu_name']]); 9 | variable_set('my_module_menus', $my_menus); 10 | } 11 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_node_view: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_node_view(). 4 | */ 5 | function #BASENAME#_node_view($node, $view_mode, $langcode) { 6 | $node->content['my_additional_field'] = array( 7 | '#markup' => $additional_field, 8 | '#weight' => 10, 9 | '#theme' => 'mymodule_my_additional_field', 10 | ); 11 | } 12 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_permission: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_permission(). 4 | */ 5 | function #BASENAME#_permission() { 6 | return array( 7 | 'administer my module' => array( 8 | 'title' => t('Administer my module'), 9 | 'description' => t('Perform administration tasks for my module.'), 10 | ), 11 | ); 12 | } 13 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_preprocess_HOOK: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_preprocess_HOOK(). 4 | */ 5 | function #BASENAME#_preprocess_HOOK(&$variables) { 6 | // This example is from rdf_preprocess_image(). It adds an RDF attribute 7 | // to the image hook's variables. 8 | $variables['attributes']['typeof'] = array('foaf:Image'); 9 | } 10 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_taxonomy_vocabulary_load: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_taxonomy_vocabulary_load(). 4 | */ 5 | function #BASENAME#_taxonomy_vocabulary_load($vocabularies) { 6 | foreach ($vocabularies as $vocabulary) { 7 | $vocabulary->synonyms = variable_get('taxonomy_' . $vocabulary->vid . '_synonyms', FALSE); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_field_storage_info_alter: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_field_storage_info_alter(). 4 | */ 5 | function #BASENAME#_field_storage_info_alter(&$info) { 6 | // Add a setting to a storage type. 7 | $info['field_sql_storage']['settings'] += array( 8 | 'mymodule_additional_setting' => 'default value', 9 | ); 10 | } 11 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_init: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_init(). 4 | */ 5 | function #BASENAME#_init() { 6 | // Since this file should only be loaded on the front page, it cannot be 7 | // declared in the info file. 8 | if (drupal_is_front_page()) { 9 | drupal_add_css(drupal_get_path('module', 'foo') . '/foo.css'); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_modules_enabled: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_modules_enabled(). 4 | */ 5 | function #BASENAME#_modules_enabled($modules) { 6 | if (in_array('lousy_module', $modules)) { 7 | drupal_set_message(t('mymodule is not compatible with lousy_module'), 'error'); 8 | mymodule_disable_functionality(); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_taxonomy_vocabulary_delete: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_taxonomy_vocabulary_delete(). 4 | */ 5 | function #BASENAME#_taxonomy_vocabulary_delete($vocabulary) { 6 | if (variable_get('taxonomy_' . $vocabulary->vid . '_synonyms', FALSE)) { 7 | variable_del('taxonomy_' . $vocabulary->vid . '_synonyms'); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_validate: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_validate(). 4 | */ 5 | function #BASENAME#_validate($node, $form, &$form_state) { 6 | if (isset($node->end) && isset($node->start)) { 7 | if ($node->start > $node->end) { 8 | form_set_error('time', t('An event may not end before it starts.')); 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_cron_queue_info_alter: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_cron_queue_info_alter(). 4 | */ 5 | function #BASENAME#_cron_queue_info_alter(&$queues) { 6 | // This site has many feeds so let's spend 90 seconds on each cron run 7 | // updating feeds instead of the default 60. 8 | $queues['aggregator_feeds']['time'] = 90; 9 | } 10 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_field_access: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_field_access(). 4 | */ 5 | function #BASENAME#_field_access($op, $field, $entity_type, $entity, $account) { 6 | if ($field['field_name'] == 'field_of_interest' && $op == 'edit') { 7 | return user_access('edit field of interest', $account); 8 | } 9 | return TRUE; 10 | } 11 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_modules_uninstalled: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_modules_uninstalled(). 4 | */ 5 | function #BASENAME#_modules_uninstalled($modules) { 6 | foreach ($modules as $module) { 7 | db_delete('mymodule_table') 8 | ->condition('module', $module) 9 | ->execute(); 10 | } 11 | mymodule_cache_rebuild(); 12 | } 13 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_user_load: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_user_load(). 4 | */ 5 | function #BASENAME#_user_load($users) { 6 | $result = db_query('SELECT uid, foo FROM {my_table} WHERE uid IN (:uids)', array(':uids' => array_keys($users))); 7 | foreach ($result as $record) { 8 | $users[$record->uid]->foo = $record->foo; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_contextual_links_view_alter: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_contextual_links_view_alter(). 4 | */ 5 | function #BASENAME#_contextual_links_view_alter(&$element, $items) { 6 | // Add another class to all contextual link lists to facilitate custom 7 | // styling. 8 | $element['#attributes']['class'][] = 'custom-class'; 9 | } 10 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_entity_view: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_entity_view(). 4 | */ 5 | function #BASENAME#_entity_view($entity, $type, $view_mode, $langcode) { 6 | $entity->content['my_additional_field'] = array( 7 | '#markup' => $additional_field, 8 | '#weight' => 10, 9 | '#theme' => 'mymodule_my_additional_field', 10 | ); 11 | } 12 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_node_info: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_node_info(). 4 | */ 5 | function #BASENAME#_node_info() { 6 | return array( 7 | 'blog' => array( 8 | 'name' => t('Blog entry'), 9 | 'base' => 'blog', 10 | 'description' => t('Use for multi-user blogs. Every user gets a personal blog.'), 11 | ) 12 | ); 13 | } 14 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_system_info_alter: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_system_info_alter(). 4 | */ 5 | function #BASENAME#_system_info_alter(&$info, $file, $type) { 6 | // Only fill this in if the .info file does not define a 'datestamp'. 7 | if (empty($info['datestamp'])) { 8 | $info['datestamp'] = filemtime($file->filename); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_mail: -------------------------------------------------------------------------------- 1 | drupal_mail(#placeholderstart# $module #placeholderend#, #placeholderstart# $key #placeholderend#, #placeholderstart# $to #placeholderend#, #placeholderstart# $language #placeholderend#, #placeholderstart# $params = array() #placeholderend#, #placeholderstart# $from = NULL #placeholderend#, #placeholderstart# $send = TRUE #placeholderend#) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_node_load: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_node_load(). 4 | */ 5 | function #BASENAME#_node_load($nodes, $types) { 6 | $result = db_query('SELECT nid, foo FROM {mytable} WHERE nid IN(:nids)', array(':nids' => array_keys($nodes))); 7 | foreach ($result as $record) { 8 | $nodes[$record->nid]->foo = $record->foo; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_node_validate: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_node_validate(). 4 | */ 5 | function #BASENAME#_node_validate($node, $form, &$form_state) { 6 | if (isset($node->end) && isset($node->start)) { 7 | if ($node->start > $node->end) { 8 | form_set_error('time', t('An event may not end before it starts.')); 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Drupal7.php/Functions/drupal_clean_css_identifier: -------------------------------------------------------------------------------- 1 | drupal_clean_css_identifier(#placeholderstart# $identifier #placeholderend#, #placeholderstart# $filter = array(' ' => '-' #placeholderend#, #placeholderstart# '_' => '-' #placeholderend#, #placeholderstart# '/' => '-' #placeholderend#, #placeholderstart# '[' => '-' #placeholderend#, #placeholderstart# ']' => '' #placeholderend#)) 2 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_entity_info_alter: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_entity_info_alter(). 4 | */ 5 | function #BASENAME#_entity_info_alter(&$entity_info) { 6 | // Set the controller class for nodes to an alternate implementation of the 7 | // DrupalEntityController interface. 8 | $entity_info['node']['controller class'] = 'MyCustomNodeController'; 9 | } 10 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_field_attach_create_bundle: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_field_attach_create_bundle(). 4 | */ 5 | function #BASENAME#_field_attach_create_bundle($entity_type, $bundle) { 6 | // When a new bundle is created, the menu needs to be rebuilt to add the 7 | // Field UI menu item tabs. 8 | variable_set('menu_rebuild_needed', TRUE); 9 | } 10 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_filetransfer_info: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_filetransfer_info(). 4 | */ 5 | function #BASENAME#_filetransfer_info() { 6 | $info['sftp'] = array( 7 | 'title' => t('SFTP (Secure FTP)'), 8 | 'file' => 'sftp.filetransfer.inc', 9 | 'class' => 'FileTransferSFTP', 10 | 'weight' => 10, 11 | ); 12 | return $info; 13 | } 14 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_taxonomy_vocabulary_update: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_taxonomy_vocabulary_update(). 4 | */ 5 | function #BASENAME#_taxonomy_vocabulary_update($vocabulary) { 6 | $status = $vocabulary->synonyms ? TRUE : FALSE; 7 | if ($vocabulary->synonyms) { 8 | variable_set('taxonomy_' . $vocabulary->vid . '_synonyms', $status); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_user_presave: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_user_presave(). 4 | */ 5 | function #BASENAME#_user_presave(&$edit, $account, $category) { 6 | // Make sure that our form value 'mymodule_foo' is stored as 'mymodule_bar'. 7 | if (isset($edit['mymodule_foo'])) { 8 | $edit['data']['my_module_foo'] = $edit['my_module_foo']; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_comment_load: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_comment_load(). 4 | */ 5 | function #BASENAME#_comment_load($comments) { 6 | $result = db_query('SELECT cid, foo FROM {mytable} WHERE cid IN (:cids)', array(':cids' => array_keys($comments))); 7 | foreach ($result as $record) { 8 | $comments[$record->cid]->foo = $record->foo; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_field_display_ENTITY_TYPE_alter: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_field_display_ENTITY_TYPE_alter(). 4 | */ 5 | function #BASENAME#_field_display_ENTITY_TYPE_alter(&$display, $context) { 6 | // Leave field labels out of the search index. 7 | if ($context['view_mode'] == 'search_index') { 8 | $display['label'] = 'hidden'; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_field_extra_fields_display_alter: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_field_extra_fields_display_alter(). 4 | */ 5 | function #BASENAME#_field_extra_fields_display_alter(&$displays, $context) { 6 | if ($context['entity_type'] == 'taxonomy_term' && $context['view_mode'] == 'full') { 7 | $displays['description']['visible'] = FALSE; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_field_storage_create_field: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_field_storage_create_field(). 4 | */ 5 | function #BASENAME#_field_storage_create_field($field) { 6 | $schema = _field_sql_storage_schema($field); 7 | foreach ($schema as $name => $table) { 8 | db_create_table($name, $table); 9 | } 10 | drupal_get_schema(NULL, TRUE); 11 | } 12 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_language_types_info_alter: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_language_types_info_alter(). 4 | */ 5 | function #BASENAME#_language_types_info_alter(array &$language_types) { 6 | if (isset($language_types['custom_language_type'])) { 7 | $language_types['custom_language_type_custom']['description'] = t('A far better description.'); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_menu_insert: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_menu_insert(). 4 | */ 5 | function #BASENAME#_menu_insert($menu) { 6 | // For example, we track available menus in a variable. 7 | $my_menus = variable_get('my_module_menus', array()); 8 | $my_menus[$menu['menu_name']] = $menu['menu_name']; 9 | variable_set('my_module_menus', $my_menus); 10 | } 11 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_menu_update: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_menu_update(). 4 | */ 5 | function #BASENAME#_menu_update($menu) { 6 | // For example, we track available menus in a variable. 7 | $my_menus = variable_get('my_module_menus', array()); 8 | $my_menus[$menu['menu_name']] = $menu['menu_name']; 9 | variable_set('my_module_menus', $my_menus); 10 | } 11 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_field_attach_prepare_translation_alter: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_field_attach_prepare_translation_alter(). 4 | */ 5 | function #BASENAME#_field_attach_prepare_translation_alter(&$entity, $context) { 6 | if ($context['entity_type'] == 'custom_entity_type') { 7 | $entity->custom_field = $context['source_entity']->custom_field; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_hook_info_alter: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_hook_info_alter(). 4 | */ 5 | function #BASENAME#_hook_info_alter(&$hooks) { 6 | // Our module wants to completely override the core tokens, so make 7 | // sure the core token hooks are not found. 8 | $hooks['token_info']['group'] = 'mytokens'; 9 | $hooks['tokens']['group'] = 'mytokens'; 10 | } 11 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_page_alter: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_page_alter(). 4 | */ 5 | function #BASENAME#_page_alter(&$page) { 6 | // Add help text to the user login block. 7 | $page['sidebar_first']['user_login']['help'] = array( 8 | '#weight' => -10, 9 | '#markup' => t('To post comments or add new content, you first have to log in.'), 10 | ); 11 | } 12 | -------------------------------------------------------------------------------- /Drupal7.php/Hooks/hook_filter_FILTER_prepare: -------------------------------------------------------------------------------- 1 | #INDENT# 2 | /** 3 | * Implements hook_filter_FILTER_prepare(). 4 | */ 5 | function #BASENAME#_filter_FILTER_prepare($text, $filter, $format, $langcode, $cache, $cache_id) { 6 | // Escape
and tags.
7 | $text = preg_replace('|(.+?)|se', "[codefilter_code]$1[/codefilter_code]", $text);
8 | return $text;
9 | }
10 |
--------------------------------------------------------------------------------
/Drupal7.php/Hooks/hook_taxonomy_term_load:
--------------------------------------------------------------------------------
1 | #INDENT#
2 | /**
3 | * Implements hook_taxonomy_term_load().
4 | */
5 | function #BASENAME#_taxonomy_term_load($terms) {
6 | $result = db_query('SELECT tid, foo FROM {mytable} WHERE tid IN (:tids)', array(':tids' => array_keys($terms)));
7 | foreach ($result as $record) {
8 | $terms[$record->tid]->foo = $record->foo;
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Drupal7.php/Hooks/hook_admin_paths_alter:
--------------------------------------------------------------------------------
1 | #INDENT#
2 | /**
3 | * Implements hook_admin_paths_alter().
4 | */
5 | function #BASENAME#_admin_paths_alter(&$paths) {
6 | // Treat all user pages as administrative.
7 | $paths['user'] = TRUE;
8 | $paths['user/*'] = TRUE;
9 | // Treat the forum topic node form as a non-administrative page.
10 | $paths['node/add/forum'] = FALSE;
11 | }
12 |
--------------------------------------------------------------------------------
/Drupal7.php/Hooks/hook_field_storage_purge_field:
--------------------------------------------------------------------------------
1 | #INDENT#
2 | /**
3 | * Implements hook_field_storage_purge_field().
4 | */
5 | function #BASENAME#_field_storage_purge_field($field) {
6 | $table_name = _field_sql_storage_tablename($field);
7 | $revision_name = _field_sql_storage_revision_tablename($field);
8 | db_drop_table($table_name);
9 | db_drop_table($revision_name);
10 | }
11 |
--------------------------------------------------------------------------------
/Drupal7.php/Hooks/hook_node_search_result:
--------------------------------------------------------------------------------
1 | #INDENT#
2 | /**
3 | * Implements hook_node_search_result().
4 | */
5 | function #BASENAME#_node_search_result($node) {
6 | $comments = db_query('SELECT comment_count FROM {node_comment_statistics} WHERE nid = :nid', array('nid' => $node->nid))->fetchField();
7 | return array('comment' => format_plural($comments, '1 comment', '@count comments'));
8 | }
9 |
--------------------------------------------------------------------------------
/Drupal7.php/Hooks/hook_field_attach_purge:
--------------------------------------------------------------------------------
1 | #INDENT#
2 | /**
3 | * Implements hook_field_attach_purge().
4 | */
5 | function #BASENAME#_field_attach_purge($entity_type, $entity, $field, $instance) {
6 | // find the corresponding data in mymodule and purge it
7 | if ($entity_type == 'node' && $field->field_name == 'my_field_name') {
8 | mymodule_remove_mydata($entity->nid);
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Drupal7.php/Hooks/hook_image_effect_info_alter:
--------------------------------------------------------------------------------
1 | #INDENT#
2 | /**
3 | * Implements hook_image_effect_info_alter().
4 | */
5 | function #BASENAME#_image_effect_info_alter(&$effects) {
6 | // Override the Image module's crop effect with more options.
7 | $effects['image_crop']['effect callback'] = 'mymodule_crop_effect';
8 | $effects['image_crop']['form callback'] = 'mymodule_crop_form';
9 | }
10 |
--------------------------------------------------------------------------------
/Drupal7.php/Hooks/hook_schema_alter:
--------------------------------------------------------------------------------
1 | #INDENT#
2 | /**
3 | * Implements hook_schema_alter().
4 | */
5 | function #BASENAME#_schema_alter(&$schema) {
6 | // Add field to existing schema.
7 | $schema['users']['fields']['timezone_id'] = array(
8 | 'type' => 'int',
9 | 'not null' => TRUE,
10 | 'default' => 0,
11 | 'description' => 'Per-user timezone configuration.',
12 | );
13 | }
14 |
--------------------------------------------------------------------------------
/Drupal7.php/Hooks/hook_shortcut_default_set:
--------------------------------------------------------------------------------
1 | #INDENT#
2 | /**
3 | * Implements hook_shortcut_default_set().
4 | */
5 | function #BASENAME#_shortcut_default_set($account) {
6 | // Use a special set of default shortcuts for administrators only.
7 | if (in_array(variable_get('user_admin_role', 0), $account->roles)) {
8 | return variable_get('mymodule_shortcut_admin_default_set');
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Drupal7.php/Hooks/hook_simpletest_alter:
--------------------------------------------------------------------------------
1 | #INDENT#
2 | /**
3 | * Implements hook_simpletest_alter().
4 | */
5 | function #BASENAME#_simpletest_alter(&$groups) {
6 | // An alternative session handler module would not want to run the original
7 | // Session https handling test because it checks the sessions table in the
8 | // database.
9 | unset($groups['Session']['testHttpsSession']);
10 | }
11 |
--------------------------------------------------------------------------------
/Drupal7.php/Hooks/hook_xmlrpc:
--------------------------------------------------------------------------------
1 | #INDENT#
2 | /**
3 | * Implements hook_xmlrpc().
4 | */
5 | function #BASENAME#_xmlrpc() {
6 | return array(
7 | 'drupal.login' => 'drupal_login',
8 | array(
9 | 'drupal.site.ping',
10 | 'drupal_directory_ping',
11 | array('boolean', 'string', 'string', 'string', 'string', 'string'),
12 | t('Handling ping request'))
13 | );
14 | }
15 |
--------------------------------------------------------------------------------
/Drupal7.php/Hooks/hook_file_download_access_alter:
--------------------------------------------------------------------------------
1 | #INDENT#
2 | /**
3 | * Implements hook_file_download_access_alter().
4 | */
5 | function #BASENAME#_file_download_access_alter(&$grants, $field, $entity_type, $entity) {
6 | // For our example module, we always enforce the rules set by node module.
7 | if (isset($grants['node'])) {
8 | $grants = array('node' => $grants['node']);
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Drupal7.php/Hooks/hook_language_init:
--------------------------------------------------------------------------------
1 | #INDENT#
2 | /**
3 | * Implements hook_language_init().
4 | */
5 | function #BASENAME#_language_init() {
6 | global $language, $conf;
7 | switch ($language->language) {
8 | case 'it':
9 | $conf['site_name'] = 'Il mio sito Drupal';
10 | break;
11 | case 'fr':
12 | $conf['site_name'] = 'Mon site Drupal';
13 | break;
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Drupal7.php/Hooks/hook_user_role_insert:
--------------------------------------------------------------------------------
1 | #INDENT#
2 | /**
3 | * Implements hook_user_role_insert().
4 | */
5 | function #BASENAME#_user_role_insert($role) {
6 | // Save extra fields provided by the module to user roles.
7 | db_insert('my_module_table')
8 | ->fields(array(
9 | 'rid' => $role->rid,
10 | 'role_description' => $role->description,
11 | ))
12 | ->execute();
13 | }
14 |
--------------------------------------------------------------------------------
/Drupal7.php/Hooks/hook_field_available_languages_alter:
--------------------------------------------------------------------------------
1 | #INDENT#
2 | /**
3 | * Implements hook_field_available_languages_alter().
4 | */
5 | function #BASENAME#_field_available_languages_alter(&$languages, $context) {
6 | // Add an unavailable language.
7 | $languages[] = 'xx';
8 | // Remove an available language.
9 | $index = array_search('yy', $languages);
10 | unset($languages[$index]);
11 | }
12 |
--------------------------------------------------------------------------------
/Drupal7.php/Hooks/hook_field_info_max_weight:
--------------------------------------------------------------------------------
1 | #INDENT#
2 | /**
3 | * Implements hook_field_info_max_weight().
4 | */
5 | function #BASENAME#_field_info_max_weight($entity_type, $bundle, $context) {
6 | $weights = array();
7 | foreach (my_module_entity_additions($entity_type, $bundle, $context) as $addition) {
8 | $weights[] = $addition['weight'];
9 | }
10 | return $weights ? max($weights) : NULL;
11 | }
12 |
--------------------------------------------------------------------------------
/Drupal7.php/Hooks/hook_field_widget_form:
--------------------------------------------------------------------------------
1 | #INDENT#
2 | /**
3 | * Implements hook_field_widget_form().
4 | */
5 | function #BASENAME#_field_widget_form(&$form, &$form_state, $field, $instance, $langcode, $items, $delta, $element) {
6 | $element += array(
7 | '#type' => $instance['widget']['type'],
8 | '#default_value' => isset($items[$delta]) ? $items[$delta] : '',
9 | );
10 | return $element;
11 | }
12 |
--------------------------------------------------------------------------------
/Drupal7.php/Hooks/hook_user_role_update:
--------------------------------------------------------------------------------
1 | #INDENT#
2 | /**
3 | * Implements hook_user_role_update().
4 | */
5 | function #BASENAME#_user_role_update($role) {
6 | // Save extra fields provided by the module to user roles.
7 | db_merge('my_module_table')
8 | ->key(array('rid' => $role->rid))
9 | ->fields(array(
10 | 'role_description' => $role->description
11 | ))
12 | ->execute();
13 | }
14 |
--------------------------------------------------------------------------------
/Drupal7.php/Hooks/hook_field_storage_info:
--------------------------------------------------------------------------------
1 | #INDENT#
2 | /**
3 | * Implements hook_field_storage_info().
4 | */
5 | function #BASENAME#_field_storage_info() {
6 | return array(
7 | 'field_sql_storage' => array(
8 | 'label' => t('Default SQL storage'),
9 | 'description' => t('Stores fields in the local SQL database, using per-field tables.'),
10 | 'settings' => array(),
11 | ),
12 | );
13 | }
14 |
--------------------------------------------------------------------------------
/Drupal7.php/Hooks/hook_menu_get_item_alter:
--------------------------------------------------------------------------------
1 | #INDENT#
2 | /**
3 | * Implements hook_menu_get_item_alter().
4 | */
5 | function #BASENAME#_menu_get_item_alter(&$router_item, $path, $original_map) {
6 | // When retrieving the router item for the current path...
7 | if ($path == $_GET['q']) {
8 | // ...call a function that prepares something for this request.
9 | mymodule_prepare_something();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Drupal7.php/Hooks/hook_dashboard_regions:
--------------------------------------------------------------------------------
1 | #INDENT#
2 | /**
3 | * Implements hook_dashboard_regions().
4 | */
5 | function #BASENAME#_dashboard_regions() {
6 | // Define a new dashboard region. Your module can also then define
7 | // theme_mymodule_dashboard_region() as a theme wrapper function to control
8 | // the region's appearance.
9 | return array('mymodule_dashboard_region' => "My module's dashboard region");
10 | }
11 |
--------------------------------------------------------------------------------
/Drupal7.php/Hooks/hook_install_tasks_alter:
--------------------------------------------------------------------------------
1 | #INDENT#
2 | /**
3 | * Implements hook_install_tasks_alter().
4 | */
5 | function #BASENAME#_install_tasks_alter(&$tasks, $install_state) {
6 | // Replace the "Choose language" installation task provided by Drupal core
7 | // with a custom callback function defined by this installation profile.
8 | $tasks['install_select_locale']['function'] = 'myprofile_locale_selection';
9 | }
10 |
--------------------------------------------------------------------------------
/Drupal7.php/Control Structures/forSizeOfArray-d:
--------------------------------------------------------------------------------
1 | #indent#
2 | #selstart# // We count the number of items first so we don't end up counting on every iteration - they claim this is faster... #selend#
3 | #placeholderstart# $total_records_variable #placeholderend# = count( #placeholderstart# variable to iterate over #placeholderend# );
4 | for ($i = 0; $i < #placeholderstart# $total_records_variable #placeholderend#; $i++) {
5 | #insertion#
6 | }
7 |
--------------------------------------------------------------------------------
/Drupal7.php/Hooks/hook_node_type_update:
--------------------------------------------------------------------------------
1 | #INDENT#
2 | /**
3 | * Implements hook_node_type_update().
4 | */
5 | function #BASENAME#_node_type_update($info) {
6 | if (!empty($info->old_type) && $info->old_type != $info->type) {
7 | $setting = variable_get('comment_' . $info->old_type, COMMENT_NODE_OPEN);
8 | variable_del('comment_' . $info->old_type);
9 | variable_set('comment_' . $info->type, $setting);
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Drupal7.php/Hooks/hook_filetransfer_info_alter:
--------------------------------------------------------------------------------
1 | #INDENT#
2 | /**
3 | * Implements hook_filetransfer_info_alter().
4 | */
5 | function #BASENAME#_filetransfer_info_alter(&$filetransfer_info) {
6 | if (variable_get('paranoia', FALSE)) {
7 | // Remove the FTP option entirely.
8 | unset($filetransfer_info['ftp']);
9 | // Make sure the SSH option is listed first.
10 | $filetransfer_info['ssh']['weight'] = -10;
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Drupal7.php/Hooks/hook_install:
--------------------------------------------------------------------------------
1 | #INDENT#
2 | /**
3 | * Implements hook_install().
4 | */
5 | function #BASENAME#_install() {
6 | // Populate the default {node_access} record.
7 | db_insert('node_access')
8 | ->fields(array(
9 | 'nid' => 0,
10 | 'gid' => 0,
11 | 'realm' => 'all',
12 | 'grant_view' => 1,
13 | 'grant_update' => 0,
14 | 'grant_delete' => 0,
15 | ))
16 | ->execute();
17 | }
18 |
--------------------------------------------------------------------------------
/Drupal7.php/Hooks/hook_language_negotiation_info_alter:
--------------------------------------------------------------------------------
1 | #INDENT#
2 | /**
3 | * Implements hook_language_negotiation_info_alter().
4 | */
5 | function #BASENAME#_language_negotiation_info_alter(array &$language_providers) {
6 | if (isset($language_providers['custom_language_provider'])) {
7 | $language_providers['custom_language_provider']['config'] = 'admin/config/regional/language/configure/custom-language-provider';
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/Drupal7.php/Hooks/hook_url_inbound_alter:
--------------------------------------------------------------------------------
1 | #INDENT#
2 | /**
3 | * Implements hook_url_inbound_alter().
4 | */
5 | function #BASENAME#_url_inbound_alter(&$path, $original_path, $path_language) {
6 | // Create the path user/me/edit, which allows a user to edit their account.
7 | if (preg_match('|^user/me/edit(/.*)?|', $path, $matches)) {
8 | global $user;
9 | $path = 'user/' . $user->uid . '/edit' . $matches[1];
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Drupal7.php/Functions/drupal_add_tabledrag:
--------------------------------------------------------------------------------
1 | drupal_add_tabledrag(#placeholderstart# $table_id #placeholderend#, #placeholderstart# $action #placeholderend#, #placeholderstart# $relationship #placeholderend#, #placeholderstart# $group #placeholderend#, #placeholderstart# $subgroup = NULL #placeholderend#, #placeholderstart# $source = NULL #placeholderend#, #placeholderstart# $hidden = TRUE #placeholderend#, #placeholderstart# $limit = 0 #placeholderend#)
2 |
--------------------------------------------------------------------------------
/Drupal7.php/Hooks/hook_field_extra_fields_alter:
--------------------------------------------------------------------------------
1 | #INDENT#
2 | /**
3 | * Implements hook_field_extra_fields_alter().
4 | */
5 | function #BASENAME#_field_extra_fields_alter(&$info) {
6 | // Force node title to always be at the top of the list by default.
7 | foreach (node_type_get_types() as $bundle) {
8 | if (isset($info['node'][$bundle]['title'])) {
9 | $info['node'][$bundle]['title']['weight'] = -20;
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Drupal7.php/Hooks/hook_menu_site_status_alter:
--------------------------------------------------------------------------------
1 | #INDENT#
2 | /**
3 | * Implements hook_menu_site_status_alter().
4 | */
5 | function #BASENAME#_menu_site_status_alter(&$menu_site_status, $path) {
6 | // Allow access to my_module/authentication even if site is in offline mode.
7 | if ($menu_site_status == MENU_SITE_OFFLINE && user_is_anonymous() && $path == 'my_module/authentication') {
8 | $menu_site_status = MENU_SITE_ONLINE;
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Drupal7.php/Hooks/hook_verify_update_archive:
--------------------------------------------------------------------------------
1 | #INDENT#
2 | /**
3 | * Implements hook_verify_update_archive().
4 | */
5 | function #BASENAME#_verify_update_archive($project, $archive_file, $directory) {
6 | $errors = array();
7 | if (!file_exists($directory)) {
8 | $errors[] = t('The %directory does not exist.', array('%directory' => $directory));
9 | }
10 | // Add other checks on the archive integrity here.
11 | return $errors;
12 | }
13 |
--------------------------------------------------------------------------------
/Drupal7.php/Hooks/hook_entity_delete:
--------------------------------------------------------------------------------
1 | #INDENT#
2 | /**
3 | * Implements hook_entity_delete().
4 | */
5 | function #BASENAME#_entity_delete($entity, $type) {
6 | // Delete the entity's entry from a fictional table of all entities.
7 | $info = entity_get_info($type);
8 | list($id) = entity_extract_ids($type, $entity);
9 | db_delete('example_entity')
10 | ->condition('type', $type)
11 | ->condition('id', $id)
12 | ->execute();
13 | }
14 |
--------------------------------------------------------------------------------
/Drupal7.php/Hooks/hook_image_toolkits:
--------------------------------------------------------------------------------
1 | #INDENT#
2 | /**
3 | * Implements hook_image_toolkits().
4 | */
5 | function #BASENAME#_image_toolkits() {
6 | return array(
7 | 'working' => array(
8 | 'title' => t('A toolkit that works.'),
9 | 'available' => TRUE,
10 | ),
11 | 'broken' => array(
12 | 'title' => t('A toolkit that is "broken" and will not be listed.'),
13 | 'available' => FALSE,
14 | ),
15 | );
16 | }
17 |
--------------------------------------------------------------------------------
/Drupal7.php/Hooks/hook_block_info:
--------------------------------------------------------------------------------
1 | #INDENT#
2 | /**
3 | * Implements hook_block_info().
4 | */
5 | function #BASENAME#_block_info() {
6 | // This example comes from node.module.
7 | $blocks['syndicate'] = array(
8 | 'info' => t('Syndicate'),
9 | 'cache' => DRUPAL_NO_CACHE
10 | );
11 | $blocks['recent'] = array(
12 | 'info' => t('Recent content'),
13 | // DRUPAL_CACHE_PER_ROLE will be assumed.
14 | );
15 | return $blocks;
16 | }
17 |
--------------------------------------------------------------------------------
/Drupal7.php/Hooks/hook_language_switch_links_alter:
--------------------------------------------------------------------------------
1 | #INDENT#
2 | /**
3 | * Implements hook_language_switch_links_alter().
4 | */
5 | function #BASENAME#_language_switch_links_alter(array &$links, $type, $path) {
6 | global $language;
7 | if ($type == LANGUAGE_TYPE_CONTENT && isset($links[$language->language])) {
8 | foreach ($links[$language->language] as $link) {
9 | $link['attributes']['class'][] = 'active-language';
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Drupal7.php/Theme/theme_menu_tree:
--------------------------------------------------------------------------------
1 | #indent#
2 | /**
3 | * Returns HTML for a wrapper for a menu sub-tree.
4 | *
5 | * @param $variables
6 | * An associative array containing:
7 | * - tree: An HTML string containing the tree's items.
8 | *
9 | * @see template_preprocess_menu_tree()
10 | * @ingroup themeable
11 | */
12 | function #BASENAME#_menu_tree($variables) {#INSERTION#
13 | return '';
14 | }
15 |
--------------------------------------------------------------------------------
/Drupal7.php/Hooks/hook_language_types_info:
--------------------------------------------------------------------------------
1 | #INDENT#
2 | /**
3 | * Implements hook_language_types_info().
4 | */
5 | function #BASENAME#_language_types_info() {
6 | return array(
7 | 'custom_language_type' => array(
8 | 'name' => t('Custom language'),
9 | 'description' => t('A custom language type.'),
10 | ),
11 | 'fixed_custom_language_type' => array(
12 | 'fixed' => array('custom_language_provider'),
13 | ),
14 | );
15 | }
16 |
--------------------------------------------------------------------------------
/Drupal7.php/Hooks/hook_updater_info:
--------------------------------------------------------------------------------
1 | #INDENT#
2 | /**
3 | * Implements hook_updater_info().
4 | */
5 | function #BASENAME#_updater_info() {
6 | return array(
7 | 'module' => array(
8 | 'class' => 'ModuleUpdater',
9 | 'name' => t('Update modules'),
10 | 'weight' => 0,
11 | ),
12 | 'theme' => array(
13 | 'class' => 'ThemeUpdater',
14 | 'name' => t('Update themes'),
15 | 'weight' => 0,
16 | ),
17 | );
18 | }
19 |
--------------------------------------------------------------------------------
/Drupal7.php/Hooks/hook_entity_prepare_view:
--------------------------------------------------------------------------------
1 | #INDENT#
2 | /**
3 | * Implements hook_entity_prepare_view().
4 | */
5 | function #BASENAME#_entity_prepare_view($entities, $type, $langcode) {
6 | // Load a specific node into the user object for later theming.
7 | if ($type == 'user') {
8 | $nodes = mymodule_get_user_nodes(array_keys($entities));
9 | foreach ($entities as $uid => $entity) {
10 | $entity->user_node = $nodes[$uid];
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Drupal7.php/Hooks/hook_field_widget_info_alter:
--------------------------------------------------------------------------------
1 | #INDENT#
2 | /**
3 | * Implements hook_field_widget_info_alter().
4 | */
5 | function #BASENAME#_field_widget_info_alter(&$info) {
6 | // Add a setting to a widget type.
7 | $info['text_textfield']['settings'] += array(
8 | 'mymodule_additional_setting' => 'default value',
9 | );
10 | // Let a new field type re-use an existing widget.
11 | $info['options_select']['field types'][] = 'my_field_type';
12 | }
13 |
--------------------------------------------------------------------------------
/Drupal7.php/Hooks/hook_html_head_alter:
--------------------------------------------------------------------------------
1 | #INDENT#
2 | /**
3 | * Implements hook_html_head_alter().
4 | */
5 | function #BASENAME#_html_head_alter(&$head_elements) {
6 | foreach ($head_elements as $key => $element) {
7 | if (isset($element['#attributes']['rel']) && $element['#attributes']['rel'] == 'canonical') {
8 | // I want a custom canonical url.
9 | $head_elements[$key]['#attributes']['href'] = mymodule_canonical_url();
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Drupal7.php/Hooks/hook_menu_link_insert:
--------------------------------------------------------------------------------
1 | #INDENT#
2 | /**
3 | * Implements hook_menu_link_insert().
4 | */
5 | function #BASENAME#_menu_link_insert($link) {
6 | // In our sample case, we track menu items as editing sections
7 | // of the site. These are stored in our table as 'disabled' items.
8 | $record['mlid'] = $link['mlid'];
9 | $record['menu_name'] = $link['menu_name'];
10 | $record['status'] = 0;
11 | drupal_write_record('menu_example', $record);
12 | }
13 |
--------------------------------------------------------------------------------
/Drupal7.php/Hooks/hook_field_formatter_info_alter:
--------------------------------------------------------------------------------
1 | #INDENT#
2 | /**
3 | * Implements hook_field_formatter_info_alter().
4 | */
5 | function #BASENAME#_field_formatter_info_alter(&$info) {
6 | // Add a setting to a formatter type.
7 | $info['text_default']['settings'] += array(
8 | 'mymodule_additional_setting' => 'default value',
9 | );
10 | // Let a new field type re-use an existing formatter.
11 | $info['text_default']['field types'][] = 'my_field_type';
12 | }
13 |
--------------------------------------------------------------------------------
/Drupal7.php/Hooks/hook_image_style_delete:
--------------------------------------------------------------------------------
1 | #INDENT#
2 | /**
3 | * Implements hook_image_style_delete().
4 | */
5 | function #BASENAME#_image_style_delete($style) {
6 | // Administrators can choose an optional replacement style when deleting.
7 | // Update the modules style variable accordingly.
8 | if (isset($style['old_name']) && $style['old_name'] == variable_get('mymodule_image_style', '')) {
9 | variable_set('mymodule_image_style', $style['name']);
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Drupal7.php/Hooks/hook_node_view_alter:
--------------------------------------------------------------------------------
1 | #INDENT#
2 | /**
3 | * Implements hook_node_view_alter().
4 | */
5 | function #BASENAME#_node_view_alter(&$build) {
6 | if ($build['#view_mode'] == 'full' && isset($build['an_additional_field'])) {
7 | // Change its weight.
8 | $build['an_additional_field']['#weight'] = -10;
9 | }
10 | // Add a #post_render callback to act on the rendered HTML of the node.
11 | $build['#post_render'][] = 'my_module_node_post_render';
12 | }
13 |
--------------------------------------------------------------------------------
/Drupal7.php/Hooks/hook_image_style_save:
--------------------------------------------------------------------------------
1 | #INDENT#
2 | /**
3 | * Implements hook_image_style_save().
4 | */
5 | function #BASENAME#_image_style_save($style) {
6 | // If a module defines an image style and that style is renamed by the user
7 | // the module should update any references to that style.
8 | if (isset($style['old_name']) && $style['old_name'] == variable_get('mymodule_image_style', '')) {
9 | variable_set('mymodule_image_style', $style['name']);
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Drupal7.php/Hooks/hook_page_build:
--------------------------------------------------------------------------------
1 | #INDENT#
2 | /**
3 | * Implements hook_page_build().
4 | */
5 | function #BASENAME#_page_build(&$page) {
6 | if (menu_get_object('node', 1)) {
7 | // We are on a node detail page. Append a standard disclaimer to the
8 | // content region.
9 | $page['content']['disclaimer'] = array(
10 | '#markup' => t('Acme, Inc. is not responsible for the contents of this sample code.'),
11 | '#weight' => 25,
12 | );
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/Drupal7.php/Hooks/hook_field_attach_form:
--------------------------------------------------------------------------------
1 | #INDENT#
2 | /**
3 | * Implements hook_field_attach_form().
4 | */
5 | function #BASENAME#_field_attach_form($entity_type, $entity, &$form, &$form_state, $langcode) {
6 | // Add a checkbox allowing a given field to be emptied.
7 | // See hook_field_attach_submit() for the corresponding processing code.
8 | $form['empty_field_foo'] = array(
9 | '#type' => 'checkbox',
10 | '#title' => t("Empty the 'field_foo' field"),
11 | );
12 | }
13 |
--------------------------------------------------------------------------------
/Drupal7.php/Hooks/hook_file_validate:
--------------------------------------------------------------------------------
1 | #INDENT#
2 | /**
3 | * Implements hook_file_validate().
4 | */
5 | function #BASENAME#_file_validate($file) {
6 | $errors = array();
7 | if (empty($file->filename)) {
8 | $errors[] = t("The file's name is empty. Please give a name to the file.");
9 | }
10 | if (strlen($file->filename) > 255) {
11 | $errors[] = t("The file's name exceeds the 255 characters limit. Please rename the file and try again.");
12 | }
13 | return $errors;
14 | }
15 |
--------------------------------------------------------------------------------
/Drupal7.php/Hooks/hook_search_status:
--------------------------------------------------------------------------------
1 | #INDENT#
2 | /**
3 | * Implements hook_search_status().
4 | */
5 | function #BASENAME#_search_status() {
6 | $total = db_query('SELECT COUNT(*) FROM {node} WHERE status = 1')->fetchField();
7 | $remaining = db_query("SELECT COUNT(*) FROM {node} n LEFT JOIN {search_dataset} d ON d.type = 'node' AND d.sid = n.nid WHERE n.status = 1 AND d.sid IS NULL OR d.reindex <> 0")->fetchField();
8 | return array('remaining' => $remaining, 'total' => $total);
9 | }
10 |
--------------------------------------------------------------------------------
/Drupal7.php/Hooks/hook_entity_view_alter:
--------------------------------------------------------------------------------
1 | #INDENT#
2 | /**
3 | * Implements hook_entity_view_alter().
4 | */
5 | function #BASENAME#_entity_view_alter(&$build, $type) {
6 | if ($build['#view_mode'] == 'full' && isset($build['an_additional_field'])) {
7 | // Change its weight.
8 | $build['an_additional_field']['#weight'] = -10;
9 | // Add a #post_render callback to act on the rendered HTML of the entity.
10 | $build['#post_render'][] = 'my_module_node_post_render';
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Drupal7.php/Hooks/hook_field_widget_properties_ENTITY_TYPE_alter:
--------------------------------------------------------------------------------
1 | #INDENT#
2 | /**
3 | * Implements hook_field_widget_properties_ENTITY_TYPE_alter().
4 | */
5 | function #BASENAME#_field_widget_properties_ENTITY_TYPE_alter(&$widget, $context) {
6 | // Change a widget's type according to the time of day.
7 | $field = $context['field'];
8 | if ($field['field_name'] == 'field_foo') {
9 | $time = date('H');
10 | $widget['type'] = $time < 12 ? 'widget_am' : 'widget_pm';
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Drupal7.php/Hooks/hook_field_widget_properties_alter:
--------------------------------------------------------------------------------
1 | #INDENT#
2 | /**
3 | * Implements hook_field_widget_properties_alter().
4 | */
5 | function #BASENAME#_field_widget_properties_alter(&$widget, $context) {
6 | // Change a widget's type according to the time of day.
7 | $field = $context['field'];
8 | if ($context['entity_type'] == 'node' && $field['field_name'] == 'field_foo') {
9 | $time = date('H');
10 | $widget['type'] = $time < 12 ? 'widget_am' : 'widget_pm';
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Drupal7.php/Hooks/hook_file_load:
--------------------------------------------------------------------------------
1 | #INDENT#
2 | /**
3 | * Implements hook_file_load().
4 | */
5 | function #BASENAME#_file_load($files) {
6 | // Add the upload specific data into the file object.
7 | $result = db_query('SELECT * FROM {upload} u WHERE u.fid IN (:fids)', array(':fids' => array_keys($files)))->fetchAll(PDO::FETCH_ASSOC);
8 | foreach ($result as $record) {
9 | foreach ($record as $key => $value) {
10 | $files[$record['fid']]->$key = $value;
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Drupal7.php/Hooks/hook_node_submit:
--------------------------------------------------------------------------------
1 | #INDENT#
2 | /**
3 | * Implements hook_node_submit().
4 | */
5 | function #BASENAME#_node_submit($node, $form, &$form_state) {
6 | // Decompose the selected menu parent option into 'menu_name' and 'plid', if
7 | // the form used the default parent selection widget.
8 | if (!empty($form_state['values']['menu']['parent'])) {
9 | list($node->menu['menu_name'], $node->menu['plid']) = explode(':', $form_state['values']['menu']['parent']);
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Drupal7.php/Hooks/hook_search_page:
--------------------------------------------------------------------------------
1 | #INDENT#
2 | /**
3 | * Implements hook_search_page().
4 | */
5 | function #BASENAME#_search_page($results) {
6 | $output['prefix']['#markup'] = '