If you make changes to a GPL'd program and distribute your modified program, then you must also distribute the changed sources.
There are several ways around this:
1) Do not distribute your modified WordPress for download at all. Although this is generally considered to invite bad karma by the Open-Source community, it's legal. Use it only on your own site and don't let others download it.
2) GPL only the code that you're including in WordPress but keep the copyrights for yourself (i.e. don't assign them to the FSF, as they suggest). This is not the cleanest way of doing things, but you can incorporate your own GPL'd code in your own non-GPL'd products. Again, this is considered bad karma, but since you're including your own code in your own code, no one can stop you. If you choose this route, though, be VERY careful that no code from WordPress leaks back into your other project; I can guarantee that people will be watching you like hawks over this.
3) LGPL only the code you plan to include in WordPress, and put the rest of your other project under whatever license you want. From a legal standpoint this is much cleaner than the previous option, because you're not breaking your own licenses (not that it's illegal to do that, but it gets rather messy).
I would suggest either Option 1 (if you're adamant about not sharing any of your own code) or Option 3 (if you don't mind helping out WordPress but don't want to share this other project of yours). From a design standpoint, if you choose Option 3 then I strongly suggest wrapping your code in a WordPress plugin rather than incorporating it directly into the WP code; this makes things even cleaner because they probably won't want to include your code in the core WordPress distribution, and this way you won't have to keep patching the WP code every time they release a new version.