Skip to content

Instantly share code, notes, and snippets.

@dovy
dovy / frameworkinit.php
Last active December 26, 2015 21:49
Use this to include ReduxFramework in your theme or plugin. It will ensure the ReduxFramework Plugin loads first. If not present your local copy will be used. This way there's no cross-over and if the user has the plugin they always get the newest version.
<?php
/*
This can be included in your functions.php file. It checks to make sure the plugin is not activated. Please note,
if you have the plugin in any other directory than redux-framework (ie, you installed via the Github Repo), this will not function.
*/
include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); // Comment this line if within template files, IE required in files like functions.php
if ( !is_plugin_active('ReduxFramework/redux-framework.php') && !is_plugin_active('redux-framework/redux-framework.php') && !is_plugin_active('ReduxFramework-master/redux-framework.php') ) {
if ( !$active && !class_exists( 'Redux_Framework' ) && file_exists( dirname( __FILE__ ) . '/ReduxFramework/ReduxCore/framework.php' ) ) {
require_once( dirname( __FILE__ ) . '/ReduxFramework/ReduxCore/framework.php' );
}
<?php
return array(
'field'=>'typography',
'font-family'=>array(
'type'=>'boolean',
'desc'=>'Visibility of the font-family value.',
'default' => true
),
'font-size'=>array(
'type'=>'boolean',
@media only screen and (max-width: 760px) {
.header-album-widget {
display: none;
}
}
/* Layout
-------------------------------------------------------------- */
#page {
margin: 0 auto 0 auto;
width: 100%;
text-align: left;
background: #fff;
}
.page-stripe {
<!doctype html>
<html>
<head>
<title>XD</title>
</head>
<body onload="sendFragment()">
<script>
function sendFragment() {
(window.opener || window.parent || window.top).postMessage("access_token=S7jYwvM2UgFK2hYuFWHNQIZF52uW3gY3XV7FElw1&action=authorize&authorize=1&callback=g8008&client_id=AJv9wOwmrMstpYTuTlIOmqpbd1FA02y2CbVoy2EO&controller=platform%2Foauth&display=popup&expires_in=86400&origin=http%3A%2F%2Fgeni.dev&redirect_url=&response_type=token&scope=&state=", "http://geni.dev");
@dovy
dovy / sdk.js
Created October 21, 2013 20:20
/*!
* FamilySearch JavaScript SDK
* Copyright 2012, Dallan Quass & Dovy Paukstys
* For all api documentation:
* https://familysearch.org/developers/
*/
;(function(){
// The FamilySearch namespace

Integrate RecordSeek on your website!

RecordSeek is a service that allows users to link any page on the net to an ancestor's profile on FamilySearch. In order to make this an easy integration, the following document has been created. For production use please contact earl@rtcollab.com for pricing and maintenance details.

Step 1 - Get a FamilySearch Developer Key

FamilySearch will allow you to utilize RecordSeek as a method to gain a developer key. We can be a proxy for you, but you need to go through the proper process. First, you will need to go here to request a key: https://familysearch.org/developers/docs/guides/getting-started

Then after you've been approved, you will need to get it promoted to production level. Once that occurrs, send an email to [dovy@rtcollab.com](mailto:dovy@rtcollab.com?subject=RecordSeek Integration). Tell me your key, secret, and site URL you will be sending links from.

<?
// Construct the proper google fonts URL from the font values
function getGoogleScript( $font ) {
$data['link'] = 'http://fonts.googleapis.com/css?family=' . str_replace( ' ', '+', $font['font-family'] );
$data['key'] = str_replace( ' ', '_', $font['font-family'] );
if ( !empty( $font['font-weight'] ) ) :
$data['link'] .= ':' . str_replace( '-', '', $font['font-weight'] );
if ( !empty( $font['font-style'] ) ) :
@dovy
dovy / function.php
Last active December 23, 2015 14:59
sdfds
<?
private function __construct() {
$this->_actionsCommon();
if ( is_admin() ) {
$this->_actionsAdmin();
}
}
@dovy
dovy / gist:6633606
Last active December 23, 2015 12:09
Plugin
Demo
Free to build off of
Core features
Github Issue Support
Premium
Premium Support - First priority
Private Github Support Files (Customized Theme & Plugin Boilerplates)
Private Github + ThemeForest Support Files (Customized Theme & Plugin Boilerplates)