Browse Source

add wrapper for new functions due to compability on older wp

master
Oldperl 8 years ago
parent
commit
bba75e1a1a
  1. 4
      includes/help/start.php
  2. 9
      semmelstatzR_startup.php

4
includes/help/start.php

@ -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);
?>
?>

9
semmelstatzR_startup.php

@ -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));
}
}
?>
Loading…
Cancel
Save