Skip to:
Content

BuddyPress.org

Ticket #8079: 8079.patch

File 8079.patch, 5.9 KB (added by imath, 6 years ago)
  • src/bp-messages/bp-messages-template.php

    diff --git src/bp-messages/bp-messages-template.php src/bp-messages/bp-messages-template.php
    index b04b62925..41a301757 100644
    function bp_message_notice_post_date() { 
    11551155
    11561156/**
    11571157 * Output the subject of the current notice in the loop.
     1158 *
     1159 * @since 5.0.0 The $notice parameter has been added.
     1160 *
     1161 * @param BP_Messages_Notice $notice The notice object.
    11581162 */
    1159 function bp_message_notice_subject() {
    1160         echo bp_get_message_notice_subject();
     1163function bp_message_notice_subject( $notice = null ) {
     1164        echo bp_get_message_notice_subject( $notice );
    11611165}
    11621166        /**
    11631167         * Get the subject of the current notice in the loop.
    11641168         *
     1169         * @since 5.0.0 The $notice parameter has been added.
     1170         *
     1171         * @param BP_Messages_Notice $notice The notice object.
    11651172         * @return string
    11661173         */
    1167         function bp_get_message_notice_subject() {
     1174        function bp_get_message_notice_subject( $notice = null ) {
    11681175                global $messages_template;
    11691176
     1177                if ( ! isset( $notice->subject ) ) {
     1178                        $notice =& $messages_template->thread;
     1179                }
     1180
    11701181                /**
    11711182                 * Filters the subject of the current notice in the loop.
    11721183                 *
    function bp_message_notice_subject() { 
    11741185                 *
    11751186                 * @param string $subject Subject of the current notice in the loop.
    11761187                 */
    1177                 return apply_filters( 'bp_get_message_notice_subject', $messages_template->thread->subject );
     1188                return apply_filters( 'bp_get_message_notice_subject', $notice->subject );
    11781189        }
    11791190
    11801191/**
    11811192 * Output the text of the current notice in the loop.
     1193 *
     1194 * @since 5.0.0 The $notice parameter has been added.
     1195 *
     1196 * @param BP_Messages_Notice $notice The notice object.
    11821197 */
    1183 function bp_message_notice_text() {
    1184         echo bp_get_message_notice_text();
     1198function bp_message_notice_text( $notice = null ) {
     1199        echo bp_get_message_notice_text( $notice );
    11851200}
    11861201        /**
    11871202         * Get the text of the current notice in the loop.
    11881203         *
     1204         * @since 5.0.0 The $notice parameter has been added.
     1205         *
     1206         * @param BP_Messages_Notice $notice The notice object.
    11891207         * @return string
    11901208         */
    1191         function bp_get_message_notice_text() {
     1209        function bp_get_message_notice_text( $notice = null ) {
    11921210                global $messages_template;
    11931211
     1212                if ( ! isset( $notice->subject ) ) {
     1213                        $notice =& $messages_template->thread;
     1214                }
     1215
    11941216                /**
    11951217                 * Filters the text of the current notice in the loop.
    11961218                 *
    function bp_message_notice_text() { 
    11981220                 *
    11991221                 * @param string $message Text for the current notice in the loop.
    12001222                 */
    1201                 return apply_filters( 'bp_get_message_notice_text', $messages_template->thread->message );
     1223                return apply_filters( 'bp_get_message_notice_text', $notice->message );
    12021224        }
    12031225
    12041226/**
    function bp_message_get_notices() { 
    13341356                if ( !in_array( $notice->id, $closed_notices ) && $notice->id ) {
    13351357                        ?>
    13361358                        <div id="message" class="info notice" rel="n-<?php echo esc_attr( $notice->id ); ?>">
    1337                                 <p>
    1338                                         <strong><?php echo stripslashes( wp_filter_kses( $notice->subject ) ) ?></strong><br />
    1339                                         <?php echo stripslashes( wp_filter_kses( $notice->message) ) ?>
    1340                                         <button type="button" id="close-notice" class="bp-tooltip" data-bp-tooltip="<?php esc_attr_e( 'Dismiss this notice', 'buddypress' ) ?>"><span class="bp-screen-reader-text"><?php _e( 'Dismiss this notice', 'buddypress' ) ?></span> <span aria-hidden="true">&Chi;</span></button>
    1341                                         <?php wp_nonce_field( 'bp_messages_close_notice', 'close-notice-nonce' ); ?>
    1342                                 </p>
     1359                                <strong><?php bp_message_notice_subject( $notice ); ?></strong>
     1360                                <button type="button" id="close-notice" class="bp-tooltip" data-bp-tooltip="<?php esc_attr_e( 'Dismiss this notice', 'buddypress' ) ?>"><span class="bp-screen-reader-text"><?php _e( 'Dismiss this notice', 'buddypress' ) ?></span> <span aria-hidden="true">&Chi;</span></button>
     1361                                <?php bp_message_notice_text( $notice ); ?>
     1362                                <?php wp_nonce_field( 'bp_messages_close_notice', 'close-notice-nonce' ); ?>
    13431363                        </div>
    13441364                        <?php
    13451365                }
  • src/bp-templates/bp-legacy/css/buddypress-rtl.css

    diff --git src/bp-templates/bp-legacy/css/buddypress-rtl.css src/bp-templates/bp-legacy/css/buddypress-rtl.css
    index 5a5508a9d..06df2689f 100644
    body.activity-permalink #buddypress div.activity-comments div.acomment-content { 
    624624}
    625625
    626626#buddypress div#message p,
    627 #sitewide-notice p {
     627#sitewide-notice p,
     628#sitewide-notice strong:first-child {
    628629        font-size: 90%;
    629630        display: block;
    630631        padding: 10px 15px;
    fieldset.create-site label { 
    13921393        font-weight: 700;
    13931394}
    13941395
     1396#sitewide-notice,
     1397.bp-site-wide-message {
     1398        position: relative;
     1399}
     1400
    13951401#buddypress div#message p,
    1396 #sitewide-notice p {
     1402#sitewide-notice #message {
    13971403        background-color: #ffd;
    13981404        border: 1px solid #cb2;
    13991405        color: #440;
    fieldset.create-site label { 
    14051411.bp-site-wide-message #message p,
    14061412.admin-bar-on #message p {
    14071413        padding-left: 25px;
    1408         position: relative;
    14091414}
    14101415
    14111416.bp-site-wide-message #message button,
  • src/bp-templates/bp-legacy/css/buddypress.css

    diff --git src/bp-templates/bp-legacy/css/buddypress.css src/bp-templates/bp-legacy/css/buddypress.css
    index c6852777f..8bdcffacf 100644
    body.activity-permalink #buddypress div.activity-comments div.acomment-content { 
    624624}
    625625
    626626#buddypress div#message p,
    627 #sitewide-notice p {
     627#sitewide-notice p,
     628#sitewide-notice strong:first-child {
    628629        font-size: 90%;
    629630        display: block;
    630631        padding: 10px 15px;
    fieldset.create-site label { 
    13921393        font-weight: 700;
    13931394}
    13941395
     1396#sitewide-notice,
     1397.bp-site-wide-message {
     1398        position: relative;
     1399}
     1400
    13951401#buddypress div#message p,
    1396 #sitewide-notice p {
     1402#sitewide-notice #message {
    13971403        background-color: #ffd;
    13981404        border: 1px solid #cb2;
    13991405        color: #440;
    fieldset.create-site label { 
    14051411.bp-site-wide-message #message p,
    14061412.admin-bar-on #message p {
    14071413        padding-right: 25px;
    1408         position: relative;
    14091414}
    14101415
    14111416.bp-site-wide-message #message button,