Skip to content

Instantly share code, notes, and snippets.

studiograsshopper

Block or report user

Report or block studiograsshopper

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@studiograsshopper
studiograsshopper / sgr_wp_get_theme.php
Last active Dec 15, 2015
wp_get_theme() - false positives...
View sgr_wp_get_theme.php
<?php
/*
Installed themes:
Parent theme = Genesis version 1.9.1
Child theme = Child version 1.0
*/
// EXAMPLE 1:
$theme = wp_get_theme( get_template_directory() );
@studiograsshopper
studiograsshopper / sgr_jq_stick_footer.js
Created Apr 4, 2013
JQuery script for keeping footer at bottom of viewport when viewing short pages.
View sgr_jq_stick_footer.js
@studiograsshopper
studiograsshopper / sgr_wp_debug_activation.php
Created Apr 15, 2013
Plugin debugging - tracking down "The plugin generated xxx characters of unexpected output during activation." errors. I didn't invent it, but found it on a few places on the web, including wp.org support forums.
View sgr_wp_debug_activation.php
<?php
add_action('activated_plugin','save_error');
/**
* Place entire block of code at foot of wp-admin/includes/plugin.php
* Don't forget to remove code after use!
*
* Location of error_activation.html must be writeable, eg in your uploads folder somewhere
*/
function save_error(){
file_put_contents( ABSPATH . 'wp-content/{somewhere writeable}/error_activation.html', ob_get_contents() );
View premium-plugin-class.php
<?php
class Premium_Plugin {
/**
* Plugin API Url
*
* @access protected
* @var string
You can’t perform that action at this time.