Skip to:
Content

bbPress.org

Changeset 3210


Ignore:
Timestamp:
05/24/2011 11:00:20 PM (15 years ago)
Author:
johnjamesjacoby
Message:

If user has unfiltered_html capability, add notice to the top of topic and reply forms and hide the form-allowed-tags section.

Location:
branches/plugin/bbp-themes/bbp-twentyten/bbpress
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/plugin/bbp-themes/bbp-twentyten/bbpress/form-reply.php

    r3207 r3210  
    3131                    <?php endif; ?>
    3232
     33                    <?php if ( current_user_can( 'unfiltered_html' ) ) : ?>
     34
     35                        <div class="bbp-template-notice">
     36                            <p><?php _e( 'Your account has the ability to post unrestricted HTML content.', 'bbpress' ); ?></p>
     37                        </div>
     38
     39                    <?php endif; ?>
     40
    3341                    <?php do_action( 'bbp_template_notices' ); ?>
    3442
     
    4856                        </p>
    4957
    50                         <p class="form-allowed-tags">
    51                             <label><?php _e( 'You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes:','bbpress' ); ?></label><br />
    52                             <code><?php bbp_allowed_tags(); ?></code>
    53                         </p>
     58                        <?php if ( !current_user_can( 'unfiltered_html' ) ) : ?>
     59
     60                            <p class="form-allowed-tags">
     61                                <label><?php _e( 'You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes:','bbpress' ); ?></label><br />
     62                                <code><?php bbp_allowed_tags(); ?></code>
     63                            </p>
     64
     65                        <?php endif; ?>
    5466
    5567                        <p>
  • branches/plugin/bbp-themes/bbp-twentyten/bbpress/form-topic.php

    r3207 r3210  
    4040                    <?php endif; ?>
    4141
     42                    <?php if ( current_user_can( 'unfiltered_html' ) ) : ?>
     43
     44                        <div class="bbp-template-notice">
     45                            <p><?php _e( 'Your account has the ability to post unrestricted HTML content.', 'bbpress' ); ?></p>
     46                        </div>
     47
     48                    <?php endif; ?>
     49
    4250                    <?php do_action( 'bbp_template_notices' ); ?>
    4351
     
    6169                        </p>
    6270
    63                         <p class="form-allowed-tags">
    64                             <label><?php _e( 'You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes:','bbpress' ); ?></label><br />
    65                             <code><?php bbp_allowed_tags(); ?></code>
    66                         </p>
     71                        <?php if ( !current_user_can( 'unfiltered_html' ) ) : ?>
     72
     73                            <p class="form-allowed-tags">
     74                                <label><?php _e( 'You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes:','bbpress' ); ?></label><br />
     75                                <code><?php bbp_allowed_tags(); ?></code>
     76                            </p>
     77
     78                        <?php endif; ?>
    6779
    6880                        <p>
Note: See TracChangeset for help on using the changeset viewer.