keyboard-navigation/wordpress_pathfinding.php
2008-11-09 15:39:12 -05:00

24 lines
622 B
PHP

<?php
function pathfinding_get_home_url() {
if (function_exists('get_current_site')) { // WPMU
$site = get_current_site();
return preg_replace('#/$#', '', "http://" . $site->domain . $site->path);
} else {
return get_option('home');
}
}
function pathfinding_get_admin_url() {
if (function_exists('get_current_site')) { // WPMU
return cpm_get_home_url();
} else {
return get_option('siteurl');
}
}
function pathfinding_get_plugin_path() {
return (defined("MUPLUGINDIR") ? MUPLUGINDIR : PLUGINDIR) . '/' . preg_replace('#^.*/([^\/]*)#', '\\1', dirname(plugin_basename(__FILE__)));
}
?>