当前位置: 首页>>代码示例>>PHP>>正文


PHP rgar函数代码示例

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


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

示例1: post_to_third_party

function post_to_third_party($entry, $form)
{
    $post_url = 'http://thirdparty.com';
    $body = array('first_name' => rgar($entry, '1.3'), 'last_name' => rgar($entry, '1.6'), 'message' => rgar($entry, '3'));
    $request = new WP_Http();
    $response = $request->post($post_url, array('body' => $body));
}
开发者ID:hansstam,项目名称:makerfaire,代码行数:7,代码来源:gf-makerspace-api.php

示例2: load

 /**
  * Loads the matching meta data for the currently set form id
  * @return boolean true on success and false on failure
  */
 public function load()
 {
     if (!defined('WPINC') || !$this->_post_id || !class_exists('GFAPI')) {
         return false;
     }
     $lead = \GFAPI::get_entry($this->_post_id);
     $form = \GFAPI::get_form($lead['form_id']);
     $values = array();
     foreach ($form['fields'] as $field) {
         if (isset($field["inputs"]) && is_array($field['inputs'])) {
             foreach ($field['inputs'] as $input) {
                 // Extract best label
                 $key = $input['label'] ? $input['label'] : \GFCommon::get_label($field, (string) $input["id"]);
                 // Redundant formatting
                 $key = strtolower(str_replace(array(' '), array('_'), $key));
                 $value = isset($lead[(string) $input['id']]) ? $lead[(string) $input['id']] : "";
                 $values[$key] = htmlentities(stripslashes($value), ENT_QUOTES);
             }
         } elseif (!rgar($field, 'displayOnly')) {
             // Extract best label
             $key = isset($field['adminLabel']) && $field['adminLabel'] != "" ? $field['adminLabel'] : ($field['label'] ? $field['label'] : \GFCommon::get_label($field));
             // More redundant formatting
             $key = strtolower(str_replace(array(' '), array('_'), $key));
             $value = isset($lead[$field['id']]) ? $lead[$field['id']] : "";
             $values[$key] = htmlentities(stripslashes($value), ENT_QUOTES);
         }
     }
     try {
         $this->assign($values);
     } catch (Exception $e) {
         $error = $e->getMessage();
     }
     return true;
 }
开发者ID:bluefission,项目名称:store_gform_data,代码行数:38,代码来源:GFUpdateable.php

示例3: gform_column_splits

function gform_column_splits($content, $field, $value, $lead_id, $form_id)
{
    if (IS_ADMIN) {
        return $content;
    }
    // only modify HTML on the front end
    $form = RGFormsModel::get_form_meta($form_id, true);
    $form_class = array_key_exists('cssClass', $form) ? $form['cssClass'] : '';
    $form_classes = preg_split('/[\\n\\r\\t ]+/', $form_class, -1, PREG_SPLIT_NO_EMPTY);
    $fields_class = array_key_exists('cssClass', $field) ? $field['cssClass'] : '';
    $field_classes = preg_split('/[\\n\\r\\t ]+/', $fields_class, -1, PREG_SPLIT_NO_EMPTY);
    if (!is_admin()) {
        // multi-column form functionality
        if ($field['type'] == 'section') {
            $form = RGFormsModel::get_form_meta($form_id, true);
            // check for the presence of multi-column form classes
            $form_class = explode(' ', $form['cssClass']);
            $form_class_matches = array_intersect($form_class, array('two-column', 'three-column'));
            // check for the presence of section break column classes
            $field_class = explode(' ', $field['cssClass']);
            $field_class_matches = array_intersect($field_class, array('gform_column'));
            // if field is a column break in a multi-column form, perform the list split
            if (!empty($form_class_matches) && !empty($field_class_matches)) {
                // make sure to target only multi-column forms
                // retrieve the form's field list classes for consistency
                $form = RGFormsModel::add_default_properties($form);
                $description_class = rgar($form, 'descriptionPlacement') == 'above' ? 'description_above' : 'description_below';
                // close current field's li and ul and begin a new list with the same form field list classes
                return '</li></ul><ul class="gform_fields ' . $form['labelPlacement'] . ' ' . $description_class . ' ' . $field['cssClass'] . '"><li class="gfield gsection empty">';
            }
        }
    }
    return $content;
}
开发者ID:kevwaddell,项目名称:motopro-desktop,代码行数:34,代码来源:gravity_forms_functions.php

示例4: set_post_categories

 /**
  * Update the post categories based on all post category fields
  *
  * @since 1.17
  *
  * @param array $form Gravity Forms form array
  * @param int $entry_id Numeric ID of the entry that was updated
  *
  * @return array|false|WP_Error Array of term taxonomy IDs of affected categories. WP_Error or false on failure. false if there are no post category fields or connected post.
  */
 public function set_post_categories($form = array(), $entry_id = 0)
 {
     $entry = GFAPI::get_entry($entry_id);
     $post_id = rgar($entry, 'post_id');
     if (empty($post_id)) {
         return false;
     }
     $return = false;
     $post_category_fields = GFAPI::get_fields_by_type($form, 'post_category');
     if ($post_category_fields) {
         $updated_categories = array();
         foreach ($post_category_fields as $field) {
             // Get the value of the field, including $_POSTed value
             $field_cats = RGFormsModel::get_field_value($field);
             $field_cats = is_array($field_cats) ? array_values($field_cats) : (array) $field_cats;
             $field_cats = gv_map_deep($field_cats, 'intval');
             $updated_categories = array_merge($updated_categories, array_values($field_cats));
         }
         // Remove `0` values from intval()
         $updated_categories = array_filter($updated_categories);
         /**
          * @filter `gravityview/edit_entry/post_categories/append` Should post categories be added to or replaced?
          * @since 1.17
          * @param bool $append If `true`, don't delete existing categories, just add on. If `false`, replace the categories with the submitted categories. Default: `false`
          */
         $append = apply_filters('gravityview/edit_entry/post_categories/append', false);
         $return = wp_set_post_categories($post_id, $updated_categories, $append);
     }
     return $return;
 }
开发者ID:mgratch,项目名称:GravityView,代码行数:40,代码来源:class-gravityview-field-post-category.php

示例5: validate

 function validate($posted_values)
 {
     $valid_key = true;
     $terms_accepted = true;
     $license_key = rgar($posted_values, 'license_key');
     if (empty($license_key)) {
         $message = esc_html__('Please enter a valid license key.', 'gravityflow') . '</span>';
         $this->set_field_validation_result('license_key', $message);
         $valid_key = false;
     } else {
         $license_info = gravity_flow()->activate_license($license_key);
         if (empty($license_info) || $license_info->license !== 'valid') {
             $message = "&nbsp;<i class='fa fa-times gf_keystatus_invalid'></i> <span class='gf_keystatus_invalid_text'>" . __('Invalid or Expired Key : Please make sure you have entered the correct value and that your key is not expired.', 'gravityflow') . '</span>';
             $this->set_field_validation_result('license_key', $message);
             $valid_key = false;
         }
     }
     $accept_terms = rgar($posted_values, 'accept_terms');
     if (!$valid_key && !$accept_terms) {
         $this->set_field_validation_result('accept_terms', __('Please accept the terms', 'gravityflow'));
         $terms_accepted = false;
     }
     $valid = $valid_key || !$valid_key && $terms_accepted;
     return $valid;
 }
开发者ID:jakejackson1,项目名称:gravityflow,代码行数:25,代码来源:class-iw-step-license-key.php

示例6: date_display

 /**
  * Get the default date format for a field based on the field ID and the time format setting
  *
  * @since 1.16.4
  * @param string $date_format The Gravity Forms date format for the field. Default: "mdy"
  * @param int $field_id The ID of the field. Used to figure out full date/day/month/year
  *
  * @return string PHP date format for the date
  */
 public static function date_display($value = '', $date_format = 'mdy', $field_id = 0)
 {
     // Let Gravity Forms figure out, based on the date format, what day/month/year values are.
     $parsed_date = GFCommon::parse_date($value, $date_format);
     // Are we displaying an input or the whole field?
     $field_input_id = gravityview_get_input_id_from_id($field_id);
     $date_field_output = '';
     switch ($field_input_id) {
         case 1:
             $date_field_output = rgar($parsed_date, 'day');
             break;
         case 2:
             $date_field_output = rgar($parsed_date, 'month');
             break;
         case 3:
             $date_field_output = rgar($parsed_date, 'year');
             break;
     }
     /**
      * @filter `gravityview_date_format` Whether to override the Gravity Forms date format with a PHP date format
      * @see https://codex.wordpress.org/Formatting_Date_and_Time
      * @param null|string Date Format (default: $field->dateFormat)
      */
     $full_date_format = apply_filters('gravityview_date_format', $date_format);
     $full_date = GFCommon::date_display($value, $full_date_format);
     // If the field output is empty, use the full date.
     // Note: The output might be empty because $parsed_date didn't parse correctly.
     return '' === $date_field_output ? $full_date : $date_field_output;
 }
开发者ID:mgratch,项目名称:GravityView,代码行数:38,代码来源:class-gravityview-field-date.php

示例7: get_value_merge_tag

 public function get_value_merge_tag($value, $input_id, $entry, $form, $modifier, $raw_value, $url_encode, $esc_html, $format, $nl2br)
 {
     $use_value = $modifier == 'value';
     $use_price = in_array($modifier, array('price', 'currency'));
     $format_currency = $modifier == 'currency';
     if (is_array($raw_value) && (string) intval($input_id) != $input_id) {
         $items = array($input_id => $value);
         //float input Ids. (i.e. 4.1 ). Used when targeting specific checkbox items
     } elseif (is_array($raw_value)) {
         $items = $raw_value;
     } else {
         $items = array($input_id => $raw_value);
     }
     $ary = array();
     foreach ($items as $input_id => $item) {
         if ($use_value) {
             list($val, $price) = rgexplode('|', $item, 2);
         } elseif ($use_price) {
             list($name, $val) = rgexplode('|', $item, 2);
             if ($format_currency) {
                 $val = GFCommon::to_money($val, rgar($entry, 'currency'));
             }
         } elseif ($this->type == 'post_category') {
             $use_id = strtolower($modifier) == 'id';
             $item_value = GFCommon::format_post_category($item, $use_id);
             $val = RGFormsModel::is_field_hidden($form, $this, array(), $entry) ? '' : $item_value;
         } else {
             $val = RGFormsModel::is_field_hidden($form, $this, array(), $entry) ? '' : RGFormsModel::get_choice_text($this, $raw_value, $input_id);
         }
         $ary[] = GFCommon::format_variable_value($val, $url_encode, $esc_html, $format);
     }
     return GFCommon::implode_non_blank(', ', $ary);
 }
开发者ID:ronenrer,项目名称:litaf,代码行数:33,代码来源:class-gf-field-select.php

示例8: add_pending_referral

 /**
  * Add pending referral
  *
  * @access public
  * @uses GFFormsModel::get_lead()
  * @uses GFCommon::get_product_fields()
  * @uses GFCommon::to_number()
  *
  * @param array $entry
  * @param array $form
  */
 public function add_pending_referral($entry, $form)
 {
     if ($this->was_referred()) {
         // Do some craziness to determine the price (this should be easy but is not)
         $desc = '';
         $entry = GFFormsModel::get_lead($entry['id']);
         $products = GFCommon::get_product_fields($form, $entry);
         $total = 0;
         foreach ($products['products'] as $key => $product) {
             $desc .= $product['name'];
             if ($key + 1 < count($products)) {
                 $description .= ', ';
             }
             $price = GFCommon::to_number($product['price']);
             if (is_array(rgar($product, 'options'))) {
                 $count = sizeof($product['options']);
                 $index = 1;
                 foreach ($product['options'] as $option) {
                     $price += GFCommon::to_number($option['price']);
                 }
             }
             $subtotal = floatval($product['quantity']) * $price;
             $total += $subtotal;
         }
         $total += floatval($products['shipping']['price']);
         $referral_total = $this->calculate_referral_amount($total, $entry['id']);
         $this->insert_pending_referral($referral_total, $entry['id'], $desc);
     }
 }
开发者ID:jwondrusch,项目名称:AffiliateWP,代码行数:40,代码来源:class-gravityforms.php

示例9: add_form_fields

 /**
  * If a form has list fields, add the columns to the field picker
  *
  * @since 1.17
  *
  * @param array $fields Associative array of fields, with keys as field type
  * @param array $form GF Form array
  * @param bool $include_parent_field Whether to include the parent field when getting a field with inputs
  *
  * @return array $fields with list field columns added, if exist. Unmodified if form has no list fields.
  */
 function add_form_fields($fields = array(), $form = array(), $include_parent_field = true)
 {
     $list_fields = GFAPI::get_fields_by_type($form, 'list');
     // Add the list columns
     foreach ($list_fields as $list_field) {
         if (empty($list_field->enableColumns)) {
             continue;
         }
         $list_columns = array();
         foreach ((array) $list_field->choices as $key => $input) {
             $input_id = sprintf('%d.%d', $list_field->id, $key);
             // {field_id}.{column_key}
             $list_columns[$input_id] = array('label' => rgar($input, 'text'), 'customLabel' => '', 'parent' => $list_field, 'type' => rgar($list_field, 'type'), 'adminLabel' => rgar($list_field, 'adminLabel'), 'adminOnly' => rgar($list_field, 'adminOnly'));
         }
         // If there are columns, add them under the parent field
         if (!empty($list_columns)) {
             $index = array_search($list_field->id, array_keys($fields)) + 1;
             /**
              * Merge the $list_columns into the $fields array at $index
              * @see https://stackoverflow.com/a/1783125
              */
             $fields = array_slice($fields, 0, $index, true) + $list_columns + array_slice($fields, $index, null, true);
         }
         unset($list_columns, $index, $input_id);
     }
     return $fields;
 }
开发者ID:mgratch,项目名称:GravityView,代码行数:38,代码来源:class-gravityview-field-list.php

示例10: gform_tooltip

/**
 * Displays the tooltip
 *
 * @global $__gf_tooltips
 *
 * @param string $name      The name of the tooltip to be displayed
 * @param string $css_class Optional. The CSS class to apply toi the element. Defaults to empty string.
 * @param bool   $return    Optional. If the tooltip should be returned instead of output. Defaults to false (output)
 *
 * @return string
 */
function gform_tooltip($name, $css_class = '', $return = false)
{
    global $__gf_tooltips;
    //declared as global to improve WPML performance
    $css_class = empty($css_class) ? 'tooltip' : $css_class;
    /**
     * Filters the tooltips available
     *
     * @param array $__gf_tooltips Array containing the available tooltips
     */
    $__gf_tooltips = apply_filters('gform_tooltips', $__gf_tooltips);
    //AC: the $name parameter is a key when it has only one word. Maybe try to improve this later.
    $parameter_is_key = count(explode(' ', $name)) == 1;
    $tooltip_text = $parameter_is_key ? rgar($__gf_tooltips, $name) : $name;
    $tooltip_class = isset($__gf_tooltips[$name]) ? "tooltip_{$name}" : '';
    $tooltip_class = esc_attr($tooltip_class);
    if (empty($tooltip_text)) {
        return '';
    }
    $tooltip = "<a href='#' onclick='return false;' onkeypress='return false;' class='gf_tooltip " . esc_attr($css_class) . " {$tooltip_class}' title='" . esc_attr($tooltip_text) . "'><i class='fa fa-question-circle'></i></a>";
    if ($return) {
        return $tooltip;
    } else {
        echo $tooltip;
    }
}
开发者ID:uwmadisoncals,项目名称:Cluster-Plugins,代码行数:37,代码来源:tooltips.php

示例11: acquirer_field_input

 /**
  * Acquirrer field input
  *
  * @param string $field_content
  * @param string $field
  * @param string $value
  * @param string $lead_id
  * @param string $form_id
  */
 public static function acquirer_field_input($field_content, $field, $value, $lead_id, $form_id)
 {
     $type = RGFormsModel::get_input_type($field);
     if (Pronamic_WP_Pay_Extensions_GravityForms_IssuerDropDown::TYPE === $type) {
         $id = $field['id'];
         $field_id = IS_ADMIN || 0 === $form_id ? "input_{$id}" : 'input_' . $form_id . "_{$id}";
         $class_suffix = RG_CURRENT_VIEW === 'entry' ? '_admin' : '';
         $size = rgar($field, 'size');
         $class = $size . $class_suffix;
         $css_class = trim(esc_attr($class) . ' gfield_ideal_acquirer_select');
         $tab_index = GFCommon::get_tabindex();
         $disabled_text = IS_ADMIN && 'entry' !== RG_CURRENT_VIEW ? "disabled='disabled'" : '';
         $html = '';
         $feed = get_pronamic_gf_pay_conditioned_feed_by_form_id($form_id, true);
         /**
          * Developing warning:
          * Don't use single quotes in the HTML you output, it is buggy in combination with SACK
          */
         if (IS_ADMIN) {
             if (null === $feed) {
                 $html .= sprintf("<a class='ideal-edit-link' href='%s' target='_blank'>%s</a>", add_query_arg('post_type', 'pronamic_pay_gf', admin_url('post-new.php')), __('Create iDEAL feed', 'pronamic_ideal'));
             } else {
                 $html .= sprintf("<a class='ideal-edit-link' href='%s' target='_blank'>%s</a>", get_edit_post_link($feed->id), __('Edit iDEAL feed', 'pronamic_ideal'));
             }
         }
         $html_input = '';
         $html_error = '';
         if (null !== $feed) {
             $gateway = Pronamic_WP_Pay_Plugin::get_gateway($feed->config_id);
             if ($gateway) {
                 $issuer_field = $gateway->get_issuer_field();
                 $error = $gateway->get_error();
                 if (is_wp_error($error)) {
                     $html_error .= Pronamic_WP_Pay_Plugin::get_default_error_message();
                     $html_error .= '<br /><em>' . $error->get_error_message() . '</em>';
                 } elseif ($issuer_field) {
                     $choices = $issuer_field['choices'];
                     $options = Pronamic_WP_HTML_Helper::select_options_grouped($choices, $value);
                     // Double quotes are not working, se we replace them with an single quote
                     $options = str_replace('"', '\'', $options);
                     $html_input = '';
                     $html_input .= sprintf("<select name='input_%d' id='%s' class='%s' %s %s>", $id, $field_id, $css_class, $tab_index, $disabled_text);
                     $html_input .= sprintf('%s', $options);
                     $html_input .= sprintf('</select>');
                 }
             }
         }
         if ($html_error) {
             $html .= sprintf("<div class='gfield_description validation_message'>");
             $html .= sprintf('%s', $html_error);
             $html .= sprintf('</div>');
         } else {
             $html .= sprintf("<div class='ginput_container ginput_ideal'>");
             $html .= sprintf('%s', $html_input);
             $html .= sprintf('</div>');
         }
         $field_content = $html;
     }
     return $field_content;
 }
开发者ID:daanbakker1995,项目名称:vanteun,代码行数:69,代码来源:Fields.php

示例12: get_field_input

 public function get_field_input($form, $value = '', $entry = null)
 {
     $is_entry_detail = $this->is_entry_detail();
     $is_form_editor = $this->is_form_editor();
     if (is_array($value)) {
         $value = array_values($value);
     }
     $form_id = $form['id'];
     $id = intval($this->id);
     $field_id = $is_entry_detail || $is_form_editor || $form_id == 0 ? "input_{$id}" : 'input_' . $form_id . "_{$id}";
     $form_id = ($is_entry_detail || $is_form_editor) && empty($form_id) ? rgget('id') : $form_id;
     $size = $this->size;
     $disabled_text = $is_form_editor ? "disabled='disabled'" : '';
     $class_suffix = $is_entry_detail ? '_admin' : '';
     $class = $this->emailConfirmEnabled ? '' : $size . $class_suffix;
     //Size only applies when confirmation is disabled
     $form_sub_label_placement = rgar($form, 'subLabelPlacement');
     $field_sub_label_placement = $this->subLabelPlacement;
     $is_sub_label_above = $field_sub_label_placement == 'above' || empty($field_sub_label_placement) && $form_sub_label_placement == 'above';
     $sub_label_class_attribute = $field_sub_label_placement == 'hidden_label' ? "class='hidden_sub_label'" : '';
     $html_input_type = RGFormsModel::is_html5_enabled() ? 'email' : 'text';
     $enter_email_field_input = GFFormsModel::get_input($this, $this->id . '');
     $confirm_field_input = GFFormsModel::get_input($this, $this->id . '.2');
     $enter_email_label = rgar($enter_email_field_input, 'customLabel') != '' ? $enter_email_field_input['customLabel'] : __('Enter Email', 'gravityforms');
     $enter_email_label = apply_filters("gform_email_{$form_id}", apply_filters('gform_email', $enter_email_label, $form_id), $form_id);
     $confirm_email_label = rgar($confirm_field_input, 'customLabel') != '' ? $confirm_field_input['customLabel'] : __('Confirm Email', 'gravityforms');
     $confirm_email_label = apply_filters("gform_email_confirm_{$form_id}", apply_filters('gform_email_confirm', $confirm_email_label, $form_id), $form_id);
     $single_placeholder_attribute = $this->get_field_placeholder_attribute();
     $enter_email_placeholder_attribute = $this->get_input_placeholder_attribute($enter_email_field_input);
     $confirm_email_placeholder_attribute = $this->get_input_placeholder_attribute($confirm_field_input);
     if ($is_form_editor) {
         $single_style = $this->emailConfirmEnabled ? "style='display:none;'" : '';
         $confirm_style = $this->emailConfirmEnabled ? '' : "style='display:none;'";
         if ($is_sub_label_above) {
             return "<div class='ginput_container ginput_single_email' {$single_style}>\n                            <input name='input_{$id}' type='{$html_input_type}' class='" . esc_attr($class) . "' disabled='disabled' {$single_placeholder_attribute} />\n                            <div class='gf_clear gf_clear_complex'></div>\n                        </div>\n                        <div class='ginput_complex ginput_container ginput_confirm_email' {$confirm_style} id='{$field_id}_container'>\n                            <span id='{$field_id}_container' class='ginput_left'>\n                                <label for='{$field_id}' {$sub_label_class_attribute}>{$enter_email_label}</label>\n                                <input class='{$class}' type='text' name='input_{$id}' id='{$field_id}' disabled='disabled' {$enter_email_placeholder_attribute}/>\n                            </span>\n                            <span id='{$field_id}_2_container' class='ginput_right'>\n                                <label for='{$field_id}_2' {$sub_label_class_attribute}>{$confirm_email_label}</label>\n                                <input class='{$class}' type='text' name='input_{$id}_2' id='{$field_id}_2' disabled='disabled' {$confirm_email_placeholder_attribute}/>\n                            </span>\n                            <div class='gf_clear gf_clear_complex'></div>\n                        </div>";
         } else {
             return "<div class='ginput_container ginput_single_email' {$single_style}>\n                            <input class='{$class}' name='input_{$id}' type='{$html_input_type}' class='" . esc_attr($class) . "' disabled='disabled' {$single_placeholder_attribute}/>\n                            <div class='gf_clear gf_clear_complex'></div>\n                        </div>\n                        <div class='ginput_complex ginput_container ginput_confirm_email' {$confirm_style} id='{$field_id}_container'>\n                            <span id='{$field_id}_container' class='ginput_left'>\n                                <input class='{$class}' type='text' name='input_{$id}' id='{$field_id}' disabled='disabled' {$enter_email_placeholder_attribute}/>\n                                <label for='{$field_id}' {$sub_label_class_attribute}>{$enter_email_label}</label>\n                            </span>\n                            <span id='{$field_id}_2_container' class='ginput_right'>\n                                <input class='{$class}' type='text' name='input_{$id}_2' id='{$field_id}_2' disabled='disabled' {$confirm_email_placeholder_attribute}/>\n                                <label for='{$field_id}_2' {$sub_label_class_attribute}>{$confirm_email_label}</label>\n                            </span>\n                            <div class='gf_clear gf_clear_complex'></div>\n                        </div>";
         }
     } else {
         $logic_event = $this->get_conditional_logic_event('keyup');
         if ($this->emailConfirmEnabled && !$is_entry_detail) {
             $first_tabindex = $this->get_tabindex();
             $last_tabindex = $this->get_tabindex();
             $email_value = is_array($value) ? esc_attr($value[0]) : $value;
             $confirmation_value = is_array($value) ? esc_attr($value[1]) : rgpost('input_' . $this->id . '_2');
             $confirmation_disabled = $is_entry_detail ? "disabled='disabled'" : $disabled_text;
             if ($is_sub_label_above) {
                 return "<div class='ginput_complex ginput_container' id='{$field_id}_container'>\n                                <span id='{$field_id}_container' class='ginput_left'>\n                                    <label for='{$field_id}'>" . $enter_email_label . "</label>\n                                    <input class='{$class}' type='{$html_input_type}' name='input_{$id}' id='{$field_id}' value='" . $email_value . "' {$first_tabindex} {$logic_event} {$disabled_text} {$enter_email_placeholder_attribute}/>\n                                </span>\n                                <span id='{$field_id}_2_container' class='ginput_right'>\n                                    <label for='{$field_id}_2' {$sub_label_class_attribute}>{$confirm_email_label}</label>\n                                    <input class='{$class}' type='{$html_input_type}' name='input_{$id}_2' id='{$field_id}_2' value='" . $confirmation_value . "' {$last_tabindex} {$confirmation_disabled} {$confirm_email_placeholder_attribute}/>\n                                </span>\n                                <div class='gf_clear gf_clear_complex'></div>\n                            </div>";
             } else {
                 return "<div class='ginput_complex ginput_container' id='{$field_id}_container'>\n                                <span id='{$field_id}_container' class='ginput_left'>\n                                    <input class='{$class}' type='{$html_input_type}' name='input_{$id}' id='{$field_id}' value='" . $email_value . "' {$first_tabindex} {$logic_event} {$disabled_text} {$enter_email_placeholder_attribute}/>\n                                    <label for='{$field_id}' {$sub_label_class_attribute}>{$enter_email_label}</label>\n                                </span>\n                                <span id='{$field_id}_2_container' class='ginput_right'>\n                                    <input class='{$class}' type='{$html_input_type}' name='input_{$id}_2' id='{$field_id}_2' value='" . $confirmation_value . "' {$last_tabindex} {$confirmation_disabled} {$confirm_email_placeholder_attribute}/>\n                                    <label for='{$field_id}_2' {$sub_label_class_attribute}>{$confirm_email_label}</label>\n                                </span>\n                                <div class='gf_clear gf_clear_complex'></div>\n                            </div>";
             }
         } else {
             $tabindex = $this->get_tabindex();
             $value = esc_attr($value);
             $class = esc_attr($class);
             return "<div class='ginput_container'>\n                            <input name='input_{$id}' id='{$field_id}' type='{$html_input_type}' value='{$value}' class='{$class}' {$tabindex} {$logic_event} {$disabled_text} {$single_placeholder_attribute}/>\n                        </div>";
         }
     }
 }
开发者ID:anucha-digitalnoir,项目名称:freighthub-logistic,代码行数:59,代码来源:class-gf-field-email.php

示例13: column_is_active

 function column_is_active($item)
 {
     $is_active = intval(rgar($item, "is_active"));
     $src = GFCommon::get_base_url() . "/images/active{$is_active}.png";
     $title = $is_active ? __("Active", "gravityforms") : __("Inactive", "gravityforms");
     $img = sprintf("<img src=\"{$src}\" class=\"toggle_active\" title=\"{$title}\" data-feed-id=\"%s\" style=\"cursor:pointer\";/>", $item['id']);
     return $img;
 }
开发者ID:sbayer55,项目名称:The-Road-Gallery,代码行数:8,代码来源:class.plugify-gfaddonfeedstable.php

示例14: rgars

 /**
  * @param $array
  * @param $name
  *
  * @return string
  */
 function rgars($array, $name)
 {
     $names = explode('/', $name);
     $val = $array;
     foreach ($names as $current_name) {
         $val = rgar($val, $current_name);
     }
     return $val;
 }
开发者ID:braddalton,项目名称:Gravity-Forms-Stripe,代码行数:15,代码来源:gf-utility-functions.php

示例15: has_docs_field

 /**
  * Check if the form has a text field with a Custom CSS Class that contains 'helpscout-docs'
  *
  * @param array $form
  *
  * @return bool True: yes, it does. False: nope.
  */
 private function has_docs_field($form)
 {
     $text_fields = GFCommon::get_fields_by_type($form, 'text');
     foreach ($text_fields as $text_field) {
         if (strpos(rgar($text_field, 'cssClass'), self::field_css_class) !== false) {
             return true;
         }
     }
     return false;
 }
开发者ID:easydigitaldownloads,项目名称:gravity-forms-help-scout-search,代码行数:17,代码来源:gravity-forms-help-scout-search.php


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