add wrapper for new functions due to compability on older wp
Dieser Commit ist enthalten in:
Ursprung
4f9fb51468
Commit
bba75e1a1a
2 geänderte Dateien mit 10 neuen und 3 gelöschten Zeilen
|
@ -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);
|
||||
?>
|
||||
?>
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
Laden …
In neuem Issue referenzieren