Hi there,
I'm trying to access the WPMU API from an other web application, but I'm not sure which files I have to include() to access the wpmu functions (namely get_most_active_blogs())
thanks in advance,
BlackMB
Hi there,
I'm trying to access the WPMU API from an other web application, but I'm not sure which files I have to include() to access the wpmu functions (namely get_most_active_blogs())
thanks in advance,
BlackMB
You need to include the file /wp-blog-header.php to gain access to the other wordpress multiuser functions. Please note that I say that having never tried doing what you are doing.
If I include or require this file, I get redirected to blogdomain.de/wp-signup.php?new=test.php
test.php being the name of the file which includes wp-blog-header.php.
This file doesn't contain anything else, just
<?php
require('/location/wp-blog-header.php');
?>
thanks in advance,
BlackMB
I have found this to work. Note that I am using HyperDB and I am just in the first testing phase.
<?php
require_once('/location/wp-config.php');
require_once('/location/db-settings.php');
require_once('/location/wp-includes/plugin.php');
require_once('/location/wp-content/db.php');
require_once('/location/wp-includes/wpmu-functions.php');
print_r(get_most_active_blogs());
?>
Actually, this appears to work and be all you need to get most everything included, including plugins:
<?php
require_once('/location/wp-config.php');
get_most_active_blogs();
?>
To see everything that is being included:
<?php
require_once('/location/wp-config.php');
print_r(get_included_files());
?>