Plugin Directory

Changeset 1102147


Ignore:
Timestamp:
02/28/2015 10:58:51 PM (11 years ago)
Author:
markzero
Message:

Add tests

Location:
wp-on-routes/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • wp-on-routes/trunk/README.md

    r906878 r1102147  
    7676```
    7777
     78In example above, if you target `/foo/a/b/c/bar/test`, browser will answer with HTTP status 200, with following code, with header and footer included:
     79
     80```
     81array (size=2)
     82  'p1' => string 'test' (length=4)
     83  'splats' =>
     84    array (size=1)
     85      0 => string 'a/b/c' (length=5)
     86```
     87
     88
     89
     90
     91Details
     92===
     93
    7894At this point there are several capabilities:
    7995
     
    881049. Include header and footer
    89105
     106
    90107Options you can set:
     108
    911091. `path` (string)
    921102. `body` OR `action` (string)
     
    941124. `include_template` (boolean; default: false)
    951135. `headers` (array)
    96 5.1 `exclude` (array)
     114  + `exclude` (array)
     115
     116
     117
     118Tests
     119===
     120
     121Reference to tests/instructions.txt to read how to test output of your WordPress website.
  • wp-on-routes/trunk/lib/path.php

    r906878 r1102147  
    118118
    119119  public function get_dir() {
    120     return $this->dirs[$this->dir_index];
     120    if (isset($this->dirs[$this->dir_index])) {
     121      return $this->dirs[$this->dir_index];
     122    }
    121123  }
    122124
  • wp-on-routes/trunk/wp-on-routes.php

    r914514 r1102147  
    33Plugin Name: WordPress on Routes
    44Description: Add API-like functionality to your WordPress instance.
    5 Version: 0.1.0
     5Version: 0.2.0
    66Plugin URI: https://github.com/markzero/wp-on-routes
    77Author: Marko Jakic
     
    3535
    3636
    37 define('WOR_VERSION', '0.1.0');
     37define('WOR_VERSION', '0.2.0');
    3838define('WOR_PATH', dirname(__FILE__));
    3939
Note: See TracChangeset for help on using the changeset viewer.