Skip to content

Instantly share code, notes, and snippets.

😺
Pressing all the Words

Evan Herman EvanHerman

😺
Pressing all the Words
Block or report user

Report or block EvanHerman

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@EvanHerman
EvanHerman / config.yml
Last active Oct 29, 2018
WordPress Plugin CircleCI 2.0 Config - PHPCS, PHPUnit and rsync Deployment
View config.yml
workflows:
version: 2
main:
jobs:
- php56-build
- php70-build
- php71-build
- php72-build
- deploy:
requires:
@EvanHerman
EvanHerman / rw-elephant-inventory-gallery-filters.php
Last active Oct 15, 2018
RW Elephant Inventory Gallery - Product Data Filters
View rw-elephant-inventory-gallery-filters.php
View bootstrap-alert.css
.alert {
padding: 15px;
margin-bottom: 20px;
border: 1px solid transparent;
border-radius: 4px;
}
.alert h4 {
margin-top: 0;
color: inherit;
@EvanHerman
EvanHerman / apache-ci.conf
Last active Aug 25, 2017 — forked from petersuhm/apache-ci.conf
Circle CI Apache configuration file
View apache-ci.conf
<VirtualHost *:80>
LoadModule php7_module /opt/circleci/php/7.1.3/usr/lib/apache2/modules/libphp7.so
DocumentRoot "/home/ubuntu/wordpress"
ServerName wordpress.dev
ServerAlias *.dev
<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>
@EvanHerman
EvanHerman / circle.yml
Last active Aug 25, 2017 — forked from petersuhm/circle.yml
Example CircleCi configuration for WP Pusher
View circle.yml
machine:
timezone:
Europe/Copenhagen
php:
version: 5.3.3
# This will be added to the `/etc/hosts` file
hosts:
wordpress.dev: 127.0.0.1
@EvanHerman
EvanHerman / circle.yml
Created Aug 24, 2017 — forked from Arjeno/circle.yml
Always use the latest version of Chrome on CircleCI
View circle.yml
# This makes sure Chrome is always up to date in your test suite
# On average this adds about 10 seconds to your build suite
# Be sure to use Ubuntu 14.04 (Trusty) in the CircleCI's OS setting (Settings > Build Environment)
dependencies:
pre:
- curl -L -o google-chrome.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
- sudo dpkg -i google-chrome.deb
- sudo sed -i 's|HERE/chrome\"|HERE/chrome\" --disable-setuid-sandbox|g' /opt/google/chrome/google-chrome
- rm google-chrome.deb
@EvanHerman
EvanHerman / dynamic-post-tags.php
Last active May 3, 2017
Populate the WordPress post tags with the values from the WordPress post categories on the save_post action hook.
View dynamic-post-tags.php
<?php
/**
* Dynamically set the post tags to mirror the post categories.
*
* @action save_post
*
* @param integer $post_id The post ID.
*/
function dynamic_post_tags( $post_id ) {
@EvanHerman
EvanHerman / update-user-by-email.php
Created Jan 31, 2017
Update WordPress user password by email address
View update-user-by-email.php
<?php
/**
* Update an existing user by email address
*
* @author Code Parrots <support@codeparrots.com>
*/
function update_user_password_by_email() {
$user = get_user_by( 'email', 'email@example.com' );
View gist:dfd2a8c4f2f129b65a54344a97ffd80e
#add 'node_modules' to .gitignore file
git rm -r --cached node_modules
git commit -m 'Remove the now ignored directory node_modules'
git push origin master
@EvanHerman
EvanHerman / custom-read-more-text.php
Last active Sep 20, 2019
Timeline Express Custom Read More Text
View custom-read-more-text.php
<?php // Do not include this line - this is here for syntax highlighting only
/**
* Alter the read more text on the timeline
*
* @param string $text The read more link text.
* @param integer $post_id The post ID.
*
* @return string The final read more link text.
*/
You can’t perform that action at this time.