cipf added css to hide parts of user profil when fipf see them
This commit is contained in:
38
plugins/cipf_plugin/php/admin_user_profil.php
Normal file
38
plugins/cipf_plugin/php/admin_user_profil.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* it means someone outside wp is accessing the file, in this case kill it.
|
||||
*/
|
||||
if (!defined('ABSPATH')) {
|
||||
die('You can not access this file!');
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* 278 : ../../../wordpress_docker/volumes/wp_volume/wp-admin/user-edit.php
|
||||
* 157 : ../../../wordpress_docker/volumes/wp_volume/wp-admin/user-edit.php
|
||||
*
|
||||
function admin_user_profil_css_CIPF($user_id) {
|
||||
*/
|
||||
function admin_user_profil_css_CIPF() {
|
||||
Plgntls::debug_infos();
|
||||
$role_fipf = Plgntls::ROLE_FIPF;
|
||||
|
||||
if (!current_user_can($role_fipf)) {
|
||||
return;
|
||||
}
|
||||
|
||||
Plgntls::add_to_front(array('css/fipf_user_profile.css'));
|
||||
}
|
||||
//add_action('edit_user_profile_update', 'admin_user_profil_css_CIPF');
|
||||
add_action('user_edit_form_tag', 'admin_user_profil_css_CIPF');
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
@@ -91,4 +91,5 @@ function restrict_admin_access_CIPF() {
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user