// Redirect users after login based on their roles function custom_mepr_login_redirect_url($url, $user) { // Check if the user object is valid if (isset($user->roles) && is_array($user->roles)) { // Roles that should be redirected to the WordPress dashboard $admin_roles = array(‘administrator’, ‘editor’,…Continue reading
// Redirect users after login based on their roles function custom_mepr_login_redirect_url($url, $user) { // Check if the user object is valid if (isset($user->roles) && is_array($user->roles)) { // Roles that should be redirected to the WordPress dashboard $admin_roles = array(‘administrator’, ‘editor’,…Continue reading
function mepr_disable_auto_login($auto_login, $membership_id, $mepr_user) { return false; } add_filter(‘mepr-auto-login’, ‘mepr_disable_auto_login’, 10, 3);Continue reading
function exclude_ml_file_from_search( $query ) { // Check if it is not an admin page, is a search query, and is the main query if ( !$query->is_admin && $query->is_search && $query->is_main_query() ) { // Exclude the ‘mpdl-file’ post type from the…Continue reading
// * CodeSnippet Name: Fluent Community Modification // * Description: A custom Code for Fluent Community plugin // * Author: InKontaktBringer Team – Sumaiya // * Author URI: https://www.inkontaktbringer.de/linktree add_action(‘fluent_community/portal_head’, function() { ?>Continue reading
remove_filter( ‘authenticate’, ‘wp_authenticate_email_password’, 20 );Continue reading
add_filter( ‘use_widgets_block_editor’, ‘__return_false’ );Continue reading
/** * Lock user out after a period of inactivity with customizable timeout and warning notification. */ // Add settings to WordPress for inactivity timeout add_action(‘admin_init’, ‘register_inactivity_timeout_setting’); function register_inactivity_timeout_setting() { register_setting(‘general’, ‘inactivity_timeout’, [ ‘type’ => ‘integer’, ‘description’ => ‘Inactivity timeout…Continue reading
function mepr_order_bumps_desc() { ?>Continue reading
function mepr_limit_phone_digits( $errors ) { $phone = isset( $_POST[‘mepr_phone_number’] ) ? sanitize_text_field(trim($_POST[‘mepr_phone_number’])) : ”; // Remove all non-numeric characters from the phone number. $phone = preg_replace(“/[^0-9]/”, “”, $phone); // Check if phone digits equal 11 if (strlen($phone) != 11) {…Continue reading