Skip to content

Instantly share code, notes, and snippets.

@jchristopher jchristopher/gist:8553159
Last active Jan 4, 2016

What would you like to do?
Add a proper view() method to your SearchWP Extension after registering it
class SearchWPMyExtension() {
function __construct() {
add_filter( 'searchwp_extensions', array( $this, 'register' ), 10 );
function register( $extensions ) {
$extensions['MyExtension'] = __FILE__;
return $extensions;
function view() { ?>
<p><?php _e( "This is your Extension's view.", 'searchwpmyextension' ); ?></p>
<?php }
new My_SearchWP_Extension();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.