Skip to content

Commit

Permalink
Merge upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
cluke009 committed Dec 8, 2014
2 parents 5235220 + a6cd16d commit dcb1cd7
Show file tree
Hide file tree
Showing 40 changed files with 1,078 additions and 361 deletions.
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ env:
- WP_VERSION=latest WP_MULTISITE=1
- WP_VERSION=3.8 WP_MULTISITE=0
- WP_VERSION=3.8 WP_MULTISITE=1
- WP_VERSION=3.5 WP_MULTISITE=0
- WP_VERSION=3.5 WP_MULTISITE=1

before_script:
- bash tests/bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION
Expand Down
19 changes: 18 additions & 1 deletion CMB2.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,24 @@
* @return string Directory with optional path appended
*/
function cmb2_dir( $path = '' ) {
return trailingslashit( dirname( __FILE__ ) ) . $path;
return wp_normalize_path( trailingslashit( dirname( __FILE__ ) ) . $path );
}

if ( ! function_exists( 'wp_normalize_path' ) ) {
/**
* Normalize a filesystem path.
*
* Replaces backslashes with forward slashes for Windows systems, and ensures
* no duplicate slashes exist.
* Available in WordPress 3.9.0
*
* @since 2.0.0
* @param string $path Path to normalize.
* @return string Normalized path.
*/
function wp_normalize_path( $path ) {
return preg_replace( '|/+|','/', str_replace( '\\', '/', $path ) );
}
}

require_once cmb2_dir( 'includes/helper-functions.php' );
Expand Down
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ _Support is not offered for this library, and the likelihood that the maintainer
Before reporting a bug
---
1. Search issue tracker for similar issues.
2. Install the trunk version of CMB2.
2. ~~Install the trunk version of CMB2.~~ **(We'll be working form `master` until out of beta)**


How to report a bug
Expand All @@ -21,9 +21,9 @@ All contributions welcome. If you would like to submit a pull request, please fo

1. Make sure you have a GitHub account.
2. Fork the repository on GitHub.
3. **Check out the trunk version of CMB2.** If you submit to the master branch, the PR will be closed with a link back to this document.
4. **Verify your issue still exists in the trunk branch.**
3. ~~**Check out the trunk version of CMB2.** If you submit to the master branch, the PR will be closed with a link back to this document.~~
4. ~~**Verify your issue still exists in the trunk branch.**~~
5. Make changes to your clone of the repository.
6. Submit a pull request.
6. [Submit a pull request](https://help.github.com/articles/creating-a-pull-request/).

**Note:** You may gain more ground and avoid unecessary effort if you first open an issue with the proposed changes, but this step is not necessary.
Loading

0 comments on commit dcb1cd7

Please sign in to comment.