Created
September 4, 2014 01:35
-
-
Save ringmaster/472ad6f0423920a6ea5e to your computer and use it in GitHub Desktop.
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 | |
//... | |
public function filter_default_rewrite_rules( $rules ) { | |
$rules[] = array( | |
'name' => 'display_invoice', | |
'parse_regex' => '%^(?P<client_slug>.+?)/invoice/(?P<slug>.+?)/?$%i', | |
'build_str' => '{$client_slug}/invoice/{$slug}', | |
'handler' => 'UserThemeHandler', | |
'action' => 'display_post', | |
'priority' => 1, | |
'description' => 'Display Invoice', | |
'parameters' => serialize( array( 'require_match' => array('Posts', 'rewrite_match_type'), 'content_type'=>'invoice') ), | |
); | |
return $rules; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment