Changeset 2449318
- Timestamp:
- 01/03/2021 05:11:04 AM (5 years ago)
- Location:
- mobilize-contact-form-7/trunk
- Files:
-
- 1 added
- 1 edited
-
index.php (modified) (4 diffs)
-
uninstall.php (added)
Legend:
- Unmodified
- Added
- Removed
-
mobilize-contact-form-7/trunk/index.php
r2412272 r2449318 44 44 public function load_plugin() { 45 45 if (get_option('ptmbg_mobilize_cf7_options')==false) { 46 add_option('ptmbg_mobilize_cf7_options', array( $this,'set_default_options'));46 add_option('ptmbg_mobilize_cf7_options', $this->set_default_options()); 47 47 } 48 48 if (is_admin()){ … … 97 97 } 98 98 $options=get_option('ptmbg_mobilize_cf7_options'); 99 $fields=array(); 100 $fields[]='on_select'; 101 $fields[]='on_multi'; 102 $fields[]='on_radio'; 103 $fields[]='on_checkbox'; 104 $fields[]='on_textarea'; 105 $fields[]='on_color'; 106 $fields[]='on_date'; 107 $fields[]='on_datetime'; 108 $fields[]='on_email'; 109 $fields[]='on_file'; 110 $fields[]='on_month'; 111 $fields[]='on_number'; 112 $fields[]='on_password'; 113 $fields[]='on_search'; 114 $fields[]='on_tel'; 115 $fields[]='on_text'; 116 $fields[]='on_time'; 117 $fields[]='on_url'; 118 $fields[]='on_week'; 119 foreach ($fields as $field) { 120 if (!isset($options[$field])) { 121 $options[$field]=0; 122 } 123 } 99 124 ?> 100 125 <style> … … 178 203 <input id="color" type="color" name="ptmbg_mobilize_cf7_options[color]" value="<?php echo $options['color']; ?>"></p> 179 204 <p><label for="excluded-pages">Excluded pages</label><br> 180 <input id="excluded-pages" type="text" name="ptmbg_mobilize_cf7_options[excluded_ forms]" value="<?php echo $options['excluded_forms']; ?>">205 <input id="excluded-pages" type="text" name="ptmbg_mobilize_cf7_options[excluded_pages]" value="<?php echo $options['excluded_pages']; ?>"> 181 206 <p class="description">One or more pages IDs, separated by commas</p> 182 207 </p> … … 191 216 global $post; 192 217 $options=get_option('ptmbg_mobilize_cf7_options'); 193 $excluded=trim($options['excluded_ forms']);218 $excluded=trim($options['excluded_pages']); 194 219 if ($excluded != '') { 195 220 $pages=preg_split("/\,/",$excluded);
Note: See TracChangeset
for help on using the changeset viewer.