-
Commit all your changes
-
Remove everything from the repository cache. Go to your repo directory and run this command.
git rm -r --cached .
It will only clear the cache. Your files and git history will stay.
/* | |
* Add our Custom Fields to simple products | |
*/ | |
function mytheme_woo_add_custom_fields() { | |
global $woocommerce, $post; | |
echo '<div class="options_group">'; | |
// Text Field |
$ wp post list --format=ids | xargs wp post update --comment_status=closed | |
# Output: | |
# Success: Updated post 2514. | |
# Success: Updated post 2511. | |
# Success: Updated post 2504. | |
# Success: Updated post 2499. | |
# Success: Updated post 2441. | |
# etc... |
# Sample Nginx config with sane caching settings for modern web development | |
# | |
# Motivation: | |
# Modern web development often happens with developer tools open, e. g. the Chrome Dev Tools. | |
# These tools automatically deactivate all sorts of caching for you, so you always have a fresh | |
# and juicy version of your assets available. | |
# At some point, however, you want to show your work to testers, your boss or your client. | |
# After you implemented and deployed their feedback, they reload the testing page – and report | |
# the exact same issues as before! What happened? Of course, they did not have developer tools | |
# open, and of course, they did not empty their caches before navigating to your site. |
/** | |
* Register hero block | |
*/ | |
add_action('acf/init', 'hero'); | |
function hero() { | |
// check function exists | |
if( function_exists('acf_register_block') ) { | |
// register a hero block |
# This file is: ~/.ssh/config | |
# You may have other (non-CodeCommit) SSH credentials stored in this | |
# config file – in addition to the CodeCommit settings shown below. | |
# NOTE: Make sure to run [ chmod 600 ~/.ssh/config ] after creating this file! | |
# Credentials for Account1 | |
Host awscc-account1 # 'awscc-account1' is a name you pick | |
Hostname git-codecommit.us-east-1.amazonaws.com # This points to CodeCommit in the 'US East' region |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --> | |
<title>Site Title</title> | |
<link rel="stylesheet" href="/assets/css/style.min.css"> |
<?php | |
/** | |
* Update a specific site from 'http://' to 'https://'. | |
* | |
* Only touches the 'home' and 'siteurl' options. | |
* Depending on plugins, etc., you may need to update other options too. | |
* | |
* Run on WordPress multisite with: | |
* | |
* wp site list --field=url | xargs -I % wp eval-file http-to-https.php --url=% |
<?php | |
//This is a filter to change the default validation message that Gravity Forms generates | |
add_filter('gform_validation_message', 'change_validation_message', 10, 2); | |
function change_validation_message($message, $form) | |
{ | |
return "<div class='validation_error'><strong>Oops!</strong> Looks like there’s something wrong. Please review the form above.</div>"; | |
} | |
// Often forms in Gravity Forms to need to start with default values and we need to check the form in case the user hasn't entered new data and give them a validation message back |
<?php | |
//This is a filter to change the default validation message that Gravity Forms generates | |
add_filter('gform_validation_message', 'change_validation_message', 10, 2); | |
function change_validation_message($message, $form) | |
{ | |
return "<div class='validation_error'><strong>Oops!</strong> Looks like there’s something wrong. Please review the form above.</div>"; | |
} | |
// Often forms in Gravity Forms to need to start with default values and we need to check the form in case the user hasn't entered new data and give them a validation message back |