Changeset 7875
- Timestamp:
- 11/20/2018 06:10:25 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-hooks.php
r7854 r7875 243 243 public function new_topic_link() { 244 244 if ( bbp_is_single_forum() ) { 245 printf( '<a class="button create-topic" href="#new-topic-0">%s</a>', __( 'Create Topic', 'wporg-forums' ) ); 245 if ( bbp_current_user_can_access_create_topic_form() ) { 246 printf( 247 '<a class="button create-topic" href="#new-topic-0">%s</a>', 248 __( 'Create Topic', 'wporg-forums' ) 249 ); 250 } elseif ( ! bbp_is_forum_closed() && ! is_user_logged_in() ) { 251 printf( 252 '<a class="button create-topic login" href="%s">%s</a>', 253 wp_login_url(), 254 __( 'Login to Create a Topic', 'wporg-forums' ) 255 ); 256 } 257 246 258 remove_filter( 'bbp_template_before_pagination_loop', array( $this, 'new_topic_link' ) ); 247 259 }
Note: See TracChangeset
for help on using the changeset viewer.