| 902 | * Custom metaboxes used by our 'bp-email' post type. |
| 903 | * |
| 904 | * @since 2.5.0 |
| 905 | */ |
| 906 | function bp_email_custom_metaboxes() { |
| 907 | // Remove default 'Excerpt' metabox and replace with our own. |
| 908 | remove_meta_box( 'postexcerpt', null, 'normal' ); |
| 909 | add_meta_box( 'postexcerpt', __( 'Plain-text Content', 'buddypress' ), 'bp_email_plaintext_metabox', null, 'normal', 'high' ); |
| 910 | } |
| 911 | add_action( 'add_meta_boxes_bp-email', 'bp_email_custom_metaboxes' ); |
| 912 | |
| 913 | /** |
| 914 | * Customized version of the 'Excerpt' metabox for our 'bp-email' post type. |
| 915 | * |
| 916 | * @since 2.5.0 |
| 917 | * |
| 918 | * @param WP_Post $post |
| 919 | */ |
| 920 | function bp_email_plaintext_metabox( $post ) { |
| 921 | ?> |
| 922 | |
| 923 | <label class="screen-reader-text" for="excerpt"><?php _e( 'Plain-text Content', 'buddypress' ); ?></label><textarea rows="5" cols="40" name="excerpt" id="excerpt"><?php echo $post->post_excerpt; // textarea_escaped ?></textarea> |
| 924 | |
| 925 | <p><?php _e( 'Here you can customize the content used for plain-text emails.', 'buddypress' ); ?></p> |
| 926 | |
| 927 | <?php |
| 928 | } |
| 929 | |
| 930 | /** |