cipf added css to hide parts of user profil when fipf see them
This commit is contained in:
@@ -4,7 +4,7 @@ Plugin Name: hggg_cipf
|
|||||||
Plugin URI:
|
Plugin URI:
|
||||||
Description:
|
Description:
|
||||||
Author: hugogogo
|
Author: hugogogo
|
||||||
Version: 0.5.0
|
Version: 0.5.1
|
||||||
Author URI:
|
Author URI:
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -50,6 +50,8 @@ include_once(Plgntls::root_path() . 'php/display_css.php');
|
|||||||
include_once(Plgntls::root_path() . 'php/payments.php');
|
include_once(Plgntls::root_path() . 'php/payments.php');
|
||||||
include_once(Plgntls::root_path() . 'php/random_posts.php');
|
include_once(Plgntls::root_path() . 'php/random_posts.php');
|
||||||
|
|
||||||
|
include_once(Plgntls::root_path() . 'php/admin_user_profil.php');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
34
plugins/cipf_plugin/css/fipf_user_profile.css
Normal file
34
plugins/cipf_plugin/css/fipf_user_profile.css
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
/*
|
||||||
|
* [/] Options personnelles,
|
||||||
|
* [/] À propos du compte,
|
||||||
|
* [/] Mots de passe d’application,
|
||||||
|
* [/] Login/Signup
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
*/
|
||||||
|
form#your-profile h2:has(+ .form-table .user-rich-editing-wrap),
|
||||||
|
form#your-profile .form-table:has(.user-rich-editing-wrap) {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
*/
|
||||||
|
form#your-profile h2:has(+ .form-table .user-description-wrap),
|
||||||
|
form#your-profile .form-table:has(.user-description-wrap) {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
*/
|
||||||
|
form#your-profile #application-passwords-section {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
*/
|
||||||
|
form#your-profile h2:has(+ .form-table.xoo-aff-form-table),
|
||||||
|
form#your-profile .form-table.xoo-aff-form-table {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
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() {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ Plugin Name: hggg_custer
|
|||||||
Plugin URI:
|
Plugin URI:
|
||||||
Description: customize user : output infos on page, on email, and change current user id momentarly
|
Description: customize user : output infos on page, on email, and change current user id momentarly
|
||||||
Author: hugogogo
|
Author: hugogogo
|
||||||
Version: 0.2.0
|
Version: 0.2.1
|
||||||
Author URI:
|
Author URI:
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -59,18 +59,18 @@ function format_user_info($query, $current_user, $user_id, $if_empty = '') {
|
|||||||
* return author page url
|
* return author page url
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
if ($query === '__author_page__') {
|
if ($query === '__author_page_url__') {
|
||||||
$output = get_author_posts_url($user_id);
|
$output = get_author_posts_url($user_id);
|
||||||
return \CUSTER\return_result($output);
|
return \CUSTER\return_result($output);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* if is special query __user_post__
|
* if is special query __user_post_url__
|
||||||
* return author page url
|
* return author page url
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
if ($query === '__user_post__') {
|
if ($query === '__user_post_url__') {
|
||||||
$output = \CUSTER\find_user_post_url($user_id);
|
$output = \CUSTER\find_user_post_url($user_id);
|
||||||
return \CUSTER\return_result($output);
|
return \CUSTER\return_result($output);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user