/** Beecee Function to get User First Name */ function FN_get_current_userfirstname() { $current_user = wp_get_current_user(); return $current_user->user_firstname; } add_shortcode(‘SC_current_userFirstname’, ‘FN_get_current_userfirstname’);Continue reading
/** Beecee Function to get User First Name */ function FN_get_current_userfirstname() { $current_user = wp_get_current_user(); return $current_user->user_firstname; } add_shortcode(‘SC_current_userFirstname’, ‘FN_get_current_userfirstname’);Continue reading
function FN_display_administrators_group_ids() { global $wpdb; $user_id = get_current_user_id(); $is_group_leader = learndash_is_group_leader_user($user_id); if ($is_group_leader) { $group_ids = learndash_get_administrators_group_ids( $user_id ); if (empty($group_ids)) { return “No groups found.”; } $output = ‘ ‘; foreach ($group_ids as $group_id) { $output .= ‘ ‘…Continue reading
function FN_GroupLeader_Forms_UserList() { $current_user_id = get_current_user_id(); if (learndash_is_group_leader_user($current_user_id)) { // Get the current user’s group IDs $group_ids = learndash_get_administrators_group_ids($current_user_id); // Build the droplist of users $output = ”; $output .= ‘Select a user:‘; $output .= ”; foreach ($group_ids as $group_id)…Continue reading
function FN_display_user_roles() { $user_id = get_current_user_id(); $is_admin = learndash_is_admin_user($user_id); $is_group_leader = learndash_is_group_leader_user($user_id); $output = ”; if ($is_admin && $is_group_leader) { $output = ‘This user is both an administrator and a group leader.’; } elseif ($is_admin) { $output = ‘This user…Continue reading
function FN_GroupLeader_user_shortcode() { $current_user_id = get_current_user_id(); if (learndash_is_group_leader_user($current_user_id)) { // Get the current user’s group IDs $group_ids = learndash_get_administrators_group_ids( $current_user_id ); // Build the list of users $output = ‘ ‘; foreach ($group_ids as $group_id) { // Get the list…Continue reading
// Remove User Enrolled in Groupe function remove_website_row_enrolled_in_group_css() { if ( ! current_user_can( ‘administrator’ ) ) { echo ‘tr.user-rich-editing-wrap{ display: none; }’; echo ‘tr.user-admin-color-wrap{ display: none; }’; echo ‘tr.user-comment-shortcuts-wrap{ display: none; }’; echo ‘tr.user-admin-bar-front-wrap{ display: none; }’; echo ‘tr.user-language-wrap{ display:…Continue reading
/** * Custom shortcode to display WPForms form entries in non-table view. * * Basic usage: [wpforms_entries_table id=”FORMID”]. * * Possible shortcode attributes: * id (required) Form ID of which to show entries. * user User ID, or “current” to…Continue reading
/** Beecee Function to get User First Name */ function get_current_userfirstname() { $current_user = wp_get_current_user(); return $current_user->user_firstname; } add_shortcode(‘current_userFirstname’, ‘get_current_userfirstname’);Continue reading
// Remove side menu add_action( ‘admin_menu’, function () { remove_menu_page( ‘edit.php’ ); } ); // Remove +New post in top Admin Menu Bar add_action( ‘admin_bar_menu’, function ( $wp_admin_bar ) { $wp_admin_bar->remove_node( ‘new-post’ ); }, 999 ); // Remove Quick Draft…Continue reading