Skip to:
Content

BuddyPress.org

Ticket #6919: 6919.01.patch

File 6919.01.patch, 1.7 KB (added by r-a-y, 9 years ago)
  • src/bp-core/admin/bp-core-admin-functions.php

     
    899899}
    900900
    901901/**
     902 * Custom metaboxes used by our 'bp-email' post type.
     903 *
     904 * @since 2.5.0
     905 */
     906function 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}
     911add_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 */
     920function 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/**
    902931 * Restrict various items from view if editing a BuddyPress menu.
    903932 *
    904933 * If a person is editing a BP menu item, that person should not be able to
  • src/bp-core/admin/css/common.css

     
    278278                right: auto;
    279279        }
    280280}
     281
     282/* Emails - Edit page */
     283body.post-type-bp-email #excerpt {
     284        height: auto;
     285}
     286 No newline at end of file