Skip to content

Commit

Permalink
Merge pull request #13 from brainstormforce/wp-compatibility
Browse files Browse the repository at this point in the history
WP 5.6  Compatibility
  • Loading branch information
patilvikasj authored Jan 15, 2021
2 parents abeb34f + d5f1451 commit 7f988ef
Show file tree
Hide file tree
Showing 11 changed files with 3,679 additions and 634 deletions.
30 changes: 30 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
sudo: false

language: php

notifications:
email:
on_success: never
on_failure: change

cache:
- $HOME/.composer/cache

matrix:
include:
- php: 7.4snapshot
env: WP_TRAVISCI=phpcs

dist: trusty

before_script:
- |
if [[ "$WP_TRAVISCI" == "phpcs" ]] ; then
composer install
fi
script:
- |
if [[ "$WP_TRAVISCI" == "phpcs" ]] ; then
vendor/bin/phpcs
fi
- if find . -name "*.php" ! -path "./vendor/*" ! -path "./admin/bsf-core/*" -exec php -l {} \; | grep "Errors parsing"; then exit 1; fi
70 changes: 69 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
module.exports = function( grunt ) {


'use strict';
var banner = '/**\n * <%= pkg.homepage %>\n * Copyright (c) <%= grunt.template.today("yyyy") %>\n * This file is generated automatically. Do not edit.\n */\n';

var pkgInfo = grunt.file.readJSON('package.json');

// Project configuration
grunt.initConfig( {

Expand Down Expand Up @@ -31,7 +35,7 @@ module.exports = function( grunt ) {
target: {
options: {
domainPath: '/languages',
mainFile: 'edd-simple-after-payment-redirect.php',
mainFile: 'class-edd-simple-after-payment-redirect.php',
potFilename: 'edd-simple-after-payment-redirect.pot',
potHeaders: {
poedit: true,
Expand All @@ -42,13 +46,77 @@ module.exports = function( grunt ) {
}
}
},

copy: {
main: {
options: {
mode: true
},
src: [
'**',
'*.zip',
'!node_modules/**',
'!build/**',
'!css/sourcemap/**',
'!.git/**',
'!bin/**',
'!.gitlab-ci.yml',
'!bin/**',
'!tests/**',
'!phpunit.xml.dist',
'!*.sh',
'!*.map',
'!Gruntfile.js',
'!package.json',
'!.gitignore',
'!phpunit.xml',
'!README.md',
'!codesniffer.ruleset.xml',
'!vendor/**',
'!admin/bsf-core/vendor/**',
'!composer.json',
'!composer.lock',
'!package-lock.json',
'!phpcs.xml.dist',
],
dest: 'edd-simple-after-payment-redirect/'
}
},

compress: {
main: {
options: {
archive: 'edd-simple-after-payment-redirect-' + pkgInfo.version + '.zip',
mode: 'zip'
},
files: [
{
src: [
'./edd-simple-after-payment-redirect/**'
]

}
]
}
},

clean: {
main: ["edd-simple-after-payment-redirect"],
zip: ["*.zip"]
},
} );

grunt.loadNpmTasks( 'grunt-wp-i18n' );
grunt.loadNpmTasks( 'grunt-wp-readme-to-markdown' );
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-compress');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.registerTask( 'i18n', ['addtextdomain', 'makepot'] );
grunt.registerTask( 'readme', ['wp_readme_to_markdown'] );

// Grunt release - Create installable package of the local files
grunt.registerTask('release', ['clean:zip', 'copy', 'compress', 'clean:main']);

grunt.util.linefeed = '\n';

};
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
**Donate link:** https://www.paypal.me/BrainstormForce
**Tags:** edd, payment, redirect
**Requires at least:** 4.4
**Tested up to:** 5.5
**Stable tag:** 1.0.2
**Tested up to:** 5.6
**Stable tag:** 1.0.3
**License:** GPLv2 or later
**License URI:** http://www.gnu.org/licenses/gpl-2.0.html

Expand All @@ -27,6 +27,9 @@ e.g.

## Changelog ##

### 1.0.3 ###
- Security: Use escaping for displaying purchase details string.

### 1.0.2 ###
- Passing payment ID parameter to redirect URL after successful purchase.

Expand Down
Loading

0 comments on commit 7f988ef

Please sign in to comment.