Skip to:
Content

BuddyPress.org

Ticket #7188: 7188-2.patch

File 7188-2.patch, 15.3 KB (added by mercime, 8 years ago)
  • src/bp-activity/bp-activity-filters.php

     
    207207        global $allowedtags;
    208208
    209209        $activity_allowedtags = $allowedtags;
    210         $activity_allowedtags['a']['class'] = array();
    211         $activity_allowedtags['a']['id']    = array();
    212         $activity_allowedtags['a']['rel']   = array();
    213         $activity_allowedtags['a']['title'] = array();
     210        $activity_allowedtags['a']['class']      = array();
     211        $activity_allowedtags['a']['id']         = array();
     212        $activity_allowedtags['a']['rel']        = array();
     213        $activity_allowedtags['a']['data-title'] = array();
     214        $activity_allowedtags['a']['aria-label'] = array();
    214215
    215216        $activity_allowedtags['b']    = array();
    216217        $activity_allowedtags['code'] = array();
     
    223224        $activity_allowedtags['img']['height'] = array();
    224225        $activity_allowedtags['img']['class']  = array();
    225226        $activity_allowedtags['img']['id']     = array();
    226         $activity_allowedtags['img']['title']  = array();
    227227
    228228        $activity_allowedtags['span']                   = array();
    229229        $activity_allowedtags['span']['class']          = array();
  • src/bp-activity/bp-activity-template.php

     
    14931493
    14941494                // Setup variables for activity meta.
    14951495                $activity_permalink = bp_activity_get_permalink( $activities_template->activity->id, $activities_template->activity );
    1496                 $activity_meta      = sprintf( '%1$s <a href="%2$s" class="view activity-time-since" title="%3$s">%4$s</a>',
     1496                $activity_meta      = sprintf( '%1$s <a href="%2$s" class="view activity-time-since bp-tooltip" data-title="%3$s" aria-label="%3$s">%4$s</a>',
    14971497                        $new_content,
    14981498                        $activity_permalink,
    14991499                        esc_attr__( 'View Discussion', 'buddypress' ),
  • src/bp-friends/bp-friends-widgets.php

     
    6868                <?php while ( bp_members() ) : bp_the_member(); ?>
    6969                        <li class="vcard">
    7070                                <div class="item-avatar">
    71                                         <a href="<?php bp_member_permalink(); ?>"><?php bp_member_avatar(); ?></a>
     71                                        <a href="<?php bp_member_permalink(); ?>" class="bp-tooltip" data-title="<?php bp_member_name(); ?>"><?php bp_member_avatar(); ?></a>
    7272                                </div>
    7373
    7474                                <div class="item">
  • src/bp-friends/classes/class-bp-core-friends-widget.php

     
    111111                                <?php while ( bp_members() ) : bp_the_member(); ?>
    112112                                        <li class="vcard">
    113113                                                <div class="item-avatar">
    114                                                         <a href="<?php bp_member_permalink(); ?>" title="<?php bp_member_name(); ?>"><?php bp_member_avatar(); ?></a>
     114                                                        <a href="<?php bp_member_permalink(); ?>" class="bp-tooltip" data-title="<?php bp_member_name(); ?>"><?php bp_member_avatar(); ?></a>
    115115                                                </div>
    116116
    117117                                                <div class="item">
  • src/bp-groups/bp-groups-widgets.php

     
    5858                <?php while ( bp_groups() ) : bp_the_group(); ?>
    5959                        <li <?php bp_group_class(); ?>>
    6060                                <div class="item-avatar">
    61                                         <a href="<?php bp_group_permalink() ?>"><?php bp_group_avatar_thumb() ?></a>
     61                                        <a href="<?php bp_group_permalink() ?>" class="bp-tooltip" data-title="<?php bp_group_name() ?>"><?php bp_group_avatar_thumb() ?></a>
    6262                                </div>
    6363
    6464                                <div class="item">
  • src/bp-groups/classes/class-bp-groups-widget.php

     
    131131                                <?php while ( bp_groups() ) : bp_the_group(); ?>
    132132                                        <li <?php bp_group_class(); ?>>
    133133                                                <div class="item-avatar">
    134                                                         <a href="<?php bp_group_permalink() ?>" title="<?php bp_group_name() ?>"><?php bp_group_avatar_thumb() ?></a>
     134                                                        <a href="<?php bp_group_permalink() ?>" class="bp-tooltip" data-title="<?php bp_group_name() ?>"><?php bp_group_avatar_thumb() ?></a>
    135135                                                </div>
    136136
    137137                                                <div class="item">
  • src/bp-members/bp-members-widgets.php

     
    7979                <?php while ( bp_members() ) : bp_the_member(); ?>
    8080                        <li class="vcard">
    8181                                <div class="item-avatar">
    82                                         <a href="<?php bp_member_permalink(); ?>"><?php bp_member_avatar(); ?></a>
     82                                        <a href="<?php bp_member_permalink(); ?>" class="bp-tooltip" data-title="<?php bp_member_name(); ?>"><?php bp_member_avatar(); ?></a>
    8383                                </div>
    8484
    8585                                <div class="item">
  • src/bp-members/classes/class-bp-core-members-widget.php

     
    126126
    127127                                        <li class="vcard">
    128128                                                <div class="item-avatar">
    129                                                         <a href="<?php bp_member_permalink() ?>" title="<?php bp_member_name(); ?>"><?php bp_member_avatar(); ?></a>
     129                                                        <a href="<?php bp_member_permalink() ?>" class="bp-tooltip" data-title="<?php bp_member_name(); ?>"><?php bp_member_avatar(); ?></a>
    130130                                                </div>
    131131
    132132                                                <div class="item">
  • src/bp-members/classes/class-bp-core-recently-active-widget.php

     
    8585                                <?php while ( bp_members() ) : bp_the_member(); ?>
    8686
    8787                                        <div class="item-avatar">
    88                                                 <a href="<?php bp_member_permalink(); ?>" title="<?php bp_member_name(); ?>"><?php bp_member_avatar(); ?></a>
     88                                                <a href="<?php bp_member_permalink(); ?>" class="bp-tooltip" data-title="<?php bp_member_name(); ?>"><?php bp_member_avatar(); ?></a>
    8989                                        </div>
    9090
    9191                                <?php endwhile; ?>
  • src/bp-members/classes/class-bp-core-whos-online-widget.php

     
    8484                                <?php while ( bp_members() ) : bp_the_member(); ?>
    8585
    8686                                        <div class="item-avatar">
    87                                                 <a href="<?php bp_member_permalink(); ?>" title="<?php bp_member_name(); ?>"><?php bp_member_avatar(); ?></a>
     87                                                <a href="<?php bp_member_permalink(); ?>" class="bp-tooltip" data-title="<?php bp_member_name(); ?>"><?php bp_member_avatar(); ?></a>
    8888                                        </div>
    8989
    9090                                <?php endwhile; ?>
  • src/bp-messages/bp-messages-star.php

     
    229229                 * @param string $retval Link for starring / unstarring a message, including markup.
    230230                 * @param array  $r      Parsed link arguments. See $args in bp_get_the_message_star_action_link().
    231231                 */
    232                 return apply_filters( 'bp_get_the_message_star_action_link', '<a title="' . esc_attr( $title ) . '" class="message-action-' . esc_attr( $action ) . '" data-star-status="' . esc_attr( $action ) .'" data-star-nonce="' . esc_attr( $nonce ) . '"' . $bulk_attr . ' data-message-id="' . esc_attr( (int) $message_id ) . '" href="' . $retval . '"><span class="icon"></span> <span class="bp-screen-reader-text">' . $r['text_' . $action] . '</span></a>', $r );
     232                return apply_filters( 'bp_get_the_message_star_action_link', '<a class="bp-tooltip message-action-' . esc_attr( $action ) . '" aria-label="' . esc_attr( $title ) . '" data-title="' . esc_attr( $title ) . '" data-star-status="' . esc_attr( $action ) .'" data-star-nonce="' . esc_attr( $nonce ) . '"' . $bulk_attr . ' data-message-id="' . esc_attr( (int) $message_id ) . '" href="' . $retval . '"><span class="icon" aria-hidden="true"></span> <span class="bp-screen-reader-text">' . $r['text_' . $action] . '</span></a>', $r );
    233233        }
    234234
    235235/**
  • src/bp-templates/bp-legacy/buddypress/activity/index.php

     
    142142
    143143        <div class="item-list-tabs no-ajax" id="subnav" aria-label="<?php esc_attr_e( 'Activity secondary navigation', 'buddypress' ); ?>" role="navigation">
    144144                <ul>
    145                         <li class="feed"><a href="<?php bp_sitewide_activity_feed_link(); ?>" title="<?php esc_attr_e( 'RSS Feed', 'buddypress' ); ?>"><?php _e( 'RSS', 'buddypress' ); ?></a></li>
     145                        <li class="feed"><a href="<?php bp_sitewide_activity_feed_link(); ?>" class="bp-tooltip" data-title="<?php esc_attr_e( 'RSS Feed', 'buddypress' ); ?>" aria-label="<?php esc_attr_e( 'RSS Feed', 'buddypress' ); ?>"><?php _e( 'RSS', 'buddypress' ); ?></a></li>
    146146
    147147                        <?php
    148148
  • src/bp-templates/bp-legacy/buddypress/groups/single/activity.php

     
    99?>
    1010<div class="item-list-tabs no-ajax" id="subnav" aria-label="<?php esc_attr_e( 'Group secondary navigation', 'buddypress' ); ?>" role="navigation">
    1111        <ul>
    12                 <li class="feed"><a href="<?php bp_group_activity_feed_link(); ?>" title="<?php esc_attr_e( 'RSS Feed', 'buddypress' ); ?>"><?php _e( 'RSS', 'buddypress' ); ?></a></li>
     12                <li class="feed"><a href="<?php bp_group_activity_feed_link(); ?>" class="bp-tooltip" data-title="<?php esc_attr_e( 'RSS Feed', 'buddypress' ); ?>" aria-label="<?php esc_attr_e( 'RSS Feed', 'buddypress' ); ?>"><?php _e( 'RSS', 'buddypress' ); ?></a></li>
    1313
    1414                <?php
    1515
  • src/bp-templates/bp-legacy/css/buddypress-rtl.css

     
    2323        3.9 - Private Messaging Threads
    2424        3.10 - Extended Profiles
    2525        3.11 - Widgets
     26        3.12 - BuddyPress Tooltips
    26274.0 - Media Queries
    2728        4.1 - Smartphones Landscape
    2829        4.2 - Smartphones Portrait
     
    17641765}
    17651766
    17661767/*--------------------------------------------------------------
     17683.12 - BuddyPress Tooltips
     1769--------------------------------------------------------------*/
     1770.bp-tooltip {
     1771        position: relative;
     1772}
     1773
     1774.bp-tooltip::after {
     1775        background: #fff;
     1776        border: 1px solid #aaa;
     1777        border-radius: 1px;
     1778        color: #333;
     1779        content: attr(data-title);
     1780        display: none;
     1781        font-size: 11px;
     1782        font-weight: normal;
     1783        letter-spacing: normal;
     1784        line-height: 1.5;
     1785        margin-top: 5px;
     1786        opacity: 0;
     1787        padding: 3px 6px;
     1788        position: absolute;
     1789        left: 50%;
     1790        text-align: center;
     1791        text-decoration: none;
     1792        text-shadow: none;
     1793        text-transform: none;
     1794        top: 100%;
     1795        transform: translateX(-50%);
     1796        -webkit-transform: translateX(-50%);
     1797        white-space: pre;
     1798        word-wrap: break-word;
     1799        z-index: 998;
     1800}
     1801
     1802.bp-tooltip::before {
     1803        border: 5px solid transparent;
     1804        bottom: -5px;
     1805        content: "";
     1806        color: #333;
     1807        display: none;
     1808        height: 0;
     1809        margin-left: -5px;
     1810        opacity: 0;
     1811        position: absolute;
     1812        left: 50%;
     1813        top: auto;
     1814        width: 0;
     1815        z-index: 999;
     1816}
     1817
     1818@-webkit-keyframes tooltip-show {
     1819        from {
     1820        opacity: 0;
     1821        }
     1822        to {
     1823        opacity: 1;
     1824        }
     1825}
     1826@keyframes tooltip-show {
     1827        from {
     1828        opacity: 0;
     1829        }
     1830        to {
     1831        opacity: 1;
     1832        }
     1833}
     1834
     1835.bp-tooltip:hover::before,
     1836.bp-tooltip:hover::after,
     1837.bp-tooltip:active::before,
     1838.bp-tooltip:active::after,
     1839.bp-tooltip:focus::before,
     1840.bp-tooltip:focus::after {
     1841        display: inline-block;
     1842        text-decoration: none;
     1843        -webkit-animation-name: tooltip-show;
     1844        animation-name: tooltip-show;
     1845        -webkit-animation-duration: 0.1s;
     1846        animation-duration: 0.1s;
     1847        -webkit-animation-fill-mode: forwards;
     1848        animation-fill-mode: forwards;
     1849        -webkit-animation-timing-function: ease-in;
     1850        animation-timing-function: ease-in;
     1851        -webkit-animation-delay: 0.2s;
     1852        animation-delay: 0.2s;
     1853}
     1854
     1855/*--------------------------------------------------------------
    176718564.0 - Media Queries
    17681857--------------------------------------------------------------*/
    17691858/*--------------------------------------------------------------
  • src/bp-templates/bp-legacy/css/buddypress.css

     
    2323        3.9 - Private Messaging Threads
    2424        3.10 - Extended Profiles
    2525        3.11 - Widgets
     26        3.12 - BuddyPress Tooltips
    26274.0 - Media Queries
    2728        4.1 - Smartphones Landscape
    2829        4.2 - Smartphones Portrait
     
    17641765}
    17651766
    17661767/*--------------------------------------------------------------
     17683.12 - BuddyPress Tooltips
     1769--------------------------------------------------------------*/
     1770.bp-tooltip {
     1771        position: relative;
     1772}
     1773
     1774.bp-tooltip::after {
     1775        background: #fff;
     1776        border: 1px solid #aaa;
     1777        border-radius: 1px;
     1778        color: #333;
     1779        content: attr(data-title);
     1780        display: none;
     1781        font-size: 11px;
     1782        font-weight: normal;
     1783        letter-spacing: normal;
     1784        line-height: 1.5;
     1785        margin-top: 5px;
     1786        opacity: 0;
     1787        padding: 3px 6px;
     1788        position: absolute;
     1789        right: 50%;
     1790        text-align: center;
     1791        text-decoration: none;
     1792        text-shadow: none;
     1793        text-transform: none;
     1794        top: 100%;
     1795        transform: translateX(50%);
     1796        -webkit-transform: translateX(50%);
     1797        white-space: pre;
     1798        word-wrap: break-word;
     1799        z-index: 998;
     1800}
     1801
     1802.bp-tooltip::before {
     1803        border: 5px solid transparent;
     1804        bottom: -5px;
     1805        content: "";
     1806        color: #333;
     1807        display: none;
     1808        height: 0;
     1809        margin-right: -5px;
     1810        opacity: 0;
     1811        position: absolute;
     1812        right: 50%;
     1813        top: auto;
     1814        width: 0;
     1815        z-index: 999;
     1816}
     1817
     1818@-webkit-keyframes tooltip-show {
     1819        from {
     1820        opacity: 0;
     1821        }
     1822        to {
     1823        opacity: 1;
     1824        }
     1825}
     1826@keyframes tooltip-show {
     1827        from {
     1828        opacity: 0;
     1829        }
     1830        to {
     1831        opacity: 1;
     1832        }
     1833}
     1834
     1835.bp-tooltip:hover::before,
     1836.bp-tooltip:hover::after,
     1837.bp-tooltip:active::before,
     1838.bp-tooltip:active::after,
     1839.bp-tooltip:focus::before,
     1840.bp-tooltip:focus::after {
     1841        display: inline-block;
     1842        text-decoration: none;
     1843        -webkit-animation-name: tooltip-show;
     1844        animation-name: tooltip-show;
     1845        -webkit-animation-duration: 0.1s;
     1846        animation-duration: 0.1s;
     1847        -webkit-animation-fill-mode: forwards;
     1848        animation-fill-mode: forwards;
     1849        -webkit-animation-timing-function: ease-in;
     1850        animation-timing-function: ease-in;
     1851        -webkit-animation-delay: 0.2s;
     1852        animation-delay: 0.2s;
     1853}
     1854
     1855/*--------------------------------------------------------------
    176718564.0 - Media Queries
    17681857--------------------------------------------------------------*/
    17691858/*--------------------------------------------------------------