Reliable way to Include files under the wp-admin directory
-
Hi there,
What would be the reliable way to include files under the
wp-admin
directory?Normally, something like this would do the job.
require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
However, some sites have unusual
ABSPATH
value 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.
Viewing 13 replies - 1 through 13 (of 13 total)
Viewing 13 replies - 1 through 13 (of 13 total)
- The topic ‘Reliable way to Include files under the wp-admin directory’ is closed to new replies.