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() { |
1155 | 1155 | |
1156 | 1156 | /** |
1157 | 1157 | * 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. |
1158 | 1162 | */ |
1159 | | function bp_message_notice_subject() { |
1160 | | echo bp_get_message_notice_subject(); |
| 1163 | function bp_message_notice_subject( $notice = null ) { |
| 1164 | echo bp_get_message_notice_subject( $notice ); |
1161 | 1165 | } |
1162 | 1166 | /** |
1163 | 1167 | * Get the subject of the current notice in the loop. |
1164 | 1168 | * |
| 1169 | * @since 5.0.0 The $notice parameter has been added. |
| 1170 | * |
| 1171 | * @param BP_Messages_Notice $notice The notice object. |
1165 | 1172 | * @return string |
1166 | 1173 | */ |
1167 | | function bp_get_message_notice_subject() { |
| 1174 | function bp_get_message_notice_subject( $notice = null ) { |
1168 | 1175 | global $messages_template; |
1169 | 1176 | |
| 1177 | if ( ! isset( $notice->subject ) ) { |
| 1178 | $notice =& $messages_template->thread; |
| 1179 | } |
| 1180 | |
1170 | 1181 | /** |
1171 | 1182 | * Filters the subject of the current notice in the loop. |
1172 | 1183 | * |
… |
… |
function bp_message_notice_subject() { |
1174 | 1185 | * |
1175 | 1186 | * @param string $subject Subject of the current notice in the loop. |
1176 | 1187 | */ |
1177 | | return apply_filters( 'bp_get_message_notice_subject', $messages_template->thread->subject ); |
| 1188 | return apply_filters( 'bp_get_message_notice_subject', $notice->subject ); |
1178 | 1189 | } |
1179 | 1190 | |
1180 | 1191 | /** |
1181 | 1192 | * 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. |
1182 | 1197 | */ |
1183 | | function bp_message_notice_text() { |
1184 | | echo bp_get_message_notice_text(); |
| 1198 | function bp_message_notice_text( $notice = null ) { |
| 1199 | echo bp_get_message_notice_text( $notice ); |
1185 | 1200 | } |
1186 | 1201 | /** |
1187 | 1202 | * Get the text of the current notice in the loop. |
1188 | 1203 | * |
| 1204 | * @since 5.0.0 The $notice parameter has been added. |
| 1205 | * |
| 1206 | * @param BP_Messages_Notice $notice The notice object. |
1189 | 1207 | * @return string |
1190 | 1208 | */ |
1191 | | function bp_get_message_notice_text() { |
| 1209 | function bp_get_message_notice_text( $notice = null ) { |
1192 | 1210 | global $messages_template; |
1193 | 1211 | |
| 1212 | if ( ! isset( $notice->subject ) ) { |
| 1213 | $notice =& $messages_template->thread; |
| 1214 | } |
| 1215 | |
1194 | 1216 | /** |
1195 | 1217 | * Filters the text of the current notice in the loop. |
1196 | 1218 | * |
… |
… |
function bp_message_notice_text() { |
1198 | 1220 | * |
1199 | 1221 | * @param string $message Text for the current notice in the loop. |
1200 | 1222 | */ |
1201 | | return apply_filters( 'bp_get_message_notice_text', $messages_template->thread->message ); |
| 1223 | return apply_filters( 'bp_get_message_notice_text', $notice->message ); |
1202 | 1224 | } |
1203 | 1225 | |
1204 | 1226 | /** |
… |
… |
function bp_message_get_notices() { |
1334 | 1356 | if ( !in_array( $notice->id, $closed_notices ) && $notice->id ) { |
1335 | 1357 | ?> |
1336 | 1358 | <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">Χ</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">Χ</span></button> |
| 1361 | <?php bp_message_notice_text( $notice ); ?> |
| 1362 | <?php wp_nonce_field( 'bp_messages_close_notice', 'close-notice-nonce' ); ?> |
1343 | 1363 | </div> |
1344 | 1364 | <?php |
1345 | 1365 | } |
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 { |
624 | 624 | } |
625 | 625 | |
626 | 626 | #buddypress div#message p, |
627 | | #sitewide-notice p { |
| 627 | #sitewide-notice p, |
| 628 | #sitewide-notice strong:first-child { |
628 | 629 | font-size: 90%; |
629 | 630 | display: block; |
630 | 631 | padding: 10px 15px; |
… |
… |
fieldset.create-site label { |
1392 | 1393 | font-weight: 700; |
1393 | 1394 | } |
1394 | 1395 | |
| 1396 | #sitewide-notice, |
| 1397 | .bp-site-wide-message { |
| 1398 | position: relative; |
| 1399 | } |
| 1400 | |
1395 | 1401 | #buddypress div#message p, |
1396 | | #sitewide-notice p { |
| 1402 | #sitewide-notice #message { |
1397 | 1403 | background-color: #ffd; |
1398 | 1404 | border: 1px solid #cb2; |
1399 | 1405 | color: #440; |
… |
… |
fieldset.create-site label { |
1405 | 1411 | .bp-site-wide-message #message p, |
1406 | 1412 | .admin-bar-on #message p { |
1407 | 1413 | padding-left: 25px; |
1408 | | position: relative; |
1409 | 1414 | } |
1410 | 1415 | |
1411 | 1416 | .bp-site-wide-message #message button, |
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 { |
624 | 624 | } |
625 | 625 | |
626 | 626 | #buddypress div#message p, |
627 | | #sitewide-notice p { |
| 627 | #sitewide-notice p, |
| 628 | #sitewide-notice strong:first-child { |
628 | 629 | font-size: 90%; |
629 | 630 | display: block; |
630 | 631 | padding: 10px 15px; |
… |
… |
fieldset.create-site label { |
1392 | 1393 | font-weight: 700; |
1393 | 1394 | } |
1394 | 1395 | |
| 1396 | #sitewide-notice, |
| 1397 | .bp-site-wide-message { |
| 1398 | position: relative; |
| 1399 | } |
| 1400 | |
1395 | 1401 | #buddypress div#message p, |
1396 | | #sitewide-notice p { |
| 1402 | #sitewide-notice #message { |
1397 | 1403 | background-color: #ffd; |
1398 | 1404 | border: 1px solid #cb2; |
1399 | 1405 | color: #440; |
… |
… |
fieldset.create-site label { |
1405 | 1411 | .bp-site-wide-message #message p, |
1406 | 1412 | .admin-bar-on #message p { |
1407 | 1413 | padding-right: 25px; |
1408 | | position: relative; |
1409 | 1414 | } |
1410 | 1415 | |
1411 | 1416 | .bp-site-wide-message #message button, |