Skip to content

Instantly share code, notes, and snippets.

@clifgriffin
Last active December 15, 2015 10:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save clifgriffin/5248312 to your computer and use it in GitHub Desktop.
Save clifgriffin/5248312 to your computer and use it in GitHub Desktop.
<?php
/*
Plugin Name: Gist Watermark
Plugin URI: http://clifgriffin.com
Description: Nothing really.
Version: 1.0
Author: Clifton H. Griffin II
Author URI: http://clifgriffin.com
*/
class GistTest {
function __construct() {
// Cover image was the most to convenient to test with in my install
add_action( 'shopp_themeapi_product_coverimage', array($this, 'destroy_images_array'), 1, 3);
add_action( 'shopp_themeapi_product_coverimage', array($this, 'didnt_work'), 100, 3);
}
function destroy_images_array($result, $options, $O) {
$O->images = null;
return $result;
}
function didnt_work($result, $options, $O) {
print_r($O->images); // this shouldn't show anything, right?
return $result;
}
}
$GistTest = new GistTest();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment