Changeset 5110
- Timestamp:
- 03/07/2017 03:40:24 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-moderators.php
r5088 r5110 17 17 // Scripts and styles. 18 18 add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_styles' ) ); 19 20 // Append 'view=all' to forum, topic, and reply URLs in moderator views. 21 add_filter( 'bbp_get_forum_permalink', array( $this, 'add_view_all' ) ); 22 add_filter( 'bbp_get_topic_permalink', array( $this, 'add_view_all' ) ); 23 add_filter( 'bbp_get_reply_url', array( $this, 'add_view_all' ) ); 19 24 20 25 // Archived post status. … … 87 92 wp_enqueue_style( 'support-forums-moderators', plugins_url( 'css/styles-moderators.css', __DIR__ ) ); 88 93 } 94 } 95 96 /** 97 * Append 'view=all' to forum, topic, and reply URLs in moderator views. 98 * 99 * @param string $url Forum, topic, or reply URL. 100 * @return string Filtered URL. 101 */ 102 function add_view_all( $url ) { 103 if ( bbp_is_single_view() && in_array( bbp_get_view_id(), self::VIEWS ) ) { 104 $url = add_query_arg( 'view', 'all', $url ); 105 } 106 107 return $url; 89 108 } 90 109
Note: See TracChangeset
for help on using the changeset viewer.