function mango_wpcf7_shortcode_text() { wpcf7_remove_shortcode('text'); wpcf7_remove_shortcode('text*'); wpcf7_remove_shortcode('email'); wpcf7_remove_shortcode('email*'); wpcf7_remove_shortcode('url'); wpcf7_remove_shortcode('url*'); wpcf7_remove_shortcode('tel'); wpcf7_remove_shortcode('tel*'); wpcf7_add_shortcode(array('text', 'text*', 'email', 'email*', 'url', 'url*', 'tel', 'tel*'), 'mango_wpcf7_text_shortcode_handler', true); }
/** * Replaces the default textarea shortcode with our * custom shortcode. * * @param none * @return none */ function replace_shortcode_textarea() { wpcf7_remove_shortcode('textarea'); wpcf7_add_shortcode(array('textarea', 'textarea*'), array($this, 'textarea_shortcode_handler'), true); }
public static function add_shortcodes() { if (function_exists('wpcf7_add_shortcode')) { // Remove Contact Form 7's date module wpcf7_remove_shortcode('date'); wpcf7_remove_shortcode('date*'); wpcf7_add_shortcode(array('date', 'date*'), array(__CLASS__, 'shortcode_handler'), true); } }