private static function _getCurrentPostType() { $_aMethodsToTry = array('getPostTypeByTypeNow', 'getPostTypeByScreenObject', 'getPostTypeByREQUEST', 'getPostTypeByPostObject'); foreach ($_aMethodsToTry as $_sMethodName) { $_sPostType = call_user_func(array(__CLASS__, $_sMethodName)); if ($_sPostType) { return $_sPostType; } } return null; }