Skip to content

Instantly share code, notes, and snippets.

@logoscreative
logoscreative / plugin.php
Last active February 1, 2023 12:14
Friendlier, Safer WordPress Admin Areas
<?php
/**
* "Friendlier, Safer WordPress Admin Areas"
* Presented by Cliff Seal at WordCamp Atlanta 2015 and Asheville 2016
* Slides: http://www.slideshare.net/cliffseal/wp-admin
*
* Plugin Name: A Better Admin Experience
* Plugin URI: http://evermoresites.com
* Description: Cleans up and sanitizes the WordPress admin area
* Version: 1.0
@logoscreative
logoscreative / bcp.json
Last active August 29, 2015 14:18
The Daily Office Readings from the Book of Common Prayer in a single JSON object
{
"1":{
"psalm-1":"Ps. 103",
"psalm-2":"Ps. 148",
"ot":"Isa. 62:1-5,10-12",
"nt":"Rev. 19:11-16",
"gospel":"Matt. 1:18-25"
},
"2":{
"psalm-1":"Ps. 34",
@logoscreative
logoscreative / functions.php
Created June 23, 2015 19:01
Pods meta_value_num PoC
<?php
/**
* WordPress stores all meta fields as strings, which causes problems for ordering by numbers. When using Pods::find() directly, this issue can be addressed by casting the field as a decimal, as shown here: https://github.com/pods-framework/pods-code-library/blob/master/example/classes/Pods/find/examples/orderby-number.php
*
* In shortcodes, this strategy is not possible, as MySQL functions can not be used in the WordPress post editor. Instead, you can use the "pods_shortcode_findrecords_params" params filter, as shown below:
*/
/**
* Example to order by a price field properly.
*/
@logoscreative
logoscreative / plugin.php
Created September 20, 2015 21:58
Batch Set External Images in Content as Featured Images
<?php
/**
* Batch Set External Images in Content as Featured Images
*
* Look for external images shoved into the content, upload them to the Media Library, and assign it as the featured post.
*
* @package batch_upload_featured
* @author Cliff Seal <cliff@evermo.re>
* @link http://evermo.re
* @copyright 2015 Logos Creative
@logoscreative
logoscreative / plugin.php
Created October 5, 2015 18:03
Override DPP Encoding
/**
* NOTE: Unencode > in DPP Freeform CSS
*
* @since 1.0.9
*/
function evermore_unencode_dpp_css( $safe_text, $text ) {
if ( strpos( $safe_text, 'gt;' ) !== false && strpos( $safe_text, 'lt;' ) === false ) {
$safe_text = $text;
@logoscreative
logoscreative / tec-genesis-handshake.php
Created October 6, 2015 10:17
Genesis + ECP Handshake
<?php
/**
* Genesis + ECP Handshake
*
* Integrates the things from: https://theeventscalendar.com/knowledgebase/genesis-theme-framework-integration/
*
* @package genesis_ecp_handshake
* @author Cliff Seal <cliff@evermo.re>
* @link http://evermo.re
* @copyright 2015 Logos Creative
<?php
/**
* Plugin Name: Envira CDN Fix
* Plugin URI: https://logoscreative.com
* Description: Support images on a CDN with Envira
* Version: 1.0
* Author: Logos Creative
* Author URI: https://logoscreative.com
*/