BP_Reply_By_Email_Parser::get_querystring PHP Метод

get_querystring() публичный статический Метод

In IMAP mode: [email protected]> -> THEQUERYSTRING In Inbound mode: [email protected] -> THEQUERYSTRING The querystring is encoded by default.
public static get_querystring ( string $address = '' ) : mixed
$address string The email address containing the address tag
Результат mixed Either the address tag on success or false on failure
    public static function get_querystring($address = '')
    {
        if (empty($address)) {
            return false;
        }
        $at = strpos($address, '@');
        if ($at === false) {
            return false;
        }
        // inbound mode uses subdomain addressing
        if (bp_rbe_is_inbound()) {
            $qs = substr($address, 0, $at);
            // imap mode uses address tags
        } else {
            $tag = strpos($address, bp_rbe_get_setting('tag'));
            if ($tag === false) {
                $qs = false;
            } else {
                $qs = substr($address, ++$tag, $at - $tag);
            }
        }
        /**
         * Filter the querystring from an email address.
         *
         * @since 1.0-RC4
         *
         * @param string|false $qs      Current querystring.
         * @param string       $address Full 'to' email address.
         */
        return apply_filters('bp_rbe_get_querystring', $qs, $address);
    }