Changeset 1232
- Timestamp:
- 02/06/2015 09:24:50 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-wordcamp/wordcamp-admin.php
r1230 r1232 119 119 case 'textarea' : 120 120 update_post_meta( $post_id, $key, $values[$key] ); 121 break; 122 123 case 'checkbox' : 124 if ( ! empty( $values[ $key ] ) && 'on' == $values[ $key ] ) { 125 update_post_meta( $post_id, $key, true ); 126 } else { 127 update_post_meta( $post_id, $key, false ); 128 } 121 129 break; 122 130 … … 175 183 'Available Rooms' => 'text', 176 184 'Website URL' => 'text', 177 'Contact Information' => 'textarea' 185 'Contact Information' => 'textarea', 186 'Exhibition Space Available' => 'checkbox', 178 187 ); 179 188 break; … … 223 232 'Available Rooms' => 'text', 224 233 'Website URL' => 'text', 225 'Contact Information' => 'textarea' 234 'Contact Information' => 'textarea', 235 'Exhibition Space Available' => 'checkbox', 226 236 ); 227 237 break; … … 675 685 676 686 <div class="inside"> 687 <?php if ( 'checkbox' == $value ) : ?> 688 689 <p> 690 <strong><?php echo $key; ?></strong>: 691 <input type="checkbox" name="<?php echo $object_name; ?>" id="<?php echo $object_name; ?>" <?php checked( get_post_meta( $post_id, $key, true ) ); ?> /> 692 </p> 693 694 <?php else : ?> 695 <?php // todo indent the contents (and do other whitespace cleanup) in the next commit. avoid doing here because of diff noise. ?> 677 696 <p> 678 697 <strong><?php echo $key; ?></strong> … … 714 733 </p> 715 734 </div> 735 <?php endif; ?> 716 736 717 737 <?php
Note: See TracChangeset
for help on using the changeset viewer.