Created
November 13, 2014 13:00
-
-
Save angry-dan/539203466e769942c599 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // If you are unfortunate enough to still be using nodequeues (see entity queue) | |
| // this will should work for creating new queues: | |
| // Note I built the array from a drupal_var_export and a nodequeue load operation | |
| // Then I added the add_subqueue argument and removed the qid (both mandatory). | |
| function mymodule_update_N() { | |
| $queue = (object) array( | |
| 'name' => 'machine_name', | |
| 'title' => 'Queue name', | |
| 'subqueue_title' => '', | |
| 'size' => '0', // For infinate | |
| 'link' => 'Link title when adding to the queue', | |
| 'link_remove' => 'Link title when removing from queue', | |
| 'owner' => 'nodequeue', | |
| 'show_in_ui' => '1', | |
| 'show_in_tab' => '1', | |
| 'show_in_links' => '1', | |
| 'reference' => '0', | |
| 'reverse' => '1', | |
| 'i18n' => '0', | |
| 'subqueues' => '1', | |
| 'types' => array( | |
| 'applicable_content_type_machine_names', | |
| ), | |
| 'roles' => array( | |
| '4', // Allowed role IDs | |
| ), | |
| 'count' => 0, | |
| 'add_subqueue' => array(0 => 'Promotions'), | |
| ); | |
| nodequeue_save($queue); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment