This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Vue from 'vue' | |
import Sortable from 'sortablejs' | |
Vue.directive('sortable', { | |
inserted: function (el, binding, vnode) { | |
var sortable = new Sortable(el, binding.value || {}); | |
if (binding.arg) { | |
if (!vnode.context.sortable) { | |
vnode.context.sortable = {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Video Importer Temporary Drafts | |
Plugin URI: https://refactored.co | |
Description: Temporarily saves imported posts as a draft so any publishing logic doesn't run until custom fields are saved | |
Version: 1.0 | |
Author: Refactored Co. | |
Author URI: https://refactored.co | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Find Video Thumbnails in Post and Custom Field | |
Plugin URI: http://refactored.co | |
Description: Mod for Video Thumbnails to also scan the post content when a custom field is entered in the settings. | |
Author: Refactored Co. | |
Author URI: http://refactored.co | |
Version: 0.1 | |
License: GPL2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Extend HTTP Request Timeout | |
Plugin URI: https://refactored.co | |
Description: Extends the default timeout length for the WordPress HTTP API | |
Author: Sutherland Boswell | |
Author URI: http://sutherlandboswell.com | |
Version: 1.0 | |
License: GPL2 | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function my_css_function() { | |
if ( is_single() && get_post_meta( get_the_ID(), 'field_key', true ) != '' ) { | |
wp_enqueue_style( 'style-name', 'folder/stylesheet.css' ); | |
} | |
} | |
add_action( 'wp_enqueue_scripts', 'my_css_function' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
clear | |
echo "WordPress Instance Setup" | |
echo "========================" | |
echo | |
echo "Enter a domain for your site" | |
read domain |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Facebook_Thumbnails extends Video_Thumbnails_Providers { | |
// Regex strings | |
public $regexes = array( | |
'#"http://www.facebook.com/v/([0-9]+)"#' // Facebook Embed | |
); | |
// Thumbnail URL | |
public function get_thumbnail_url( $id ) { | |
return 'https://graph.facebook.com/' . $id . '/picture'; |