- Patch #502190 by jhodgdon, stella, sun: hook implementation headers out of compliance with standards.
parent
8523aca33e
commit
1da26fadfe
modules
blog
color
dashboard
field
field_ui
help
path
rdf/tests
shortcut
simpletest
tests
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_aggregator_fetch_info().
|
||||
* Implements hook_aggregator_fetch_info().
|
||||
*/
|
||||
function aggregator_aggregator_fetch_info() {
|
||||
return array(
|
||||
|
@ -17,7 +17,7 @@ function aggregator_aggregator_fetch_info() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_aggregator_fetch().
|
||||
* Implements hook_aggregator_fetch().
|
||||
*/
|
||||
function aggregator_aggregator_fetch($feed) {
|
||||
$feed->source_string = FALSE;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_uninstall().
|
||||
* Implements hook_uninstall().
|
||||
*/
|
||||
function aggregator_uninstall() {
|
||||
variable_del('aggregator_allowed_html_tags');
|
||||
|
@ -21,7 +21,7 @@ function aggregator_uninstall() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_schema().
|
||||
* Implements hook_schema().
|
||||
*/
|
||||
function aggregator_schema() {
|
||||
$schema['aggregator_category'] = array(
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
define('AGGREGATOR_CLEAR_NEVER', 0);
|
||||
|
||||
/**
|
||||
* Implement hook_help().
|
||||
* Implements hook_help().
|
||||
*/
|
||||
function aggregator_help($path, $arg) {
|
||||
switch ($path) {
|
||||
|
@ -46,7 +46,7 @@ function aggregator_help($path, $arg) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_theme().
|
||||
* Implements hook_theme().
|
||||
*/
|
||||
function aggregator_theme() {
|
||||
return array(
|
||||
|
@ -94,7 +94,7 @@ function aggregator_theme() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_menu().
|
||||
* Implements hook_menu().
|
||||
*/
|
||||
function aggregator_menu() {
|
||||
$items['admin/config/services/aggregator'] = array(
|
||||
|
@ -282,7 +282,7 @@ function _aggregator_category_title($category) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_init().
|
||||
* Implements hook_init().
|
||||
*/
|
||||
function aggregator_init() {
|
||||
drupal_add_css(drupal_get_path('module', 'aggregator') . '/aggregator.css');
|
||||
|
@ -299,7 +299,7 @@ function _aggregator_has_categories() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_permission().
|
||||
* Implements hook_permission().
|
||||
*/
|
||||
function aggregator_permission() {
|
||||
return array(
|
||||
|
@ -313,7 +313,7 @@ function aggregator_permission() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_cron().
|
||||
* Implements hook_cron().
|
||||
*
|
||||
* Queues news feeds for updates once their refresh interval has elapsed.
|
||||
*/
|
||||
|
@ -329,7 +329,7 @@ function aggregator_cron() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_cron_queue_info().
|
||||
* Implements hook_cron_queue_info().
|
||||
*/
|
||||
function aggregator_cron_queue_info() {
|
||||
$queues['aggregator_feeds'] = array(
|
||||
|
@ -340,7 +340,7 @@ function aggregator_cron_queue_info() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_block_info().
|
||||
* Implements hook_block_info().
|
||||
*/
|
||||
function aggregator_block_info() {
|
||||
$block = array();
|
||||
|
@ -356,7 +356,7 @@ function aggregator_block_info() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_block_configure().
|
||||
* Implements hook_block_configure().
|
||||
*/
|
||||
function aggregator_block_configure($delta = '') {
|
||||
list($type, $id) = explode('-', $delta);
|
||||
|
@ -373,7 +373,7 @@ function aggregator_block_configure($delta = '') {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_block_save().
|
||||
* Implements hook_block_save().
|
||||
*/
|
||||
function aggregator_block_save($delta = '', $edit = array()) {
|
||||
list($type, $id) = explode('-', $delta);
|
||||
|
@ -386,7 +386,7 @@ function aggregator_block_save($delta = '', $edit = array()) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_block_view().
|
||||
* Implements hook_block_view().
|
||||
*
|
||||
* Generates blocks for the latest news items in each category and feed.
|
||||
*/
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_aggregator_parse_info().
|
||||
* Implements hook_aggregator_parse_info().
|
||||
*/
|
||||
function aggregator_aggregator_parse_info() {
|
||||
return array(
|
||||
|
@ -17,7 +17,7 @@ function aggregator_aggregator_parse_info() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_aggregator_parse().
|
||||
* Implements hook_aggregator_parse().
|
||||
*/
|
||||
function aggregator_aggregator_parse($feed) {
|
||||
global $channel, $image;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_aggregator_process_info().
|
||||
* Implements hook_aggregator_process_info().
|
||||
*/
|
||||
function aggregator_aggregator_process_info() {
|
||||
return array(
|
||||
|
@ -17,7 +17,7 @@ function aggregator_aggregator_process_info() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_aggregator_process().
|
||||
* Implements hook_aggregator_process().
|
||||
*/
|
||||
function aggregator_aggregator_process($feed) {
|
||||
if (is_object($feed)) {
|
||||
|
@ -45,7 +45,7 @@ function aggregator_aggregator_process($feed) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_aggregator_remove().
|
||||
* Implements hook_aggregator_remove().
|
||||
*/
|
||||
function aggregator_aggregator_remove($feed) {
|
||||
$iids = db_query('SELECT iid FROM {aggregator_item} WHERE fid = :fid', array(':fid' => $feed->fid))->fetchCol();
|
||||
|
@ -62,7 +62,7 @@ function aggregator_aggregator_remove($feed) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_form_aggregator_admin_form_alter().
|
||||
* Implements hook_form_aggregator_admin_form_alter().
|
||||
*
|
||||
* Form alter aggregator module's own form to keep processor functionality
|
||||
* separate from aggregator API functionality.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// $Id$
|
||||
|
||||
/**
|
||||
* Implement hook_menu().
|
||||
* Implements hook_menu().
|
||||
*/
|
||||
function aggregator_test_menu() {
|
||||
$items['aggregator/test-feed'] = array(
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_schema().
|
||||
* Implements hook_schema().
|
||||
*/
|
||||
function block_schema() {
|
||||
$schema['block'] = array(
|
||||
|
@ -204,7 +204,7 @@ function block_schema() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_install().
|
||||
* Implements hook_install().
|
||||
*/
|
||||
function block_install() {
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
define('BLOCK_REGION_NONE', -1);
|
||||
|
||||
/**
|
||||
* Implement hook_help().
|
||||
* Implements hook_help().
|
||||
*/
|
||||
function block_help($path, $arg) {
|
||||
switch ($path) {
|
||||
|
@ -43,7 +43,7 @@ function block_help($path, $arg) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_theme().
|
||||
* Implements hook_theme().
|
||||
*/
|
||||
function block_theme() {
|
||||
return array(
|
||||
|
@ -60,7 +60,7 @@ function block_theme() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_permission().
|
||||
* Implements hook_permission().
|
||||
*/
|
||||
function block_permission() {
|
||||
return array(
|
||||
|
@ -71,7 +71,7 @@ function block_permission() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_menu().
|
||||
* Implements hook_menu().
|
||||
*/
|
||||
function block_menu() {
|
||||
$default_theme = variable_get('theme_default', 'garland');
|
||||
|
@ -166,7 +166,7 @@ function _block_custom_theme($theme = NULL) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_block_info().
|
||||
* Implements hook_block_info().
|
||||
*/
|
||||
function block_block_info() {
|
||||
$blocks = array();
|
||||
|
@ -181,7 +181,7 @@ function block_block_info() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_block_configure().
|
||||
* Implements hook_block_configure().
|
||||
*/
|
||||
function block_block_configure($delta = 0) {
|
||||
$custom_block = array('format' => filter_default_format());
|
||||
|
@ -192,14 +192,14 @@ function block_block_configure($delta = 0) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_block_save().
|
||||
* Implements hook_block_save().
|
||||
*/
|
||||
function block_block_save($delta = 0, $edit = array()) {
|
||||
block_custom_block_save($edit, $delta);
|
||||
}
|
||||
|
||||
/**
|
||||
* Implement hook_block_view().
|
||||
* Implements hook_block_view().
|
||||
*
|
||||
* Generates the administrator-defined blocks for display.
|
||||
*/
|
||||
|
@ -210,7 +210,7 @@ function block_block_view($delta = 0, $edit = array()) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_page_build().
|
||||
* Implements hook_page_build().
|
||||
*
|
||||
* Render blocks into their regions.
|
||||
*/
|
||||
|
@ -461,7 +461,7 @@ function block_custom_block_save($edit, $delta) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_form_FORM_ID_alter().
|
||||
* Implements hook_form_FORM_ID_alter().
|
||||
*/
|
||||
function block_form_user_profile_form_alter(&$form, &$form_state) {
|
||||
if ($form['#user_category'] == 'account') {
|
||||
|
@ -626,7 +626,7 @@ function _block_load_blocks() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_block_info_alter().
|
||||
* Implements hook_block_info_alter().
|
||||
*
|
||||
* Check the page, user role, content type and user specific visibilty settings.
|
||||
* Remove the block if the visibility conditions are not met.
|
||||
|
@ -833,7 +833,7 @@ function _block_get_cache_id($block) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_flush_caches().
|
||||
* Implements hook_flush_caches().
|
||||
*/
|
||||
function block_flush_caches() {
|
||||
return array('cache_block');
|
||||
|
@ -878,7 +878,7 @@ function template_preprocess_block(&$variables) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_user_role_delete().
|
||||
* Implements hook_user_role_delete().
|
||||
*
|
||||
* Remove deleted role from blocks that use it.
|
||||
*/
|
||||
|
@ -889,7 +889,7 @@ function block_user_role_delete($role) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_filter_format_delete().
|
||||
* Implements hook_filter_format_delete().
|
||||
*/
|
||||
function block_filter_format_delete($format, $fallback) {
|
||||
db_update('block_custom')
|
||||
|
@ -899,7 +899,7 @@ function block_filter_format_delete($format, $fallback) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_menu_delete().
|
||||
* Implements hook_menu_delete().
|
||||
*/
|
||||
function block_menu_delete($menu) {
|
||||
db_delete('block')
|
||||
|
@ -913,7 +913,7 @@ function block_menu_delete($menu) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_form_FORM_ID_alter().
|
||||
* Implements hook_form_FORM_ID_alter().
|
||||
*/
|
||||
function block_form_system_performance_settings_alter(&$form, &$form_state) {
|
||||
$disabled = count(module_implements('node_grants'));
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_node_info().
|
||||
* Implements hook_node_info().
|
||||
*/
|
||||
function blog_node_info() {
|
||||
return array(
|
||||
|
@ -20,7 +20,7 @@ function blog_node_info() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_user_view().
|
||||
* Implements hook_user_view().
|
||||
*/
|
||||
function blog_user_view($account) {
|
||||
if (user_access('create blog content', $account)) {
|
||||
|
@ -34,7 +34,7 @@ function blog_user_view($account) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_help().
|
||||
* Implements hook_help().
|
||||
*/
|
||||
function blog_help($path, $arg) {
|
||||
switch ($path) {
|
||||
|
@ -57,14 +57,14 @@ function blog_help($path, $arg) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_form().
|
||||
* Implements hook_form().
|
||||
*/
|
||||
function blog_form($node, $form_state) {
|
||||
return node_content_form($node, $form_state);
|
||||
}
|
||||
|
||||
/**
|
||||
* Implement hook_view().
|
||||
* Implements hook_view().
|
||||
*/
|
||||
function blog_view($node, $build_mode) {
|
||||
if ((bool)menu_get_object()) {
|
||||
|
@ -75,7 +75,7 @@ function blog_view($node, $build_mode) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_node_view().
|
||||
* Implements hook_node_view().
|
||||
*/
|
||||
function blog_node_view($node, $build_mode = 'full') {
|
||||
if ($build_mode != 'rss') {
|
||||
|
@ -95,7 +95,7 @@ function blog_node_view($node, $build_mode = 'full') {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_menu().
|
||||
* Implements hook_menu().
|
||||
*/
|
||||
function blog_menu() {
|
||||
$items['blog'] = array(
|
||||
|
@ -176,7 +176,7 @@ function _blog_post_exists($account) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_block_info().
|
||||
* Implements hook_block_info().
|
||||
*/
|
||||
function blog_block_info() {
|
||||
$block['recent']['info'] = t('Recent blog posts');
|
||||
|
@ -184,7 +184,7 @@ function blog_block_info() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_block_view().
|
||||
* Implements hook_block_view().
|
||||
*
|
||||
* Displays the most recent 10 blog titles.
|
||||
*/
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_install().
|
||||
* Implements hook_install().
|
||||
*/
|
||||
function book_install() {
|
||||
// Add the node type.
|
||||
|
@ -15,7 +15,7 @@ function book_install() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_uninstall().
|
||||
* Implements hook_uninstall().
|
||||
*/
|
||||
function book_uninstall() {
|
||||
// Delete menu links.
|
||||
|
@ -45,7 +45,7 @@ function _book_install_type_create() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_schema().
|
||||
* Implements hook_schema().
|
||||
*/
|
||||
function book_schema() {
|
||||
$schema['book'] = array(
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_help().
|
||||
* Implements hook_help().
|
||||
*/
|
||||
function book_help($path, $arg) {
|
||||
switch ($path) {
|
||||
|
@ -34,7 +34,7 @@ function book_help($path, $arg) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_theme().
|
||||
* Implements hook_theme().
|
||||
*/
|
||||
function book_theme() {
|
||||
return array(
|
||||
|
@ -64,7 +64,7 @@ function book_theme() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_permission().
|
||||
* Implements hook_permission().
|
||||
*/
|
||||
function book_permission() {
|
||||
return array(
|
||||
|
@ -121,7 +121,7 @@ function book_node_view_link($node, $build_mode) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_menu().
|
||||
* Implements hook_menu().
|
||||
*/
|
||||
function book_menu() {
|
||||
$items['admin/content/book'] = array(
|
||||
|
@ -213,14 +213,14 @@ function _book_outline_remove_access($node) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_init().
|
||||
* Implements hook_init().
|
||||
*/
|
||||
function book_init() {
|
||||
drupal_add_css(drupal_get_path('module', 'book') . '/book.css');
|
||||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_build_modes().
|
||||
* Implements hook_field_build_modes().
|
||||
*/
|
||||
function book_field_build_modes($obj_type) {
|
||||
$modes = array();
|
||||
|
@ -233,7 +233,7 @@ function book_field_build_modes($obj_type) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_block_info().
|
||||
* Implements hook_block_info().
|
||||
*/
|
||||
function book_block_info() {
|
||||
$block = array();
|
||||
|
@ -244,7 +244,7 @@ function book_block_info() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_block_view().
|
||||
* Implements hook_block_view().
|
||||
*
|
||||
* Displays the book table of contents in a block when the current page is a
|
||||
* single-node view of a book node.
|
||||
|
@ -298,7 +298,7 @@ function book_block_view($delta = '') {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_block_configure().
|
||||
* Implements hook_block_configure().
|
||||
*/
|
||||
function book_block_configure($delta = '') {
|
||||
$block = array();
|
||||
|
@ -318,7 +318,7 @@ function book_block_configure($delta = '') {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_block_save().
|
||||
* Implements hook_block_save().
|
||||
*/
|
||||
function book_block_save($delta = '', $edit = array()) {
|
||||
$block = array();
|
||||
|
@ -377,7 +377,7 @@ function book_get_books() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_form_alter().
|
||||
* Implements hook_form_alter().
|
||||
*
|
||||
* Adds the book fieldset to the node form.
|
||||
*
|
||||
|
@ -744,7 +744,7 @@ function book_menu_name($bid) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_node_load().
|
||||
* Implements hook_node_load().
|
||||
*/
|
||||
function book_node_load($nodes, $types) {
|
||||
$result = db_query("SELECT * FROM {book} b INNER JOIN {menu_links} ml ON b.mlid = ml.mlid WHERE b.nid IN (:nids)", array(':nids' => array_keys($nodes)), array('fetch' => PDO::FETCH_ASSOC));
|
||||
|
@ -757,7 +757,7 @@ function book_node_load($nodes, $types) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_node_view().
|
||||
* Implements hook_node_view().
|
||||
*/
|
||||
function book_node_view($node, $build_mode) {
|
||||
if ($build_mode == 'full') {
|
||||
|
@ -775,7 +775,7 @@ function book_node_view($node, $build_mode) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_page_alter().
|
||||
* Implements hook_page_alter().
|
||||
*
|
||||
* Add the book menu to the list of menus used to build the active trail when
|
||||
* viewing a book page.
|
||||
|
@ -789,7 +789,7 @@ function book_page_alter(&$page) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_node_presave().
|
||||
* Implements hook_node_presave().
|
||||
*/
|
||||
function book_node_presave($node) {
|
||||
// Always save a revision for non-administrators.
|
||||
|
@ -807,7 +807,7 @@ function book_node_presave($node) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_node_insert().
|
||||
* Implements hook_node_insert().
|
||||
*/
|
||||
function book_node_insert($node) {
|
||||
if (!empty($node->book['bid'])) {
|
||||
|
@ -822,7 +822,7 @@ function book_node_insert($node) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_node_update().
|
||||
* Implements hook_node_update().
|
||||
*/
|
||||
function book_node_update($node) {
|
||||
if (!empty($node->book['bid'])) {
|
||||
|
@ -837,7 +837,7 @@ function book_node_update($node) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_node_delete().
|
||||
* Implements hook_node_delete().
|
||||
*/
|
||||
function book_node_delete($node) {
|
||||
if (!empty($node->book['bid'])) {
|
||||
|
@ -860,7 +860,7 @@ function book_node_delete($node) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_node_prepare().
|
||||
* Implements hook_node_prepare().
|
||||
*/
|
||||
function book_node_prepare($node) {
|
||||
// Prepare defaults for the add/edit form.
|
||||
|
@ -1141,7 +1141,7 @@ function book_type_is_allowed($type) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_node_type_update().
|
||||
* Implements hook_node_type_update().
|
||||
*
|
||||
* Update book module's persistent variables if the machine-readable name of a
|
||||
* node type is changed.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// $Id$
|
||||
|
||||
/**
|
||||
* Implement hook_help().
|
||||
* Implements hook_help().
|
||||
*/
|
||||
function color_help($path, $arg) {
|
||||
switch ($path) {
|
||||
|
@ -20,7 +20,7 @@ function color_help($path, $arg) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_theme().
|
||||
* Implements hook_theme().
|
||||
*/
|
||||
function color_theme() {
|
||||
return array(
|
||||
|
@ -31,7 +31,7 @@ function color_theme() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_form_FORM_ID_alter().
|
||||
* Implements hook_form_FORM_ID_alter().
|
||||
*/
|
||||
function color_form_system_theme_settings_alter(&$form, &$form_state) {
|
||||
if (isset($form_state['build_info']['args'][0]) && ($theme = $form_state['build_info']['args'][0]) && color_get_info($theme) && function_exists('gd_info')) {
|
||||
|
@ -48,7 +48,7 @@ function color_form_system_theme_settings_alter(&$form, &$form_state) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_form_FORM_ID_alter().
|
||||
* Implements hook_form_FORM_ID_alter().
|
||||
*/
|
||||
function color_form_system_themes_alter(&$form, &$form_state) {
|
||||
_color_theme_select_form_alter($form, $form_state);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_uninstall().
|
||||
* Implements hook_uninstall().
|
||||
*/
|
||||
function comment_uninstall() {
|
||||
// Remove variables.
|
||||
|
@ -27,7 +27,7 @@ function comment_uninstall() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_enable().
|
||||
* Implements hook_enable().
|
||||
*/
|
||||
function comment_enable() {
|
||||
// Insert records into the node_comment_statistics for nodes that are missing.
|
||||
|
@ -220,7 +220,7 @@ function comment_update_7011() {
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_schema().
|
||||
* Implements hook_schema().
|
||||
*/
|
||||
function comment_schema() {
|
||||
$schema['comment'] = array(
|
||||
|
|
|
@ -71,7 +71,7 @@ define('COMMENT_NODE_CLOSED', 1);
|
|||
define('COMMENT_NODE_OPEN', 2);
|
||||
|
||||
/**
|
||||
* Implement hook_help().
|
||||
* Implements hook_help().
|
||||
*/
|
||||
function comment_help($path, $arg) {
|
||||
switch ($path) {
|
||||
|
@ -90,7 +90,7 @@ function comment_help($path, $arg) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_entity_info().
|
||||
* Implements hook_entity_info().
|
||||
*/
|
||||
function comment_entity_info() {
|
||||
$return = array(
|
||||
|
@ -121,7 +121,7 @@ function comment_entity_info() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_theme().
|
||||
* Implements hook_theme().
|
||||
*/
|
||||
function comment_theme() {
|
||||
return array(
|
||||
|
@ -146,7 +146,7 @@ function comment_theme() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_menu().
|
||||
* Implements hook_menu().
|
||||
*/
|
||||
function comment_menu() {
|
||||
$items['admin/content/comment'] = array(
|
||||
|
@ -236,14 +236,14 @@ function comment_count_unpublished() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_node_type_insert().
|
||||
* Implements hook_node_type_insert().
|
||||
*/
|
||||
function comment_node_type_insert($info) {
|
||||
field_attach_create_bundle('comment', 'comment_node_' . $info->type);
|
||||
}
|
||||
|
||||
/**
|
||||
* Implement hook_node_type_update().
|
||||
* Implements hook_node_type_update().
|
||||
*/
|
||||
function comment_node_type_update($info) {
|
||||
if (!empty($info->old_type) && $info->type != $info->old_type) {
|
||||
|
@ -252,7 +252,7 @@ function comment_node_type_update($info) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_node_type_delete().
|
||||
* Implements hook_node_type_delete().
|
||||
*/
|
||||
function comment_node_type_delete($info) {
|
||||
field_attach_delete_bundle('comment', 'comment_node_' . $info->type);
|
||||
|
@ -271,7 +271,7 @@ function comment_node_type_delete($info) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_permission().
|
||||
* Implements hook_permission().
|
||||
*/
|
||||
function comment_permission() {
|
||||
return array(
|
||||
|
@ -291,7 +291,7 @@ function comment_permission() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_block_info().
|
||||
* Implements hook_block_info().
|
||||
*/
|
||||
function comment_block_info() {
|
||||
$blocks['recent']['info'] = t('Recent comments');
|
||||
|
@ -300,7 +300,7 @@ function comment_block_info() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_block_configure().
|
||||
* Implements hook_block_configure().
|
||||
*/
|
||||
function comment_block_configure($delta = '') {
|
||||
$form['comment_block_count'] = array(
|
||||
|
@ -314,14 +314,14 @@ function comment_block_configure($delta = '') {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_block_save().
|
||||
* Implements hook_block_save().
|
||||
*/
|
||||
function comment_block_save($delta = '', $edit = array()) {
|
||||
variable_set('comment_block_count', (int)$edit['comment_block_count']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Implement hook_block_view().
|
||||
* Implements hook_block_view().
|
||||
*
|
||||
* Generates a block with the most recent comments.
|
||||
*/
|
||||
|
@ -466,7 +466,7 @@ function theme_comment_block() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_node_view().
|
||||
* Implements hook_node_view().
|
||||
*/
|
||||
function comment_node_view($node, $build_mode) {
|
||||
$links = array();
|
||||
|
@ -940,7 +940,7 @@ function comment_build_multiple($comments, $node, $build_mode = 'full', $weight
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_form_FORM_ID_alter().
|
||||
* Implements hook_form_FORM_ID_alter().
|
||||
*/
|
||||
function comment_form_node_type_form_alter(&$form, $form_state) {
|
||||
if (isset($form['identity']['type'])) {
|
||||
|
@ -1011,7 +1011,7 @@ function comment_form_node_type_form_alter(&$form, $form_state) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_form_alter().
|
||||
* Implements hook_form_alter().
|
||||
*/
|
||||
function comment_form_alter(&$form, $form_state, $form_id) {
|
||||
if (!empty($form['#node_edit_form'])) {
|
||||
|
@ -1078,7 +1078,7 @@ function comment_form_alter(&$form, $form_state, $form_id) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_node_load().
|
||||
* Implements hook_node_load().
|
||||
*/
|
||||
function comment_node_load($nodes, $types) {
|
||||
$comments_enabled = array();
|
||||
|
@ -1111,7 +1111,7 @@ function comment_node_load($nodes, $types) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_node_prepare().
|
||||
* Implements hook_node_prepare().
|
||||
*/
|
||||
function comment_node_prepare($node) {
|
||||
if (!isset($node->comment)) {
|
||||
|
@ -1120,7 +1120,7 @@ function comment_node_prepare($node) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_node_insert().
|
||||
* Implements hook_node_insert().
|
||||
*/
|
||||
function comment_node_insert($node) {
|
||||
db_insert('node_comment_statistics')
|
||||
|
@ -1136,7 +1136,7 @@ function comment_node_insert($node) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_node_delete().
|
||||
* Implements hook_node_delete().
|
||||
*/
|
||||
function comment_node_delete($node) {
|
||||
$cids = db_query('SELECT cid FROM {comment} WHERE nid = :nid', array(':nid' => $node->nid))->fetchCol();
|
||||
|
@ -1147,7 +1147,7 @@ function comment_node_delete($node) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_node_update_index().
|
||||
* Implements hook_node_update_index().
|
||||
*/
|
||||
function comment_node_update_index($node) {
|
||||
$text = '';
|
||||
|
@ -1164,7 +1164,7 @@ function comment_node_update_index($node) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_update_index().
|
||||
* Implements hook_update_index().
|
||||
*/
|
||||
function comment_update_index() {
|
||||
// Store the maximum possible comments per thread (used for ranking by reply count)
|
||||
|
@ -1172,7 +1172,7 @@ function comment_update_index() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_node_search_result().
|
||||
* Implements hook_node_search_result().
|
||||
*/
|
||||
function comment_node_search_result($node) {
|
||||
if ($node->comment != COMMENT_NODE_HIDDEN) {
|
||||
|
@ -1183,7 +1183,7 @@ function comment_node_search_result($node) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_user_cancel().
|
||||
* Implements hook_user_cancel().
|
||||
*/
|
||||
function comment_user_cancel($edit, $account, $method) {
|
||||
switch ($method) {
|
||||
|
@ -2270,7 +2270,7 @@ function vancode2int($c = '00') {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_action_info().
|
||||
* Implements hook_action_info().
|
||||
*
|
||||
* @ingroup actions
|
||||
*/
|
||||
|
@ -2416,7 +2416,7 @@ function comment_save_action($comment) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_ranking().
|
||||
* Implements hook_ranking().
|
||||
*/
|
||||
function comment_ranking() {
|
||||
return array(
|
||||
|
@ -2436,7 +2436,7 @@ function comment_ranking() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_menu_alter().
|
||||
* Implements hook_menu_alter().
|
||||
*/
|
||||
function comment_menu_alter(&$items) {
|
||||
// Add comments to the description for admin/content.
|
||||
|
@ -2444,7 +2444,7 @@ function comment_menu_alter(&$items) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_filter_format_delete().
|
||||
* Implements hook_filter_format_delete().
|
||||
*/
|
||||
function comment_filter_format_delete($format, $fallback) {
|
||||
db_update('comment')
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_token_info().
|
||||
* Implements hook_token_info().
|
||||
*/
|
||||
function comment_token_info() {
|
||||
$type = array(
|
||||
|
@ -108,7 +108,7 @@ function comment_token_info() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_tokens().
|
||||
* Implements hook_tokens().
|
||||
*/
|
||||
function comment_tokens($type, $tokens, array $data = array(), array $options = array()) {
|
||||
$url_options = array('absolute' => TRUE);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_schema().
|
||||
* Implements hook_schema().
|
||||
*/
|
||||
function contact_schema() {
|
||||
$schema['contact'] = array(
|
||||
|
@ -67,7 +67,7 @@ function contact_schema() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_install().
|
||||
* Implements hook_install().
|
||||
*/
|
||||
function contact_install() {
|
||||
// Insert a default contact category.
|
||||
|
@ -82,7 +82,7 @@ function contact_install() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_uninstall().
|
||||
* Implements hook_uninstall().
|
||||
*/
|
||||
function contact_uninstall() {
|
||||
variable_del('contact_default_status');
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_help().
|
||||
* Implements hook_help().
|
||||
*/
|
||||
function contact_help($path, $arg) {
|
||||
switch ($path) {
|
||||
|
@ -38,7 +38,7 @@ function contact_help($path, $arg) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_permission().
|
||||
* Implements hook_permission().
|
||||
*/
|
||||
function contact_permission() {
|
||||
return array(
|
||||
|
@ -55,7 +55,7 @@ function contact_permission() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_menu().
|
||||
* Implements hook_menu().
|
||||
*/
|
||||
function contact_menu() {
|
||||
$items['admin/structure/contact'] = array(
|
||||
|
@ -160,14 +160,14 @@ function contact_load($cid) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_user_insert().
|
||||
* Implements hook_user_insert().
|
||||
*/
|
||||
function contact_user_insert(&$edit, $account, $category) {
|
||||
$edit['contact'] = variable_get('contact_default_status', 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Implement hook_mail().
|
||||
* Implements hook_mail().
|
||||
*/
|
||||
function contact_mail($key, &$message, $params) {
|
||||
$language = $message['language'];
|
||||
|
@ -210,7 +210,7 @@ function contact_mail($key, &$message, $params) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_form_FORM_ID_alter().
|
||||
* Implements hook_form_FORM_ID_alter().
|
||||
*
|
||||
* Add the enable personal contact form to an individual user's account page.
|
||||
*/
|
||||
|
|
|
@ -22,7 +22,7 @@ function dashboard_help($path, $arg) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_menu().
|
||||
* Implements hook_menu().
|
||||
*/
|
||||
function dashboard_menu() {
|
||||
$items['admin/dashboard'] = array(
|
||||
|
@ -60,7 +60,7 @@ function dashboard_menu() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_block_info_alter().
|
||||
* Implements hook_block_info_alter().
|
||||
*
|
||||
* Skip rendering dashboard blocks when not on the dashboard page itself. This
|
||||
* prevents expensive dashboard blocks from causing performance issues on pages
|
||||
|
@ -77,7 +77,7 @@ function dashboard_block_info_alter(&$blocks) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_page_build().
|
||||
* Implements hook_page_build().
|
||||
*
|
||||
* Display dashboard blocks in the main content region.
|
||||
*/
|
||||
|
@ -141,7 +141,7 @@ function dashboard_page_build(&$page) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_permission().
|
||||
* Implements hook_permission().
|
||||
*/
|
||||
function dashboard_permission() {
|
||||
return array(
|
||||
|
@ -153,7 +153,7 @@ function dashboard_permission() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_system_info_alter().
|
||||
* Implements hook_system_info_alter().
|
||||
*
|
||||
* Add regions to each theme to store the dashboard blocks.
|
||||
*/
|
||||
|
@ -167,7 +167,7 @@ function dashboard_system_info_alter(&$info, $file, $type) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_theme().
|
||||
* Implements hook_theme().
|
||||
*/
|
||||
function dashboard_theme() {
|
||||
return array(
|
||||
|
@ -257,7 +257,7 @@ function dashboard_regions() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_dashboard_regions().
|
||||
* Implements hook_dashboard_regions().
|
||||
*/
|
||||
function dashboard_dashboard_regions() {
|
||||
return array(
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_schema().
|
||||
* Implements hook_schema().
|
||||
*/
|
||||
function dblog_schema() {
|
||||
$schema['watchdog'] = array(
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_help().
|
||||
* Implements hook_help().
|
||||
*/
|
||||
function dblog_help($path, $arg) {
|
||||
switch ($path) {
|
||||
|
@ -28,7 +28,7 @@ function dblog_help($path, $arg) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_theme().
|
||||
* Implements hook_theme().
|
||||
*/
|
||||
function dblog_theme() {
|
||||
return array(
|
||||
|
@ -39,7 +39,7 @@ function dblog_theme() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_menu().
|
||||
* Implements hook_menu().
|
||||
*/
|
||||
function dblog_menu() {
|
||||
$items['admin/reports/dblog'] = array(
|
||||
|
@ -87,7 +87,7 @@ function dblog_init() {
|
|||
|
||||
|
||||
/**
|
||||
* Implement hook_cron().
|
||||
* Implements hook_cron().
|
||||
*
|
||||
* Remove expired log messages and flood control events.
|
||||
*/
|
||||
|
@ -102,7 +102,7 @@ function dblog_cron() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_user_cancel().
|
||||
* Implements hook_user_cancel().
|
||||
*/
|
||||
function dblog_user_cancel($edit, $account, $method) {
|
||||
switch ($method) {
|
||||
|
@ -133,7 +133,7 @@ function _dblog_get_message_types() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_watchdog().
|
||||
* Implements hook_watchdog().
|
||||
*
|
||||
* Note some values may be truncated for database column size restrictions.
|
||||
*/
|
||||
|
@ -155,7 +155,7 @@ function dblog_watchdog(array $log_entry) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_form_FORM_ID_alter().
|
||||
* Implements hook_form_FORM_ID_alter().
|
||||
*/
|
||||
function dblog_form_system_logging_settings_alter(&$form, $form_state) {
|
||||
$form['dblog_row_limit'] = array(
|
||||
|
|
|
@ -1264,7 +1264,7 @@ function field_attach_extra_weight($bundle, $pseudo_field) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_node_prepare_translation.
|
||||
* Implements hook_node_prepare_translation().
|
||||
*
|
||||
* TODO D7: We do not yet know if this really belongs in Field API.
|
||||
*/
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_schema.
|
||||
* Implements hook_schema().
|
||||
*/
|
||||
function field_schema() {
|
||||
// Static (meta) tables.
|
||||
|
|
|
@ -129,14 +129,14 @@ class FieldException extends Exception {}
|
|||
class FieldUpdateForbiddenException extends FieldException {}
|
||||
|
||||
/**
|
||||
* Implement hook_flush_caches.
|
||||
* Implements hook_flush_caches().
|
||||
*/
|
||||
function field_flush_caches() {
|
||||
return array('cache_field');
|
||||
}
|
||||
|
||||
/**
|
||||
* Implement hook_help().
|
||||
* Implements hook_help().
|
||||
*/
|
||||
function field_help($path, $arg) {
|
||||
switch ($path) {
|
||||
|
@ -167,7 +167,7 @@ function field_help($path, $arg) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_theme().
|
||||
* Implements hook_theme().
|
||||
*/
|
||||
function field_theme() {
|
||||
$path = drupal_get_path('module', 'field') . '/theme';
|
||||
|
@ -194,7 +194,7 @@ function field_theme() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_cron().
|
||||
* Implements hook_cron().
|
||||
*
|
||||
* Purges some deleted Field API data, if any exists.
|
||||
*/
|
||||
|
@ -204,14 +204,14 @@ function field_cron() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_modules_installed().
|
||||
* Implements hook_modules_installed().
|
||||
*/
|
||||
function field_modules_installed($modules) {
|
||||
field_cache_clear();
|
||||
}
|
||||
|
||||
/**
|
||||
* Implement hook_modules_uninstalled().
|
||||
* Implements hook_modules_uninstalled().
|
||||
*/
|
||||
function field_modules_uninstalled($modules) {
|
||||
module_load_include('inc', 'field', 'field.crud');
|
||||
|
@ -222,7 +222,7 @@ function field_modules_uninstalled($modules) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_modules_enabled().
|
||||
* Implements hook_modules_enabled().
|
||||
*/
|
||||
function field_modules_enabled($modules) {
|
||||
foreach ($modules as $module) {
|
||||
|
@ -232,7 +232,7 @@ function field_modules_enabled($modules) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_modules_disabled().
|
||||
* Implements hook_modules_disabled().
|
||||
*/
|
||||
function field_modules_disabled($modules) {
|
||||
foreach ($modules as $module) {
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_multilingual_settings_changed().
|
||||
* Implements hook_multilingual_settings_changed().
|
||||
*/
|
||||
function field_multilingual_settings_changed() {
|
||||
field_info_cache_clear();
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_schema().
|
||||
* Implements hook_schema().
|
||||
*/
|
||||
function field_sql_storage_schema() {
|
||||
$schema = array();
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_help().
|
||||
* Implements hook_help().
|
||||
*/
|
||||
function field_sql_storage_help($path, $arg) {
|
||||
switch ($path) {
|
||||
|
@ -18,7 +18,7 @@ function field_sql_storage_help($path, $arg) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_storage_info().
|
||||
* Implements hook_field_storage_info().
|
||||
*/
|
||||
function field_sql_storage_field_storage_info() {
|
||||
return array(
|
||||
|
@ -206,7 +206,7 @@ function _field_sql_storage_schema($field) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_storage_create_field().
|
||||
* Implements hook_field_storage_create_field().
|
||||
*/
|
||||
function field_sql_storage_field_storage_create_field($field) {
|
||||
$schema = _field_sql_storage_schema($field);
|
||||
|
@ -217,7 +217,7 @@ function field_sql_storage_field_storage_create_field($field) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_update_field_forbid().
|
||||
* Implements hook_field_update_field_forbid().
|
||||
*
|
||||
* Forbid any field update that changes column definitions if there is
|
||||
* any data.
|
||||
|
@ -229,7 +229,7 @@ function field_sql_storage_field_update_forbid($field, $prior_field, $has_data)
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_storage_update_field().
|
||||
* Implements hook_field_storage_update_field().
|
||||
*/
|
||||
function field_sql_storage_field_storage_update_field($field, $prior_field, $has_data) {
|
||||
if (! $has_data) {
|
||||
|
@ -274,7 +274,7 @@ function field_sql_storage_field_storage_update_field($field, $prior_field, $has
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_storage_delete_field().
|
||||
* Implements hook_field_storage_delete_field().
|
||||
*/
|
||||
function field_sql_storage_field_storage_delete_field($field) {
|
||||
// Mark all data associated with the field for deletion.
|
||||
|
@ -295,7 +295,7 @@ function field_sql_storage_field_storage_delete_field($field) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_storage_load().
|
||||
* Implements hook_field_storage_load().
|
||||
*/
|
||||
function field_sql_storage_field_storage_load($obj_type, $objects, $age, $fields, $options) {
|
||||
$etid = _field_sql_storage_etid($obj_type);
|
||||
|
@ -343,7 +343,7 @@ function field_sql_storage_field_storage_load($obj_type, $objects, $age, $fields
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_storage_write().
|
||||
* Implements hook_field_storage_write().
|
||||
*/
|
||||
function field_sql_storage_field_storage_write($obj_type, $object, $op, $fields) {
|
||||
list($id, $vid, $bundle) = entity_extract_ids($obj_type, $object);
|
||||
|
@ -430,7 +430,7 @@ function field_sql_storage_field_storage_write($obj_type, $object, $op, $fields)
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_storage_delete().
|
||||
* Implements hook_field_storage_delete().
|
||||
*
|
||||
* This function deletes data for all fields for an object from the database.
|
||||
*/
|
||||
|
@ -447,7 +447,7 @@ function field_sql_storage_field_storage_delete($obj_type, $object, $fields) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_storage_purge().
|
||||
* Implements hook_field_storage_purge().
|
||||
*
|
||||
* This function deletes data from the database for a single field on
|
||||
* an object.
|
||||
|
@ -469,7 +469,7 @@ function field_sql_storage_field_storage_purge($obj_type, $object, $field, $inst
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_storage_query().
|
||||
* Implements hook_field_storage_query().
|
||||
*/
|
||||
function field_sql_storage_field_storage_query($field_id, $conditions, $options) {
|
||||
$load_current = $options['age'] == FIELD_LOAD_CURRENT;
|
||||
|
@ -591,7 +591,7 @@ function field_sql_storage_field_storage_query($field_id, $conditions, $options)
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_storage_delete_revision().
|
||||
* Implements hook_field_storage_delete_revision().
|
||||
*
|
||||
* This function actually deletes the data from the database.
|
||||
*/
|
||||
|
@ -613,7 +613,7 @@ function field_sql_storage_field_storage_delete_revision($obj_type, $object, $fi
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_storage_delete_instance().
|
||||
* Implements hook_field_storage_delete_instance().
|
||||
*
|
||||
* This function simply marks for deletion all data associated with the field.
|
||||
*/
|
||||
|
@ -635,7 +635,7 @@ function field_sql_storage_field_storage_delete_instance($instance) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_attach_rename_bundle().
|
||||
* Implements hook_field_attach_rename_bundle().
|
||||
*/
|
||||
function field_sql_storage_field_attach_rename_bundle($obj_type, $bundle_old, $bundle_new) {
|
||||
$etid = _field_sql_storage_etid($obj_type);
|
||||
|
@ -661,7 +661,7 @@ function field_sql_storage_field_attach_rename_bundle($obj_type, $bundle_old, $b
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_storage_purge_field().
|
||||
* Implements hook_field_storage_purge_field().
|
||||
*
|
||||
* All field data items and instances have already been purged, so all
|
||||
* that is left is to delete the table.
|
||||
|
@ -674,7 +674,7 @@ function field_sql_storage_field_storage_purge_field($field) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_storage_details().
|
||||
* Implements hook_field_storage_details().
|
||||
*/
|
||||
function field_sql_storage_field_storage_details($field, $instance) {
|
||||
$details = array();
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_field_info().
|
||||
* Implements hook_field_info().
|
||||
*/
|
||||
function list_field_info() {
|
||||
return array(
|
||||
|
@ -43,7 +43,7 @@ function list_field_info() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_schema().
|
||||
* Implements hook_field_schema().
|
||||
*/
|
||||
function list_field_schema($field) {
|
||||
switch ($field['type']) {
|
||||
|
@ -84,7 +84,7 @@ function list_field_schema($field) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_settings_form().
|
||||
* Implements hook_field_settings_form().
|
||||
*
|
||||
* @todo: If $has_data, add a form validate function to verify that the
|
||||
* new allowed values do not exclude any keys for which data already
|
||||
|
@ -131,7 +131,7 @@ function list_field_settings_form($field, $instance, $has_data) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_create_field().
|
||||
* Implements hook_field_create_field().
|
||||
*/
|
||||
function list_field_create_field($field) {
|
||||
if (array_key_exists($field['type'], list_field_info())) {
|
||||
|
@ -142,7 +142,7 @@ function list_field_create_field($field) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_update_field().
|
||||
* Implements hook_field_update_field().
|
||||
*/
|
||||
function list_field_update_field($field, $prior_field, $has_data) {
|
||||
if (array_key_exists($field['type'], list_field_info())) {
|
||||
|
@ -252,7 +252,7 @@ function list_allowed_values_validate($element, &$form_state) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_validate().
|
||||
* Implements hook_field_validate().
|
||||
*
|
||||
* Possible error codes:
|
||||
* - 'list_illegal_value': The value is not part of the list of allowed values.
|
||||
|
@ -272,7 +272,7 @@ function list_field_validate($obj_type, $object, $field, $instance, $langcode, $
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_is_empty().
|
||||
* Implements hook_field_is_empty().
|
||||
*/
|
||||
function list_field_is_empty($item, $field) {
|
||||
if (empty($item['value']) && (string)$item['value'] !== '0') {
|
||||
|
@ -282,7 +282,7 @@ function list_field_is_empty($item, $field) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_formatter_info().
|
||||
* Implements hook_field_formatter_info().
|
||||
*/
|
||||
function list_field_formatter_info() {
|
||||
return array(
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_theme_alter().
|
||||
* Implements hook_theme_alter().
|
||||
*/
|
||||
function number_theme_registry_alter(&$theme_registry) {
|
||||
// The number_integer and number_decimal formatters use the same function.
|
||||
|
@ -16,7 +16,7 @@ function number_theme_registry_alter(&$theme_registry) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_info().
|
||||
* Implements hook_field_info().
|
||||
*/
|
||||
function number_field_info() {
|
||||
return array(
|
||||
|
@ -47,7 +47,7 @@ function number_field_info() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_schema().
|
||||
* Implements hook_field_schema().
|
||||
*/
|
||||
function number_field_schema($field) {
|
||||
switch ($field['type']) {
|
||||
|
@ -86,7 +86,7 @@ function number_field_schema($field) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_settings_form().
|
||||
* Implements hook_field_settings_form().
|
||||
*/
|
||||
function number_field_settings_form($field, $instance, $has_data) {
|
||||
$settings = $field['settings'];
|
||||
|
@ -128,7 +128,7 @@ function number_field_settings_form($field, $instance, $has_data) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_instance_settings_form().
|
||||
* Implements hook_field_instance_settings_form().
|
||||
*/
|
||||
function number_field_instance_settings_form($field, $instance) {
|
||||
$settings = $instance['settings'];
|
||||
|
@ -166,7 +166,7 @@ function number_field_instance_settings_form($field, $instance) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_validate().
|
||||
* Implements hook_field_validate().
|
||||
*
|
||||
* Possible error codes:
|
||||
* - 'number_min': The value is smaller than the allowed minimum value.
|
||||
|
@ -207,7 +207,7 @@ function number_field_presave($obj_type, $object, $field, $instance, $langcode,
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_content_is_empty().
|
||||
* Implements hook_content_is_empty().
|
||||
*/
|
||||
function number_field_is_empty($item, $field) {
|
||||
if (empty($item['value']) && (string)$item['value'] !== '0') {
|
||||
|
@ -217,7 +217,7 @@ function number_field_is_empty($item, $field) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_formatter_info().
|
||||
* Implements hook_field_formatter_info().
|
||||
*/
|
||||
function number_field_formatter_info() {
|
||||
return array(
|
||||
|
@ -285,7 +285,7 @@ function theme_field_formatter_number($variables) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_widget_info().
|
||||
* Implements hook_field_widget_info().
|
||||
*/
|
||||
function number_field_widget_info() {
|
||||
return array(
|
||||
|
@ -297,7 +297,7 @@ function number_field_widget_info() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_widget().
|
||||
* Implements hook_field_widget().
|
||||
*/
|
||||
function number_field_widget(&$form, &$form_state, $field, $instance, $langcode, $items, $delta, $element) {
|
||||
$value = isset($items[$delta]['value']) ? $items[$delta]['value'] : '';
|
||||
|
@ -370,7 +370,7 @@ function number_field_widget_validate($element, &$form_state) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_widget_error().
|
||||
* Implements hook_field_widget_error().
|
||||
*/
|
||||
function number_field_widget_error($element, $error) {
|
||||
form_error($element['value'], $error['message']);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_theme().
|
||||
* Implements hook_theme().
|
||||
*/
|
||||
function options_theme() {
|
||||
return array(
|
||||
|
@ -18,7 +18,7 @@ function options_theme() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_widget_info().
|
||||
* Implements hook_field_widget_info().
|
||||
*/
|
||||
function options_field_widget_info() {
|
||||
return array(
|
||||
|
@ -47,7 +47,7 @@ function options_field_widget_info() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_widget().
|
||||
* Implements hook_field_widget().
|
||||
*/
|
||||
function options_field_widget(&$form, &$form_state, $field, $instance, $langcode, $items, $delta, $element) {
|
||||
// Abstract over the actual field columns, to allow different field types to
|
||||
|
@ -250,7 +250,7 @@ function options_array_transpose($array) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_widget_error().
|
||||
* Implements hook_field_widget_error().
|
||||
*/
|
||||
function options_field_widget_error($element, $error) {
|
||||
form_error($element, $error['message']);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_field_info().
|
||||
* Implements hook_field_info().
|
||||
*
|
||||
* Field settings:
|
||||
* - max_length: the maximum length for a varchar field.
|
||||
|
@ -47,7 +47,7 @@ function text_field_info() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_schema().
|
||||
* Implements hook_field_schema().
|
||||
*/
|
||||
function text_field_schema($field) {
|
||||
switch ($field['type']) {
|
||||
|
@ -100,7 +100,7 @@ function text_field_schema($field) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_settings_form().
|
||||
* Implements hook_field_settings_form().
|
||||
*/
|
||||
function text_field_settings_form($field, $instance, $has_data) {
|
||||
$settings = $field['settings'];
|
||||
|
@ -121,7 +121,7 @@ function text_field_settings_form($field, $instance, $has_data) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_instance_settings_form().
|
||||
* Implements hook_field_instance_settings_form().
|
||||
*/
|
||||
function text_field_instance_settings_form($field, $instance) {
|
||||
$settings = $instance['settings'];
|
||||
|
@ -148,7 +148,7 @@ function text_field_instance_settings_form($field, $instance) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_validate().
|
||||
* Implements hook_field_validate().
|
||||
*
|
||||
* Possible error codes:
|
||||
* - 'text_value_max_length': The value exceeds the maximum length.
|
||||
|
@ -181,7 +181,7 @@ function text_field_validate($obj_type, $object, $field, $instance, $langcode, $
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_load().
|
||||
* Implements hook_field_load().
|
||||
*
|
||||
* Where possible, generate the sanitized version of each field early so that
|
||||
* it is cached in the field cache. This avoids looking up from the filter cache
|
||||
|
@ -213,7 +213,7 @@ function text_field_load($obj_type, $objects, $field, $instances, $langcode, &$i
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_sanitize().
|
||||
* Implements hook_field_sanitize().
|
||||
*
|
||||
* @see text_field_load()
|
||||
*/
|
||||
|
@ -241,7 +241,7 @@ function text_field_sanitize($obj_type, $object, $field, $instance, $langcode, &
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_is_empty().
|
||||
* Implements hook_field_is_empty().
|
||||
*/
|
||||
function text_field_is_empty($item, $field) {
|
||||
if (empty($item['value']) && (string)$item['value'] !== '0') {
|
||||
|
@ -251,7 +251,7 @@ function text_field_is_empty($item, $field) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_formatter_info().
|
||||
* Implements hook_field_formatter_info().
|
||||
*/
|
||||
function text_field_formatter_info() {
|
||||
return array(
|
||||
|
@ -457,7 +457,7 @@ function text_summary($text, $format = NULL, $size = NULL) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_widget_info().
|
||||
* Implements hook_field_widget_info().
|
||||
*/
|
||||
function text_field_widget_info() {
|
||||
return array(
|
||||
|
@ -480,7 +480,7 @@ function text_field_widget_info() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_widget_settings_form().
|
||||
* Implements hook_field_widget_settings_form().
|
||||
*/
|
||||
function text_field_widget_settings_form($field, $instance) {
|
||||
$widget = $instance['widget'];
|
||||
|
@ -509,7 +509,7 @@ function text_field_widget_settings_form($field, $instance) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_widget().
|
||||
* Implements hook_field_widget().
|
||||
*/
|
||||
function text_field_widget(&$form, &$form_state, $field, $instance, $langcode, $items, $delta, $base) {
|
||||
$element = $base;
|
||||
|
@ -565,7 +565,7 @@ function text_field_widget(&$form, &$form_state, $field, $instance, $langcode, $
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_widget_error().
|
||||
* Implements hook_field_widget_error().
|
||||
*/
|
||||
function text_field_widget_error($element, $error) {
|
||||
switch ($error['error']) {
|
||||
|
|
|
@ -236,7 +236,7 @@ function field_test_field_formatter_info() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_formatter_prepare_view().
|
||||
* Implements hook_field_formatter_prepare_view().
|
||||
*/
|
||||
function field_test_field_formatter_prepare_view($obj_type, $objects, $field, $instances, $langcode, &$items, $build_mode) {
|
||||
foreach ($items as $id => $item) {
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_install().
|
||||
* Implements hook_install().
|
||||
*/
|
||||
function field_test_install() {
|
||||
// hook_entity_info_alter() needs to be executed as last.
|
||||
|
@ -18,7 +18,7 @@ function field_test_install() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_schema().
|
||||
* Implements hook_schema().
|
||||
*/
|
||||
function field_test_schema() {
|
||||
$schema['test_entity'] = array(
|
||||
|
|
|
@ -87,7 +87,7 @@ function field_test_field_test_op_multiple($obj_type, $objects, $field, $instanc
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_languages().
|
||||
* Implements hook_field_languages().
|
||||
*/
|
||||
function field_test_field_languages($obj_type, $field, &$languages) {
|
||||
if ($field['settings']['test_hook_in']) {
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_help().
|
||||
* Implements hook_help().
|
||||
*/
|
||||
function field_ui_help($path, $arg) {
|
||||
switch ($path) {
|
||||
|
@ -29,7 +29,7 @@ function field_ui_help($path, $arg) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_menu().
|
||||
* Implements hook_menu().
|
||||
*/
|
||||
function field_ui_menu() {
|
||||
$items['admin/reports/fields'] = array(
|
||||
|
@ -152,7 +152,7 @@ function field_ui_menu_label($instance) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_theme().
|
||||
* Implements hook_theme().
|
||||
*/
|
||||
function field_ui_theme() {
|
||||
return array(
|
||||
|
@ -203,7 +203,7 @@ function field_ui_build_modes_tabs($obj_type, $tab_selector = NULL) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_ui_build_modes_tabs() on behalf of other core modules.
|
||||
* Implements hook_field_ui_build_modes_tabs() on behalf of other core modules.
|
||||
*
|
||||
* @return
|
||||
* An array describing the build modes defined by the module, grouped by tabs.
|
||||
|
@ -245,7 +245,7 @@ function field_ui_field_ui_build_modes_tabs() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_attach_create_bundle().
|
||||
* Implements hook_field_attach_create_bundle().
|
||||
*/
|
||||
function field_ui_field_attach_create_bundle($bundle) {
|
||||
// When a new bundle is created, the menu needs to be rebuilt to add our
|
||||
|
@ -254,7 +254,7 @@ function field_ui_field_attach_create_bundle($bundle) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_attach_rename_bundle().
|
||||
* Implements hook_field_attach_rename_bundle().
|
||||
*/
|
||||
function field_ui_field_attach_rename_bundle($bundle_old, $bundle_new) {
|
||||
if ($bundle_old !== $bundle_new && $extra = variable_get("field_extra_weights_$bundle_old", array())) {
|
||||
|
@ -264,7 +264,7 @@ function field_ui_field_attach_rename_bundle($bundle_old, $bundle_new) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_attach_delete_bundle().
|
||||
* Implements hook_field_attach_delete_bundle().
|
||||
*/
|
||||
function field_ui_field_attach_delete_bundle($bundle) {
|
||||
variable_del('field_extra_weights_' . $bundle);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_field_info().
|
||||
* Implements hook_field_info().
|
||||
*/
|
||||
function file_field_info() {
|
||||
return array(
|
||||
|
@ -32,7 +32,7 @@ function file_field_info() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_schema().
|
||||
* Implements hook_field_schema().
|
||||
*/
|
||||
function file_field_schema($field) {
|
||||
return array(
|
||||
|
@ -64,7 +64,7 @@ function file_field_schema($field) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_settings_form().
|
||||
* Implements hook_field_settings_form().
|
||||
*/
|
||||
function file_field_settings_form($field, $instance, $has_data) {
|
||||
$defaults = field_info_field_settings($field['type']);
|
||||
|
@ -104,7 +104,7 @@ function file_field_settings_form($field, $instance, $has_data) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_instance_settings_form().
|
||||
* Implements hook_field_instance_settings_form().
|
||||
*/
|
||||
function file_field_instance_settings_form($field, $instance) {
|
||||
$settings = $instance['settings'];
|
||||
|
@ -204,7 +204,7 @@ function _file_generic_settings_file_directory_validate($element, &$form_state)
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_load().
|
||||
* Implements hook_field_load().
|
||||
*/
|
||||
function file_field_load($obj_type, $objects, $field, $instances, $langcode, &$items, $age) {
|
||||
foreach ($objects as $obj_id => $object) {
|
||||
|
@ -228,7 +228,7 @@ function file_field_load($obj_type, $objects, $field, $instances, $langcode, &$i
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_sanitize().
|
||||
* Implements hook_field_sanitize().
|
||||
*/
|
||||
function file_field_sanitize($obj_type, $object, $field, $instance, $langcode, &$items) {
|
||||
// Remove files from being displayed if they're not displayed.
|
||||
|
@ -243,14 +243,14 @@ function file_field_sanitize($obj_type, $object, $field, $instance, $langcode, &
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_insert().
|
||||
* Implements hook_field_insert().
|
||||
*/
|
||||
function file_field_insert($obj_type, $object, $field, $instance, $langcode, &$items) {
|
||||
file_field_update($obj_type, $object, $field, $instance, $langcode, $items);
|
||||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_update().
|
||||
* Implements hook_field_update().
|
||||
*/
|
||||
function file_field_update($obj_type, $object, $field, $instance, $langcode, &$items) {
|
||||
// Check for files that have been removed from the object.
|
||||
|
@ -284,7 +284,7 @@ function file_field_update($obj_type, $object, $field, $instance, $langcode, &$i
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_delete().
|
||||
* Implements hook_field_delete().
|
||||
*/
|
||||
function file_field_delete($obj_type, $object, $field, $instance, $langcode, &$items) {
|
||||
list($id, $vid, $bundle) = entity_extract_ids($obj_type, $object);
|
||||
|
@ -300,7 +300,7 @@ function file_field_delete($obj_type, $object, $field, $instance, $langcode, &$i
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_delete_revision().
|
||||
* Implements hook_field_delete_revision().
|
||||
*/
|
||||
function file_field_delete_revision($obj_type, $object, $field, $instance, $langcode, &$items) {
|
||||
foreach ($items as $delta => $item) {
|
||||
|
@ -338,7 +338,7 @@ function file_field_delete_file($item, $field) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_is_empty().
|
||||
* Implements hook_field_is_empty().
|
||||
*/
|
||||
function file_field_is_empty($item, $field) {
|
||||
return empty($item['fid']);
|
||||
|
@ -362,7 +362,7 @@ function file_field_displayed($item, $field) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_formatter_info().
|
||||
* Implements hook_field_formatter_info().
|
||||
*/
|
||||
function file_field_formatter_info() {
|
||||
return array(
|
||||
|
@ -385,7 +385,7 @@ function file_field_formatter_info() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_widget_info().
|
||||
* Implements hook_field_widget_info().
|
||||
*/
|
||||
function file_field_widget_info() {
|
||||
return array(
|
||||
|
@ -404,7 +404,7 @@ function file_field_widget_info() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_widget_settings_form().
|
||||
* Implements hook_field_widget_settings_form().
|
||||
*/
|
||||
function file_field_widget_settings_form($field, $instance) {
|
||||
$widget = $instance['widget'];
|
||||
|
@ -427,7 +427,7 @@ function file_field_widget_settings_form($field, $instance) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implementation of hook_field_widget().
|
||||
* Implements hook_field_widget().
|
||||
*/
|
||||
function file_field_widget(&$form, &$form_state, $field, $instance, $langcode, $items, $delta, $element) {
|
||||
$form['#attributes'] = array('enctype' => 'multipart/form-data');
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_requirements().
|
||||
* Implements hook_requirements().
|
||||
*
|
||||
* Display information about getting upload progress bars working.
|
||||
*/
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
module_load_include('inc', 'file', 'file.field');
|
||||
|
||||
/**
|
||||
* Implement hook_menu().
|
||||
* Implements hook_menu().
|
||||
*/
|
||||
function file_menu() {
|
||||
$items = array();
|
||||
|
@ -32,7 +32,7 @@ function file_menu() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_element_info().
|
||||
* Implements hook_element_info().
|
||||
*
|
||||
* The managed file element may be used independently anywhere in Drupal.
|
||||
*/
|
||||
|
@ -59,7 +59,7 @@ function file_element_info() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_theme().
|
||||
* Implements hook_theme().
|
||||
*/
|
||||
function file_theme() {
|
||||
return array(
|
||||
|
@ -88,7 +88,7 @@ function file_theme() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_file_download().
|
||||
* Implements hook_file_download().
|
||||
*
|
||||
* This function takes an extra parameter $field_type so that it may
|
||||
* be re-used by other File-like modules, such as Image.
|
||||
|
@ -295,7 +295,7 @@ function file_progress_implementation() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_file_references().
|
||||
* Implements hook_file_references().
|
||||
*/
|
||||
function file_file_references($file) {
|
||||
$count = file_get_file_reference_count($file);
|
||||
|
@ -303,7 +303,7 @@ function file_file_references($file) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_file_delete().
|
||||
* Implements hook_file_delete().
|
||||
*/
|
||||
function file_file_delete($file) {
|
||||
// TODO: Remove references to a file that is in-use.
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_menu().
|
||||
* Implements hook_menu().
|
||||
*/
|
||||
function file_module_test_menu() {
|
||||
$items = array();
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_schema().
|
||||
* Implements hook_schema().
|
||||
*/
|
||||
function filter_schema() {
|
||||
$schema['filter'] = array(
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_help().
|
||||
* Implements hook_help().
|
||||
*/
|
||||
function filter_help($path, $arg) {
|
||||
switch ($path) {
|
||||
|
@ -33,7 +33,7 @@ function filter_help($path, $arg) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_theme().
|
||||
* Implements hook_theme().
|
||||
*/
|
||||
function filter_theme() {
|
||||
return array(
|
||||
|
@ -59,7 +59,7 @@ function filter_theme() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_menu().
|
||||
* Implements hook_menu().
|
||||
*/
|
||||
function filter_menu() {
|
||||
$items['filter/tips'] = array(
|
||||
|
@ -293,7 +293,7 @@ function filter_admin_format_title($format) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_permission().
|
||||
* Implements hook_permission().
|
||||
*/
|
||||
function filter_permission() {
|
||||
$perms['administer filters'] = array(
|
||||
|
@ -335,7 +335,7 @@ function filter_permission_name($format) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_cron().
|
||||
* Implements hook_cron().
|
||||
*
|
||||
* Expire outdated filter cache entries
|
||||
*/
|
||||
|
@ -879,7 +879,7 @@ function theme_filter_guidelines($variables) {
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_filter_info().
|
||||
* Implements hook_filter_info().
|
||||
*/
|
||||
function filter_filter_info() {
|
||||
$filters['filter_html'] = array(
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_install().
|
||||
* Implements hook_install().
|
||||
*/
|
||||
function forum_install() {
|
||||
// Set the weight of the forum.module to 1 so it is loaded after the taxonomy.module.
|
||||
|
@ -57,7 +57,7 @@ function forum_enable() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_uninstall().
|
||||
* Implements hook_uninstall().
|
||||
*/
|
||||
function forum_uninstall() {
|
||||
// Load the dependent Taxonomy module, in case it has been disabled.
|
||||
|
@ -78,7 +78,7 @@ function forum_uninstall() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_schema().
|
||||
* Implements hook_schema().
|
||||
*/
|
||||
function forum_schema() {
|
||||
$schema['forum'] = array(
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_help().
|
||||
* Implements hook_help().
|
||||
*/
|
||||
function forum_help($path, $arg) {
|
||||
switch ($path) {
|
||||
|
@ -36,7 +36,7 @@ function forum_help($path, $arg) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_theme().
|
||||
* Implements hook_theme().
|
||||
*/
|
||||
function forum_theme() {
|
||||
return array(
|
||||
|
@ -68,7 +68,7 @@ function forum_theme() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_menu().
|
||||
* Implements hook_menu().
|
||||
*/
|
||||
function forum_menu() {
|
||||
$items['forum'] = array(
|
||||
|
@ -195,7 +195,7 @@ function forum_menu_local_tasks_alter(&$data, $router_item, $root_path) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_init().
|
||||
* Implements hook_init().
|
||||
*/
|
||||
function forum_init() {
|
||||
drupal_add_css(drupal_get_path('module', 'forum') . '/forum.css');
|
||||
|
@ -218,7 +218,7 @@ function _forum_node_check_node_type($node) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_node_view().
|
||||
* Implements hook_node_view().
|
||||
*/
|
||||
function forum_node_view($node, $build_mode) {
|
||||
$vid = variable_get('forum_nav_vocabulary', 0);
|
||||
|
@ -241,7 +241,7 @@ function forum_node_view($node, $build_mode) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_node_prepare().
|
||||
* Implements hook_node_prepare().
|
||||
*/
|
||||
function forum_node_prepare($node) {
|
||||
if (_forum_node_check_node_type($node)) {
|
||||
|
@ -253,7 +253,7 @@ function forum_node_prepare($node) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_node_validate().
|
||||
* Implements hook_node_validate().
|
||||
*
|
||||
* Check in particular that only a "leaf" term in the associated taxonomy.
|
||||
*/
|
||||
|
@ -279,7 +279,7 @@ function forum_node_validate($node, $form) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_node_presave().
|
||||
* Implements hook_node_presave().
|
||||
*
|
||||
* Assign forum taxonomy when adding a topic from within a forum.
|
||||
*/
|
||||
|
@ -300,7 +300,7 @@ function forum_node_presave($node) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_node_update().
|
||||
* Implements hook_node_update().
|
||||
*/
|
||||
function forum_node_update($node) {
|
||||
if (_forum_node_check_node_type($node)) {
|
||||
|
@ -348,7 +348,7 @@ function forum_node_update($node) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_node_insert().
|
||||
* Implements hook_node_insert().
|
||||
*/
|
||||
function forum_node_insert($node) {
|
||||
if (_forum_node_check_node_type($node)) {
|
||||
|
@ -365,7 +365,7 @@ function forum_node_insert($node) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_node_delete().
|
||||
* Implements hook_node_delete().
|
||||
*/
|
||||
function forum_node_delete($node) {
|
||||
if (_forum_node_check_node_type($node)) {
|
||||
|
@ -379,7 +379,7 @@ function forum_node_delete($node) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_node_load().
|
||||
* Implements hook_node_load().
|
||||
*/
|
||||
function forum_node_load($nodes) {
|
||||
$node_vids = array();
|
||||
|
@ -401,7 +401,7 @@ function forum_node_load($nodes) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_node_info().
|
||||
* Implements hook_node_info().
|
||||
*/
|
||||
function forum_node_info() {
|
||||
return array(
|
||||
|
@ -415,7 +415,7 @@ function forum_node_info() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_permission().
|
||||
* Implements hook_permission().
|
||||
*/
|
||||
function forum_permission() {
|
||||
$perms = array(
|
||||
|
@ -427,7 +427,7 @@ function forum_permission() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_taxonomy().
|
||||
* Implements hook_taxonomy().
|
||||
*/
|
||||
function forum_taxonomy_term_delete($tid) {
|
||||
// For containers, remove the tid from the forum_containers variable.
|
||||
|
@ -440,7 +440,7 @@ function forum_taxonomy_term_delete($tid) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_comment_publish().
|
||||
* Implements hook_comment_publish().
|
||||
*
|
||||
* This actually handles the insert and update of published nodes since
|
||||
* comment_save() calls hook_comment_publish() for all published comments.
|
||||
|
@ -450,7 +450,7 @@ function forum_comment_publish($comment) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement forum_comment_update().
|
||||
* Implements hook_comment_update().
|
||||
*
|
||||
* Comment module doesn't call hook_comment_unpublish() when saving individual
|
||||
* comments so we need to check for those here.
|
||||
|
@ -464,21 +464,21 @@ function forum_comment_update($comment) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implements forum_comment_unpublish().
|
||||
* Implements hook_comment_unpublish().
|
||||
*/
|
||||
function forum_comment_unpublish($comment) {
|
||||
_forum_update_forum_index($comment->nid);
|
||||
}
|
||||
|
||||
/**
|
||||
* Implement forum_comment_delete().
|
||||
* Implements hook_comment_delete().
|
||||
*/
|
||||
function forum_comment_delete($comment) {
|
||||
_forum_update_forum_index($comment->nid);
|
||||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_storage_pre_insert().
|
||||
* Implements hook_field_storage_pre_insert().
|
||||
*/
|
||||
function forum_field_storage_pre_insert($obj_type, $object, &$skip_fields) {
|
||||
if ($obj_type == 'node' && $object->status && _forum_node_check_node_type($object)) {
|
||||
|
@ -501,7 +501,7 @@ function forum_field_storage_pre_insert($obj_type, $object, &$skip_fields) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_storage_pre_update().
|
||||
* Implements hook_field_storage_pre_update().
|
||||
*/
|
||||
function forum_field_storage_pre_update($obj_type, $object, &$skip_fields) {
|
||||
$first_call = &drupal_static(__FUNCTION__, array());
|
||||
|
@ -539,7 +539,7 @@ function forum_field_storage_pre_update($obj_type, $object, &$skip_fields) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_form_alter().
|
||||
* Implements hook_form_alter().
|
||||
*/
|
||||
function forum_form_alter(&$form, $form_state, $form_id) {
|
||||
$vid = variable_get('forum_nav_vocabulary', 0);
|
||||
|
@ -567,7 +567,7 @@ function forum_form_alter(&$form, $form_state, $form_id) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_block_info().
|
||||
* Implements hook_block_info().
|
||||
*/
|
||||
function forum_block_info() {
|
||||
$blocks['active'] = array(
|
||||
|
@ -582,7 +582,7 @@ function forum_block_info() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_block_configure().
|
||||
* Implements hook_block_configure().
|
||||
*/
|
||||
function forum_block_configure($delta = '') {
|
||||
$form['forum_block_num_' . $delta] = array('#type' => 'select', '#title' => t('Number of topics'), '#default_value' => variable_get('forum_block_num_' . $delta, '5'), '#options' => drupal_map_assoc(array(2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20)));
|
||||
|
@ -590,14 +590,14 @@ function forum_block_configure($delta = '') {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_block_save().
|
||||
* Implements hook_block_save().
|
||||
*/
|
||||
function forum_block_save($delta = '', $edit = array()) {
|
||||
variable_set('forum_block_num_' . $delta, $edit['forum_block_num_' . $delta]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Implement hook_block_view().
|
||||
* Implements hook_block_view().
|
||||
*
|
||||
* Generates a block containing the currently active forum topics and the
|
||||
* most recently added forum topics.
|
||||
|
@ -658,7 +658,7 @@ function forum_block_view_pre_render($elements) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_form().
|
||||
* Implements hook_form().
|
||||
*/
|
||||
function forum_form($node, $form_state) {
|
||||
$type = node_type_get_type($node);
|
||||
|
@ -678,7 +678,7 @@ function forum_form($node, $form_state) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_url_outbound_alter().
|
||||
* Implements hook_url_outbound_alter().
|
||||
*/
|
||||
function forum_url_outbound_alter(&$path, &$options, $original_path) {
|
||||
if (preg_match('!^taxonomy/term/(\d+)!', $path, $matches)) {
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_menu().
|
||||
* Implements hook_menu().
|
||||
*/
|
||||
function help_menu() {
|
||||
$items['admin/help'] = array(
|
||||
|
@ -33,7 +33,7 @@ function help_menu() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_help().
|
||||
* Implements hook_help().
|
||||
*/
|
||||
function help_help($path, $arg) {
|
||||
switch ($path) {
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_image_effect_info().
|
||||
* Implements hook_image_effect_info().
|
||||
*/
|
||||
function image_image_effect_info() {
|
||||
$effects = array(
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_field_info().
|
||||
* Implements hook_field_info().
|
||||
*/
|
||||
function image_field_info() {
|
||||
return array(
|
||||
|
@ -34,7 +34,7 @@ function image_field_info() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_schema().
|
||||
* Implements hook_field_schema().
|
||||
*/
|
||||
function image_field_schema($field) {
|
||||
return array(
|
||||
|
@ -65,7 +65,7 @@ function image_field_schema($field) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_settings_form().
|
||||
* Implements hook_field_settings_form().
|
||||
*/
|
||||
function image_field_settings_form($field, $instance) {
|
||||
$defaults = field_info_field_settings($field['type']);
|
||||
|
@ -98,7 +98,7 @@ function image_field_settings_form($field, $instance) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_instance_settings_form().
|
||||
* Implements hook_field_instance_settings_form().
|
||||
*/
|
||||
function image_field_instance_settings_form($field, $instance) {
|
||||
$settings = $instance['settings'];
|
||||
|
@ -203,14 +203,14 @@ function _image_field_resolution_validate($element, &$form_state) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_load().
|
||||
* Implements hook_field_load().
|
||||
*/
|
||||
function image_field_load($obj_type, $objects, $field, $instances, $langcode, &$items, $age) {
|
||||
file_field_load($obj_type, $objects, $field, $instances, $langcode, $items, $age);
|
||||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_sanitize().
|
||||
* Implements hook_field_sanitize().
|
||||
*/
|
||||
function image_field_sanitize($obj_type, $object, $field, $instance, $langcode, &$items) {
|
||||
// If there are no files specified at all, use the default.
|
||||
|
@ -226,42 +226,42 @@ function image_field_sanitize($obj_type, $object, $field, $instance, $langcode,
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_insert().
|
||||
* Implements hook_field_insert().
|
||||
*/
|
||||
function image_field_insert($obj_type, $object, $field, $instance, $langcode, &$items) {
|
||||
image_field_update($obj_type, $object, $field, $instance, $langcode, $items);
|
||||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_update().
|
||||
* Implements hook_field_update().
|
||||
*/
|
||||
function image_field_update($obj_type, $object, $field, $instance, $langcode, &$items) {
|
||||
file_field_update($obj_type, $object, $field, $instance, $langcode, $items);
|
||||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_delete().
|
||||
* Implements hook_field_delete().
|
||||
*/
|
||||
function image_field_delete($obj_type, $object, $field, $instance, $langcode, &$items) {
|
||||
file_field_delete($obj_type, $object, $field, $instance, $langcode, $items);
|
||||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_delete_revision().
|
||||
* Implements hook_field_delete_revision().
|
||||
*/
|
||||
function image_field_delete_revision($obj_type, $object, $field, $instance, $langcode, &$items) {
|
||||
file_field_delete_revision($obj_type, $object, $field, $instance, $langcode, $items);
|
||||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_is_empty().
|
||||
* Implements hook_field_is_empty().
|
||||
*/
|
||||
function image_field_is_empty($item, $field) {
|
||||
return file_field_is_empty($item, $field);
|
||||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_widget_info().
|
||||
* Implements hook_field_widget_info().
|
||||
*/
|
||||
function image_field_widget_info() {
|
||||
return array(
|
||||
|
@ -281,7 +281,7 @@ function image_field_widget_info() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_widget_settings_form().
|
||||
* Implements hook_field_widget_settings_form().
|
||||
*/
|
||||
function image_field_widget_settings_form($field, $instance) {
|
||||
$widget = $instance['widget'];
|
||||
|
@ -303,7 +303,7 @@ function image_field_widget_settings_form($field, $instance) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implementation of hook_field_widget().
|
||||
* Implements hook_field_widget().
|
||||
*/
|
||||
function image_field_widget(&$form, &$form_state, $field, $instance, $langcode, $items, $delta, $element) {
|
||||
$elements = file_field_widget($form, $form_state, $field, $instance, $langcode, $items, $delta, $element);
|
||||
|
@ -411,7 +411,7 @@ function theme_image_widget($variables) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_formatter_info().
|
||||
* Implements hook_field_formatter_info().
|
||||
*/
|
||||
function image_field_formatter_info() {
|
||||
$formatters = array(
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_install().
|
||||
* Implements hook_install().
|
||||
*/
|
||||
function image_install() {
|
||||
// Create the styles directory and ensure it's writable.
|
||||
|
@ -16,7 +16,7 @@ function image_install() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_uninstall().
|
||||
* Implements hook_uninstall().
|
||||
*/
|
||||
function image_uninstall() {
|
||||
// Remove the styles directory and generated images.
|
||||
|
@ -25,7 +25,7 @@ function image_uninstall() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_schema().
|
||||
* Implements hook_schema().
|
||||
*/
|
||||
function image_schema() {
|
||||
$schema = array();
|
||||
|
|
|
@ -64,7 +64,7 @@ function image_help($path, $arg) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_menu().
|
||||
* Implements hook_menu().
|
||||
*/
|
||||
function image_menu() {
|
||||
$items = array();
|
||||
|
@ -166,7 +166,7 @@ function image_menu() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_theme().
|
||||
* Implements hook_theme().
|
||||
*/
|
||||
function image_theme() {
|
||||
return array(
|
||||
|
@ -225,7 +225,7 @@ function image_theme() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_permission().
|
||||
* Implements hook_permission().
|
||||
*/
|
||||
function image_permission() {
|
||||
return array(
|
||||
|
@ -237,14 +237,14 @@ function image_permission() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_flush_caches().
|
||||
* Implements hook_flush_caches().
|
||||
*/
|
||||
function image_flush_caches() {
|
||||
return array('cache_image');
|
||||
}
|
||||
|
||||
/**
|
||||
* Implement hook_file_download().
|
||||
* Implements hook_file_download().
|
||||
*
|
||||
* Control the access to files underneath the styles directory.
|
||||
*/
|
||||
|
@ -295,7 +295,7 @@ function image_file_download($uri) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_file_move().
|
||||
* Implements hook_file_move().
|
||||
*/
|
||||
function image_file_move($file, $source) {
|
||||
// Delete any image derivatives at the original image path.
|
||||
|
@ -303,7 +303,7 @@ function image_file_move($file, $source) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_file_delete().
|
||||
* Implements hook_file_delete().
|
||||
*/
|
||||
function image_file_delete($file) {
|
||||
// Delete any image derivatives of this image.
|
||||
|
@ -311,7 +311,7 @@ function image_file_delete($file) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_file_references().
|
||||
* Implements hook_file_references().
|
||||
*/
|
||||
function image_file_references($file) {
|
||||
$count = file_get_file_reference_count($file, NULL, 'image');
|
||||
|
@ -319,7 +319,7 @@ function image_file_references($file) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_image_default_styles().
|
||||
* Implements hook_image_default_styles().
|
||||
*/
|
||||
function image_image_default_styles() {
|
||||
$styles = array();
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_install().
|
||||
* Implements hook_install().
|
||||
*/
|
||||
function locale_install() {
|
||||
// locales_source.source and locales_target.target are not used as binary
|
||||
|
@ -88,7 +88,7 @@ function locale_update_7001() {
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_uninstall().
|
||||
* Implements hook_uninstall().
|
||||
*/
|
||||
function locale_uninstall() {
|
||||
// Delete all JavaScript translation files.
|
||||
|
@ -132,7 +132,7 @@ function locale_uninstall() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_schema().
|
||||
* Implements hook_schema().
|
||||
*/
|
||||
function locale_schema() {
|
||||
$schema['languages'] = array(
|
||||
|
|
|
@ -42,7 +42,7 @@ define('LOCALE_LANGUAGE_NEGOTIATION_SESSION', 'locale-session');
|
|||
// Hook implementations
|
||||
|
||||
/**
|
||||
* Implement hook_help().
|
||||
* Implements hook_help().
|
||||
*/
|
||||
function locale_help($path, $arg) {
|
||||
switch ($path) {
|
||||
|
@ -89,7 +89,7 @@ function locale_help($path, $arg) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_menu().
|
||||
* Implements hook_menu().
|
||||
*/
|
||||
function locale_menu() {
|
||||
// Manage languages
|
||||
|
@ -294,7 +294,7 @@ function locale_inc_callback() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_permission().
|
||||
* Implements hook_permission().
|
||||
*/
|
||||
function locale_permission() {
|
||||
return array(
|
||||
|
@ -308,7 +308,7 @@ function locale_permission() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_locale().
|
||||
* Implements hook_locale().
|
||||
*/
|
||||
function locale_locale($op = 'groups') {
|
||||
switch ($op) {
|
||||
|
@ -354,7 +354,7 @@ function locale_language_selector_form(&$form, &$form_state, $user) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_form_FORM_ID_alter().
|
||||
* Implements hook_form_FORM_ID_alter().
|
||||
*/
|
||||
function locale_form_path_admin_form_alter(&$form, &$form_state) {
|
||||
$form['language'] = array(
|
||||
|
@ -368,7 +368,7 @@ function locale_form_path_admin_form_alter(&$form, &$form_state) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_form_FORM_ID_alter().
|
||||
* Implements hook_form_FORM_ID_alter().
|
||||
*/
|
||||
function locale_form_node_type_form_alter(&$form, &$form_state) {
|
||||
if (isset($form['identity']['type'])) {
|
||||
|
@ -393,7 +393,7 @@ function locale_multilingual_node_type($type_name) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_form_alter().
|
||||
* Implements hook_form_alter().
|
||||
*
|
||||
* Adds language fields to forms.
|
||||
*/
|
||||
|
@ -441,7 +441,7 @@ function locale_field_node_form_submit($form, &$form_state) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_theme().
|
||||
* Implements hook_theme().
|
||||
*/
|
||||
function locale_theme() {
|
||||
return array(
|
||||
|
@ -461,7 +461,7 @@ function locale_theme() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_attach_view_alter().
|
||||
* Implements hook_field_attach_view_alter().
|
||||
*/
|
||||
function locale_field_attach_view_alter(&$output, $context) {
|
||||
// In locale_field_fallback_view() we might call field_attach_view(). The
|
||||
|
@ -479,7 +479,7 @@ function locale_field_attach_view_alter(&$output, $context) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_entity_info_alter().
|
||||
* Implements hook_entity_info_alter().
|
||||
*/
|
||||
function locale_entity_info_alter(&$entity_info) {
|
||||
$enabled = drupal_multilingual();
|
||||
|
@ -489,7 +489,7 @@ function locale_entity_info_alter(&$entity_info) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_language_types_info().
|
||||
* Implements hook_language_types_info().
|
||||
*/
|
||||
function locale_language_types_info() {
|
||||
return array(
|
||||
|
@ -508,7 +508,7 @@ function locale_language_types_info() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_language_negotiation_info().
|
||||
* Implements hook_language_negotiation_info().
|
||||
*/
|
||||
function locale_language_negotiation_info() {
|
||||
$file = 'includes/locale.inc';
|
||||
|
@ -764,7 +764,7 @@ function locale_system_update($components) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_js_alter().
|
||||
* Implements hook_js_alter().
|
||||
*
|
||||
* This function checks all JavaScript files currently added via drupal_add_js()
|
||||
* and invokes parsing if they have not yet been parsed for Drupal.t()
|
||||
|
@ -826,7 +826,7 @@ function locale_js_alter(&$javascript) {
|
|||
}
|
||||
|
||||
/*
|
||||
* Implement hook_css_alter().
|
||||
* Implements hook_css_alter().
|
||||
*
|
||||
* This function checks all CSS files currently added via drupal_add_css() and
|
||||
* and checks to see if a related right to left CSS file should be included.
|
||||
|
@ -856,7 +856,7 @@ function locale_css_alter(&$css) {
|
|||
// Language switcher block
|
||||
|
||||
/**
|
||||
* Implement hook_block_info().
|
||||
* Implements hook_block_info().
|
||||
*/
|
||||
function locale_block_info() {
|
||||
include_once DRUPAL_ROOT . '/includes/language.inc';
|
||||
|
@ -873,7 +873,7 @@ function locale_block_info() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_block_view().
|
||||
* Implements hook_block_view().
|
||||
*
|
||||
* Displays a language switcher. Only show if we have at least two languages.
|
||||
*/
|
||||
|
@ -1065,7 +1065,7 @@ function locale_date_format_reset_form_submit($form, &$form_state) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_url_outbound_alter().
|
||||
* Implements hook_url_outbound_alter().
|
||||
*
|
||||
* Rewrite outbound URLs with language based prefixes.
|
||||
*/
|
||||
|
@ -1104,7 +1104,7 @@ function locale_url_outbound_alter(&$path, &$options, $original_path) {
|
|||
}
|
||||
|
||||
/*
|
||||
* Implement hook_form_FORM_ID_alter().
|
||||
* Implements hook_form_FORM_ID_alter().
|
||||
*/
|
||||
function locale_form_comment_form_alter(&$form, &$form_state, $form_id) {
|
||||
// If a content type has multilingual support we set the content language as
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_locale().
|
||||
* Implements hook_locale().
|
||||
*/
|
||||
function locale_test_locale($op = 'groups') {
|
||||
switch ($op) {
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_schema().
|
||||
* Implements hook_schema().
|
||||
*/
|
||||
function menu_schema() {
|
||||
$schema['menu_custom'] = array(
|
||||
|
@ -42,7 +42,7 @@ function menu_schema() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_install().
|
||||
* Implements hook_install().
|
||||
*/
|
||||
function menu_install() {
|
||||
$system_menus = menu_list_system_menus();
|
||||
|
@ -65,7 +65,7 @@ function menu_install() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_uninstall().
|
||||
* Implements hook_uninstall().
|
||||
*/
|
||||
function menu_uninstall() {
|
||||
menu_rebuild();
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
define('MENU_MAX_MENU_NAME_LENGTH_UI', 27);
|
||||
|
||||
/**
|
||||
* Implement hook_help().
|
||||
* Implements hook_help().
|
||||
*/
|
||||
function menu_help($path, $arg) {
|
||||
switch ($path) {
|
||||
|
@ -40,7 +40,7 @@ function menu_help($path, $arg) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_permission().
|
||||
* Implements hook_permission().
|
||||
*/
|
||||
function menu_permission() {
|
||||
return array(
|
||||
|
@ -51,7 +51,7 @@ function menu_permission() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_menu().
|
||||
* Implements hook_menu().
|
||||
*/
|
||||
function menu_menu() {
|
||||
$items['admin/structure/menu'] = array(
|
||||
|
@ -159,7 +159,7 @@ function menu_menu() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_theme().
|
||||
* Implements hook_theme().
|
||||
*/
|
||||
function menu_theme() {
|
||||
return array(
|
||||
|
@ -175,7 +175,7 @@ function menu_theme() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_enable().
|
||||
* Implements hook_enable().
|
||||
*
|
||||
* Add a link for each custom menu.
|
||||
*/
|
||||
|
@ -411,7 +411,7 @@ function menu_reset_item($item) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_block_info().
|
||||
* Implements hook_block_info().
|
||||
*/
|
||||
function menu_block_info() {
|
||||
$menus = menu_get_menus(FALSE);
|
||||
|
@ -428,7 +428,7 @@ function menu_block_info() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_block_view().
|
||||
* Implements hook_block_view().
|
||||
*/
|
||||
function menu_block_view($delta = '') {
|
||||
$menus = menu_get_menus(FALSE);
|
||||
|
@ -442,7 +442,7 @@ function menu_block_view($delta = '') {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_block_view_alter().
|
||||
* Implements hook_block_view_alter().
|
||||
*/
|
||||
function menu_block_view_alter(&$data, $block) {
|
||||
// Add contextual links for system menu blocks.
|
||||
|
@ -455,14 +455,14 @@ function menu_block_view_alter(&$data, $block) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_node_insert().
|
||||
* Implements hook_node_insert().
|
||||
*/
|
||||
function menu_node_insert($node) {
|
||||
menu_node_save($node);
|
||||
}
|
||||
|
||||
/**
|
||||
* Implement hook_node_update().
|
||||
* Implements hook_node_update().
|
||||
*/
|
||||
function menu_node_update($node) {
|
||||
menu_node_save($node);
|
||||
|
@ -494,7 +494,7 @@ function menu_node_save($node) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_node_delete().
|
||||
* Implements hook_node_delete().
|
||||
*/
|
||||
function menu_node_delete($node) {
|
||||
// Delete all menu module links that point to this node.
|
||||
|
@ -505,7 +505,7 @@ function menu_node_delete($node) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_node_prepare().
|
||||
* Implements hook_node_prepare().
|
||||
*/
|
||||
function menu_node_prepare($node) {
|
||||
if (empty($node->menu)) {
|
||||
|
@ -557,7 +557,7 @@ function _menu_parent_depth_limit($item) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_form_alter(). Adds menu item fields to the node form.
|
||||
* Implements hook_form_alter(). Adds menu item fields to the node form.
|
||||
*/
|
||||
function menu_form_alter(&$form, $form_state, $form_id) {
|
||||
if (!empty($form['#node_edit_form'])) {
|
||||
|
@ -648,7 +648,7 @@ function menu_node_form_submit($form, &$form_state) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_form_FORM_ID_alter() for the node type form.
|
||||
* Implements hook_form_FORM_ID_alter() for the node type form.
|
||||
* Adds menu options to the node type form.
|
||||
*/
|
||||
function menu_form_node_type_form_alter(&$form, $form_state) {
|
||||
|
|
|
@ -299,7 +299,7 @@ function node_type_form_validate($form, &$form_state) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_form_submit().
|
||||
* Implements hook_form_submit().
|
||||
*/
|
||||
function node_type_form_submit($form, &$form_state) {
|
||||
$op = isset($form_state['values']['op']) ? $form_state['values']['op'] : '';
|
||||
|
@ -379,7 +379,7 @@ function node_type_form_submit($form, &$form_state) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_node_type_insert().
|
||||
* Implements hook_node_type_insert().
|
||||
*/
|
||||
function node_node_type_insert($info) {
|
||||
if (!empty($info->old_type) && $info->old_type != $info->type) {
|
||||
|
@ -392,7 +392,7 @@ function node_node_type_insert($info) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_node_type_update().
|
||||
* Implements hook_node_type_update().
|
||||
*/
|
||||
function node_node_type_update($info) {
|
||||
if (!empty($info->old_type) && $info->old_type != $info->type) {
|
||||
|
|
|
@ -23,7 +23,7 @@ function node_configure_rebuild_confirm_submit($form, &$form_state) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_node_operations().
|
||||
* Implements hook_node_operations().
|
||||
*/
|
||||
function node_node_operations() {
|
||||
$operations = array(
|
||||
|
@ -637,7 +637,7 @@ function node_multiple_delete_confirm_submit($form, &$form_state) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_modules_installed()
|
||||
* Implements hook_modules_installed().
|
||||
*/
|
||||
function node_modules_installed($modules) {
|
||||
// Clear node type cache for node permissions.
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_schema().
|
||||
* Implements hook_schema().
|
||||
*/
|
||||
function node_schema() {
|
||||
$schema['node'] = array(
|
||||
|
|
|
@ -61,7 +61,7 @@ define('NODE_ACCESS_DENY', 'deny');
|
|||
define('NODE_ACCESS_IGNORE', NULL);
|
||||
|
||||
/**
|
||||
* Implement hook_help().
|
||||
* Implements hook_help().
|
||||
*/
|
||||
function node_help($path, $arg) {
|
||||
// Remind site administrators about the {node_access} table being flagged
|
||||
|
@ -130,7 +130,7 @@ function node_help($path, $arg) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_theme().
|
||||
* Implements hook_theme().
|
||||
*/
|
||||
function node_theme() {
|
||||
return array(
|
||||
|
@ -174,7 +174,7 @@ function node_theme() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_cron().
|
||||
* Implements hook_cron().
|
||||
*/
|
||||
function node_cron() {
|
||||
db_delete('history')
|
||||
|
@ -183,7 +183,7 @@ function node_cron() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_entity_info().
|
||||
* Implements hook_entity_info().
|
||||
*/
|
||||
function node_entity_info() {
|
||||
$return = array(
|
||||
|
@ -224,7 +224,7 @@ function node_entity_info() {
|
|||
|
||||
|
||||
/**
|
||||
* Implement hook_field_build_modes().
|
||||
* Implements hook_field_build_modes().
|
||||
*/
|
||||
function node_field_build_modes($obj_type) {
|
||||
$modes = array();
|
||||
|
@ -247,7 +247,7 @@ function node_field_build_modes($obj_type) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_admin_paths().
|
||||
* Implements hook_admin_paths().
|
||||
*/
|
||||
function node_admin_paths() {
|
||||
$paths = array(
|
||||
|
@ -1255,7 +1255,7 @@ function node_build_content($node, $build_mode = 'full') {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_language_negotiation_info().
|
||||
* Implements hook_language_negotiation_info().
|
||||
*/
|
||||
function node_language_negotiation_info() {
|
||||
$providers = array();
|
||||
|
@ -1411,7 +1411,7 @@ function theme_node_log_message($variables) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_permission().
|
||||
* Implements hook_permission().
|
||||
*/
|
||||
function node_permission() {
|
||||
$perms = array(
|
||||
|
@ -1477,7 +1477,7 @@ function _node_rankings(SelectQueryExtender $query) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_search_info().
|
||||
* Implements hook_search_info().
|
||||
*/
|
||||
function node_search_info() {
|
||||
return array(
|
||||
|
@ -1487,14 +1487,14 @@ function node_search_info() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_search_access().
|
||||
* Implements hook_search_access().
|
||||
*/
|
||||
function node_search_access() {
|
||||
return user_access('access content');
|
||||
}
|
||||
|
||||
/**
|
||||
* Implement hook_search_reset().
|
||||
* Implements hook_search_reset().
|
||||
*/
|
||||
function node_search_reset() {
|
||||
db_update('search_dataset')
|
||||
|
@ -1504,7 +1504,7 @@ function node_search_reset() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_search_status().
|
||||
* Implements hook_search_status().
|
||||
*/
|
||||
function node_search_status() {
|
||||
$total = db_query('SELECT COUNT(*) FROM {node} WHERE status = :status', array(':status' => NODE_PUBLISHED))->fetchField();
|
||||
|
@ -1513,7 +1513,7 @@ function node_search_status() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_search_admin().
|
||||
* Implements hook_search_admin().
|
||||
*/
|
||||
function node_search_admin() {
|
||||
// Output form for defining rank factor weights.
|
||||
|
@ -1540,7 +1540,7 @@ function node_search_admin() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_search_execute().
|
||||
* Implements hook_search_execute().
|
||||
*/
|
||||
function node_search_execute($keys = NULL) {
|
||||
// Build matching conditions
|
||||
|
@ -1606,7 +1606,7 @@ function node_search_execute($keys = NULL) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_ranking().
|
||||
* Implements hook_ranking().
|
||||
*/
|
||||
function node_ranking() {
|
||||
// Create the ranking array and add the basic ranking options.
|
||||
|
@ -1641,7 +1641,7 @@ function node_ranking() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_user_cancel().
|
||||
* Implements hook_user_cancel().
|
||||
*/
|
||||
function node_user_cancel($edit, $account, $method) {
|
||||
switch ($method) {
|
||||
|
@ -1766,7 +1766,7 @@ function _node_add_access() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_menu().
|
||||
* Implements hook_menu().
|
||||
*/
|
||||
function node_menu() {
|
||||
$items['admin/content'] = array(
|
||||
|
@ -1994,7 +1994,7 @@ function _node_custom_theme() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_init().
|
||||
* Implements hook_init().
|
||||
*/
|
||||
function node_init() {
|
||||
drupal_add_css(drupal_get_path('module', 'node') . '/node.css');
|
||||
|
@ -2018,7 +2018,7 @@ function node_revision_list($node) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_block_info().
|
||||
* Implements hook_block_info().
|
||||
*/
|
||||
function node_block_info() {
|
||||
$blocks['syndicate']['info'] = t('Syndicate');
|
||||
|
@ -2028,7 +2028,7 @@ function node_block_info() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_block_view().
|
||||
* Implements hook_block_view().
|
||||
*/
|
||||
function node_block_view($delta = '') {
|
||||
$block['subject'] = t('Syndicate');
|
||||
|
@ -2213,7 +2213,7 @@ function node_page_view($node) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_update_index().
|
||||
* Implements hook_update_index().
|
||||
*/
|
||||
function node_update_index() {
|
||||
$limit = (int)variable_get('search_cron_limit', 100);
|
||||
|
@ -2256,7 +2256,7 @@ function _node_index_node($node) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_form_FORM_ID_alter().
|
||||
* Implements hook_form_FORM_ID_alter().
|
||||
*/
|
||||
function node_form_search_form_alter(&$form, $form_state) {
|
||||
if ($form['module']['#value'] == 'node' && user_access('use advanced search')) {
|
||||
|
@ -2513,7 +2513,7 @@ function node_access($op, $node, $account = NULL) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_node_access().
|
||||
* Implements hook_node_access().
|
||||
*/
|
||||
function node_node_access($node, $op, $account) {
|
||||
$type = is_string($node) ? $node : $node->type;
|
||||
|
@ -2675,7 +2675,7 @@ function node_access_view_all_nodes() {
|
|||
|
||||
|
||||
/**
|
||||
* Implement hook_query_TAG_alter().
|
||||
* Implements hook_query_TAG_alter().
|
||||
*/
|
||||
function node_query_node_access_alter(QueryAlterableInterface $query) {
|
||||
// Skip the extra expensive alterations if site has no node access control
|
||||
|
@ -2961,7 +2961,7 @@ function _node_access_rebuild_batch_finished($success, $results, $operations) {
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_form().
|
||||
* Implements hook_form().
|
||||
*/
|
||||
function node_content_form($node, $form_state) {
|
||||
// It is impossible to define a content type without implementing hook_form()
|
||||
|
@ -2975,7 +2975,7 @@ function node_content_form($node, $form_state) {
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_forms().
|
||||
* Implements hook_forms().
|
||||
* All node forms share the same form handler.
|
||||
*/
|
||||
function node_forms() {
|
||||
|
@ -2989,7 +2989,7 @@ function node_forms() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_action_info().
|
||||
* Implements hook_action_info().
|
||||
*/
|
||||
function node_action_info() {
|
||||
return array(
|
||||
|
@ -3058,8 +3058,7 @@ function node_action_info() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement a Drupal action.
|
||||
* Sets the status of a node to 1, meaning published.
|
||||
* Implements a Drupal action: sets the status of a node to 1 (published).
|
||||
*/
|
||||
function node_publish_action($node, $context = array()) {
|
||||
$node->status = NODE_PUBLISHED;
|
||||
|
@ -3067,8 +3066,7 @@ function node_publish_action($node, $context = array()) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement a Drupal action.
|
||||
* Sets the status of a node to 0, meaning unpublished.
|
||||
* Implements a Drupal action: sets the status of a node to 0 (unpublished).
|
||||
*/
|
||||
function node_unpublish_action($node, $context = array()) {
|
||||
$node->status = NODE_NOT_PUBLISHED;
|
||||
|
@ -3076,8 +3074,7 @@ function node_unpublish_action($node, $context = array()) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement a Drupal action.
|
||||
* Sets the sticky-at-top-of-list property of a node to 1.
|
||||
* Implements a Drupal action: sets sticky-at-top-of-list property to 1.
|
||||
*/
|
||||
function node_make_sticky_action($node, $context = array()) {
|
||||
$node->sticky = NODE_STICKY;
|
||||
|
@ -3085,8 +3082,7 @@ function node_make_sticky_action($node, $context = array()) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement a Drupal action.
|
||||
* Sets the sticky-at-top-of-list property of a node to 0.
|
||||
* Implements a Drupal action: sets sticky-at-top-of-list property to 0.
|
||||
*/
|
||||
function node_make_unsticky_action($node, $context = array()) {
|
||||
$node->sticky = NODE_NOT_STICKY;
|
||||
|
@ -3094,8 +3090,7 @@ function node_make_unsticky_action($node, $context = array()) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement a Drupal action.
|
||||
* Sets the promote property of a node to 1.
|
||||
* Implements a Drupal action: sets the promote property of a node to 1.
|
||||
*/
|
||||
function node_promote_action($node, $context = array()) {
|
||||
$node->promote = NODE_PROMOTED;
|
||||
|
@ -3103,8 +3098,7 @@ function node_promote_action($node, $context = array()) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement a Drupal action.
|
||||
* Sets the promote property of a node to 0.
|
||||
* Implements a Drupal action: sets the promote property of a node to 0.
|
||||
*/
|
||||
function node_unpromote_action($node, $context = array()) {
|
||||
$node->promote = NODE_NOT_PROMOTED;
|
||||
|
@ -3112,8 +3106,7 @@ function node_unpromote_action($node, $context = array()) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement a Drupal action.
|
||||
* Saves a node.
|
||||
* Implements a Drupal action: saves a node.
|
||||
*/
|
||||
function node_save_action($node) {
|
||||
node_save($node);
|
||||
|
@ -3121,8 +3114,7 @@ function node_save_action($node) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement a configurable Drupal action.
|
||||
* Assigns ownership of a node to a user.
|
||||
* Implements a configurable Drupal action: assigns ownership of node to user.
|
||||
*/
|
||||
function node_assign_owner_action($node, $context) {
|
||||
$node->uid = $context['owner_uid'];
|
||||
|
@ -3130,6 +3122,9 @@ function node_assign_owner_action($node, $context) {
|
|||
watchdog('action', 'Changed owner of @type %title to uid %name.', array('@type' => node_type_get_type($node), '%title' => $node->title[LANGUAGE_NONE][0]['value'], '%name' => $owner_name));
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates settings form for node_assign_owner_action().
|
||||
*/
|
||||
function node_assign_owner_action_form($context) {
|
||||
$description = t('The username of the user to which you would like to assign ownership.');
|
||||
$count = db_query("SELECT COUNT(*) FROM {users}")->fetchField();
|
||||
|
@ -3167,6 +3162,9 @@ function node_assign_owner_action_form($context) {
|
|||
return $form;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates settings form for node_assign_owner_action().
|
||||
*/
|
||||
function node_assign_owner_action_validate($form, $form_state) {
|
||||
$exists = (bool) db_query_range('SELECT 1 FROM {users} WHERE name = :name', 0, 1, array(':name' => $form_state['values']['owner_name']))->fetchField();
|
||||
if (!$exists) {
|
||||
|
@ -3174,12 +3172,18 @@ function node_assign_owner_action_validate($form, $form_state) {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Saves settings form for node_assign_owner_action().
|
||||
*/
|
||||
function node_assign_owner_action_submit($form, $form_state) {
|
||||
// Username can change, so we need to store the ID, not the username.
|
||||
$uid = db_query('SELECT uid from {users} WHERE name = :name', array(':name' => $form_state['values']['owner_name']))->fetchField();
|
||||
return array('owner_uid' => $uid);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates settings form for node_unpublish_by_keyword_action().
|
||||
*/
|
||||
function node_unpublish_by_keyword_action_form($context) {
|
||||
$form['keywords'] = array(
|
||||
'#title' => t('Keywords'),
|
||||
|
@ -3190,13 +3194,15 @@ function node_unpublish_by_keyword_action_form($context) {
|
|||
return $form;
|
||||
}
|
||||
|
||||
/**
|
||||
* Saves settings form for node_unpublish_by_keyword_action().
|
||||
*/
|
||||
function node_unpublish_by_keyword_action_submit($form, $form_state) {
|
||||
return array('keywords' => drupal_explode_tags($form_state['values']['keywords']));
|
||||
}
|
||||
|
||||
/**
|
||||
* Implement a configurable Drupal action.
|
||||
* Unpublish a node if it contains a certain string.
|
||||
* Implements a configurable Drupal action: unpublish node containing keywords.
|
||||
*
|
||||
* @param $node
|
||||
* A node object.
|
||||
|
@ -3215,7 +3221,7 @@ function node_unpublish_by_keyword_action($node, $context) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_requirements().
|
||||
* Implements hook_requirements().
|
||||
*/
|
||||
function node_requirements($phase) {
|
||||
$requirements = array();
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
|
||||
/**
|
||||
* Implement hook_token_info().
|
||||
* Implements hook_token_info().
|
||||
*/
|
||||
function node_token_info() {
|
||||
$type = array(
|
||||
|
@ -92,7 +92,7 @@ function node_token_info() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_tokens().
|
||||
* Implements hook_tokens().
|
||||
*/
|
||||
function node_tokens($type, $tokens, array $data = array(), array $options = array()) {
|
||||
$url_options = array('absolute' => TRUE);
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_node_view().
|
||||
* Implements hook_node_view().
|
||||
*/
|
||||
function node_test_node_view($node, $build_mode) {
|
||||
if ($build_mode == 'rss') {
|
||||
|
@ -35,7 +35,7 @@ function node_test_node_view($node, $build_mode) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_node_grants().
|
||||
* Implements hook_node_grants().
|
||||
*/
|
||||
function node_test_node_grants($account, $op) {
|
||||
// Give everyone full grants so we don't break other node tests.
|
||||
|
@ -49,7 +49,7 @@ function node_test_node_grants($account, $op) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_node_access_records().
|
||||
* Implements hook_node_access_records().
|
||||
*/
|
||||
function node_test_node_access_records($node) {
|
||||
$grants = array();
|
||||
|
@ -79,7 +79,7 @@ function node_test_node_access_records($node) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_node_access_records_alter().
|
||||
* Implements hook_node_access_records_alter().
|
||||
*/
|
||||
function node_test_node_access_records_alter(&$grants, $node) {
|
||||
if (!empty($grants)) {
|
||||
|
@ -94,7 +94,7 @@ function node_test_node_access_records_alter(&$grants, $node) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_node_grants_alter().
|
||||
* Implements hook_node_grants_alter().
|
||||
*/
|
||||
function node_test_node_grants_alter(&$grants, $account, $op) {
|
||||
// Return an empty array of grants to prove that we can alter by reference.
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_node_insert().
|
||||
* Implements hook_node_insert().
|
||||
*/
|
||||
function node_test_exception_node_insert($node) {
|
||||
if ($node->title['zxx'][0]['value'] == 'testing_transaction_exception') {
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_schema().
|
||||
* Implements hook_schema().
|
||||
*/
|
||||
function openid_schema() {
|
||||
$schema['openid_association'] = array(
|
||||
|
@ -59,7 +59,7 @@ function openid_schema() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_requirements().
|
||||
* Implements hook_requirements().
|
||||
*/
|
||||
function openid_requirements($phase) {
|
||||
$requirements = array();
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_menu().
|
||||
* Implements hook_menu().
|
||||
*/
|
||||
function openid_menu() {
|
||||
$items['openid/authenticate'] = array(
|
||||
|
@ -39,7 +39,7 @@ function openid_menu() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_help().
|
||||
* Implements hook_help().
|
||||
*/
|
||||
function openid_help($path, $arg) {
|
||||
switch ($path) {
|
||||
|
@ -62,7 +62,7 @@ function openid_help($path, $arg) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_user_insert().
|
||||
* Implements hook_user_insert().
|
||||
*/
|
||||
function openid_user_insert(&$edit, $account, $category) {
|
||||
if (isset($_SESSION['openid']['values'])) {
|
||||
|
@ -76,14 +76,14 @@ function openid_user_insert(&$edit, $account, $category) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_form_FORM_ID_alter().
|
||||
* Implements hook_form_FORM_ID_alter().
|
||||
*/
|
||||
function openid_form_user_login_block_alter(&$form, &$form_state) {
|
||||
_openid_user_login_form_alter($form, $form_state);
|
||||
}
|
||||
|
||||
/**
|
||||
* Implement hook_form_FORM_ID_alter().
|
||||
* Implements hook_form_FORM_ID_alter().
|
||||
*/
|
||||
function openid_form_user_login_alter(&$form, &$form_state) {
|
||||
_openid_user_login_form_alter($form, $form_state);
|
||||
|
@ -128,7 +128,7 @@ function _openid_user_login_form_alter(&$form, &$form_state) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_form_alter().
|
||||
* Implements hook_form_alter().
|
||||
*
|
||||
* Adds OpenID login to the login forms.
|
||||
*/
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_install().
|
||||
* Implements hook_install().
|
||||
*/
|
||||
function openid_test_install() {
|
||||
module_load_include('inc', 'openid');
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_menu().
|
||||
* Implements hook_menu().
|
||||
*/
|
||||
function openid_test_menu() {
|
||||
$items['openid-test/yadis/xrds'] = array(
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_help().
|
||||
* Implements hook_help().
|
||||
*/
|
||||
function path_help($path, $arg) {
|
||||
switch ($path) {
|
||||
|
@ -36,7 +36,7 @@ function path_help($path, $arg) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_permission().
|
||||
* Implements hook_permission().
|
||||
*/
|
||||
function path_permission() {
|
||||
return array(
|
||||
|
@ -50,7 +50,7 @@ function path_permission() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_menu().
|
||||
* Implements hook_menu().
|
||||
*/
|
||||
function path_menu() {
|
||||
$items['admin/config/search/path'] = array(
|
||||
|
@ -93,7 +93,7 @@ function path_menu() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_form_alter().
|
||||
* Implements hook_form_alter().
|
||||
*/
|
||||
function path_form_alter(&$form, $form_state, $form_id) {
|
||||
if (!empty($form['#node_edit_form'])) {
|
||||
|
@ -180,7 +180,7 @@ function path_form_element_validate($element, &$form_state, $complete_form) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_node_insert().
|
||||
* Implements hook_node_insert().
|
||||
*/
|
||||
function path_node_insert($node) {
|
||||
if (isset($node->path)) {
|
||||
|
@ -197,7 +197,7 @@ function path_node_insert($node) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_node_update().
|
||||
* Implements hook_node_update().
|
||||
*/
|
||||
function path_node_update($node) {
|
||||
if (isset($node->path)) {
|
||||
|
@ -218,7 +218,7 @@ function path_node_update($node) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_node_delete().
|
||||
* Implements hook_node_delete().
|
||||
*/
|
||||
function path_node_delete($node) {
|
||||
// Delete all aliases associated with this node.
|
||||
|
@ -226,7 +226,7 @@ function path_node_delete($node) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_form_FORM_ID_alter().
|
||||
* Implements hook_form_FORM_ID_alter().
|
||||
*/
|
||||
function path_form_taxonomy_form_term_alter(&$form, $form_state) {
|
||||
// Make sure this does not show up on the delete confirmation form.
|
||||
|
@ -261,7 +261,7 @@ function path_form_taxonomy_form_term_alter(&$form, $form_state) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_taxonomy_term_insert().
|
||||
* Implements hook_taxonomy_term_insert().
|
||||
*/
|
||||
function path_taxonomy_term_insert($term) {
|
||||
if (isset($term->path)) {
|
||||
|
@ -278,7 +278,7 @@ function path_taxonomy_term_insert($term) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_taxonomy_term_update().
|
||||
* Implements hook_taxonomy_term_update().
|
||||
*/
|
||||
function path_taxonomy_term_update($term) {
|
||||
if (isset($term->path)) {
|
||||
|
@ -299,7 +299,7 @@ function path_taxonomy_term_update($term) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_taxonomy_term_delete().
|
||||
* Implements hook_taxonomy_term_delete().
|
||||
*/
|
||||
function path_taxonomy_term_delete($term) {
|
||||
// Delete all aliases associated with this term.
|
||||
|
|
|
@ -38,7 +38,7 @@ function php_enable() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_disable().
|
||||
* Implements hook_disable().
|
||||
*/
|
||||
function php_disable() {
|
||||
drupal_set_message(t('The PHP module has been disabled. Please note that any existing content that was using the PHP filter will now be visible in plain text. This might pose a security risk by exposing sensitive information, if any, used in the PHP code.'));
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_help().
|
||||
* Implements hook_help().
|
||||
*/
|
||||
function php_help($path, $arg) {
|
||||
switch ($path) {
|
||||
|
@ -21,7 +21,7 @@ function php_help($path, $arg) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_permission().
|
||||
* Implements hook_permission().
|
||||
*/
|
||||
function php_permission() {
|
||||
return array(
|
||||
|
@ -120,7 +120,7 @@ else {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_filter_info().
|
||||
* Implements hook_filter_info().
|
||||
*
|
||||
* Provide PHP code filter. Use with care.
|
||||
*/
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_schema().
|
||||
* Implements hook_schema().
|
||||
*/
|
||||
function poll_schema() {
|
||||
$schema['poll'] = array(
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_help().
|
||||
* Implements hook_help().
|
||||
*/
|
||||
function poll_help($path, $arg) {
|
||||
switch ($path) {
|
||||
|
@ -28,14 +28,14 @@ function poll_help($path, $arg) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_init().
|
||||
* Implements hook_init().
|
||||
*/
|
||||
function poll_init() {
|
||||
drupal_add_css(drupal_get_path('module', 'poll') . '/poll.css');
|
||||
}
|
||||
|
||||
/**
|
||||
* Implement hook_theme().
|
||||
* Implements hook_theme().
|
||||
*/
|
||||
function poll_theme() {
|
||||
return array(
|
||||
|
@ -58,7 +58,7 @@ function poll_theme() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_permission().
|
||||
* Implements hook_permission().
|
||||
*/
|
||||
function poll_permission() {
|
||||
$perms = array(
|
||||
|
@ -77,7 +77,7 @@ function poll_permission() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_menu().
|
||||
* Implements hook_menu().
|
||||
*/
|
||||
function poll_menu() {
|
||||
$items['poll'] = array(
|
||||
|
@ -121,7 +121,7 @@ function _poll_menu_access($node, $perm, $inspect_allowvotes) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_block_info().
|
||||
* Implements hook_block_info().
|
||||
*/
|
||||
function poll_block_info() {
|
||||
if (user_access('access content')) {
|
||||
|
@ -131,7 +131,7 @@ function poll_block_info() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_block_view().
|
||||
* Implements hook_block_view().
|
||||
*
|
||||
* Generates a block containing the latest poll.
|
||||
*/
|
||||
|
@ -161,7 +161,7 @@ function poll_block_view($delta = '') {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_cron().
|
||||
* Implements hook_cron().
|
||||
*
|
||||
* Closes polls that have exceeded their allowed runtime.
|
||||
*/
|
||||
|
@ -176,7 +176,7 @@ function poll_cron() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_node_info().
|
||||
* Implements hook_node_info().
|
||||
*/
|
||||
function poll_node_info() {
|
||||
return array(
|
||||
|
@ -191,7 +191,7 @@ function poll_node_info() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_field_extra_fields().
|
||||
* Implements hook_field_extra_fields().
|
||||
*/
|
||||
function poll_field_extra_fields($bundle) {
|
||||
$extra = array();
|
||||
|
@ -213,7 +213,7 @@ function poll_field_extra_fields($bundle) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_form().
|
||||
* Implements hook_form().
|
||||
*/
|
||||
function poll_form($node, &$form_state) {
|
||||
global $user;
|
||||
|
@ -397,7 +397,7 @@ function poll_node_form_submit(&$form, &$form_state) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_validate().
|
||||
* Implements hook_validate().
|
||||
*/
|
||||
function poll_validate($node, $form) {
|
||||
if (isset($node->title)) {
|
||||
|
@ -421,7 +421,7 @@ function poll_validate($node, $form) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_node_prepare_translation().
|
||||
* Implements hook_node_prepare_translation().
|
||||
*/
|
||||
function poll_node_prepare_translation($node) {
|
||||
if ($node->type == 'poll') {
|
||||
|
@ -430,7 +430,7 @@ function poll_node_prepare_translation($node) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_load().
|
||||
* Implements hook_load().
|
||||
*/
|
||||
function poll_load($nodes) {
|
||||
global $user;
|
||||
|
@ -469,7 +469,7 @@ function poll_load($nodes) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_insert().
|
||||
* Implements hook_insert().
|
||||
*/
|
||||
function poll_insert($node) {
|
||||
if (!user_access('administer nodes')) {
|
||||
|
@ -503,7 +503,7 @@ function poll_insert($node) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_update().
|
||||
* Implements hook_update().
|
||||
*/
|
||||
function poll_update($node) {
|
||||
// Update poll settings.
|
||||
|
@ -540,7 +540,7 @@ function poll_update($node) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_delete().
|
||||
* Implements hook_delete().
|
||||
*/
|
||||
function poll_delete($node) {
|
||||
db_delete('poll')
|
||||
|
@ -596,7 +596,7 @@ function poll_block_latest_poll_view($node) {
|
|||
|
||||
|
||||
/**
|
||||
* Implement hook_view().
|
||||
* Implements hook_view().
|
||||
*/
|
||||
function poll_view($node, $build_mode = 'full') {
|
||||
global $user;
|
||||
|
@ -883,7 +883,7 @@ function poll_cancel($form, &$form_state) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_user_cancel().
|
||||
* Implements hook_user_cancel().
|
||||
*/
|
||||
function poll_user_cancel($edit, $account, $method) {
|
||||
switch ($method) {
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_token_info().
|
||||
* Implements hook_token_info().
|
||||
*/
|
||||
function poll_token_info() {
|
||||
$node['poll-votes'] = array(
|
||||
|
@ -37,7 +37,7 @@ function poll_token_info() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_tokens().
|
||||
* Implements hook_tokens().
|
||||
*/
|
||||
function poll_tokens($type, $tokens, array $data = array(), array $options = array()) {
|
||||
$url_options = array('absolute' => TRUE);
|
||||
|
|
|
@ -7,14 +7,14 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_uninstall().
|
||||
* Implements hook_uninstall().
|
||||
*/
|
||||
function profile_uninstall() {
|
||||
variable_del('profile_block_author_fields');
|
||||
}
|
||||
|
||||
/**
|
||||
* Implement hook_schema().
|
||||
* Implements hook_schema().
|
||||
*/
|
||||
function profile_schema() {
|
||||
$schema['profile_field'] = array(
|
||||
|
|
|
@ -27,7 +27,7 @@ define('PROFILE_PUBLIC_LISTINGS', 3);
|
|||
define('PROFILE_HIDDEN', 4);
|
||||
|
||||
/**
|
||||
* Implement hook_help().
|
||||
* Implements hook_help().
|
||||
*/
|
||||
function profile_help($path, $arg) {
|
||||
switch ($path) {
|
||||
|
@ -49,7 +49,7 @@ function profile_help($path, $arg) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_theme().
|
||||
* Implements hook_theme().
|
||||
*/
|
||||
function profile_theme() {
|
||||
return array(
|
||||
|
@ -73,7 +73,7 @@ function profile_theme() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_menu().
|
||||
* Implements hook_menu().
|
||||
*/
|
||||
function profile_menu() {
|
||||
$items['profile'] = array(
|
||||
|
@ -133,7 +133,7 @@ function profile_menu() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_block_info().
|
||||
* Implements hook_block_info().
|
||||
*/
|
||||
function profile_block_info() {
|
||||
$blocks['author-information']['info'] = t('Author information');
|
||||
|
@ -142,7 +142,7 @@ function profile_menu() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_block_configure().
|
||||
* Implements hook_block_configure().
|
||||
*/
|
||||
function profile_block_configure($delta = '') {
|
||||
// Compile a list of fields to show
|
||||
|
@ -163,14 +163,14 @@ function profile_block_configure($delta = '') {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_block_save().
|
||||
* Implements hook_block_save().
|
||||
*/
|
||||
function profile_block_save($delta = '', $edit = array()) {
|
||||
variable_set('profile_block_author_fields', $edit['profile_block_author_fields']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Implement hook_block_view().
|
||||
* Implements hook_block_view().
|
||||
*/
|
||||
function profile_block_view($delta = '') {
|
||||
if (user_access('access user profiles')) {
|
||||
|
@ -210,7 +210,7 @@ function profile_block_view($delta = '') {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_user_presave().
|
||||
* Implements hook_user_presave().
|
||||
*/
|
||||
function profile_user_presave(&$edit, $account, $category) {
|
||||
if ($account->uid) {
|
||||
|
@ -219,14 +219,14 @@ function profile_user_presave(&$edit, $account, $category) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_user_insert().
|
||||
* Implements hook_user_insert().
|
||||
*/
|
||||
function profile_user_insert(&$edit, $account, $category) {
|
||||
profile_save_profile($edit, $account, $category, TRUE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Implement hook_user_cancel().
|
||||
* Implements hook_user_cancel().
|
||||
*/
|
||||
function profile_user_cancel(&$edit, $account, $method) {
|
||||
switch ($method) {
|
||||
|
@ -240,7 +240,7 @@ function profile_user_cancel(&$edit, $account, $method) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_user_load().
|
||||
* Implements hook_user_load().
|
||||
*/
|
||||
function profile_user_load($users) {
|
||||
$result = db_query('SELECT f.name, f.type, v.uid, v.value FROM {profile_field} f INNER JOIN {profile_value} v ON f.fid = v.fid WHERE uid IN (:uids)', array(':uids' => array_keys($users)));
|
||||
|
@ -317,7 +317,7 @@ function profile_view_field($account, $field) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_user_view().
|
||||
* Implements hook_user_view().
|
||||
*/
|
||||
function profile_user_view($account) {
|
||||
// Show private fields to administrators and people viewing their own account.
|
||||
|
@ -367,7 +367,7 @@ function _profile_form_explanation($field) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_form_alter().
|
||||
* Implements hook_form_alter().
|
||||
*/
|
||||
function profile_form_alter(&$form, &$form_state, $form_id) {
|
||||
if (!($form_id == 'user_register_form' || $form_id == 'user_profile_form')) {
|
||||
|
@ -489,7 +489,7 @@ function profile_user_form_validate($form, &$form_state) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_user_categories().
|
||||
* Implements hook_user_categories().
|
||||
*/
|
||||
function profile_user_categories() {
|
||||
$result = db_query("SELECT DISTINCT(category) FROM {profile_field}");
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_install().
|
||||
* Implements hook_install().
|
||||
*/
|
||||
function rdf_test_install() {
|
||||
$rdf_mappings = array(
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_uninstall().
|
||||
* Implements hook_uninstall().
|
||||
*/
|
||||
function search_uninstall() {
|
||||
variable_del('minimum_word_size');
|
||||
|
@ -16,7 +16,7 @@ function search_uninstall() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_schema().
|
||||
* Implements hook_schema().
|
||||
*/
|
||||
function search_schema() {
|
||||
$schema['search_dataset'] = array(
|
||||
|
|
|
@ -91,7 +91,7 @@ define('PREG_CLASS_CJK', '\x{3041}-\x{30ff}\x{31f0}-\x{31ff}\x{3400}-\x{4db5}' .
|
|||
'\x{4e00}-\x{9fbb}\x{f900}-\x{fad9}');
|
||||
|
||||
/**
|
||||
* Implement hook_help().
|
||||
* Implements hook_help().
|
||||
*/
|
||||
function search_help($path, $arg) {
|
||||
switch ($path) {
|
||||
|
@ -113,7 +113,7 @@ function search_help($path, $arg) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_theme().
|
||||
* Implements hook_theme().
|
||||
*/
|
||||
function search_theme() {
|
||||
return array(
|
||||
|
@ -138,7 +138,7 @@ function search_theme() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_permission().
|
||||
* Implements hook_permission().
|
||||
*/
|
||||
function search_permission() {
|
||||
return array(
|
||||
|
@ -155,7 +155,7 @@ function search_permission() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_block_info().
|
||||
* Implements hook_block_info().
|
||||
*/
|
||||
function search_block_info() {
|
||||
$blocks['form']['info'] = t('Search form');
|
||||
|
@ -165,7 +165,7 @@ function search_block_info() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_block_view().
|
||||
* Implements hook_block_view().
|
||||
*/
|
||||
function search_block_view($delta = '') {
|
||||
if (user_access('search content')) {
|
||||
|
@ -175,7 +175,7 @@ function search_block_view($delta = '') {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_menu().
|
||||
* Implements hook_menu().
|
||||
*/
|
||||
function search_menu() {
|
||||
$items['search'] = array(
|
||||
|
@ -300,7 +300,7 @@ function search_dirty($word = NULL) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_cron().
|
||||
* Implements hook_cron().
|
||||
*
|
||||
* Fires hook_update_index() in all modules and cleans up dirty words (see
|
||||
* search_dirty).
|
||||
|
@ -709,7 +709,7 @@ function search_touch_node($nid) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_node_update_index().
|
||||
* Implements hook_node_update_index().
|
||||
*/
|
||||
function search_node_update_index($node) {
|
||||
// Transplant links to a node into the target node.
|
||||
|
@ -724,7 +724,7 @@ function search_node_update_index($node) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_node_update().
|
||||
* Implements hook_node_update().
|
||||
*/
|
||||
function search_node_update($node) {
|
||||
// Reindex the node when it is updated. The node is automatically indexed
|
||||
|
@ -733,7 +733,7 @@ function search_node_update($node) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_comment_insert().
|
||||
* Implements hook_comment_insert().
|
||||
*/
|
||||
function search_comment_insert($comment) {
|
||||
// Reindex the node when comments are added.
|
||||
|
@ -741,7 +741,7 @@ function search_comment_insert($comment) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_comment_update().
|
||||
* Implements hook_comment_update().
|
||||
*/
|
||||
function search_comment_update($comment) {
|
||||
// Reindex the node when comments are changed.
|
||||
|
@ -749,7 +749,7 @@ function search_comment_update($comment) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_comment_delete().
|
||||
* Implements hook_comment_delete().
|
||||
*/
|
||||
function search_comment_delete($comment) {
|
||||
// Reindex the node when comments are deleted.
|
||||
|
@ -757,7 +757,7 @@ function search_comment_delete($comment) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_comment_publish().
|
||||
* Implements hook_comment_publish().
|
||||
*/
|
||||
function search_comment_publish($comment) {
|
||||
// Reindex the node when comments are published.
|
||||
|
@ -765,7 +765,7 @@ function search_comment_publish($comment) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_comment_unpublish().
|
||||
* Implements hook_comment_unpublish().
|
||||
*/
|
||||
function search_comment_unpublish($comment) {
|
||||
// Reindex the node when comments are unpublished.
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_enable().
|
||||
* Implements hook_enable().
|
||||
*/
|
||||
function shortcut_enable() {
|
||||
if (shortcut_set_load(SHORTCUT_DEFAULT_SET_NAME)) {
|
||||
|
@ -40,7 +40,7 @@ function shortcut_enable() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_uninstall().
|
||||
* Implements hook_uninstall().
|
||||
*/
|
||||
function shortcut_uninstall() {
|
||||
// Delete the menu links associated with each shortcut set.
|
||||
|
@ -50,7 +50,7 @@ function shortcut_uninstall() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_schema().
|
||||
* Implements hook_schema().
|
||||
*/
|
||||
function shortcut_schema() {
|
||||
$schema['shortcut_set'] = array(
|
||||
|
|
|
@ -35,7 +35,7 @@ function shortcut_help($path, $arg) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_permission().
|
||||
* Implements hook_permission().
|
||||
*/
|
||||
function shortcut_permission() {
|
||||
return array(
|
||||
|
@ -52,7 +52,7 @@ function shortcut_permission() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_menu().
|
||||
* Implements hook_menu().
|
||||
*/
|
||||
function shortcut_menu() {
|
||||
$items['admin/config/system/shortcut'] = array(
|
||||
|
@ -121,7 +121,7 @@ function shortcut_menu() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_theme().
|
||||
* Implements hook_theme().
|
||||
*/
|
||||
function shortcut_theme() {
|
||||
return array(
|
||||
|
@ -133,7 +133,7 @@ function shortcut_theme() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_block_info().
|
||||
* Implements hook_block_info().
|
||||
*/
|
||||
function shortcut_block_info() {
|
||||
$blocks['shortcuts']['info'] = t('Shortcuts');
|
||||
|
@ -144,7 +144,7 @@ function shortcut_block_info() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_block_view().
|
||||
* Implements hook_block_view().
|
||||
*/
|
||||
function shortcut_block_view($delta = '') {
|
||||
if ($delta == 'shortcuts') {
|
||||
|
@ -522,7 +522,7 @@ function shortcut_renderable_links($shortcut_set = NULL) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_page_build().
|
||||
* Implements hook_page_build().
|
||||
*/
|
||||
function shortcut_page_build(&$page) {
|
||||
if (shortcut_set_edit_access()) {
|
||||
|
@ -610,7 +610,7 @@ function shortcut_toolbar_pre_render($toolbar) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_preprocess_page().
|
||||
* Implements hook_preprocess_page().
|
||||
*/
|
||||
function shortcut_preprocess_page(&$variables) {
|
||||
if (isset($variables['page']['add_or_remove_shortcut'])) {
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_install().
|
||||
* Implements hook_install().
|
||||
*/
|
||||
function simpletest_install() {
|
||||
// Check for files directory.
|
||||
|
@ -98,7 +98,7 @@ function simpletest_get_file_count($directory, $filename) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_uninstall().
|
||||
* Implements hook_uninstall().
|
||||
*/
|
||||
function simpletest_uninstall() {
|
||||
simpletest_clean_environment();
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_help().
|
||||
* Implements hook_help().
|
||||
*/
|
||||
function simpletest_help($path, $arg) {
|
||||
switch ($path) {
|
||||
|
@ -26,7 +26,7 @@ function simpletest_help($path, $arg) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_menu().
|
||||
* Implements hook_menu().
|
||||
*/
|
||||
function simpletest_menu() {
|
||||
$items['admin/config/development/testing'] = array(
|
||||
|
@ -62,7 +62,7 @@ function simpletest_menu() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_permission().
|
||||
* Implements hook_permission().
|
||||
*/
|
||||
function simpletest_permission() {
|
||||
return array(
|
||||
|
@ -74,7 +74,7 @@ function simpletest_permission() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_theme().
|
||||
* Implements hook_theme().
|
||||
*/
|
||||
function simpletest_theme() {
|
||||
return array(
|
||||
|
@ -90,7 +90,7 @@ function simpletest_theme() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implementation of hook_stream_wrappers().
|
||||
* Implements hook_stream_wrappers().
|
||||
*/
|
||||
function simpletest_test_stream_wrappers() {
|
||||
return array(
|
||||
|
@ -103,7 +103,7 @@ function simpletest_test_stream_wrappers() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_js_alter().
|
||||
* Implements hook_js_alter().
|
||||
*/
|
||||
function simpletest_js_alter(&$javascript) {
|
||||
// Since SimpleTest is a special use case for the table select, stick the
|
||||
|
@ -375,7 +375,7 @@ function simpletest_test_get_all() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implementation of hook_registry_files_alter().
|
||||
* Implements hook_registry_files_alter().
|
||||
*
|
||||
* Add the test files for disabled modules so that we get a list containing
|
||||
* all the avialable tests.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// $Id$
|
||||
|
||||
/**
|
||||
* Implementation of hook_install().
|
||||
* Implements hook_install().
|
||||
*/
|
||||
function actions_loop_test_install() {
|
||||
db_update('system')
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// $Id$
|
||||
|
||||
/**
|
||||
* Implement hook_trigger_info().
|
||||
* Implements hook_trigger_info().
|
||||
*/
|
||||
function actions_loop_test_trigger_info() {
|
||||
return array(
|
||||
|
@ -15,7 +15,7 @@ function actions_loop_test_trigger_info() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_watchdog().
|
||||
* Implements hook_watchdog().
|
||||
*/
|
||||
function actions_loop_test_watchdog(array $log_entry) {
|
||||
// If the triggering actions are not explicitly enabled, abort.
|
||||
|
@ -36,7 +36,7 @@ function actions_loop_test_watchdog(array $log_entry) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_init().
|
||||
* Implements hook_init().
|
||||
*/
|
||||
function actions_loop_test_init() {
|
||||
if (!empty($_GET['trigger_actions_on_watchdog'])) {
|
||||
|
@ -45,7 +45,7 @@ function actions_loop_test_init() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_action_info().
|
||||
* Implements hook_action_info().
|
||||
*/
|
||||
function actions_loop_test_action_info() {
|
||||
return array(
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_menu().
|
||||
* Implements hook_menu().
|
||||
*/
|
||||
function ajax_test_menu() {
|
||||
$items['ajax-test/render'] = array(
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_menu().
|
||||
* Implements hook_menu().
|
||||
*/
|
||||
function common_test_menu() {
|
||||
$items['common-test/drupal_goto'] = array(
|
||||
|
@ -61,7 +61,7 @@ function common_test_drupal_goto_land_fail() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_drupal_goto_alter().
|
||||
* Implements hook_drupal_goto_alter().
|
||||
*/
|
||||
function common_test_drupal_goto_alter(&$path, &$options, &$http_response_code) {
|
||||
if ($path == 'common-test/drupal_goto/fail') {
|
||||
|
@ -70,7 +70,7 @@ function common_test_drupal_goto_alter(&$path, &$options, &$http_response_code)
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_TYPE_alter().
|
||||
* Implements hook_TYPE_alter().
|
||||
*/
|
||||
function common_test_drupal_alter_alter(&$data, &$arg2 = NULL, &$arg3 = NULL) {
|
||||
// Alter first argument.
|
||||
|
@ -101,7 +101,7 @@ function common_test_drupal_alter_alter(&$data, &$arg2 = NULL, &$arg3 = NULL) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_TYPE_alter() on behalf of Garland theme.
|
||||
* Implements hook_TYPE_alter() on behalf of Garland theme.
|
||||
*
|
||||
* Same as common_test_drupal_alter_alter(), but here, we verify that themes
|
||||
* can also alter and come last.
|
||||
|
@ -135,7 +135,7 @@ function garland_drupal_alter_alter(&$data, &$arg2 = NULL, &$arg3 = NULL) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_theme().
|
||||
* Implements hook_theme().
|
||||
*/
|
||||
function common_test_theme() {
|
||||
return array(
|
||||
|
@ -153,7 +153,7 @@ function theme_common_test_foo($variables) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implementation of hook_library_alter().
|
||||
* Implements hook_library_alter().
|
||||
*/
|
||||
function common_test_library_alter(&$libraries, $module) {
|
||||
if ($module == 'system' && isset($libraries['farbtastic'])) {
|
||||
|
@ -165,7 +165,7 @@ function common_test_library_alter(&$libraries, $module) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implementation of hook_library().
|
||||
* Implements hook_library().
|
||||
*
|
||||
* Adds Farbtastic in a different version.
|
||||
*/
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_schema().
|
||||
* Implements hook_schema().
|
||||
*
|
||||
* The database tests use the database API which depends on schema
|
||||
* information for certain operations on certain databases.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// $Id$
|
||||
|
||||
/**
|
||||
* Implement hook_query_alter().
|
||||
* Implements hook_query_alter().
|
||||
*/
|
||||
function database_test_query_alter(QueryAlterableInterface $query) {
|
||||
|
||||
|
@ -34,14 +34,16 @@ function database_test_query_alter(QueryAlterableInterface $query) {
|
|||
|
||||
|
||||
/**
|
||||
* Implement hook_query_TAG_alter(). Called by DatabaseTestCase::testAlterRemoveRange.
|
||||
* Implements hook_query_TAG_alter().
|
||||
*
|
||||
* Called by DatabaseTestCase::testAlterRemoveRange.
|
||||
*/
|
||||
function database_test_query_database_test_alter_remove_range_alter(QueryAlterableInterface $query) {
|
||||
$query->range();
|
||||
}
|
||||
|
||||
/**
|
||||
* Implement hook_menu().
|
||||
* Implements hook_menu().
|
||||
*/
|
||||
function database_test_menu() {
|
||||
$items['database_test/db_query_temporary'] = array(
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// $Id$
|
||||
|
||||
/**
|
||||
* Implement hook_menu().
|
||||
* Implements hook_menu().
|
||||
*/
|
||||
function error_test_menu() {
|
||||
$items['error-test/generate-warnings'] = array(
|
||||
|
|
|
@ -15,7 +15,7 @@ define('FILE_URL_TEST_CDN_2', 'http://cdn2.example.com');
|
|||
|
||||
|
||||
/**
|
||||
* Implement hook_menu().
|
||||
* Implements hook_menu().
|
||||
*/
|
||||
function file_test_menu() {
|
||||
$items['file-test/upload'] = array(
|
||||
|
@ -29,7 +29,7 @@ function file_test_menu() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_stream_wrappers().
|
||||
* Implements hook_stream_wrappers().
|
||||
*/
|
||||
function file_test_stream_wrappers() {
|
||||
return array(
|
||||
|
@ -199,7 +199,7 @@ function file_test_set_return($op, $value) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_file_load().
|
||||
* Implements hook_file_load().
|
||||
*/
|
||||
function file_test_file_load($files) {
|
||||
foreach ($files as $file) {
|
||||
|
@ -211,7 +211,7 @@ function file_test_file_load($files) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_file_validate().
|
||||
* Implements hook_file_validate().
|
||||
*/
|
||||
function file_test_file_validate($file) {
|
||||
_file_test_log_call('validate', array($file));
|
||||
|
@ -219,7 +219,7 @@ function file_test_file_validate($file) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_file_download().
|
||||
* Implements hook_file_download().
|
||||
*/
|
||||
function file_test_file_download($uri) {
|
||||
_file_test_log_call('download', array($uri));
|
||||
|
@ -227,7 +227,7 @@ function file_test_file_download($uri) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_file_references().
|
||||
* Implements hook_file_references().
|
||||
*/
|
||||
function file_test_file_references($file) {
|
||||
_file_test_log_call('references', array($file));
|
||||
|
@ -235,42 +235,42 @@ function file_test_file_references($file) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_file_insert().
|
||||
* Implements hook_file_insert().
|
||||
*/
|
||||
function file_test_file_insert($file) {
|
||||
_file_test_log_call('insert', array($file));
|
||||
}
|
||||
|
||||
/**
|
||||
* Implement hook_file_update().
|
||||
* Implements hook_file_update().
|
||||
*/
|
||||
function file_test_file_update($file) {
|
||||
_file_test_log_call('update', array($file));
|
||||
}
|
||||
|
||||
/**
|
||||
* Implement hook_file_copy().
|
||||
* Implements hook_file_copy().
|
||||
*/
|
||||
function file_test_file_copy($file, $source) {
|
||||
_file_test_log_call('copy', array($file, $source));
|
||||
}
|
||||
|
||||
/**
|
||||
* Implement hook_file_move().
|
||||
* Implements hook_file_move().
|
||||
*/
|
||||
function file_test_file_move($file, $source) {
|
||||
_file_test_log_call('move', array($file, $source));
|
||||
}
|
||||
|
||||
/**
|
||||
* Implement hook_file_delete().
|
||||
* Implements hook_file_delete().
|
||||
*/
|
||||
function file_test_file_delete($file) {
|
||||
_file_test_log_call('delete', array($file));
|
||||
}
|
||||
|
||||
/**
|
||||
* Implement hook_file_url_alter().
|
||||
* Implements hook_file_url_alter().
|
||||
*/
|
||||
function file_test_file_url_alter(&$uri) {
|
||||
// Only run this hook when this variable is set. Otherwise, we'd have to add
|
||||
|
@ -315,7 +315,7 @@ function file_test_file_url_alter(&$uri) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implementation of hook_file_mimetype_mapping_alter().
|
||||
* Implements hook_file_mimetype_mapping_alter().
|
||||
*/
|
||||
function file_test_file_mimetype_mapping_alter(&$mapping) {
|
||||
// Add new mappings.
|
||||
|
|
|
@ -7,21 +7,21 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_filter_format_insert().
|
||||
* Implements hook_filter_format_insert().
|
||||
*/
|
||||
function filter_test_filter_format_insert($format) {
|
||||
drupal_set_message('hook_filter_format_insert invoked.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Implement hook_filter_format_update().
|
||||
* Implements hook_filter_format_update().
|
||||
*/
|
||||
function filter_test_filter_format_update($format) {
|
||||
drupal_set_message('hook_filter_format_update invoked.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Implement hook_filter_format_delete().
|
||||
* Implements hook_filter_format_delete().
|
||||
*/
|
||||
function filter_test_filter_format_delete($format, $default) {
|
||||
drupal_set_message('hook_filter_format_delete invoked.');
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_menu().
|
||||
* Implements hook_menu().
|
||||
*/
|
||||
function form_test_menu() {
|
||||
$items['form-test/validate'] = array(
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_image_toolkits().
|
||||
* Implements hook_image_toolkits().
|
||||
*/
|
||||
function image_test_image_toolkits() {
|
||||
return array(
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_menu().
|
||||
* Implements hook_menu().
|
||||
*/
|
||||
function menu_test_menu() {
|
||||
// The name of the menu changes during the course of the test. Using a $_GET.
|
||||
|
@ -139,7 +139,7 @@ function menu_test_menu_name($new_name = '') {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_menu_link_insert().
|
||||
* Implements hook_menu_link_insert().
|
||||
*
|
||||
* @return
|
||||
* A random string.
|
||||
|
@ -149,7 +149,7 @@ function menu_test_menu_link_insert($item) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_menu_link_update().
|
||||
* Implements hook_menu_link_update().
|
||||
*
|
||||
* @return
|
||||
* A random string.
|
||||
|
@ -159,7 +159,7 @@ function menu_test_menu_link_update($item) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_menu_link_delete().
|
||||
* Implements hook_menu_link_delete().
|
||||
*
|
||||
* @return
|
||||
* A random string.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// $Id$
|
||||
|
||||
/**
|
||||
* Implement hook_permission().
|
||||
* Implements hook_permission().
|
||||
*/
|
||||
function module_test_permission() {
|
||||
return array(
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// $Id$
|
||||
|
||||
/**
|
||||
* Implement hook_menu().
|
||||
* Implements hook_menu().
|
||||
*/
|
||||
function session_test_menu() {
|
||||
$items['session-test/get'] = array(
|
||||
|
@ -54,7 +54,7 @@ function session_test_menu() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_boot().
|
||||
* Implements hook_boot().
|
||||
*/
|
||||
function session_test_boot() {
|
||||
header('X-Session-Empty: ' . intval(empty($_SESSION)));
|
||||
|
@ -133,7 +133,7 @@ function _session_test_set_not_started() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_user().
|
||||
* Implements hook_user().
|
||||
*/
|
||||
function session_test_user_login($edit = array(), $user = NULL) {
|
||||
if ($user->name == 'session_test_user') {
|
||||
|
@ -144,14 +144,14 @@ function session_test_user_login($edit = array(), $user = NULL) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_form_FORM_ID_alter().
|
||||
* Implements hook_form_FORM_ID_alter().
|
||||
*/
|
||||
function session_test_form_user_login_alter(&$form) {
|
||||
$form['#https'] = TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implement hook_drupal_goto_alter().
|
||||
* Implements hook_drupal_goto_alter().
|
||||
*
|
||||
* Force the redirection to go to a non-secure page after being on a secure
|
||||
* page through https.php.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// $Id$
|
||||
|
||||
/**
|
||||
* Implement hook_menu().
|
||||
* Implements hook_menu().
|
||||
*/
|
||||
function system_test_menu() {
|
||||
$items['admin/system-test/batch-theme'] = array(
|
||||
|
@ -175,7 +175,7 @@ function system_test_destination() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_modules_installed().
|
||||
* Implements hook_modules_installed().
|
||||
*/
|
||||
function system_test_modules_installed($modules) {
|
||||
if (in_array('aggregator', $modules)) {
|
||||
|
@ -184,7 +184,7 @@ function system_test_modules_installed($modules) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_modules_enabled().
|
||||
* Implements hook_modules_enabled().
|
||||
*/
|
||||
function system_test_modules_enabled($modules) {
|
||||
if (in_array('aggregator', $modules)) {
|
||||
|
@ -193,7 +193,7 @@ function system_test_modules_enabled($modules) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_modules_disabled().
|
||||
* Implements hook_modules_disabled().
|
||||
*/
|
||||
function system_test_modules_disabled($modules) {
|
||||
if (in_array('aggregator', $modules)) {
|
||||
|
@ -202,7 +202,7 @@ function system_test_modules_disabled($modules) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_modules_uninstalled().
|
||||
* Implements hook_modules_uninstalled().
|
||||
*/
|
||||
function system_test_modules_uninstalled($modules) {
|
||||
if (in_array('aggregator', $modules)) {
|
||||
|
@ -211,14 +211,14 @@ function system_test_modules_uninstalled($modules) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_boot().
|
||||
* Implements hook_boot().
|
||||
*/
|
||||
function system_test_boot() {
|
||||
watchdog('system_test', 'hook_boot');
|
||||
}
|
||||
|
||||
/**
|
||||
* Implement hook_init().
|
||||
* Implements hook_init().
|
||||
*/
|
||||
function system_test_init() {
|
||||
// Used by FrontPageTestCase to get the results of drupal_is_front_page().
|
||||
|
@ -228,14 +228,14 @@ function system_test_init() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_exit().
|
||||
* Implements hook_exit().
|
||||
*/
|
||||
function system_test_exit() {
|
||||
watchdog('system_test', 'hook_exit');
|
||||
}
|
||||
|
||||
/**
|
||||
* Implement hook_system_info_alter().
|
||||
* Implements hook_system_info_alter().
|
||||
*/
|
||||
function system_test_system_info_alter(&$info, $file, $type) {
|
||||
// We need a static otherwise the last test will fail to alter common_test.
|
||||
|
@ -282,7 +282,7 @@ function system_test_lock_exit() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_page_build().
|
||||
* Implements hook_page_build().
|
||||
*/
|
||||
function system_test_page_build(&$page) {
|
||||
$menu_item = menu_get_item();
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_schema().
|
||||
* Implements hook_schema().
|
||||
*/
|
||||
function taxonomy_test_schema() {
|
||||
$schema['taxonomy_term_antonym'] = array(
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_taxonomy_term_load().
|
||||
* Implements hook_taxonomy_term_load().
|
||||
*/
|
||||
function taxonomy_test_taxonomy_term_load($terms) {
|
||||
foreach ($terms as $term) {
|
||||
|
@ -19,7 +19,7 @@ function taxonomy_test_taxonomy_term_load($terms) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_taxonomy_term_insert().
|
||||
* Implements hook_taxonomy_term_insert().
|
||||
*/
|
||||
function taxonomy_test_taxonomy_term_insert($term) {
|
||||
if (!empty($term->antonym)) {
|
||||
|
@ -33,7 +33,7 @@ function taxonomy_test_taxonomy_term_insert($term) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_taxonomy_term_update().
|
||||
* Implements hook_taxonomy_term_update().
|
||||
*/
|
||||
function taxonomy_test_taxonomy_term_update($term) {
|
||||
if (!empty($term->antonym)) {
|
||||
|
@ -47,7 +47,7 @@ function taxonomy_test_taxonomy_term_update($term) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_taxonomy_term_delete().
|
||||
* Implements hook_taxonomy_term_delete().
|
||||
*/
|
||||
function taxonomy_test_taxonomy_term_delete($term) {
|
||||
db_delete('taxonomy_term_antonym')
|
||||
|
@ -56,7 +56,7 @@ function taxonomy_test_taxonomy_term_delete($term) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_form_alter().
|
||||
* Implements hook_form_alter().
|
||||
*/
|
||||
function taxonomy_test_form_alter(&$form, $form_state, $form_id) {
|
||||
if ($form_id == 'taxonomy_form_term') {
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_url_inbound_alter().
|
||||
* Implements hook_url_inbound_alter().
|
||||
*/
|
||||
function url_alter_test_url_inbound_alter(&$path, $original_path, $path_language) {
|
||||
// Rewrite user/username to user/uid.
|
||||
|
@ -25,7 +25,7 @@ function url_alter_test_url_inbound_alter(&$path, $original_path, $path_language
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_url_outbound_alter().
|
||||
* Implements hook_url_outbound_alter().
|
||||
*/
|
||||
function url_alter_test_url_outbound_alter(&$path, &$options, $original_path) {
|
||||
// Rewrite user/uid to user/username.
|
||||
|
|
|
@ -47,7 +47,7 @@ function xmlrpc_test_simpleStructReturnTest($number) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_xmlrpc()
|
||||
* Implements hook_xmlrpc().
|
||||
*/
|
||||
function xmlrpc_test_xmlrpc() {
|
||||
return array(
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_uninstall().
|
||||
* Implements hook_uninstall().
|
||||
*/
|
||||
function statistics_uninstall() {
|
||||
// Remove variables.
|
||||
|
@ -21,7 +21,7 @@ function statistics_uninstall() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_schema().
|
||||
* Implements hook_schema().
|
||||
*/
|
||||
function statistics_schema() {
|
||||
$schema['accesslog'] = array(
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_help().
|
||||
* Implements hook_help().
|
||||
*/
|
||||
function statistics_help($path, $arg) {
|
||||
switch ($path) {
|
||||
|
@ -44,7 +44,7 @@ function statistics_help($path, $arg) {
|
|||
|
||||
|
||||
/**
|
||||
* Implement hook_exit().
|
||||
* Implements hook_exit().
|
||||
*
|
||||
* This is where statistics are gathered on page accesses.
|
||||
*/
|
||||
|
@ -87,7 +87,7 @@ function statistics_exit() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_permission().
|
||||
* Implements hook_permission().
|
||||
*/
|
||||
function statistics_permission() {
|
||||
return array(
|
||||
|
@ -104,7 +104,7 @@ function statistics_permission() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_node_view().
|
||||
* Implements hook_node_view().
|
||||
*/
|
||||
function statistics_node_view($node, $build_mode) {
|
||||
if ($build_mode != 'rss') {
|
||||
|
@ -125,7 +125,7 @@ function statistics_node_view($node, $build_mode) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_menu().
|
||||
* Implements hook_menu().
|
||||
*/
|
||||
function statistics_menu() {
|
||||
$items['admin/reports/hits'] = array(
|
||||
|
@ -198,7 +198,7 @@ function statistics_menu() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_user_cancel().
|
||||
* Implements hook_user_cancel().
|
||||
*/
|
||||
function statistics_user_cancel($edit, $account, $method) {
|
||||
switch ($method) {
|
||||
|
@ -218,7 +218,7 @@ function statistics_user_cancel($edit, $account, $method) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_cron().
|
||||
* Implements hook_cron().
|
||||
*/
|
||||
function statistics_cron() {
|
||||
$statistics_timestamp = variable_get('statistics_day_timestamp', '');
|
||||
|
@ -297,7 +297,7 @@ function statistics_get($nid) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_block_info().
|
||||
* Implements hook_block_info().
|
||||
*/
|
||||
function statistics_block_info() {
|
||||
if (variable_get('statistics_count_content_views', 0)) {
|
||||
|
@ -309,7 +309,7 @@ function statistics_block_info() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_block_configure().
|
||||
* Implements hook_block_configure().
|
||||
*/
|
||||
function statistics_block_configure($delta = '') {
|
||||
// Popular content block settings
|
||||
|
@ -321,7 +321,7 @@ function statistics_block_configure($delta = '') {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_block_save().
|
||||
* Implements hook_block_save().
|
||||
*/
|
||||
function statistics_block_save($delta = '', $edit = array()) {
|
||||
variable_set('statistics_block_top_day_num', $edit['statistics_block_top_day_num']);
|
||||
|
@ -330,7 +330,7 @@ function statistics_block_save($delta = '', $edit = array()) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_block_view().
|
||||
* Implements hook_block_view().
|
||||
*/
|
||||
function statistics_block_view($delta = '') {
|
||||
if (user_access('access content')) {
|
||||
|
@ -377,7 +377,7 @@ function _statistics_format_item($title, $path) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_node_delete().
|
||||
* Implements hook_node_delete().
|
||||
*/
|
||||
function statistics_node_delete($node) {
|
||||
// clean up statistics table when node is deleted
|
||||
|
@ -387,7 +387,7 @@ function statistics_node_delete($node) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_ranking().
|
||||
* Implements hook_ranking().
|
||||
*/
|
||||
function statistics_ranking() {
|
||||
if (variable_get('statistics_count_content_views', 0)) {
|
||||
|
@ -409,7 +409,7 @@ function statistics_ranking() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_update_index().
|
||||
* Implements hook_update_index().
|
||||
*/
|
||||
function statistics_update_index() {
|
||||
variable_set('node_cron_views_scale', 1.0 / max(1, db_query('SELECT MAX(totalcount) FROM {node_counter}')->fetchField()));
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Implement hook_token_info().
|
||||
* Implements hook_token_info().
|
||||
*/
|
||||
function statistics_token_info() {
|
||||
$node['views'] = array(
|
||||
|
@ -30,7 +30,7 @@ function statistics_token_info() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implement hook_tokens().
|
||||
* Implements hook_tokens().
|
||||
*/
|
||||
function statistics_tokens($type, $tokens, array $data = array(), array $options = array()) {
|
||||
$url_options = array('absolute' => TRUE);
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue