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


PHP GFFormDisplay::enqueue_form_scripts方法代码示例

本文整理汇总了PHP中GFFormDisplay::enqueue_form_scripts方法的典型用法代码示例。如果您正苦于以下问题:PHP GFFormDisplay::enqueue_form_scripts方法的具体用法?PHP GFFormDisplay::enqueue_form_scripts怎么用?PHP GFFormDisplay::enqueue_form_scripts使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在GFFormDisplay的用法示例。


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

示例1: enqueue_form_scripts

 public static function enqueue_form_scripts($form_id, $is_ajax = false)
 {
     require_once GFCommon::get_base_path() . '/form_display.php';
     $form = RGFormsModel::get_form_meta($form_id);
     GFFormDisplay::enqueue_form_scripts($form, $is_ajax);
     $addons = GFAddOn::get_registered_addons();
     foreach ($addons as $addon) {
         $a = call_user_func(array($addon, 'get_instance'));
         $a->enqueue_scripts($form, $is_ajax);
     }
 }
开发者ID:kidaak,项目名称:gravityforms,代码行数:11,代码来源:gravityforms.php

示例2: print_scripts

 /**
  * Force Gravity Forms to output scripts as if it were in the admin
  * @return void
  */
 function print_scripts()
 {
     $gravityview_view = GravityView_View::getInstance();
     wp_register_script('gform_gravityforms', GFCommon::get_base_url() . '/js/gravityforms.js', array('jquery', 'gform_json', 'gform_placeholder', 'sack', 'plupload-all', 'gravityview-fe-view'));
     GFFormDisplay::enqueue_form_scripts($gravityview_view->getForm(), false);
     // Sack is required for images
     wp_print_scripts(array('sack', 'gform_gravityforms'));
 }
开发者ID:hansstam,项目名称:makerfaire,代码行数:12,代码来源:class-edit-entry-render.php

示例3: gravity_form_enqueue_scripts

function gravity_form_enqueue_scripts($form_id, $is_ajax = false)
{
    if (!is_admin()) {
        require_once GFCommon::get_base_path() . "/form_display.php";
        $form = RGFormsModel::get_form_meta($form_id);
        GFFormDisplay::enqueue_form_scripts($form, $is_ajax);
    }
}
开发者ID:Blueprint-Marketing,项目名称:interoccupy.net,代码行数:8,代码来源:gravityforms.php

示例4: gform_do_shortcode

 public static function gform_do_shortcode($content)
 {
     $is_ajax = false;
     $forms = GFFormDisplay::get_embedded_forms($content, $is_ajax);
     foreach ($forms as $form) {
         if (headers_sent()) {
             GFFormDisplay::print_form_scripts($form, $is_ajax);
         } else {
             GFFormDisplay::enqueue_form_scripts($form, $is_ajax);
         }
     }
     return do_shortcode($content);
 }
开发者ID:Ezyva2015,项目名称:SMSF-Academy-Wordpress,代码行数:13,代码来源:common.php

示例5:

        <link rel='stylesheet' href='<?php 
echo GFCommon::get_base_url();
?>
/css/reset.css' type='text/css' />
        <link rel='stylesheet' href='<?php 
echo GFCommon::get_base_url();
?>
/css/forms.css' type='text/css' />
        <link rel='stylesheet' href='<?php 
echo GFCommon::get_base_url();
?>
/css/preview.css' type='text/css' />
        <?php 
require_once GFCommon::get_base_path() . "/form_display.php";
$form = RGFormsModel::get_form_meta($_GET["id"]);
GFFormDisplay::enqueue_form_scripts($form);
wp_print_scripts();
$styles = apply_filters("gform_preview_styles", false, $form);
if (!empty($styles)) {
    wp_print_styles($styles);
}
?>

    </head>
    <body>
    <div id="preview_top">
	    <div id="preview_hdr">
		    <div><span class="actionlinks"><a href="javascript:window.close()" class="close_window"><?php 
_e("close window", "gravityforms");
?>
</a></span><?php 
开发者ID:rongandat,项目名称:cyarevfoods,代码行数:31,代码来源:preview.php

示例6: gform_do_shortcode

 public static function gform_do_shortcode($content)
 {
     $is_ajax = false;
     $forms = GFFormDisplay::get_embedded_forms($content, $is_ajax);
     foreach ($forms as $form) {
         /**
          * Determine if scripts and stylesheets should be printed or enqueued when processing form shortcodes after headers have been sent.
          *
          * @since 2.0
          *
          * @param bool $disable_print_form_script Defaults to false.
          * @param array $form The form object for the shortcode being processed.
          * @param bool $is_ajax Indicates if ajax was enabled on the shortcode.
          */
         $disable_print_form_script = apply_filters('gform_disable_print_form_scripts', false, $form, $is_ajax);
         if (headers_sent() && !$disable_print_form_script) {
             GFFormDisplay::print_form_scripts($form, $is_ajax);
         } else {
             GFFormDisplay::enqueue_form_scripts($form, $is_ajax);
         }
     }
     return do_shortcode($content);
 }
开发者ID:nickwoodland,项目名称:easysitges,代码行数:23,代码来源:common.php

示例7: initialise_form_edit

 public static function initialise_form_edit()
 {
     /*
      * If we aren't editing our form, don't do anything
      */
     if (empty($_GET['action']) || empty($_GET['lid']) || !is_user_logged_in()) {
         return false;
     }
     $lid = isset($_GET['lid']) ? (int) $_GET['lid'] : 0;
     self::$lead = $lead = GFAPI::get_entry($lid);
     self::$form = $form = GFAPI::get_form(self::$lead['form_id']);
     if (!self::check_user_permission(self::$lead)) {
         return false;
     }
     self::$allowed_edit = true;
     if (!class_exists('GFFormDisplay')) {
         require_once GFCommon::get_base_path() . "/form_display.php";
     }
     $field_values = RGForms::post("gform_field_values");
     /*
      * Include appropriate css/javascript here...
      */
     GFFormDisplay::enqueue_form_scripts($form, false);
     GFFormDisplay::add_init_script($form["id"], "conditional_logic", GFFormDisplay::ON_PAGE_RENDER, self::get_conditional_logic($form, $field_values));
     GFFormDisplay::add_init_script($form["id"], "pricing", GFFormDisplay::ON_PAGE_RENDER, GFFormDisplay::get_pricing_init_script($form));
     $chosen_script = GFFormDisplay::get_chosen_init_script($form);
     GFFormDisplay::add_init_script($form["id"], "chosen", GFFormDisplay::ON_PAGE_RENDER, $chosen_script);
     GFFormDisplay::add_init_script($form["id"], "chosen", GFFormDisplay::ON_CONDITIONAL_LOGIC, $chosen_script);
     GFFormDisplay::add_init_script($form['id'], 'input_mask', GFFormDisplay::ON_PAGE_RENDER, GFFormDisplay::get_input_mask_init_script($form));
     GFFormDisplay::add_init_script($form['id'], 'calculation', GFFormDisplay::ON_PAGE_RENDER, GFFormDisplay::get_calculations_init_script($form));
     GFFormDisplay::add_init_script($form['id'], 'currency_format', GFFormDisplay::ON_PAGE_RENDER, GFFormDisplay::get_currency_format_init_script($form));
     return true;
 }
开发者ID:Ezyva2015,项目名称:SMSF-Academy-Wordpress,代码行数:33,代码来源:entry-edit-logic.php

示例8: enqueue_form_scripts

 public function enqueue_form_scripts()
 {
     $form = $this->get_current_form();
     if (empty($form)) {
         return;
     }
     require_once GFCommon::get_base_path() . '/form_display.php';
     if ($this->has_enhanced_dropdown($form)) {
         if (wp_script_is('chosen', 'registered')) {
             wp_enqueue_script('chosen');
         } else {
             wp_enqueue_script('gform_chosen');
         }
     }
     GFFormDisplay::enqueue_form_scripts($form);
 }
开发者ID:jakejackson1,项目名称:gravityflow,代码行数:16,代码来源:class-gravity-flow.php


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