|
@@ 102-104 (lines=3) @@
|
| 99 |
|
} |
| 100 |
|
} |
| 101 |
|
// Check that must have conditions is less then |
| 102 |
|
if ( $passed < $must_pass ) { |
| 103 |
|
return new WP_Error( 'unauthorized', sprintf( __( 'This user is not authorized to %s on this blog.', 'jetpack' ), implode( ', ', $failed ), 403 ) ); |
| 104 |
|
} |
| 105 |
|
|
| 106 |
|
} else { |
| 107 |
|
if ( !current_user_can( $capability ) ) { |
|
@@ 106-110 (lines=5) @@
|
| 103 |
|
return new WP_Error( 'unauthorized', sprintf( __( 'This user is not authorized to %s on this blog.', 'jetpack' ), implode( ', ', $failed ), 403 ) ); |
| 104 |
|
} |
| 105 |
|
|
| 106 |
|
} else { |
| 107 |
|
if ( !current_user_can( $capability ) ) { |
| 108 |
|
return new WP_Error( 'unauthorized', sprintf( __( 'This user is not authorized to %s on this blog.', 'jetpack' ), $capability ), 403 ); |
| 109 |
|
} |
| 110 |
|
} |
| 111 |
|
|
| 112 |
|
return true; |
| 113 |
|
} |