git init
or
<?php | |
/** | |
* Adding all Asynchronous Javascripts to posts and pages | |
*/ | |
function add_bulk_async_sdk() { ?> | |
<script> | |
(function(doc, script) { | |
var js, | |
fjs = doc.getElementsByTagName(script)[0], | |
add = function(url, id) { |
<?php | |
/** | |
* Plugin Name: TGM API Helper | |
* Plugin URI: https://thomasgriffin.io | |
* Description: Whitelists the plugins to be loaded during API requests to reduce overhead. | |
* Author: Thomas Griffin | |
* Author URI: https://thomasgriffin.io | |
* Version: 1.0.0 | |
*/ |
<?php | |
/** | |
* Detect if the current user has concurrent sessions | |
* | |
* @return bool | |
*/ | |
function pcl_user_has_concurrent_sessions() { | |
return ( is_user_logged_in() && count( wp_get_all_sessions() ) > 1 ); | |
} |
<?php | |
/** | |
* Template Name: Shopify Collection Demo | |
* | |
*/ | |
get_header(); ?> | |
<div id="primary" class="full-width"> |
upstream phpfpm { | |
server unix:/var/run/php5-fpm.sock; | |
} | |
upstream hhvm { | |
server unix:/var/run/hhvm/hhvm.sock; | |
} | |
# SSL | |
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; |
<?php | |
function rkv_bypass_auto_update_email( $send, $type, $core_update, $result ) { | |
// check our type and bail if successful | |
if ( ! empty( $type ) && $type == 'success' ) { | |
return false; | |
} | |
// return the send function | |
return true; |
<?php | |
add_action ( 'admin_menu', 'rkv_edit_admin_page_link_default' ); | |
function rkv_edit_admin_page_link_default() { | |
// call global submenu item | |
global $submenu; | |
// edit main link for posts | |
$submenu['edit.php'][5][2] = 'edit.php?post_status=publish'; |
<script type="text/javascript"> | |
(function () { | |
"use strict"; | |
// once cached, the css file is stored on the client forever unless | |
// the URL below is changed. Any change will invalidate the cache | |
var css_href = './index_files/web-fonts.css'; | |
// a simple event handler wrapper | |
function on(el, ev, callback) { | |
if (el.addEventListener) { | |
el.addEventListener(ev, callback, false); |
<?php | |
/* | |
Plugin Name: Restrict Content Pro - Custom User Fields | |
Description: Illustrates how to add custom user fields to the Restrict Content Pro registration form that can also be edited by the site admins | |
Version: 1.0 | |
Author: Pippin Williamson | |
Author URI: http://pippinsplugins.com | |
Contributors: mordauk | |
*/ |