From 8117aa52ae6d4c628b76ceccb8761ab9c81c8d85 Mon Sep 17 00:00:00 2001 From: Fernando Jorge Mota Date: Thu, 21 Dec 2023 21:07:10 -0300 Subject: [PATCH] Use constant CAP_EDIT_LISTINGS instead of string 'edit_job_listings' --- includes/class-wp-job-manager-ajax.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class-wp-job-manager-ajax.php b/includes/class-wp-job-manager-ajax.php index 643ca2164..d8d9f0d0b 100644 --- a/includes/class-wp-job-manager-ajax.php +++ b/includes/class-wp-job-manager-ajax.php @@ -335,7 +335,7 @@ private static function user_can_search_users() { * * @param array $user_caps Array of capabilities/roles that are allowed to search for users. */ - $allowed_capabilities = apply_filters( 'job_manager_caps_can_search_users', [ 'edit_job_listings' ] ); + $allowed_capabilities = apply_filters( 'job_manager_caps_can_search_users', [ \WP_Job_Manager_Post_Types::CAP_EDIT_LISTINGS ] ); foreach ( $allowed_capabilities as $cap ) { if ( current_user_can( $cap ) ) { $user_can_search_users = true;