Skip to content

Instantly share code, notes, and snippets.

<?php
$dir = './';
$files1 = scandir($dir);
foreach (glob("*.jpg") as $file) {
echo $file;
$newFile = $file;
$searchWord = array('25x25', '1280x', '100x100', '150x150', '300x240','300x', '600x', '768x', '900x', '1024x','1820x', '854x', '400x', '477x', '480x','672x', '960x', '750x');
@stewil87
stewil87 / functions.part.php
Created May 10, 2018 03:26
Remove Google Fonts from Newspaper 6.3+ Wordpress Theme by using Child
<?php
#...
function remove_actions_parent_theme() {
$priority = has_action('wp_enqueue_scripts', 'td_load_css_fonts');
remove_action( 'wp_enqueue_scripts', 'td_load_css_fonts',$priority );
};
add_action( 'init', 'remove_actions_parent_theme');
#...
@stewil87
stewil87 / wp-download.sh
Created February 1, 2018 16:30
Download and extract latest Wordpress Release in specified or script directory
#!/bin/bash
read -p "Enter install path. if empty, will use path of this script: " SCRIPTPATH
if [ -z "$SCRIPTPATH" ]; then
SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
fi
echo Download latest Wordpress
wget -P $SCRIPTPATH https://wordpress.org/latest.tar.gz
@stewil87
stewil87 / _ingress-colors.scss
Last active October 27, 2017 22:32
Ingress hexcode colors for sass/scss
$color-vr: #b08cff; // rgb(176,140,255)
$color-rr: #73a8ff; // rgb(115,168,255)
$color-cm: #8cffbf; // rgb(140,255,191)
$color-cyan: #59fbea; // rgb(89,251,234)
$color-orange: #ebbc4a; // rgb(235,188,74)
$color-res: #00c2ff; // rgb(0,194,255)
$color-enl: #28f428; // rgb(40,244,40)
$color-neutral: #f9f9f9; // rgb(249,249,249)