Skip to content

Instantly share code, notes, and snippets.

View thefrosty's full-sized avatar
🏖️
Santa Monica WordPress Developer

Austin Passy thefrosty

🏖️
Santa Monica WordPress Developer
View GitHub Profile
@scottopolis
scottopolis / gist:9214367
Created February 25, 2014 18:04
Ajax WordPress posts via JSON API
<button class="button" id="get_posts">Get Posts</button>
<ul id="statuses">
</ul>
<script type="text/javascript">
/* Requires JSON API plugin installed on remote site http://wordpress.org/plugins/json-api/ */
(function(window, document, $, undefined){
@Almalerik
Almalerik / wordpress-plugin-svn-to-git.md
Last active September 19, 2015 14:28 — forked from kasparsd/wordpress-plugin-svn-to-git.md
Using Git with Subversion Mirroring for WordPress Plugin Development
@franz-josef-kaiser
franz-josef-kaiser / cron-list.php
Last active September 25, 2015 21:27
Plugin: List wp cron jobs in wp_footer
<?php
defined( 'ABSPATH' ) OR exit;
/*
Plugin Name: WP Cron Jobs List
Plugin URI: https://github.com/franz-josef-kaiser
Description: List WordPress internal cron jobs (array data) after the footer.
Author: Franz Josef Kaiser
Author URI: https://github.com/franz-josef-kaiser
Version: 0.3.1
License: MIT
<?php
/*
Plugin Name: Easy Digital Downloads - Variable Pricing License Activation Limits
Plugin URL: http://easydigitaldownloads.com/extension/
Description: Limit the number of license activations permitted based on variable prices
Version: 1.0
Author: Pippin Williamson
Author URI: http://pippinsplugins.com
Contributors: mordauk
*/
@norcross
norcross / admin-user-search.php
Created February 19, 2013 20:12
add first name, last name, and email to back-end WP user search
<?php
add_action ( 'pre_user_query', 'rkv_user_search' );
function rkv_user_search($wp_user_query) {
if(false === strpos($wp_user_query->query_where, '@') && !empty($_GET["s"])) {
global $wpdb;
$uids = array();
@rohmann
rohmann / remove-blog-option.php
Last active December 21, 2015 16:39
Removes the "Gimme a site / Just a username" option from Wordpress multisite signups. http://git.io/NO6z0A
<?php
function remove_signup_option(){
//Predefine what kind of registration is happening. wp-signup.php won't show the option if one is declared
global $active_signup;
$active_signup='blog';
}
add_action('signup_hidden_fields','remove_signup_option');
@jqlblue
jqlblue / php-5.5-install.sh
Created August 10, 2013 01:37
php 5.5 install guide
#!/bin/bash
PHP_VERSION="5.5.0"
yum -y install \
curl-devel.x86_64 \
libmcrypt-devel.x86_64 \
libxml2-devel.x86_64 \
libtool-ltdl-devel.x86_64 \
pcre-devel.x86_64 \
@bradyvercher
bradyvercher / register-plugin-icons.php
Created October 4, 2017 22:30
Register icons to display on the Manage Plugins screen for plugins that aren't in the WordPress.org directory.
<?php
/**
* Register plugin icons.
*
* WordPress 4.9 introduced icons in the list table on the Manage Plugins
* screen. The icons are pulled from the W.org update API. If an icon isn't
* available, a generic plugin Dashicon is shown instead.
*
* @param array $value Plugin update data.
* @return array
@Hounddog
Hounddog / phpcs
Created October 15, 2012 10:29
PHP Pre commit check for only changed files
#!/bin/bash
# Go to root of the repository
echo 'Checking PHPCS';
width=$(tput cols);
if [ `git rev-parse --verify HEAD` ]; then
against='HEAD'
else
@Majkl578
Majkl578 / Dockerfile
Last active November 8, 2019 17:41
Dockerized example for article at Pehapkari.cz about running multiple PHP versions: https://pehapkari.cz/blog/2017/03/27/multiple-php-versions-the-easy-way/
FROM debian:stretch
ENV DEBIAN_FRONTEND noninteractive
# install NGINX
RUN apt-get update && \
apt-get install -y nginx --no-install-recommends && \
rm -rf /var/lib/apt/lists/*