Remember, there are 'TWIG' tools and then there are 'Timber' tools.
The second is WordPress specific.
<?php | |
# Database Configuration | |
define( 'DB_NAME', 'XXX' ); | |
define( 'DB_USER', 'XXX' ); | |
define( 'DB_PASSWORD', 'XXX' ); | |
define( 'DB_HOST', '127.0.0.1' ); | |
define( 'DB_HOST_SLAVE', '127.0.0.1' ); | |
define('DB_CHARSET', 'utf8'); | |
define('DB_COLLATE', 'utf8_unicode_ci'); | |
$table_prefix = 'wp_'; |
{# | |
Relies mostly on a meta array containing appropriate values. | |
site_name is a parameter set as a Twig Global | |
default_share_image is a fallback parameter set as a Twig Global | |
#} | |
<meta charset="UTF-8"> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta name="robots" content="index, follow" /> | |
<meta property="og:type" content="website" /> |
Eliminate All Blocks from Editor | |
wp.data.dispatch( 'core/block-editor' ).resetBlocks([]); | |
How to disable and lock Gutenberg blocks | |
https://kinsta.com/blog/disable-gutenberg-blocks/ | |
Convert group of file blocks to ACF block | |
https://bdwm.be/gutenberg-case-study-convert-group-of-file-blocks-to-acf-block/ | |
Enabling Gutenberg-Based Custom Post Types and Taxonomies |
<?php | |
/********* DO NOT COPY THE PARTS ABOVE THIS LINE *********/ | |
/* Remove Yoast SEO Change existing title or meta template variable | |
* Credit: Moshe Harush | |
* https://stackoverflow.com/questions/36281915/yoast-seo-how-to-create-custom-variables | |
* Last Tested: Unknown | |
*/ | |
// define the wpseo_replacements callback | |
function filter_wpseo_replacements( $replacements ) { |
#!/bin/bash | |
################################################### | |
## CREDENCIAIS DO MYSQL NO ARQUIVO /root/.my.cnf ## | |
## ## | |
## [mysql] ## | |
## user=root ## | |
## password='M!nh@S3nh@' ## | |
## host='ip-ou-dns-do-servidor' ## | |
## ## |
<?php | |
// PHP memory limit for this site | |
define( 'WP_MEMORY_LIMIT', '128M' ); | |
define( 'WP_MAX_MEMORY_LIMIT', '256M' ); // Increase admin-side memory limit. | |
// Database | |
define( 'WP_ALLOW_REPAIR', true ); // Allow WordPress to automatically repair your database. | |
define( 'DO_NOT_UPGRADE_GLOBAL_TABLES', true ); // Don't make database upgrades on global tables (like users) | |
// Explicitely setting url |
#!/bin/bash | |
#============================================================================== | |
#TITLE: mysql_backup.sh | |
#DESCRIPTION: script for automating the daily mysql backups on development computer | |
#AUTHOR: tleish | |
#DATE: 2013-12-20 | |
#VERSION: 0.4 | |
#USAGE: ./mysql_backup.sh | |
#CRON: | |
# example cron for daily db backup @ 9:15 am |
#301 Redirects for .htaccess | |
#Redirect a single page: | |
Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
#Redirect an entire site: | |
Redirect 301 / http://www.domain.com/ | |
#Redirect an entire site to a sub folder | |
Redirect 301 / http://www.domain.com/subfolder/ |
#!/bin/bash | |
# esed 's/foo/bar/g' files.... | |
script=$1 | |
shift 1 | |
CHANGED=1 # diff returns 1 for differences. (0 for no difference, 2 for errors.) | |
for file in $* | |
do | |
sed -e ${script} ${file} > ${file}~ | |
diff ${file} ${file}~ > /dev/null |