bp_nouveau_notifications_sort_order_links()
Outputs the order action links.
Source Source
File: bp-templates/bp-nouveau/includes/notifications/template-tags.php
function bp_nouveau_notifications_sort_order_links() { if ( 'unread' === bp_current_action() ) { $link = bp_get_notifications_unread_permalink( bp_displayed_user_id() ); } else { $link = bp_get_notifications_read_permalink( bp_displayed_user_id() ); } $desc = add_query_arg( 'sort_order', 'DESC', $link ); $asc = add_query_arg( 'sort_order', 'ASC', $link ); ?> <span class="notifications-order-actions"> <a href="<?php echo esc_url( $desc ); ?>" class="bp-tooltip" data-bp-tooltip="<?php esc_attr_e( 'Newest First', 'buddypress' ); ?>" aria-label="<?php esc_attr_e( 'Newest First', 'buddypress' ); ?>" data-bp-notifications-order="DESC"><span class="dashicons dashicons-arrow-down" aria-hidden="true"></span></a> <a href="<?php echo esc_url( $asc ); ?>" class="bp-tooltip" data-bp-tooltip="<?php esc_attr_e( 'Oldest First', 'buddypress' ); ?>" aria-label="<?php esc_attr_e( 'Oldest First', 'buddypress' ); ?>" data-bp-notifications-order="ASC"><span class="dashicons dashicons-arrow-up" aria-hidden="true"></span></a> </span> <?php }
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
3.0.0 | Introduced. |