Last active
December 10, 2015 15:59
-
-
Save TravisBallard/4458315 to your computer and use it in GitHub Desktop.
filter shortcode example - does not work
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* plugin name: test shortcode filter | |
* author: travis ballard | |
*/ | |
class ShortcodeFilter | |
{ | |
public $shortcode = 'testshortcode'; | |
public function __construct(){ | |
add_shortcode( apply_filters( 'test_shortcode_filter', $this->shortcode ), array( $this, 'shortcode' ) ); | |
} | |
public function shortcode($a){ | |
return '<p>The shortcode worked!</p>'; | |
} | |
} | |
$sf = new ShortcodeFilter(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment