diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..72cf9d0
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,4 @@
+[submodule "dev-lib"]
+ path = dev-lib
+ url = https://github.com/xwp/wp-plugin-dev-lib.git
+ branch = vip-themes
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..b0ba908
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,27 @@
+language:
+ - php
+ - node_js
+
+php:
+ - 5.4
+ - 5.5
+
+node_js:
+ - 0.10
+
+env:
+ - WP_VERSION=latest WP_MULTISITE=0
+ - WP_VERSION=latest WP_MULTISITE=1
+ - WP_VERSION=4.0 WP_MULTISITE=0
+ - WP_VERSION=4.0 WP_MULTISITE=1
+
+before_script:
+ - export DEV_LIB_PATH=dev-lib
+ - if [ ! -e "$DEV_LIB_PATH" ] && [ -L .travis.yml ]; then export DEV_LIB_PATH=$( dirname $( readlink .travis.yml ) ); fi
+ - source $DEV_LIB_PATH/travis.before_script.sh
+
+script:
+ - $DEV_LIB_PATH/travis.script.sh
+
+after_script:
+ - $DEV_LIB_PATH/travis.after_script.sh
diff --git a/bin/.jshintrc b/bin/.jshintrc
deleted file mode 100644
index bf11264..0000000
--- a/bin/.jshintrc
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "boss": true,
- "curly": true,
- "eqeqeq": true,
- "eqnull": true,
- "expr": true,
- "immed": true,
- "noarg": true,
- "quotmark": "single",
- "trailing": true,
- "undef": true,
- "unused": true,
-
- "browser": true,
-
- "globals": {
- "jQuery": false,
- "wp": false
- }
-}
diff --git a/bin/.travis.yml b/bin/.travis.yml
deleted file mode 100644
index 24bf630..0000000
--- a/bin/.travis.yml
+++ /dev/null
@@ -1,38 +0,0 @@
-language:
- - php
- - node_js
-
-php:
- - 5.3
- - 5.4
-
-node_js:
- - 0.10
-
-env:
- - WP_VERSION=latest WP_MULTISITE=0
- - WP_VERSION=latest WP_MULTISITE=1
- - WP_VERSION=3.8 WP_MULTISITE=0
- - WP_VERSION=3.8 WP_MULTISITE=1
-
-before_script:
- - export WP_TESTS_DIR=/tmp/wordpress-tests/
- - export PLUGIN_DIR=$(pwd)
- - export PLUGIN_SLUG=$(basename $(pwd) | sed 's/^wp-//')
- - export PHPCS_DIR=/tmp/phpcs
- - export PHPCS_GITHUB_SRC=squizlabs/PHP_CodeSniffer
- - export PHPCS_GIT_TREE=master
- - export WPCS_GITHUB_SRC=WordPress-Coding-Standards/WordPress-Coding-Standards
- - export WPCS_GIT_TREE=master
- - export WPCS_STANDARD=$(if [ -e phpcs.ruleset.xml ]; then echo phpcs.ruleset.xml; else echo WordPress; fi)
- - if [ -e .ci-env.sh ]; then source .ci-env.sh; fi
- - if [ -e phpunit.xml ] || [ -e phpunit.xml.dist ]; then wget -O /tmp/install-wp-tests.sh https://raw.githubusercontent.com/wp-cli/wp-cli/master/templates/install-wp-tests.sh; bash /tmp/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION; cd /tmp/wordpress/wp-content/plugins; ln -s $PLUGIN_DIR $PLUGIN_SLUG; cd $PLUGIN_DIR; fi
- - mkdir -p $PHPCS_DIR && curl -L https://github.com/$PHPCS_GITHUB_SRC/archive/$PHPCS_GIT_TREE.tar.gz | tar xvz --strip-components=1 -C $PHPCS_DIR
- - mkdir -p $PHPCS_DIR/CodeSniffer/Standards/WordPress && curl -L https://github.com/$WPCS_GITHUB_SRC/archive/$WPCS_GIT_TREE.tar.gz | tar xvz --strip-components=1 -C $PHPCS_DIR/CodeSniffer/Standards/WordPress
- - npm install -g jshint
-
-script:
- - find . -path ./bin -prune -o \( -name '*.php' -o -name '*.inc' \) -exec php -lf {} \;
- - if [ -e phpunit.xml ] || [ -e phpunit.xml.dist ]; then phpunit; fi
- - $PHPCS_DIR/scripts/phpcs --standard=$WPCS_STANDARD $(if [ -n "$PHPCS_IGNORE" ]; then echo --ignore=$PHPCS_IGNORE; fi) $(find . -name '*.php')
- - jshint .
diff --git a/bin/class-wordpress-readme-parser.php b/bin/class-wordpress-readme-parser.php
deleted file mode 100644
index 9dc56f4..0000000
--- a/bin/class-wordpress-readme-parser.php
+++ /dev/null
@@ -1,203 +0,0 @@
- (@westonruter)
- * @copyright Copyright (c) 2013, X-Team
- * @license GPLv2+
- */
-
-class WordPress_Readme_Parser {
- public $path;
- public $source;
- public $title = '';
- public $short_description = '';
- public $metadata = array();
- public $sections = array();
-
- function __construct( $args = array() ) {
- $args = array_merge( get_object_vars( $this ), $args );
- foreach ( $args as $key => $value ) {
- $this->$key = $value;
- }
-
- $this->source = file_get_contents( $this->path );
- if ( ! $this->source ) {
- throw new Exception( 'readme.txt was empty or unreadable' );
- }
-
- // Parse metadata
- $syntax_ok = preg_match( '/^=== (.+?) ===\n(.+?)\n\n(.+?)\n(.+)/s', $this->source, $matches );
- if ( ! $syntax_ok ) {
- throw new Exception( 'Malformed metadata block' );
- }
- $this->title = $matches[1];
- $this->short_description = $matches[3];
- $readme_txt_rest = $matches[4];
- $this->metadata = array_fill_keys( array( 'Contributors', 'Tags', 'Requires at least', 'Tested up to', 'Stable tag', 'License', 'License URI' ), null );
- foreach ( explode( "\n", $matches[2] ) as $metadatum ) {
- if ( ! preg_match( '/^(.+?):\s+(.+)$/', $metadatum, $metadataum_matches ) ) {
- throw new Exception( "Parse error in $metadatum" );
- }
- list( $name, $value ) = array_slice( $metadataum_matches, 1, 2 );
- $this->metadata[ $name ] = $value;
- }
- $this->metadata['Contributors'] = preg_split( '/\s*,\s*/', $this->metadata['Contributors'] );
- $this->metadata['Tags'] = preg_split( '/\s*,\s*/', $this->metadata['Tags'] );
-
- $syntax_ok = preg_match_all( '/(?:^|\n)== (.+?) ==\n(.+?)(?=\n== |$)/s', $readme_txt_rest, $section_matches, PREG_SET_ORDER );
- if ( ! $syntax_ok ) {
- throw new Exception( 'Failed to parse sections from readme.txt' );
- }
- foreach ( $section_matches as $section_match ) {
- array_shift( $section_match );
-
- $heading = array_shift( $section_match );
- $body = trim( array_shift( $section_match ) );
- $subsections = array();
-
- // @todo Parse out front matter /(.+?)(\n=\s+.+$)/s
-
- // Parse subsections
- if ( preg_match_all( '/(?:^|\n)= (.+?) =\n(.+?)(?=\n= |$)/s', $body, $subsection_matches, PREG_SET_ORDER ) ) {
- $body = null;
- foreach ( $subsection_matches as $subsection_match ) {
- array_shift( $subsection_match );
- $subsections[] = array(
- 'heading' => array_shift( $subsection_match ),
- 'body' => trim( array_shift( $subsection_match ) ),
- );
- }
- }
-
- $this->sections[] = compact( 'heading', 'body', 'subsections' );
- }
- }
-
- /**
- * Convert the parsed readme.txt into Markdown
- * @param array|string [$params]
- * @return string
- */
- function to_markdown( $params = array() ) {
-
- $general_section_formatter = function ( $body ) use ( $params ) {
- $body = preg_replace(
- '#\[youtube\s+(?:http://www\.youtube\.com/watch\?v=|http://youtu\.be/)(.+?)\]#',
- '[](http://www.youtube.com/watch?v=$1)',
- $body
- );
- return $body;
- };
-
- // Parse sections
- $section_formatters = array(
- 'Description' => function ( $body ) use ( $params ) {
- if ( isset( $params['travis_ci_url'] ) ) {
- $body .= sprintf( "\n\n[](%s)", $params['travis_ci_url'], $params['travis_ci_url'] );
- }
- return $body;
- },
- 'Screenshots' => function ( $body ) {
- $body = trim( $body );
- $new_body = '';
- if ( ! preg_match_all( '/^\d+\. (.+?)$/m', $body, $screenshot_matches, PREG_SET_ORDER ) ) {
- throw new Exception( 'Malformed screenshot section' );
- }
- foreach ( $screenshot_matches as $i => $screenshot_match ) {
- $img_extensions = array( 'jpg', 'gif', 'png' );
- foreach ( $img_extensions as $ext ) {
- $filepath = sprintf( 'assets/screenshot-%d.%s', $i + 1, $ext );
- if ( file_exists( dirname( $this->path ) . DIRECTORY_SEPARATOR . $filepath ) ) {
- break;
- }
- else {
- $filepath = null;
- }
- }
- if ( empty( $filepath ) ) {
- continue;
- }
-
- $screenshot_name = $screenshot_match[1];
- $new_body .= sprintf( "### %s\n", $screenshot_name );
- $new_body .= "\n";
- $new_body .= sprintf( "\n", $screenshot_name, $filepath );
- $new_body .= "\n";
- }
- return $new_body;
- },
- );
-
- // Format metadata
- $formatted_metadata = $this->metadata;
- $formatted_metadata['Contributors'] = join(
- ', ',
- array_map(
- function ( $contributor ) {
- $contributor = strtolower( $contributor );
- // @todo Map to GitHub account
- return sprintf( '[%1$s](http://profiles.wordpress.org/%1$s)', $contributor );
- },
- $this->metadata['Contributors']
- )
- );
- $formatted_metadata['Tags'] = join(
- ', ',
- array_map(
- function ( $tag ) {
- return sprintf( '[%1$s](http://wordpress.org/plugins/tags/%1$s)', $tag );
- },
- $this->metadata['Tags']
- )
- );
- $formatted_metadata['License'] = sprintf( '[%s](%s)', $formatted_metadata['License'], $formatted_metadata['License URI'] );
- unset( $formatted_metadata['License URI'] );
- if ( $this->metadata['Stable tag'] === 'trunk' ) {
- $formatted_metadata['Stable tag'] .= ' (master)';
- }
-
- // Render metadata
- $markdown = "\n";
- $markdown .= sprintf( "# %s\n", $this->title );
- $markdown .= "\n";
- if ( file_exists( 'assets/banner-1544x500.png' ) ) {
- $markdown .= '';
- $markdown .= "\n";
- }
- $markdown .= sprintf( "%s\n", $this->short_description );
- $markdown .= "\n";
- foreach ( $formatted_metadata as $name => $value ) {
- $markdown .= sprintf( "**%s:** %s \n", $name, $value );
- }
- $markdown .= "\n";
-
- foreach ( $this->sections as $section ) {
- $markdown .= sprintf( "## %s ##\n", $section['heading'] );
- $markdown .= "\n";
-
- $body = $section['body'];
-
- $body = call_user_func( $general_section_formatter, $body );
- if ( isset( $section_formatters[ $section['heading'] ] ) ) {
- $body = trim( call_user_func( $section_formatters[ $section['heading'] ], $body ) );
- }
-
- if ( $body ) {
- $markdown .= sprintf( "%s\n", $body );
- }
- foreach ( $section['subsections'] as $subsection ) {
- $markdown .= sprintf( "### %s ###\n", $subsection['heading'] );
- $markdown .= sprintf( "%s\n", $subsection['body'] );
- $markdown .= "\n";
- }
-
- $markdown .= "\n";
- }
-
- return $markdown;
- }
-
-}
diff --git a/bin/contributing.md b/bin/contributing.md
deleted file mode 100644
index 8d23e4b..0000000
--- a/bin/contributing.md
+++ /dev/null
@@ -1,3 +0,0 @@
-Pull requests should be opened with the `develop` branch as the base. Do not
-open pull requests into the `master` branch, as this branch contains the latest
-stable release.
diff --git a/bin/generate-markdown-readme b/bin/generate-markdown-readme
deleted file mode 100755
index f059aae..0000000
--- a/bin/generate-markdown-readme
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/usr/bin/env php
- (@westonruter)
- * @copyright Copyright (c) 2013, X-Team
- * @license GPLv2+
- */
-
-try {
- if ( php_sapi_name() !== 'cli' ) {
- throw new Exception( 'Only allowed in CLI mode.' );
- }
-
- $readme_txt_path = null;
- while ( true ) {
- foreach ( array( 'readme.txt', 'README.txt' ) as $readme_filename ) {
- if ( file_exists( $readme_filename ) ) {
- $readme_txt_path = realpath( $readme_filename );
- break;
- }
- }
-
- $old_cwd = getcwd();
- if ( ! empty( $readme_txt_path ) || ! chdir( '..' ) || getcwd() === $old_cwd ) {
- break;
- }
- }
- if ( empty( $readme_txt_path ) ) {
- throw new Exception( 'Failed to find a readme.txt or README.txt above the current working directory.' );
- }
-
- $readme_root = dirname( $readme_txt_path );
- $readme_md_path = preg_replace( '/txt$/', 'md', $readme_txt_path );
-
- require_once __DIR__ . '/class-wordpress-readme-parser.php';
-
- $readme = new WordPress_Readme_Parser( array( 'path' => $readme_txt_path ) );
-
- $md_args = array();
- if ( file_exists( $readme_root . '/.travis.yml' ) ) {
- $md_args['travis_ci_url'] = preg_replace( '#.+github\.com[:/]([^/]+/[^/]+)\.git$#', 'https://travis-ci.org/$1', trim( `git config --get remote.origin.url` ) );
- }
- $markdown = $readme->to_markdown( $md_args );
-
- $is_written = file_put_contents( $readme_md_path, $markdown );
- if ( ! $is_written ) {
- throw new Exception( sprintf( 'Failed to write to %s', $readme_md_path ) );
- }
- fwrite( STDERR, 'Successfully converted WordPress README to Markdown' . PHP_EOL );
- fwrite( STDOUT, $readme_md_path . PHP_EOL );
-}
-catch( Exception $e ) {
- fwrite( STDERR, $e->getMessage() . PHP_EOL );
- exit( 1 );
-}
diff --git a/bin/phpcs.ruleset.xml b/bin/phpcs.ruleset.xml
deleted file mode 100644
index 07233ba..0000000
--- a/bin/phpcs.ruleset.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
- Generally-applicable sniffs for WordPress plugins
-
-
-
-
-
-
-
- /tests/*
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/bin/pre-commit b/bin/pre-commit
deleted file mode 100755
index 9495a6d..0000000
--- a/bin/pre-commit
+++ /dev/null
@@ -1,99 +0,0 @@
-#!/bin/bash
-# WordPress Plugin pre-commit hook
-
-set -e
-
-WPCS_STANDARD=$(if [ -e phpcs.ruleset.xml ]; then echo phpcs.ruleset.xml; else echo WordPress; fi)
-if [ -e .ci-env.sh ]; then
- source .ci-env.sh
-fi
-
-message="Checking staged changes..."
-git_status_egrep='^[MARC].+'
-
-for i; do
- case "$i"
- in
- -m)
- message="Checking any uncommitted changes..."
- git_status_egrep='^.?[MARC].+'
- shift;;
- esac
-done
-
-echo $message
-
-# Check for staged JS files
-IFS=$'\n' staged_js_files=( $(git status --porcelain | sed 's/[^ ]* -> *//g' | egrep $git_status_egrep'\.js$' | cut -c4-) )
-if [ ${#staged_js_files[@]} != 0 ]; then
- # JSHint
- if [ -e .jshintrc ]; then
- echo "## jslint"
- if command -v jshint >/dev/null 2>&1; then
- jshint "${staged_js_files[@]}"
- else
- echo "Skipping jshint since not installed"
- fi
- fi
-
-fi
-
-# Check for staged PHP files
-IFS=$'\n' staged_php_files=( $(git status --porcelain | sed 's/[^ ]* -> *//g' | egrep $git_status_egrep'\.php$' | cut -c4-) )
-if [ ${#staged_php_files[@]} != 0 ]; then
- # PHP Syntax Check
- for php_file in "${staged_php_files[@]}"; do
- php -lf $php_file
- done
-
- # PHPUnit
- if [ -e phpunit.xml ] || [ -e phpunit.xml.dist ]; then
- echo "## phpunit"
- if [ "$USER" != 'vagrant' ]; then
-
- # Check if we're in VVV
- plugin_dir=$(pwd)
- while [ ! -e Vagrantfile ]; do
- if [ $(pwd) == '/' ] || [ "$last_dir" == $(pwd) ]; then
- break
- fi
- last_dir=$(pwd)
- cd ..
- done
- if [ -e Vagrantfile ] && grep -q vvv Vagrantfile; then
- vvv_root=$(pwd)
- absolute_vvv_plugin_path=/srv${plugin_dir:${#vvv_root}}
- fi
- cd $plugin_dir
-
- if [ ! -z "$absolute_vvv_plugin_path" ]; then
- echo "Running phpunit in VVV"
- vagrant ssh -c "cd $absolute_vvv_plugin_path && phpunit"
- elif command -v vassh >/dev/null 2>&1; then
- echo "Running phpunit in vagrant via vassh..."
- vassh phpunit
- fi
- elif ! command -v phpunit >/dev/null 2>&1;then
- echo "Skipping phpunit since not installed"
- elif [ -z "$WP_TESTS_DIR" ]; then
- echo "Skipping phpunit since WP_TESTS_DIR env missing"
- else
- phpunit
- fi
- fi
-
- # PHP_CodeSniffer WordPress Coding Standards
- echo "## phpcs"
- if command -v phpcs >/dev/null 2>&1; then
- phpcs -p -s -v --standard=$WPCS_STANDARD $(if [ -n "$PHPCS_IGNORE" ]; then echo --ignore=$PHPCS_IGNORE; fi) "${staged_php_files[@]}"
- else
- echo "Skipping phpcs since not installed"
- fi
-fi
-
-# Make sure the readme.md never gets out of sync with the readme.txt
-generate_markdown_readme=$(find . -name generate-markdown-readme -print -quit)
-if [ -n "$generate_markdown_readme" ]; then
- markdown_readme_path=$($generate_markdown_readme)
- git add $markdown_readme_path
-fi
diff --git a/bin/readme.md b/bin/readme.md
deleted file mode 100644
index ebd8268..0000000
--- a/bin/readme.md
+++ /dev/null
@@ -1,65 +0,0 @@
-wp-plugin-dev-lib
-=================
-
-**Common code used during development of WordPress plugins**
-
-It is intended that this repo be included in plugin repo via git-subtree/submodule in a `bin/` directory.
-
-To **add** it to your repo, do:
-
-```bash
-git subtree add --prefix bin \
- git@github.com:x-team/wp-plugin-dev-lib.git master --squash
-```
-
-To **update** the library with the latest changes:
-
-```bash
-git subtree pull --prefix bin \
- git@github.com:x-team/wp-plugin-dev-lib.git master --squash
-```
-
-And if you have changes you want to **upstream**, do:
-
-```bash
-git subtree push --prefix bin \
- git@github.com:x-team/wp-plugin-dev-lib.git master
-```
-
-Symlink to the `.travis.yml`, `.jshintrc`, and `phpcs.ruleset.xml` inside of the `bin/` directory you added:
-
-```bash
-ln -s bin/.travis.yml . && git add .travis.yml
-ln -s bin/.jshintrc . && git add .jshintrc
-ln -s bin/phpcs.ruleset.xml . && git add phpcs.ruleset.xml
-```
-
-Symlink to `pre-commit` from your project's `.git/hooks/pre-commit`:
-
-```bash
-cd .git/hooks
-ln -s ../../bin/pre-commit .
-```
-
-You may customize the behavior of the `.travis.yml` and `pre-commit` hook by
-specifying a `.ci-env.sh` in the root of the repo, for example:
-
-```bash
-export PHPCS_GITHUB_SRC=x-team/PHP_CodeSniffer
-export PHPCS_GIT_TREE=subset-selection
-export WPCS_GIT_TREE=rule-subset-with-phpcs-pr
-export WPCS_STANDARD=WordPress:core-extra
-export PHPCS_IGNORE='tests/*,includes/vendor/*'
-```
-
-The library includes a WordPress README [parser](class-wordpress-readme-parser.php) and [converter](generate-markdown-readme) to Markdown,
-so you don't have to manually keep your `readme.txt` on WordPress.org in sync with the `readme.md` you have on GitHub. The
-converter will also automatically recognize the presence of projects with Travis CI and include the status image
-in the markdown. Screenshots and banner images for WordPress.org are also automatically incorporated into the `readme.md`.
-
-What is also included in this repo is an [`svn-push`](svn-push) to push commits from a GitHub repo to the WordPress.org SVN repo for the plugin.
-The `/assets/` directory in the root of the project will get automatically moved one directory above in the SVN repo (alongside
-`trunk`, `branches`, and `tags`). To use, include an `svn-url` file in the root of your repo and let this file contains he full root URL
-to the WordPress.org repo for plugin (don't include `trunk`).
-
-The utilities in this project were first developed to facilitate development of [X-Team](http://x-team.com/wordpress/)'s [plugins](http://profiles.wordpress.org/x-team/).
diff --git a/bin/svn-push b/bin/svn-push
deleted file mode 100755
index c573756..0000000
--- a/bin/svn-push
+++ /dev/null
@@ -1,157 +0,0 @@
-#!/bin/bash
-# Given a svn-url file one directory up, export the latest git commits to the specified SVN repo.
-# Create a git release tag from the version specified in the plugin file.
-# Author: Weston Ruter (@westonruter)
-
-set -e
-
-cd $(dirname $0)/..
-
-if [ ! -e svn-url ]; then
- echo "Error: Missing svn-url file" >&2
- exit 1
-fi
-
-force=
-while getopts 'f' option; do
- case $option in
- f)
- force=1
- ;;
- esac
-done
-
-if [ -n "$(git status -s -uno)" ] && [ -z "$force" ]; then
- git status
- echo "Error: Git state has modified or staged files. Commit or reset, or supply -f" >&2
- exit 1
-fi
-
-git_root=$(pwd)
-
-current_branch=$(git rev-parse --abbrev-ref HEAD)
-if [ $current_branch != 'master' ]; then
- git checkout master
-fi
-
-bin/generate-markdown-readme
-git add readme.md
-if [ -n "$(git status --porcelain readme.md)" ]; then
- echo "Please commit (--amend?) the updated readme.md"
- exit 1
-fi
-
-git pull origin master
-git push origin master
-svn_url=$(cat svn-url)
-svn_repo_dir=/tmp/svn-$(basename $git_root)-$(md5sum <<< $git_root | cut -c1-32)
-
-for php in *.php; do
- if grep -q 'Plugin Name:' $php && grep -q 'Version:' $php; then
- plugin_version=$(cat $php | grep 'Version:' | sed 's/.*Version: *//')
- fi
-done
-
-if [ -z "$plugin_version" ]; then
- echo "Unable to find plugin version"
- exit 1
-fi
-
-if ! grep -q "$plugin_version" readme.txt; then
- echo "Please update readme.txt to include $plugin_version in changelog"
- exit 1
-fi
-
-if git show-ref --tags --quiet --verify -- "refs/tags/$plugin_version"; then
- has_tag=1
-fi
-
-if [ -n "$has_tag" ] && [ -z "$force" ]; then
- echo "Plugin version $plugin_version already tagged. Please bump version and try again, or supply -f"
- exit 1
-fi
-
-if [ -z "$has_tag" ]; then
- echo "Tagging plugin version $plugin_version"
- git tag "$plugin_version" master
- git push origin "$plugin_version"
-else
- echo "Skipping plugin tag $plugin_version since already exists"
-fi
-
-if [ -e $svn_repo_dir ] && [ ! -e $svn_repo_dir/.svn ]; then
- rm -rf $svn_repo_dir
-fi
-if [ ! -e $svn_repo_dir ]; then
- svn checkout $svn_url $svn_repo_dir
- cd $svn_repo_dir
-else
- cd $svn_repo_dir
- svn up
-fi
-
-cd $git_root
-
-# rsync all cached files and their directories
-cat <(
- git ls-files --cached --full-name $git_root \
- &
- git ls-files --cached --full-name $git_root | xargs -I {} dirname {} | sort | uniq
-) | sort | rsync -avz --delete --delete-excluded --include-from=- --exclude='*' ./ $svn_repo_dir/trunk/
-
-cd $svn_repo_dir/trunk
-
-# move assets directory to proper location in SVN
-if [ -d assets ]; then
- rsync -avz --delete ./assets/ ../assets/
- rm -r ./assets/
-fi
-
-# convert .gitignores to svn:ignore
-for gitignore in $(find . -name .gitignore); do
- echo "Convert $gitignore to svn:global-ignores"
- svn propset svn:global-ignores -F $gitignore $(dirname $gitignore)
- svn rm --force $gitignore
-done
-
-cd $svn_repo_dir
-
-# Delete any files from SVN that are no longer there
-svn status . | grep "^\!" | sed 's/^\! *//g' | xargs svn rm
-
-# Add everything left to commit
-if [ -d assets ]; then
- svn add --force assets
-fi
-svn add --force trunk
-
-# Do SVN commit
-svn_commit_file=$svn_repo_dir/COMMIT_MSG
-last_pushed_commit=$(svn log -l 1 | grep -E -o '^commit ([0-9a-f]{5,})' | head -n 1 | cut -c8-)
-
-cd $git_root
-
-git log -1 --format="Update to commit %h from $(git config --get remote.origin.url)" > $svn_commit_file
-echo >> $svn_commit_file
-echo 'Includes the following commit(s):' >> $svn_commit_file
-echo >> $svn_commit_file
-
-echo -n 'Obtaining last commit pushed to SVN...'
-git_log_args='--pretty=short --name-status --color=never'
-if [ -z "$last_pushed_commit" ]; then
- echo "none; starting from beginning"
- git log $git_log_args >> $svn_commit_file
-else
- echo "$last_pushed_commit"
- git log $git_log_args $last_pushed_commit..HEAD >> $svn_commit_file
-fi
-
-cd $svn_repo_dir
-
-svn commit -F $svn_commit_file
-rm $svn_commit_file
-
-# Restore branch
-if [ $current_branch != 'master' ]; then
- git checkout $current_branch
-fi
diff --git a/dev-lib b/dev-lib
new file mode 160000
index 0000000..e4e1607
--- /dev/null
+++ b/dev-lib
@@ -0,0 +1 @@
+Subproject commit e4e16073493f6c27bb181bb78e3bfe1826088de8
diff --git a/post-custom-content.php b/post-custom-content.php
index 7b38dad..bca6b07 100644
--- a/post-custom-content.php
+++ b/post-custom-content.php
@@ -3,8 +3,8 @@
* Plugin Name: Custom Content for Individual Posts
* Description: This plugin allows you to add (unfiltered) content into one or more fields for individual posts (or other post types) and then place that content into the post body by a short code. You can also have the content of those fields automatically appended to the content of the post.
* Version: 1.0.0
- * Author: X-Team, Dzikri Aziz, Akeda Bagus, Andrej Ciho
- * Author URI: http://x-team.com/wordpress/
+ * Author: XWP, Dzikri Aziz, Akeda Bagus, Andrej Ciho
+ * Author URI: https://xwp.co/
*/
use XTeam\Custom_Content;