Changeset 1308912
- Timestamp:
- 12/15/2015 09:44:22 AM (10 years ago)
- Location:
- cloudwok-file-upload/trunk
- Files:
-
- 2 edited
-
cloudwok.php (modified) (4 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cloudwok-file-upload/trunk/cloudwok.php
r1282540 r1308912 4 4 Plugin URI: http://www.cloudwok.com 5 5 Description: CloudWok enables you to let your website visitors upload files directly into a Dropbox, Google Drive, Amazon S3, Box.com, or other cloud storage folder that you own. 6 Version: 0.4. 06 Version: 0.4.1 7 7 Author: CloudWok 8 8 Author Email: [email protected] … … 64 64 'label_send_firstname_placeholder' => '', 65 65 'label_send_lastname_placeholder' => '', 66 'prefill_form_fields' => '' 66 'prefill_form_fields' => '', 67 'required_firstname' => '', 68 'required_lastname' => '' 67 69 ), $atts ) 68 70 ); … … 130 132 }}'; 131 133 } 132 if(array_key_exists('label_send_msg_btn', $atts) || array_key_exists('label_send_msg_placeholder', $atts) || array_key_exists('prefill_form_fields', $atts) ) {134 if(array_key_exists('label_send_msg_btn', $atts) || array_key_exists('label_send_msg_placeholder', $atts) || array_key_exists('prefill_form_fields', $atts) || array_key_exists('required_firstname', $atts) || array_key_exists('required_lastname', $atts)) { 133 135 $customizeMessages = 'document.querySelector( ".cloudwok-embed .cloudwok-upload-message").addEventListener("DOMNodeInserted", customizeMessages, false); 134 136 function customizeMessages(e) { … … 152 154 $customizeMessages = $customizeMessages . 'document.querySelector(".cloudwok-embed input[name=from_lastname]" ).placeholder = "' . $atts['label_send_lastname_placeholder'] . '";'; 153 155 } 156 if(array_key_exists('required_firstname', $atts) && $atts['required_firstname'] == "True") { 157 $customizeMessages = $customizeMessages . 'document.querySelector(".cloudwok-embed input[name=from_firstname]" ).required=true;'; 158 } 159 if(array_key_exists('required_lastname', $atts) && $atts['required_lastname'] == "True") { 160 $customizeMessages = $customizeMessages . 'document.querySelector(".cloudwok-embed input[name=from_lastname]" ).required=true;'; 161 } 154 162 // fill e-mail, first name, and last name with wp user values 155 if($wp_user_email) { 156 $customizeMessages = $customizeMessages . 'document.querySelector(".cloudwok-embed input[name=from]").value = "' . $wp_user_email . '";'; 157 } 158 if($wp_user_firstname) { 159 $customizeMessages = $customizeMessages . 'document.querySelector(".cloudwok-embed input[name=from_firstname]").value = "' . $wp_user_firstname . '";'; 160 } 161 if($wp_user_lastname) { 162 $customizeMessages = $customizeMessages . 'document.querySelector(".cloudwok-embed input[name=from_lastname]" ).value = "' . $wp_user_lastname . '";'; 163 } 163 if(array_key_exists('prefill_form_fields', $atts)) { 164 if($wp_user_email && array_key_exists('show_form_input_email', $atts) && $atts['show_form_input_email'] == "True") { 165 $customizeMessages = $customizeMessages . 'document.querySelector(".cloudwok-embed input[name=from]").value = "' . $wp_user_email . '";'; 166 } 167 if($wp_user_firstname && array_key_exists('show_form_input_name', $atts) && $atts['show_form_input_name'] == "True") { 168 $customizeMessages = $customizeMessages . 'document.querySelector(".cloudwok-embed input[name=from_firstname]").value = "' . $wp_user_firstname . '";'; 169 } 170 if($wp_user_lastname && array_key_exists('show_form_input_name', $atts) && $atts['show_form_input_name'] == "True") { 171 $customizeMessages = $customizeMessages . 'document.querySelector(".cloudwok-embed input[name=from_lastname]" ).value = "' . $wp_user_lastname . '";'; 172 } 173 } 164 174 $customizeMessages = $customizeMessages . ' 165 175 }}'; -
cloudwok-file-upload/trunk/readme.txt
r1282540 r1308912 5 5 Requires at least: 3.0.0 6 6 Tested up to: 4.3.1 7 Stable tag: 0.4. 07 Stable tag: 0.4.1 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 96 96 `[cloudwok wok_id="YOUR_WOK_ID" show_form="True" show_form_input_name="True" show_form_input_email="True" prefill_form_fields="True"]` 97 97 98 Since version 0.4.1 of this plugin, you can make the first name and last name fields required: 99 100 `[cloudwok wok_id="YOUR_WOK_ID" show_form="True" show_form_input_name="True" required_firstname="True" required_lastname="True"]` 101 98 102 By default, a small "powered by" text-link to www.cloudwok.com is disabled. If you like our plug-in, we would appreciate it if you would enable the link via `[cloudwok wok_id="YOUR_WOK_ID" show_powered_by_link="True"]`. Send me a link to your WordPress site with enabled "powered by" link, and I'd be happy to send you a small coupon code gift back: [email protected]. Thanks! 99 103 … … 114 118 == Changelog == 115 119 120 = 0.4.1 = 121 Added ability to make first name / last name fields required: `required_firstname="True"` and `required_lastname="True"` 116 122 = 0.4.0 = 117 123 Minor change to make feature introduced in 0.3.9 work in all cases.
Note: See TracChangeset
for help on using the changeset viewer.