June 2017
Beginner to intermediate
368 pages
8h 31m
English
The first option we investigate is to call WordPress code directly. Of course, this will only work if your code is residing on the same server and can access the WordPress core. To load the core, we would need to require wp-load.php; for example:
include_once("/var/www/yourdomain.com/htdocs/wp-load.php");
However, both Moodle and WordPress contain a global function called get_users(). This collision of function names can, in theory, be handled by renaming the functions using runkit (http://php.net/manual/en/book.runkit.php) or similar.
If you aren't familiar with tools to modify PHP's behavior (such as function renaming), then look at the PHP documentation at: http://php.net/manual/en/refs.basic.php.php
Read now
Unlock full access