init commit

This commit is contained in:
zino
2021-02-16 23:07:41 +01:00
parent ec3fc78e0f
commit 12b4ef5db4
5000 changed files with 2596132 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
<?php
add_action( 'wp_enqueue_scripts', 'my_getUserInfo' );
function my_getUserInfo() {
if (!is_user_logged_in()) {
return;
}
if(page_id() === 2) {
global $current_user;
wp_get_current_user();
js_manipulate($current_user);
}
}
function js_manipulate($current_user) {
?>
<script>
// START JAVASCRIPT
document.addEventListener("DOMContentLoaded", function(event) {
const email = "<?php echo $current_user->user_email ?>";
jQuery('#textLoggedInAs .fl-rich-text p').ready(function() {
jQuery("#textEmail .fl-rich-text")[0].textContent = email;
});
});
// END JAVASCRIPT
</script>
<?php
}