Exemplo n.º 1
0
function ninja_forms_register_sidebar_visual_editor()
{
    $args = array('name' => 'User Profile Fields', 'page' => 'ninja-forms', 'tab' => 'field_settings', 'display_function' => 'ninja_forms_sidebar_display_fields');
    if (function_exists('ninja_forms_register_sidebar')) {
        ninja_forms_register_sidebar('user_profile_fields', $args);
    }
}
Exemplo n.º 2
0
function ninja_forms_register_sidebar_post_fields()
{
    $args = array('name' => 'Post Creation Fields', 'page' => 'ninja-forms', 'tab' => 'field_settings', 'display_function' => 'ninja_forms_sidebar_display_fields');
    if (function_exists('ninja_forms_register_sidebar')) {
        ninja_forms_register_sidebar('post_fields', $args);
    }
}
Exemplo n.º 3
0
function ninja_forms_register_sidebar_select_subs()
{
    $args = array('name' => __('Find Submissions', 'ninja-forms'), 'page' => 'ninja-forms-subs', 'tab' => 'view_subs', 'display_function' => 'ninja_forms_sidebar_select_subs', 'save_function' => 'ninja_forms_save_sidebar_select_subs');
    ninja_forms_register_sidebar('select_subs', $args);
    if (is_admin() and isset($_REQUEST['page']) and $_REQUEST['page'] == 'ninja-forms-subs') {
        if (!isset($_REQUEST['paged']) and !isset($_REQUEST['form_id'])) {
            unset($_SESSION['ninja_forms_form_id']);
            unset($_SESSION['ninja_forms_begin_date']);
            unset($_SESSION['ninja_forms_end_date']);
        }
    }
}
Exemplo n.º 4
0
function ninja_forms_register_sidebar_select_uploads()
{
    $args = array('name' => 'Find File Uploads', 'page' => 'ninja-forms-uploads', 'tab' => 'browse_uploads', 'display_function' => 'ninja_forms_sidebar_select_uploads', 'save_function' => 'ninja_forms_save_sidebar_select_uploads');
    if (function_exists('ninja_forms_register_sidebar')) {
        ninja_forms_register_sidebar('select_uploads', $args);
    }
    if (is_admin() and isset($_REQUEST['page']) and $_REQUEST['page'] == 'ninja-forms-uploads') {
        if (!isset($_REQUEST['paged']) and !isset($_REQUEST['form_id'])) {
            unset($_SESSION['ninja_forms_form_id']);
            unset($_SESSION['ninja_forms_begin_date']);
            unset($_SESSION['ninja_forms_end_date']);
            unset($_SESSION['ninja_forms_upload_types']);
            unset($_SESSION['ninja_forms_upload_name']);
            unset($_SESSION['ninja_forms_upload_user']);
        }
    }
}
Exemplo n.º 5
0
 function ninja_forms_register_sidebar_post_fields()
 {
     $add_field = apply_filters('ninja_forms_use_post_fields', false);
     if (!$add_field) {
         return false;
     }
     if (isset($_REQUEST['form_id'])) {
         $form_id = absint($_REQUEST['form_id']);
     } else {
         $form_id = '';
     }
     if (function_exists('ninja_forms_get_current_tab')) {
         $current_tab = ninja_forms_get_current_tab();
     }
     if ($form_id != '' and $current_tab == 'fields') {
         $form_row = ninja_forms_get_form_by_id($form_id);
         if (is_array($form_row) and !empty($form_row)) {
             $form_data = $form_row['data'];
             if (isset($form_data['create_post'])) {
                 $create_post = $form_data['create_post'];
             } else {
                 $create_post = '';
             }
         } else {
             $create_post = '';
         }
     } else {
         $create_post = '';
     }
     $args = array('name' => 'Post Creation Fields', 'page' => 'ninja-forms', 'tab' => 'builder', 'display_function' => 'ninja_forms_sidebar_display_fields');
     if ($create_post == 1) {
         if (function_exists('ninja_forms_register_sidebar')) {
             ninja_forms_register_sidebar('post_fields', $args);
         }
     }
 }
Exemplo n.º 6
0
function ninja_forms_register_sidebar_user_info_fields()
{
    $args = array('name' => __('User Information', 'ninja-forms'), 'page' => 'ninja-forms', 'tab' => 'builder', 'display_function' => 'ninja_forms_sidebar_user_info_fields');
    ninja_forms_register_sidebar('user_info', $args);
}
Exemplo n.º 7
0
function ninja_forms_register_sidebar_template_fields()
{
    $args = array('name' => __('Template Fields', 'ninja-forms'), 'page' => 'ninja-forms', 'tab' => 'builder', 'display_function' => 'ninja_forms_sidebar_display_fields');
    ninja_forms_register_sidebar('template_fields', $args);
}
Exemplo n.º 8
0
function ninja_forms_register_sidebar_fav_fields()
{
    $args = array('name' => __('Favorite Fields', 'ninja-forms'), 'page' => 'ninja-forms', 'tab' => 'field_settings', 'display_function' => 'ninja_forms_sidebar_fav_fields');
    ninja_forms_register_sidebar('fav_fields', $args);
}
Exemplo n.º 9
0
function ninja_forms_register_sidebar_payment_fields()
{
    $args = array('name' => __('Payment Fields', 'ninja-forms'), 'page' => 'ninja-forms', 'tab' => 'field_settings', 'display_function' => 'ninja_forms_sidebar_payment_fields');
    ninja_forms_register_sidebar('payment_fields', $args);
}
Exemplo n.º 10
0
 /**
  * Load our custom field settings tab to hold all of our fields
  */
 function load_field_settings_tab()
 {
     // check to make sure that the function exists (aka plugin is loaded)
     if (function_exists('ninja_forms_register_sidebar')) {
         // now register the new sidebar
         $args = array('name' => __('User Analytics Fields', 'ninja-forms-ua'), 'page' => 'ninja-forms', 'tab' => 'field_settings', 'display_function' => 'ninja_forms_sidebar_display_fields');
         ninja_forms_register_sidebar('user_analytics_fields', $args);
     }
 }
Exemplo n.º 11
0
function ninja_forms_register_sidebar_layout_fields()
{
    $args = array('name' => __('Layout Elements', 'ninja-forms'), 'page' => 'ninja-forms', 'tab' => 'builder', 'display_function' => 'ninja_forms_sidebar_display_fields');
    ninja_forms_register_sidebar('layout_fields', $args);
}
Exemplo n.º 12
0
function ninja_forms_register_sidebar_def_fields()
{
    $args = array('name' => __('Defined Fields', 'ninja-forms'), 'page' => 'ninja-forms', 'tab' => 'builder', 'display_function' => 'ninja_forms_sidebar_def_fields');
    ninja_forms_register_sidebar('def_fields', $args);
}