Instantly share code, notes, and snippets.

View class-podcast-import.php
<?php
WP_CLI::add_command( 'podcast', 'JS_Podcast_Import' );
/**
* Wired Core CLI Functions
*/
class JS_Podcast_Import extends WP_CLI_Command {
View finder_icons.sh
#!/bin/sh
defaults read com.apple.finder CreateDesktop > /dev/null 2>&1
enabled=$?
if [ "$1" = "off" ]; then
if [ $enabled -eq 1 ]; then
defaults write com.apple.finder CreateDesktop false
osascript -e 'tell application "Finder" to quit'
open -a Finder
View cloudSettings
{"lastUpload":"2018-03-16T23:17:55.299Z","extensionVersion":"v2.9.0"}
View news-nerds-callback.php
<?php
/**
* Test Callback on Publish
*
* @package News-Nerds
*/
add_action( 'publish_post', 'callback_function_to_run_on_publish', 999 );
/**
View wpsite-comment-moderator.php
<?php
/**
* Plugin Name: Comment Moderator
* Plugin URI: https://99robots.com/products/
* Description: Add a new user role, Comment Moderator, that allows a new user to only manage comments.
* Version: 1.3.2
* Author: 99 Robots
* Author URI: https://99robots.com
* License: GPL2
* Text Domain: wpsite-comment-moderator
View bundled-config.txt
src/styles/allure/main.scss:197:9 [W] NestingDepth: Nesting should be no greater than 4, but was 5
src/styles/allure/main.scss:285:9 [W] NestingDepth: Nesting should be no greater than 4, but was 5
src/styles/allure/main.scss:404:1 [W] SelectorDepth: Selector should have depth of applicability no greater than 4, but was 5
src/styles/allure/main.scss:404:9 [W] NestingDepth: Nesting should be no greater than 4, but was 5
src/styles/allure/main.scss:423:1 [W] SelectorDepth: Selector should have depth of applicability no greater than 4, but was 5
src/styles/allure/main.scss:426:1 [W] SelectorDepth: Selector should have depth of applicability no greater than 4, but was 5
src/styles/allure/main.scss:426:9 [W] NestingDepth: Nesting should be no greater than 4, but was 5
src/styles/bon-appetit/main.scss:12:27 [W] NameFormat: Name of variable `graphikBARegular` should be written in all lowercase letters with hyphens instead of underscores
src/styles/bon-appetit/main.scss:14:26 [W] NameFormat: Name of variable `graphik
View update-promotrack.js
jQuery( '#storyart-table select.post-needs' ).val('complete').addClass('saveme');
View pre-commit.sh
#!/bin/sh
PATH="/usr/local/bin:$PATH"
git diff --quiet --cached -- submodules/ || {
echo "$(tput setaf 1) ABORT: Submodules change detected. Please verify your submodules are correct and try again. \n"; exit 1;
}
# is VERBOTEN ( ie, protect us from ourselves )
find ./wp-content/themes/Phoenix/ -type f -name "*.php" -o -name "*.styl" -o -name "*.js" | \
xargs egrep -i '(^<<<<<<<\s)|(^>>>>>>>\s)|(^=======$)'
View release.sublime-snippet
<snippet>
<content><![CDATA[
Message | PR | Developer
--------|:--:|----------
]]></content>
<tabTrigger>release</tabTrigger>
<description>Github Release Notes</description>
</snippet>
View radio.php
<?php
/**
* Change the slug to radio on SSP.
*/
add_filter( 'ssp_archive_slug', function(){ return 'radio'; } );