• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP ninja_forms_register_tab_metabox函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中ninja_forms_register_tab_metabox函数的典型用法代码示例。如果您正苦于以下问题:PHP ninja_forms_register_tab_metabox函数的具体用法?PHP ninja_forms_register_tab_metabox怎么用?PHP ninja_forms_register_tab_metabox使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了ninja_forms_register_tab_metabox函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: ninja_forms_register_feditor_post_settings_metabox

function ninja_forms_register_feditor_post_settings_metabox()
{
    //Get an array of post types for our post type option.
    $post_types = get_post_types();
    //Remove the built-in post types that we aren't using.
    unset($post_types['nav_menu_item']);
    unset($post_types['mediapage']);
    unset($post_types['attachment']);
    unset($post_types['revision']);
    //Loop through the remaining post types and put the array in ['name'] and ['value'] format.
    $tmp_array = array();
    $x = 0;
    foreach ($post_types as $type) {
        $type_obj = get_post_type_object($type);
        $tmp_array[$x]['name'] = $type_obj->labels->singular_name;
        $tmp_array[$x]['value'] = $type_obj->name;
        $x++;
    }
    $post_types = $tmp_array;
    //Get a list of user roles
    $all_roles = get_editable_roles();
    //Reset the tmp_array variable to store our user roles array
    $tmp_array = array();
    $tmp_array[] = array('name' => __('Non-logged in user', 'ninja-forms-feditor'), 'value' => '_none');
    foreach ($all_roles as $key => $role) {
        $tmp_array[] = array('name' => $role['name'], 'value' => $key);
    }
    $all_roles = $tmp_array;
    $args = array('page' => 'ninja-forms', 'tab' => 'form_settings', 'slug' => 'create_post', 'title' => __('Post creation settings', 'ninja-forms-feditor'), 'display_function' => '', 'state' => 'closed', 'settings' => array(array('name' => 'create_post', 'type' => 'checkbox', 'desc' => '', 'label' => __('Create Post From Input?', 'ninja-forms-feditor'), 'display_function' => '', 'help' => __('If this box is checked, Ninja Forms will create a post from user input.', 'ninja-forms-feditor'), 'default' => 0), array('name' => 'post_as', 'type' => '', 'desc' => '', 'label' => __('Users must be logged in to create post?', 'ninja-forms-feditor'), 'display_function' => 'ninja_forms_metabox_post_as', 'help' => ''), array('name' => 'post_status', 'type' => 'select', 'options' => array(array('name' => 'Draft', 'value' => 'draft'), array('name' => 'Pending', 'value' => 'pending'), array('name' => 'Publish', 'value' => 'publish')), 'desc' => '', 'label' => __('Select a post status', 'ninja-forms-feditor'), 'display_function' => '', 'help' => ''), array('name' => 'post_type', 'type' => 'select', 'desc' => '', 'options' => $post_types, 'label' => __('Select a post type', 'ninja-forms-feditor'), 'display_function' => '', 'help' => '', 'class' => 'ninja-forms-post-type'), array('name' => 'comment_status', 'type' => 'checkbox', 'label' => __('Allow Comments', 'ninja-forms-feditor')), array('name' => 'before_post_terms', 'type' => '', 'label' => '', 'display_function' => 'ninja_forms_metabox_before_post_terms'), array('name' => 'post_terms', 'type' => '', 'desc' => '', 'label' => __('Default post terms', 'ninja-forms-feditor'), 'display_function' => 'ninja_forms_metabox_post_terms', 'help' => ''), array('name' => 'post_tags', 'type' => 'text', 'label' => __('Default post tags', 'ninja-forms-feditor'), 'display_function' => '', 'help' => '', 'desc' => __('Comma separated list', 'ninja-forms-feditor')), array('name' => 'post_title', 'type' => 'text', 'label' => __('Default post title', 'ninja-forms-feditor')), array('name' => 'post_content', 'type' => 'rte', 'label' => __('Default Post Content', 'ninja-forms-feditor'), 'display_function' => ''), array('name' => 'post_content_location', 'type' => 'radio', 'label' => __('Where should the default content be placed?', 'ninja-forms-feditor'), 'options' => array(array('name' => 'Before user submitted content', 'value' => 'prepend'), array('name' => 'After user submitted content', 'value' => 'append')), 'desc' => __('If you do not have a "Post Content" field in your form, the default content will be used instead of the main content.', 'ninja-forms-feditor')), array('name' => 'post_excerpt', 'type' => 'rte', 'label' => __('Default Post Excerpt', 'ninja-forms-feditor'), 'display_function' => ''), array('name' => '', 'type' => '', 'display_function' => 'ninja_forms_feditor_metabox_hr'), array('name' => 'enable_post_edit', 'type' => 'checkbox', 'label' => __('Enable Front-End Post Editing', 'ninja-forms-feditor'), 'desc' => __('If this box is unchecked, users will NOT be able to edit this post, regardless of rules settings.', 'ninja-forms-feditor'), 'default_value' => 1), array('name' => 'override_post_edit', 'type' => 'checkbox', 'label' => __('Override Editing Rules Settings', 'ninja-forms-feditor'), 'desc' => __('If this box is checked, the settings below will override any rules settings that may apply.', 'ninja-forms-feditor')), array('name' => 'enable_post_delete', 'type' => 'checkbox', 'label' => __('Allow Users To Delete This Post', 'ninja-forms-feditor'), 'desc' => __('This setting will only be used if the "Override" option above is set.', 'ninja-forms-feditor')), array('name' => 'post_edit_author', 'type' => 'checkbox', 'label' => __('Allow the author to edit this post', 'ninja-forms-feditor'), 'desc' => __('This setting will only be used if the "Override" option above is set.', 'ninja-forms-feditor')), array('name' => '', 'type' => '', 'label' => '', 'display_function' => 'ninja_forms_feditor_metabox_post_edit_users', 'desc' => __('This setting will only be used if the "Override" option above is set.', 'ninja-forms-feditor')), array('name' => 'post_edit_roles', 'type' => 'checkbox_list', 'label' => __('Allow these roles to edit', 'ninja-forms-feditor'), 'options' => $all_roles, 'desc' => __('This setting will only be used if the "Override" option above is set.', 'ninja-forms-feditor'))));
    if (function_exists('ninja_forms_register_tab_metabox')) {
        ninja_forms_register_tab_metabox($args);
    }
}
开发者ID:emtv,项目名称:hackmsi,代码行数:33,代码来源:post-settings-metabox.php


示例2: register_settings

 public function register_settings()
 {
     $args = array('page' => 'ninja-forms-uploads', 'tab' => 'external_settings', 'slug' => $this->slug . '_settings', 'title' => sprintf(__('%s Settings', 'ninja-forms-uploads'), $this->title), 'settings' => $this->settings);
     if (function_exists('ninja_forms_register_tab_metabox')) {
         ninja_forms_register_tab_metabox($args);
     }
 }
开发者ID:seancho0420,项目名称:globalink,代码行数:7,代码来源:external.php


示例3: ninja_forms_register_upload_settings_metabox

function ninja_forms_register_upload_settings_metabox()
{
    $args = array('page' => 'ninja-forms-uploads', 'tab' => 'upload_settings', 'slug' => 'upload_settings', 'title' => __('Upload Settings', 'ninja-forms'), 'settings' => array(array('name' => 'max_file_size', 'type' => 'text', 'label' => __('Max File Size (in MB)', 'ninja-forms'), 'desc' => ''), array('name' => 'upload_error', 'type' => 'text', 'label' => __('File upload error message', 'ninja-forms'), 'desc' => ''), array('name' => 'adv_settings', 'type' => '', 'display_function' => 'ninja_forms_upload_settings_adv')));
    if (function_exists('ninja_forms_register_tab_metabox')) {
        ninja_forms_register_tab_metabox($args);
    }
}
开发者ID:emtv,项目名称:hackmsi,代码行数:7,代码来源:upload-settings.php


示例4: ninja_forms_register_feditor_sub_settings_metabox

function ninja_forms_register_feditor_sub_settings_metabox()
{
    $all_roles = get_editable_roles();
    $tmp_array = array();
    if (is_array($all_roles) and !empty($all_roles)) {
        foreach ($all_roles as $key => $role) {
            $tmp_array[] = array('name' => $role['name'], 'value' => $key);
        }
    }
    $all_roles = $tmp_array;
    $edit_table_cols = array();
    if (isset($_REQUEST['form_id'])) {
        $form_id = $_REQUEST['form_id'];
        $fields = ninja_forms_get_fields_by_form_id($form_id);
        foreach ($fields as $field) {
            if (isset($field['data']['label'])) {
                $edit_table_cols[] = array('name' => $field['data']['label'], 'value' => $field['id']);
            } else {
                $edit_table_cols[] = array('name' => 'Field ID: ' . $field['id'], 'value' => $field['id']);
            }
        }
    } else {
    }
    $args = array('page' => 'ninja-forms', 'tab' => 'form_settings', 'slug' => 'sub_settings', 'title' => __('Submission management settings', 'ninja-forms-feditor'), 'display_function' => '', 'state' => 'closed', 'settings' => array(array('name' => 'manage_sub', 'type' => 'checkbox', 'label' => __('Enable front-end submission management', 'ninja-forms-feditor'), 'default_value' => 1), array('name' => 'manage_sub_table', 'type' => 'checkbox', 'label' => __('Show submission management table above this form?', 'ninja-forms-feditor'), 'default_value' => 1), array('name' => 'manage_sub_table_cols', 'type' => 'multi_select', 'label' => __('Use these fields as table columns', 'ninja-forms-feditor'), 'options' => $edit_table_cols, 'size' => 10, 'desc' => __('Use CTRL + click to select multiple fields (COMMAND + click for Mac users). The number of field columns you want will depend upon the size of your field labels and values. Three is a good, standard value.', 'ninja-forms-feditor')), array('name' => 'manage_sub_hide_form', 'type' => 'checkbox', 'label' => __('Hide this form when a user has submissions to manage', 'ninja-forms-feditor')), array('name' => 'override_sub_rules', 'type' => 'checkbox', 'label' => __('Override rules settings', 'ninja-forms-feditor')), array('name' => '', 'type' => '', 'label' => '', 'display_function' => 'ninja_forms_feditor_sub_settings_user_list'), array('name' => 'manage_sub_roles', 'type' => 'checkbox_list', 'select_all' => false, 'options' => $all_roles, 'label' => __('Allow these roles', 'ninja-forms')), array('name' => 'edit_sub', 'type' => 'checkbox', 'label' => __('To Edit Submissions', 'ninja-forms-feditor')), array('name' => 'delete_sub', 'type' => 'checkbox', 'label' => __('To Delete Submissions', 'ninja-forms-feditor'))));
    if (function_exists('ninja_forms_register_tab_metabox')) {
        ninja_forms_register_tab_metabox($args);
    }
}
开发者ID:emtv,项目名称:hackmsi,代码行数:28,代码来源:sub-settings-metabox.php


示例5: ninja_forms_register_form_settings_basic_metabox

function ninja_forms_register_form_settings_basic_metabox()
{
    if (isset($_REQUEST['form_id'])) {
        $form_id = absint($_REQUEST['form_id']);
        $form_data = Ninja_Forms()->form($form_id)->get_all_settings();
    } else {
        $form_id = '';
        $form_row = '';
        $form_data = '';
    }
    $pages = get_pages();
    $pages_array = array();
    $append_array = array();
    array_push($pages_array, array('name' => __('- None', 'ninja-forms'), 'value' => ''));
    array_push($append_array, array('name' => __('- None', 'ninja-forms'), 'value' => ''));
    foreach ($pages as $pagg) {
        array_push($pages_array, array('name' => $pagg->post_title, 'value' => get_page_link($pagg->ID)));
        array_push($append_array, array('name' => $pagg->post_title, 'value' => $pagg->ID));
    }
    if (isset($form_data['ajax'])) {
        $ajax = $form_data['ajax'];
    } else {
        $ajax = 0;
    }
    $args = apply_filters('ninja_forms_form_settings_basic', array('page' => 'ninja-forms', 'tab' => 'form_settings', 'slug' => 'basic_settings', 'title' => __('Display', 'ninja-forms'), 'state' => 'closed', 'settings' => array(array('name' => 'form_title', 'type' => 'text', 'label' => __('Form Title', 'ninja-forms')), array('name' => 'show_title', 'type' => 'checkbox', 'label' => __('Display Form Title', 'ninja-forms')), array('name' => 'append_page', 'type' => 'select', 'desc' => '', 'label' => __('Add form to this page', 'ninja-forms'), 'display_function' => '', 'help' => '', 'options' => $append_array), array('name' => 'ajax', 'type' => 'checkbox', 'desc' => '', 'label' => __('Submit via AJAX (without page reload)?', 'ninja-forms'), 'display_function' => '', 'help' => ''), array('name' => 'clear_complete', 'type' => 'checkbox', 'desc' => '', 'label' => __('Clear successfully completed form?', 'ninja-forms'), 'display_function' => '', 'desc' => __('If this box is checked, Ninja Forms will clear the form values after it has been successfully submitted.', 'ninja-forms'), 'default_value' => 1), array('name' => 'hide_complete', 'type' => 'checkbox', 'desc' => '', 'label' => __('Hide successfully completed form?', 'ninja-forms'), 'display_function' => '', 'desc' => __('If this box is checked, Ninja Forms will hide the form after it has been successfully submitted.', 'ninja-forms'), 'default_value' => 1))));
    ninja_forms_register_tab_metabox($args);
    $args = apply_filters('ninja_forms_form_settings_restrictions', array('page' => 'ninja-forms', 'tab' => 'form_settings', 'slug' => 'restrictions', 'title' => __('Restrictions', 'ninja-forms'), 'state' => 'closed', 'settings' => array(array('name' => 'logged_in', 'type' => 'checkbox', 'desc' => '', 'label' => __('Require user to be logged in to view form?', 'ninja-forms'), 'display_function' => '', 'help' => ''), array('name' => 'not_logged_in_msg', 'type' => 'rte', 'label' => __('Not Logged-In Message', 'ninja-forms'), 'desc' => __('Message shown to users if the "logged in" checkbox above is checked and they are not logged-in.', 'ninja-forms'), 'tr_class' => ''), array('name' => 'sub_limit_number', 'type' => 'number', 'desc' => '', 'label' => __('Limit Submissions', 'ninja-forms'), 'display_function' => '', 'desc' => __('Select the number of submissions that this form will accept. Leave empty for no limit.', 'ninja-forms'), 'default_value' => '', 'tr_class' => '', 'min' => 0), array('name' => 'sub_limit_msg', 'type' => 'rte', 'label' => __('Limit Reached Message', 'ninja-forms'), 'desc' => __('Please enter a message that you want displayed when this form has reached its submission limit and will not accept new submissions.', 'ninja-forms'), 'tr_class' => ''))));
    ninja_forms_register_tab_metabox($args);
}
开发者ID:ramiy,项目名称:ninja-forms,代码行数:29,代码来源:form-settings.php


示例6: ninja_forms_register_upload_settings_metabox

function ninja_forms_register_upload_settings_metabox()
{
    $max_filesize = nf_return_mb(ini_get('upload_max_filesize'));
    $args = array('page' => 'ninja-forms-uploads', 'tab' => 'upload_settings', 'slug' => 'upload_settings', 'title' => __('Upload Settings', 'ninja-forms-uploads'), 'settings' => array(array('name' => 'max_filesize', 'type' => 'text', 'label' => __('Max File Size (in MB)', 'ninja-forms-uploads'), 'desc' => sprintf(__('Your server\'s maximum file size is set to %s. This setting cannot be increased beyond this value. To increase your server file size limit, please contact your host.', 'ninja-forms-uploads'), $max_filesize)), array('name' => 'upload_error', 'type' => 'text', 'label' => __('File upload error message', 'ninja-forms-uploads'), 'desc' => ''), array('name' => 'adv_settings', 'type' => '', 'display_function' => 'ninja_forms_upload_settings_adv')));
    if (function_exists('ninja_forms_register_tab_metabox')) {
        ninja_forms_register_tab_metabox($args);
    }
}
开发者ID:seancho0420,项目名称:globalink,代码行数:8,代码来源:upload-settings.php


示例7: ninja_forms_register_feditor_sub_edit_tab

function ninja_forms_register_feditor_sub_edit_tab()
{
    $args = array('name' => __('Submission Editing', 'ninja-forms-feditor'), 'page' => 'ninja-forms-feditor', 'display_function' => '', 'save_function' => 'ninja_forms_save_feditor_sub_edit', 'show_save' => false);
    if (function_exists('ninja_forms_register_tab')) {
        ninja_forms_register_tab('sub_editing', $args);
    }
    $args = array('page' => 'ninja-forms-feditor', 'tab' => 'sub_editing', 'slug' => 'rules', 'title' => __('Submission Editing Rules', 'ninja-forms-feditor'), 'display_function' => 'ninja_forms_feditor_sub_edit_rules', 'state' => 'closed', 'display_container' => false);
    if (function_exists('ninja_forms_register_tab_metabox')) {
        ninja_forms_register_tab_metabox($args);
    }
}
开发者ID:emtv,项目名称:hackmsi,代码行数:11,代码来源:sub-settings.php


示例8: ninja_forms_register_register_settings_tab

function ninja_forms_register_register_settings_tab()
{
    $args = array('name' => __('Register', 'ninja-forms-feditor'), 'page' => 'ninja-forms-feditor', 'display_function' => '', 'save_function' => 'ninja_forms_save_register_settings', 'tab_reload' => true);
    if (function_exists('ninja_forms_register_tab')) {
        ninja_forms_register_tab('register_settings', $args);
    }
    $args = array('page' => 'ninja-forms-feditor', 'tab' => 'register_settings', 'slug' => 'settings', 'title' => __('Registration Settings', 'ninja-forms-feditor'), 'display_function' => '', 'state' => 'open');
    if (function_exists('ninja_forms_register_tab_metabox')) {
        ninja_forms_register_tab_metabox($args);
    }
}
开发者ID:emtv,项目名称:hackmsi,代码行数:11,代码来源:register-settings.php


示例9: ninja_forms_register_general_settings_metabox

function ninja_forms_register_general_settings_metabox()
{
    $plugin_settings = nf_get_settings();
    if (isset($plugin_settings['version'])) {
        $current_version = $plugin_settings['version'];
    } else {
        $current_version = NF_PLUGIN_VERSION;
    }
    $args = array('page' => 'ninja-forms-settings', 'tab' => 'general_settings', 'slug' => 'general_settings', 'title' => __('General Settings', 'ninja-forms'), 'settings' => array(array('name' => 'version', 'type' => 'desc', 'label' => __('Version', 'ninja-forms'), 'desc' => $current_version), array('name' => 'date_format', 'type' => 'text', 'label' => __('Date Format', 'ninja-forms'), 'desc' => __('e.g. m/d/Y, d/m/Y - Tries to follow the <a href="http://www.php.net/manual/en/function.date.php" target="_blank">PHP date() function</a> specifications, but not every format is supported.', 'ninja-forms')), array('name' => 'currency_symbol', 'type' => 'text', 'label' => __('Currency Symbol', 'ninja-forms'), 'desc' => __('e.g. $, &pound;, &euro;', 'ninja-forms'))));
    ninja_forms_register_tab_metabox($args);
}
开发者ID:serker72,项目名称:T3S,代码行数:11,代码来源:general-settings.php


示例10: ninja_forms_register_mp_settings_metabox

function ninja_forms_register_mp_settings_metabox()
{
    $effects = array(array('name' => 'Blind', 'value' => 'blind'), array('name' => 'Fade', 'value' => 'fade'), array('name' => 'Fold', 'value' => 'fold'), array('name' => 'Slide', 'value' => 'slide'));
    $effects = apply_filters('ninja_forms_mp_ajax_effects_array', $effects);
    $direction = array(array('name' => 'Left to Right', 'value' => 'ltr'), array('name' => 'Right to Left', 'value' => 'rtl'), array('name' => 'Top to Bottom', 'value' => 'ttb'), array('name' => 'Bottom to Top', 'value' => 'btt'));
    $direction = apply_filters('ninja_forms_mp_ajax_directions_array', $direction);
    $args = array('page' => 'ninja-forms', 'tab' => 'form_settings', 'slug' => 'multi_part', 'title' => __('Multi-Part settings', 'ninja-forms-mp'), 'display_function' => '', 'state' => 'closed', 'settings' => array(array('name' => 'multi_part', 'type' => 'checkbox', 'desc' => '', 'label' => __('Enable Multi-Part Form?', 'ninja-forms-mp'), 'display_function' => '', 'help' => __('If this box is checked Ninja Forms will allow multi-part form pages to be created.', 'ninja-forms-mp'), 'default' => 0), array('name' => 'mp_progress_bar', 'type' => 'checkbox', 'desc' => '', 'label' => __('Display Progress Bar?', 'ninja-forms-mp'), 'display_function' => '', 'help' => '', 'default' => 0), array('name' => 'mp_breadcrumb', 'type' => 'checkbox', 'desc' => '', 'label' => __('Display Breadcrumb Navigation?', 'ninja-forms-mp'), 'display_function' => '', 'help' => '', 'default' => 0), array('name' => 'mp_display_titles', 'type' => 'checkbox', 'desc' => '', 'label' => __('Display Page Titles?', 'ninja-forms-mp'), 'display_function' => '', 'help' => '', 'default' => 0), array('name' => 'mp_ajax_effect', 'type' => 'select', 'options' => $effects, 'desc' => '', 'label' => __('Ajax Page Transition Effect', 'ninja-forms-mp'), 'display_function' => '', 'help' => '', 'default_value' => 'slide'), array('name' => 'mp_ajax_direction', 'type' => 'select', 'options' => $direction, 'label' => __('Ajax Page Transition Direction', 'ninja-forms-mp')), array('name' => 'mp_confirm', 'type' => 'checkbox', 'label' => __('Show Review Page', 'ninja-forms-mp'), 'desc' => __('This page will allow your users to review and modify their fields on one page before they submit the form.', 'ninja-forms')), array('name' => 'mp_confirm_msg', 'type' => 'rte', 'label' => __('Review Page Message', 'ninja-forms-mp'), 'desc' => __('This message will be shown to users at the top of the review page.', 'ninja-forms'))), 'save_function' => 'ninja_forms_mp_save_form');
    if (function_exists('ninja_forms_register_tab_metabox')) {
        ninja_forms_register_tab_metabox($args);
    }
}
开发者ID:emtv,项目名称:hackmsi,代码行数:11,代码来源:form-settings-metabox.php


示例11: ninja_forms_register_feditor_registration_settings_metabox

function ninja_forms_register_feditor_registration_settings_metabox($form_id)
{
    $roles_array = array();
    $all_roles = get_editable_roles();
    $roles_array[] = array('name' => __('- None', 'ninja-forms-feditor'), 'value' => '');
    foreach ($all_roles as $key => $role) {
        $roles_array[] = array('name' => $role['name'], 'value' => $key);
    }
    $args = array('page' => 'ninja-forms', 'tab' => 'form_settings', 'slug' => 'registration_settings', 'title' => __('Registration settings', 'ninja-forms-feditor'), 'display_function' => '', 'state' => 'closed', 'settings' => array(array('name' => 'register_user_role', 'type' => 'select', 'options' => $roles_array, 'label' => __('Users register as', 'ninja-forms-feditor'))));
    if (function_exists('ninja_forms_register_tab_metabox')) {
        ninja_forms_register_tab_metabox($args);
    }
}
开发者ID:emtv,项目名称:hackmsi,代码行数:13,代码来源:registration-settings-metabox.php


示例12: ninja_forms_register_general_settings_metabox

function ninja_forms_register_general_settings_metabox()
{
    $plugin_settings = nf_get_settings();
    if (isset($plugin_settings['version'])) {
        $current_version = $plugin_settings['version'];
    } else {
        $current_version = NF_PLUGIN_VERSION;
    }
    $args = array('page' => 'ninja-forms-settings', 'tab' => 'general_settings', 'slug' => 'general_settings', 'title' => __('General Settings', 'ninja-forms'), 'settings' => array(array('name' => 'version', 'type' => 'desc', 'label' => __('Version', 'ninja-forms'), 'desc' => $current_version), array('name' => 'date_format', 'type' => 'text', 'label' => __('Date Format', 'ninja-forms'), 'desc' => 'e.g. m/d/Y, d/m/Y - ' . sprintf(__('Tries to follow the %sPHP date() function%s specifications, but not every format is supported.', 'ninja-forms'), '<a href="http://www.php.net/manual/en/function.date.php" target="_blank">', '</a>')), array('name' => 'currency_symbol', 'type' => 'text', 'label' => __('Currency Symbol', 'ninja-forms'), 'desc' => 'e.g. $, &pound;, &euro;')));
    ninja_forms_register_tab_metabox($args);
    $args = array('page' => 'ninja-forms-settings', 'tab' => 'general_settings', 'slug' => 'advanced_settings', 'title' => __('Advanced Settings', 'ninja-forms'), 'settings' => array(array('name' => 'delete_on_uninstall', 'type' => 'checkbox', 'label' => __('Remove ALL Ninja Forms data upon uninstall?', 'ninja-forms'), 'desc' => sprintf(__('If this box is checked, ALL Ninja Forms data will be removed from the database upon deletion. %sAll form and submission data will be unrecoverable.%s', 'ninja-forms'), '<span class="nf-nuke-warning">', '</span>'))), 'state' => 'closed');
    ninja_forms_register_tab_metabox($args);
}
开发者ID:se7ven214,项目名称:Kungfuphp.local,代码行数:13,代码来源:general-settings.php


示例13: ninja_forms_register_feditor_style_settings_metaboxes

function ninja_forms_register_feditor_style_settings_metaboxes()
{
    $plugin_settings = get_option('ninja_forms_settings');
    if (isset($plugin_settings['feditor'])) {
        $feditor_settings = $plugin_settings['feditor'];
    } else {
        $feditor_settings = '';
    }
    if (isset($feditor_settings['_post_editor'])) {
        $post_editor = $feditor_settings['_post_editor'];
    } else {
        $post_editor = '';
    }
    if (isset($feditor_settings['_page_editor'])) {
        $page_editor = $feditor_settings['_page_editor'];
    } else {
        $page_editor = '';
    }
    if (isset($feditor_settings['_profile_editor'])) {
        $profile_editor = $feditor_settings['_profile_editor'];
    } else {
        $profile_editor = '';
    }
    if (isset($feditor_settings['_registration_form'])) {
        $registration_form = $feditor_settings['_registration_form'];
    } else {
        $registration_form = '';
    }
    if (isset($feditor_settings['_login_form'])) {
        $login_form = $feditor_settings['_login_form'];
    } else {
        $login_form = '';
    }
    if (isset($feditor_settings['_lost_password'])) {
        $lost_password = $feditor_settings['_lost_password'];
    } else {
        $lost_password = '';
    }
    if (isset($feditor_settings['_reset_password'])) {
        $reset_password = $feditor_settings['_reset_password'];
    } else {
        $reset_password = '';
    }
    $args = array('page' => 'ninja-forms-feditor', 'tab' => 'style_settings', 'slug' => 'style_settings', 'title' => __('Style Settings', 'ninja-forms-feditor'), 'display_function' => '', 'state' => 'closed', 'settings' => array(array('name' => '', 'type' => 'desc', 'label' => '<a href="admin.php?page=ninja-forms&tab=form_layout&edit_style=true&form_id=' . $post_editor . '">' . __('Default Post Editor Styling', 'ninja-forms-feditor') . '</a>'), array('name' => '', 'type' => 'desc', 'label' => '<a href="admin.php?page=ninja-forms&tab=form_layout&edit_style=true&form_id=' . $page_editor . '">' . __('Default Page Editor Styling', 'ninja-forms-feditor')), array('name' => '', 'type' => 'desc', 'label' => '<a href="admin.php?page=ninja-forms&tab=form_layout&edit_style=true&form_id=' . $profile_editor . '">' . __('Default Profile Editor Styling', 'ninja-forms-feditor')), array('name' => '', 'type' => 'desc', 'label' => '<a href="admin.php?page=ninja-forms&tab=form_layout&edit_style=true&form_id=' . $registration_form . '">' . __('Default Registration Form Styling', 'ninja-forms-feditor')), array('name' => '', 'type' => 'desc', 'label' => '<a href="admin.php?page=ninja-forms&tab=form_layout&edit_style=true&form_id=' . $login_form . '">' . __('Default Login Form Styling', 'ninja-forms-feditor')), array('name' => '', 'type' => 'desc', 'label' => '<a href="admin.php?page=ninja-forms&tab=form_layout&edit_style=true&form_id=' . $lost_password . '">' . __('Default Lost Password Form Styling', 'ninja-forms-feditor')), array('name' => '', 'type' => 'desc', 'label' => '<a href="admin.php?page=ninja-forms&tab=form_layout&edit_style=true&form_id=' . $reset_password . '">' . __('Default Reset Password Form Styling', 'ninja-forms-feditor'))));
    if (function_exists('ninja_forms_register_tab_metabox')) {
        ninja_forms_register_tab_metabox($args);
    }
}
开发者ID:emtv,项目名称:hackmsi,代码行数:48,代码来源:style-settings.php


示例14: ninja_forms_register_exp_forms_metabox

function ninja_forms_register_exp_forms_metabox()
{
    $form_results = ninja_forms_get_all_forms();
    $form_select = array();
    if (is_array($form_results) and !empty($form_results)) {
        foreach ($form_results as $form) {
            if (isset($form['data'])) {
                $data = $form['data'];
                $form_title = $data['form_title'];
                array_push($form_select, array('name' => $form_title, 'value' => $form['id']));
            }
        }
    }
    $args = array('page' => 'ninja-forms-impexp', 'tab' => 'impexp_forms', 'slug' => 'exp_form', 'title' => __('Export a form', 'ninja-forms'), 'settings' => array(array('name' => 'form_id', 'type' => 'select', 'label' => __('Select a form', 'ninja-forms'), 'desc' => '', 'options' => $form_select, 'help_text' => ''), array('name' => 'submit', 'type' => 'submit', 'label' => __('Export Form', 'ninja-forms'), 'class' => 'button-secondary')));
    ninja_forms_register_tab_metabox($args);
}
开发者ID:Natedaug,项目名称:WordPressSites,代码行数:16,代码来源:impexp-forms.php


示例15: ninja_forms_register_general_settings_metabox

function ninja_forms_register_general_settings_metabox()
{
    $plugin_settings = nf_get_settings();
    if (isset($plugin_settings['version'])) {
        $current_version = $plugin_settings['version'];
    } else {
        $current_version = NF_PLUGIN_VERSION;
    }
    $args = array('page' => 'ninja-forms-settings', 'tab' => 'general_settings', 'slug' => 'general_settings', 'title' => __('General Settings', 'ninja-forms'), 'settings' => array(array('name' => 'version', 'type' => 'desc', 'label' => __('Version', 'ninja-forms'), 'desc' => $current_version), array('name' => 'date_format', 'type' => 'text', 'label' => __('Date Format', 'ninja-forms'), 'desc' => 'e.g. m/d/Y, d/m/Y - ' . sprintf(__('Tries to follow the %sPHP date() function%s specifications, but not every format is supported.', 'ninja-forms'), '<a href="http://www.php.net/manual/en/function.date.php" target="_blank">', '</a>')), array('name' => 'currency_symbol', 'type' => 'text', 'label' => __('Currency Symbol', 'ninja-forms'), 'desc' => 'e.g. $, &pound;, &euro;')));
    ninja_forms_register_tab_metabox($args);
    $args = array('page' => 'ninja-forms-settings', 'tab' => 'general_settings', 'slug' => 'recaptcha_settings', 'title' => __('reCAPTCHA Settings', 'ninja-forms'), 'settings' => array(array('name' => 'recaptcha_site_key', 'type' => 'text', 'label' => __('reCAPTCHA Site Key', 'ninja-forms'), 'desc' => sprintf(__('Get a site key for your domain by registering  %shere%s', 'ninja-forms'), '<a href="https://www.google.com/recaptcha/intro/index.html" target="_blank">', '</a>')), array('name' => 'recaptcha_secret_key', 'type' => 'text', 'label' => __('reCAPTCHA Secret Key', 'ninja-forms'), 'desc' => ''), array('name' => 'recaptcha_lang', 'type' => 'text', 'label' => __('reCAPTCHA Language', 'ninja-forms'), 'desc' => 'e.g. en, da - ' . sprintf(__('Language used by reCAPTCHA. To get the code for your language click %shere%s', 'ninja-forms'), '<a href="https://developers.google.com/recaptcha/docs/language" target="_blank">', '</a>'))), 'state' => 'closed');
    $args['settings'] = apply_filters('nf_general_settings_recaptcha', $args['settings']);
    ninja_forms_register_tab_metabox($args);
    $args = array('page' => 'ninja-forms-settings', 'tab' => 'general_settings', 'slug' => 'advanced_settings', 'title' => __('Advanced Settings', 'ninja-forms'), 'settings' => array(array('name' => 'delete_on_uninstall', 'type' => 'checkbox', 'label' => __('Remove ALL Ninja Forms data upon uninstall?', 'ninja-forms'), 'desc' => sprintf(__('If this box is checked, ALL Ninja Forms data will be removed from the database upon deletion. %sAll form and submission data will be unrecoverable.%s', 'ninja-forms'), '<span class="nf-nuke-warning">', '</span>')), array('name' => 'delete_prompt', 'type' => '', 'display_function' => 'nf_delete_on_uninstall_prompt')), 'state' => 'closed');
    $args['settings'] = apply_filters('nf_general_settings_advanced', $args['settings']);
    ninja_forms_register_tab_metabox($args);
}
开发者ID:sunnyratilal,项目名称:ninja-forms,代码行数:17,代码来源:general-settings.php


示例16: ninja_forms_register_exp_fav_fields_metabox

function ninja_forms_register_exp_fav_fields_metabox()
{
    $fav_results = ninja_forms_get_all_favs();
    $fav_options = array();
    if (is_array($fav_results) and !empty($fav_results)) {
        foreach ($fav_results as $fav) {
            $data = $fav['data'];
            $label = $data['label'];
            array_push($fav_options, array('name' => $label, 'value' => $fav['id']));
        }
        $empty = '';
    } else {
        $empty = __('No Favorite Fields Found', 'ninja-forms');
    }
    $args = array('page' => 'ninja-forms-impexp', 'tab' => 'impexp_fields', 'slug' => 'exp_fields', 'title' => __('Export Favorite Fields', 'ninja-forms'), 'settings' => array(array('name' => 'ninja_forms_fav', 'type' => 'checkbox_list', 'label' => '', 'desc' => '', 'options' => $fav_options, 'help_text' => ''), array('name' => '', 'type' => 'desc', 'label' => $empty), array('name' => 'submit', 'type' => 'submit', 'label' => __('Export Fields', 'ninja-forms'), 'class' => 'button-secondary')));
    ninja_forms_register_tab_metabox($args);
}
开发者ID:idies,项目名称:escience-2016-wp,代码行数:17,代码来源:impexp-fields.php


示例17: pushover_notifications_metabox

 /**
  * Add form notification settings
  *
  * @return void
  */
 function pushover_notifications_metabox()
 {
     $args = array('page' => 'ninja-forms', 'tab' => 'form_settings', 'slug' => 'pushover', 'title' => __('Pushover', 'nf-pushover'), 'display_function' => '', 'state' => 'closed', 'settings' => array());
     if (isset($this->settings['nf-pushover']['api-key']) && !empty($this->settings['nf-pushover']['api-key'])) {
         $args['settings'][] = array('name' => 'pushover', 'type' => 'checkbox', 'label' => __('Enable Pushover', 'nf-pushover'), 'desc' => __('Send push notifications using Pushover', 'nf-pushover'));
         $args['settings'][] = array('name' => 'pushover_device', 'type' => 'text', 'label' => __('Device', 'nf-pushover'), 'desc' => __('The device name, if you would like to limit notifications to one device.', 'nf-pushover'));
         $args['settings'][] = array('name' => 'pushover_title', 'type' => 'text', 'label' => __('Message Title', 'nf-pushover'), 'desc' => __('The title of the push notification to be sent to your device.', 'nf-pushover'), 'default_value' => __('New Form Submission', 'nf-pushover'));
         $args['settings'][] = array('name' => 'pushover_message', 'type' => 'textarea', 'label' => __('Message (512 Character Limit)', 'nf-pushover'), 'desc' => __('If you want to include field data entered by the user, for instance a name, you can use the following shortcode: [ninja_forms_field id=23] where 23 is the ID of the field you want to insert. This will tell Ninja Forms to replace the bracketed text with whatever input the user placed in that field. You can find the field ID when you expand the field for editing.', 'nf-pushover'), 'default_value' => __('You have a new form submission', 'nf-pushover'));
         $args['settings'][] = array('name' => 'pushover_priority', 'type' => 'select', 'label' => __('Priority', 'nf-pushover'), 'desc' => __('The priority of the push notifications. If you select "Emergency" then the retry and expire options are available.', 'nf-pushover'), 'default_value' => 0, 'options' => array(array('value' => 2, 'name' => 'Emergency'), array('value' => 1, 'name' => 'High'), array('value' => 0, 'name' => 'Normal'), array('value' => -1, 'name' => 'Low')));
         $args['settings'][] = array('name' => 'pushover_retry', 'type' => 'text', 'label' => __('Retry', 'nf-pushover'), 'desc' => __('If the push notification is not acknowledged by the recipient, the notificatoin will retry sending every X seconds. If you enter 60 Pushover will retry sending the message every 60 seconds. Minimum 30 seconds.', 'nf-pushover'));
         $args['settings'][] = array('name' => 'pushover_expire', 'type' => 'text', 'label' => __('Retry Expire', 'nf-pushover'), 'desc' => __('Pushover will retrying every X seconds until the expire limit is reached. For example, sending a retry parameter of 60 and an expire parameter of 3600 will cause your notification to be retried every 60 seconds for 1 hour.', 'nf-pushover'));
         $type = 'select';
         $desc = __('The sound your push notifications will make.', 'nf-pushover');
         if (false === ($sounds = get_transient($this->transient_keys['sounds']))) {
             $response = wp_remote_get(add_query_arg('token', $this->settings['nf-pushover']['api-key'], $this->api_url . 'sounds.json'), array('sslverify' => false));
             $sounds = array();
             switch (wp_remote_retrieve_response_code($response)) {
                 case '200':
                     $sounds[] = array('value' => '', 'name' => '-- None Selected --');
                     $response = json_decode(wp_remote_retrieve_body($response));
                     foreach ($response->sounds as $key => $name) {
                         $sounds[] = array('value' => $key, 'name' => $name);
                     }
                     set_transient($this->transient_keys['sounds'], $sounds, 60 * 60 * 24 * 7);
                     // cache sounds for 1 week
                     break;
                 case '500':
                     $type = 'desc';
                     $desc = __('There seems to be issues connecting to the Pushover API.', 'nf-pushover');
                     break;
                 default:
                     $type = 'desc';
                     $desc = __('There was an invalid API call, if you continue you see this error please contact support.', 'nf-pushover');
             }
         }
         $args['settings'][] = array('name' => 'pushover_sound', 'type' => $type, 'label' => __('Sound', 'nf-pushover'), 'desc' => $desc, 'options' => $sounds);
         $args['settings'][] = array('name' => 'pushover_url', 'type' => 'checkbox', 'label' => __('Include Form Submissions Link', 'nf-pushover'), 'desc' => __('Include a link to the form submissions page in your WordPress dashboard.', 'nf-pushover'));
     } else {
         $args['settings'][] = array('name' => 'pushover', 'type' => 'desc', 'label' => __('Pushover Error', 'nf-pushover'), 'desc' => __('You must enter your API details in the settings before you can add Pushover notifications to forms.', 'nf-pushover'));
     }
     // make sure the function exists before calling it!
     // https://bitbucket.org/BFTrick/ninja-forms-pushover/issue/13/undefined-function
     if (function_exists('ninja_forms_register_tab_metabox')) {
         ninja_forms_register_tab_metabox($args);
     }
 }
开发者ID:emtv,项目名称:hackmsi,代码行数:51,代码来源:class-nf-pushover.php


示例18: ninja_forms_register_label_settings_metabox

function ninja_forms_register_label_settings_metabox()
{
    $args = array('page' => 'ninja-forms-settings', 'tab' => 'label_settings', 'slug' => 'label_labels', 'title' => __('Message Labels', 'ninja-forms'), 'settings' => array(array('name' => 'req_div_label', 'type' => 'text', 'label' => __('Required Field Label', 'ninja-forms'), 'desc' => '', 'help_text' => ''), array('name' => 'req_field_symbol', 'type' => 'text', 'label' => __('Required field s 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP ninja_forms_return_echo函数代码示例发布时间:2022-05-15
下一篇:
PHP ninja_forms_register_tab函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap