本文整理匯總了PHP中GFForms::include_addon_framework方法的典型用法代碼示例。如果您正苦於以下問題:PHP GFForms::include_addon_framework方法的具體用法?PHP GFForms::include_addon_framework怎麽用?PHP GFForms::include_addon_framework使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類GFForms
的用法示例。
在下文中一共展示了GFForms::include_addon_framework方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: load_plugin
/**
* Load the plugin.
*
* @since 2.0.0
*/
public function load_plugin()
{
if (!method_exists('GFForms', 'include_addon_framework')) {
return;
}
add_action('init', array($this, 'register_rewrite_rules'));
add_filter('query_vars', array($this, 'query_vars'));
add_action('template_redirect', array($this, 'template_redirect'));
add_action('wp_footer', array($this, 'wp_footer'));
// Load the Gravity Forms add-on framework and iframe add-on.
GFForms::include_addon_framework();
$this->addon = new GravityFormsIframe_Addon($this);
}
示例2: define
* - API wrappers
*/
if (!defined('GFWEBAPI_REQUIRE_SIGNATURE')) {
define('GFWEBAPI_REQUIRE_SIGNATURE', true);
}
if (!defined('GFWEBAPI_SLUG')) {
define('GFWEBAPI_SLUG', "gravityformsapi");
}
if (!defined('GFWEBAPI_ROUTE_VAR')) {
define('GFWEBAPI_ROUTE_VAR', 'gfapi_route');
}
if (!defined('GFWEBAPI_API_BASE_URL')) {
define('GFWEBAPI_API_BASE_URL', site_url(GFWEBAPI_SLUG));
}
if (class_exists("GFForms")) {
GFForms::include_addon_framework();
class GFWebAPI extends GFAddOn
{
protected $_version = "1.0";
protected $_min_gravityforms_version = "1.7.9999";
protected $_slug = "gravityformswebapi";
protected $_path = "gravityformswebapi/webapi.php";
protected $_full_path = __FILE__;
protected $_url = "http://www.gravityforms.com";
protected $_title = "Gravity Forms API";
protected $_short_title = "API";
private $_enabled;
private $_private_key;
private $_public_key;
// Members plugin integration
protected $_capabilities = array("gravityforms_api", "gravityforms_api_settings");
示例3: load
/**
* Load the plugin.
*
* Attaches hooks for intercepting requests for iframed forms and loads the
* Gravity Forms add-on framework and iframe add-on.
*
* @since 1.0.0
*/
public function load()
{
if (!method_exists('GFForms', 'include_addon_framework')) {
return;
}
self::load_textdomain();
add_action('init', array($this, 'init'));
add_filter('query_vars', array($this, 'query_vars'));
add_action('wp_loaded', array($this, 'maybe_flush_rewrite_rules'));
add_action('template_redirect', array($this, 'template_redirect'));
add_action('wp_footer', array($this, 'wp_footer'));
// Load the Gravity Forms add-on framework and iframe add-on.
GFForms::include_addon_framework();
require dirname(__FILE__) . '/includes/class-gfiframe-addon.php';
$this->addon = new GFIframe_Addon();
}
示例4: cfp_opinionshare_gform_field
function cfp_opinionshare_gform_field()
{
$options = get_option('cfp_opinionshare_options');
if ($options['cfp_opinionshare_gformchk_0'] == 1) {
if (class_exists("GFForms")) {
GFForms::include_addon_framework();
$forms = GFAPI::get_forms();
$i = 0;
$f = 0;
if (count($forms) != 0) {
echo '<select name="cfp_opinionshare_options[cfp_opinionshare_gform_0]">';
foreach ($forms as $form) {
// echo '<pre>';
// print_r($form);
// echo '</pre>';
// echo $form[title].' - '.$form[id].'<br/>';
echo '<option value="' . $form[id] . '" ' . selected($options['cfp_opinionshare_gform_0'], $form[id], false) . '>' . $form[title] . '</option>';
}
echo '</select>';
} else {
echo 'No Forms Found';
}
} else {
echo '<p><span class="dashicons dashicons-warning"></span> <strong class="red">Please install Gravity Forms</strong></p><p>Opinion Share uses Gravity Forms to provide feedback as to why your customer was unhappy with their service. Please install <a href="http://www.gravityforms.com/">Gravity Forms</a>.';
}
} else {
$authorbox = isset($options['authorbox_template']) ? $options['authorbox_template'] : '';
$authorbox = esc_textarea($authorbox);
//sanitise output
$settings = array('textarea_name' => 'cfp_opinionshare_options[authorbox_template]');
wp_editor($authorbox, 'right_editor', $settings);
}
}