First create global variables (in functions.php or as a mu-plugin):
<?php
/*
* CUSTOM GLOBAL VARIABLES
*/
function wtnerd_global_vars() {
<?php | |
define('WYSIWYG_META_BOX_ID', 'my-editor'); | |
define('WYSIWYG_EDITOR_ID', 'myeditor'); //Important for CSS that this is different | |
define('WYSIWYG_META_KEY', 'extra-content'); | |
add_action('admin_init', 'wysiwyg_register_meta_box'); | |
function wysiwyg_register_meta_box(){ | |
add_meta_box(WYSIWYG_META_BOX_ID, __('WYSIWYG Meta Box', 'wysiwyg'), 'wysiwyg_render_meta_box', 'post'); | |
} |
/*! | |
* jQuery AfterScroll 1.0 | |
* | |
* Do something once the bottom of an element comes into view, | |
* and something when you scroll above it too. | |
* | |
* (c) 2011 Matt Wiebe http://somadesign.ca/ | |
* GPL2 / MIT dual-license, just like jQuery | |
* http://jquery.org/license/ | |
* |
<?php | |
/* | |
Plugin Name: Mobile First Responsive Images | |
Description: Serve up smaller images to smaller screens. | |
Version: 0.1.1 | |
Author: Matt Wiebe | |
Author URI: http://somadesign.ca/ | |
*/ | |
/** |
// This gist is now maintained on github at https://github.com/luetkemj/wp-query-ref | |
<?php | |
/** | |
* WordPress Query Comprehensive Reference | |
* Compiled by luetkemj - luetkemj.github.io | |
* | |
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters | |
* Source: https://core.trac.wordpress.org/browser/tags/4.9.4/src/wp-includes/query.php | |
*/ |
<?php | |
function themename_customize_register($wp_customize){ | |
$wp_customize->add_section('themename_color_scheme', array( | |
'title' => __('Color Scheme', 'themename'), | |
'priority' => 120, | |
)); | |
// ============================= |
<?php | |
/* | |
Plugin Name: Homepage Settings for BigBang | |
Plugin URI: http://www.inboundnow.com/ | |
Description: Adds additional functionality to the big bang theme. | |
Author: David Wells | |
Author URI: http://www.inboundnow.com | |
*/ | |
// Specify Hooks/Filters |
<?php | |
// a framework to handle frontend form submission | |
// written by Arūnas Liuiza | tinyStudio | wp.tribuna.lt | |
// Usage: use [tiny_form1] shortcode or get_tiny_form1()/the_tiny_form1() template tags | |
// Arguments: one (optional) argument 'redirect': pass url where to redirect after successful login (default: false); | |
// Localization: replace 'theme' with your text domain string. | |
// ======= FORM 1 =====> | |
<?php | |
class ColorPalette{ | |
public $color; | |
public function __construct($color){ | |
$this->color = $color; | |
} | |
public function color_mod($hex, $diff) { | |
$rgb = str_split(trim($hex, '# '), 2); | |
First create global variables (in functions.php or as a mu-plugin):
<?php
/*
* CUSTOM GLOBAL VARIABLES
*/
function wtnerd_global_vars() {
/////////////////////////////////////////////////////////////////////////////////// | |
/// Colection of RGB to HSB, HSB to RGB convert functions | |
/// Source: http://stackoverflow.com/questions/5623838/rgb-to-hex-and-hex-to-rgb | |
/////////////////////////////////////////////////////////////////////////////////// | |
/** | |
* componentToHex convert two digit htx value to R, G or B chanel value | |
* @param number c value from 0 to 225 | |
* @return string value of R, G or B chanel | |
* @usage //alert (componentToHex(255)); //ff |