This file contains 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
{ | |
"settings": { | |
"defaults": { | |
"color": { | |
"palette": [ | |
{ | |
"slug": "transparent", | |
"color": "transparent", | |
"name" : "Transparent" | |
}, |
This file contains 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 | |
/** | |
* By default, cURL sends the "Expect" header all the time which severely impacts | |
* performance. Instead, we'll send it if the body is larger than 1 mb like | |
* Guzzle does. | |
*/ | |
function add_expect_header(array $arguments) | |
{ | |
$arguments['headers']['expect'] = ''; |
This file contains 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
var fs = require("fs"); | |
var path = require("path"); | |
// Config params (relative to where npm/script is called from): | |
const APP_BASE = './src'; | |
const ENTRY_FILE = `index.tsx`; | |
const OUTPUT_DIR = './build'; | |
const OUTPUT_FILE = 'app.js'; | |
const IS_DEV = false; | |
const TARGET = 'es2018'; |
This file contains 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 | |
/** | |
* Functions affecting admins and the admin dashboard. | |
*/ | |
/** | |
* Return array of fields found in the wp_users table. | |
* This function used in the others below to determine if a key entered in a search like "email:[email protected]" | |
* is referencing the user_email column of the wp_users table or a unique meta key. | |
*/ | |
function my_pmpro_get_user_table_columns() { |
This file contains 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
// License: GPLv2+ | |
var el = wp.element.createElement, | |
registerBlockType = wp.blocks.registerBlockType, | |
ServerSideRender = wp.components.ServerSideRender, | |
TextControl = wp.components.TextControl, | |
InspectorControls = wp.editor.InspectorControls; | |
/* | |
* Here's where we register the block in JavaScript. |
This file contains 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
(function (root, factory) { | |
if ( typeof define === 'function' && define.amd ) { | |
define([], factory(root)); | |
} else if ( typeof exports === 'object' ) { | |
module.exports = factory(root); | |
} else { | |
root.myPlugin = factory(root); | |
} | |
})(typeof global !== 'undefined' ? global : this.window || this.global, function (root) { |
This file contains 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
/** | |
* Return SVG markup. | |
* | |
* @param string $icon Required. Use the icon filename, e.g. "facebook-square". | |
* @param array $args { | |
* Parameters needed to display an SVG. | |
* | |
* @param string $title Optional. SVG title, e.g. "Facebook". | |
* @param string $desc Optional. SVG description, e.g. "Share this post on Facebook". | |
* @param string $class Optional. SVG class, defaults to 'icon icon-{icon name}. |
This file contains 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: Customize Post Preambles | |
* Author: Weston Ruter, XWP | |
* Description: Demo plugin for Customize Posts to add a section before each post in The Loop that contains a preamble content stored in postmeta. | |
* | |
* @package CustomizePostPreambles | |
*/ | |
namespace CustomizePostPreambles; |
This file contains 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 | |
/** | |
* Prevents Related Posts from displaying in content area | |
*/ | |
function prefix_remove_rp() { | |
if ( class_exists( 'Jetpack_RelatedPosts' ) ) { | |
$jprp = Jetpack_RelatedPosts::init(); | |
$callback = array( $jprp, 'filter_add_target_to_dom' ); | |
remove_filter( 'the_content', $callback, 40 ); | |
} |
This file contains 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
/** | |
* Virtual ZigBee RGBW Bulb (Used for OSRAM RGBW light groups) | |
* | |
* Copyright 2016 SmartThings | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except | |
* in compliance with the License. You may obtain a copy of the License at: | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* |
NewerOlder