inc2734/wp-profile-box

WordPress 添加个人资料框的库。

2.5.0 2023-08-09 01:37 UTC

README

CI Latest Stable Version License

安装

$ composer require inc2734/wp-profile-box

如何使用

<?php
new \Inc2734\WP_Profile_Box\Bootstrap();

// shortcode
[wp_profile_box title="(Optional)" user_id="(Optional)"]

个人资料框没有样式。因此您需要创建 CSS。

支持社交账号

  • Twitter
  • X
  • Facebook
  • Instagram
  • Pinterest
  • YouTube
  • LinkedIn
  • WordPress
  • Tumblr
  • amazon
  • LINE

过滤钩子

inc2734_wp_profile_box_sns_accounts

/**
 * Customize sns accounts
 *
 * @param $accounts array
 * @return array
 */
add_filter(
	'inc2734_wp_profile_box_sns_accounts',
	function( $accounts ) {
		return $accounts;
	}
);

inc2734_wp_profile_box_avatar_size

/**
 * Customizer avatar size
 *
 * @param $size
 * @return $size
 */
add_filter(
	'inc2734_wp_profile_box_avatar_size',
	function( $size ) {
		return $size;
	}
);