These changes need to be made in your active wp-config.php
file in order to be used (or dumped in a wp-config-local.php
file).
<?php
/* PHP errors, notices and warnings will be displayed */
#!/usr/bin/env node | |
/* | |
* Create ACF Flexible Layouts | |
*/ | |
// Require modules. | |
const fs = require( 'fs' ); | |
const args = process.argv.slice( 2 ); |
<?php | |
// Remove Unnecessary Code from wp_head | |
remove_action('wp_head', 'rsd_link'); | |
remove_action('wp_head', 'wlwmanifest_link'); | |
remove_action('wp_head', 'wp_generator'); | |
remove_action( 'wp_head', 'wp_shortlink_wp_head'); | |
remove_action('wp_head', 'start_post_rel_link'); | |
remove_action('wp_head', 'index_rel_link'); | |
remove_action('wp_head', 'adjacent_posts_rel_link'); |
$ ssh brad@192.168.1.29
$ mkdir test
$ cd test
wp search-replace --network --url=website.dev website.dev website.tld --precise --all-tables |
//var csv is the CSV contents with headers | |
function csvJSON(csv){ | |
var lines=csv.split('\n'); | |
var result = []; | |
var headers=lines[0].split(','); | |
lines.splice(0, 1); | |
lines.forEach(function(line) { |
var cornify_count = 0; | |
var cornify_add = function() { | |
cornify_count += 1; | |
var cornify_url = 'http://www.cornify.com/'; | |
var div = document.createElement('div'); | |
div.style.position = 'fixed'; | |
var numType = 'px'; | |
var heightRandom = Math.random()*.75; | |
var windowHeight = 768; |
/****************************************** | |
* get latest post | |
* use in loop if ( is_latest() ) { stuff; } | |
******************************************/ | |
function is_latest() { | |
global $post; | |
$loop = get_posts( 'numberposts=1' ); | |
$latest = $loop[0]->ID; | |
return ( $post->ID == $latest ) ? true : false; | |
} |
/** | |
* Optimize WooCommerce Scripts | |
* Remove WooCommerce Generator tag, styles, and scripts from non WooCommerce pages. | |
*/ | |
add_action( 'wp_enqueue_scripts', 'child_manage_woocommerce_styles', 99 ); | |
function child_manage_woocommerce_styles() { | |
//remove generator meta tag | |
remove_action( 'wp_head', array( $GLOBALS['woocommerce'], 'generator' ) ); |