This file contains 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
/applications/MAMP/library/bin/mysql -u [USERNAME] -p [DATABASE_NAME] < [PATH_TO_SQL_FILE] | |
Example: | |
/applications/MAMP/library/bin/mysql -u root -p wordpress_db < /Applications/MAMP/htdocs/mydatabase.sql |
This file contains 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
let myTitles = Array.prototype.slice.apply(document.querySelectorAll("h2.woocommerce-loop-product__title")); | |
const searchTerm = '('; | |
// console.log( myTitles ); | |
const regExp = /\(([^)]+)\)/; | |
myTitles.forEach((myTitles) => { | |
//console.log("apply worked"); | |
if( myTitles.innerHTML.indexOf(searchTerm) > -1 ) { | |
// console.log('yep'); |
This file contains 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
DELETE a,b,c | |
FROM wp_posts a | |
LEFT JOIN wp_term_relationships b ON (a.ID = b.object_id) | |
LEFT JOIN wp_postmeta c ON (a.ID = c.post_id) | |
WHERE a.post_type = 'revision' |
This file contains 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
RewriteEngine On | |
RewriteCond %{SERVER_PORT} 80 | |
RewriteRule ^(.*)$ https://www.example.com/$1 [R,L] |
This file contains 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
<script type="text/javascript" language="JavaScript"> | |
// Callback to get the button working. | |
function enableBtn1(){ | |
document.getElementById("button1").disabled = false; | |
} | |
function enableBtn2(){ | |
document.getElementById("button2").disabled = false; | |
} | |
</script> |
This file contains 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
<script type="text/javascript" language="JavaScript"> | |
// Call to rendor the captcha | |
var recaptcha1; | |
var recaptcha2; | |
var myCallBack = function() { | |
//Render the recaptcha1 on the element with ID "recaptcha1" | |
recaptcha1 = grecaptcha.render('recaptcha1', { | |
//'sitekey' : '6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI', //test key | |
'sitekey' : 'YOUR_SITE_KEY', // production |
This file contains 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
<div class="form-wrap"> | |
<!-- Form 1 --> | |
<form id="form-1"> | |
<!-- | |
Other form elements... | |
--> | |
<!-- insert the google captcha div with the ID of "recaptcha1" --> | |
<div id="recaptcha1" class="googlecapt"></div> | |
<!-- Give your submit button an ID of "button1" --> |
NewerOlder