What would be the reliable way to include files under the
Normally, something like this would do the job.
require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
However, some sites have unusual
ABSPATHvalue like wordpress.com (more info).
I thought of doing
require_once( dirname( WP_CONTENT_DIR ) . '/wp-admin/includes/class-wp-list-table.php' );
but there might be sites with a custom WP_CONTENT_DIR path then it might not work.
- The topic ‘Reliable way to Include files under the wp-admin directory’ is closed to new replies.