Skip to content

Instantly share code, notes, and snippets.

View BoweFrankema's full-sized avatar

Bowe Frankema BoweFrankema

View GitHub Profile
@SeanTOSCD
SeanTOSCD / cfm-receipt.php
Created August 21, 2015 17:23
EDD Checkout Fields Manager Receipt Values
<?php // DO NOT COPY THIS LINE
function sd_cfm_receipt_field( $payment ) {
?>
<tr>
<td><strong><?php _e( 'Custom Field', 'edd' ); ?>:</strong></td>
<td><?php echo get_post_meta( $payment->ID, 'custom_field', true ); ?></td>
</tr>
<?php
<?php
function job_listing_activity_args() {
if ( ! bp_is_active( 'activity' ) ) {
return;
}
add_post_type_support( 'job_listing', 'buddypress-activity' );
bp_activity_set_post_type_tracking_args( 'job_listing', array(
@tomazzaman
tomazzaman / codeable.io.conf
Created February 26, 2015 21:38
Codeable.io Nginx config
server {
include /home/webmaster/www/codeable.io.conf;
server_name codeable.io;
listen 443 ssl spdy default_server;
root /home/webmaster/www/codeable.io;
index index.php index.html;
error_log /var/log/nginx/codeable.io.error.log warn;
@pasadamedia
pasadamedia / gist:fa0a13cfa43c69f7a51f
Created January 28, 2015 06:02
Display WooThemes Sensei featured courses in a page template
/**
* Display Sensei Featured Courses.
*
* Displays a list of featured courses.
*
* @since 1.0.0
* @return void
* @uses WP_Query()
* @link http://www.woothemes.com/sensei/
* @author WooThemes
@ShinichiNishikawa
ShinichiNishikawa / newreview
Last active June 26, 2016 14:08
Creating a whole new Theme Review environmet in 1 minute using wp-cli
wp db reset --yes
wp core install --url=http://theme-review.loc --title="This is a really long long title to check if this theme design doesn't break with the long site title" --admin_user=admin --admin_password=admin --admin_email=example@example.com
wp core update
wp plugin install theme-check debug-bar log-deprecated-notices monster-widget wordpress-importer show-current-template customizer-theme-resizer --activate
wp plugin install wordpress-beta-tester debogger jetpack
wp plugin update --all
wp option update blogdescription "I'm in the theme review process and this is a very very long tagline to see if this long tagline text string in WordPress doesn't break the design of the theme header and else."
wp option update posts_per_page 5
wp option update thread_comments 1
wp option update thread_comments_depth 3
@fabrizim
fabrizim / acf-customizer-patch.php
Last active January 17, 2024 02:30
Plugin to allow for Advanced Custom Fields to be used in widgets within the Customizer
<?php
/*
Plugin Name: ACF Customizer Patch
Plugin URI: https://gist.github.com/fabrizim/9c0f36365f20705f7f73
Description: A class to allow acf widget fields to be stored with normal widget settings and allow for use in customizer.
Author: Mark Fabrizio
Version: 1.0
Author URI: http://owlwatch.com/
*/
class acf_customizer_patch
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/3.9/src/wp-includes/query.php
*/
$args = array(
@DevinWalker
DevinWalker / theme-tour.php
Last active March 27, 2018 17:57
Theme activation welcome message
<?php
/**
* Theme Activation Tour
*
* This class handles the pointers used in the introduction tour.
* @package Popup Demo
*
*/
class WordImpress_Theme_Tour {
@bearded-avenger
bearded-avenger / easy-digital-downloads-changelog-shortcode
Last active September 5, 2024 01:42
Easy Digital Downloads - Changelog Shortcode (pass the EDD download ID and output a button that opens the changelog in a lightbox) - Completely un-styled and ready to abuse
/*
Use: [changelog id=""]
Atts: "id" is the id of the download in EDD
*/
add_shortcode('changelog','edd_changelog_sc'));
function edd_changelog_sc($atts,$content = null) {
$defaults = array(
@Adirael
Adirael / fix-wordpress-permissions.sh
Created August 17, 2012 23:16
Fix wordpress file permissions
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org>
#
WP_OWNER=www-data # <-- wordpress owner
WP_GROUP=www-data # <-- wordpress group
WP_ROOT=$1 # <-- wordpress root directory