Fix for Fix for drupal_execute

  1. Thank you very much to my friend Mariano D'Agostino of Cuenco Digital (http: // cuencodigital.com/) for having said the errors to me in the code, this one is the new code fixed that Marian gave me (that works very well):
  2.  
  3. <?php
  4. module_load_include('inc', 'menu', 'menu.admin');
  5. $menu_custom = array(
  6. 'menu_name' => 'menucustomtest',
  7. 'title' => 'Menu Custom Test',
  8. 'description' => 'Esta es una prueba de crear menus custom desde linea de programacion'
  9. );
  10.  
  11. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  12. /// Créer le menu     
  13. $form_state = array();
  14. $form_state['values']['menu_name'] = $menu_custom[menu_name];
  15. $form_state['values']['title'] = $menu_custom[title];
  16. $form_state['values']['description'] = $menu_custom[description];
  17. drupal_execute('menu_edit_menu', $form_state, (object)$menu_custom);
  18. ?>
  19.  
  20. Mariano Thanks for always being willing to help.

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.