Changeset 2598 for sites/trunk/wordcamp.org/public_html/wp-content/plugins/wc-post-types/wc-post-types.php
- Timestamp:
- 02/24/2016 10:22:00 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wc-post-types/wc-post-types.php
r2503 r2598 1311 1311 add_meta_box( 'session-info', __( 'Session Info', 'wordcamporg' ), array( $this, 'metabox_session_info' ), 'wcb_session', 'normal' ); 1312 1312 add_meta_box( 'sponsor-info', __( 'Sponsor Info', 'wordcamporg' ), array( $this, 'metabox_sponsor_info' ), 'wcb_sponsor', 'normal' ); 1313 add_meta_box( 'invoice-sponsor', __( 'Invoice Sponsor', 'wordcamporg' ), array( $this, 'metabox_invoice_sponsor' ), 'wcb_sponsor', 'side' ); 1313 1314 } 1314 1315 … … 1529 1530 1530 1531 /** 1532 * Render the Invoice Sponsor metabox view 1533 * 1534 * @param WP_Post $sponsor 1535 */ 1536 function metabox_invoice_sponsor( $sponsor ) { 1537 $current_screen = get_current_screen(); 1538 1539 $existing_invoices = get_posts( array( 1540 'post_type' => \WordCamp\Budgets\Sponsor_Invoices\POST_TYPE, 1541 'post_status' => 'any', 1542 'posts_per_page' => - 1, 1543 1544 'meta_query' => array( 1545 array( 1546 'key' => '_wcbsi_sponsor_id', 1547 'value' => $sponsor->ID, 1548 ), 1549 ), 1550 ) ); 1551 1552 $new_invoice_url = add_query_arg( 1553 array( 1554 'post_type' => 'wcb_sponsor_invoice', 1555 'sponsor_id' => $sponsor->ID, 1556 ), 1557 admin_url( 'post-new.php' ) 1558 ); 1559 1560 require_once( __DIR__ . '/views/sponsors/metabox-invoice-sponsor.php' ); 1561 } 1562 1563 /** 1531 1564 * Fired when a post is saved, makes sure additional metadata is also updated. 1532 1565 */
Note: See TracChangeset
for help on using the changeset viewer.