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


PHP wpcf7_add_shortcode函数代码示例

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


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

示例1: init

 public function init()
 {
     if (function_exists('wpcf7_add_shortcode')) {
         /* Shortcode handler */
         wpcf7_add_shortcode('simplehidden', array($this, 'simple_shortcode_handler'), true);
         wpcf7_add_shortcode('dynamichidden2', array($this, 'dynamic_shortcode_handler'), true);
     }
     add_filter('wpcf7_validate_simplehidden', array($this, 'validation_filter'), 10, 2);
     add_filter('wpcf7_validate_dynamichidden2', array($this, 'validation_filter'), 10, 2);
     add_action('admin_init', array($this, 'add_tg_generator'), 25);
     add_filter('test_hidden_field_filter', array($this, 'test_filter'), 10, 2);
 }
开发者ID:ruarghs,项目名称:contact-form-7-simple-hidden-field,代码行数:12,代码来源:cf7-simple-hidden-field.php

示例2: cf7bs_recaptcha_add_shortcode_recaptcha

 function cf7bs_recaptcha_add_shortcode_recaptcha()
 {
     $recaptcha = WPCF7_RECAPTCHA::get_instance();
     if ($recaptcha->is_active()) {
         wpcf7_add_shortcode('recaptcha', 'cf7bs_recaptcha_shortcode_handler');
     }
 }
开发者ID:accionclima1,项目名称:accionclima,代码行数:7,代码来源:recaptcha.php

示例3: contact_form_7_hidden_fields

function contact_form_7_hidden_fields()
{
    global $pagenow;
    if (function_exists('wpcf7_add_shortcode')) {
        wpcf7_add_shortcode('hidden', 'wpcf7_hidden_shortcode_handler', true);
        wpcf7_add_shortcode('hidden*', 'wpcf7_hidden_shortcode_handler', true);
    } else {
        if ($pagenow != 'plugins.php') {
            return;
        }
        add_action('admin_notices', 'cfhiddenfieldserror');
        add_action('admin_enqueue_scripts', 'contact_form_7_hidden_fields_scripts');
        function cfhiddenfieldserror()
        {
            $out = '<div class="error" id="messages"><p>';
            if (file_exists(WP_PLUGIN_DIR . '/contact-form-7/wp-contact-form-7.php')) {
                $out .= 'The Contact Form 7 is installed, but <strong>you must activate Contact Form 7</strong> below for the Hidden Fields Module to work.';
            } else {
                $out .= 'The Contact Form 7 plugin must be installed for the Hidden Fields Module to work. <a href="' . admin_url('plugin-install.php?tab=plugin-information&plugin=contact-form-7&from=plugins&TB_iframe=true&width=600&height=550') . '" class="thickbox" title="Contact Form 7">Install Now.</a>';
            }
            $out .= '</p></div>';
            echo $out;
        }
    }
}
开发者ID:Allan019,项目名称:grupometa,代码行数:25,代码来源:hidden.php

示例4: wpcf7_add_shortcode_icon_btn

 function wpcf7_add_shortcode_icon_btn()
 {
     if (!function_exists('wpcf7_add_shortcode')) {
         return;
     }
     wpcf7_add_shortcode('button', 'wpcf7_icon_btn_shortcode_handler');
 }
开发者ID:brettex,项目名称:pspark,代码行数:7,代码来源:cf7-icon.php

示例5: add_shortcode_dropdown_paket

function add_shortcode_dropdown_paket()
{
    wpcf7_add_shortcode(['pilih_paket', 'pilih_paket*'], 'dropDownPaket', true);
    // see helpers/helpers.php for called function
    wpcf7_add_shortcode(['tgl_keberangkatan', 'tgl_keberangkatan*'], 'dropDownDateDeparture', true);
    // see helpers/helpers.php for called function
}
开发者ID:adhitiadarmawan,项目名称:rsa,代码行数:7,代码来源:functions.php

示例6: add_shortcode

 /**
  * Registers the CF7 shortcode
  *
  * @return boolean
  */
 public function add_shortcode()
 {
     if (!function_exists('wpcf7_add_shortcode')) {
         return false;
     }
     wpcf7_add_shortcode('mc4wp_checkbox', array($this, 'get_checkbox'));
     return true;
 }
开发者ID:hchouhan,项目名称:mailchimp-for-wordpress,代码行数:13,代码来源:ContactForm7.php

示例7: init

 /**
  * Registers the CF7 shortcode
  *
  * @return boolean
  */
 public function init()
 {
     if (!function_exists('wpcf7_add_shortcode')) {
         return false;
     }
     wpcf7_add_shortcode('yikes_mailchimp_checkbox', array($this, 'yikes_get_checkbox'));
     return true;
 }
开发者ID:annbransom,项目名称:techishowl-wp,代码行数:13,代码来源:class.contact_form_7-checkbox.php

示例8: hw_wpcf7_create_fields

function hw_wpcf7_create_fields()
{
    wpcf7_add_shortcode(array('province', 'province*'), '_hw_wcpf7_province_shortcode_ddlQuanHuyen', true);
    //register country field
    wpcf7_add_shortcode(array('nationality', 'nationality*'), '_hw_wcpf7_country_field_shortcode', true);
    //wpcf7_add_shortcode(('tinhthanh'), '_shortcode_ddlTinhthanh',true);
    //wpcf7_add_shortcode(('tinhthanh*'), '_shortcode_ddlTinhthanh',true);
}
开发者ID:hoangsoft90,项目名称:hw-hoangweb-plugin,代码行数:8,代码来源:fields.php

示例9: sendywpcf_init

/**
 * Check that WPCF is installed and add in hooks.
 *
 * @return bool
 */
function sendywpcf_init()
{
    add_action('wpcf7_mail_sent', 'subscribe_from_cf7');
    if (!function_exists('wpcf7_add_shortcode')) {
        return false;
    }
    wpcf7_add_shortcode('sendywpcf', 'get_list_id');
    return true;
}
开发者ID:bogdanhruban,项目名称:sendywpcf,代码行数:14,代码来源:sendywpcf.php

示例10: init

 public function init()
 {
     if (function_exists('wpcf7_add_shortcode')) {
         /* Shortcode handler */
         wpcf7_add_shortcode('dynamicselect', array($this, 'shortcode_handler'), true);
         wpcf7_add_shortcode('dynamicselect*', array($this, 'shortcode_handler'), true);
     }
     add_filter('wpcf7_validate_dynamicselect', array($this, 'validation_filter'), 10, 2);
     add_filter('wpcf7_validate_dynamicselect*', array($this, 'validation_filter'), 10, 2);
     add_action('admin_init', array($this, 'add_tg_generator'), 25);
 }
开发者ID:patrickgalbraith,项目名称:contact-form-7-dynamic-select-extension,代码行数:11,代码来源:cf7-dynamic-select.php

示例11: wpcf7_dynamictext_init

/**
 ** A base module for [dynamictext], [dynamictext*]
 **/
function wpcf7_dynamictext_init()
{
    if (function_exists('wpcf7_add_shortcode')) {
        /* Shortcode handler */
        wpcf7_add_shortcode('dynamictext', 'wpcf7_dynamictext_shortcode_handler', true);
        wpcf7_add_shortcode('dynamictext*', 'wpcf7_dynamictext_shortcode_handler', true);
        wpcf7_add_shortcode('dynamichidden', 'wpcf7_dynamichidden_shortcode_handler', true);
    }
    add_filter('wpcf7_validate_dynamictext', 'wpcf7_dynamictext_validation_filter', 10, 2);
    add_filter('wpcf7_validate_dynamictext*', 'wpcf7_dynamictext_validation_filter', 10, 2);
    add_action('admin_init', 'wpcf7_add_tag_generator_dynamictext', 15);
    add_action('admin_init', 'wpcf7_add_tag_generator_dynamichidden', 16);
}
开发者ID:santikrass,项目名称:apache,代码行数:16,代码来源:contact-form-7-dynamic-text-extension.php

示例12: contact_form_7_confirm_email

function contact_form_7_confirm_email()
{
    global $pagenow;
    if (function_exists('wpcf7_add_shortcode')) {
        wpcf7_add_shortcode(array('confirm_email', 'confirm_email*'), 'wpcf7_confirm_email_shortcode_handler', true);
        add_filter('wpcf7_validate_confirm_email', 'wpcf7_confirm_email_validation_filter', 10, 2);
        add_filter('wpcf7_validate_confirm_email*', 'wpcf7_confirm_email_validation_filter', 10, 2);
        add_action('admin_init', 'wpcf7_add_tag_generator_confirm_email', 30);
    } else {
        if ($pagenow != 'plugins.php') {
            return;
        }
        add_action('admin_notices', 'cfconfirm_emailfieldserror');
        wp_enqueue_script('thickbox');
        function cfconfirm_emailfieldserror()
        {
            $out = '<div class="error" id="messages"><p>';
            $out .= 'The Contact Form 7 plugin must be installed and activated for the confirm_email Validation for Contact Form 7 to work. <a href="' . admin_url('plugin-install.php?tab=plugin-information&plugin=contact-form-7&from=plugins&TB_iframe=true&width=600&height=550') . '" class="thickbox" title="Contact Form 7">Install Now.</a>';
            $out .= '</p></div>';
            echo $out;
        }
    }
}
开发者ID:jakerockland,项目名称:contact-form-7-confirm-email-feild,代码行数:23,代码来源:contact-form-7-confirm-email.php

示例13: wpcf7_add_shortcode_file

function wpcf7_add_shortcode_file()
{
    wpcf7_add_shortcode(array('file', 'file*'), 'wpcf7_file_shortcode_handler', true);
}
开发者ID:KurtMakesWeb,项目名称:CandG,代码行数:4,代码来源:file.php

示例14: wpcf7_add_shortcode_mathcaptcha

function wpcf7_add_shortcode_mathcaptcha()
{
    wpcf7_add_shortcode('mathcaptcha', 'wpcf7_mathcaptcha_shortcode_handler', true);
}
开发者ID:developmentDM2,项目名称:The-Haute-Mess,代码行数:4,代码来源:contact-form-7.php

示例15: register_shortcode

 public function register_shortcode($shortcode)
 {
     wpcf7_add_shortcode($shortcode, array($this, 'shortcode_process'), true);
 }
开发者ID:ntnvu,项目名称:tcb_online,代码行数:4,代码来源:tcb_custom_cf7.php


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