Changeset 1330109
- Timestamp:
- 01/17/2016 07:43:16 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
openpgp-form-encryption/trunk/wordpress-openpgp.php
r1194842 r1330109 75 75 ); 76 76 77 return openpgp_cryptbutton_create($args, $content, $tag); 78 } 79 80 function openpgp_cryptbutton_wpcf7 ($tag) { 81 if (!is_array($tag)) return ''; 82 83 openpgp_enqueue_scripts(); 84 85 $tag = new WPCF7_Shortcode( $tag ); 86 87 $args = array( 88 'textarea' => $tag->get_option('textarea', 'id', true), 89 'keyurl' => $tag->get_option('keyurl', '.*', true), 90 'keyid' => $tag->get_option('keyid', 'int', true), 91 'class' => $tag->get_class_option(), 92 'style' => $tag->get_option('style', 'class', true), 93 'text' => $tag->values[0] 94 ); 95 96 return openpgp_cryptbutton_create ($args); 97 } 98 99 function openpgp_cryptbutton_create ($args, $content = null, $tag = null) { 100 77 101 $keyurl = $args['keyurl']; 78 102 … … 100 124 add_action('wp_head', 'openpgp_cryptbutton_header'); 101 125 add_shortcode('cryptbutton', 'openpgp_cryptbutton_shortcode'); 126 127 // If Contact Form 7 is installed, we can do this, too. 128 add_action('wpcf7_init', function () { 129 wpcf7_add_shortcode('cryptbutton', 'openpgp_cryptbutton_wpcf7', false); 130 }); 131
Note: See TracChangeset
for help on using the changeset viewer.