Code Duplication    Length = 3-3 lines in 3 locations

json-endpoints/class.wpcom-json-api-update-post-endpoint.php 1 location

@@ 597-599 (lines=3) @@
594
			return $return;
595
		}
596
597
		if ( isset( $input['type'] ) && 'revision' === $input['type'] ) {
598
			$return['preview_nonce'] = wp_create_nonce( 'post_preview_' . $input['parent'] );
599
		}
600
601
		if ( isset( $sticky ) ) {
602
			// workaround for sticky test occasionally failing, maybe a race condition with stick_post() above

json-endpoints/class.wpcom-json-api-update-post-v1-1-endpoint.php 1 location

@@ 601-603 (lines=3) @@
598
			return $return;
599
		}
600
601
		if ( isset( $input['type'] ) && 'revision' === $input['type'] ) {
602
			$return['preview_nonce'] = wp_create_nonce( 'post_preview_' . $input['parent'] );
603
		}
604
605
		if ( isset( $sticky ) ) {
606
			// workaround for sticky test occasionally failing, maybe a race condition with stick_post() above

json-endpoints/class.wpcom-json-api-update-post-v1-2-endpoint.php 1 location

@@ 601-603 (lines=3) @@
598
			return $return;
599
		}
600
601
		if ( isset( $input['type'] ) && 'revision' === $input['type'] ) {
602
			$return['preview_nonce'] = wp_create_nonce( 'post_preview_' . $input['parent'] );
603
		}
604
605
		if ( isset( $sticky ) ) {
606
			// workaround for sticky test occasionally failing, maybe a race condition with stick_post() above