Code Duplication    Length = 3-3 lines in 3 locations

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

@@ 814-816 (lines=3) @@
811
			return $return;
812
		}
813
814
		if ( isset( $input['type'] ) && 'revision' === $input['type'] ) {
815
			$return['preview_nonce'] = wp_create_nonce( 'post_preview_' . $input['parent'] );
816
		}
817
818
		if ( isset( $sticky ) ) {
819
			// 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

@@ 874-876 (lines=3) @@
871
			return $return;
872
		}
873
874
		if ( isset( $input['type'] ) && 'revision' === $input['type'] ) {
875
			$return['preview_nonce'] = wp_create_nonce( 'post_preview_' . $input['parent'] );
876
		}
877
878
		if ( isset( $sticky ) ) {
879
			// 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

@@ 845-847 (lines=3) @@
842
			return $return;
843
		}
844
845
		if ( isset( $input['type'] ) && 'revision' === $input['type'] ) {
846
			$return['preview_nonce'] = wp_create_nonce( 'post_preview_' . $input['parent'] );
847
		}
848
849
		if ( isset( $sticky ) ) {
850
			// workaround for sticky test occasionally failing, maybe a race condition with stick_post() above