本文整理汇总了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函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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. $, £, €', 'ninja-forms'))));
ninja_forms_register_tab_metabox($args);
}
示例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);
}
}
示例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);
}
}
示例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. $, £, €')));
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);
}
示例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);
}
}
示例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);
}
示例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. $, £, €')));
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);
}