What should I use instead of WP_CONTENT_DIR and WP_PLUGIN_DIR?

The WordPress documentation for Determining Plugin and Content Directories states that: WordPress makes use of the following constants when determining the path to the content and plugin directories. These should not be used directly by plugins or themes, but are listed here for completeness. It goes on to list WP_CONTENT_DIR and WP_PLUGIN_DIR among constants that … Read more

What is a class constant?

JLS-8.3.1.1. static Fields says (in part) A static field, sometimes called a class variable, is incarnated when the class is initialized (§12.4). JLS-4.12.4. final Variables says (in part) A constant variable is a final variable of primitive type or type String that is initialized with a constant expression (§15.28) tl;dr Putting that together, a class constant is a static final field.