Skip to content

Commit

Permalink
Merge pull request #10 from WordPoints/develop
Browse files Browse the repository at this point in the history
1.1.3
  • Loading branch information
JDGrimes authored Oct 21, 2017
2 parents 511394a + 954b288 commit 156f03e
Show file tree
Hide file tree
Showing 20 changed files with 4,279 additions and 33 deletions.
1 change: 1 addition & 0 deletions .gitignore
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "dev-lib"]
path = dev-lib
url = https://github.com/WordPoints/dev-lib.git
57 changes: 57 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Travis CI configuration file for a WordPoints extension.

language: php

env:
- TRAVISCI_RUN=codesniff

dist: trusty

sudo: false

addons:
apt:
packages:
# Needed for `xmllint`.
- libxml2-utils

matrix:
include:
- php: 7.2
- php: 7.1
- php: 7.0
- php: 5.6
- php: 5.5
- php: 5.4
# Use Ubuntu Precise because Trusty doesn't support PHP 5.2 or 5.3.
- php: 5.3
dist: precise
env: TRAVISCI_RUN=codesniff DO_PHPCS=0
- php: 5.2
dist: precise
env: TRAVISCI_RUN=codesniff DO_PHPCS=0
# Run against nightly.
- php: nightly
allow_failures:
- php: nightly
- php: 7.2
fast_finish: true

before_script:
- export WORDPOINTS_PROJECT_TYPE=extension
- export DEV_LIB_PATH=dev-lib
- if [ -e .wordpoints-dev-lib-config.sh ]; then source .wordpoints-dev-lib-config.sh; fi
- source $DEV_LIB_PATH/travis/before_script.sh

script:
- codesniff-php-syntax
- codesniff-phpcs
- codesniff-strings
- codesniff-dittography
- codesniff-l10n
- codesniff-xmllint
- codesniff-bash
- codesniff-symlinks

after_script:
- source $DEV_LIB_PATH/travis/after_script.sh
20 changes: 20 additions & 0 deletions .wp-l10n-validator-cache.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"files": {
"\/includes\/actions.php": {
"size": 735,
"hash": "3b855aeb018eb2bd8e6156ef1a41bdc8",
"errors": false
},
"\/includes\/functions.php": {
"size": 2427,
"hash": "ccd168db751776a099c9aba9246e9adc",
"errors": false
},
"\/userpro.php": {
"size": 1747,
"hash": "f20764a3a8b16617d2759eab8b8b641e",
"errors": false
}
},
"config_signature": "97182cccfaf8938eb5fb978ca2fab902"
}
13 changes: 13 additions & 0 deletions .wp-l10n-validator-ignores-cache.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"\/includes\/functions.php": {
":": {
"45": {
"name": "esc_html",
"type": "unknown",
"args_started": true,
"arg_count": 0,
"parentheses": 1
}
}
}
}
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,18 @@ This project adheres to [Semantic Versioning](http://semver.org/) and [Keep a CH

Nothing documented right now.

## [1.1.3] - 2017-10-21

### Requires

- WordPoints: 2.4+

### Fixed

- Deprecated notices from `Module Name`, and `Module URI` extension headers.
- CSS files not being minified.
- Missing POT file.

## [1.1.2] - 2017-06-17

### Fixed
Expand Down Expand Up @@ -38,6 +50,7 @@ Nothing documented right now.
- Function to display points on the user's profile and on user cards.

[unreleased]: https://github.com/WordPoints/userpro/compare/master...HEAD
[1.1.3]: https://github.com/WordPoints/userpro/compare/1.1.2...1.1.3
[1.1.2]: https://github.com/WordPoints/userpro/compare/1.1.1...1.1.2
[1.1.1]: https://github.com/WordPoints/userpro/compare/1.1.0...1.1.1
[1.1.0]: https://github.com/WordPoints/userpro/compare/1.0.0...1.1.0
Expand Down
15 changes: 15 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/**
* Grunt configuration file.
*
* @package WordPoints_Dev_Lib
* @since 2.5.0
*/

/* jshint node:true */
module.exports = function( grunt ) {

// Load the default configuration from the dev-lib.
require( './dev-lib/grunt/modules/configure.js' )( grunt, __dirname );
};

// EOF
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991

Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/>
Copyright (C) 1989, 1991 Free Software Foundation, Inc., <https://fsf.org/>
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# UserPro [![HackerOne Bug Bounty Program](https://img.shields.io/badge/security-HackerOne-blue.svg)](https://hackerone.com/wordpoints)
# UserPro [![Build Status](https://travis-ci.org/WordPoints/userpro.svg?branch=develop)](https://travis-ci.org/WordPoints/userpro) [![HackerOne Bug Bounty Program](https://img.shields.io/badge/security-HackerOne-blue.svg)](https://hackerone.com/wordpoints)

Hello! This is where we develop the premium UserPro integration module that you
can [purchase on WordPoints.org](https://wordpoints.org/modules/userpro/).
The source code of the module is made available here in good faith, to make it easier
Hello! This is where we develop the premium UserPro integration extension that you
can [purchase on WordPoints.org](https://wordpoints.org/extensions/userpro/).
The source code of the extension is made available here in good faith, to make it easier
for developers to integrate with it, contribute bugfixes and security patches, and
follow the development of new features. You can also feel free to use this source
code to try the module out before you buy it. However, if you decide to use the
module on a production site, we ask that you [purchase a license for it](https://wordpoints.org/modules/userpro/),
code to try the extension out before you buy it. However, if you decide to use the
extension on a production site, we ask that you [purchase a license for it](https://wordpoints.org/extensions/userpro/),
so that we can continue to provide updates and support for WordPoints and all of its
great modules. Thank you!
great extensions. Thank you!
1 change: 1 addition & 0 deletions dev-lib
Submodule dev-lib added at c9f52b
19 changes: 19 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"devDependencies": {
"@martin-pettersson/wp-get-file-data": "^0.1.0",
"autoprefixer": "^6.6.1",
"grunt": "^1.0.0",
"grunt-browserify": "^5.0.0",
"grunt-contrib-cssmin": "^1.0.2",
"grunt-contrib-imagemin": "^1.0.1",
"grunt-contrib-uglify": "^2.0.0",
"grunt-contrib-watch": "^1.0.0",
"grunt-jsvalidate": "^0.2.2",
"grunt-newer": "^1.2.0",
"grunt-openport": "^1.0.0",
"grunt-postcss": "^0.8.0",
"grunt-rtlcss": "^2.0.1",
"grunt-sass": "~1.1.0",
"matchdep": "^1.0.1"
}
}
1 change: 1 addition & 0 deletions phpcs.ruleset.xml
1 change: 1 addition & 0 deletions src/assets/css/profile.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ div.wordpoints-userpro-user-points {
color: #fff;
background-color: #75737380;
padding: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
}
1 change: 1 addition & 0 deletions src/assets/css/profile.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/includes/actions.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* Hooks up actions and filters for the module.
* Hooks up actions and filters for the extension.
*
* @package WordPoints_UserPro
* @since 1.0.0
Expand Down
12 changes: 7 additions & 5 deletions src/includes/functions.php
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
<?php

/**
* The module's main functions.
* The extension's main functions.
*
* @package WordPoints_UserPro
* @since 1.0.0
*/

/**
* Registers the module's scripts and styles.
* Registers the extension's scripts and styles.
*
* @since 1.1.0
*/
function wordpoints_userpro_register_scripts() {

$suffix = SCRIPT_DEBUG ? '' : '.min';

wp_register_style(
'wordpoints-userpro-profile'
, wordpoints_modules_url( '/assets/css/profile.css', dirname( __FILE__ ) )
, wordpoints_extensions_url( "/assets/css/profile{$suffix}.css", dirname( __FILE__ ) )
);
}

Expand Down Expand Up @@ -70,7 +72,7 @@ function wordpoints_userpro_profile_link_filter( $username, $user_id ) {
$user_id = $user_id->ID;
}

return '<a href="'. esc_url( $userpro->permalink( $user_id ) ) . '">' . $username . '</a>';
return '<a href="' . esc_url( $userpro->permalink( $user_id ) ) . '">' . $username . '</a>';
}

/**
Expand All @@ -84,7 +86,7 @@ function wordpoints_userpro_profile_link_filter( $username, $user_id ) {
*/
function wordpoints_userpro_display_points_logs( $args ) {

if ( ! isset( $args['template'] ) || $args['template'] !== 'view' ) {
if ( ! isset( $args['template'] ) || 'view' !== $args['template'] ) {
return;
}

Expand Down
33 changes: 33 additions & 0 deletions src/languages/wordpoints-userpro.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Copyright (C) 2017 J.D. Grimes
# This file is distributed under the same license as the WordPoints UserPro package.
msgid ""
msgstr ""
"Project-Id-Version: WordPoints UserPro 1.1.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-10-21 14:30:28+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"PO-Revision-Date: 2017-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"

#. Description of the extension
msgid "Integrates with the UserPro plugin."
msgstr ""

#. Author of the extension
msgid "J.D. Grimes"
msgstr ""

#. Author URI of the extension
msgid "https://wordpoints.org/"
msgstr ""

#. Extension Name of the extension
msgid "UserPro"
msgstr ""

#. Extension URI of the extension
msgid "https://wordpoints.org/extensions/userpro/"
msgstr ""
38 changes: 19 additions & 19 deletions src/userpro.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* Main file of the module.
* Main file of the extension.
*
* ---------------------------------------------------------------------------------|
* Copyright 2017 J.D. Grimes (email : [email protected])
Expand All @@ -21,41 +21,41 @@
* ---------------------------------------------------------------------------------|
*
* @package WordPoints_UserPro
* @version 1.1.2
* @version 1.1.3
* @author J.D. Grimes <[email protected]>
* @license GPLv2+
*/

WordPoints_Modules::register(
wordpoints_register_extension(
'
Module Name: UserPro
Author: J.D. Grimes
Author URI: https://wordpoints.org/
Module URI: https://wordpoints.org/modules/userpro/
Version: 1.1.2
License: GPLv2+
Description: Integrates with the UserPro plugin.
Text Domain: wordpoints-userpro
Domain Path: /languages
Server: wordpoints.org
ID: 1153
Namespace: UserPro
Extension Name: UserPro
Author: J.D. Grimes
Author URI: https://wordpoints.org/
Extension URI: https://wordpoints.org/extensions/userpro/
Version: 1.1.3
License: GPLv2+
Description: Integrates with the UserPro plugin.
Text Domain: wordpoints-userpro
Domain Path: /languages
Server: wordpoints.org
ID: 1153
Namespace: UserPro
'
, __FILE__
);

/**
* The module's main functions.
* The extension's main functions.
*
* @since 1.0.0
*/
require_once( dirname( __FILE__ ) . '/includes/functions.php' );
require_once dirname( __FILE__ ) . '/includes/functions.php';

/**
* Hooks up the module's actions and filters.
* Hooks up the extension's actions and filters.
*
* @since 1.0.0
*/
require_once( dirname( __FILE__ ) . '/includes/actions.php' );
require_once dirname( __FILE__ ) . '/includes/actions.php';

// EOF
8 changes: 8 additions & 0 deletions wp-l10n-validator.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"textdomain": "wordpoints-userpro",
"basedir": "./src",
"bootstrap": "dev-lib/l10n-validator/bootstrap.php",
"cache": "./.wp-l10n-validator-cache.json",
"ignores-cache": "./.wp-l10n-validator-ignores-cache.json",
"ignores-tolerance": 25
}
Loading

0 comments on commit 156f03e

Please sign in to comment.