AdminPageFramework_WPUtility_Option::_getCompatibleTransientKey PHP Method

_getCompatibleTransientKey() public static method

public static _getCompatibleTransientKey ( $sSubject, $iAllowedCharacterLength = 45 )
    public static function _getCompatibleTransientKey($sSubject, $iAllowedCharacterLength = 45)
    {
        if (strlen($sSubject) <= $iAllowedCharacterLength) {
            return $sSubject;
        }
        $_iPrefixLengthToKeep = $iAllowedCharacterLength - 33;
        $_sPrefixToKeep = substr($sSubject, 0, $_iPrefixLengthToKeep - 1);
        return $_sPrefixToKeep . '_' . md5($sSubject);
    }