本文整理汇总了PHP中GFAddOn::init_frontend方法的典型用法代码示例。如果您正苦于以下问题:PHP GFAddOn::init_frontend方法的具体用法?PHP GFAddOn::init_frontend怎么用?PHP GFAddOn::init_frontend使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GFAddOn
的用法示例。
在下文中一共展示了GFAddOn::init_frontend方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: init_frontend
public function init_frontend() {
parent::init_frontend();
add_action( 'gform_entry_post_save', array( $this, 'maybe_process_feed' ), 10, 2 );
}
示例2: init_frontend
public function init_frontend()
{
parent::init_frontend();
//Only run this code if the Paypal add-on ISN'T being used.
//Paypal doesn't validate transaction until after submission,
//so this isn't good for Paypal
if (!is_plugin_active('gravityformspaypal/paypal.php')) {
add_action('gform_after_submission', array($this, 'after_submission'), 10, 2);
}
//The wp_cron job to assign the domain to the droplet.
//This can't be done instantly as when the droplet is still
//being created, I've found it to be unresponsive to
//new commands (like adding a domain).
//So we delay this action a bit..
add_action('do_domain_for_droplet', 'do_domain', 10, 3);
//Store options for the plugin
$gfdo_settings = get_option('gfdosettings');
if (!is_array($gfdo_settings)) {
$gfdo_settings = array();
}
//Update version
$gfdo_settings['version'] = $this->_version;
//Update API URL
$gfdo_settings['api_url'] = $this->_api_url;
//Update slug
$gfdo_settings['slug'] = $this->_slug;
//Update path
$gfdo_settings['path'] = $this->_path;
update_option('gfdosettings', $gfdo_settings);
}
示例3: init_frontend
/**
* Register functions to be called on the frontend
* @return void
*/
public function init_frontend()
{
parent::init_frontend();
add_action('gform_entry_field_value', array($this, 'display_entry_field_value'), 10, 4);
add_filter('gform_save_field_value', array($this, 'save_field_value'), 10, 4);
add_filter('gform_field_validation', array($this, 'validate'), 10, 4);
add_filter('gform_field_input', array($this, 'business_hours_field'), 10, 5);
}
示例4: init_frontend
public function init_frontend()
{
parent::init_frontend();
$recaptcha = new BU_GF_Google_reCAPTCHA();
$recaptcha->setDisabled($this->get_plugin_setting('recaptcha_disabled'));
add_filter('gform_validation', array($recaptcha, 'checkSubmission'));
add_filter('gform_pre_render', array($recaptcha, 'render'));
}
示例5: init_frontend
/**
* Frontend initiates
*/
public function init_frontend()
{
parent::init_frontend();
// Start Session
if (!session_id()) {
session_start();
}
// Add Actions
$this->add_actions();
}
开发者ID:shanooooon,项目名称:save-between-pages-for-gravityforms,代码行数:13,代码来源:class-save-between-page-for-gravityforms-api.php
示例6: init_frontend
public function init_frontend()
{
parent::init_frontend();
add_filter('gform_after_submission_7', array($this, 'multi_after_submit'), 10, 2);
/*
$form_ids = $this->get_multi_entry_enabled();
foreach($form_ids as $form_id) {
add_filter("gform_after_submission_$form_id", array( $this, 'multi_after_submit' ), 10, 2);
}
*/
}
示例7: init_frontend
public function init_frontend()
{
parent::init_frontend();
//needed for print entry screen
add_filter('gform_entry_field_value', array($this, 'signature_entry_detail'), 10, 5);
add_action('gform_pre_submission', array($this, 'pre_submission_handler'));
add_filter('gform_field_validation', array($this, 'signature_validation'), 10, 4);
//displays signature field
add_action('gform_field_input', array($this, 'signature_input'), 10, 5);
//displays saved signature
add_filter('gform_merge_tag_filter', array($this, 'merge_tag_filter'), 10, 4);
add_action('gform_submission_values_pre_save', array($this, 'submission_values_pre_save'), 10, 2);
}
示例8: init_frontend
public function init_frontend()
{
parent::init_frontend();
$gravitypopulate = explode(',', esc_attr(get_option('gravitypopulate_options')));
$gravitypopulate = array_map('trim', $gravitypopulate);
foreach ($gravitypopulate as $key) {
add_filter('gform_field_value_' . $key, function ($arg) use($key) {
if (isset($_GET[$key])) {
return htmlspecialchars($_GET[$key], ENT_QUOTES);
} else {
if (isset($_COOKIE[$key])) {
return htmlspecialchars($_COOKIE[$key], ENT_QUOTES);
} else {
return '';
}
}
}, -999);
}
}
示例9: init_frontend
public function init_frontend()
{
parent::init_frontend();
$settings = $this->get_plugin_settings();
$this->_enabled = rgar($settings, 'enabled');
$this->_public_key = rgar($settings, 'public_key');
$this->_private_key = rgar($settings, 'private_key');
if (false == $this->_enabled) {
return;
}
add_rewrite_rule(GFWEBAPI_SLUG . '/(.*)', 'index.php?' . GFWEBAPI_ROUTE_VAR . '=$matches[1]', $after = 'top');
if (!get_option('gravityforms_rewrite_rules_flushed')) {
flush_rewrite_rules();
update_option('gravityforms_rewrite_rules_flushed', true);
}
add_filter('query_vars', array($this, 'query_vars'));
add_action('template_redirect', array($this, 'handle_page_request'));
// update the cache
add_action('gform_entry_created', array($this, 'entry_created'), 10, 2);
}
示例10: init_frontend
public function init_frontend()
{
parent::init_frontend();
add_action('gform_after_submission', array($this, 'maybe_process_feed'), 10, 2);
}
示例11: init_frontend
protected function init_frontend()
{
// maybe display results on confirmation
add_filter('gform_confirmation', array($this, 'display_confirmation'), 10, 4);
// shortcodes
add_filter('gform_shortcode_polls', array($this, 'poll_shortcode'), 10, 3);
add_shortcode('gfpolls_total', array($this, 'poll_total_shortcode'));
// merge tags
add_filter('gform_merge_tag_filter', array($this, 'merge_tag_filter'), 10, 5);
add_filter('gform_replace_merge_tags', array($this, 'render_merge_tag'), 10, 7);
add_filter('gform_entry_field_value', array($this, 'display_poll_on_entry_print'), 10, 4);
// shuffle choices if configured
add_filter('gform_field_content', array($this, 'render_poll_field_content'), 10, 5);
// update the cache
add_action('gform_entry_created', array($this, 'entry_created'), 10, 2);
add_action('gform_validation', array($this, 'form_validation'));
add_filter('gform_pre_render', array($this, 'pre_render'));
// Mailchimp Add-On integration
add_filter('gform_mailchimp_field_value', array($this, 'display_entries_field_value'), 10, 4);
// Aweber Add-On integration
add_filter('gform_aweber_field_value', array($this, 'display_entries_field_value'), 10, 4);
// Campaign Monitor Add-On integration
add_filter('gform_campaignmonitor_field_value', array($this, 'display_entries_field_value'), 10, 4);
// Zapier Add-On integration
add_filter('gform_zapier_field_value', array($this, 'display_entries_field_value'), 10, 4);
parent::init_frontend();
}
示例12: init_frontend
public function init_frontend()
{
add_filter('gform_validation', array($this, 'validation'));
// merge tags
add_filter('gform_merge_tag_filter', array($this, 'merge_tag_filter'), 10, 5);
add_filter('gform_replace_merge_tags', array($this, 'replace_merge_tags'), 10, 7);
// Mailchimp Add-On integration
add_filter('gform_mailchimp_field_value', array($this, 'display_entries_field_value'), 10, 4);
// Aweber Add-On integration
add_filter('gform_aweber_field_value', array($this, 'display_entries_field_value'), 10, 4);
// Campaign Monitor Add-On integration
add_filter('gform_campaignmonitor_field_value', array($this, 'display_entries_field_value'), 10, 4);
// Zapier Add-On integration
add_filter('gform_zapier_field_value', array($this, 'display_entries_field_value'), 10, 4);
parent::init_frontend();
}
示例13: init_frontend
public function init_frontend()
{
// scripts
add_action('gform_enqueue_scripts', array($this, 'enqueue_front_end_scripts'), 10, 2);
// maybe shuffle fields
add_filter('gform_form_tag', array($this, 'maybe_store_selected_field_ids'), 10, 2);
add_filter('gform_pre_render', array($this, 'pre_render'));
add_action('gform_pre_validation', array($this, 'pre_render'));
// shuffle choices if configured
add_filter('gform_field_content', array($this, 'render_quiz_field_content'), 10, 5);
// merge tags
add_filter('gform_merge_tag_filter', array($this, 'merge_tag_filter'), 10, 5);
add_filter('gform_replace_merge_tags', array($this, 'render_merge_tag'), 10, 7);
// confirmation
add_filter('gform_confirmation', array($this, 'display_confirmation'), 10, 4);
// Mailchimp Add-On integration
add_filter('gform_mailchimp_field_value', array($this, 'display_entries_field_value'), 10, 4);
// Aweber Add-On integration
add_filter('gform_aweber_field_value', array($this, 'display_entries_field_value'), 10, 4);
// Campaign Monitor Add-On integration
add_filter('gform_campaignmonitor_field_value', array($this, 'display_entries_field_value'), 10, 4);
// Zapier Add-On integration
add_filter('gform_zapier_field_value', array($this, 'display_entries_field_value'), 10, 4);
//------------------- admin but outside admin context ------------------------
// display quiz results on entry footer
add_action('gform_print_entry_footer', array($this, 'print_entry_footer'), 10, 2);
parent::init_frontend();
}
示例14: init_frontend
public function init_frontend()
{
parent::init_frontend();
// add tasks or filters here that you want to perform only in the front end
}
示例15: init_frontend
protected function init_frontend()
{
parent::init_frontend();
//needed for print entry screen
add_filter("gform_entry_field_value", array($this, "signature_entry_detail"), 10, 5);
add_action("gform_pre_submission", array($this, "pre_submission_handler"));
add_filter("gform_field_validation", array($this, "signature_validation"), 10, 4);
//displays signature field
add_action("gform_field_input", array($this, "signature_input"), 10, 5);
//displays saved signature
add_filter("gform_merge_tag_filter", array($this, "merge_tag_filter"), 10, 4);
}