OK to init WP by manually incl. wp-config, functions, classes & plugins.php?
-
Hey!
I am making a plugin with a file that is to be accessed directly from a device.
It initializes wordpress manually (to get access to the functions) by doing this:// Get necessary stuff to access wordpress' functions define('ABSPATH', dirname(dirname(dirname(dirname(__FILE__)))) . '/'); require_once(ABSPATH .'/wp-config.php'); require_once(ABSPATH .'/wp-includes/classes.php'); require_once(ABSPATH .'/wp-includes/functions.php'); require_once(ABSPATH .'/wp-includes/plugin.php'); $wp->init();
Is this okay, or could it harm wordpress in any way?
Thank you.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘OK to init WP by manually incl. wp-config, functions, classes & plugins.php?’ is closed to new replies.