Skip to content

Instantly share code, notes, and snippets.

Clifford cliffordp

  • Oklahoma
Block or report user

Report or block cliffordp

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
@cliffordp
cliffordp / private-debug-log.php
Created Oct 8, 2018 — forked from webaware/private-debug-log.php
Enable WordPress debug log to a private folder not accessible from the web. See http://wordpress.stackexchange.com/q/84132/24260 for details and motivations. NB: currently needs to be manually edited to specify the private folder path;
View private-debug-log.php
<?php
/*
Plugin Name: Private Debug Log
Description: Enable debug log to a private folder not accessible from the web
Version: 0.0.1
Author: WebAware
Author URI: http://www.webaware.com.au/
*/
/*
@cliffordp
cliffordp / gravityview-modify-caps-by-id.php
Last active Sep 25, 2018 — forked from zackkatz/gravityview-modify-caps-by-id.php
GravityView - Examples for modifying editing capabilities by View ID and Entry ID
View gravityview-modify-caps-by-id.php
<?php
// Forked from gist linked at https://docs.gravityview.co/article/311-gravityview-capabilities
/**
* Modify whether an user has access to edit a specific View.
*
* @see https://codex.wordpress.org/Plugin_API/Filter_Reference/user_has_cap
*
* @param array $allcaps All the capabilities of the user
View AdminPage.php
<?php
/**
* The WordPress Meme Shortcode admin page.
*
* @author Carl Alexander
*/
class WPMemeShortcode_AdminPage
{
/**
View add-full-size-gifs.php
<?php
/**
* If inserting a gif always place the full size image
*
* @link https://whoischris.com/code-sample-keep-gif-animation-when-adding-media-to-post-content-in-wordpress/
*
* @param string $html
* @param int $send_id
* @param array $attachment
*
View dlm-gf-dynamic-redirect.php
// Gravity Forms Dynamic Redirect
add_filter( 'gform_confirmation', 'dlm_gf_dynamic_redirect', 10, 4 );
function dlm_gf_dynamic_redirect( $confirmation, $form, $entry, $ajax ) {
// DLM GF Handler
$dlm_gf_handler = new DLM_GF_Gravity_Forms_Handler();
// fetch download ID dynamically from form
$lead_id = $dlm_gf_handler->get_lead_index_of_dlm_field( $form );
@cliffordp
cliffordp / functions.php
Last active Aug 29, 2018 — forked from jesseeproductions/tribe-google-map-region
The Events Calendar and/or PRO: Set Region and Language biasing for Google Maps (Australia in this example)
View functions.php
<?php
/**
* The Events Calendar and/or PRO: Set Region and Language biasing for Google Maps.
*
* @link https://gist.github.com/cliffordp/c7c2713e9f61166e9aef746823be6bfa This snippet.
* @link https://developers.google.com/maps/faq#languagesupport Language Codes.
* @link https://developers.google.com/maps/documentation/javascript/geocoding#GeocodingRegionCodes Region codes.
*
* @param string $api_url The Google Maps API URL.
*
@cliffordp
cliffordp / hierarchy.php
Created Aug 27, 2018 — forked from johnbillion/hierarchy.php
ASCII WordPress Template Hierarchy
View hierarchy.php
<?php
/*
WordPress Template Hierarchy (as of WordPress 4.9)
is_404() -------------------------------------------------------------------------------------------------> 404.php
is_search() ----------------------------------------------------------------------------------------------> search.php
is_front_page() ------------------------------------------------------------------------------------------> front-page.php
is_home() ------------------------------------------------------------------------------------------------> home.php
View add-post-date-column-to-events-wp-list-table.php
<?php
/**
* The Events Calendar: Add "Post Date" column to the wp-admin Events posts list.
*
* @link https://gist.github.com/barryhughes/38d7131462bd3912e571d5e6f3b5762e
*/
add_action( 'manage_posts_custom_column', 'events_post_date_column', 10, 2 );
add_filter( 'manage_tribe_events_posts_columns', 'events_post_date_column_header' );
function events_post_date_column( $column_id, $post_id ) {
@cliffordp
cliffordp / functions.php
Created Feb 28, 2018 — forked from bordoni/functions.php
How to add the Venue on The Events Calendar Month Tooltip
View functions.php
<?php
/*
* If you already have something in your functions.php, please remove these first few lines
*/
function tec_forum_939516( $json, $event, $additional ){
$venue = tribe_get_venue_id( $event );
if ( $venue ){
$json['venue'] = $venue;
@cliffordp
cliffordp / customizer-links.php
Last active Nov 15, 2017 — forked from slushman/customizer-links.php
How to link into the WordPress Customizer
View customizer-links.php
You can’t perform that action at this time.