Skip to content

Instantly share code, notes, and snippets.

@pryley
pryley / gist:7746379
Last active December 29, 2015 23:59
Frontend google analytics snippet
<?php
try {
if( $access_token ) {
// Set access token
$client->setAccessToken( $access_token );
// Assign variables
$slug_array = $filter_path_array = $filter_array = $data = array();
@pryley
pryley / optionsframework_on_validate-example.php
Created December 1, 2012 00:12
Allow Facebook App ID/Secret verification with Options Framework
/** OPTIONS FRAMEWORK - FACEBOOK VERIFICATION
/ ================================================================================ */
// Verify Facebook App ID and Secret
add_action( 'admin_notices', 'pr_facebook_verify' );
function pr_facebook_verify() {
if ( get_option( 'fb_token' ) != '' ) {
$screen = get_current_screen();