Last active
November 6, 2015 01:41
-
-
Save kporras07/22c2487ccee52648c8bb to your computer and use it in GitHub Desktop.
Create Nodequeue
This file contains 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
/** | |
* Helper function that creates the default nodequeues. | |
*/ | |
function demo_create_default_nodequeues() { | |
$queue = nodequeue_load_queue_by_name('nodequeue_name'); | |
if (!$queue) { | |
$nodequeue = new stdClass(); | |
$nodequeue->name = 'nodequeue_name'; | |
$nodequeue->title = 'My Nodequeue'; | |
$nodequeue->subqueue_title = ''; | |
$nodequeue->size = 3; | |
$nodequeue->link = ''; | |
$nodequeue->link_remove = ''; | |
$nodequeue->owner = 'nodequeue'; | |
$nodequeue->show_in_links = 0; | |
$nodequeue->show_in_tab = 1; | |
$nodequeue->show_in_ui = 1; | |
$nodequeue->i18n = 0; | |
$nodequeue->reverse = 0; | |
$nodequeue->reference = 0; | |
$nodequeue->insert_at_front = TRUE; | |
$nodequeue->subqueues = 1; | |
$nodequeue->roles = array(); | |
$nodequeue->types = array('event'); | |
$nodequeue->add_subqueue = array('My Nodequeue'); | |
nodequeue_save($nodequeue); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment