Change pour : Current Logged In User Is sebastienukoo-fr

Home » Snippets » Change pour : Current Logged In User Is sebastienukoo-fr
0

Created with:

Visibility: 

public

Creator: RD4U

Customize with WPTurbo AI
X

Add Snippet To Project

New Project
Add To Existing Project
					<?php
function wpturbo_custom_gutenberg_styles() {
    $current_user_email = 'sebastien@ukoo.fr';

    if (is_user_logged_in() && wp_get_current_user()->user_email === $current_user_email) {
        echo '<style>
            /* Your custom styles for the user sebastien@ukoo.fr here... */
        </style>';
    }
}
add_action('admin_head', 'wpturbo_custom_gutenberg_styles', 100);
				

Explanation:

In the updated code, I have modified the variable name from $user_email to $current_user_email to make it more descriptive. I have also updated the value to 'sebastien@ukoo.fr' to match the requested change.

The if condition checks if the user is logged in and if the current user's email matches the specified email. If both conditions are true, the custom styles will be echoed inside the <style> tags.

Remember to replace the comment /* Your custom styles for the user sebastien@ukoo.fr here... */ with your actual custom styles for the user "sebastien@ukoo.fr".

Please make sure to test the code on your end to ensure it works as expected. Let me know if you need any further assistance!

Register an account to save your snippets or go Pro to get more features.