Changeset 12415
- Timestamp:
- 07/25/2019 12:35:00 PM (6 years ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-messages/bp-messages-template.php
r11791 r12415 1156 1156 /** 1157 1157 * Output the subject of the current notice in the loop. 1158 */ 1159 function bp_message_notice_subject() { 1160 echo bp_get_message_notice_subject(); 1158 * 1159 * @since 5.0.0 The $notice parameter has been added. 1160 * 1161 * @param BP_Messages_Notice $notice The notice object. 1162 */ 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 * 1165 * @return string 1166 */ 1167 function bp_get_message_notice_subject() { 1169 * @since 5.0.0 The $notice parameter has been added. 1170 * 1171 * @param BP_Messages_Notice $notice The notice object. 1172 * @return string 1173 */ 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. … … 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. 1182 */ 1183 function bp_message_notice_text() { 1184 echo bp_get_message_notice_text(); 1193 * 1194 * @since 5.0.0 The $notice parameter has been added. 1195 * 1196 * @param BP_Messages_Notice $notice The notice object. 1197 */ 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 * 1189 * @return string 1190 */ 1191 function bp_get_message_notice_text() { 1204 * @since 5.0.0 The $notice parameter has been added. 1205 * 1206 * @param BP_Messages_Notice $notice The notice object. 1207 * @return string 1208 */ 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. … … 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 … … 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 -
trunk/src/bp-templates/bp-legacy/css/buddypress-rtl.css
r12136 r12415 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; … … 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; … … 1406 1412 .admin-bar-on #message p { 1407 1413 padding-left: 25px; 1408 position: relative;1409 1414 } 1410 1415 -
trunk/src/bp-templates/bp-legacy/css/buddypress.css
r12136 r12415 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; … … 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; … … 1406 1412 .admin-bar-on #message p { 1407 1413 padding-right: 25px; 1408 position: relative;1409 1414 } 1410 1415
Note: See TracChangeset
for help on using the changeset viewer.