code: public function replace_old_images() {
  
  		$nonce = isset( $_POST['nonce'] ) ? $_POST['nonce'] : '';
  
  		if ( ! wp_verify_nonce( $nonce, 'eliasis' ) && ! wp_verify_nonce( $nonce, 'customImagesGrifusAdmin' ) ) {
  			die( 'Busted!' );
  		}
  
  		$this->model->set_posts_to_review();
  		$response = $this->model->replace_old_images();
  
  		echo json_encode( $response );
  
  		die();
  	}
docs: Search post not edited previously and replace images.