Code Duplication    Length = 3-3 lines in 2 locations

sal/class.json-api-post-base.php 1 location

@@ 529-531 (lines=3) @@
526
				return new WP_Error( 'unauthorized', 'User cannot edit taxonomy', 403 );
527
			break;
528
		case 'display' :
529
			if ( -1 == get_option( 'blog_public' ) && ! current_user_can( 'read' ) ) {
530
				return new WP_Error( 'unauthorized', 'User cannot view taxonomy', 403 );
531
			}
532
			break;
533
		default :
534
			return new WP_Error( 'invalid_context', 'Invalid API CONTEXT', 400 );

class.json-api-endpoints.php 1 location

@@ 1502-1504 (lines=3) @@
1499
				}
1500
				break;
1501
			case 'display':
1502
				if ( -1 == get_option( 'blog_public' ) && ! current_user_can( 'read' ) ) {
1503
					return new WP_Error( 'unauthorized', 'User cannot view taxonomy', 403 );
1504
				}
1505
				break;
1506
			default:
1507
				return new WP_Error( 'invalid_context', 'Invalid API CONTEXT', 400 );