' . __('Settings') . ''; $links[] = '' . __('Donate') . ''; $links[] = '' . __('Support') . ''; $links[] = '' . __('Custom WordPress coding nodig?') . ''; } return $links; } // To implement later function refresh_rewrite() { if(isset($_GET['rwflush'])) { global $wp_rewrite; $wp_rewrite->flush_rules(); } } function disable_social($type = 'sociable') { if($type == 'sociable') { remove_filter( 'the_content', 'auto_sociable' ); } if($type == '1click') { remove_filter ( 'the_content', 'lacands_wp_filter_post_content'); } } /** * Checks if user is admin or has plugin caps. */ function is_admin() { if(is_multisite()) { // TODO fix this, for now rely on WP roles ( I have tested this 07062011 ) return true; } require_once(ABSPATH . WPINC . '/pluggable.php'); $current_user = wp_get_current_user(); $current_user_id = ! empty($current_user) ? $current_user->id : 0; $current_user = new WP_User($current_user_id); if($current_user->has_cap('delete_users')) return true; return false; } /** * Show default message as infobox * @author Ramon Fincken * @param $msg * @return void */ function show_message($msg) { echo '