Changeset 12892 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/functions.php
- Timestamp:
- 09/17/2023 06:18:29 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/functions.php
r12616 r12892 444 444 445 445 /** 446 * Return the raw database count of reviews by a user. 447 * 448 * @param int $user_id User ID to get count for. 449 * @return int Raw DB count of reviews. 450 */ 451 function wporg_support_get_user_report_count( $user_id = 0 ) { 452 if ( ! class_exists( 'WordPressdotorg\Forums\Plugin' ) ) { 453 return 0; 454 } 455 456 $plugin_instance = WordPressdotorg\Forums\Plugin::get_instance(); 457 458 return $plugin_instance->users->get_user_report_count( $user_id ); 459 } 460 461 /** 446 462 * Check if the current page is a single review. 447 463 * … … 488 504 function wporg_support_is_single_user_topics_replied_to() { 489 505 return (bool) get_query_var( 'wporg_single_user_topics_replied_to' ); 506 } 507 508 /** 509 * Check if the current page is a user's "Reports Submitted" page. 510 * 511 * @return bool True if the page is a "Reports Submitted" page, false otherwise. 512 */ 513 function wporg_support_is_single_user_reported_topics() { 514 return (bool) get_query_var( 'wporg_single_user_reported_topics' ); 490 515 } 491 516
Note: See TracChangeset
for help on using the changeset viewer.