This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_shortcode( 'verify_user_pass', 'wp_doin_verify_user_pass' ); | |
/** | |
* Shortcode which is used to cover Gravity Forms shortcode. It will not render the password | |
* reset form in case of invalid pass. | |
* | |
* @shortcode verify user pass | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'init', 'wp_doin_verify_user_key', 999 ); | |
/** | |
* Check if the user has hit the proper rest password page. The check is identical to that | |
* from wp-login.php, hence extra $_GET['method'] parameter was included to exclude redirects | |
* from wp-login.php file on standard password reset method. | |
* | |
* @hook wp_head |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( "gform_pre_submission_2", "wp_doin_pre_submission_2" ); | |
/** | |
* | |
* @param type $form | |
* @return type | |
*/ | |
function wp_doin_pre_submission_2($form) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// remember, the hook suffix, should contain the form id! | |
add_filter( "gform_field_validation_2", 'wp_doin_validation_2', 10, 4 ); | |
/** | |
* Let's verify for the user email or username provided | |
* | |
* @return ARRAY_A | |
*/ | |
function wp_doin_validation_2($result, $value, $form, $field) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( "gform_confirmation_3", "cc_confirmation_redirect_1_3", 3, 4 ); | |
/** | |
* Redirect the visitor on successful form submission | |
* @hook gform_confirmation | |
*/ | |
function cc_confirmation_redirect_1_3($confirmation, $form, $lead, $ajax) { | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'allowed_redirect_hosts', 'wp_doin_allowed_redirect_hosts', 10 ); | |
/** | |
* Make sure that external host is allowed | |
* @hook allowed_redirect_hosts | |
*/ | |
function wp_doin_allowed_redirect_hosts($content) { | |
$content[] = 'http://example.com'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( "gform_field_input", "checkbox_input", 10, 5 ); | |
/** | |
* Filter the input to be a differently structured checkbox input | |
* | |
* @hook gform_field_input | |
*/ | |
function checkbox_input($input, $field, $value, $lead_id, $form_id) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
192.168.50.4 vvv # VAGRANT: 261e6769cd1d45a39a0beee72dc0fb96 (default) / 79059bfa-4f34-49c6-bfcb-5d27a0c1c466 | |
192.168.50.4 sobel.dev # VAGRANT: 261e6769cd1d45a39a0beee72dc0fb96 (default) / 79059bfa-4f34-49c6-bfcb-5d27a0c1c466 | |
192.168.50.4 supply.dev # VAGRANT: 261e6769cd1d45a39a0beee72dc0fb96 (default) / 79059bfa-4f34-49c6-bfcb-5d27a0c1c466 | |
192.168.50.4 test.dev # VAGRANT: 261e6769cd1d45a39a0beee72dc0fb96 (default) / 79059bfa-4f34-49c6-bfcb-5d27a0c1c466 | |
192.168.50.4 vvv.dev # VAGRANT: 261e6769cd1d45a39a0beee72dc0fb96 (default) / 79059bfa-4f34-49c6-bfcb-5d27a0c1c466 | |
192.168.50.4 local.wordpress.dev # VAGRANT: 261e6769cd1d45a39a0beee72dc0fb96 (default) / 79059bfa-4f34-49c6-bfcb-5d27a0c1c466 | |
192.168.50.4 local.wordpress-trunk.dev # VAGRANT: 261e6769cd1d45a39a0beee72dc0fb96 (default) / 79059bfa-4f34-49c6-bfcb-5d27a0c1c466 | |
192.168.50.4 src.wordpress-develop.dev # VAGRANT: 261e6769cd1d45a39a0beee72dc0fb96 (default) / 79059bfa-4f34-49c6-bfcb-5d27a0c1c466 | |
192.168.50.4 build.wordpress-develop.dev # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wp plugin activate --all | |
wp theme activate {name_of_our_theme} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd d: | |
cd xampp | |
cd htdocs | |
mkdir test_site | |
cd test_site | |
git clone git_repo_url.git | |
wp core download --allow-root | |
wp core config --dbname="test" --dbuser=wp --dbpass=wp --dbhost="localhost" --allow-root | |
wp core install --url=test.dev --title="test - A WordPress Site" --admin_user=admin --admin_password=password [email protected] --allow-root |