Skip to:
Content

bbPress.org


Ignore:
Timestamp:
04/29/2016 05:01:03 PM (10 years ago)
Author:
johnjamesjacoby
Message:

Mentions: Refactor the way user mentions are discovered and linked.

This is a port of r6014 (without unit tests) for the 2.5 branch.

  • Adds a filter to bbp_make_clickable
  • Adds filters for for previously hard-coded clickables
  • Adds new filter for at-mention clickable
  • Deprecates previous functions for finding & linking at-mentions

For 2.5.9 (2.5 branch). Hat-tip to Daniel Cid.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.5/includes/core/filters.php

    r5370 r6015  
    140140// Run filters on reply content
    141141add_filter( 'bbp_get_reply_content', 'bbp_make_clickable', 4    );
    142 add_filter( 'bbp_get_reply_content', 'bbp_mention_filter', 5    );
    143142add_filter( 'bbp_get_reply_content', 'wptexturize',        6    );
    144143add_filter( 'bbp_get_reply_content', 'convert_chars',      8    );
     
    151150// Run filters on topic content
    152151add_filter( 'bbp_get_topic_content', 'bbp_make_clickable', 4    );
    153 add_filter( 'bbp_get_topic_content', 'bbp_mention_filter', 5    );
    154152add_filter( 'bbp_get_topic_content', 'wptexturize',        6    );
    155153add_filter( 'bbp_get_topic_content', 'convert_chars',      8    );
     
    244242add_filter( 'bbp_map_meta_caps', 'bbp_map_topic_tag_meta_caps', 10, 4 ); // Topic tags
    245243
     244// Clickables
     245add_filter( 'bbp_make_clickable', 'bbp_make_urls_clickable',      2 ); // https://bbpress.org
     246add_filter( 'bbp_make_clickable', 'bbp_make_ftps_clickable',      4 ); // ftps://bbpress.org
     247add_filter( 'bbp_make_clickable', 'bbp_make_emails_clickable',    6 ); // jjj@bbpress.org
     248add_filter( 'bbp_make_clickable', 'bbp_make_mentions_clickable',  8 ); // @jjj
     249
    246250/** Deprecated ****************************************************************/
    247251
Note: See TracChangeset for help on using the changeset viewer.