add wrapper for new functions due to compability on older wp

This commit is contained in:
Oldperl 2013-08-29 11:58:40 +00:00
parent 4f9fb51468
commit bba75e1a1a
2 changed files with 10 additions and 3 deletions

View file

@ -37,7 +37,7 @@
* @uses wp add_filter()
*/
function semr_admin_notice(){
if(!strstr($_GET['page'], "semmelstatzR")) return;
if(!function_exists("get_user_meta") || !strstr($_GET['page'], "semmelstatzR")) return;
global $current_user ;
$user_id = $current_user->ID;
if(get_user_meta($user_id, 'semr_ignore_notice')) return;
@ -130,4 +130,4 @@ function semmelstatzR_help($contextual_help, $screen_id, $screen) {
return $semrContextHelp.$contextual_help;
}
add_filter('contextual_help', 'semmelstatzR_help', 10, 3);
?>
?>

View file

@ -84,4 +84,11 @@ if(class_exists("Upgrademe")) {
return 'http://www.php-backoffice.de/updates/test/semr_update.php';
}
}
?>
// function wrappers for older wp versions
if(!function_exists("plugin_dir_path")) {
function plugin_dir_path($file) {
return trailingslashit(dirname($file));
}
}
?>