Last active
January 4, 2016 02:09
-
-
Save jchristopher/8553159 to your computer and use it in GitHub Desktop.
Add a proper view() method to your SearchWP Extension after registering it
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 | |
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