register_post

动作钩子
do_action( 'register_post', $sanitized_user_login, $user_email, $errors )
参数
  • (string) $sanitized_user_login The submitted username after being sanitized.
    Required:
  • (string) $user_email The submitted email.
    Required:
  • (WP_Error) $errors Contains any errors with submitted username and email, e.g., an empty field, an invalid username or email, or an existing username or email.
    Required:
定义位置
相关勾子
register_formregisterregister_settingedit_postregister_url
相关方法
register_post_typeregister_post_metaregister_importerunregister_post_metaunregister_post_typeregister_post_status
引入
2.1.0
弃用
-

register_post: 这个动作钩子是用来在WordPress中注册一个文章类型。这个钩子可以用来添加自定义的文章类型或修改现有文章类型的参数。

在提交注册表单数据时,在用户被创建之前触发。

do_action( 'register_post', $sanitized_user_login, $user_email, $errors );

常见问题

FAQs
查看更多 >