add_filter( ‘login_head’, function () { // Update the line below with the URL to your own logo. // Adjust the Width & Height accordingly. $custom_logo = ‘https://bitla.sh/wp-content/uploads/2024/03/Bitlash-Logo-Outline.svg’; $logo_width = 260; $logo_height = 70; printf( ‘ ‘, $custom_logo, $logo_width, $logo_height );…Continue reading
function mepr_rearrange_payment_methods( $payment_methods, $key ) { //Modify the order of the payment methods below according to your needs. You can also remove non needed payment methods $order = array( “PayPal Standard”, “Stripe”, “Authorize.net Profile”, “Offline Payment”, ); $pm_map = array();…Continue reading
function kill_math_on_login() { remove_all_actions( ‘mepr-forgot-password-form’ ); remove_all_actions( ‘mepr-login-form-before-submit’ ); remove_all_filters( ‘mepr-validate-forgot-password’ ); remove_all_filters( ‘mepr-validate-login’ ); } add_action( ‘plugins_loaded’, ‘kill_math_on_login’ );Continue reading
function edd_library_variable_price_dropdown() { function shoestrap_edd_purchase_variable_pricing( $download_id ) { $variable_pricing = edd_has_variable_prices( $download_id ); if ( ! $variable_pricing ) return; $prices = apply_filters( ‘edd_purchase_variable_prices’, edd_get_variable_prices( $download_id ), $download_id ); $type = edd_single_price_option_mode( $download_id ) ? ‘checkbox’ : ‘radio’; do_action( ‘edd_before_price_options’, $download_id…Continue reading
// Agregar el filtro para editar usuarios function limit_edit_users_for_asesor($allcaps, $cap, $args, $user) { // Solo modificar si el usuario tiene el rol ‘asesor’ if (isset($user->roles) && in_array(‘asesor’, $user->roles)) { // Obtener el ID del usuario a editar $user_id_to_edit = isset($args[2])…Continue reading
// Ocultar elementos en el admin para asesores function custom_admin_css_for_asesor() { // Obtén el usuario actual $user = wp_get_current_user(); // Verifica si el usuario tiene el rol ‘asesor’ if (in_array(‘asesor’, (array) $user->roles)) { echo ‘ ‘; } } add_action(‘admin_head’, ‘custom_admin_css_for_asesor’);…Continue reading
// Función que genera la URL de logout function generar_logout_url() { return esc_url( wp_logout_url( home_url() ) ); } // Registro del shortcode [logout_urlx] add_shortcode(‘logout_urlx’, ‘generar_logout_url’);Continue reading
// Función personalizada para enviar el enlace de restablecimiento de contraseña function custom_send_password_reset($user_login) { $user_data = get_user_by(‘login’, $user_login); if (!$user_data) { $user_data = get_user_by(’email’, $user_login); } if (!$user_data) { return new WP_Error(‘invalid_user’, __(‘Invalid username or email.’)); } // Genera la…Continue reading