Changeset 12990 for trunk/src/bp-messages/bp-messages-template.php
- Timestamp:
- 07/08/2021 05:23:32 PM (5 years ago)
- File:
-
- 1 edited
-
trunk/src/bp-messages/bp-messages-template.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-messages/bp-messages-template.php
r12592 r12990 1312 1312 1313 1313 /** 1314 * Output the URL for dismissing the current notice for the current user. 1315 * 1316 * @since 9.0.0 1317 * @return string URL for dismissing the current notice for the current user. 1318 */ 1319 function bp_message_notice_dismiss_link() { 1320 echo esc_url( bp_get_message_notice_dismiss_link() ); 1321 } 1322 /** 1323 * Get the URL for dismissing the current notice for the current user. 1324 * 1325 * @since 9.0.0 1326 * @return string URL for dismissing the current notice for the current user. 1327 */ 1328 function bp_get_message_notice_dismiss_link() { 1329 1330 $link = wp_nonce_url( trailingslashit( bp_loggedin_user_domain() . bp_get_messages_slug() . '/notices/dismiss/' ), 'messages_dismiss_notice' ); 1331 1332 /** 1333 * Filters the URL for dismissing the current notice for the current user. 1334 * 1335 * @since 9.0.0 1336 * 1337 * @param string $link URL for dismissing the current notice. 1338 */ 1339 return apply_filters( 'bp_get_message_notice_dismiss_link', $link ); 1340 } 1341 1342 /** 1314 1343 * Output the messages component slug. 1315 1344 * … … 1360 1389 <div id="message" class="info notice" rel="n-<?php echo esc_attr( $notice->id ); ?>"> 1361 1390 <strong><?php bp_message_notice_subject( $notice ); ?></strong> 1362 < 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>1391 <a href="<?php bp_message_notice_dismiss_link(); ?>" id="close-notice" class="bp-tooltip button" 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></a> 1363 1392 <?php bp_message_notice_text( $notice ); ?> 1364 1393 <?php wp_nonce_field( 'bp_messages_close_notice', 'close-notice-nonce' ); ?>
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)