Code Duplication    Length = 3-3 lines in 3 locations

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

@@ 625-627 (lines=3) @@
622
			return $return;
623
		}
624
625
		if ( isset( $input['type'] ) && 'revision' === $input['type'] ) {
626
			$return['preview_nonce'] = wp_create_nonce( 'post_preview_' . $input['parent'] );
627
		}
628
629
		if ( isset( $sticky ) ) {
630
			// 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

@@ 683-685 (lines=3) @@
680
			return $return;
681
		}
682
683
		if ( isset( $input['type'] ) && 'revision' === $input['type'] ) {
684
			$return['preview_nonce'] = wp_create_nonce( 'post_preview_' . $input['parent'] );
685
		}
686
687
		if ( isset( $sticky ) ) {
688
			// 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

@@ 684-686 (lines=3) @@
681
			return $return;
682
		}
683
684
		if ( isset( $input['type'] ) && 'revision' === $input['type'] ) {
685
			$return['preview_nonce'] = wp_create_nonce( 'post_preview_' . $input['parent'] );
686
		}
687
688
		if ( isset( $sticky ) ) {
689
			// workaround for sticky test occasionally failing, maybe a race condition with stick_post() above