
使用MAMP时如何修复“此站点无法提供安全连接”错误
wp_get_user_contact_methods ( $user = null )
wp_get_user_contact_methods: 这个函数检索一个用户联系方法的数组。它返回一个包含用户联系方法的数组,这些方法用于在用户资料页面显示用户的联系信息。
设置用户的联系方法。
在3.6版本中删除了默认的联系方法。一个过滤器决定了联系方法。
function wp_get_user_contact_methods( $user = null ) { $methods = array(); if ( get_site_option( 'initial_db_version' ) < 23588 ) { $methods = array( 'aim' => __( 'AIM' ), 'yim' => __( 'Yahoo IM' ), 'jabber' => __( 'Jabber / Google Talk' ), ); } /** * Filters the user contact methods. * * @since 2.9.0 * * @param string[] $methods Array of contact method labels keyed by contact method. * @param WP_User|null $user WP_User object or null if none was provided. */ return apply_filters( 'user_contactmethods', $methods, $user ); }