Skip to content

Instantly share code, notes, and snippets.

@mikeschinkel
Created October 23, 2013 04:24
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 mikeschinkel/7112588 to your computer and use it in GitHub Desktop.
Save mikeschinkel/7112588 to your computer and use it in GitHub Desktop.
<?php
class EduContent_Generator_Url {
static $dir;
static function on_load( $dir ) {
self::$dir = $dir;
add_filter( 'do_parse_request', array( __CLASS__, 'do_parse_request' ), 10, 3 );
}
static function do_parse_request( $continue, $wp, $query_vars ) {
if ( preg_match( '#^/educontent/generator$#', $_SERVER['REQUEST_URI'] ) ) {
require( self::$dir . '/admin/templates/tcpdf/samp/flashcards.php' );
exit;
}
return $continue;
}
}
EduContent_Generator_Url::on_load( dirname( __FILE__ ) );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment