Ejemplo n.º 1
0
 /**
  * Adds rewrite endpoint for processing Jigoshop APIs
  */
 public function addRewrite()
 {
     $this->wp->addRewriteRule($this->wp->getRewrite()->root . 'api/v([0-9])/([0-9a-zA-Z/]+)(\\.json|\\.xml)?$', sprintf('index.php?%s=$matches[1]&%s=/$matches[2]&%s=$matches[3]', self::QUERY_VERSION, self::QUERY_URI, self::QUERY_FORMAT), 'top');
 }