Law prohibits political campaign or election related activities at the cemetery, not photography in general. If their photographs are not used by their campaign officials and trump can reasonably articulate a reason to have been there aside from campaigning, which would be pretty easy, it does not seem there would be any grounds against him. It seems the news reporting on the incident is the primary coverage of the visit.
One of the short o es like al Bayyina?
“Indeed, they who disbelieved among the People of the Scripture and the polytheists will be in the fire of Hell, abiding eternally therein. Those are the worst of creatures.” (QS. Al-Bayyina: Verse 6)