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

PHP Ninja_Forms类代码示例

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

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



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

示例1: __construct

 /**
  * Constructor
  */
 public function __construct()
 {
     parent::__construct();
     $this->_nicename = __('Redirect', 'ninja-forms');
     $settings = Ninja_Forms::config('ActionRedirectSettings');
     $this->_settings = array_merge($this->_settings, $settings);
 }
开发者ID:Gerdie,项目名称:dreamy-wedding-company,代码行数:10,代码来源:Redirect.php


示例2: __construct

 /**
  * Constructor
  */
 public function __construct()
 {
     parent::__construct();
     $this->_nicename = __('Email', 'ninja-forms');
     $settings = Ninja_Forms::config('ActionEmailSettings');
     $this->_settings = array_merge($this->_settings, $settings);
     $this->_backwards_compatibility();
 }
开发者ID:JSreactor,项目名称:MarketCrater.com,代码行数:11,代码来源:Email.php


示例3: __construct

 /**
  * Constructor
  */
 public function __construct()
 {
     parent::__construct();
     $this->_nicename = __('Success Message', 'ninja-forms');
     $settings = Ninja_Forms::config('ActionSuccessMessageSettings');
     $this->_settings = array_merge($this->_settings, $settings);
     add_action('nf_before_import_form', array($this, 'import_form_action_success_message'), 11);
 }
开发者ID:kjohnson,项目名称:3.0-commits-io,代码行数:11,代码来源:SuccessMessage.php


示例4: __construct

 public function __construct()
 {
     parent::__construct();
     $this->_blacklist = apply_filters('ninja_forms_uploads_extension_blacklist', Ninja_Forms::config('UploadsExtensionBlacklist'));
     add_action('wp_ajax_nf_async_upload', array($this, 'upload'));
     add_action('wp_ajax_nopriv_nf_async_upload', array($this, 'upload'));
     add_action('nf_uploads_delete_temporary_file', array($this, 'delete_temporary_file'), 10, 1);
 }
开发者ID:Gerdie,项目名称:dreamy-wedding-company,代码行数:8,代码来源:Uploads.php


示例5: __construct

 /**
  * Constructor
  */
 public function __construct()
 {
     parent::__construct();
     $this->_nicename = __('Collect Payment', 'ninja-forms');
     $settings = Ninja_Forms::config('ActionCollectPaymentSettings');
     $this->_settings = array_merge($this->_settings, $settings);
     add_action('plugins_loaded', array($this, 'register_payment_gateways'));
     add_filter('ninja_forms_action_type_settings', array($this, 'maybe_remove_action'));
 }
开发者ID:kjohnson,项目名称:3.0-commits-io,代码行数:12,代码来源:CollectPayment.php


示例6: _nf_removed_hooks

function _nf_removed_hooks()
{
    global $wp_filter;
    $hooks = array('ninja_forms_insert_sub', 'nf_email_notification_after_settings', 'nf_edit_notification_settings', 'ninja_forms_edit_field_before_li', 'ninja_forms_edit_field_after_li', 'ninja_forms_edit_field_before_closing_li', 'ninja_forms_edit_field_before_registered', 'ninja_forms_edit_field_after_registered', 'ninja_forms_edit_field_before_ul', 'ninja_forms_edit_field_ul', 'ninja_forms_edit_field_after_ul', 'ninja_forms_email_admin', 'ninja_forms_email_user', 'ninja_forms_display_before_field_label', 'ninja_forms_display_field_label', 'ninja_forms_display_after_field_label', 'ninja_forms_display_field_help', 'ninja_forms_display_field_label', 'ninja_forms_display_field_help', 'nf_before_display_loading', 'ninja_forms_display_open_form_wrap', 'ninja_forms_display_form_title', 'ninja_forms_display_open_form_tag', 'ninja_forms_display_fields', 'ninja_forms_display_close_form_tag', 'ninja_forms_display_close_form_wrap', 'nf_notification_before_process', 'nf_save_notification', 'nf_sub_table_after_row_actions_trash', 'nf_sub_table_after_row_actions', 'nf_sub_table_before_row_actions_trash', 'nf_sub_table_before_row_actions', 'ninja_forms_after_import_form', 'ninja_forms_display_after_closing_field_wrap', 'ninja_forms_display_after_field_function', 'ninja_forms_display_after_field_label', 'ninja_forms_display_after_field', 'ninja_forms_display_after_opening_field_wrap', 'ninja_forms_display_before_closing_field_wrap', 'ninja_forms_display_before_field_function', 'ninja_forms_display_before_field_label', 'ninja_forms_display_before_field', 'ninja_forms_display_before_opening_field_wrap', 'ninja_forms_display_css', 'ninja_forms_save_admin_metabox_option', 'ninja_forms_save_admin_metabox', 'ninja_forms_save_admin_sidebar', 'ninja_forms_save_admin_tab', 'ninja_forms_before_pre_process', 'ninja_forms_display_after_fields', 'ninja_forms_display_after_form_title', 'ninja_forms_display_after_form_wrap', 'ninja_forms_display_after_open_form_tag', 'ninja_forms_display_before_fields', 'ninja_forms_display_before_form_title', 'ninja_forms_display_before_form_wrap', 'ninja_forms_display_before_form', 'ninja_forms_post_process', 'ninja_forms_pre_process', 'ninja_forms_process', 'nf_export_form_row', 'nf_notification_admin_js_vars', 'nf_success_message_locations', 'nf_notification_types', 'ninja_forms_admin_submissions_datepicker_args', 'ninja_forms_starter_form_contents', 'ninja_forms_preview_page_title', 'nf_input_limit_types', 'ninja_forms_edit_field_li_label', 'nf_edit_field_settings_sections', 'ninja_forms_use_post_fields', 'nf_general_settings_advanced', 'nf_new_form_defaults', 'ninja_forms_use_post_fields', 'ninja_forms_form_settings_basic', 'ninja_forms_form_settings_restrictions', 'nf_upgrade_handler_register', 'ninja_forms_save_sub', 'ninja_forms_export_subs_csv_file_name', 'ninja_forms_export_sub_label', 'ninja_forms_export_subs_label_array', 'ninja_forms_export_sub_pre_value', 'ninja_forms_export_sub_value', 'ninja_forms_export_subs_value_array', 'ninja_forms_csv_bom', 'ninja_forms_csv_delimiter', 'ninja_forms_csv_enclosure', 'ninja_forms_csv_terminator', 'ninja_forms_sub_table_row_actions', 'ninja_forms_csv_delimiter', 'ninja_forms_csv_enclosure', 'ninja_forms_csv_terminator', 'ninja_forms_admin_menu_capabilities', 'ninja_forms_email_all_fields_array', 'nf_email_user_values_title', 'ninja_forms_email_field_label', 'ninja_forms_email_user_value', 'ninja_forms_email_field_list', 'ninja_forms_admin_email_message_wpautop', 'ninja_forms_admin_email_from', 'ninja_forms_user_email_message_wpautop', 'ninja_forms_submission_csv_name', 'ninja_forms_success_msg', 'nf_delete_form_capabilities', 'ninja_forms_field', 'ninja_forms_display_field_type', 'ninja_forms_use_post_fields', 'ninja_forms_list_terms', 'ninja_forms_display_form_form_data', 'ninja_forms_admin_subject', 'ninja_forms_user_subject', 'ninja_forms_admin_email', 'ninja_forms_user_email', 'ninja_forms_save_msg', 'ninja_forms_display_script_field_data', 'ninja_forms_display_form_form_data', 'ninja_forms_enable_credit_card_field', 'ninja_forms_post_credit_card_field', 'ninja_forms_credit_card_field_desc_pos', 'ninja_forms_hide_cc_field', 'ninja_forms_display_list_options_span_class', 'nf_import_notification_meta', 'ninja_forms_labels/timed_submit_error', 'ninja_forms_form_list_template_function', 'nf_all_fields_field_value', 'nf_all_fields_table', 'nf_before_import_field', 'nf_delete_field_capabilities', 'nf_download_all_filename', 'nf_email_notification_attachment_types', 'nf_email_notification_attachments', 'nf_email_notification_process_setting', 'nf_general_settings_recaptcha', 'nf_new_field_capabilities', 'nf_notification_process_setting', 'nf_step_processing_labels', 'nf_sub_csv_bom', 'nf_sub_edit_status', 'nf_sub_human_time', 'nf_sub_table_row_actions', 'nf_sub_table_status', 'nf_sub_table_user_value_max_items', 'nf_sub_table_user_value_max_len', 'nf_sub_title_time', 'nf_subs_csv_field_label', 'nf_subs_csv_filename', 'nf_subs_csv_label_array_before_fields', 'nf_subs_csv_value_array', 'nf_subs_export_pre_value', 'nf_subs_table_qv', 'nf_success_msg', 'ninja_forms_admin_email_message_wpautop', 'ninja_forms_admin_metabox_rte', 'ninja_forms_ajax_url', 'ninja_forms_before_import_form', 'ninja_forms_cont_class', 'ninja_forms_credit_card_cvc_desc', 'ninja_forms_credit_card_cvc_label', 'ninja_forms_credit_card_exp_month_desc', 'ninja_forms_credit_card_exp_month_label', 'ninja_forms_credit_card_exp_year_desc', 'ninja_forms_credit_card_exp_year_label', 'ninja_forms_credit_card_name_desc', 'ninja_forms_credit_card_name_label', 'ninja_forms_credit_card_number_desc', 'ninja_forms_display_field_class', 'ninja_forms_display_field_desc_class', 'ninja_forms_display_field_processing_error_class', 'ninja_forms_display_fields_wrap_visibility', 'ninja_forms_display_form_visibility', 'ninja_forms_display_required_items_class', 'ninja_forms_display_response_message_class', 'ninja_forms_display_show_form', 'ninja_forms_dropdown_open_tag', 'ninja_forms_dropdown_placeholder', 'ninja_forms_edit_field_rte', 'ninja_forms_field_post_process_user_value', 'ninja_forms_field_pre_process_user_value', 'ninja_forms_field_process_user_value', 'ninja_forms_field_shortcode', 'ninja_forms_field_wrap_class', 'ninja_forms_fields_wrap_class', 'ninja_forms_form_class', 'ninja_forms_form_list_forms', 'ninja_forms_form_wrap_class', 'ninja_forms_label_class', 'ninja_forms_labels/currency_symbol', 'ninja_forms_labels/date_format', 'ninja_forms_labels/honeypot_error', 'ninja_forms_labels/invalid_email', 'ninja_forms_labels/javascript_error', 'ninja_forms_labels/password_mismatch', 'ninja_forms_labels/process_label', 'ninja_forms_labels/req_div_label', 'ninja_forms_labels/req_error_label', 'ninja_forms_labels/req_field_error', 'ninja_forms_labels/req_field_symbol', 'ninja_forms_labels/spam_error', 'ninja_forms_display_fields_array');
    foreach ($hooks as $hook) {
        apply_filters($hook, '');
        // add_action() is just a wrapper for add_filter(), so use add_filter() for both.
        if (!isset($wp_filter[$hook]) || !$wp_filter[$hook]) {
            continue;
        }
        Ninja_Forms::deprecated_notice($hook, '3.0', null);
    }
}
开发者ID:JSreactor,项目名称:MarketCrater.com,代码行数:13,代码来源:deprecated.php


示例7: display

 public function display()
 {
     Ninja_Forms::template('admin-menu-add-field.html.php');
     wp_enqueue_style('nf-builder', Ninja_Forms::$url . 'assets/css/builder.css');
     wp_enqueue_style('qtip2', Ninja_Forms::$url . 'assets/css/jquery.qtip.css');
     wp_enqueue_script('backbone-marionette', Ninja_Forms::$url . 'assets/js/lib/backbone.marionette.min.js', array('jquery', 'backbone'));
     wp_enqueue_script('backbone-radio', Ninja_Forms::$url . 'assets/js/lib/backbone.radio.min.js', array('jquery', 'backbone'));
     wp_enqueue_script('jquery-perfect-scrollbar', Ninja_Forms::$url . 'assets/js/lib/perfect-scrollbar.jquery.min.js', array('jquery'));
     wp_enqueue_script('jquery-hotkeys-new', Ninja_Forms::$url . 'assets/js/lib/jquery.hotkeys.js');
     wp_enqueue_script('jquery-qtip2', Ninja_Forms::$url . 'assets/js/lib/jquery.qtip.js');
     wp_enqueue_script('requirejs', Ninja_Forms::$url . 'assets/js/lib/require.js', array('jquery', 'backbone'));
     wp_enqueue_script('nf-builder', Ninja_Forms::$url . 'assets/js/builder/main.js', array('jquery', 'jquery-ui-core', 'jquery-ui-draggable', 'jquery-ui-droppable', 'jquery-ui-sortable'));
     wp_localize_script('nf-builder', 'nfAdmin', array('ajaxNonce' => wp_create_nonce('ninja_forms_ajax_nonce'), 'requireBaseUrl' => Ninja_Forms::$url . 'assets/js/'));
 }
开发者ID:Gerdie,项目名称:dreamy-wedding-company,代码行数:14,代码来源:AddField.php


示例8: display

 public function display()
 {
     $tabs = apply_filters('ninja_forms_settings_tabs', array('settings' => __('Settings', 'ninja-forms'), 'licenses' => __('Licenses', 'ninja-forms')));
     $tab_keys = array_keys($tabs);
     $active_tab = isset($_GET['tab']) ? $_GET['tab'] : reset($tab_keys);
     wp_enqueue_style('nf-admin-settings', Ninja_Forms::$url . 'assets/css/admin-settings.css');
     $groups = Ninja_Forms()->config('PluginSettingsGroups');
     $grouped_settings = $this->get_settings();
     $save_button_text = __('Save Settings', 'ninja-forms');
     $setting_defaults = Ninja_Forms()->get_settings();
     $errors = array();
     foreach ($grouped_settings as $group => $settings) {
         foreach ($settings as $id => $setting) {
             $value = isset($setting_defaults[$id]) ? $setting_defaults[$id] : '';
             $grouped_settings[$group][$id]['id'] = $this->prefix($grouped_settings[$group][$id]['id']);
             $grouped_settings[$group][$id]['value'] = $value;
             $grouped_settings[$group][$id] = apply_filters('ninja_forms_check_setting_' . $id, $grouped_settings[$group][$id]);
             if (!isset($grouped_settings[$group][$id]['errors']) || !$grouped_settings[$group][$id]['errors']) {
                 continue;
             }
             if (!is_array($grouped_settings[$group][$id]['errors'])) {
                 $grouped_settings[$group][$id]['errors'] = array($grouped_settings[$group][$id]['errors']);
             }
             foreach ($grouped_settings[$group][$id]['errors'] as $old_key => $error) {
                 $new_key = $grouped_settings[$group][$id]['id'] . "[" . $old_key . "]";
                 $errors[$new_key] = $error;
                 $grouped_settings[$group][$id]['errors'][$new_key] = $error;
                 unset($grouped_settings[$group][$id]['errors'][$old_key]);
             }
         }
     }
     $grouped_settings['general']['version']['value'] = Ninja_Forms::VERSION;
     $saved_fields = Ninja_Forms()->form()->get_fields(array('saved' => 1));
     foreach ($saved_fields as $saved_field) {
         $saved_field_id = $saved_field->get_id();
         $grouped_settings['saved_fields'][] = array('id' => '', 'type' => 'html', 'html' => '<a class="js-delete-saved-field button button-secondary" data-id="' . $saved_field_id . '">' . __('Delete') . '</a>', 'label' => $saved_field->get_setting('label'));
     }
     if ($saved_fields) {
         wp_register_script('ninja_forms_admin_menu_settings', Ninja_Forms::$url . 'assets/js/admin-settings.js', array('jquery'), FALSE, TRUE);
         wp_localize_script('ninja_forms_admin_menu_settings', 'nf_settings', array('ajax_url' => admin_url('admin-ajax.php'), 'nonce' => wp_create_nonce("ninja_forms_settings_nonce")));
         wp_enqueue_script('ninja_forms_admin_menu_settings');
     }
     Ninja_Forms::template('admin-menu-settings.html.php', compact('tabs', 'active_tab', 'groups', 'grouped_settings', 'save_button_text', 'errors'));
 }
开发者ID:idies,项目名称:escience-2016-wp,代码行数:44,代码来源:Settings.php


示例9: display

 public function display()
 {
     wp_enqueue_style('nf-admin-addons', Ninja_Forms::$url . 'assets/css/admin-addons.css');
     $items = wp_remote_get('https://ninjaforms.com/?extend_feed=jlhrbgf89734go7387o4g3h');
     $items = wp_remote_retrieve_body($items);
     $items = json_decode($items, true);
     //shuffle( $items );
     $notices = array();
     foreach ($items as $item) {
         $plugin_data = array();
         if (!empty($item['plugin']) && file_exists(WP_PLUGIN_DIR . '/' . $item['plugin'])) {
             $plugin_data = get_plugin_data(WP_PLUGIN_DIR . '/' . $item['plugin'], false, true);
         }
         $version = isset($plugin_data['Version']) ? $plugin_data['Version'] : '';
         if (!empty($version) && $version < $item['version']) {
             $notices[] = array('title' => $item['title'], 'old_version' => $version, 'new_version' => $item['version']);
         }
     }
     Ninja_Forms::template('admin-menu-addons.html.php', compact('items', 'notices'));
 }
开发者ID:Gerdie,项目名称:dreamy-wedding-company,代码行数:20,代码来源:Addons.php


示例10: update_settings

 public function update_settings()
 {
     if (!current_user_can(apply_filters('ninja_forms_admin_form_settings_capabilities', 'manage_options'))) {
         return;
     }
     if (!isset($_POST[$this->_prefix])) {
         return;
     }
     $settings = $_POST['ninja_forms'];
     if (isset($settings['currency'])) {
         $currency = sanitize_text_field($settings['currency']);
         $currency_symbols = Ninja_Forms::config('CurrencySymbol');
         $settings['currency_symbol'] = isset($currency_symbols[$currency]) ? $currency_symbols[$currency] : '';
     }
     foreach ($settings as $id => $value) {
         $value = sanitize_text_field($value);
         $value = apply_filters('ninja_forms_update_setting_' . $id, $value);
         Ninja_Forms()->update_setting($id, $value);
         do_action('ninja_forms_save_setting_' . $id, $value);
     }
 }
开发者ID:JSreactor,项目名称:MarketCrater.com,代码行数:21,代码来源:Settings.php


示例11:

                        <div class="nf-select">
                            <select>
                                <option>Character</option>
                                <option>Words</option>
                            </select>
                        </div>
                    </div>
                    <div class="nf-full">
                        <label>Text to appear after counter</label>
                        <input type="text" value="character(s) left" />
                    </div>
                </fieldset>
            </div>
        </section>
        <section class="nf-settings">
            <h3><span class="dashicons dashicons-arrow-right"></span>Advanced Settings</h3>
        </section>
        <section class="nf-settings">
            <h3><span class="dashicons dashicons-arrow-right"></span>Conditional Settings</h3>
        </section>

        <?php 
Ninja_Forms::template('ui-nf-toggle-drawer.html.php');
?>
        <?php 
Ninja_Forms::template('ui-nf-drawer-buttons.html.php');
?>
    </div>

</div>
开发者ID:Gerdie,项目名称:dreamy-wedding-company,代码行数:30,代码来源:admin-menu-edit-field.html.php


示例12: _localize_form_settings

    protected function _localize_form_settings()
    {
        $form_settings_types = Ninja_Forms::config('FormSettingsTypes');
        $form_settings['display'] = Ninja_Forms::config('FormDisplaySettings');
        $form_settings['restrictions'] = Ninja_Forms::config('FormRestrictionSettings');
        $form_settings['calculations'] = Ninja_Forms::config('FormCalculationSettings');
        $form_settings = apply_filters('ninja_forms_localize_forms_settings', $form_settings);
        $groups = Ninja_Forms::config('SettingsGroups');
        $master_settings = array();
        foreach ($form_settings_types as $id => $type) {
            $unique_settings = $this->_unique_settings($form_settings[$id]);
            $master_settings = array_merge($master_settings, $unique_settings);
            $form_settings_types[$id]['settingGroups'] = $this->_group_settings($form_settings[$id], $groups);
            $form_settings_types[$id]['settingDefaults'] = $this->_setting_defaults($unique_settings);
        }
        ?>
        <script>
        var formSettingTypeData = <?php 
        echo wp_json_encode($form_settings_types);
        ?>
;
        var formSettings = <?php 
        echo wp_json_encode(array_values($master_settings));
        ?>
;
        </script>
        <?php 
    }
开发者ID:Rehabescapi,项目名称:GVSU-Senior-Project-Hola,代码行数:28,代码来源:Forms.php


示例13: load_settings

 protected function load_settings($only_settings = array())
 {
     $settings = array();
     // Loads a settings array from the FieldSettings configuration file.
     $all_settings = Ninja_Forms::config('FieldSettings');
     foreach ($only_settings as $setting) {
         if (isset($all_settings[$setting])) {
             $settings[$setting] = $all_settings[$setting];
         }
     }
     return $settings;
 }
开发者ID:Rehabescapi,项目名称:GVSU-Senior-Project-Hola,代码行数:12,代码来源:Field.php


示例14: display

 public function display()
 {
     Ninja_Forms::template('admin-menu-edit-field.html.php');
     wp_enqueue_style('nf-builder', Ninja_Forms::$url . 'assets/css/builder.css');
     wp_enqueue_script('jquery-perfect-scrollbar', Ninja_Forms::$url . 'assets/js/lib/perfect-scrollbar.jquery.min.js', array('jquery'));
 }
开发者ID:Gerdie,项目名称:dreamy-wedding-company,代码行数:6,代码来源:EditField.php


示例15: add_filters

 /**
  * Add Filters
  *
  * @return bool
  */
 public function add_filters()
 {
     global $typenow;
     // Bail if we aren't in our submission custom post type.
     if ($typenow != 'nf_sub') {
         return false;
     }
     $forms = Ninja_Forms()->form()->get_forms();
     $form_options = array();
     foreach ($forms as $form) {
         $form_options[$form->get_id()] = $form->get_setting('title');
     }
     $form_options = apply_filters('ninja_forms_submission_filter_form_options', $form_options);
     if (isset($_GET['form_id'])) {
         $form_selected = $_GET['form_id'];
     } else {
         $form_selected = 0;
     }
     if (isset($_GET['begin_date'])) {
         $begin_date = $_GET['begin_date'];
     } else {
         $begin_date = '';
     }
     if (isset($_GET['end_date'])) {
         $end_date = $_GET['end_date'];
     } else {
         $end_date = '';
     }
     Ninja_Forms::template('admin-menu-subs-filter.html.php', compact('form_options', 'form_selected', 'begin_date', 'end_date'));
     wp_enqueue_script('jquery-ui-datepicker');
     wp_enqueue_style('jquery-ui-datepicker', Ninja_Forms::$url . 'deprecated/assets/css/jquery-ui-fresh.min.css');
 }
开发者ID:idies,项目名称:escience-2016-wp,代码行数:37,代码来源:Submissions.php


示例16: apply_filters

<?php

if (!defined('ABSPATH')) {
    exit;
}
return apply_filters('ninja_forms_form_display_settings', array('title' => array('name' => 'title', 'type' => 'textbox', 'label' => __('Form Title', 'ninja-forms'), 'width' => 'full', 'group' => 'primary', 'value' => ''), 'show_title' => array('name' => 'show_title', 'type' => 'toggle', 'label' => __('Display Form Title', 'ninja-forms'), 'width' => 'full', 'group' => 'primary', 'value' => 1), 'clear_complete' => array('name' => 'clear_complete', 'type' => 'toggle', 'label' => __('Clear successfully completed form?', 'ninja-forms'), 'width' => 'full', 'group' => 'primary', 'value' => 1, 'help' => __('If this box is checked, Ninja Forms will clear the form values after it has been successfully submitted.', 'ninja-forms')), 'hide_complete' => array('name' => 'hide_complete', 'type' => 'toggle', 'label' => __('Hide successfully completed form?', 'ninja-forms'), 'width' => 'full', 'group' => 'primary', 'value' => 1, 'help' => __('If this box is checked, Ninja Forms will hide the form after it has been successfully submitted.', 'ninja-forms')), 'default_label_pos' => array('name' => 'default_label_pos', 'type' => 'select', 'label' => __('Default Label Position', 'ninja-forms'), 'width' => 'full', 'group' => 'advanced', 'options' => array(array('label' => __('Above Element', 'ninja-forms'), 'value' => 'above'), array('label' => __('Below Element', 'ninja-forms'), 'value' => 'below'), array('label' => __('Left of Element', 'ninja-forms'), 'value' => 'left'), array('label' => __('Right of Element', 'ninja-forms'), 'value' => 'right'), array('label' => __('Hidden', 'ninja-forms'), 'value' => 'hidden')), 'value' => 'above'), 'classes' => array('name' => 'classes', 'type' => 'fieldset', 'label' => __('Custom Class Names', 'ninja-forms'), 'width' => 'full', 'group' => 'advanced', 'settings' => array(array('name' => 'wrapper_class', 'type' => 'textbox', 'placeholder' => '', 'label' => __('Wrapper', 'ninja-forms'), 'width' => 'one-half', 'value' => '', 'use_merge_tags' => FALSE), array('name' => 'element_class', 'type' => 'textbox', 'label' => __('Element', 'ninja-forms'), 'placeholder' => '', 'width' => 'one-half', 'value' => '', 'use_merge_tags' => FALSE))), 'key' => array('name' => 'key', 'type' => 'textbox', 'label' => __('Form Key', 'ninja-forms'), 'width' => 'full', 'group' => 'administration', 'value' => '', 'help' => __('Programmatic name that can be used to reference this form.', 'ninja-forms')), 'add_submit' => array('name' => 'add_submit', 'type' => 'toggle', 'label' => __('Add Submit Button', 'ninja-forms'), 'width' => 'full', 'group' => '', 'value' => 1, 'help' => __('We\'ve noticed that don\'t have a submit button on your form. We can add one for your automatically.', 'ninja-forms')), 'currency' => array('name' => 'currency', 'type' => 'select', 'options' => array_merge(array(array('label' => __('Plugin Default', 'ninja-forms'), 'value' => '')), Ninja_Forms::config('Currency')), 'label' => __('Currency', 'ninja-forms'), 'width' => 'full', 'group' => 'advanced', 'value' => '')));
开发者ID:JSreactor,项目名称:MarketCrater.com,代码行数:6,代码来源:FormDisplaySettings.php


示例17: display

 public function display()
 {
     /** @global wpdb $wpdb */
     global $wpdb;
     wp_enqueue_style('nf-admin-system-status', Ninja_Forms::$url . 'assets/css/admin-system-status.css');
     wp_enqueue_script('nf-admin-system-status-script', Ninja_Forms::$url . 'assets/js/admin-system-status.js', array('jquery'));
     //PHP locale
     $locale = localeconv();
     if (is_multisite()) {
         $multisite = __('Yes', 'ninja-forms');
     } else {
         $multisite = __('No', 'ninja-forms');
     }
     //TODO: Possible refactor
     foreach ($locale as $key => $val) {
         if (is_string($val)) {
             $data = $key . ': ' . $val . '</br>';
         }
     }
     //TODO: Ask if this check is need
     //if ( function_exists( 'phpversion' ) ) echo esc_html( phpversion() );
     //WP_DEBUG
     if (defined('WP_DEBUG') && WP_DEBUG) {
         $debug = __('Yes', 'ninja-forms');
     } else {
         $debug = __('No', 'ninja-forms');
     }
     //WPLANG
     if (defined('WPLANG') && WPLANG) {
         $lang = WPLANG;
     } else {
         $lang = __('Default', 'ninja-forms');
     }
     //TODO: Ask if this long list of ini_get checks are need?
     //  if( function_exists( 'ini_get' ) ){
     //     $get_ini = size_format( ini_get('post_max_size') );
     //  }
     //SUHOSIN
     if (extension_loaded('suhosin')) {
         $suhosin = __('Yes', 'ninja-forms');
     } else {
         $suhosin = __('No', 'ninja-forms');
     }
     //Time Zone Check
     //TODO: May need refactored
     $default_timezone = get_option('timezone_string');
     //Check for active plugins
     $active_plugins = (array) get_option('active_plugins', array());
     if (is_multisite()) {
         $active_plugins = array_merge($active_plugins, get_site_option('active_sitewide_plugins', array()));
     }
     $all_plugins = array();
     foreach ($active_plugins as $plugin) {
         $plugin_data = @get_plugin_data(WP_PLUGIN_DIR . '/' . $plugin);
         $dirname = dirname($plugin);
         $version_string = '';
         if (!empty($plugin_data['Name'])) {
             // link the plugin name to the plugin url if available
             $plugin_name = $plugin_data['Name'];
             if (!empty($plugin_data['PluginURI'])) {
                 $plugin_name = '<a href="' . $plugin_data['PluginURI'] . '" title="' . __('Visit plugin homepage', 'ninja-forms') . '">' . $plugin_name . '</a>';
             }
             $all_plugins[] = $plugin_name . ' ' . __('by', 'ninja-forms') . ' ' . $plugin_data['Author'] . ' ' . __('version', 'ninja-forms') . ' ' . $plugin_data['Version'] . $version_string;
         }
     }
     if (sizeof($all_plugins) == 0) {
         $site_wide_plugins = '-';
     } else {
         $site_wide_plugins = implode(', <br/>', $all_plugins);
     }
     $server_ip = $_SERVER['SERVER_ADDR'];
     $host_name = gethostbyaddr($server_ip);
     //Output array
     $environment = array(__('Home URL', 'ninja-forms') => home_url(), __('Site URL', 'ninja-forms') => site_url(), __('Ninja Forms Version', 'ninja-forms') => esc_html(Ninja_Forms::VERSION), __('WP Version', 'ninja-forms') => get_bloginfo('version'), __('WP Multisite Enabled', 'ninja-forms') => $multisite, __('Web Server Info', 'ninja-forms') => esc_html($_SERVER['SERVER_SOFTWARE']), __('PHP Version', 'ninja-forms') => esc_html(phpversion()), __('MySQL Version', 'ninja-forms') => $wpdb->db_version(), __('PHP Locale', 'ninja-forms') => $data, __('WP Memory Limit', 'ninja-forms') => number_format_i18n(WP_MEMORY_LIMIT), __('WP Debug Mode', 'ninja-forms') => $debug, __('WP Language', 'ninja-forms') => $lang, __('WP Max Upload Size', 'ninja-forms') => size_format(wp_max_upload_size()), __('PHP Post Max Size', 'ninja-forms') => number_format_i18n(ini_get('post_max_size')), __('Max Input Nesting Level', 'ninja-forms') => ini_get('max_input_nesting_level'), __('PHP Time Limit', 'ninja-forms') => ini_get('max_execution_time'), __('PHP Max Input Vars', 'ninja-forms') => ini_get('max_input_vars'), __('SUHOSIN Installed', 'ninja-forms') => $suhosin, __('Server IP Address', 'ninja-forms') => $server_ip, __('Host Name', 'ninja-forms') => $host_name, __('SMTP', 'ninja-forms') => ini_get('SMTP'), __('smtp_port', 'ninja-forms') => ini_get('smtp_port'), __('Default Timezone', 'ninja-forms') => $default_timezone);
     Ninja_Forms::template('admin-menu-system-status.html.php', compact('environment', 'site_wide_plugins'));
 }
开发者ID:JSreactor,项目名称:MarketCrater.com,代码行数:76,代码来源:SystemStatus.php


示例18: add_action

<?php

/** NINJA FORMS **/
add_action('after_setup_theme', function () {
    if (class_exists('Ninja_Forms')) {
        //notices in admin from incorrect post message filterng - remove it
        $nf = Ninja_Forms::instance();
        remove_filter('post_updated_messages', array($nf->subs_cpt, 'post_updated_messages'));
        //remove CSS
        remove_action('ninja_forms_display_css', 'ninja_forms_display_css', 10, 2);
        //remove unsupported fields
        remove_action('init', 'ninja_forms_register_field_calc');
        remove_action('init', 'ninja_forms_register_field_credit_card');
        remove_action('init', 'ninja_forms_register_field_number');
        remove_action('init', 'ninja_forms_register_field_hr');
        remove_action('init', 'ninja_forms_register_field_profile_pass');
        remove_action('init', 'ninja_forms_register_field_rating');
        remove_action('init', 'ninja_forms_register_field_tax');
        remove_action('init', 'ninja_forms_register_field_timed_submit');
        remove_action('init', 'ninja_forms_register_field_spam');
        remove_action('admin_init', 'ninja_forms_register_sidebar_payment_fields');
        remove_action('admin_init', 'ninja_forms_register_sidebar_user_info_fields');
        add_action('admin_init', 'tst_nf_register_sidebar_user_info_fields');
    }
});
//to-do deregister unused fields
//wrapper class
add_filter('ninja_forms_display_field_wrap_class', 'tst_nf_field_wrap_class', 2, 3);
function tst_nf_field_wrap_class($field_wrap_class, $field_id, $field_row)
{
    if ($field_row['type'] == '_text') {
开发者ID:Teplitsa,项目名称:giger,代码行数:31,代码来源:forms.php


示例19: template_export_favorite_fields

 public function template_export_favorite_fields()
 {
     $fields = Ninja_Forms()->form()->get_fields(array('saved' => 1));
     Ninja_Forms::template('admin-metabox-import-export-favorite-fields-export.html.php', compact('fields'));
 }
开发者ID:JSreactor,项目名称:MarketCrater.com,代码行数:5,代码来源:ImportExport.php


示例20: info_meta_box

 /**
  * Info Meta Box
  *
  * @param $post
  */
 public function info_meta_box($post)
 {
     $sub = Ninja_Forms()->form()->sub($post->ID)->get();
     $seq_num = $sub->get_seq_num();
     $status = ucwords($sub->get_status());
     $user = $sub->get_user()->data->user_nicename;
     $form_title = $sub->get_form_title();
     $sub_date = $sub->get_sub_date('m/d/Y H:i');
     $mod_date = $sub->get_mod_date('m/d/Y H:i');
     Ninja_Forms::template('admin-metabox-sub-info.html.php', compact('seq_num', 'status', 'user', 'form_title', 'sub_date', 'mod_date'));
 }
开发者ID:Gerdie,项目名称:dreamy-wedding-company,代码行数:16,代码来源:Submission.php



注:本文中的Ninja_Forms类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP NoStatsPage类代码示例发布时间:2022-05-23
下一篇:
PHP NextendUri类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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