Changeset 5656
- Timestamp:
- 07/12/2017 02:30:42 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-user-notes.php
r5654 r5656 34 34 * Registers scripts and styles. 35 35 */ 36 function enqueue_scripts() {36 public function enqueue_scripts() { 37 37 if ( ! current_user_can( 'moderate' ) ) { 38 38 return; … … 47 47 * @param string $action Requested action. 48 48 */ 49 function add_user_note( $action = '' ) {49 public function add_user_note( $action = '' ) { 50 50 if ( 'wporg_bbp_add_user_note' !== $action || ! current_user_can( 'moderate' ) ) { 51 51 return; … … 124 124 * @param string $action Requested action. 125 125 */ 126 function delete_user_note( $action = '' ) {126 public function delete_user_note( $action = '' ) { 127 127 if ( 'wporg_bbp_delete_user_note' !== $action || ! current_user_can( 'keep_gate' ) ) { 128 128 return; … … 174 174 * @return array Array of user notes. 175 175 */ 176 function get_user_notes( $user_id = 0 ) {176 public function get_user_notes( $user_id = 0 ) { 177 177 if ( ! $user_id ) { 178 178 $user_id = get_the_author_meta( 'ID' ); … … 197 197 * Adds toggle link for notes to the author area of a post. 198 198 */ 199 function add_user_notes_toggle_link() {199 public function add_user_notes_toggle_link() { 200 200 if ( ! current_user_can( 'moderate' ) ) { 201 201 return; … … 232 232 * @return string Post permalink or user profile URL. 233 233 */ 234 function get_user_note_post_permalink( $post_id = 0, $user_id = 0, $site_id = 0 ) {234 public function get_user_note_post_permalink( $post_id = 0, $user_id = 0, $site_id = 0 ) { 235 235 switch_to_blog( $site_id ); 236 236 … … 257 257 * @param int $user_id User ID. Defaults to the current post author. 258 258 */ 259 function display_user_notes( $user_id = 0 ) {259 public function display_user_notes( $user_id = 0 ) { 260 260 $note_id = isset( $_GET['note_id'] ) ? (int) $_GET['note_id'] : 0; 261 261 $user_notes = $this->get_user_notes( $user_id ); … … 345 345 * @param int $user_id User ID. Defaults to the current post author. 346 346 */ 347 function display_note_form( $user_id = 0 ) {347 public function display_note_form( $user_id = 0 ) { 348 348 if ( ! $user_id ) { 349 349 $user_id = get_the_author_meta( 'ID' ); … … 392 392 * in topics or replies. 393 393 */ 394 function display_user_notes_in_content() {394 public function display_user_notes_in_content() { 395 395 if ( ! current_user_can( 'moderate' ) ) { 396 396 return; … … 421 421 * Displays existing notes and the form for adding a new note in user profile. 422 422 */ 423 function display_user_notes_in_profile() {423 public function display_user_notes_in_profile() { 424 424 if ( ! current_user_can( 'moderate' ) ) { 425 425 return;
Note: See TracChangeset
for help on using the changeset viewer.