pgintro.net

WordPressプラグイン - 「Contact Form 7」

作成日時:2019/01/03

更新日時:2019/01/03

スポンサーリンク

この記事の確認環境

WordPress 5.0.2

Contact Form 7 バージョン 5.1.1

プラグイン概要

コンタクトフォームを簡単に作成、管理が行えます。

プラグイン公式サイト

https://ja.wordpress.org/plugins/contact-form-7/

https://contactform7.com/ja/

ファイル一覧

アクションフック一覧

設定ファイルフック種類関数
admin.phpadmin_initwpcf7_admin_init
admin.phpadmin_menuwpcf7_admin_menu
admin.php'load-' . $editwpcf7_load_contact_form_admin
admin.php'load-' . $addnewwpcf7_load_contact_form_admin
admin.php'load-' . $integrationwpcf7_load_integration_page
admin.phpadmin_enqueue_scriptswpcf7_admin_enqueue_scripts
admin.phpdoing_dark_modewpcf7_dark_mode_support
admin.phpwpcf7_admin_noticeswpcf7_admin_updated_message
admin.phpwpcf7_admin_warningswpcf7_old_wp_version_error
admin.phpwpcf7_admin_warningswpcf7_not_allowed_to_edit
config-validator.phpwpcf7_admin_menuwpcf7_admin_init_bulk_cv
config-validator.phpwpcf7_admin_warningswpcf7_admin_warnings_bulk_cv
config-validator.phpwpcf7_admin_loadwpcf7_load_bulk_validate_page
welcome-panel.phpwp_ajax_wpcf7-update-welcome-panelwpcf7_admin_ajax_welcome_panel
controller.phpparse_requestwpcf7_control_init'
controller.phpwp_enqueue_scriptswpcf7_do_enqueue_scripts
controller.phpwp_enqueue_scriptswpcf7_html5_fallback
mail.phpphpmailer_initwpcf7_phpmailer_init
rest-api.phprest_api_initwpcf7_rest_api_init
upgrade.phpwpcf7_upgradewpcf7_convert_to_cpt
upgrade.phpwpcf7_upgradewpcf7_prepend_underscore
acceptance.phpwpcf7_initwpcf7_add_form_tag_acceptance
acceptance.phpwpcf7_admin_initwpcf7_add_tag_generator_acceptance
checkbox.phpwpcf7_initwpcf7_add_form_tag_checkbox
checkbox.phpwpcf7_admin_initwpcf7_add_tag_generator_checkbox_and_radio
constant-contact.phpwpcf7_initwpcf7_constant_contact_register_service
constant-contact.phpwpcf7_submitwpcf7_constant_contact_submit
constant-contact.phpwpcf7_admin_initWPCF7_ConstantContact::auth_redirect
count.phpwpcf7_initwpcf7_add_form_tag_count
date.phpwpcf7_initwpcf7_add_form_tag_date
date.phpwpcf7_admin_initwpcf7_add_tag_generator_date
file.phpwpcf7_initwpcf7_add_form_tag_file
file.phpwpcf7_admin_initwpcf7_add_tag_generator_file
file.phpwpcf7_admin_warningswpcf7_file_display_warning_message
file.phptemplate_redirectwpcf7_cleanup_upload_files
flaming.phpwpcf7_submitwpcf7_flamingo_submit
flaming.phpwpcf7_after_updatewpcf7_flamingo_update_channel
hidden.phpwpcf7_initwpcf7_add_form_tag_hidden
number.phpwpcf7_initwpcf7_add_form_tag_number
number.phpwpcf7_admin_initwpcf7_add_tag_generator_number
quiz.phpwpcf7_initwpcf7_add_form_tag_quiz
quiz.phpwpcf7_admin_initwpcf7_add_tag_generator_quiz
really-simple-captcha.phpwpcf7_initwpcf7_add_form_tag_captcha
really-simple-captcha.phpwpcf7_admin_initwpcf7_add_tag_generator_captcha
really-simple-captcha.phpwpcf7_admin_warningswpcf7_captcha_display_warning_message
really-simple-captcha.phptemplate_redirectwpcf7_cleanup_captcha_files
recaptcha.phpwpcf7_initwpcf7_recaptcha_register_service
recaptcha.phpwp_enqueue_scriptswpcf7_recaptcha_enqueue_scripts
recaptcha.phpwp_footerwpcf7_recaptcha_onload_script
recaptcha.phpwpcf7_initwpcf7_recaptcha_add_form_tag_recaptcha
recaptcha.phpwpcf7_upgradewpcf7_upgrade_recaptcha_v2_v3
recaptcha.phpwpcf7_admin_menuwpcf7_admin_init_recaptcha_v2_v3
recaptcha.phpwpcf7_admin_warningswpcf7_admin_warnings_recaptcha_v2_v3
response.phpwpcf7_initwpcf7_add_form_tag_response
select.phpwpcf7_initwpcf7_add_form_tag_select
select.phpwpcf7_admin_initwpcf7_add_tag_generator_menu
submit.phpwpcf7_initwpcf7_add_form_tag_submit
submit.phpwpcf7_admin_initwpcf7_add_tag_generator_submit
text.phpwpcf7_initwpcf7_add_form_tag_text
text.phpwpcf7_admin_initwpcf7_add_tag_generator_text
textarea.phpwpcf7_initwpcf7_add_form_tag_textarea
textarea.phpwpcf7_admin_initwpcf7_add_tag_generator_textarea
settings.phpplugins_loadedwpcf7
settings.phpinitwpcf7_init
settings.phpadmin_initwpcf7_upgrade
settings.php'activate_' . WPCF7_PLUGIN_BASENAMEwpcf7_install

フィルターフック一覧

フック種類関数
--

関数一覧

関数名概要
--

使用テーブル一覧

テーブル名概要
wp_options-
wp_postmetaupdate_post_meta()を使用。
wp_postswp_insert_post()を使用。コンタクトフォームの管理に使用しています。

オプション一覧

「update_option()」,「get_option()」を使用して「wp_options」テーブルに設定値を格納しています。

キー説明
wpcf7本プラグインのオプションが全て含まれているオブジェクトです。

「wp_options」テーブルの「option_name」カラムの値が「wpcf7」のレコードの「option_value」カラムに格納されている値の例

a:2:{
  s:7:"version";
  s:5:"5.1.1";
  s:13:"bulk_validate";
  a:4:{
    s:9:"timestamp";
    d:1546528423;
    s:7:"version";
    s:5:"5.1.1";
    s:11:"count_valid";
    i:1;
    s:13:"count_invalid";
    i:0;
  }
}

上記の値をget_option()関数で取得した戻り値のダンプ

Array
(
  [version] => 5.1.1
  [bulk_validate] => Array
    (
      [timestamp] => 1546528423
      [version] => 5.1.1
      [count_valid] => 1
      [count_invalid] => 0
    )

)

ショートコード一覧

add_shortcode()関数で追加

ショートコード説明
contact-form-7コンタクトフォームを表示する。