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
.vscode/ | |
.well-known/ | |
info/ | |
*/*/error_log | |
*.log | |
*.mmdb | |
*/*/node_modules | |
*.sh | |
*.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
for plugin in $(wp plugin list --update=available --status=active --field=name); | |
do | |
TITLE=$(wp plugin get $plugin --field=title) | |
wp plugin update $plugin && | |
VERSION=$(wp plugin get $plugin --field=version) | |
git add -A wp-content/plugins/$plugin && | |
git commit -m "$(printf "update plugin: $TITLE to $VERSION")" | |
echo "$TITLE -> $VERSION" >> updated.txt | |
done; |
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
SELECT * FROM `<wp_prefix_>postmeta` WHERE `meta_key` LIKE '_wp_page_template' AND `meta_value` LIKE '<page-tempate.php>' |
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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteRule ^(wp-content/uploads/\d{4}/\d\d/.*\.jpg)$ https://<your-production-url>.com/$1 [QSA,L] | |
RewriteRule ^(wp-content/uploads/\d{4}/\d\d/.*\.png)$ https://<your-production-url>.com/$1 [QSA,L] | |
</IfModule> |
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
## binary shortcuts | |
alias node='nodejs' | |
alias wp='~/wp-cli.phar' | |
## environment specific frecents | |
alias clients='cd ~/public_html/clients/' | |
alias staging='cd ~/public_html/staging/' | |
## directory traversal | |
alias ..='cd ../' |
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
<h2>Contact Info</h2> | |
<div style="margin-bottom: 10px;"><br> | |
<p> | |
Name: <b>{field:name}</b><br> | |
Email: <b><a href="mailto:{field:email}">{field:email}</a></b><br> | |
Phone: <b><a href="tel:{field:phone}">{field:phone}</a></b><br> | |
</p> | |
</div> | |
<hr> |
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
# replace <domainname> with your domain name | |
# replace <directoryname> with the name of the directory where WordPress is located | |
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
RewriteCond %{HTTP_HOST} ^(www.)?<domainname>.com$ | |
RewriteCond %{REQUEST_URI} !^/<directoryname>/ | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule ^(.*)$ /<directoryname>/$1 |
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
<?php | |
/** | |
* create a custom query, using specific arguments, making sure to reset | |
* the query afterward. | |
*/ | |
function create_secondary_query() { | |
// for list of possible arguments, @see https://developer.wordpress.org/reference/classes/wp_query/#parameters | |
$args = array( |
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
/** | |
* credit to: https://wordpress.stackexchange.com/q/291735 | |
* | |
*/ | |
/** | |
* remove the slug from published gallery permalinks. | |
* | |
* Makes sure to only touch our CPT | |
* |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Test mail services</title> | |
</head> | |
<body> | |
<h1>Test out the mail functionality on a server</h1> | |
<?php | |
$timestamp = "today"; | |
// $timestamp = new DateTime('Y-m-d H:i:s'); |
OlderNewer