Code Duplication    Length = 3-3 lines in 2 locations

class.json-api-endpoints.php 1 location

@@ 1287-1289 (lines=3) @@
1284
				return new WP_Error( 'unauthorized', 'User cannot edit taxonomy', 403 );
1285
			break;
1286
		case 'display' :
1287
			if ( -1 == get_option( 'blog_public' ) && ! current_user_can( 'read' ) ) {
1288
				return new WP_Error( 'unauthorized', 'User cannot view taxonomy', 403 );
1289
			}
1290
			break;
1291
		default :
1292
			return new WP_Error( 'invalid_context', 'Invalid API CONTEXT', 400 );

class.json-api.php 1 location

@@ 548-550 (lines=3) @@
545
			return new WP_Error( 'unauthorized', 'User cannot access this restricted blog', 403 );
546
		}
547
548
		if ( -1 == get_option( 'blog_public' ) && !current_user_can( 'read' ) ) {
549
			return new WP_Error( 'unauthorized', 'User cannot access this private blog.', 403 );
550
		}
551
552
		return $blog_id;
553
	}