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 |
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 user list |
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 | |
// change the number suffix to the one corresponding to your form and field's id! | |
add_filter( 'gform_field_validation_1_1', 'wp_doin_validate_password_field', 10, 4 ); | |
/** | |
* @hook gform_field_validation_4 | |
* | |
* This function is assigned to the old password field, and then iterates over all form fields | |
* if it hits a field with the pass-confirm class assigned it then compares it's value |
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 | |
// make sure to change 5he prefix to the one you are using with your forms | |
add_action( "gform_pre_submission_4", "wp_doin_edit_pre_submission" ); | |
/** | |
* @hook gform_pre_submission_4 | |
*/ | |
function wp_doin_edit_pre_submission( $form ) { |