當前位置: 首頁>>代碼示例>>PHP>>正文


PHP GFAddOn::get_gfaddon_base_url方法代碼示例

本文整理匯總了PHP中GFAddOn::get_gfaddon_base_url方法的典型用法代碼示例。如果您正苦於以下問題:PHP GFAddOn::get_gfaddon_base_url方法的具體用法?PHP GFAddOn::get_gfaddon_base_url怎麽用?PHP GFAddOn::get_gfaddon_base_url使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在GFAddOn的用法示例。


在下文中一共展示了GFAddOn::get_gfaddon_base_url方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: scripts

 /**
  * Override this function to provide a list of scripts to be enqueued.
  * When overriding this function, be sure to call parent::scripts() to ensure the base class scripts are enqueued.
  * Following is an example of the array that is expected to be returned by this function:
  *<pre>
  * <code>
  *
  *    array(
  *        array(  "handle" => 'maskedinput',
  *                "src" => GFCommon::get_base_url() . '/js/jquery.maskedinput-1.3.min.js',
  *                "version" => GFCommon::$version,
  *                "deps" => array("jquery"),
  *                "in_footer" => false,
  *
  *                //Determines where the script will be enqueued. The script will be enqueued if any of the conditions match
  *                "enqueue" => array(
  *                                    //admin_page - Specified one or more pages (known pages) where the script is supposed to be enqueued.
  *                                    //To enqueue scripts in the front end (public website), simply don't define this setting
  *                                    array("admin_page" => array("form_settings", 'plugin_settings') ),
  *
  *                                    //tab - Specifies a form settings or plugin settings tab in which the script is supposed to be enqueued. If none is specified, the script will be enqueued in any of the form settings or plugin_settings page
  *                                    array("tab" => 'signature'),
  *
  *                                    //query - Specifies a set of query string ($_GET) values. If all specified query string values match the current requested page, the script will be enqueued
  *                                    array("query" => 'page=gf_edit_forms&view=settings&id=_notempty_')
  *
  *                                    //post - Specifies a set of post ($_POST) values. If all specified posted values match the current request, the script will be enqueued
  *                                    array("post" => 'posted_field=val')
  *
  *                                    )
  *            ),
  *        array(
  *            "handle" => 'super_signature_script',
  *            "src" => $this->get_base_url() . '/super_signature/ss.js',
  *            "version" => $this->_version,
  *            "deps" => array("jquery"),
  *            "callback" => array($this, 'localize_scripts'),
  *            "strings" => array(
  *                               // Accessible in JavaScript using the global variable "[script handle]_strings"
  *                               "stringKey1" => __("The string", 'gravityforms'),
  *                               "stringKey2" => __("Another string.", 'gravityforms')
  *                               )
  *            "enqueue" => array(
  *                                //field_types - Specifies one or more field types that requires this script. The script will only be enqueued if the current form has a field of any of the specified field types. Only applies when a current form is available.
  *                                array("field_types" => array("signature"))
  *                                )
  *        )
  *  );
  *
  * </code>
  * </pre>
  */
 public function scripts()
 {
     $min = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG || isset($_GET['gform_debug']) ? '' : '.min';
     return array(array('handle' => 'gform_form_admin', 'enqueue' => array(array('admin_page' => array('form_settings')))), array('handle' => 'gform_gravityforms', 'enqueue' => array(array('admin_page' => array('form_settings')))), array('handle' => 'google_charts', 'src' => 'https://www.google.com/jsapi', 'version' => GFCommon::$version, 'enqueue' => array(array('admin_page' => array('results')))), array('handle' => 'gaddon_results_js', 'src' => GFAddOn::get_gfaddon_base_url() . "/js/gaddon_results{$min}.js", 'version' => GFCommon::$version, 'deps' => array('jquery', 'sack', 'jquery-ui-resizable', 'gform_datepicker_init', 'google_charts', 'gform_field_filter'), 'callback' => array('GFResults', 'localize_results_scripts'), 'enqueue' => array(array('admin_page' => array('results')))), array('handle' => 'gaddon_repeater', 'src' => GFAddOn::get_gfaddon_base_url() . "/js/repeater{$min}.js", 'version' => GFCommon::$version, 'deps' => array('jquery'), 'enqueue' => array(array('admin_page' => array('form_settings')))), array('handle' => 'gaddon_fieldmap_js', 'src' => GFAddOn::get_gfaddon_base_url() . "/js/gaddon_fieldmap{$min}.js", 'version' => GFCommon::$version, 'deps' => array('jquery', 'gaddon_repeater'), 'enqueue' => array(array('admin_page' => array('form_settings')))), array('handle' => 'gaddon_selectcustom_js', 'src' => GFAddOn::get_gfaddon_base_url() . "/js/gaddon_selectcustom{$min}.js", 'version' => GFCommon::$version, 'deps' => array('jquery'), 'enqueue' => array(array('admin_page' => array('form_settings', 'plugin_settings')))));
 }
開發者ID:fjbeteiligung,項目名稱:development,代碼行數:57,代碼來源:class-gf-addon.php

示例2: scripts

 /**
  * Override this function to provide a list of scripts to be enqueued.
  * When overriding this function, be sure to call parent::scripts() to ensure the base class scripts are enqueued.
  * Following is an example of the array that is expected to be returned by this function:
  *<pre>
  * <code>
  *
  *    array(
  *        array(  "handle" => "maskedinput",
  *                "src" => GFCommon::get_base_url() . "/js/jquery.maskedinput-1.3.min.js",
  *                "version" => GFCommon::$version,
  *                "deps" => array("jquery"),
  *                "in_footer" => false,
  *
  *                //Determines where the script will be enqueued. The script will be enqueued if any of the conditions match
  *                "enqueue" => array(
  *                                    //admin_page - Specified one or more pages (known pages) where the script is supposed to be enqueued. When this setting is specified, scripts will only be enqueued in those pages.
  *                                    //To enqueue scripts in the front end (public website), simply don't define this setting
  *                                    array("admin_page" => array("form_settings", "plugin_settings") ),
  *
  *                                    //tab - Specifies a form settings or plugin settings tab in which the script is supposed to be enqueued. If none is specified, the script will be enqueued in any of the form settings or plugin_settings page
  *                                    array("tab" => "signature"),
  *
  *                                    //query - Specifies a set of query string ($_GET) values. If all specified query string values match the current requested page, the script will be enqueued
  *                                    array("query" => "page=gf_edit_forms&view=settings&id=_notempty_")
  *
  *                                    //post - Specifies a set of post ($_POST) values. If all specified posted values match the current request, the script will be enqueued
  *                                    array("post" => "posted_field=val")
  *
  *                                    )
  *            ),
  *        array(
  *            "handle" => "super_signature_script",
  *            "src" => $this->get_base_url() . "/super_signature/ss.js",
  *            "version" => $this->_version,
  *            "deps" => array("jquery"),
  *            "callback" => array($this, "localize_scripts"),
  *            "strings" => array(
  *                               // Accessible in JavaScript using the global variable "[script handle]_strings"
  *                               "stringKey1" => __("The string", "gravityforms"),
  *                               "stringKey2" => __("Another string.", "gravityforms")
  *                               )
  *            "enqueue" => array(
  *                                //field_types - Specifies one or more field types that requires this script. The script will only be enqueued if the current form has a field of any of the specified field types. Only applies when a current form is available.
  *                                array("field_types" => array("signature"))
  *                                )
  *        )
  *  );
  *
  * </code>
  * </pre>
  */
 protected function scripts()
 {
     return array(array('handle' => 'gform_form_admin', 'enqueue' => array(array("admin_page" => array("form_settings")))), array('handle' => 'gform_gravityforms', 'enqueue' => array(array("admin_page" => array("form_settings")))), array("handle" => "google_charts", "src" => "https://www.google.com/jsapi", "version" => GFCommon::$version, "enqueue" => array(array("admin_page" => array("results")))), array("handle" => "gaddon_results_js", "src" => GFAddOn::get_gfaddon_base_url() . "/js/gaddon_results.js", "version" => GFCommon::$version, "deps" => array('jquery', 'sack', 'jquery-ui-resizable', 'jquery-ui-datepicker', 'google_charts', 'gform_field_filter'), "callback" => array('GFResults', "localize_results_scripts"), "enqueue" => array(array("admin_page" => array("results")))), array('handle' => 'gaddon_repeater', 'src' => GFAddOn::get_gfaddon_base_url() . '/js/repeater.js', 'version' => GFCommon::$version, 'deps' => array('jquery'), 'enqueue' => array(array('admin_page' => array('form_settings')))));
 }
開發者ID:BisongT,項目名稱:Myevent_website,代碼行數:56,代碼來源:class-gf-addon.php

示例3: results_page_init

 protected function results_page_init($results_page_config)
 {
     require_once "class-gf-results.php";
     $this->register_script("gaddon_results_js", GFAddOn::get_gfaddon_base_url() . "/js/gaddon_results.js", array("jquery", "sack"), GFCommon::$version, true);
     $this->register_script('jquery-ui-resizable', false, array('jquery'), false, false);
     $this->register_script('jquery-ui-datepicker', false, array('jquery'), false, false);
     $this->register_script('google_charts', "https://www.google.com/jsapi", array('jquery'), false, false);
     $this->register_style("gaddon_results_css", GFAddOn::get_gfaddon_base_url() . "/css/gaddon_results.css", null, GFCommon::$version);
     $gf_results = new GFResults($this->_slug, $results_page_config);
     $gf_results->init();
 }
開發者ID:kmzdn,項目名稱:bootstrap,代碼行數:11,代碼來源:class-gf-addon.php


注:本文中的GFAddOn::get_gfaddon_base_url方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。