Last active
November 4, 2015 11:49
-
-
Save gwin/c7cf03ccc1b1c23eafad to your computer and use it in GitHub Desktop.
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
<?php | |
add_filter("wpjb_form_init_alert", "my_form_init_alert"); | |
function my_form_init_alert($form) { | |
$e = $form->create("frequency", "select"); | |
$e->addOption("1", "1", "Daily"); | |
$e->addOption("2", "2", "Weekly"); | |
$e->addClass("wpjb-widget-alert-frequency"); | |
$form->addElement($e, "alert"); | |
$e = $form->create("location"); | |
$e->setAttr("placeholder", "Location"); | |
$e->addClass("wpjb-widget-alert-param"); | |
$form->addElement($e, "alert"); | |
wp_enqueue_script("wpjb-vendor-selectlist"); | |
$e = $form->create("category", "select"); | |
$e->addOptions(wpjb_form_get_categories()); | |
$e->setEmptyOption(true); | |
$e->setMaxChoices(10); | |
$form->addElement($e, "alert"); | |
return $form; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment