Refactoring a WordPress plugin, Object-oriented, a start
Introducing Assets Manager for WordPress
Function Reference/plugin basename « WordPress Codex
Global $post