表示

プラグインのメインオプション画面の該当する投稿タイプでコンテンツの制限を有効にしている場合、制限されているコンテンツの代わりにこのフォームが表示されます。

このフォームはショートコード [wpmem_form login]を使用して直接表示することができます。

原文を見る

This form will display in place of blocked content if enabled for that post type in the plugin’s main options.

This form can be displayed directly using the shortcode [wpmem_form login]

https://rocketgeek.com/plugins/wp-members/docs/customizing-forms/login-form/

HTML

ログインフォームはブロックされたコンテンツの代わりに表示されたり [wpmem_form login] ショートコードを使った場合に表示されますが、その時に生成されるデフォルトの HTML マークアップはフォームを作成するのに使用する関数 でフィルターを使って変更することができます。

原文を見る

The default HTML markup that is generated when the login form is displayed either in place of blocked content or from the [wpmem_form login] shortcode can be changed by the use of filters in the functions used to create the form.

https://rocketgeek.com/plugins/wp-members/docs/customizing-forms/login-form/

フィルター

ログインフォームのテキストとHTMLはフォームの構築処理中に実行される様々なフィルターによって変更できます。

wpmem_login_form_defaults

以下のようなフォームの様々な既定値をフィルタリングできます:

  • フォームの見出し
  • フォームのアクション
  • フォームの送信ボタンのテキスト
  • リダイレクト
  • 入力欄の見出し、型、CSSクラス

wpmem_login_form_args 
フォームの既定値の一部をフィルタリングします。これらのほとんどはHTMLタグであり、WP-Members CSS 以外のカスタムCSSを使用している場合はそれらのタグをフィルタリングおよび変更してカスタム属性を設定できます。またform タグと button タグに割り当てられた特定の ID とクラスもフィルタリングします。 WP_Members_Forms::login_form() で実行します。

wpmem_login_form_rows
フォーム内の各行を構築するコンポーネントをフィルタリングします (ログインフォームの場合だとユーザー名とパスワードの2 つの行があります)。行はフォーム用のHTMLを組み立てるための情報を含む数値配列です。これにはラベルタグ、入力前のHTML、入力フィールドタグ、および行をラップする HTML が含まれます。WP_Members_Forms::login_form()で実行します。

wpmem_login_hidden_fields
フォーム内の非表示フィールドのHTMLをフィルタリングします。WP_Members_Forms::login_form()で実行します。

wpmem_login_form_button_rows
ログインフォームが表示される時に「ログイン状態を保存する」フィールドを送信ボタンとは別にフィルタリングできるようにします。他の全ての短いフォームの場合、通常これには送信ボタンのみが含まれます。さらにHTML入力を配列に追加できます (フォームクリアボタンなど)。

wpmem_login_form_buttons
フォームのボタン領域のHTMLをフィルタリングします。注意: ボタンのテキストを変更したい場合は、wpmem_inc_login_args を使用して変更します。WP_Members_Forms::login_form()で実行します。

wpmem_forgot_link
パスワードを忘れた場合のリンクで使用されるURL をフィルタリングします。WP_Members_Forms::login_form()で実行します。

wpmem_forgot_link_str 
パスワードを忘れた場合のリンクを文字列としてフィルタリングします。WP_Members_Forms::login_form()で実行します。

wpmem_reg_link 
ユーザー登録用リンクで使用されるURLをフィルタリングします。WP_Members_Forms::login_form()で実行します。

wpmem_reg_link_str 
ユーザー登録用リンクを文字列としてフィルタリングします。WP_Members_Forms::login_form()で実行します。

wpmem_login_form_before  
このフィルターを使用するとフォームの前に表示するHTMLを追加できます。 これは古いフィルターなので通常は使用されません。 古いバージョンとの互換性を保つために残っています。WP_Members_Forms::login_form()で実行します。

wpmem_login_form 
全てが組み立てられた後、生成されたフォームのHTMLをフィルタリングします。前述のフィルター達を使うことで特定のテキストやHTML タグやCSS スタイルに使用される可能性のあるプロパティを直接制御できるため、このフィルターは通常は使用されません。ですがより大きな変更が必要な場合には役立つかもしれません。WP_Members_Forms::login_form()で実行します。

原文を見る

Text and HTML in the login form can be changed by various filters that run during the process of building the form.

wpmem_login_form_defaults

Allows you to filter various defaults for the form including:

  • Form heading
  • Form action
  • Form submit button text
  • Redirect
  • Input labels, type, and CSS class

wpmem_login_form_args 
Filters some of the defaults for the form. Most of these are HTML tags that can be filtered and changed in order to set up custom attributes if you are tying into specific CSS other than WP-Members CSS.  Also filters specifc IDs and classes assigned to the form tag and the button tag.  Runs in WP_Members_Forms::login_form().

wpmem_login_form_rows
Filters components that will build each row in the form (for the login form there are 2 rows – username and password).  Rows are a numeric array containing information to assemble the HTML for the form.  This includes the label tag, HTML that comes before the input, the input field tag, and any HTML wrapping the row.  Runs in WP_Members_Forms::login_form().

wpmem_login_hidden_fields
Filters the HTML for hidden fields in the form.  Runs in WP_Members_Forms::login_form().

wpmem_login_form_button_rows
Allows the “remember me” field to be able to be filtered separately from the submit button when the login form is displayed. For all other short forms, this will generally only contain the submit button. Additional HTML inputs can be added to the array (such as a clear form button).

wpmem_login_form_buttons
Filters the HTML for the form button area.  NOTE: if you want to change the button text, do that with wpmem_inc_login_args.  Runs in WP_Members_Forms::login_form().

wpmem_forgot_link
Filters the forgot password URL used in the forgot password link.  Runs in WP_Members_Forms::login_form().

wpmem_forgot_link_str 
Filters the forgot password link as a string.   Runs in WP_Members_Forms::login_form().

wpmem_reg_link 
Filters the register URL used in the register link.  Runs in WP_Members_Forms::login_form().

wpmem_reg_link_str 
Filters the register  link as a string.   Runs in WWP_Members_Forms::login_form().

wpmem_login_form_before  
This filter allows you to add HTML to display before the form.  This is an older filter and is generally not used.  It remains in the plugin for legacy purposes.  Runs in WP_Members_Forms::login_form().

wpmem_login_form 
Filters the generated form HTML once all of it has been assembled.  This filter generally is not used as the previous filters allow direct control over specific text, HTML tags, and properties that might be used for CSS styles.  However, it may be helpful in cases where a larger change may be necessary.  Runs in WP_Members_Forms::login_form().

https://rocketgeek.com/plugins/wp-members/docs/customizing-forms/login-form/

関数

wpmem_login_form();

この関数はログインフォームを表示するのに使用できます。見出しや使用する HTML の一部やフォームのフィールド情報を設定し、最終的にフォームのHTML を組み立てる関数を実行します。実行が完了するとフォーム用のHTML文字列が返されます(上記を参照)。
[関数を見る]

原文を見る
wpmem_login_form();

This function can be used to display the login form.  It sets up the heading, some of the HTML to be used, form field information, and ultimately runs the function to assemble the form HTML.  Upon completion, it returns a string of HTML for the form (see above).
[view function]

https://rocketgeek.com/plugins/wp-members/docs/customizing-forms/login-form/