関数
LoginPage::appendAddToWishlistFormFields()
Adds wishlist fields to login form, if applicable
戻り値 戻り値
ファイル: src/Views/LoginPage.php
public static function appendAddToWishlistFormFields() { if (!empty($_REQUEST[Redirect::REDIRECT_KEY_ADD_TO_WISHLIST])) { $payload = ''; if (isset($_GET[Redirect::REDIRECT_KEY_ADD_TO_WISHLIST])) { $payload = urlencode($_GET[Redirect::REDIRECT_KEY_ADD_TO_WISHLIST]); } else { $payload = $_REQUEST[Redirect::REDIRECT_KEY_ADD_TO_WISHLIST]; } ?> <input type="hidden" name="<?php echo Redirect::REDIRECT_KEY_ADD_TO_WISHLIST; ?>" value="<?php echo $payload; ?>" /> <?php return; } if (!empty($_REQUEST[Redirect::REDIRECT_KEY_ADD_TO_WISHLIST_BY_SERIAL])) { $encodeflag = false; if (isset($_GET[Redirect::REDIRECT_KEY_ADD_TO_WISHLIST_BY_SERIAL])) { $encodeflag = true; } foreach ((array)$_REQUEST[Redirect::REDIRECT_KEY_ADD_TO_WISHLIST_BY_SERIAL] as $serial) { $payload = $encodeflag === true ? urlencode(wp_unslash($serial)) : wp_unslash($serial); ?> <input type="hidden" name="<?php echo Redirect::REDIRECT_KEY_ADD_TO_WISHLIST_BY_SERIAL; ?>[]" value="<?php echo $payload ?>" /> <?php } } }