Skip to content

Instantly share code, notes, and snippets.

View daniloalvess's full-sized avatar
🏠
Working from home

Danilo Alves daniloalvess

🏠
Working from home
  • Governador Valadares, MG, Brasil
View GitHub Profile
<?php
add_filter( 'lostpassword_url', array( $this, 'add_args_to_lostpassword_url' ), 10, 2 );
add_filter( 'login_url', array( $this, 'add_args_to_login_url' ), 10, 3 );
add_filter( 'lostpassword_redirect', array( $this, 'add_args_to_lostpassword_redirect_url' ), 10, 1 );
public function add_args_to_lostpassword_redirect_url( $url ) {
if ( $this->valid_blocked_user_id ) {
$url = empty( $url ) ? wp_login_url() : $url;
$url = add_query_arg(
array(
@daniloalvess
daniloalvess / gist:9a0798b2407980d83ff53c77558758b7
Created April 1, 2019 13:56
Carregar vhosts automaticamente sem necessidade de editar /etc/hosts
# Steps:
# 1: Create file on etc/NetworkManager/dnsmasq.d
# 2: Filename example loc-tld
# 3: Restart system
local=/loc/
address=/loc/127.0.0.1