WordPress.org

Plugin Directory

Changeset 629032


Ignore:
Timestamp:
11/23/12 15:40:14 (17 months ago)
Author:
mordauk
Message:

Uploading v1.0.2

Location:
bbpress-do-short-codes
Files:
2 edited
3 copied

Legend:

Unmodified
Added
Removed
  • bbpress-do-short-codes/tags/1.0.2/bbp-do-shortcodes.php

    r601054 r629032  
    44Plugin URI: http://pippinsplugins.com/bbpress-do-shortcodes 
    55Description: Enables short codes in bbPress Topic and Reply content 
    6 Version: 1.0.1 
     6Version: 1.0.2 
    77Author: Pippin Williamson 
    88Author URI: http://pippinsplugins.com 
     
    1212 
    1313function pw_bbp_shortcodes( $content, $reply_id ) { 
    14     return do_shortcode( $content ); 
     14     
     15    $reply_author = bbp_get_reply_author_id( $reply_id ); 
     16 
     17    if( user_can( pw_bbp_parse_capability() ) ) 
     18        return do_shortcode( $reply_author, $content ); 
     19 
     20    return $content; 
    1521} 
    1622add_filter('bbp_get_reply_content', 'pw_bbp_shortcodes', 10, 2); 
    1723add_filter('bbp_get_topic_content', 'pw_bbp_shortcodes', 10, 2); 
     24 
     25function pw_bbp_parse_capability() { 
     26    return apply_filters( 'pw_bbp_parse_shortcodes_cap', 'publish_forums' ); 
     27} 
  • bbpress-do-short-codes/tags/1.0.2/readme.txt

    r601055 r629032  
    66Tags: bbPress, shortcodes, short code, do_shortcode, Forums, mordauk, Pippin Williamson, pippinsplugins 
    77Requires at least: 3.2 
    8 Tested up to: 3.4.2 
    9 Stable Tag: 1.0.1 
     8Tested up to: 3.5 
     9Stable Tag: 1.0.2 
    1010 
    1111 
     
    1818By default bbPress does not render short codes placed into forum posts; this enables short codes. That's it. 
    1919 
    20 **Disclaimer**: with this plugin enabled, all users will be able to use short codes, not just admins and editors. 
     20**Note**: by default, only users with the ability to publish bbPress forums will have their short codes parsed. This can be changed by passing a different capability via the _pw_bbp_parse_shortcodes_cap_ filter. 
    2121 
    2222== Installation == 
     
    2626 
    2727== Changelog == 
     28 
     29= 1.0.2 = 
     30 
     31Added user_can( 'publish_forums' ) requirement for parsing short codes. 
    2832 
    2933= 1.0.1 = 
     
    3741== Upgrade Notice == 
    3842 
     43= 1.0.2 = 
     44 
     45Added user_can( 'publish_forums' ) requirement for parsing short codes. 
     46 
    3947= 1.0.1 = 
    4048 
  • bbpress-do-short-codes/trunk/bbp-do-shortcodes.php

    r601054 r629032  
    44Plugin URI: http://pippinsplugins.com/bbpress-do-shortcodes 
    55Description: Enables short codes in bbPress Topic and Reply content 
    6 Version: 1.0.1 
     6Version: 1.0.2 
    77Author: Pippin Williamson 
    88Author URI: http://pippinsplugins.com 
     
    1212 
    1313function pw_bbp_shortcodes( $content, $reply_id ) { 
    14     return do_shortcode( $content ); 
     14     
     15    $reply_author = bbp_get_reply_author_id( $reply_id ); 
     16 
     17    if( user_can( pw_bbp_parse_capability() ) ) 
     18        return do_shortcode( $reply_author, $content ); 
     19 
     20    return $content; 
    1521} 
    1622add_filter('bbp_get_reply_content', 'pw_bbp_shortcodes', 10, 2); 
    1723add_filter('bbp_get_topic_content', 'pw_bbp_shortcodes', 10, 2); 
     24 
     25function pw_bbp_parse_capability() { 
     26    return apply_filters( 'pw_bbp_parse_shortcodes_cap', 'publish_forums' ); 
     27} 
  • bbpress-do-short-codes/trunk/readme.txt

    r601055 r629032  
    66Tags: bbPress, shortcodes, short code, do_shortcode, Forums, mordauk, Pippin Williamson, pippinsplugins 
    77Requires at least: 3.2 
    8 Tested up to: 3.4.2 
    9 Stable Tag: 1.0.1 
     8Tested up to: 3.5 
     9Stable Tag: 1.0.2 
    1010 
    1111 
     
    1818By default bbPress does not render short codes placed into forum posts; this enables short codes. That's it. 
    1919 
    20 **Disclaimer**: with this plugin enabled, all users will be able to use short codes, not just admins and editors. 
     20**Note**: by default, only users with the ability to publish bbPress forums will have their short codes parsed. This can be changed by passing a different capability via the _pw_bbp_parse_shortcodes_cap_ filter. 
    2121 
    2222== Installation == 
     
    2626 
    2727== Changelog == 
     28 
     29= 1.0.2 = 
     30 
     31Added user_can( 'publish_forums' ) requirement for parsing short codes. 
    2832 
    2933= 1.0.1 = 
     
    3741== Upgrade Notice == 
    3842 
     43= 1.0.2 = 
     44 
     45Added user_can( 'publish_forums' ) requirement for parsing short codes. 
     46 
    3947= 1.0.1 = 
    4048 
Note: See TracChangeset for help on using the changeset viewer.