Making WordPress.org

Ticket #720: patch_720_meta.diff

File patch_720_meta.diff, 3.1 KB (added by bansod_deven, 10 years ago)

Patch for #720 Meta

  • wcpt/wcpt-wordcamp/wordcamp-admin.php

     
    119119                                        case 'textarea' :
    120120                                                update_post_meta( $post_id, $key, $values[$key] );
    121121                                                break;
     122                                       
     123                                        case 'checkbox' :
     124                                                if ( !empty( $values[$key] ) && $values[$key] == 'on' )
     125                                                        update_post_meta( $post_id, $key, 'Yes' );
     126                                                else
     127                                                        update_post_meta( $post_id, $key, 'No' );
     128                                                break;
    122129
    123130                                        case 'date' :
    124131                                                if ( !empty( $values[$key] ) )
     
    172179                                        'Maximum Capacity'                => 'text',
    173180                                        'Available Rooms'                 => 'text',
    174181                                        'Website URL'                     => 'text',
    175                                         'Contact Information'             => 'textarea'
     182                                        'Contact Information'             => 'textarea',
     183                                        'Is Exhibition Space Available ?'   => 'checkbox',
    176184                                );
    177185                                break;
    178186
     
    218226                                        'Maximum Capacity'                => 'text',
    219227                                        'Available Rooms'                 => 'text',
    220228                                        'Website URL'                     => 'text',
    221                                         'Contact Information'             => 'textarea'
     229                                        'Contact Information'             => 'textarea',
     230                                        'Is Exhibition Space Available ?'   => 'checkbox'
    222231                                );
    223232                                break;
    224233
     
    720729
    721730<?php                                   break;
    722731
     732                                        case 'checkbox' : ?>
     733                                                <span>Space is available : &emsp;</span>
     734                                                <input type="checkbox" name="<?php echo $object_name; ?>" id="<?php echo $object_name; ?>" <?php if ( !empty( get_post_meta( $post_id, $key, true ) ) && get_post_meta( $post_id, $key, true ) == 'Yes' ) echo "checked"; ?>/>
     735
     736<?php                                   break;                                         
     737
    723738                                        default:
    724739                                                do_action( 'wcpt_metabox_value', $key, $value, $object_name );
    725740                                                break;
  • wordcamp-organizer-reminders/wcor-mailer.php

     
    188188                        '[venue_available_rooms]',
    189189                        '[venue_url]',
    190190                        '[venue_contact_info]',
     191                        '[venue_has_exihibition_space]',
    191192                );
    192193
    193194                $replace = array(
     
    221222                        empty( $wordcamp_meta['Available Rooms'][0] )     ? 'N/A' : $wordcamp_meta['Available Rooms'][0],
    222223                        empty( $wordcamp_meta['Website URL'][0] )         ? 'N/A' : $wordcamp_meta['Website URL'][0],
    223224                        empty( $wordcamp_meta['Contact Information'][0] ) ? 'N/A' : $wordcamp_meta['Contact Information'][0],
     225                        empty( $wordcamp_meta['Is Exhibition Space Available ?'][0] ) ? 'N/A' : $wordcamp_meta['Is Exhibition Space Available?'][0],
    224226                );
    225227               
    226228                return str_replace( $search, $replace, $content );
  • wordcamp-organizer-reminders/wcor-reminder.php

     
    207207                        <li>[venue_available_rooms]</li>
    208208                        <li>[venue_url]</li>
    209209                        <li>[venue_contact_info]</li>
     210                        <li>[venue_has_exihibition_space]</li>
    210211                </ul>
    211212
    212213                <?php