Skip to content

Commit

Permalink
Use constant CAP_EDIT_LISTINGS instead of string 'edit_job_listings'
Browse files Browse the repository at this point in the history
  • Loading branch information
fjorgemota committed Dec 22, 2023
1 parent 5326a9b commit 8117aa5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/class-wp-job-manager-ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8117aa5

Please sign in to comment.