added the WIP company head shortcut and a menu for editing company stuff, instead of the user profile.
This commit is contained in:
@@ -18,6 +18,7 @@ class Partnerexpo_Core_User_Fields extends Partnerexpo_Core {
|
||||
}
|
||||
|
||||
private function activate_fields() {
|
||||
$this->loader->add_action( 'load-profile.php', $this, 'remove_custom_user_fields' );
|
||||
$this->loader->add_action( 'show_user_profile', $this, 'add_custom_user_fields' );
|
||||
$this->loader->add_action( 'edit_user_profile', $this, 'add_custom_user_fields' );
|
||||
$this->loader->add_action( 'personal_options_update', $this, 'save_custom_user_fields' );
|
||||
@@ -26,8 +27,14 @@ class Partnerexpo_Core_User_Fields extends Partnerexpo_Core {
|
||||
$this->loader->add_action( 'register_form', $this, 'registration_form' );
|
||||
$this->loader->add_filter( 'registration_errors', $this, 'registration_errors', 10, 3 );
|
||||
$this->loader->add_filter( 'comment_post', $this, 'validate_comment' );
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function remove_custom_user_fields() {
|
||||
remove_all_actions('show_user_profile');
|
||||
remove_all_actions('edit_user_profile');
|
||||
}
|
||||
|
||||
public function add_custom_user_fields( $user ) {
|
||||
$company = get_user_meta( $user->ID, 'company', true );
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user