Fix for values can be either strings or arrays even single-value arrays

  1. <?php
  2. // $Id$
  3.  
  4. /**
  5.  * @file
  6.  * Hooks provided by the RDF module.
  7.  */
  8.  
  9. /**
  10.  * @addtogroup hooks
  11.  * @{
  12.  */
  13.  
  14. /**
  15.  * Allow modules to define their own RDF mappings.
  16.  *
  17.  * @return
  18.  *   An associative array of mappings. Most keys will be bundle names, but
  19.  *   mappings can also be defined for non-bundles.
  20.  */
  21. function hook_rdf_mapping() {
  22.   return array(
  23.     'blog' => array(
  24.       'rdftype' => 'sioc:Post',
  25.       'title'   => array('dc:title'),
  26.       'created' => 'dc:date',
  27.       'name'    => array('dc:creator', 'foaf:Person'),
  28.       'uid'     => 'sioc:has_creator',
  29.     )
  30.   );
  31. }
  32.  
  33. /**
  34.  * Allow modules to override existing mappings.
  35.  *  
  36.  * @param $mappings
  37.  *   An associative array of mappings
  38.  * @return
  39.  *   void
  40.  *
  41.  */
  42. function hook_rdf_mapping_alter(&$mapping) {
  43. }
  44.  
  45. /**
  46.  * @} End of "addtogroup hooks".
  47.  */

Submit Fix

Any tags you'd like to associate with your code, delimitered by commas (example: Views, CCK, Module, etc).
Select the syntax highlighting mode to use.