---
date: 2025-11-07T12:48:01+00:00
modified: 2025-11-07T12:48:01+00:00
permalink: https://kaspars.net/note/mastodon-social-115508961683208171
post_type: note
author:
  name: Kaspars
  avatar: https://reverse.kaspars.net/gravatar/avatar/92bfcd3a8c3a21a033a6484d32c25a40b113ec6891f674336081513d5c98ef76?s=96&d=mm&r=g
---

# On November 7, 2025 at 14:48

Here is a tip — you don't need the defined( 'ABSPATH' ) checks in class files that don't run any code. PHP will simply do nothing when a class definition is loaded.

I've noticed that AI is prone to adding it because of how WP core uses outside of class files.