Ticket #661: wordcamp-markdown-cpt.diff
File wordcamp-markdown-cpt.diff, 5.0 KB (added by , 10 years ago) |
---|
-
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wc-post-types/wc-post-types.php
191 191 function admin_enqueue_scripts() { 192 192 wp_enqueue_style( 'campicons', plugins_url( 'fonts/campicons.css', __FILE__ ), array(), 1 ); 193 193 } 194 194 195 195 function wp_enqueue_scripts() { 196 196 wp_enqueue_style( 'wcb_shortcodes', plugins_url( 'css/shortcodes.css', __FILE__ ), array(), 1 ); 197 197 } … … 997 997 998 998 <?php while ( $sponsors->have_posts() ) : $sponsors->the_post(); ?> 999 999 <?php $website = get_post_meta( get_the_ID(), '_wcpt_sponsor_website', true ); ?> 1000 1000 1001 1001 <div id="wcorg-sponsor-<?php the_ID(); ?>" class="wcorg-sponsor"> 1002 1002 <?php if ( 'website' == $attr['link'] && $website ) : ?> 1003 1003 <h3><a href="<?php echo esc_attr( esc_url( $website ) ); ?>"><?php the_title(); ?></a></h3> 1004 1004 <?php else : ?> 1005 1005 <h3><?php the_title(); ?></h3> 1006 1006 <?php endif; ?> 1007 1007 1008 1008 <div class="wcorg-sponsor-description"> 1009 1009 <?php if ( 'website' == $attr['link'] && $website ) : ?> 1010 1010 <a href="<?php echo esc_attr( esc_url( $website ) ); ?>"><?php the_post_thumbnail(); ?></a> 1011 1011 <?php else : ?> 1012 1012 <?php the_post_thumbnail(); ?> 1013 1013 <?php endif; ?> 1014 1014 1015 1015 <?php the_content(); ?> 1016 1016 </div> 1017 1017 </div><!-- #sponsor --> … … 1183 1183 function metabox_sponsor_info( $sponsor ) { 1184 1184 $website = get_post_meta( $sponsor->ID, '_wcpt_sponsor_website', true ); 1185 1185 wp_nonce_field( 'edit-sponsor-info', 'wcpt-meta-sponsor-info' ); 1186 1186 1187 1187 ?> 1188 1188 1189 1189 <p> 1190 1190 <label for="_wcpt_sponsor_website"><?php _e( 'Website:', 'wordcampbase' ); ?></label> 1191 1191 <input type="text" class="widefat" id="_wcpt_sponsor_website" name="_wcpt_sponsor_website" value="<?php echo esc_attr( esc_url( $website ) ); ?>" /> 1192 1192 </p> 1193 1193 1194 1194 <?php 1195 1195 } 1196 1196 … … 1311 1311 delete_post_meta( $post_id, '_wcpt_speaker_id' ); 1312 1312 foreach ( $speaker_ids as $speaker_id ) 1313 1313 add_post_meta( $post_id, '_wcpt_speaker_id', $speaker_id ); 1314 1314 1315 1315 // Set the speaker as the author of the session post, so the single 1316 1316 // view doesn't confuse users who see "posted by [organizer name]" 1317 1317 foreach ( $speaker_ids as $speaker_post ) { 1318 1318 $wporg_user_id = get_post_meta( $speaker_post, '_wcpt_user_id', true ); 1319 1319 $user = get_user_by( 'id', $wporg_user_id ); 1320 1320 1321 1321 if ( $user ) { 1322 1322 remove_action( 'save_post', array( $this, 'save_post_session' ), 10, 2 ); // avoid infinite recursion 1323 1323 wp_update_post( array( … … 1325 1325 'post_author' => $user->ID 1326 1326 ) ); 1327 1327 add_action( 'save_post', array( $this, 'save_post_session' ), 10, 2 ); 1328 1328 1329 1329 break; 1330 1330 } 1331 1331 } … … 1341 1341 1342 1342 if ( isset( $_POST['wcpt-meta-sponsor-info'] ) && wp_verify_nonce( $_POST['wcpt-meta-sponsor-info'], 'edit-sponsor-info' ) ) { 1343 1343 $website = esc_url_raw( $_POST['_wcpt_sponsor_website'] ); 1344 1344 1345 1345 // TODO: maybe only allows links to home page, depending on outcome of http://make.wordpress.org/community/2013/12/31/irs-rules-for-corporate-sponsorship-of-wordcamp/ 1346 1346 1347 1347 if ( $website ) { … … 1377 1377 register_post_type( 'wcb_speaker', array( 1378 1378 'labels' => $labels, 1379 1379 'rewrite' => array( 'slug' => 'speaker', 'with_front' => true ), 1380 'supports' => array( 'title', 'editor', 'revisions' ),1380 'supports' => array( 'title', 'editor', 'revisions', 'wpcom-markdown' ), 1381 1381 'menu_position' => 20, 1382 1382 'public' => true, 1383 1383 'show_ui' => true, … … 1409 1409 register_post_type( 'wcb_session', array( 1410 1410 'labels' => $labels, 1411 1411 'rewrite' => array( 'slug' => 'session', 'with_front' => false ), 1412 'supports' => array( 'title', 'editor', 'revisions', 'thumbnail' ),1412 'supports' => array( 'title', 'editor', 'revisions', 'thumbnail', 'wpcom-markdown' ), 1413 1413 'menu_position' => 21, 1414 1414 'public' => true, 1415 1415 'show_ui' => true, … … 1441 1441 register_post_type( 'wcb_sponsor', array( 1442 1442 'labels' => $labels, 1443 1443 'rewrite' => array( 'slug' => 'sponsor', 'with_front' => false ), 1444 'supports' => array( 'title', 'editor', 'revisions', 'thumbnail' ),1444 'supports' => array( 'title', 'editor', 'revisions', 'thumbnail', 'wpcom-markdown' ), 1445 1445 'menu_position' => 21, 1446 1446 'public' => true, 1447 1447 'show_ui' => true, … … 1473 1473 register_post_type( 'wcb_organizer', array( 1474 1474 'labels' => $labels, 1475 1475 'rewrite' => array( 'slug' => 'organizer', 'with_front' => false ), 1476 'supports' => array( 'title', 'editor', 'revisions' ),1476 'supports' => array( 'title', 'editor', 'revisions', 'wpcom-markdown' ), 1477 1477 'menu_position' => 22, 1478 1478 'public' => false, 1479 1479 'show_ui' => true,