Changeset 5568
- Timestamp:
- 06/15/2017 12:33:44 PM (8 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
r5567 r5568 1827 1827 } 1828 1828 1829 if ( isset( $_POST['wcpt-meta-sponsor-info'] ) && wp_verify_nonce( $_POST['wcpt-meta-sponsor-info'], 'edit-sponsor-info' ) ) {1829 if ( wp_verify_nonce( filter_input( INPUT_POST, 'wcpt-meta-sponsor-info' ), 'edit-sponsor-info' ) ) { 1830 1830 $text_values = array( 1831 1831 'company_name', 'first_name', 'last_name', 'email_address', 'phone_number', 'vat_number', 'twitter_handle', … … 1834 1834 1835 1835 foreach ( $text_values as $id ) { 1836 $values[ $id ] = sanitize_text_field( $_POST["_wcpt_sponsor_$id"]);1836 $values[ $id ] = sanitize_text_field( filter_input( INPUT_POST, '_wcpt_sponsor_' . $id ) ); 1837 1837 } 1838 1838 1839 $values['website'] = esc_url_raw( $_POST['_wcpt_sponsor_website']);1839 $values['website'] = esc_url_raw( filter_input( INPUT_POST, '_wcpt_sponsor_website' ) ); 1840 1840 // 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/ 1841 1841 … … 1844 1844 1845 1845 foreach( $values as $id => $value ) { 1846 $meta_key = '_wcpt_sponsor_' . $id; 1847 1846 1848 if ( empty( $value ) ) { 1847 delete_post_meta( $post_id, "_wcpt_sponsor_$id");1849 delete_post_meta( $post_id, $meta_key ); 1848 1850 } else { 1849 update_post_meta( $post_id, "_wcpt_sponsor_$id", $value );1851 update_post_meta( $post_id, $meta_key, $value ); 1850 1852 } 1851 1853 }
Note: See TracChangeset
for help on using the changeset viewer.