関数
MemberEditPage::allowLoginSetting( string $formtag, string $type, string $data )
Prepends Amazon allow login option to member information edit table
パラメータ パラメータ
- $formtag
(文字列) (必須)
- $type
(文字列) (必須)
- $data
(文字列) (必須)
ファイル: src/Views/MemberEditPage/MemberEditPage.php
public function allowLoginSetting($formtag, $type, $data) { global $usces; $url = ''; if (isset($_SERVER['REQUEST_URI'])) { $url = esc_url_raw(wp_unslash($_SERVER['REQUEST_URI'])); } if (!$usces->is_member_page($url)) { return $formtag; } if (!$usces->is_member_logged_in()) { return $formtag; } $semantic = new Semantic(); $semantic->loadButtonCss(); $semantic->loadLoaderCss(); $semantic->loadIconCss(); $semantic->loadTransitionCss(); $semantic->loadPopupCss(); $semantic->loadSemanticJS(); wp_enqueue_script( self::COMP_JS_SLUG, WCEXAAP_PLUGIN_URL . '/dist/amazonSyncLogin.js', [Semantic::JS_SLUG], WCEXAAP_VERSION, true ); wp_set_script_translations(self::COMP_JS_SLUG, 'wcexaap', WCEXAAP_LANGDIR); wp_localize_script( self::COMP_JS_SLUG, AmazonPay::L10N, array_merge( $this->module->getScriptInjectionVariables(), [ 'synced' => (new MemberMeta((int)$_SESSION['usces_member']['ID']))->getAllowAmazonToWelcartLogin(), ] ) ); return '<div id="' . AmazonPay::VUE_APP_MOUNT_EL . '"></div>' . $formtag; }