home | career | drupal | java | mac | mysql | perl | php | scala | uml | unix

Drupal example source code file (taxonomy_menu.inc)

This example Drupal source code file (taxonomy_menu.inc) is included in the DevDaily.com "Drupal Source Code Warehouse" project. The intent of this project is to help you "Learn Drupal by Example".

PHP - Drupal tags/keywords

arg, args, array, elseif, function, if, is_numeric, isset, php, return, taxonomy_menu_nodewords_type_id, variable

The taxonomy_menu.inc Drupal example source code

<?php
// $Id: taxonomy_menu.inc,v 1.1.4.5 2009/12/29 08:35:13 kiam Exp $

/**
 * @file
 * Integration file for taxonomy_menu.module.
 */

/**
 * @addtogroup nodewords
 * @{
 */

/**
 * Implements hook_nodewords_type_id().
 */
function taxonomy_menu_nodewords_type_id($arg) {
  if ($arg[0] == 'taxonomy_menu') {
    // Taxonomy menu paths: taxonomy_menu/$vid, taxonomy_menu/$vid/$tid.
    if (isset($arg[2]) && is_numeric($arg[2])) {
      return array(NODEWORDS_TYPE_TERM, array($arg[2]));
    }
    elseif (isset($arg[1]) && is_numeric($arg[1])) {
      return array(NODEWORDS_TYPE_VOCABULARY, array($arg[1]));
    }
  }
}

/**
 * @} End of "addtogroup nodewords".
 */

Other Drupal examples (source code examples)

Here is a short list of links related to this Drupal taxonomy_menu.inc source code file:

new blog posts

"Drupal" is a registered trademark of Dries Buytaert.

my drupal tutorials and examples  

Copyright 1998-2016 Alvin Alexander, alvinalexander.com
All Rights Reserved.

Beginning in 2016, a portion of the proceeds from pages under the '/drupal-code-examples/' URI will be donated to charity.