From 4808b6c0bdd6a9fa3cfa90d81455d944d3684a5f Mon Sep 17 00:00:00 2001 From: JDGrimes Date: Tue, 3 Feb 2015 16:12:31 -0500 Subject: [PATCH 01/65] 1.10.0-alpha --- src/includes/constants.php | 2 +- src/wordpoints.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/includes/constants.php b/src/includes/constants.php index f1f632ac..e0e69c5f 100644 --- a/src/includes/constants.php +++ b/src/includes/constants.php @@ -16,7 +16,7 @@ * * @const WORDPOINTS_VERSION */ -define( 'WORDPOINTS_VERSION', '1.9.0' ); +define( 'WORDPOINTS_VERSION', '1.10.0-alpha' ); /** * The full path to the plugin's main directory. diff --git a/src/wordpoints.php b/src/wordpoints.php index 0e1a9cd0..6a5e2ca7 100644 --- a/src/wordpoints.php +++ b/src/wordpoints.php @@ -4,7 +4,7 @@ * Plugin Name: WordPoints * Plugin URI: http://wordpoints.org/ * Description: Create one or more points systems for your site, and reward user activity. - * Version: 1.9.0 + * Version: 1.10.0-alpha * Author: J.D. Grimes * Author URI: http://codesymphony.co/ * License: GPLv2 @@ -40,7 +40,7 @@ * * @package WordPoints * @author J.D. Grimes - * @version 1.9.0 + * @version 1.10.0-alpha * @license http://opensource.org/licenses/gpl-license.php GPL, version 2 or later. * @copyright 2013-2015 J.D. Grimes */ From 6f301503cbfba360659495c58c27a27f488b7670 Mon Sep 17 00:00:00 2001 From: JDGrimes Date: Thu, 5 Feb 2015 11:26:31 -0500 Subject: [PATCH 02/65] Output the values for hidden rank fields Fixes #269 --- src/components/ranks/includes/class-wordpoints-rank-type.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ranks/includes/class-wordpoints-rank-type.php b/src/components/ranks/includes/class-wordpoints-rank-type.php index b60a2fda..f4ca03ca 100644 --- a/src/components/ranks/includes/class-wordpoints-rank-type.php +++ b/src/components/ranks/includes/class-wordpoints-rank-type.php @@ -211,7 +211,7 @@ final public function display_rank_meta_form_fields( value="<% if ( typeof !== "undefined" ) { print( ); } %>" - value="" + value="" class="widefat" /> From b162621ce5d1753d16e4b3b8ced93007707cd8c8 Mon Sep 17 00:00:00 2001 From: JDGrimes Date: Thu, 5 Feb 2015 11:27:10 -0500 Subject: [PATCH 03/65] Inline docs for the $args parameter Working on #269 --- .../ranks/includes/class-wordpoints-rank-type.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/components/ranks/includes/class-wordpoints-rank-type.php b/src/components/ranks/includes/class-wordpoints-rank-type.php index f4ca03ca..fa1de019 100644 --- a/src/components/ranks/includes/class-wordpoints-rank-type.php +++ b/src/components/ranks/includes/class-wordpoints-rank-type.php @@ -171,6 +171,14 @@ final public function get_meta_fields() { * @since 1.7.0 * * @param array $meta The metadata for a rank of this type. + * @param array $args { + * Arguments controlling the way the fields are displayed. + * + * @type bool $placeholders Whether to just display Underscore template + * placeholders instead of the actual field + * values. Default is false. Does not affect + * hidden fields. + * } */ final public function display_rank_meta_form_fields( array $meta = array(), From b2c4a4328b17d0d53e34e8e0f2530e7bf671c788 Mon Sep 17 00:00:00 2001 From: JDGrimes Date: Thu, 5 Feb 2015 11:29:32 -0500 Subject: [PATCH 04/65] Display rank field values when placeholders off MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is the way it was supposed to work, but the condition was convoluted, and ultimately incorrect. This is simpler and actually works. The reason that this wasn’t actually causing issues anywhere is that we always use placeholders at the moment (though they are off by default). Working on #269 --- src/components/ranks/includes/class-wordpoints-rank-type.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ranks/includes/class-wordpoints-rank-type.php b/src/components/ranks/includes/class-wordpoints-rank-type.php index fa1de019..b1a06d50 100644 --- a/src/components/ranks/includes/class-wordpoints-rank-type.php +++ b/src/components/ranks/includes/class-wordpoints-rank-type.php @@ -191,7 +191,7 @@ final public function display_rank_meta_form_fields( // If we aren't using placeholders, calculate the value. Hidden fields // never use placeholders. - if ( false !== $args['placeholders'] || 'hidden' === $field['type'] ) { + if ( ! $args['placeholders'] || 'hidden' === $field['type'] ) { // Default to the default value. $value = $field['default']; From 5c7bba6e6ba1f5750948e19d04b2fc640cb53741 Mon Sep 17 00:00:00 2001 From: JDGrimes Date: Thu, 5 Feb 2015 11:32:50 -0500 Subject: [PATCH 05/65] Unit tests for the rank type class See #269 --- tests/phpunit/includes/mocks/rank-type.php | 24 +- tests/phpunit/tests/ranks/rank-type.php | 329 +++++++++++++++++++++ 2 files changed, 351 insertions(+), 2 deletions(-) create mode 100644 tests/phpunit/tests/ranks/rank-type.php diff --git a/tests/phpunit/includes/mocks/rank-type.php b/tests/phpunit/includes/mocks/rank-type.php index 942dcfff..fe9852ad 100644 --- a/tests/phpunit/includes/mocks/rank-type.php +++ b/tests/phpunit/includes/mocks/rank-type.php @@ -14,6 +14,14 @@ */ class WordPoints_Test_Rank_Type extends WordPoints_Rank_Type { + /** + * @since 1.9.1 + */ + protected $name = 'Test'; + + /** + * @since 1.7.0 + */ protected $meta_fields = array( 'test_meta' => array() ); // @@ -21,7 +29,19 @@ class WordPoints_Test_Rank_Type extends WordPoints_Rank_Type { // /** - * Destroy the rank type hanlder when this rank type is deregistered. + * @since 1.9.1 + */ + public function __construct( array $args ) { + + parent::__construct( $args ); + + if ( isset( $args['meta_fields'] ) ) { + $this->meta_fields = $args['meta_fields']; + } + } + + /** + * Destroy the rank type handler when this rank type is deregistered. * * @since 1.7.0 */ @@ -34,7 +54,7 @@ public function destruct() {} * * @param array $meta The metadata to validate. * - * @return array|false The validated metadata or false if it should't be saved. + * @return array|false The validated metadata or false if it shouldn't be saved. */ public function validate_rank_meta( array $meta ) { diff --git a/tests/phpunit/tests/ranks/rank-type.php b/tests/phpunit/tests/ranks/rank-type.php new file mode 100644 index 00000000..c617a2ad --- /dev/null +++ b/tests/phpunit/tests/ranks/rank-type.php @@ -0,0 +1,329 @@ +mock_rank_type = new WordPoints_Test_Rank_Type( + array( 'slug' => 'test' ) + ); + } + + /** + * Test that get_slug() returns the rank type's slug. + * + * @since 1.9.1 + * + * @covers WordPoints_Rank_Type::get_slug + */ + public function test_get_slug() { + + $this->assertEquals( 'test', $this->mock_rank_type->get_slug() ); + } + + /** + * Test that get_name() returns the rank type's name. + * + * @since 1.9.1 + * + * @covers WordPoints_Rank_Type::get_name + */ + public function test_get_name() { + + $this->assertEquals( 'Test', $this->mock_rank_type->get_name() ); + } + + /** + * Test that get_meta_fields() returns the rank type's meta fields. + * + * @since 1.9.1 + * + * @covers WordPoints_Rank_Type::get_meta_fields + */ + public function test_get_meta_fields() { + + $this->assertEquals( + array( 'test_meta' => array() ) + , $this->mock_rank_type->get_meta_fields() + ); + } + + /** + * Test that display_rank_meta_form_fields() displays a text field's value. + * + * @since 1.9.1 + * + * @covers WordPoints_Rank_Type::display_rank_meta_form_fields + */ + public function test_display_rank_meta_form_fields_text_field() { + + $xpath = $this->get_rank_meta_form_xpath( + array( 'test_field' => array( 'type' => 'text', 'default' => 'ddd' ) ) + , array( 'test_field' => 'testing' ) + ); + + $inputs = $xpath->query( '//input[@type = "text"]' ); + + $this->assertEquals( 1, $inputs->length ); + + $this->assertEquals( + 'testing' + , $inputs->item( 0 )->attributes->getNamedItem( 'value' )->nodeValue + ); + } + + /** + * Test that display_rank_meta_form_fields() displays a field's default value. + * + * @since 1.9.1 + * + * @covers WordPoints_Rank_Type::display_rank_meta_form_fields + */ + public function test_display_rank_meta_form_fields_field_default() { + + $xpath = $this->get_rank_meta_form_xpath( + array( + 'test_field' => array( 'type' => 'text', 'default' => 'default' ) + ) + ); + + $inputs = $xpath->query( '//input[@type = "text"]' ); + + $this->assertEquals( 1, $inputs->length ); + + $this->assertEquals( + 'default' + , $inputs->item( 0 )->attributes->getNamedItem( 'value' )->nodeValue + ); + } + + /** + * Test that display_rank_meta_form_fields() supports the 'number' field type. + * + * @since 1.9.1 + * + * @covers WordPoints_Rank_Type::display_rank_meta_form_fields + */ + public function test_display_rank_meta_form_fields_number_field() { + + $xpath = $this->get_rank_meta_form_xpath( + array( 'test_field' => array( 'type' => 'number', 'default' => 0 ) ) + , array( 'test_field' => 25 ) + ); + + $inputs = $xpath->query( '//input[@type = "number"]' ); + + $this->assertEquals( 1, $inputs->length ); + + $this->assertEquals( + 25 + , $inputs->item( 0 )->attributes->getNamedItem( 'value' )->nodeValue + ); + } + + /** + * Test that display_rank_meta_form_fields() supports the 'hidden' field type. + * + * @since 1.9.1 + * + * @covers WordPoints_Rank_Type::display_rank_meta_form_fields + */ + public function test_display_rank_meta_form_fields_hidden_field() { + + $xpath = $this->get_rank_meta_form_xpath( + array( 'test_field' => array( 'type' => 'hidden', 'default' => 0 ) ) + , array( 'test_field' => 25 ) + ); + + $inputs = $xpath->query( '//input[@type = "hidden"]' ); + + $this->assertEquals( 1, $inputs->length ); + + $this->assertEquals( + 25 + , $inputs->item( 0 )->attributes->getNamedItem( 'value' )->nodeValue + ); + } + + /** + * Test that display_rank_meta_form_fields() gives an error for invalid field types. + * + * @since 1.9.1 + * + * @covers WordPoints_Rank_Type::display_rank_meta_form_fields + * + * @expectedIncorrectUsage WordPoints_Rank_Type::display_rank_meta_form_fields + */ + public function test_display_rank_meta_form_fields_invalid_field_type_error() { + + $rank_type = new WordPoints_Test_Rank_Type( + array( + 'slug' => 'test', + 'meta_fields' => array( + 'bad' => array( 'type' => 'invalid', 'default' => '' ) + ) + ) + ); + + ob_start(); + $rank_type->display_rank_meta_form_fields(); + $form = ob_get_clean(); + + $this->assertEmpty( $form ); + } + + /** + * Test that display_rank_meta_form_fields() displays a field's label. + * + * @since 1.9.1 + * + * @covers WordPoints_Rank_Type::display_rank_meta_form_fields + */ + public function test_display_rank_meta_form_fields_field_label() { + + $xpath = $this->get_rank_meta_form_xpath( + array( + 'test_field' => array( + 'type' => 'text', + 'default' => 'default', + 'label' => 'Field label', + ) + ) + ); + + $inputs = $xpath->query( '//label' ); + + $this->assertEquals( 1, $inputs->length ); + + $this->assertEquals( 'Field label', trim( $inputs->item( 0 )->textContent ) ); + } + + /** + * Test that display_rank_meta_form_fields() displays field placeholders. + * + * @since 1.9.1 + * + * @covers WordPoints_Rank_Type::display_rank_meta_form_fields + */ + public function test_display_rank_meta_form_fields_field_placeholders() { + + $rank_type = new WordPoints_Test_Rank_Type( + array( + 'slug' => 'test', + 'meta_fields' => array( + 'test_field' => array( 'type' => 'text', 'default' => '' ) + ) + ) + ); + + ob_start(); + $rank_type->display_rank_meta_form_fields( + array() + , array( 'placeholders' => true ) + ); + $form = ob_get_clean(); + + $this->assertStringMatchesFormat( + '%avalue="<% if ( typeof test_field !== "undefined" ) { print( test_field ); } %>"%a' + , $form + ); + } + + /** + * Test that display_rank_meta_form_fields() doesn't use placeholders for hidden fields. + * + * @since 1.9.1 + * + * @covers WordPoints_Rank_Type::display_rank_meta_form_fields + */ + public function test_display_rank_meta_form_fields_hidden_field_placeholders() { + + $xpath = $this->get_rank_meta_form_xpath( + array( 'test_field' => array( 'type' => 'hidden', 'default' => 0 ) ) + , array() + , array( 'placeholders' => true ) + ); + + $inputs = $xpath->query( '//input[@type = "hidden"]' ); + + $this->assertEquals( 1, $inputs->length ); + + $this->assertEquals( + '0' + , $inputs->item( 0 )->attributes->getNamedItem( 'value' )->nodeValue + ); + } + + // + // Helpers. + // + + /** + * Get and XPath object for the form for the meta fields. + * + * @since 1.9.1 + * + * @param array $meta_fields The meta fields definition. + * @param array $meta The predefined meta values. + * @param array $args The form display args. + * + * @return DOMXPath XPath object loaded with the form HTML. + */ + protected function get_rank_meta_form_xpath( + array $meta_fields = array(), + array $meta = array(), + array $args = array() + ) { + + $rank_type = $this->mock_rank_type; + + if ( ! empty( $meta_fields ) ) { + $rank_type = new WordPoints_Test_Rank_Type( + array( 'slug' => 'test', 'meta_fields' => $meta_fields ) + ); + } + + ob_start(); + $rank_type->display_rank_meta_form_fields( $meta, $args ); + $form = ob_get_clean(); + + $document = new DOMDocument; + $document->loadHTML( $form ); + $xpath = new DOMXPath( $document ); + + return $xpath; + } +} + +// EOF From de925d188f444fc1bc40342fc15fae5a646ab7b7 Mon Sep 17 00:00:00 2001 From: JDGrimes Date: Thu, 5 Feb 2015 14:51:45 -0500 Subject: [PATCH 06/65] Use a lowercase "x" in banner image filename Fixes #270 --- assets/{banner-772X250.png => banner-772x250.png} | Bin 1 file changed, 0 insertions(+), 0 deletions(-) rename assets/{banner-772X250.png => banner-772x250.png} (100%) diff --git a/assets/banner-772X250.png b/assets/banner-772x250.png similarity index 100% rename from assets/banner-772X250.png rename to assets/banner-772x250.png From 70b29efad79c811ddf284465e6d099587fa54c54 Mon Sep 17 00:00:00 2001 From: JDGrimes Date: Thu, 5 Feb 2015 18:12:10 -0500 Subject: [PATCH 07/65] PHPUnit bootstrap: don't require uninstall tester Fixes #272 --- tests/phpunit/includes/bootstrap.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/phpunit/includes/bootstrap.php b/tests/phpunit/includes/bootstrap.php index a4493837..434d21a1 100644 --- a/tests/phpunit/includes/bootstrap.php +++ b/tests/phpunit/includes/bootstrap.php @@ -57,7 +57,10 @@ if ( defined( 'RUNNING_WORDPOINTS_MODULE_TESTS' ) - && ! running_wordpoints_module_uninstall_tests() + && ( + ! function_exists( 'running_wordpoints_module_uninstall_tests' ) + || ! running_wordpoints_module_uninstall_tests() + ) ) { tests_add_filter( 'muplugins_loaded', 'wordpointstests_manually_load_plugin' ); From d5ba3ef643cd27ea1a27f43a13069b9e783d248f Mon Sep 17 00:00:00 2001 From: JDGrimes Date: Fri, 6 Feb 2015 17:01:33 -0500 Subject: [PATCH 08/65] Profile points update: allow the value `0` Includes unit tests. Fixes #273 --- src/components/points/admin/admin.php | 6 +- tests/phpunit/tests/points/admin/profile.php | 263 +++++++++++++++++++ 2 files changed, 266 insertions(+), 3 deletions(-) create mode 100644 tests/phpunit/tests/points/admin/profile.php diff --git a/src/components/points/admin/admin.php b/src/components/points/admin/admin.php index 571e0407..921b2c2f 100644 --- a/src/components/points/admin/admin.php +++ b/src/components/points/admin/admin.php @@ -214,7 +214,7 @@ function wordpoints_admin_points_hooks_screen_options( $screen_options, $screen add_action( 'screen_settings', 'wordpoints_admin_points_hooks_screen_options', 10, 2 ); /** - * Filter the class of the points hooks page for accessiblitiy mode. + * Filter the class of the points hooks page for accessibility mode. * * @since 1.0.0 * @@ -379,8 +379,8 @@ function wordpoints_points_profile_options_update( $user_id ) { , $_POST[ "wordpoints_points-{$slug}" ] , $_POST[ "wordpoints_points_old-{$slug}" ] ) - && wordpoints_int( $_POST[ "wordpoints_points-{$slug}" ] ) - && wordpoints_int( $_POST[ "wordpoints_points_old-{$slug}" ] ) + && false !== wordpoints_int( $_POST[ "wordpoints_points-{$slug}" ] ) + && false !== wordpoints_int( $_POST[ "wordpoints_points_old-{$slug}" ] ) ) { wordpoints_alter_points( diff --git a/tests/phpunit/tests/points/admin/profile.php b/tests/phpunit/tests/points/admin/profile.php new file mode 100644 index 00000000..0c183f1b --- /dev/null +++ b/tests/phpunit/tests/points/admin/profile.php @@ -0,0 +1,263 @@ +user = $this->factory->user->create_and_get(); + $this->user->add_cap( 'set_wordpoints_points' ); + + wp_set_current_user( $this->user->ID ); + + $_POST['wordpoints_points_set_nonce'] = wp_create_nonce( + 'wordpoints_points_set_profile' + ); + + $_POST['wordpoints_points_set-points'] = '1'; + $_POST['wordpoints_points-points'] = '5'; + $_POST['wordpoints_points_old-points'] = '0'; + $_POST['wordpoints_set_reason'] = 'Testing.'; + } + + /** + * Test that the the user's points are updated successfully. + * + * @since 1.9.2 + */ + public function test_points_updated() { + + $this->assert_update_succeeds(); + } + + /** + * Test that current user must have set_wordpoints_points capability. + * + * @since 1.9.2 + */ + public function test_current_user_must_have_required_caps() { + + wp_get_current_user()->remove_cap( 'set_wordpoints_points' ); + wp_get_current_user()->update_user_level_from_caps(); + + $this->assert_update_fails(); + } + + /** + * Test that an nonce is required. + * + * @since 1.9.2 + */ + public function test_nonce_required() { + + unset( $_POST['wordpoints_points_set_nonce'] ); + + $this->assert_update_fails(); + } + + /** + * Test that a valid nonce is required. + * + * @since 1.9.2 + */ + public function test_valid_nonce_required() { + + $_POST['wordpoints_points_set_nonce'] = 'invlaid'; + + $this->assert_update_fails(); + } + + /** + * Test that the checkbox must be checked. + * + * @since 1.9.2 + */ + public function test_checkbox_must_be_checked() { + + unset( $_POST['wordpoints_points_set-points'] ); + + $this->assert_update_fails(); + } + + /** + * Test that the points value is required. + * + * @since 1.9.2 + */ + public function test_points_value_required() { + + unset( $_POST['wordpoints_points-points'] ); + + $this->assert_update_fails(); + } + + /** + * Test that the points value must be an integer. + * + * @since 1.9.2 + */ + public function test_points_must_be_integer() { + + $_POST['wordpoints_points-points'] = 'foo'; + + $this->assert_update_fails(); + } + + /** + * Test that the points value can be an integer. + * + * @since 1.9.2 + */ + public function test_points_can_be_0() { + + $_POST['wordpoints_points-points'] = '0'; + $_POST['wordpoints_points_old-points'] = '5'; + + wordpoints_set_points( $this->user->ID, 5, 'points', 'test' ); + + wordpoints_points_profile_options_update( $this->user->ID ); + + $this->assertEquals( 0, wordpoints_get_points( $this->user->ID, 'points' ) ); + } + + + /** + * Test that the old points value is required. + * + * @since 1.9.2 + */ + public function test_old_points_value_required() { + + unset( $_POST['wordpoints_points_old-points'] ); + + $this->assert_update_fails(); + } + + /** + * Test that the old points value must be an integer. + * + * @since 1.9.2 + */ + public function test_old_points_must_be_integer() { + + $_POST['wordpoints_points-points'] = 'foo'; + + $this->assert_update_fails(); + } + + /** + * Test that the old points value can be an integer. + * + * @since 1.9.2 + */ + public function test_old_points_can_be_0() { + + $_POST['wordpoints_points_old-points'] = '0'; + $_POST['wordpoints_points-points'] = '5'; + + wordpoints_set_points( $this->user->ID, 0, 'points', 'test' ); + + wordpoints_points_profile_options_update( $this->user->ID ); + + $this->assertEquals( 5, wordpoints_get_points( $this->user->ID, 'points' ) ); + } + + /** + * Test that the reason is required. + * + * @since 1.9.2 + */ + public function test_reason_required() { + + unset( $_POST['wordpoints_set_reason'] ); + + $this->assert_update_fails(); + } + + /** + * Test that the reason is used in the log. + * + * @since 1.9.2 + */ + public function test_reason_used_in_log() { + + wordpoints_points_profile_options_update( $this->user->ID ); + + $query = new WordPoints_Points_Logs_Query(); + + $this->assertStringMatchesFormat( + 'Points adjusted by %s. Reason: Testing.' + , $query->get( 'row' )->text + ); + } + + // + // Helpers. + // + + /** + * Assert that the update will fail. + * + * @since 1.9.2 + */ + protected function assert_update_fails() { + + wordpoints_points_profile_options_update( $this->user->ID ); + + $this->assertEquals( 0, wordpoints_get_points( $this->user->ID, 'points' ) ); + } + + /** + * Assert that the update will succeed. + * + * @since 1.9.2 + */ + protected function assert_update_succeeds() { + + wordpoints_points_profile_options_update( $this->user->ID ); + + $this->assertEquals( 5, wordpoints_get_points( $this->user->ID, 'points' ) ); + } +} + +// EOF From e0614371262b6f5050ab0ae70987e1e5226d0553 Mon Sep 17 00:00:00 2001 From: JDGrimes Date: Fri, 6 Feb 2015 17:10:37 -0500 Subject: [PATCH 09/65] Unit tests: Be less hacky and more compatible This causes issues in all versions of WordPress prior to 4.2. See #273 --- tests/phpunit/tests/points/admin/profile.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/phpunit/tests/points/admin/profile.php b/tests/phpunit/tests/points/admin/profile.php index 0c183f1b..50d53212 100644 --- a/tests/phpunit/tests/points/admin/profile.php +++ b/tests/phpunit/tests/points/admin/profile.php @@ -77,8 +77,8 @@ public function test_points_updated() { */ public function test_current_user_must_have_required_caps() { - wp_get_current_user()->remove_cap( 'set_wordpoints_points' ); - wp_get_current_user()->update_user_level_from_caps(); + $this->user = $this->factory->user->create_and_get(); + wp_set_current_user( $this->user->ID ); $this->assert_update_fails(); } From d9b218ca2ec32f81596e4a29c5a07a3741afd629 Mon Sep 17 00:00:00 2001 From: JDGrimes Date: Sat, 7 Feb 2015 09:16:38 -0500 Subject: [PATCH 10/65] Changelog for 1.9.1 & 1.9.2 --- src/readme.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/readme.txt b/src/readme.txt index 3a8e2592..b4192924 100644 --- a/src/readme.txt +++ b/src/readme.txt @@ -120,6 +120,13 @@ manage the ranks used on your site. == Changelog == += 1.9.2 — (~2 hrs) = +* Fixed: A bug preventing updating a user's points from their admin profile when +they don't have any points yet. + += 1.9.1 — (~3 hrs) = +* Fixed: A bug preventing ranks from being saved or updated. + = 1.9.0 - (~65 hrs) = * Updated: The title for the "Points" column in the points logs and top users tables will be replaced with the name of the points type being displayed. @@ -246,6 +253,13 @@ choosing the points type to add it to. == Upgrade Notice == += 1.9.2 = +* Fixes a bug preventing a user's points from being updated on their admin profile +if they have 0 points. + += 1.9.1 = +* Fixes a bug preventing ranks from being saved or updated. + = 1.9.0 = * This release deprecates the Comment Removed and Post Delete points hooks. Their functionality is now combined with the Comment and Post hooks, which now automatically From 3731bb679f1af92d096a2f000e8d7e760aea5b34 Mon Sep 17 00:00:00 2001 From: JDGrimes Date: Sat, 7 Feb 2015 16:24:03 -0500 Subject: [PATCH 11/65] Add WordPoints dev-lib See #262, #247, #271 --- .gitmodules | 3 +++ .travis.yml | 39 ++++++++--------------------------- dev-lib-wordpoints | 1 + phpcs.ruleset.xml | 51 +--------------------------------------------- 4 files changed, 13 insertions(+), 81 deletions(-) create mode 160000 dev-lib-wordpoints mode change 100644 => 120000 phpcs.ruleset.xml diff --git a/.gitmodules b/.gitmodules index 431ecf16..29c313e5 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "dev-lib"] path = dev-lib url = https://github.com/xwp/wp-dev-lib.git +[submodule "dev-lib-wordpoints"] + path = dev-lib-wordpoints + url = https://github.com/WordPoints/dev-lib.git diff --git a/.travis.yml b/.travis.yml index f07e525c..69f4e143 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,19 +1,17 @@ -# Travis CI configuration file. +# Travis CI configuration file for WordPoints. language: php -# 5.3 runs first so that we can fail fast on the codesniff pass (see below). php: - 5.3 - - 5.2 - 5.4 - 5.5 - 5.6 env: - TRAVISCI_RUN=codesniff + - TRAVISCI_RUN=phpunit WP_VERSION=nightly - TRAVISCI_RUN=phpunit WP_VERSION=latest - - TRAVISCI_RUN=phpunit WP_VERSION=stable - TRAVISCI_RUN=phpunit WP_VERSION=4.0 - TRAVISCI_RUN=phpunit WP_VERSION=3.9 - TRAVISCI_RUN=phpunit WP_VERSION=3.8 @@ -24,11 +22,9 @@ matrix: include: # Only run HHVM against the latest for now. - php: hhvm - env: TRAVISCI_RUN=phpunit WP_VERSION=stable + env: TRAVISCI_RUN=phpunit WP_VERSION=latest exclude: - # The codesniff pass only needs to be run once, I chose PHP 5.3, since WPCS requires it. - - php: 5.2 - env: TRAVISCI_RUN=codesniff + # The codesniff pass only needs to be run once. - php: 5.4 env: TRAVISCI_RUN=codesniff - php: 5.5 @@ -39,29 +35,10 @@ matrix: - php: hhvm fast_finish: true -before_install: - - 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 PHPCS_IGNORE='vendor/*,dev-lib/*' - - export WPCS_DIR=/tmp/wpcs - - 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 - before_script: - - > - if [ $TRAVISCI_RUN == phpunit ]; then - setup-phpunit - fi - - > - if [ $TRAVISCI_RUN == codesniff ]; then - setup-codesniff - fi + - export WORDPOINTS_PROJECT_TYPE=wordpoints + - export DEV_LIB_PATH=dev-lib-wordpoints + - source $DEV_LIB_PATH/travis/before_script.sh script: - codesniff-php-syntax @@ -80,4 +57,4 @@ script: - phpunit-ms-network-ajax after_script: - - if [[ $TRAVIS_PHP_VERSION == hhvm ]]; then php vendor/bin/coveralls; fi + - source $DEV_LIB_PATH/travis/after_script.sh diff --git a/dev-lib-wordpoints b/dev-lib-wordpoints new file mode 160000 index 00000000..6d4b3256 --- /dev/null +++ b/dev-lib-wordpoints @@ -0,0 +1 @@ +Subproject commit 6d4b32564e521cff029fe0e83d1ec9e118d8f2a4 diff --git a/phpcs.ruleset.xml b/phpcs.ruleset.xml deleted file mode 100644 index 8b1fac48..00000000 --- a/phpcs.ruleset.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - Sniffs for the coding standards of the WordPoints plugin - - - - - - - - - - - - - - /tests/* - - - /tests/* - - - /tests/* - - - /tests/* - - - - - - /tests/* - - - /tools/* - - - - - - - - - /vendor/*,/dev-lib/* - - diff --git a/phpcs.ruleset.xml b/phpcs.ruleset.xml new file mode 120000 index 00000000..6415badf --- /dev/null +++ b/phpcs.ruleset.xml @@ -0,0 +1 @@ +dev-lib-wordpoints/phpcs/WordPoints/ruleset.xml \ No newline at end of file From e420f4012b533d4eb0ff848224e914581535257f Mon Sep 17 00:00:00 2001 From: JDGrimes Date: Sat, 7 Feb 2015 16:26:30 -0500 Subject: [PATCH 12/65] ci-env.sh: remove bash functions now in dev-lib See #262 --- .ci-env.sh | 171 +---------------------------------------------------- 1 file changed, 1 insertion(+), 170 deletions(-) diff --git a/.ci-env.sh b/.ci-env.sh index a6c977f6..4e29272b 100644 --- a/.ci-env.sh +++ b/.ci-env.sh @@ -1,175 +1,6 @@ +#!/bin/bash # Use the develop branch for WPCS for compatibility with PHPCS 2.0 export WPCS_GIT_TREE=develop -# Set up for the PHPUnit pass. -setup-phpunit() { - - if [[ $TRAVIS_PHP_VERSION == '5.2' ]]; then - mkdir -p vendor/jdgrimes/wp-plugin-uninstall-tester - curl -L https://github.com/JDGrimes/wp-plugin-uninstall-tester/archive/master.tar.gz \ - | tar xvz --strip-components=1 -C vendor/jdgrimes/wp-plugin-uninstall-tester - elif [[ $TRAVIS_PHP_VERSION == hhvm ]]; then - composer require satooshi/php-coveralls:dev-master - mkdir -p build/logs - else - composer install - fi - - wget -O /tmp/install-wp-tests.sh \ - https://raw.githubusercontent.com/wp-cli/wp-cli/master/templates/install-wp-tests.sh - - sed -i 's/$WP_VERSION == '"'"'latest'"'"'/$WP_VERSION == '"'"'stable'"'"'/' \ - /tmp/install-wp-tests.sh - - bash /tmp/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION - - sed -i 's/do_action( '"'"'admin_init'"'"' )/if ( ! isset( $GLOBALS['"'"'_did_admin_init'"'"'] ) \&\& $GLOBALS['"'"'_did_admin_init'"'"'] = true ) do_action( '"'"'admin_init'"'"' )/' \ - /tmp/wordpress-tests/includes/testcase-ajax.php - - cd /tmp/wordpress/wp-content/plugins - ln -s $PLUGIN_DIR $PLUGIN_SLUG - cd $PLUGIN_DIR -} - -# Set up for the codesniff pass. -setup-codesniff() { - - 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 $WPCS_DIR && curl -L \ - https://github.com/$WPCS_GITHUB_SRC/archive/$WPCS_GIT_TREE.tar.gz \ - | tar xvz --strip-components=1 -C $WPCS_DIR - - $PHPCS_DIR/scripts/phpcs --config-set installed_paths $WPCS_DIR - - npm install -g jshint - - composer install -} - -# Check php files for syntax errors. -codesniff-php-syntax() { - if [[ $TRAVISCI_RUN == codesniff ]] || [[ $TRAVISCI_RUN == phpunit && $WP_VERSION == stable && $TRAVIS_PHP_VERSION != '5.3' ]]; then - find . ! -path "./dev-lib/*" ! -path "./vendor/*" \( -name '*.php' -o -name '*.inc' \) \ - -exec php -lf {} \; - else - echo 'Not running PHP syntax check.' - fi -} - -# Check php files with PHPCodeSniffer. -codesniff-phpcs() { - if [[ $TRAVISCI_RUN == codesniff ]]; then - $PHPCS_DIR/scripts/phpcs -ns --standard=$WPCS_STANDARD \ - $(if [ -n "$PHPCS_IGNORE" ]; then echo --ignore=$PHPCS_IGNORE; fi) \ - $(find . -name '*.php') - else - echo 'Not running PHPCS.' - fi -} - -# Check JS files with jshint. -codesniff-jshint() { - if [[ $TRAVISCI_RUN == codesniff ]]; then - jshint . - else - echo 'Not running jshint.' - fi -} - -# Check PHP files for proper localization. -codesniff-l10n() { - if [[ $TRAVISCI_RUN == codesniff ]]; then - ./vendor/jdgrimes/wp-l10n-validator/bin/wp-l10n-validator - else - echo 'Not running wp-l10n-validator.' - fi -} - -# Check XML files for syntax errors. -codesniff-xmllint() { - if [[ $TRAVISCI_RUN == codesniff ]]; then - xmllint --noout $(find . ! -path "./dev-lib/*" ! -path "./vendor/*" \( -name '*.xml' -o -name '*.xml.dist' \)) - else - echo 'Not running xmlint.' - fi -} - -# Run basic PHPUnit tests. -phpunit-basic() { - if [[ $TRAVISCI_RUN != phpunit ]]; then - echo 'Not running PHPUnit.' - return - fi - - local TEST_GROUP=${1-''} - local CLOVER_FILE=${2-basic} - - local GROUP_OPTION='' - local COVERAGE_OPTION='' - - if [[ $WP_VERSION == '3.8' && $TEST_GROUP == ajax && $WP_MULTISITE == 1 ]]; then - echo 'Not running multisite Ajax tests on 3.8, see https://github.com/WordPoints/wordpoints/issues/239.' - return - fi - - if [[ $TEST_GROUP != '' ]]; then - GROUP_OPTION="--group=$TEST_GROUP" - CLOVER_FILE+="-$TEST_GROUP" - - if [[ $TRAVIS_PHP_VERSION == '5.2' ]]; then - sed -i '' -e "s/$TEST_GROUP<\/group>//" ./phpunit.xml.dist - fi - fi - - if [[ $TRAVIS_PHP_VERSION == hhvm ]]; then - COVERAGE_OPTION="--coverage-clover build/logs/clover-$CLOVER_FILE.xml" - fi - - phpunit $GROUP_OPTION $COVERAGE_OPTION -} - -# Run uninstall PHPUnit tests. -phpunit-uninstall() { - phpunit-basic uninstall -} - -# Run Ajax PHPUnit tests. -phpunit-ajax() { - phpunit-basic ajax -} - -# Run the basic tests on multisite. -phpunit-ms() { - WP_MULTISITE=1 phpunit-basic '' ms -} - -# Run the uninstall tests on multisite. -phpunit-ms-uninstall() { - WP_MULTISITE=1 phpunit-basic uninstall ms -} - -# Run the ajax tests on multisite. -phpunit-ms-ajax() { - WP_MULTISITE=1 phpunit-basic ajax ms -} - -# Run basic tests for multisite in network mode. -phpunit-ms-network() { - WORDPOINTS_NETWORK_ACTIVE=1 WP_MULTISITE=1 phpunit-basic '' ms-network -} - -# Run uninstall tests in multisite in network mode. -phpunit-ms-network-uninstall() { - WORDPOINTS_NETWORK_ACTIVE=1 WP_MULTISITE=1 phpunit-basic uninstall ms-network -} - -# Run Ajax tests in multisite in network mode. -phpunit-ms-network-ajax() { - WORDPOINTS_NETWORK_ACTIVE=1 WP_MULTISITE=1 phpunit-basic ajax ms-network -} - # EOF From 4af92cb4bc4df2589e9d776864d32af020977d28 Mon Sep 17 00:00:00 2001 From: JDGrimes Date: Sat, 7 Feb 2015 17:21:13 -0500 Subject: [PATCH 13/65] Update WordPoints dev-lib --- dev-lib-wordpoints | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev-lib-wordpoints b/dev-lib-wordpoints index 6d4b3256..3aacc03e 160000 --- a/dev-lib-wordpoints +++ b/dev-lib-wordpoints @@ -1 +1 @@ -Subproject commit 6d4b32564e521cff029fe0e83d1ec9e118d8f2a4 +Subproject commit 3aacc03ec727d919bb4cfd1f7e04dfd551b1b4e1 From 69b0985398751cd8589bf315bdcbfe932072bbe3 Mon Sep 17 00:00:00 2001 From: JDGrimes Date: Mon, 9 Feb 2015 17:14:51 -0500 Subject: [PATCH 14/65] Update WordPoints dev-lib --- dev-lib-wordpoints | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev-lib-wordpoints b/dev-lib-wordpoints index 3aacc03e..1b548b0b 160000 --- a/dev-lib-wordpoints +++ b/dev-lib-wordpoints @@ -1 +1 @@ -Subproject commit 3aacc03ec727d919bb4cfd1f7e04dfd551b1b4e1 +Subproject commit 1b548b0b366e2bc47a3187bb133ed6591ede9c29 From f167aa5fb4fac019a9c0f98684d7ad6701f4a489 Mon Sep 17 00:00:00 2001 From: JDGrimes Date: Mon, 9 Feb 2015 17:16:36 -0500 Subject: [PATCH 15/65] Fix PHPCS errors --- src/admin/screens/modules-load.php | 2 +- .../points/includes/class-wordpoints-points-hooks.php | 4 +++- src/components/points/includes/logs.php | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/admin/screens/modules-load.php b/src/admin/screens/modules-load.php index c912a44b..a2448c7a 100644 --- a/src/admin/screens/modules-load.php +++ b/src/admin/screens/modules-load.php @@ -464,7 +464,7 @@ function wordpoints_module_sandbox_scrape( $module ) { 'title' => __( 'Troubleshooting', 'wordpoints' ), 'content' => '

' . esc_html__( 'Most of the time, modules play nicely with the core of WordPoints and with other modules. Sometimes, though, a module’s code will get in the way of another module, causing compatibility issues. If your site starts doing strange things, this may be the problem. Try deactivating all your modules and re-activating them in various combinations until you isolate which one(s) caused the issue.', 'wordpoints' ) . '

' . - '

' . sprintf( esc_html__( 'If something goes wrong with a module and you can’t use WordPoints, delete or rename that file in the %s directory and it will be automatically deactivated.', 'wordpoints' ), '' . esc_html( wordpoints_modules_dir() ) . '' ) . '

' + '

' . sprintf( esc_html__( 'If something goes wrong with a module and you can’t use WordPoints, delete or rename that file in the %s directory and it will be automatically deactivated.', 'wordpoints' ), '' . esc_html( wordpoints_modules_dir() ) . '' ) . '

' // XSS OK WPCS ) ); diff --git a/src/components/points/includes/class-wordpoints-points-hooks.php b/src/components/points/includes/class-wordpoints-points-hooks.php index 039140d5..baef1e71 100644 --- a/src/components/points/includes/class-wordpoints-points-hooks.php +++ b/src/components/points/includes/class-wordpoints-points-hooks.php @@ -783,7 +783,9 @@ private static function _list_hook( $hook_id, $hook, $points_type = null ) {
- get_name() ) ) . "\n"; ?> + + +
diff --git a/src/components/points/includes/logs.php b/src/components/points/includes/logs.php index 52275da0..ceac5342 100644 --- a/src/components/points/includes/logs.php +++ b/src/components/points/includes/logs.php @@ -515,7 +515,7 @@ function wordpoints_show_points_logs( $logs_query, array $args = array() ) { - + From 9baac2771e729e3f669ad080da605b4062c4e56b Mon Sep 17 00:00:00 2001 From: JDGrimes Date: Tue, 10 Feb 2015 17:00:42 -0500 Subject: [PATCH 16/65] Update tests to account for utf8mb4 See https://core.trac.wordpress.org/ticket/21212 --- tests/phpunit/tests/points/update/1-5-1.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/phpunit/tests/points/update/1-5-1.php b/tests/phpunit/tests/points/update/1-5-1.php index 9111c6a7..be93cb7f 100644 --- a/tests/phpunit/tests/points/update/1-5-1.php +++ b/tests/phpunit/tests/points/update/1-5-1.php @@ -68,13 +68,13 @@ public function test_db_table_charsets_updated() { // Simulate the update. $this->update_component( 'points', '1.5.0' ); - $this->assertStringEndsWith( - 'DEFAULT CHARSET=utf8' + $this->assertStringMatchesFormat( + '%aDEFAULT CHARSET=utf8%a' , $wpdb->get_var( "SHOW CREATE TABLE `{$wpdb->wordpoints_points_logs}`", 1 ) ); - $this->assertStringEndsWith( - 'DEFAULT CHARSET=utf8' + $this->assertStringMatchesFormat( + '%aDEFAULT CHARSET=utf8%a' , $wpdb->get_var( "SHOW CREATE TABLE `{$wpdb->wordpoints_points_log_meta}`", 1 ) ); From baac0d1044c788f8b0a50d378f7d61716358f377 Mon Sep 17 00:00:00 2001 From: JDGrimes Date: Thu, 12 Feb 2015 17:59:29 -0500 Subject: [PATCH 17/65] Add a method to get a component Fixes #282 --- src/includes/class-wordpoints-components.php | 18 ++++++++ tests/phpunit/tests/components.php | 44 ++++++++++++++++++++ 2 files changed, 62 insertions(+) diff --git a/src/includes/class-wordpoints-components.php b/src/includes/class-wordpoints-components.php index 1d355f50..227571a1 100644 --- a/src/includes/class-wordpoints-components.php +++ b/src/includes/class-wordpoints-components.php @@ -224,6 +224,24 @@ public function get() { return $this->registered; } + /** + * Get the data for a component. + * + * @since 1.10.0 + * + * @param string $slug The slug of the component to get the data for. + * + * @return array|false The component, or false if it isn't registered. + */ + public function get_component( $slug ) { + + if ( ! isset( $this->registered[ $slug ] ) ) { + return false; + } + + return $this->registered[ $slug ]; + } + /** * Get all active components. * diff --git a/tests/phpunit/tests/components.php b/tests/phpunit/tests/components.php index f5198502..f13dd3b4 100644 --- a/tests/phpunit/tests/components.php +++ b/tests/phpunit/tests/components.php @@ -125,6 +125,50 @@ public function test_activation_fails_if_not_registered() { $this->assertFalse( WordPoints_Components::instance()->activate( 'not_registered' ) ); } + + /** + * Test that all components are returned by get(). + * + * @since 1.10.0 + * + * @covers WordPoints_Components::get + */ + public function test_get() { + + $components = WordPoints_Components::instance()->get(); + + $this->assertInternalType( 'array', $components ); + $this->assertArrayHasKey( 'points', $components ); + $this->assertInternalType( 'array', $components['points'] ); + } + + /** + * Test getting the data for a component. + * + * @since 1.10.0 + * + * @covers WordPoints_Components::get_component + */ + public function test_get_component() { + + $component = WordPoints_Components::instance()->get_component( 'points' ); + + $this->assertInternalType( 'array', $component ); + } + + /** + * Test getting the data for an unregistered component. + * + * @since 1.10.0 + * + * @covers WordPoints_Components::get_component + */ + public function test_get_unregistered_component() { + + $this->assertFalse( + WordPoints_Components::instance()->get_component( 'unregistered' ) + ); + } } // EOF From 01ecdf86824c86fa0f86f7317dddd55c598f38da Mon Sep 17 00:00:00 2001 From: JDGrimes Date: Thu, 12 Feb 2015 18:00:08 -0500 Subject: [PATCH 18/65] Add `@covers` annotations to component tests See #260 --- tests/phpunit/tests/components.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/phpunit/tests/components.php b/tests/phpunit/tests/components.php index f13dd3b4..b0ffd7fe 100644 --- a/tests/phpunit/tests/components.php +++ b/tests/phpunit/tests/components.php @@ -44,6 +44,8 @@ public function tearDown() { * Test that the instance() method returns and instance of the class. * * @since 1.0.1 + * + * @covers WordPoints_Components::instance */ public function test_instance_returns_instance() { @@ -55,6 +57,9 @@ public function test_instance_returns_instance() { * * @since 1.0.1 * + * @covers WordPoints_Components::register + * @covers WordPoints_Components::is_registered + * * @expectedIncorrectUsage WordPoints_Components::register */ public function test_registration() { @@ -81,6 +86,8 @@ public function test_registration() { * Test that register() returns false if already registered. * * @since 1.0.1 + * + * @covers WordPoints_Components::register */ public function test_register_fails_if_already_registered() { @@ -96,6 +103,9 @@ public function test_register_fails_if_already_registered() { * * @since 1.0.1 * + * @covers WordPoints_Components::activate + * @covers WordPoints_Components::is_active + * * @expectedIncorrectUsage WordPoints_Components::register */ public function test_activation() { @@ -120,6 +130,8 @@ public function test_activation() { * Test that an unregistered component can't be activated. * * @since 1.0.1 + * + * @covers WordPoints_Components::activate */ public function test_activation_fails_if_not_registered() { From 865d3b8410351ba0450ad595ca7a521401a76e69 Mon Sep 17 00:00:00 2001 From: JDGrimes Date: Sat, 14 Feb 2015 09:26:10 -0500 Subject: [PATCH 19/65] Account for no characters after string --- tests/phpunit/tests/points/update/1-5-1.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/phpunit/tests/points/update/1-5-1.php b/tests/phpunit/tests/points/update/1-5-1.php index be93cb7f..8b8627af 100644 --- a/tests/phpunit/tests/points/update/1-5-1.php +++ b/tests/phpunit/tests/points/update/1-5-1.php @@ -69,12 +69,12 @@ public function test_db_table_charsets_updated() { $this->update_component( 'points', '1.5.0' ); $this->assertStringMatchesFormat( - '%aDEFAULT CHARSET=utf8%a' + '%aDEFAULT CHARSET=utf8%A' , $wpdb->get_var( "SHOW CREATE TABLE `{$wpdb->wordpoints_points_logs}`", 1 ) ); $this->assertStringMatchesFormat( - '%aDEFAULT CHARSET=utf8%a' + '%aDEFAULT CHARSET=utf8%A' , $wpdb->get_var( "SHOW CREATE TABLE `{$wpdb->wordpoints_points_log_meta}`", 1 ) ); From 61d41ee11b3177b3d55028277b4005691b7cfb59 Mon Sep 17 00:00:00 2001 From: JDGrimes Date: Sat, 14 Feb 2015 09:26:58 -0500 Subject: [PATCH 20/65] Add `@covers` for 1.5.1 update test See #260 --- tests/phpunit/tests/points/update/1-5-1.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/phpunit/tests/points/update/1-5-1.php b/tests/phpunit/tests/points/update/1-5-1.php index 8b8627af..b589e76c 100644 --- a/tests/phpunit/tests/points/update/1-5-1.php +++ b/tests/phpunit/tests/points/update/1-5-1.php @@ -18,9 +18,12 @@ class WordPoints_Points_1_5_1_Update_Test extends WordPoints_Points_UnitTestCase { /** - * Test that database table charachter sets are updated. + * Test that database table character sets are updated. * * @since 1.5.1 + * + * @covers WordPoints_Points_Un_Installer::update_network_to_1_5_1 + * @covers WordPoints_Points_Un_Installer::update_single_to_1_5_1 */ public function test_db_table_charsets_updated() { From 4befbaf2e6702362fcbe7a165ea215b1e4d7436f Mon Sep 17 00:00:00 2001 From: JDGrimes Date: Sat, 14 Feb 2015 09:28:58 -0500 Subject: [PATCH 21/65] Add jQuery to the list of globals See #212 --- src/components/points/admin/assets/js/hooks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/points/admin/assets/js/hooks.js b/src/components/points/admin/assets/js/hooks.js index 50f0fa05..024fa7b7 100644 --- a/src/components/points/admin/assets/js/hooks.js +++ b/src/components/points/admin/assets/js/hooks.js @@ -7,7 +7,7 @@ * @since 1.0.0 */ -/* global ajaxurl, isRtl, WordPointsHooksL10n */ +/* global ajaxurl, isRtl, WordPointsHooksL10n, jQuery */ /** * @var object WordPointsHooks From da9a93630478e0fa14e0aeaceab546ecbb11e48a Mon Sep 17 00:00:00 2001 From: JDGrimes Date: Sat, 14 Feb 2015 09:59:35 -0500 Subject: [PATCH 22/65] Update WordPoints dev-lib --- .coveralls.yml | 2 -- dev-lib-wordpoints | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) delete mode 100644 .coveralls.yml diff --git a/.coveralls.yml b/.coveralls.yml deleted file mode 100644 index 46e4bf20..00000000 --- a/.coveralls.yml +++ /dev/null @@ -1,2 +0,0 @@ -src_dir: src -coverage_clover: build/logs/clover-*.xml \ No newline at end of file diff --git a/dev-lib-wordpoints b/dev-lib-wordpoints index 1b548b0b..24615e60 160000 --- a/dev-lib-wordpoints +++ b/dev-lib-wordpoints @@ -1 +1 @@ -Subproject commit 1b548b0b366e2bc47a3187bb133ed6591ede9c29 +Subproject commit 24615e60aae2ea550b03ec259d2277b3f2726d83 From bd5a876282709d38e56c03b423736619be52570a Mon Sep 17 00:00:00 2001 From: JDGrimes Date: Sat, 14 Feb 2015 09:59:51 -0500 Subject: [PATCH 23/65] Symlink coveralls file --- .coveralls.yml | 1 + 1 file changed, 1 insertion(+) create mode 120000 .coveralls.yml diff --git a/.coveralls.yml b/.coveralls.yml new file mode 120000 index 00000000..6ccd07fa --- /dev/null +++ b/.coveralls.yml @@ -0,0 +1 @@ +dev-lib-wordpoints/travis/.coveralls.yml \ No newline at end of file From 6d53ba49cde7691f2d3361167553a364ce663fd5 Mon Sep 17 00:00:00 2001 From: JDGrimes Date: Sat, 14 Feb 2015 10:01:08 -0500 Subject: [PATCH 24/65] Reactivate WP dev-lib MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I don’t know how it got into the state it was in. --- dev-lib | 1 + 1 file changed, 1 insertion(+) create mode 160000 dev-lib diff --git a/dev-lib b/dev-lib new file mode 160000 index 00000000..4815f590 --- /dev/null +++ b/dev-lib @@ -0,0 +1 @@ +Subproject commit 4815f59044e17d391f4a04cbe83a48e5bdee1185 From ea35993a995abbbed3c2429773222f20af78e087 Mon Sep 17 00:00:00 2001 From: "J.D. Grimes" Date: Sat, 14 Feb 2015 10:04:00 -0500 Subject: [PATCH 25/65] Delete trunk readme.txt [ci-skip] Fixes #279 --- readme.txt | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 readme.txt diff --git a/readme.txt b/readme.txt deleted file mode 100644 index 00200b0b..00000000 --- a/readme.txt +++ /dev/null @@ -1,2 +0,0 @@ -=== WordPoints === -Stable tag: 1.7.0 From 6b0f2bc3486a4a987c215e5016a0f41514d418da Mon Sep 17 00:00:00 2001 From: Gonzalo Exequiel Pedone Date: Wed, 11 Feb 2015 20:18:32 +0100 Subject: [PATCH 26/65] Translated using Weblate (Spanish) Currently translated at 73.7% (267 of 362 strings) --- src/languages/wordpoints-es_ES.mo | Bin 27855 -> 29574 bytes src/languages/wordpoints-es_ES.po | 35 +++++++++++++++++++----------- 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/src/languages/wordpoints-es_ES.mo b/src/languages/wordpoints-es_ES.mo index ab32a6187a8773d48ece90dddf1c4fb70315f3e8..5d7c70c4c670daabc5c47fde3b3996796e3a2e9d 100755 GIT binary patch delta 7521 zcma*qd3+V+p~mqyCLxi8EdsI$!=`LmL6#7fpdo;4k_fUWnVd5u2Tsm}Gbe!{dWv4F z+@cntT16`^MOt?w6)UA$uv*c&P}}0AQqXI?Ex6oXYp+-2{+=^)6hHj~=hG+OcjnBz z^R9z^?NG*d|B{h>ry%PGh9f`2n0~lE*O&&%hr8;kF>8Aob1t^w1l)|B@Bp5Vhp+~9 zQ-7#MsxTgQ!Sy%?HwD+<#&bA-7b}cOn$IW<tn#txNy`bwLe~Jd6dRmM;VkRP0nWd;HUpI*H zrxWIWE_BD|P!GHncoe5|eggI27>0-SW@=D9Scw|a^~f#eI@Hwczy){!i?Kf!8ALM| z_54ayeH(@_{#s1ixuCgv95>)@+(eJcSqPf*7a3>G=^Ln#I*bK)0@V;L01a^g>b~<) z*Go}r=^|W;5mbj?Knss0DQLB4G9J1x0oBqaI2l_p7k6PP?!|ok7`07LVrnss@GD-8 zdg0Be5q%2P3L4Vak!$@lq^h!nJFzL)CXLeu6I}gKhSdFgo}ij@SP8O8tr+Mz!=)WctmJ zGGpR66W_!=s2avE!qh7!0S;B-iF$i&!R^3 z9kei$O0sdtM8;o>Yy=my1}agDV*zThEkzBLgIc6(P(8W^_1tZNk6>rc_v1V~h{JJk zg}-*@pr*z}?Sf6H25zlL`V~IK1r6mZs8xL=Fmn?B;BbBc_QEA-p%=In`*FSt&%-wZ zKgPbCcV-VW+GYf51nRLr-hf(bJCZ@+E!4ivVq!G+BTx@qhPu8E`PP{2s8#$TGE3$o zR8NOZ^}izvQ1{)4dj2ug^S=xH94*eRO1~k=%Ain(8i6Eg$ZrjLoP%pe4)xaO&KzsFL_zYfy)_h}rkN03n2J?5R|Dp#M_&$T3 z`TYQ@r*C61et{!!RE@vy7okRIO%3CJHia!*$j7^pd(BT#Lv#}R;J{kHPgU%`I(K5C>gukbsRhs!zdiMrm3+?O=h zP_VeL&A(vw1UDQ)_4p|E!H-cb&b!jTJ|4BGs&N9Yz%jTT$KqS4smSN8df`;moX7cyqN!u zABXz=``9Fi-PX*U=Tz@+kU@rF!Ks`4MJ7aNheX`5=tK#b5hIx24 z=L-YtP+zQ-sBLy_aQzNcMfan6_9W^>Ut&JyH2d{-5A2899YavNX)@~m`AG_zyT#ZA z<$K}S#({UiAO6l&@UR{Q@Pk3rQl4bQ_lH~?3n>P>!+ zLh750YQS#niZ5X|JcOF_zu_P}h3d(mxc_0PKsBrmHF6&6xvNnlaSLkb@4_s+A2s4T z{p(5dcyQrq)Qf(J>e0dA`e7{K{Jr4(Gwj6qDOArodA_|+6%R)BY$R&GPYr%whN`Cl z^KczzX#Z;^{~uAM>4V==hyGvf6O{C#kH}e^r;m#$tRy4Is^Fp;{!UO9JIIg8Z1N|f z?VUcfZX(+M+T-^JS7+j#WInl&yh>gq`X2lz9w$21`=|@%Wy=2@oNvMHi7}4fM^Y6?G1 za{6-;CBGu+qmV+33?<9SKS+KC{m@?o0NNon$omEzxm4*_JB# zAMc-0zKUd$W26I}x)C2CKOs7HlUd|{$Q0s|j#1T18>H^2IbVI+Qdl-sUzdbL9&88N_5ndUF0w12)T~D zK+;DK3dO<6vh+nPA`8gJ!L_$>GTBc$kSvnge{WHEgY+c7Ak)YgqGKJohCEH~COVqP zf004tS@KVEluRI9$n#_%(ebHI>TffDHN_5(ft+M!D%>{zvp5zm_I zCL$rHz5Tp`tlW6aYI5UFQTy`)zvz^VJ6^(aS6GQg$7+tdA;qnPl&&aBbM$f$5&U{b%BjY1E$qNfh$_h(Mt+JBx((xlp%1TN)&bGZoVQt)wc{IR{ zms{0tY@Ho-t*W)o>XwKTwdOmiWmC}@VF`G4n;k1!JGG(7jzo)Cc$29i*3e=%IEA&2 z-BfPXumd7qqgBzENHlxp#l?*-6BI65n*n&Z+TVCmd#U_R?UyL#O-L|bT{7Qm0Pjq)TuYAY@+2CC&jFRldRH-9WO7ec4AK4 z@6sZtUT?O_ipmPZPHTI1Wl6>yZBh5kLz}wIJJWsbqo+0G7R(E^L=$%0s-nYIWoyK9 z+wYk5d{%yCbKHrAZT6K{)V_FLtZT9=YH3ruR+s_yx3tSbW!Xg%c6vXvcbs5HH#spz z&Z>#9=`1Fv(Y6|$P@~HSAZ)kpd&C~awr*&NvDw|`5bKNWn5x>}(9Lc*&P_2rtxesR zJ7}k^Z5^@0wqL!O?XoksT)L#^mSfBJB#%!s$RWW-ywh7^P<$gZ_}=4(>tkgPk$1aGA{EGi16jt2VhC~MAjv> TE(3n1|-#Agc=~qA2P^&`fp(MMA+uaY02P#n1%di6BTJ(iGMkn@p|D6ty(B zYFcc!=aQ*Y*=|mbtyV5+X_?lf)}$>qzd!dl-tR?n|RHJ}JJBGnj%jrRK`=+QJkN+BAzUGEV!8T3|$33VY1odFvu{Wy4 zS*Rf#kNh)5d}t~faRP3{Bs`A{iiu%3_4_Q;{U)N;&Ro>gEWr7=B!=<7*M~2;o91{e z3qW)DIBH}zV>{e~YRJc^A^iq*-Ea21Kl4G+bi!gBjOytcbm4Z?;y!5WZCE&JXp)D* zU<#vAtM_iy8fd~+_$F4+zz;A zW0B=$JOe4{hlS{evoHv6L^g!E6&WqlWY2F$jl^r1h##UBU5hxUo`n1}H}KKiA=LFv zs1bb(wHCG^&-0k06tsxG#%Mf`T09-NYbHHU!x7Z$5}a+e6US5c=jp6dQ-r!<1D?eV z$Y7aeEQoa6f%^S9?Qjm3<6Wp1#c6b*Z>llx zV=QLjc^rxTSXra-Hq6C$aRP?*cOG1hsxQTB@Hpx@-Dsspg%k=}jXBr>OHfnLfb1x< z3fUlL2fFYGw!}X%0$Vc9n%gK0#01nD>W>UTG#GyWdx?BM{6>L_^&b^?eey$FZoXnQqU|vFDeg zrrPs31^t=bg&L~8sJZ$IHN@Yc3tO<_G*vOE>oRP;0N463^ccnYfFaHzi$%S_N>Dwo z!6ICV+Fd^&Q|d8M*E-uT7PSUau^SG>aX1~BHuEAj;2B#l8|u6%*I`@E@5gXFit71K zsE!2YIJQMC&InY)x??--|9A>rIgw?*n2I#cRH1J04C)2rMK$aYsz<+}<}hZM^J*T0 z+QyU7h2^OIzW}v1Hsd5bgt{(uxZVF*6uNL?H0psBs20w~Xl%q7T!(t_YpB(I3VUHx zt}##IP@ITo(53narvc^o5cT`<5sV+{yf5}+^WXn2qnyPPk6KKFQ9T`xS_3!Q?-!vO zum&q}4{{F^&)a7PHsI}e7(c-&dAw15ctMSE?q5FEu>m#Ji^ekk>fr;N;Pq^FU>`h% z-7%a6ppi+%Ak4=Jcs*)Fp2g010M*bl7=V8H&Ms<&8le;{#3JNnYMw7(#tBsz~2?1`h@GWH0u_ACS>9;n#5yPRBT0icG87iEYuBiB87$7=}6c1`V8u?WuQRuf<{# zYRU>x9i4~j`6|>%dAtLsWLx=}r<#~!#A=hE|6 zkij!)Q=M&gHjOn3*JWlnSc_fg%udYh3k>Gvw5=A znadM6i2Cn%4Q5PtdfI@UsINp#$#bZ+@hWO+_hAP-hlvD^_&bKWoqgV#y~)Nfld%9dq1Mw>R2q5XZ@`ZH=j|A`UUvC{cI5p|<<48&a21M^WgoN9GrB=s89R4hbYzZx|~kDzwZ z&Pv9=Gllm!p`M+@a6F586Z%&<4~#@Lq&MnDS*Y(vpr)u8TjOmQjQ3zyT!r0n3+lcf zp*nU7)c_w4ZvoA17^UVFUM&cl9L{Fd}oQNNx!k(xHB-na3s%IlG7$;gw?f2EFp4DR)Tx`F840WFuFa%#m zAAE%9V3+GZX0`sEMfU`rZ>~8%RB@lJYulV8Eo}Wt^m5TL*1`OMYVbXTjbK)j3FINd zjy3NR9jPQn&wqfz_eArnW37Yv5|eCMEF-?;??n6lBDs8=zFfcsEy~|9+fy!am7h3s6UA2U27wX{EZAF?~n^*23bXJBumH#q?Sx0 zQ^@5*&o{r47MdJ;3`hRXG{5yG;j2W)5pp$|Mb3~FM2q!Nl0_OwFQVgN2lEtWlksFI z(V=yu<7v(R;}r5pn$B=&)xSxWt8&G$hjMQcPrkC}>#RMon)D+fWHZ@IjuQ3oNAeQ6 zgZxZ%{6q%nTWzC%>kLN@8Qfgre}3UMveee^wf+Uq5pCNVdu|IBldEi9JF1M_LO!(T z-p1Wz2>FP7O%|(lO~gf-UqtvXax)o4ZX%n=7vvW*m*{xL;eVfhQkrRNyKpCY(AFDq zBpFRckjZ2bnM(Bh=2xQ3C%=>1$Y06jql7{i!e30Yj!YzHiH`Z?ZZeLXAUX~@G=Gla zb1Qk4+)v&h&yzW1p`PzgLC1D-9|<5k$m^sPX-RZ^O6rOJk4hc6#7)+dHYA$p$RMvY zm-yh?WLQa3?72#uZp(+&e=n8(_QYrSG3jROm-&w^^u+@5jji8`UCD3c6xl$&CI28g zHj*k8IDBlw-=geC63LnpJ}!}K$&2Iw=|gn9Oxlu9$epB+Tt1Fbc)?bVV=U=t>!0Iu zB%CC8=SFn$@qW?qTYv9I-9r7mKlZrLy6NVW=bM)G>*@WfuaB>Hd;gf0-aeV70iM)^ z!|(%EyWOY3XvGF(;eYWM6?*R0xx(lU2LWtl6p z%3W5f^zEOVT~Sk7S)Eu`TQitn&aRkSTH#J8beGm-xblXK&Ao0&?l4zoUS4)}Wnyhz z#s9C#a0QPUIi_h;&ZNkqgk1M*cb)UF{91Q;WxXpUF)cC8dom~4$Lk*M4)h)#`>LP! dse+o&rf14O_4b(Yj<5GX)iFQsrP@Wl{{\n" -"Language-Team: LANGUAGE \n" -"Language: \n" +"PO-Revision-Date: 2015-02-11 20:18+0200\n" +"Last-Translator: Gonzalo Exequiel Pedone \n" +"Language-Team: Spanish " +"\n" +"Language: es_ES\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.5.5\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 2.2-dev\n" #. #-#-#-#-# wordpoints.pot (WordPoints 1.9.0) #-#-#-#-# #. Plugin Name of the plugin/theme @@ -48,7 +50,7 @@ msgstr "Instalar módulos" #: admin/admin.php:281 msgid "Hide This Notice" -msgstr "" +msgstr "Ocultar Este Aviso" #: admin/admin.php:334 #, fuzzy @@ -94,6 +96,8 @@ msgid "" "This appears to be a WordPoints module archive. Try installing it on the " "WordPoints module install screen instead." msgstr "" +"Este parece ser un archivo de módulo de WordPoints. En su lugar, pruebe a " +"instalarlo desde la pantalla de módulos de WordPoints." #: admin/admin.php:500 msgid "Like this plugin?" @@ -136,22 +140,28 @@ msgid "" "WordPoints detected a large network and has skipped part of the installation " "process." msgstr "" +"WordPoints a detectado una red amplia y a saltado parte del proceso de " +"instalación." #: admin/admin.php:543 msgid "" "WordPoints detected a large network and has skipped part of the update " "process for version %s (and possibly later versions)." msgstr "" +"WordPoints a detectado una red amplia y a saltado parte del proceso de " +"actualización para la versión %s (y posiblemente versiones posteriores)." #: admin/admin.php:549 msgid "" "The rest of the process needs to be completed manually. If this has not been " "done already, some parts of the plugin may not function properly." msgstr "" +"El resto del proceso necesita completarse manualmente. Si no lo ha hecho " +"todavía, algunas opciones del plugin podrían no funcionar apropiadamente." #: admin/admin.php:550 includes/class-wordpoints-components.php:556 msgid "Learn more." -msgstr "" +msgstr "Aprenda mas." #: admin/includes/class-wordpoints-module-installer-skin.php:84 #: admin/includes/class-wordpoints-modules-list-table.php:427 @@ -208,9 +218,8 @@ msgid "No modules found." msgstr "No se encontraron módulos" #: admin/includes/class-wordpoints-modules-list-table.php:321 -#, fuzzy msgid "There are not any modules installed." -msgstr "No hay ganchos de puntos disponibles en la actualidad." +msgstr "No hay módulos instalados." #: admin/includes/class-wordpoints-modules-list-table.php:336 msgid "Module" @@ -224,14 +233,14 @@ msgstr "Descripción" msgctxt "modules" msgid "All (%s)" msgid_plural "All (%s)" -msgstr[0] "" -msgstr[1] "" +msgstr[0] "Todos (%s)" +msgstr[1] "Todos (%s)" #: admin/includes/class-wordpoints-modules-list-table.php:367 msgid "Active (%s)" msgid_plural "Active (%s)" -msgstr[0] "" -msgstr[1] "" +msgstr[0] "Activo (%s)" +msgstr[1] "Activos (%s)" #: admin/includes/class-wordpoints-modules-list-table.php:371 msgid "Recently Active (%s)" From 26b4f0751e799a4b60b907ae654f0081b1f3fb13 Mon Sep 17 00:00:00 2001 From: JDGrimes Date: Sat, 14 Feb 2015 10:29:54 -0500 Subject: [PATCH 27/65] Fix JSHint errors See #238 --- src/components/points/admin/assets/js/hooks.js | 4 ++-- src/components/ranks/admin/assets/js/ranks-screen.js | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/components/points/admin/assets/js/hooks.js b/src/components/points/admin/assets/js/hooks.js index 024fa7b7..b5f05dd6 100644 --- a/src/components/points/admin/assets/js/hooks.js +++ b/src/components/points/admin/assets/js/hooks.js @@ -53,7 +53,7 @@ WordPointsHooks = { buttons: [ { text: WordPointsHooksL10n.deleteText, - class: 'button-primary', + 'class': 'button-primary', click: function() { $( this ).dialog( 'close' ); $currentDelete.click(); @@ -62,7 +62,7 @@ WordPointsHooks = { }, { text: WordPointsHooksL10n.cancelText, - class: 'button-secondary', + 'class': 'button-secondary', click: function() { $( this ).dialog( 'close' ); $currentDelete = false; diff --git a/src/components/ranks/admin/assets/js/ranks-screen.js b/src/components/ranks/admin/assets/js/ranks-screen.js index d0336d22..110d5442 100644 --- a/src/components/ranks/admin/assets/js/ranks-screen.js +++ b/src/components/ranks/admin/assets/js/ranks-screen.js @@ -101,9 +101,9 @@ jQuery( function ( $ ) { // Default attributes for the rank type. defaults: function() { return { - name: '', + name: '' }; - }, + } }); // Rank View @@ -242,15 +242,15 @@ jQuery( function ( $ ) { buttons: [ { text: ranks.l10n.deleteText, - class: 'button-primary', + 'class': 'button-primary', click: function() { $( this ).dialog( 'close' ); - view.delete(); + view.destroy(); } }, { text: ranks.l10n.cancelText, - class: 'button-secondary', + 'class': 'button-secondary', click: function() { $( this ).dialog( 'close' ); } @@ -260,7 +260,7 @@ jQuery( function ( $ ) { }, // Remove the item, destroy the model. - delete: function () { + destroy: function () { this.wait(); From f0a8f33dbb4fcee53573b28a1fdde7460d0f89e4 Mon Sep 17 00:00:00 2001 From: JDGrimes Date: Sat, 14 Feb 2015 11:05:34 -0500 Subject: [PATCH 28/65] Update WordPoints dev-lib We need to ignore the path to the WordPress dev-lib now. See #283, WordPoints/dev-lib#14 --- .ci-env.sh | 4 ++++ .travis.yml | 1 + dev-lib-wordpoints | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.ci-env.sh b/.ci-env.sh index 4e29272b..6a732648 100644 --- a/.ci-env.sh +++ b/.ci-env.sh @@ -3,4 +3,8 @@ # Use the develop branch for WPCS for compatibility with PHPCS 2.0 export WPCS_GIT_TREE=develop +# Ignore the WordPress dev lib when codesniffing. +CODESNIFF_PATH+=('!' -path "./dev-lib/*") +export CODESNIFF_PATH + # EOF diff --git a/.travis.yml b/.travis.yml index 69f4e143..1cd3bc29 100644 --- a/.travis.yml +++ b/.travis.yml @@ -46,6 +46,7 @@ script: - codesniff-jshint - codesniff-l10n - codesniff-xmllint + - codesniff-bash - phpunit-basic - phpunit-ms - phpunit-ms-network diff --git a/dev-lib-wordpoints b/dev-lib-wordpoints index 24615e60..0a70737e 160000 --- a/dev-lib-wordpoints +++ b/dev-lib-wordpoints @@ -1 +1 @@ -Subproject commit 24615e60aae2ea550b03ec259d2277b3f2726d83 +Subproject commit 0a70737e72a75e1d1d12ac6d929c68a82613c89a From 322fe474150566a760d3f1b60547fdf9a66e0486 Mon Sep 17 00:00:00 2001 From: JDGrimes Date: Sat, 14 Feb 2015 11:13:59 -0500 Subject: [PATCH 29/65] Add missing echo statements Things which are seen were not made of things which do appear. Fixes #278 --- src/admin/screens/modules.php | 2 +- src/components/points/admin/admin.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/admin/screens/modules.php b/src/admin/screens/modules.php index 2b26beb7..8951a761 100644 --- a/src/admin/screens/modules.php +++ b/src/admin/screens/modules.php @@ -99,7 +99,7 @@ - + diff --git a/src/components/points/admin/admin.php b/src/components/points/admin/admin.php index 571e0407..a8fadb8c 100644 --- a/src/components/points/admin/admin.php +++ b/src/components/points/admin/admin.php @@ -299,7 +299,7 @@ function wordpoints_points_profile_options( $user ) { " value="" autocomplete="off" /> " /> - + From d857d83a1b46a0dd6d7f055fecaee57ef25325ad Mon Sep 17 00:00:00 2001 From: JDGrimes Date: Wed, 18 Feb 2015 16:32:31 -0500 Subject: [PATCH 30/65] PHPDoc fixes --- src/admin/includes/class-wordpoints-modules-list-table.php | 2 +- src/includes/modules.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/admin/includes/class-wordpoints-modules-list-table.php b/src/admin/includes/class-wordpoints-modules-list-table.php index a3132277..a2b497fe 100644 --- a/src/admin/includes/class-wordpoints-modules-list-table.php +++ b/src/admin/includes/class-wordpoints-modules-list-table.php @@ -96,7 +96,7 @@ public function get_table_classes() { * * @since 1.1.0 * - * @param bool Whether the current user has the required capabilities. + * @return bool Whether the current user has the required capabilities. */ public function ajax_user_can() { diff --git a/src/includes/modules.php b/src/includes/modules.php index f2e28bcd..d355cac8 100644 --- a/src/includes/modules.php +++ b/src/includes/modules.php @@ -622,7 +622,7 @@ function wordpoints_get_modules( $module_folder = '' ) { * * @since 1.1.0 * - * @param $module The module's main file. + * @param string $module The module's main file. * * @return true|WP_Error True on success, a WP_Error on failure. */ From 9df37c53e6a7834263437bd6f5622766e0348208 Mon Sep 17 00:00:00 2001 From: JDGrimes Date: Wed, 18 Feb 2015 16:49:14 -0500 Subject: [PATCH 31/65] Bump requirements to WP 3.9 See #284 --- src/readme.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/readme.txt b/src/readme.txt index b4192924..6a4f498c 100644 --- a/src/readme.txt +++ b/src/readme.txt @@ -2,7 +2,7 @@ Contributors: jdgrimes Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=TPXS6B98HURLJ&lc=US&item_name=WordPoints&item_number=wordpressorg¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donate_LG%2egif%3aNonHosted Tags: points, awards, rewards, cubepoints, credits, gamify, multisite, ranks -Requires at least: 3.8 +Requires at least: 3.9 Tested up to: 4.2-alpha-31007 Stable tag: 1.9.0 License: GPLv2 or later From 1d5b11e3c01f52a28f66e45cce9305e57b533475 Mon Sep 17 00:00:00 2001 From: JDGrimes Date: Wed, 18 Feb 2015 16:50:05 -0500 Subject: [PATCH 32/65] Update WordPoints dev-lib See #284, #271 --- .travis.yml | 7 +++++-- dev-lib-wordpoints | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1cd3bc29..21ec002d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,8 +2,10 @@ language: php +# 5.3 runs first so that we can fail fast on the codesniff pass (see below). php: - 5.3 + - 5.2 - 5.4 - 5.5 - 5.6 @@ -14,7 +16,6 @@ env: - TRAVISCI_RUN=phpunit WP_VERSION=latest - TRAVISCI_RUN=phpunit WP_VERSION=4.0 - TRAVISCI_RUN=phpunit WP_VERSION=3.9 - - TRAVISCI_RUN=phpunit WP_VERSION=3.8 sudo: false @@ -24,7 +25,9 @@ matrix: - php: hhvm env: TRAVISCI_RUN=phpunit WP_VERSION=latest exclude: - # The codesniff pass only needs to be run once. + # The codesniff pass only needs to be run once, I chose PHP 5.3, since WPCS requires it. + - php: 5.2 + env: TRAVISCI_RUN=codesniff - php: 5.4 env: TRAVISCI_RUN=codesniff - php: 5.5 diff --git a/dev-lib-wordpoints b/dev-lib-wordpoints index 0a70737e..0aae92e6 160000 --- a/dev-lib-wordpoints +++ b/dev-lib-wordpoints @@ -1 +1 @@ -Subproject commit 0a70737e72a75e1d1d12ac6d929c68a82613c89a +Subproject commit 0aae92e6ad0dde21981f540b0b157e07be6db74c From 40ce0fb8e82101eea9c8830d27710d313aaafe2e Mon Sep 17 00:00:00 2001 From: JDGrimes Date: Wed, 18 Feb 2015 17:25:38 -0500 Subject: [PATCH 33/65] Make the modules cache non-persistent Fixes #276 --- src/includes/functions.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/includes/functions.php b/src/includes/functions.php index c3ef6c3b..fd5ace6d 100644 --- a/src/includes/functions.php +++ b/src/includes/functions.php @@ -797,4 +797,17 @@ function wordpoints_ranks_component_register() { } add_action( 'wordpoints_components_register', 'wordpoints_ranks_component_register' ); +/** + * Initialize the plugin's cache groups. + * + * @since 1.10.0 + */ +function wordpoints_init_cache_groups() { + + if ( function_exists( 'wp_cache_add_non_persistent_groups' ) ) { + wp_cache_add_non_persistent_groups( array( 'wordpoints_modules' ) ); + } +} +add_action( 'init', 'wordpoints_init_cache_groups', 5 ); + // EOF From b63355f3c4d3624b2cda0891ebac1458a6c62664 Mon Sep 17 00:00:00 2001 From: JDGrimes Date: Wed, 18 Feb 2015 17:29:07 -0500 Subject: [PATCH 34/65] Make the top users cache global when network active See #275 --- src/components/points/includes/functions.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/components/points/includes/functions.php b/src/components/points/includes/functions.php index 7126461d..d06a4413 100644 --- a/src/components/points/includes/functions.php +++ b/src/components/points/includes/functions.php @@ -260,7 +260,16 @@ function wordpoints_points_logs_custom_meta_key_message( $points_type ) { */ function wordpoints_points_add_global_cache_groups() { - wp_cache_add_global_groups( 'wordpoints_network_points_logs_query' ); + if ( function_exists( 'wp_cache_add_global_groups' ) ) { + + $groups = array( 'wordpoints_network_points_logs_query' ); + + if ( is_wordpoints_network_active() ) { + $groups[] = 'wordpoints_points_top_users'; + } + + wp_cache_add_global_groups( $groups ); + } } add_action( 'init', 'wordpoints_points_add_global_cache_groups', 5 ); From 72513ddf6475aaacb16cde33a69c66a056f7b45c Mon Sep 17 00:00:00 2001 From: JDGrimes Date: Sat, 21 Feb 2015 17:56:31 -0500 Subject: [PATCH 35/65] Use correct response codes with wp_die() Fixes #267 --- src/admin/admin.php | 2 +- src/admin/screens/modules-load.php | 14 ++++---- src/components/points/admin/includes/ajax.php | 34 +++++++++---------- 3 files changed, 24 insertions(+), 26 deletions(-) diff --git a/src/admin/admin.php b/src/admin/admin.php index 140a5f3b..aac7dca3 100644 --- a/src/admin/admin.php +++ b/src/admin/admin.php @@ -384,7 +384,7 @@ function wordpoints_install_modules_upload() { function wordpoints_upload_module_zip() { if ( ! current_user_can( 'install_wordpoints_modules' ) ) { - wp_die( esc_html__( 'You do not have sufficient permissions to install WordPoints modules on this site.', 'wordpoints' ) ); + wp_die( esc_html__( 'You do not have sufficient permissions to install WordPoints modules on this site.', 'wordpoints' ), '', array( 'response' => 403 ) ); } check_admin_referer( 'wordpoints-module-upload' ); diff --git a/src/admin/screens/modules-load.php b/src/admin/screens/modules-load.php index a2448c7a..2c66c739 100644 --- a/src/admin/screens/modules-load.php +++ b/src/admin/screens/modules-load.php @@ -35,7 +35,7 @@ // Activate a single module. case 'activate': if ( ! current_user_can( 'activate_wordpoints_modules' ) ) { - wp_die( esc_html__( 'You do not have sufficient permissions to activate modules for this site.', 'wordpoints' ) ); + wp_die( esc_html__( 'You do not have sufficient permissions to activate modules for this site.', 'wordpoints' ), '', array( 'response' => 403 ) ); } if ( is_multisite() && ! is_network_admin() && is_network_only_wordpoints_module( $module ) ) { @@ -85,7 +85,7 @@ // Activate multiple modules. case 'activate-selected': if ( ! current_user_can( 'activate_wordpoints_modules' ) ) { - wp_die( esc_html__( 'You do not have sufficient permissions to activate modules for this site.', 'wordpoints' ) ); + wp_die( esc_html__( 'You do not have sufficient permissions to activate modules for this site.', 'wordpoints' ), '', array( 'response' => 403 ) ); } check_admin_referer( 'bulk-modules' ); @@ -141,7 +141,7 @@ // Get the fatal error from a module. case 'error_scrape': if ( ! current_user_can( 'activate_wordpoints_modules' ) ) { - wp_die( esc_html__( 'You do not have sufficient permissions to activate modules for this site.', 'wordpoints' ) ); + wp_die( esc_html__( 'You do not have sufficient permissions to activate modules for this site.', 'wordpoints' ), '', array( 'response' => 403 ) ); } check_admin_referer( 'module-activation-error_' . $module ); @@ -149,7 +149,7 @@ $valid = wordpoints_validate_module( $module ); if ( is_wp_error( $valid ) ) { - wp_die( $valid ); + wp_die( $valid, '', array( 'response' => 400 ) ); } // Ensure that Fatal errors are displayed. @@ -185,7 +185,7 @@ function wordpoints_module_sandbox_scrape( $module ) { // Deactivate a module. case 'deactivate': if ( ! current_user_can( 'activate_wordpoints_modules' ) ) { - wp_die( esc_html__( 'You do not have sufficient permissions to deactivate modules for this site.', 'wordpoints' ) ); + wp_die( esc_html__( 'You do not have sufficient permissions to deactivate modules for this site.', 'wordpoints' ), '', array( 'response' => 403 ) ); } check_admin_referer( 'deactivate-module_' . $module ); @@ -213,7 +213,7 @@ function wordpoints_module_sandbox_scrape( $module ) { // Deactivate multiple modules. case 'deactivate-selected': if ( ! current_user_can( 'activate_wordpoints_modules' ) ) { - wp_die( esc_html__( 'You do not have sufficient permissions to deactivate modules for this site.', 'wordpoints' ) ); + wp_die( esc_html__( 'You do not have sufficient permissions to deactivate modules for this site.', 'wordpoints' ), '', array( 'response' => 403 ) ); } check_admin_referer( 'bulk-modules' ); @@ -255,7 +255,7 @@ function wordpoints_module_sandbox_scrape( $module ) { // Delete multiple modules. case 'delete-selected': if ( ! current_user_can( 'delete_wordpoints_modules' ) ) { - wp_die( esc_html__( 'You do not have sufficient permissions to delete modules for this site.', 'wordpoints' ) ); + wp_die( esc_html__( 'You do not have sufficient permissions to delete modules for this site.', 'wordpoints' ), '', array( 'response' => 403 ) ); } check_admin_referer( 'bulk-modules' ); diff --git a/src/components/points/admin/includes/ajax.php b/src/components/points/admin/includes/ajax.php index 0031b7d8..488343ce 100644 --- a/src/components/points/admin/includes/ajax.php +++ b/src/components/points/admin/includes/ajax.php @@ -19,7 +19,7 @@ function wordpoints_ajax_points_hooks_order() { if ( check_ajax_referer( 'save-network-wordpoints-points-hooks', 'savehooks', false ) ) { if ( ! current_user_can( 'manage_network_wordpoints_points_hooks' ) ) { - wp_die( -1 ); + wp_die( -1, '', array( 'response' => 403 ) ); } // Saving network hooks order, turn on network mode. @@ -28,13 +28,13 @@ function wordpoints_ajax_points_hooks_order() { } elseif ( check_ajax_referer( 'save-wordpoints-points-hooks', 'savehooks', false ) ) { if ( ! current_user_can( 'manage_options' ) ) { - wp_die( -1 ); + wp_die( -1, '', array( 'response' => 403 ) ); } } else { // CSRF attack (or, more probably, the user left the browser open too long). - wp_die( -1 ); + wp_die( -1, '', array( 'response' => 403 ) ); } // Save hooks order for all points types. @@ -65,10 +65,10 @@ function wordpoints_ajax_points_hooks_order() { WordPoints_Points_Hooks::save_points_types_hooks( wp_unslash( $points_types_hooks ) ); - wp_die( 1 ); + wp_die( 1, '', array( 'response' => 200 ) ); } - wp_die( -1 ); + wp_die( -1, '', array( 'response' => 400 ) ); } add_action( 'wp_ajax_wordpoints-points-hooks-order', 'wordpoints_ajax_points_hooks_order' ); @@ -84,7 +84,7 @@ function wordpoints_ajax_save_points_hook() { if ( check_ajax_referer( 'save-network-wordpoints-points-hooks', 'savehooks', false ) ) { if ( ! current_user_can( 'manage_network_wordpoints_points_hooks' ) ) { - wp_die( -1 ); + wp_die( -1, '', array( 'response' => 403 ) ); } // Saving network hooks, turn on network mode. @@ -93,13 +93,13 @@ function wordpoints_ajax_save_points_hook() { } elseif ( check_ajax_referer( 'save-wordpoints-points-hooks', 'savehooks', false ) ) { if ( ! current_user_can( 'manage_options' ) ) { - wp_die( -1 ); + wp_die( -1, '', array( 'response' => 403 ) ); } } else { // CSRF attack (or, more probably the user left the browser open too long). - wp_die( -1 ); + wp_die( -1, '', array( 'response' => 403 ) ); } $error = '

' . esc_html__( 'An error has occurred. Please reload the page and try again.', 'wordpoints' ) . '

'; @@ -109,7 +109,7 @@ function wordpoints_ajax_save_points_hook() { // - We are saving the settings for a points type. if ( ! current_user_can( 'manage_wordpoints_points_types' ) ) { - wp_die( -1 ); + wp_die( -1, '', array( 'response' => 403 ) ); } $settings = array(); @@ -131,7 +131,7 @@ function wordpoints_ajax_save_points_hook() { $old_settings = wordpoints_get_points_type( $points_type ); if ( false === $old_settings ) { - wp_die( -1 ); + wp_die( -1, '', array( 'response' => 200 ) ); } if ( is_array( $old_settings ) ) { @@ -151,7 +151,7 @@ function wordpoints_ajax_save_points_hook() { // - We are creating/updating/deleting an instance of a hook. if ( ! isset( $_POST['id_base'], $_POST['hook-id'], $_POST['points_type'], $_POST['hook_number'] ) ) { - wp_die( -1 ); + wp_die( -1, '', array( 'response' => 400 ) ); } $id_base = sanitize_key( $_POST['id_base'] ); @@ -169,7 +169,7 @@ function wordpoints_ajax_save_points_hook() { // This holds the ID number if the hook is brand new. if ( ! isset( $_POST['multi_number'] ) || ! wordpoints_posint( $_POST['multi_number'] ) ) { - wp_die( $error ); + wp_die( $error, '', array( 'response' => 400 ) ); } $number = (int) $_POST['multi_number']; @@ -194,7 +194,7 @@ function wordpoints_ajax_save_points_hook() { // - We are deleting a hook instance. if ( false === $hook ) { - wp_die( $error ); + wp_die( $error, '', array( 'response' => 400 ) ); } $hook->delete_callback( $number ); @@ -204,9 +204,7 @@ function wordpoints_ajax_save_points_hook() { WordPoints_Points_Hooks::save_points_types_hooks( $points_types_hooks ); - echo esc_html( "deleted:{$hook_id}" ); - - wp_die(); + wp_die( esc_html( "deleted:{$hook_id}" ), '', array( 'response' => 200 ) ); } elseif ( $settings && false === $hook ) { @@ -231,7 +229,7 @@ function wordpoints_ajax_save_points_hook() { // - We are updating the settings for an instance of a hook. if ( false === $hook ) { - wp_die( $error ); + wp_die( $error, '', array( 'response' => 400 ) ); } $new_instance = ( ! empty( $settings ) ) ? reset( $settings ) : array(); @@ -245,7 +243,7 @@ function wordpoints_ajax_save_points_hook() { } // if ( isset( $_POST['points-name'] ) ) {} else - wp_die(); + wp_die( '', '', array( 'response' => 200 ) ); } add_action( 'wp_ajax_save-wordpoints-points-hook', 'wordpoints_ajax_save_points_hook' ); From 07d1e1f5f136d28b387b1af65dbe5a7b78a8ccd4 Mon Sep 17 00:00:00 2001 From: JDGrimes Date: Sat, 21 Feb 2015 17:57:42 -0500 Subject: [PATCH 36/65] Fix typo in argument name --- src/admin/admin.php | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/src/admin/admin.php b/src/admin/admin.php index aac7dca3..9b9b6b7e 100644 --- a/src/admin/admin.php +++ b/src/admin/admin.php @@ -246,35 +246,47 @@ function wordpoints_show_admin_error( $message, array $args = array() ) { * @since 1.0.0 * @since 1.2.0 The $type parameter is now properly escaped. * @since 1.8.0 The $message will be passed through wp_kses(). - * @since 1.8.0 The $args paramter was added with dismissable and option args. + * @since 1.8.0 The $args parameter was added with "dismissable" and "option" args. + * @since 1.10.0 The "dismissable" arg was renamed to "dismissible". * * @param string $message The text for the message. * @param string $type The type of message to display. Default is 'updated'. * @param array $args { * Other optional arguments. * - * @type bool $dismissable Whether this notice can be dismissed. Default is - * false (not dismissable). + * @type bool $dismissible Whether this notice can be dismissed. Default is + * false (not dismissible). * @type string $option An option to delete when if message is dismissed. - * Required when $dismissable is true. + * Required when $dismissible is true. * } */ function wordpoints_show_admin_message( $message, $type = 'updated', array $args = array() ) { $defaults = array( - 'dismissable' => false, + 'dismissible' => false, 'option' => '', ); $args = array_merge( $defaults, $args ); + if ( isset( $args['dismissable'] ) ) { + + $args['dismissible'] = $args['dismissable']; + + _deprecated_argument( + __FUNCTION__ + , '1.10.0' + , 'The "dismissable" argument has been replaced by the correct spelling, "dismissible".' + ); + } + ?>

- +
From 6c3d4651031e8c83e4248f5067cfdf945ff62960 Mon Sep 17 00:00:00 2001 From: JDGrimes Date: Sat, 21 Feb 2015 17:58:36 -0500 Subject: [PATCH 37/65] Correct argument type --- src/admin/admin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/admin/admin.php b/src/admin/admin.php index 9b9b6b7e..7e5b3ce9 100644 --- a/src/admin/admin.php +++ b/src/admin/admin.php @@ -229,7 +229,7 @@ function wordpoints_admin_activate_components() { * @uses wordpoints_show_admin_message() * * @param string $message The text for the error message. - * @param string $args Other optional arguments. + * @param array $args Other optional arguments. */ function wordpoints_show_admin_error( $message, array $args = array() ) { From ed19d776e149e6bf1ba2c0fe4e04e6fc7736fb5f Mon Sep 17 00:00:00 2001 From: JDGrimes Date: Sat, 21 Feb 2015 18:01:16 -0500 Subject: [PATCH 38/65] Remove back-compaq for WP 3.8 See #284 --- src/components/points/includes/hooks/abstracts/post-type.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/points/includes/hooks/abstracts/post-type.php b/src/components/points/includes/hooks/abstracts/post-type.php index 17af69a5..886f89ec 100644 --- a/src/components/points/includes/hooks/abstracts/post-type.php +++ b/src/components/points/includes/hooks/abstracts/post-type.php @@ -117,7 +117,6 @@ protected function get_logs_to_auto_reverse( array $meta_query ) { array( 'key' => 'auto_reversed', 'compare' => 'NOT EXISTS', - 'value' => 'see bug #23268 (fixed in 3.9)', ), ), ) From 390d1a27cbcf889ac6de4ffcd26beff1e8f97d40 Mon Sep 17 00:00:00 2001 From: JDGrimes Date: Sat, 21 Feb 2015 18:07:13 -0500 Subject: [PATCH 39/65] Move tfoot elements after tbody elements This provides better accessibility. Fixes #266 --- src/admin/screens/configure-components.php | 28 ++++++++++------------ src/components/points/includes/logs.php | 20 ++++++++-------- src/components/points/includes/points.php | 14 +++++------ 3 files changed, 30 insertions(+), 32 deletions(-) diff --git a/src/admin/screens/configure-components.php b/src/admin/screens/configure-components.php index 44374638..e112664f 100644 --- a/src/admin/screens/configure-components.php +++ b/src/admin/screens/configure-components.php @@ -91,18 +91,11 @@ - - - - - - - - - + - foreach ( $components as $component ) { + is_active( $component['slug'] ) ) { @@ -155,12 +148,17 @@ - + + + + + + + + + + - - - - - - - - - - @@ -566,6 +556,16 @@ function wordpoints_show_points_logs( $logs_query, array $args = array() ) { ?> + + + + + + + + + + diff --git a/src/components/points/includes/points.php b/src/components/points/includes/points.php index e29a8b21..ba92a9b6 100644 --- a/src/components/points/includes/points.php +++ b/src/components/points/includes/points.php @@ -1156,13 +1156,6 @@ function wordpoints_points_show_top_users( $num_users, $points_type, $context = - - - - - - - + + + + + + + Date: Mon, 23 Feb 2015 16:59:22 -0500 Subject: [PATCH 40/65] Make points log meta cache global on multisite See #275 --- src/components/points/includes/functions.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/points/includes/functions.php b/src/components/points/includes/functions.php index d06a4413..680f696d 100644 --- a/src/components/points/includes/functions.php +++ b/src/components/points/includes/functions.php @@ -262,7 +262,10 @@ function wordpoints_points_add_global_cache_groups() { if ( function_exists( 'wp_cache_add_global_groups' ) ) { - $groups = array( 'wordpoints_network_points_logs_query' ); + $groups = array( + 'wordpoints_network_points_logs_query', + 'wordpoints_points_log_meta', + ); if ( is_wordpoints_network_active() ) { $groups[] = 'wordpoints_points_top_users'; From 7bf3269ac4a9e340e98f18a4901ce29a701e8f51 Mon Sep 17 00:00:00 2001 From: JDGrimes Date: Tue, 24 Feb 2015 20:06:48 -0500 Subject: [PATCH 41/65] Don't use post title in post delete hook logs See #261 --- src/components/points/includes/logs.php | 11 +++-------- tests/phpunit/tests/points/hooks/post.php | 12 ++++++------ 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/src/components/points/includes/logs.php b/src/components/points/includes/logs.php index da616075..4afa35c4 100644 --- a/src/components/points/includes/logs.php +++ b/src/components/points/includes/logs.php @@ -698,20 +698,15 @@ function wordpoints_points_logs_post_delete( $text, $points, $points_type, $user if ( ! is_null( $post_type ) ) { - /* translators: 1 is the post type name, 2 is the post title. */ + /* translators: the post type's name. */ return sprintf( - _x( '%1$s “%2$s” deleted.', 'points log description', 'wordpoints' ) + _x( '%s deleted.', 'points log description', 'wordpoints' ) , $post_type->labels->singular_name - , $meta['post_title'] ); } } - /* translators: %s will be the post title. */ - return sprintf( - _x( 'Post “%s” deleted.', 'points log description', 'wordpoints' ) - , $meta['post_title'] - ); + return _x( 'Post deleted.', 'points log description', 'wordpoints' ); } add_action( 'wordpoints_points_log-post_delete', 'wordpoints_points_logs_post_delete', 10, 6 ); diff --git a/tests/phpunit/tests/points/hooks/post.php b/tests/phpunit/tests/points/hooks/post.php index 955c6449..031b395c 100644 --- a/tests/phpunit/tests/points/hooks/post.php +++ b/tests/phpunit/tests/points/hooks/post.php @@ -584,10 +584,10 @@ public function test_delete_post_log_text() { , 10 , 'points' , 'post_delete' - , array( 'post_title' => 'Test title' ) + , array() ); - $this->assertEquals( 'Post “Test title” deleted.', $text ); + $this->assertEquals( 'Post deleted.', $text ); } /** @@ -604,10 +604,10 @@ public function test_delete_post_log_text_with_post_type() { , 10 , 'points' , 'post_delete' - , array( 'post_title' => 'Test title', 'post_type' => 'page' ) + , array( 'post_type' => 'page' ) ); - $this->assertEquals( 'Page “Test title” deleted.', $text ); + $this->assertEquals( 'Page deleted.', $text ); } /** @@ -624,10 +624,10 @@ public function test_delete_post_log_text_with_bad_post_type() { , 10 , 'points' , 'post_delete' - , array( 'post_title' => 'Test title', 'post_type' => 'not' ) + , array( 'post_type' => 'not' ) ); - $this->assertEquals( 'Post “Test title” deleted.', $text ); + $this->assertEquals( 'Post deleted.', $text ); } // From fa3bd1094aacdd5a8f35fb89d13b2454da3fa9dc Mon Sep 17 00:00:00 2001 From: JDGrimes Date: Tue, 24 Feb 2015 20:08:07 -0500 Subject: [PATCH 42/65] PHPUnit: fix points log factory when providing meta --- tests/phpunit/includes/factories/points-log.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/phpunit/includes/factories/points-log.php b/tests/phpunit/includes/factories/points-log.php index 3cdb49d3..7c4e76a4 100644 --- a/tests/phpunit/includes/factories/points-log.php +++ b/tests/phpunit/includes/factories/points-log.php @@ -88,7 +88,7 @@ public function create_object( $args ) { $args['log_meta'] = array(); } - if ( empty( $args['log_meta'] ) ) { + if ( ! empty( $args['log_meta'] ) ) { $this->listen_for_insert_id = false; add_action( 'query', array( $this, 'get_log_id' ) ); } @@ -102,15 +102,17 @@ public function create_object( $args ) { ); if ( empty( $args['log_meta'] ) ) { + $log_id = $wpdb->insert_id; + } else { + $log_id = $this->insert_id; remove_action( 'query', array( $this, 'get_log_id' ) ); - $this->log_id = $wpdb->insert_id; } if ( isset( $args['text'] ) ) { - $this->update_object( $this->log_id, array( 'text' => $args['text'] ) ); + $this->update_object( $log_id, array( 'text' => $args['text'] ) ); } - return $this->log_id; + return $log_id; } /** From b3b49a14564e8cfcedd6306356d8a2c3b9f0d988 Mon Sep 17 00:00:00 2001 From: JDGrimes Date: Tue, 24 Feb 2015 20:09:22 -0500 Subject: [PATCH 43/65] Delete unused 'post_title' points log meta on update See #261 --- .../points/includes/class-un-installer.php | 63 ++++++++++- tests/phpunit/tests/points/update/1-10-0.php | 106 ++++++++++++++++++ 2 files changed, 163 insertions(+), 6 deletions(-) create mode 100644 tests/phpunit/tests/points/update/1-10-0.php diff --git a/src/components/points/includes/class-un-installer.php b/src/components/points/includes/class-un-installer.php index 6177ce62..b53179fb 100644 --- a/src/components/points/includes/class-un-installer.php +++ b/src/components/points/includes/class-un-installer.php @@ -27,12 +27,13 @@ class WordPoints_Points_Un_Installer extends WordPoints_Un_Installer_Base { * @since 1.8.0 */ protected $updates = array( - '1.2.0' => array( 'single' => true, /* - */ 'network' => true ), - '1.4.0' => array( 'single' => true, 'site' => true, 'network' => true ), - '1.5.0' => array( /* - */ 'site' => true /* - */ ), - '1.5.1' => array( 'single' => true, /* - */ 'network' => true ), - '1.8.0' => array( /* - */ 'site' => true /* - */ ), - '1.9.0' => array( 'single' => true, 'site' => true, 'network' => true ), + '1.2.0' => array( 'single' => true, /* - */ 'network' => true ), + '1.4.0' => array( 'single' => true, 'site' => true, 'network' => true ), + '1.5.0' => array( /* - */ 'site' => true /* - */ ), + '1.5.1' => array( 'single' => true, /* - */ 'network' => true ), + '1.8.0' => array( /* - */ 'site' => true /* - */ ), + '1.9.0' => array( 'single' => true, 'site' => true, 'network' => true ), + '1.10.0' => array( 'single' => true, /* - */ 'network' => true ), ); /** @@ -805,6 +806,56 @@ protected function _1_9_0_combine_hooks( $type, $reverse_type ) { ); } } + + /** + * Update a site to 1.10.0. + * + * @since 1.10.0 + */ + protected function update_network_to_1_10_0() { + $this->_1_10_0_delete_post_title_points_log_meta( true ); + } + + /** + * Update a single site to 1.10.0. + * + * @since 1.10.0 + */ + protected function update_single_to_1_10_0() { + $this->_1_10_0_delete_post_title_points_log_meta(); + } + + /** + * Delete the no longer used 'post_title' metadata from post delete points logs. + * + * @since 1.10.0 + * + * @param bool $network_wide Whether to delete all of the metadata for the whole + * network, or just the current site (default). + */ + protected function _1_10_0_delete_post_title_points_log_meta( $network_wide = false ) { + + $query_args = array( + 'log_type' => 'post_delete', + 'meta_query' => array( + array( 'key' => 'post_title', 'compare' => 'EXISTS' ), + ), + ); + + if ( $network_wide ) { + $query_args['blog_id'] = false; + } + + $query = new WordPoints_Points_Logs_Query( $query_args ); + + $logs = $query->get(); + + foreach ( $logs as $log ) { + wordpoints_delete_points_log_meta( $log->id, 'post_title' ); + } + + wordpoints_regenerate_points_logs( $logs ); + } } return 'WordPoints_Points_Un_Installer'; diff --git a/tests/phpunit/tests/points/update/1-10-0.php b/tests/phpunit/tests/points/update/1-10-0.php new file mode 100644 index 00000000..029bbb32 --- /dev/null +++ b/tests/phpunit/tests/points/update/1-10-0.php @@ -0,0 +1,106 @@ +markTestSkipped( 'Multisite must be disabled.' ); + } + + $this->factory->wordpoints_points_log->create( + array( + 'log_type' => 'post_delete', + 'log_meta' => array( 'post_title' => 'Test Post' ), + ) + ); + + $query = new WordPoints_Points_Logs_Query( + array( + 'log_type' => 'post_delete', + 'meta_query' => array( + array( 'key' => 'post_title', 'compare' => 'EXISTS' ), + ), + ) + ); + + $this->assertCount( 1, $query->get() ); + + $this->update_component(); + + $this->assertCount( 0, $query->get() ); + } + + /** + * Test that unused 'post_title' log meta deleted on update. + * + * @since 1.10.0 + */ + public function test_post_title_points_log_meta_deleted_network() { + + if ( ! is_wordpoints_network_active() ) { + $this->markTestSkipped( 'WordPoints must be network-active.' ); + } + + $this->factory->wordpoints_points_log->create( + array( + 'log_type' => 'post_delete', + 'log_meta' => array( 'post_title' => 'Test Post' ), + ) + ); + + $blog_id = $this->factory->blog->create(); + + switch_to_blog( $blog_id ); + $this->factory->wordpoints_points_log->create( + array( + 'log_type' => 'post_delete', + 'log_meta' => array( 'post_title' => 'Test Post' ), + ) + ); + restore_current_blog(); + + $query = new WordPoints_Points_Logs_Query( + array( + 'log_type' => 'post_delete', + 'blog_id' => false, + 'meta_query' => array( + array( 'key' => 'post_title', 'compare' => 'EXISTS' ), + ), + ) + ); + + $this->assertCount( 2, $query->get() ); + + $this->update_component(); + + $this->assertCount( 0, $query->get() ); + } +} + +// EOF From 04b6f13e3476f33a05720f3f844f4ae663c2748b Mon Sep 17 00:00:00 2001 From: JDGrimes Date: Tue, 24 Feb 2015 20:10:53 -0500 Subject: [PATCH 44/65] Fix some typos in docblocks --- src/components/points/includes/class-un-installer.php | 4 ++-- src/includes/class-un-installer-base.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/points/includes/class-un-installer.php b/src/components/points/includes/class-un-installer.php index b53179fb..4cb84daf 100644 --- a/src/components/points/includes/class-un-installer.php +++ b/src/components/points/includes/class-un-installer.php @@ -39,7 +39,7 @@ class WordPoints_Points_Un_Installer extends WordPoints_Un_Installer_Base { /** * The points types the user has created. * - * Used during uninstall to keep from having to retreive them when looping over + * Used during uninstall to keep from having to retrieve them when looping over * sites on multisite. * * @since 1.8.0 @@ -796,7 +796,7 @@ protected function _1_9_0_combine_hooks( $type, $reverse_type ) { ); } - // Now we check if there are any unpaired reverse typ hooks. If there are + // Now we check if there are any unpaired reverse type hooks. If there are // we'll set this flag in the database that will keep some legacy features // enabled. if ( $reverse_hook->get_instances( $hook_type ) ) { diff --git a/src/includes/class-un-installer-base.php b/src/includes/class-un-installer-base.php index 3478a757..19b6d470 100644 --- a/src/includes/class-un-installer-base.php +++ b/src/includes/class-un-installer-base.php @@ -511,7 +511,7 @@ abstract protected function install_network(); abstract protected function install_site(); /** - * Innstall on a single site. + * Install on a single site. * * This runs when the WordPress site is not a multisite. It should completely * install the entity. @@ -521,7 +521,7 @@ abstract protected function install_site(); abstract protected function install_single(); /** - * Load any dependencies of the unisntall code. + * Load any dependencies of the uninstall code. * * @since 1.8.0 */ From add4081eba18e2259f29133aef8ee5e4ef05e1c8 Mon Sep 17 00:00:00 2001 From: JDGrimes Date: Tue, 24 Feb 2015 20:11:57 -0500 Subject: [PATCH 45/65] Inline doc fixes --- .../points/includes/class-wordpoints-points-logs-query.php | 2 +- src/components/points/includes/points.php | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/components/points/includes/class-wordpoints-points-logs-query.php b/src/components/points/includes/class-wordpoints-points-logs-query.php index 628562b4..50020577 100644 --- a/src/components/points/includes/class-wordpoints-points-logs-query.php +++ b/src/components/points/includes/class-wordpoints-points-logs-query.php @@ -566,7 +566,7 @@ public function get_sql( $select_type = null ) { * * @param string $key The cache key to use. * @param string $deprecated Deprecated; no longer used. - * @param string $network Whether this is a network-wide query. + * @param bool $network Whether this is a network-wide query. */ public function prime_cache( $key = 'default:%points_type%', $deprecated = null, $network = false ) { diff --git a/src/components/points/includes/points.php b/src/components/points/includes/points.php index ba92a9b6..d9187be1 100644 --- a/src/components/points/includes/points.php +++ b/src/components/points/includes/points.php @@ -863,6 +863,8 @@ function wordpoints_update_points_log_meta( $log_id, $meta_key, $meta_value, $pr * @param int $log_id The ID of the transaction. * @param string $meta_key The meta key to update. * @param mixed $meta_value The new value for this meta key. + * @param bool $delete_all Whether to delete metadata for all matching logs, or + * only the one specified by $log_id (default). * * @return bool Whether any rows where deleted. */ @@ -1030,7 +1032,7 @@ function wordpoints_regenerate_points_logs( $logs ) { * * @since 1.0.0 * - * @param array $num_users The number of users to retrieve. + * @param int $num_users The number of users to retrieve. * @param string $points_type The type of points. * * @return int[] The IDs of the users with the most points. @@ -1105,8 +1107,9 @@ function wordpoints_points_get_top_users( $num_users, $points_type ) { * * @since 1.7.0 * - * @param array $num_users The number of users to display. + * @param int $num_users The number of users to display. * @param string $points_type The type of points. + * @param string $context The context in which the table is being displayed. */ function wordpoints_points_show_top_users( $num_users, $points_type, $context = 'default' ) { From bf193f605ab23171e11c9b3d96dd9798fa32f8ee Mon Sep 17 00:00:00 2001 From: JDGrimes Date: Wed, 25 Feb 2015 15:00:27 -0500 Subject: [PATCH 46/65] Deprecate Update API module header in favor of Channel Closes #286 --- src/includes/modules.php | 8 +++++++- tests/phpunit/tests/modules/modules.php | 3 +++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/includes/modules.php b/src/includes/modules.php index d355cac8..dff24f8a 100644 --- a/src/includes/modules.php +++ b/src/includes/modules.php @@ -362,6 +362,7 @@ function wordpoints_module_basename( $file ) { * * @since 1.1.0 * @since 1.6.0 The 'update_api' and 'ID' headers are now supported. + * @since 1.10.0 The 'update_api' header is deprecated in favor of 'channel'. * * @param string $module_file The file to parse for the headers. * @param bool $markup Whether to mark up the module data for display (default). @@ -381,7 +382,7 @@ function wordpoints_module_basename( $file ) { * @type string $text_domain The module's text domain. * @type string $domain_path The folder containing the module's *.mo translation files. * @type bool $network Whether the module should only be network activated. - * @type string $update_api The update service to be used for this module. + * @type string $channel The URL of the update service to be used for this module. * @type mixed $ID A unique identifier for this module, used by the update service. * } */ @@ -398,11 +399,16 @@ function wordpoints_get_module_data( $module_file, $markup = true, $translate = 'domain_path' => 'Domain Path', 'network' => 'Network', 'update_api' => 'Update API', + 'channel' => 'Channel', 'ID' => 'ID', ); $module_data = get_file_data( $module_file, $default_headers, 'module' ); + if ( ! empty( $module_data['update_api'] ) ) { + _deprecated_argument( __FUNCTION__, '1.10.0', 'The "Update API" module header has been deprecated in favor of "Channel".' ); + } + $module_data['network'] = ( 'true' === strtolower( $module_data['network'] ) ); if ( $markup || $translate ) { diff --git a/tests/phpunit/tests/modules/modules.php b/tests/phpunit/tests/modules/modules.php index 9431c789..87a40ae0 100644 --- a/tests/phpunit/tests/modules/modules.php +++ b/tests/phpunit/tests/modules/modules.php @@ -49,6 +49,7 @@ public function test_get_modules() { 'title' => 'Test 3', 'author_name' => 'WordPoints Tester', 'update_api' => '', + 'channel' => '', 'ID' => '', ), 'test-4/test-4.php' => array( @@ -64,6 +65,7 @@ public function test_get_modules() { 'title' => 'Test 4', 'author_name' => 'WordPoints Tester', 'update_api' => '', + 'channel' => '', 'ID' => '', ), ) @@ -85,6 +87,7 @@ public function test_get_modules() { 'title' => 'Test 4', 'author_name' => 'WordPoints Tester', 'update_api' => '', + 'channel' => '', 'ID' => '', ), ) From b9a1a76e84ee7219208d278f8659b84f5ad36dc4 Mon Sep 17 00:00:00 2001 From: JDGrimes Date: Thu, 26 Feb 2015 15:56:55 -0500 Subject: [PATCH 47/65] Remove update-version.sh script Closes #287 --- tools/bin/update-version.sh | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100755 tools/bin/update-version.sh diff --git a/tools/bin/update-version.sh b/tools/bin/update-version.sh deleted file mode 100755 index 5830a925..00000000 --- a/tools/bin/update-version.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -if [ -z $1 ]; - then echo "Usage: $0 "; - exit; -fi - -sed -i '' -e 's/\(\* @\{0,1\}[Vv]\{1\}ersion:\{0,1\}\) \([^\n]*\)/\1 '"$1"'/' \ - ./src/wordpoints.php; - -sed -i '' -e 's/VERSION'"'"', '"'"'[^'"'"']*/VERSION'"'"', '"'""$1"'/' \ - ./src/includes/constants.php From f1f5934619a5585b8fcb44ffc561c36d862ce4f4 Mon Sep 17 00:00:00 2001 From: JDGrimes Date: Fri, 27 Feb 2015 10:00:09 -0500 Subject: [PATCH 48/65] Move parens in ternary echo conditions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To appease WPCS’s XSS sniff. --- src/admin/includes/class-wordpoints-modules-list-table.php | 6 +++--- .../points/includes/class-wordpoints-points-hooks.php | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/admin/includes/class-wordpoints-modules-list-table.php b/src/admin/includes/class-wordpoints-modules-list-table.php index a2b497fe..17e0bbbb 100644 --- a/src/admin/includes/class-wordpoints-modules-list-table.php +++ b/src/admin/includes/class-wordpoints-modules-list-table.php @@ -552,7 +552,7 @@ public function single_row( $item ) { case 'name': ?> - > + > row_actions( $this->get_module_row_actions( $module_file, $module_data, $is_active ), true ); // XSS OK WPCS ?> @@ -561,7 +561,7 @@ public function single_row( $item ) { case 'description': ?> - > + >

@@ -620,7 +620,7 @@ public function single_row( $item ) { default: ?> - > + > " /> - - + + @@ -773,7 +773,7 @@ private static function _list_hook( $hook_id, $hook, $points_type = null ) { |

-
+
"hook-{$id_format}-savehook" ) ); ?>
From c6ba82ad711a747f5f25b4a0672af924f4ba0adc Mon Sep 17 00:00:00 2001 From: JDGrimes Date: Fri, 27 Feb 2015 10:05:00 -0500 Subject: [PATCH 49/65] Add function to sanitize error objects for wp_die() Closes #288 --- src/includes/functions.php | 43 ++++++++++++++ tests/phpunit/tests/sanitization.php | 84 ++++++++++++++++++++++++++++ 2 files changed, 127 insertions(+) create mode 100644 tests/phpunit/tests/sanitization.php diff --git a/src/includes/functions.php b/src/includes/functions.php index fd5ace6d..5e1eef84 100644 --- a/src/includes/functions.php +++ b/src/includes/functions.php @@ -173,6 +173,49 @@ function wordpoints_verify_nonce( return false; } +/** + * Sanitize a WP_Error object for passing directly to wp_die(). + * + * The wp_die() function accepts an WP_Error object as the first parameter, but it + * does not sanitize it's contents before printing it out to the user. By passing + * the object through this function before giving it to wp_die(), the potential for + * XSS should be avoided. + * + * Example: + * + * wp_die( wordpoints_sanitize_wp_error( $error ) ); + * + * @since 1.10.0 + * + * @param WP_Error $error The error to sanitize. + * + * @return WP_Error The sanitized error. + */ +function wordpoints_sanitize_wp_error( $error ) { + + $code = $error->get_error_code(); + + if ( isset( $error->error_data[ $code ]['title'] ) ) { + + $error->error_data[ $code ]['title'] = wp_kses( + $error->error_data[ $code ]['title'] + , 'wordpoints_sanitize_wp_error_title' + ); + } + + foreach ( $error->errors as $code => $errors ) { + + foreach ( $errors as $key => $message ) { + $error->errors[ $code ][ $key ] = wp_kses( + $message + , 'wordpoints_sanitize_wp_error_message' + ); + } + } + + return $error; +} + // // Databae Helpers. // diff --git a/tests/phpunit/tests/sanitization.php b/tests/phpunit/tests/sanitization.php new file mode 100644 index 00000000..5d856872 --- /dev/null +++ b/tests/phpunit/tests/sanitization.php @@ -0,0 +1,84 @@ + '' ) ); + $error = wordpoints_sanitize_wp_error( $error ); + $this->assertEquals( array( 'title' => 'alert("!");' ), $error->get_error_data() ); + } + + /** + * Test that it doesn't explode when there is no title. + * + * @since 1.10.0 + * + * @covers ::wordpoints_sanitize_wp_error + */ + public function test_wordpoints_sanitize_wp_error_no_title() { + + $data = array( 'blah' => 'foo' ); + + $error = new WP_Error( 'test', 'Testing', $data ); + $error = wordpoints_sanitize_wp_error( $error ); + + $this->assertEquals( $data, $error->get_error_data() ); + } + + /** + * Test that it sanitizes the message. + * + * @since 1.10.0 + * + * @covers ::wordpoints_sanitize_wp_error + */ + public function test_wordpoints_sanitize_wp_error_sanitizes_message() { + + $error = new WP_Error( 'test', '' ); + $error = wordpoints_sanitize_wp_error( $error ); + $this->assertEquals( 'alert("!");', $error->get_error_message() ); + } + + /** + * Test that it sanitizes multiple messages if present. + * + * @since 1.10.0 + * + * @covers ::wordpoints_sanitize_wp_error + */ + public function test_wordpoints_sanitize_wp_error_sanitizes_messages() { + + $error = new WP_Error( 'test', '' ); + $error->add( 'test', 'click' ); + $error->add( 'foo', '' ); + + $error = wordpoints_sanitize_wp_error( $error ); + + $this->assertEquals( + array( 'alert("!");', 'click', '' ) + , $error->get_error_messages() + ); + } +} + +// EOF From a5acf0008bf34db8aa14b7e91ddc59bf4e5b3498 Mon Sep 17 00:00:00 2001 From: JDGrimes Date: Fri, 27 Feb 2015 10:05:42 -0500 Subject: [PATCH 50/65] Better late escaping for `wp_die()` messages See #288 --- src/admin/screens/modules-load.php | 4 ++-- src/components/points/admin/includes/ajax.php | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/admin/screens/modules-load.php b/src/admin/screens/modules-load.php index 2c66c739..d2c5f429 100644 --- a/src/admin/screens/modules-load.php +++ b/src/admin/screens/modules-load.php @@ -68,7 +68,7 @@ } else { - wp_die( $result ); + wp_die( wordpoints_sanitize_wp_error( $result ) ); } } @@ -149,7 +149,7 @@ $valid = wordpoints_validate_module( $module ); if ( is_wp_error( $valid ) ) { - wp_die( $valid, '', array( 'response' => 400 ) ); + wp_die( wordpoints_sanitize_wp_error( $valid ), '', array( 'response' => 400 ) ); } // Ensure that Fatal errors are displayed. diff --git a/src/components/points/admin/includes/ajax.php b/src/components/points/admin/includes/ajax.php index 488343ce..90cd3803 100644 --- a/src/components/points/admin/includes/ajax.php +++ b/src/components/points/admin/includes/ajax.php @@ -102,7 +102,7 @@ function wordpoints_ajax_save_points_hook() { wp_die( -1, '', array( 'response' => 403 ) ); } - $error = '

' . esc_html__( 'An error has occurred. Please reload the page and try again.', 'wordpoints' ) . '

'; + $error = __( 'An error has occurred. Please reload the page and try again.', 'wordpoints' ); if ( isset( $_POST['points-slug'] ) ) { @@ -169,7 +169,7 @@ function wordpoints_ajax_save_points_hook() { // This holds the ID number if the hook is brand new. if ( ! isset( $_POST['multi_number'] ) || ! wordpoints_posint( $_POST['multi_number'] ) ) { - wp_die( $error, '', array( 'response' => 400 ) ); + wp_die( '

' . esc_html( $error ) . '

', '', array( 'response' => 400 ) ); } $number = (int) $_POST['multi_number']; @@ -194,7 +194,7 @@ function wordpoints_ajax_save_points_hook() { // - We are deleting a hook instance. if ( false === $hook ) { - wp_die( $error, '', array( 'response' => 400 ) ); + wp_die( '

' . esc_html( $error ) . '

', '', array( 'response' => 400 ) ); } $hook->delete_callback( $number ); @@ -229,7 +229,7 @@ function wordpoints_ajax_save_points_hook() { // - We are updating the settings for an instance of a hook. if ( false === $hook ) { - wp_die( $error, '', array( 'response' => 400 ) ); + wp_die( '

' . esc_html( $error ) . '

', '', array( 'response' => 400 ) ); } $new_instance = ( ! empty( $settings ) ) ? reset( $settings ) : array(); From 04c7c96a111176983cff7e9f6f5c93d7a79436c9 Mon Sep 17 00:00:00 2001 From: JDGrimes Date: Fri, 27 Feb 2015 10:05:59 -0500 Subject: [PATCH 51/65] PHPDoc fixes --- .../points/includes/class-wordpoints-points-hooks.php | 4 +++- src/includes/functions.php | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/components/points/includes/class-wordpoints-points-hooks.php b/src/components/points/includes/class-wordpoints-points-hooks.php index 9d9892bc..7d2f52c2 100644 --- a/src/components/points/includes/class-wordpoints-points-hooks.php +++ b/src/components/points/includes/class-wordpoints-points-hooks.php @@ -481,7 +481,9 @@ public static function save_points_types_hooks( array $points_types_hooks ) { * * @since 1.0.0 * - * @param string|false $hook_id The ID of the hook. False if not found. + * @param string $hook_id The ID of the hook. + * + * @return string|false The points type for the hook. False if not found. */ public static function get_points_type( $hook_id ) { diff --git a/src/includes/functions.php b/src/includes/functions.php index 5e1eef84..36dcc846 100644 --- a/src/includes/functions.php +++ b/src/includes/functions.php @@ -217,7 +217,7 @@ function wordpoints_sanitize_wp_error( $error ) { } // -// Databae Helpers. +// Database Helpers. // /** @@ -227,7 +227,7 @@ function wordpoints_sanitize_wp_error( $error ) { * array. * * @since 1.0.0 - * @since 1.1.0 The $conext parameter was added for site options. + * @since 1.1.0 The $context parameter was added for site options. * @since 1.2.0 The 'network' context was added. * * @param string $option The name of the option to get. @@ -651,6 +651,8 @@ function wordpoints_get_excluded_users( $context ) { * @since 1.8.0 The $message now supports WP_Error objects. * * @param string|WP_Error $message The error message. + * + * @return string The error message. */ function wordpoints_shortcode_error( $message ) { From f6c0d3cac4268575feacd37da1e1d9b6c9270725 Mon Sep 17 00:00:00 2001 From: JDGrimes Date: Fri, 27 Feb 2015 10:08:10 -0500 Subject: [PATCH 52/65] Don't duplicate code in `wordpoints_display_points()` Fixes #274 --- src/components/points/includes/points.php | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/components/points/includes/points.php b/src/components/points/includes/points.php index d9187be1..387bdf69 100644 --- a/src/components/points/includes/points.php +++ b/src/components/points/includes/points.php @@ -429,24 +429,13 @@ function wordpoints_get_formatted_points( $user_id, $type, $context ) { * * @since 1.0.0 * - * @uses wordpoints_get_points() To get the user's points. - * @uses wordpoints_format_points() To format the points for display. - * * @param int $user_id The ID of the user whose points to display. * @param string $type The type of points to display. * @param string $context The context in which the points will be displayed. - * - * @return void This function does not return a value, it displays directly. */ function wordpoints_display_points( $user_id, $type, $context ) { - $points = wordpoints_get_points( $user_id, $type ); - - if ( false === $points ) { - return; - } - - echo wordpoints_format_points( $points, $type, $context ); + echo wordpoints_get_formatted_points( $user_id, $type, $context ); // XSS OK, WPCS } /** From 2b129a97ff99cf3a509157ab2b7e6a08e4df2e8b Mon Sep 17 00:00:00 2001 From: JDGrimes Date: Fri, 27 Feb 2015 10:09:06 -0500 Subject: [PATCH 53/65] Ignore seemingly lacking escaping --- src/components/points/includes/widgets.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/points/includes/widgets.php b/src/components/points/includes/widgets.php index 05debff4..d4dfbbfe 100644 --- a/src/components/points/includes/widgets.php +++ b/src/components/points/includes/widgets.php @@ -199,7 +199,7 @@ protected function widget_body( $instance ) { */ $text = apply_filters( 'wordpoints_points_widget_text', $text, $instance ); - echo '
', $text, '

'; + echo '
', $text, '

'; // XSS OK, WPCS if ( 0 !== $instance['number_logs'] ) { From e6084389d0926fb56a15e85c14570d59f169856d Mon Sep 17 00:00:00 2001 From: JDGrimes Date: Fri, 27 Feb 2015 10:12:11 -0500 Subject: [PATCH 54/65] Remove make pot script now bundled with dev-lib Closes #289 --- tools/bin/update-pot.sh | 18 ---- tools/i18n/makepot.php | 229 ---------------------------------------- 2 files changed, 247 deletions(-) delete mode 100755 tools/bin/update-pot.sh delete mode 100644 tools/i18n/makepot.php diff --git a/tools/bin/update-pot.sh b/tools/bin/update-pot.sh deleted file mode 100755 index f6a28da7..00000000 --- a/tools/bin/update-pot.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -if [ -z $1 ]; then - echo 'Usage: update-pot.sh ' - exit 0 -fi - -src=$( cd "$1"; pwd ) -bin=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) - -php "$bin/../i18n/makepot.php" wordpoints "$src" - -for f in $(find "$src/languages" -name '*.po' -type f); do - msgmerge --backup=off --update "$f" "$src/languages/wordpoints.pot" - msgfmt -o "${f%po}mo" "$f" -done - -# EOF diff --git a/tools/i18n/makepot.php b/tools/i18n/makepot.php deleted file mode 100644 index 352dbc2b..00000000 --- a/tools/i18n/makepot.php +++ /dev/null @@ -1,229 +0,0 @@ -meta['wordpoints'] = $this->meta['wp-plugin']; - - $this->meta['wordpoints-module'] = array( - 'description' => 'Translation of the WordPoints module {name} {version} by {author}', - 'msgid-bugs-address' => '', - 'copyright-holder' => '{author}', - 'package-name' => 'WordPoints {name}', - 'package-version' => '{version}', - 'comments' => "Copyright (C) {year} {copyright-holder}\nThis file is distributed under the same license as the {package-name} package.", - ); - } - - /** - * Generate the POT file for WordPoints. - * - * @since 1.9.0 - * - * @param string $dir The directory containing WordPoints's source. - * @param string $output The path of the output file. - * - * @return bool Whether the POT file was generated successfully. - */ - public function wordpoints( $dir, $output = null ) { - - if ( is_null( $output ) ){ - $output = "{$dir}/languages/wordpoints.pot"; - } - - return $this->wp_plugin( $dir, $output, 'wordpoints' ); - } - - /** - * Generate the POT file for a WordPoints module. - * - * @since 1.9.0 - * - * @param string $dir The directory containing WordPoints's source. - * @param string $output The path of the output file. - * @param string $slug The slug of the module. - * - * @return bool Whether the POT file was generated successfully. - */ - public function wordpoints_module( $dir, $output = null, $slug = null ) { - - if ( is_null( $slug ) ) { - $slug = $this->guess_plugin_slug( $dir ); - } - - if ( is_null( $output ) ){ - $output = "{$dir}/languages/{$slug}.pot"; - } - - // Escape pattern-matching characters in the path. - $module_escape_root = str_replace( - array( '*', '?', '[' ) - , array( '[*]', '[?]', '[[]' ) - , $dir - ); - - // Get the top level files. - $module_files = glob( "{$module_escape_root}/*.php" ); - - if ( empty( $module_files ) ) { - $this->error( 'No module source files found.' ); - return false; - } - - $main_file = ''; - - foreach ( $module_files as $module_file ) { - - if ( ! is_readable( $module_file ) ) { - continue; - } - - $source = $this->get_first_lines( $module_file, $this->max_header_lines ); - - // Stop when we find a file with a module name header in it. - if ( false !== $this->get_addon_header( 'Module Name', $source ) ) { - $main_file = $module_file; - break; - } - } - - if ( empty( $main_file ) ) { - $this->error( 'Couldn\'t locate the main module file.' ); - return false; - } - - $placeholders = array(); - $placeholders['version'] = $this->get_addon_header( 'Version', $source ); - $placeholders['author'] = $this->get_addon_header( 'Author', $source ); - $placeholders['name'] = $this->get_addon_header( 'Module Name', $source ); - $placeholders['slug'] = $slug; - - // Attempt to extract the strings and write them to the POT file. - $result = $this->xgettext( 'wordpoints-module', $dir, $output, $placeholders ); - - if ( ! $result ) { - return false; - } - - // Now attempt to append the headers from the module file, so they can be - // translated too. - $potextmeta = new WordPoints_PotExtMeta; - if ( ! $potextmeta->append( $main_file, $output ) ) { - return false; - } - - // Adding non-gettexted strings can repeat some phrases, so uniquify them. - $output_shell = escapeshellarg( $output ); - system( "msguniq {$output_shell} -o {$output_shell}" ); - - return true; - } - - /** - * Give an error. - * - * @since 1.9.0 - * - * @param string $message The error message. - */ - public function error( $message ) { - fwrite( STDERR, $message . "\n" ); - } -} - -/** - * Add metadata strings from a WordPoints module header to a POT file. - * - * @since 1.9.0 - */ -class WordPoints_PotExtMeta extends PotExtMeta { - - /** - * @since 1.9.0 - */ - public function __construct() { - - $this->headers[] = 'Module Name'; - $this->headers[] = 'Module URI'; - } - - /** - * @since 1.9.0 - */ - public function load_from_file( $ext_filename ) { - - return str_replace( - ' of the plugin/theme' - , ' of the module' - , parent::load_from_file( $ext_filename ) - ); - } -} - -// Run the CLI only if the file wasn't included. -$included_files = get_included_files(); - -if ( __FILE__ === $included_files[0] ) { - - $makepot = new WordPoints_MakePOT; - - if ( count( $argv ) >= 3 && in_array( $argv[1], $makepot->projects ) ) { - - $result = call_user_func( - array( $makepot, str_replace( '-', '_', $argv[1] ) ) - , realpath( $argv[2] ) - , isset( $argv[3] ) ? $argv[3] : null - , isset( $argv[4] ) ? $argv[4] : null - ); - - if ( false === $result ) { - $makepot->error( 'Couldn\'t generate POT file!' ); - } - - } else { - - $usage = "Usage: php makepot.php [ []] \n\n"; - $usage .= "Generate POT file from the files in \n"; - $usage .= 'Available projects: ' . implode( ', ', $makepot->projects ) . "\n"; - fwrite( STDERR, $usage ); - exit( 1 ); - } -} - -// EOF From e29b8a13c4dfb0bed179bad8ca65956cf9f01715 Mon Sep 17 00:00:00 2001 From: Gonzalo Exequiel Pedone Date: Tue, 24 Feb 2015 19:20:23 +0100 Subject: [PATCH 55/65] Translated using Weblate (Spanish) Currently translated at 73.7% (267 of 362 strings) --- src/languages/wordpoints-es_ES.mo | Bin 29574 -> 29597 bytes src/languages/wordpoints-es_ES.po | 70 +++++++++++++++--------------- 2 files changed, 35 insertions(+), 35 deletions(-) diff --git a/src/languages/wordpoints-es_ES.mo b/src/languages/wordpoints-es_ES.mo index 5d7c70c4c670daabc5c47fde3b3996796e3a2e9d..00df3e5b24b4a8eb1e2ad3212d54e6cb516ef5af 100755 GIT binary patch delta 2340 zcmXZceN0tl9KiACzy-l8FQS6Ti$^6Du&bcc01Zt*c}YPaE+yKPdqwoZh06ujG_JW8 ziA=*oj&iMyhSgfBos!ibT480Iv&_xarfXzowbrag{gG~cf1b15ozL_9&h!3z&VAvI z_Szlo%=0mE8A_>NN|Y+ZXk#eG2v4I_yjiIj+=Mf*8k4XIrALPyKZ+ZupTuaqiA(V( zoR4wkN-e>MF&pdAiD8_MM^MKTn2Y1(D*T{ui-4OzLWR|E4@$=_Ov5nBgeOrJIEoAK zG%mucC=*X%K4w%ZwHT{$414h@iC0+*cm{K+zgiV$PzqlV7{y(WD@9uswMD5!tihQQ zM>&xYW@104;3@n4dHel0C=0oTt?1mU6nj(MxEn8EA1N<{vDdcHN9jLJ;dT*QM zCm2tIZ&7wSiOVsvR;e6ZiE`vSFdh3a7Ehv_&=}H1y^nH2QFThq!)%m=m!PCRyq!W8 z1ux2x9Y%iY43CuG<7Z2k(Jj;gGKVhZvuLf&F_tDAw1oA8! zOT#(LuW~5NC9oc4z($mucVHe4;yyf&ve2AHr5?hqNVZfrF2f0woZiJvnEoV_p%+(R z2ql$cc##E;<1FS^2ew-Szl4&z4>1*QVmkhda#XXMtR1D}PU=fgE@eMTyQ8S%J9hmt zO21!GcKj#KL$$+Na2m!lzuHV86C1DqdvFz=!PR&hB^Bw+Dg#!doRAwOmmyq(gXqAE zC=-5#vZ3#AA*!c2Eq1;LCB?6JIDgWj{-EH+vR(ELFq`^ibkgA;yBcldWOvD5eMu5vbV9pAOzY z$!Rq=FALl79v(;jD%3GQ7Z7h?EiP-bF5^LzqrHN;xTu}9;#QQ)`X)}pDU`c&KTJVZ z?t5G@@V?36jw6C{qvfukKmbl-x2j#9DMES}_?0EPz1sUig zti($w6V2|hCeA>aAjdWzqTKcol#Q4;8_#1BUPI;$tDh;z zil$Hon$c-Bn1hnLr5J}5C$Y22Y!rlG8gRlmv;RM%0$;uHuRev{~MF2|7X|Z zxoB~6dy^^1&a!NmqYPY#va`ofKC1@%eHY3=edxp?^ZUf{{FwYzdR{?c{t9zsW4WfS zG=3~usJRSBX_2|UG%Au}>E_!!bIK=qIxF0o%WSSl)gt|YE@OXXsd1^YHr}N+1cRQg zP|&AKIIC()Bq8H!g>DX4B}LQm)VAO0c)Ye=o8t=x13|qd=;`sTT~41sd&{FP<6d3O ze3vSH@Xq7cTid%r9=|83`}}&_gz4?}2V6!=z0M&0^>0To;tF>q&;9Pt2(4=@c9_pL z-O*C40lYrFnNF=O0lhg83R-0xy&9p7M{Zp-J^nH5Yjq&;2-rwbUe!p|@rt$bq z_i_*rE^45a5ko44Q65k4oAyt-;Fb=JC~^;0VK>Hc5$0668;D~*^}SUIkpmRY((p1i%oSm*^k4=Ct3?KAJ8DFt zs3+ZqL-CN;f7a8iPBdl1Bx^OcN!6z^UyKonF<2xKEK)m}>zfN8?g1@03je7TB={Sh> zC5OT=Ito!ItVG>u2n%r&w&L5UC&^wSayOPBS&}do;BnNPUcqwoKP=K8YjGkrqHbg_ zo@awca3JeTYl9ns1ZwVH!7Th7bMOXgsCqATPvpnt)Q6z9cc6~jf+imD>hF2|7g1Ar z6|?bo)D8QW(a!oZnSx%ba-4#zum}&~1Nb#+D$-b07o3io^Eo&W!#D{ypbw9sE_ed< zK<6SY7pR~v&3SkVabWgAk^QfOjKObB}edoV65ZYZwMu!n}C)gm$c7&WI; zxOro65#Gj)7{m>2{7T|^ti?fV+{@UEJQz8N`RI>|aBpQ2>ScWflkt1(gEtZsbVt8< z4S#zBdc5{z%YDz8n8LV`s2`5SemKEvFF~ES-0QEwRO*X7SKv_Ut5ILscCS70JO!QT zFzU&Uqb~F>reX40cj7^wIjFB=4C-?#K^;F2HFZm{KgLjR`*zd=9z@=|bYmvIkF1-J zFDdAbuAolzr#GMnHFufoMAEScb)tuGIL^h9*or!FC+Z0gp>E(bX5gnd0578E{AbL? z9?a7BpG(5^hou;GXDd)c7f1bYGioHBMh*Q7=)=RPA@BCuk9qY|s0)3FdZ4eo_RE+_ z{km8G3)A)X_E6B1rN>=|p-wy+^|?|r)0-+($%1pWA^b1~yoAf>R-3{0F_IN5n_ zW`$t{>}zGYcG9eA#&~D?tfb!d>^VQ$1r=BAewFo3q%zB}cLvLn%R|w|W-D%g5?q)n zGh(q&ygk-r=T%iZ8>))>*l#Vk!gEwldb z3ALFm(Rh2PEfh27o^!(M+bp}i&UBuwd##sUS|7AK>pya;mz4V0&hDi*je+ijGa1?v zvCKv*)^0hS%e#C|et5ah>1;mN%c*JYG@NhSo-}-BBfC1\n" "Language-Team: Spanish " "\n" @@ -12,7 +12,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 2.2-dev\n" +"X-Generator: Weblate 2.3-dev\n" #. #-#-#-#-# wordpoints.pot (WordPoints 1.9.0) #-#-#-#-# #. Plugin Name of the plugin/theme @@ -199,23 +199,23 @@ msgstr "El módulo no contiene archivos." #: admin/includes/class-wordpoints-module-installer.php:56 msgid "Module install failed." -msgstr "Error al instalar Módulo" +msgstr "Error al instalar el módulo." #: admin/includes/class-wordpoints-module-installer.php:57 msgid "Module installed successfully." -msgstr "Módulo instalado correctamente" +msgstr "Módulo instalado correctamente." #: admin/includes/class-wordpoints-module-installer.php:58 msgid "Could not create the modules directory." -msgstr "No se pudo crear el directorio de módulos" +msgstr "No se pudo crear el directorio de módulos." #: admin/includes/class-wordpoints-module-installer.php:184 msgid "No valid modules were found." -msgstr "No se encontraron módulos válidos" +msgstr "No se encontraron módulos válidos." #: admin/includes/class-wordpoints-modules-list-table.php:319 msgid "No modules found." -msgstr "No se encontraron módulos" +msgstr "No se encontraron módulos." #: admin/includes/class-wordpoints-modules-list-table.php:321 msgid "There are not any modules installed." @@ -367,7 +367,7 @@ msgid "" "simple and easy to use." msgstr "" "WordPoints no tiene una gran cantidad de opciones de configuración, lo que " -"hace que sea sencillo y fácil de usar" +"hace que sea sencillo y fácil de usar." #: admin/screens/configure-settings-load.php:18 msgid "" @@ -595,7 +595,7 @@ msgstr "" #: admin/screens/modules.php:24 msgid "You cannot delete a module while it is active on the main site." msgstr "" -"No se puede eliminar un módulo mientras está activo en el sitio principal" +"No se puede eliminar un módulo mientras está activo en el sitio principal." #: admin/screens/modules.php:28 msgid "" @@ -614,8 +614,8 @@ msgid "" "Module could not be activated because it triggered a fatal error." msgstr "" -"El Módulo no se pudo activar debido a que provocó un error grave" +"El Módulo no se pudo activar debido a que provocó un error " +"grave." #: admin/screens/modules.php:65 msgid "Module could not be deleted due to an error: %s" @@ -736,11 +736,11 @@ msgstr "" "deseado en el campo de texto, y marque la casilla de verificación junto a " "él. Si no marca la casilla de verificación, no se guardarán los cambios. " "Para proporcionar una razón para el cambio, rellene el campo de texto de " -"abajo" +"abajo." #: components/points/admin/admin.php:282 msgid "Reason" -msgstr "Razón." +msgstr "Razón" #. translators: %s is the number of points. #: components/points/admin/admin.php:302 @@ -966,16 +966,16 @@ msgid "" "Drag hooks from here to a points type on the right to activate them. Drag " "hooks back here to deactivate them and delete their settings." msgstr "" -"Arrastre ganchos de aquí a un tipo de puntos a la derecha para activarlos. " -"Ganchos Arrastre de nuevo los ganchos aquí para desactivarlos y eliminar su " -"configuración" +"Arrastre los ganchos de aquí a un tipo de puntos a la derecha para " +"activarlos. Arrastre de nuevo los ganchos aquí para desactivarlos y " +"eliminar su configuración." #: components/points/admin/screens/hooks.php:144 msgid "" "Drag hooks here to remove them from the points type but keep their settings." msgstr "" -"Arrastre ganchos aquí para eliminarlos del tipo de puntos, pero conservar " -"sus ajustes" +"Arrastre los ganchos aquí para eliminarlos del tipo de puntos, pero " +"conservar sus ajustes." #: components/points/admin/screens/hooks.php:208 msgid "Add New Points Type" @@ -996,15 +996,15 @@ msgstr "WordPoints- Informes de Red de Puntos" #: components/points/admin/screens/logs.php:20 msgid "View recent points transactions." -msgstr "Ver transacciones de puntos recientes" +msgstr "Ver transacciones de puntos recientes." #: components/points/admin/screens/logs.php:35 msgid "" "You need to create a type of points before you can use " "this page." msgstr "" -"Necesita crear un tipo de puntos antes de poder " -"utilizar esta página" +"Necesita crear un tipo de puntos antes de poder utilizar " +"esta página." #: components/points/includes/class-wordpoints-points-hook.php:789 msgid "Points:" @@ -1167,7 +1167,7 @@ msgstr "Comentario Eliminado" #: components/points/includes/hooks/comment-removed.php:46 msgid "Comment removed from the site." -msgstr "Comentario eliminado del sitio" +msgstr "Comentario eliminado del sitio." #. translators: the post type name. #: components/points/includes/hooks/comment-removed.php:48 @@ -1325,7 +1325,7 @@ msgstr "Puntos removidos cuando se eliminan:" #. translators: the post type name. #: components/points/includes/hooks/post-delete.php:51 msgid "%s permanently deleted." -msgstr "%s eliminado permanentemente" +msgstr "%s eliminado permanentemente." #: components/points/includes/hooks/post-delete.php:79 msgid "Auto Draft" @@ -1343,13 +1343,13 @@ msgstr "Nuevo mensaje publicado." #. translators: the post type name. #: components/points/includes/hooks/post.php:57 msgid "New %s published." -msgstr "Nuevos %s publicados" +msgstr "Nuevos %s publicados." #. translators: %s will be a link to the post. #: components/points/includes/hooks/post.php:59 msgctxt "points log description" msgid "Post %s published." -msgstr "Publicación %s publicada" +msgstr "Publicación %s añadida." #. translators: 1 is the post type name, 2 is a link to the post. #: components/points/includes/hooks/post.php:61 @@ -1464,12 +1464,12 @@ msgstr "Puntos ajustado por %s. Motivo: %s" #: components/points/includes/logs.php:673 msgctxt "points log description" msgid "Comment marked as spam." -msgstr "Comentario marcados como spam" +msgstr "Comentario marcado como spam." #: components/points/includes/logs.php:677 msgctxt "points log description" msgid "Comment moved to trash." -msgstr "Comentario movido a la papelera" +msgstr "Comentario movido a la papelera." #: components/points/includes/logs.php:681 msgctxt "points log description" @@ -1566,7 +1566,7 @@ msgstr "Debes estar registrado para ver los puntos." #: components/points/includes/widgets.php:542 msgctxt "form label" msgid "Title" -msgstr "Título:" +msgstr "Título" #: components/points/includes/widgets.php:269 msgid "Points type to display" @@ -1578,7 +1578,7 @@ msgstr "Texto del Widget" #: components/points/includes/widgets.php:276 msgid "%s will be replaced with the points of the logged in user" -msgstr "%s será reemplazado con los puntos del usuario en sesión." +msgstr "%s será reemplazado con los puntos del usuario en sesión" #: components/points/includes/widgets.php:291 msgid "Text if the user is not logged in" @@ -1902,7 +1902,7 @@ msgstr "Cualquiera" #: includes/functions.php:623 msgid "Shortcode error:" -msgstr "error Código corto" +msgstr "Error de código corto:" #: includes/functions.php:762 msgctxt "component name" @@ -1929,15 +1929,15 @@ msgstr "" #: includes/modules.php:473 msgid "By %s." -msgstr "Por %s" +msgstr "Por %s." #: includes/modules.php:632 msgid "Invalid module path." -msgstr "Ruta del módulo no válida" +msgstr "Ruta del módulo no válida." #: includes/modules.php:636 msgid "Module file does not exist." -msgstr "Archivo de módulo no existe" +msgstr "Archivo de módulo no existe." #: includes/modules.php:642 msgid "The module does not have a valid header." @@ -1945,7 +1945,7 @@ msgstr "El módulo no tiene una cabecera válida." #: includes/modules.php:823 msgid "The module generated unexpected output." -msgstr "El módulo generó una salida inesperada" +msgstr "El módulo generó una salida inesperada." #: includes/modules.php:1000 msgid "Could not access filesystem." @@ -1976,7 +1976,7 @@ msgid "" "Create one or more points systems for your site, and reward user activity." msgstr "" "Cree uno o más sistemas de puntos para su sitio, y recompense la actividad " -"del usuario" +"del usuario." #. Author of the plugin/theme msgid "J.D. Grimes" From 6a227fa75d307b56e03217af89fd8cf1c610749f Mon Sep 17 00:00:00 2001 From: JDGrimes Date: Fri, 27 Feb 2015 15:25:16 -0500 Subject: [PATCH 56/65] Avoid "indirect modification of overloaded property" We were getting this error on PHP 5.3. It appears to work correctly on other versions. See #288 --- src/includes/functions.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/includes/functions.php b/src/includes/functions.php index 36dcc846..7db82160 100644 --- a/src/includes/functions.php +++ b/src/includes/functions.php @@ -195,24 +195,32 @@ function wordpoints_sanitize_wp_error( $error ) { $code = $error->get_error_code(); - if ( isset( $error->error_data[ $code ]['title'] ) ) { + $error_data = $error->error_data; - $error->error_data[ $code ]['title'] = wp_kses( + if ( isset( $error_data[ $code ]['title'] ) ) { + + $error_data[ $code ]['title'] = wp_kses( $error->error_data[ $code ]['title'] , 'wordpoints_sanitize_wp_error_title' ); + + $error->error_data = $error_data; } - foreach ( $error->errors as $code => $errors ) { + $all_errors = $error->errors; + + foreach ( $all_errors as $code => $errors ) { foreach ( $errors as $key => $message ) { - $error->errors[ $code ][ $key ] = wp_kses( + $all_errors[ $code ][ $key ] = wp_kses( $message , 'wordpoints_sanitize_wp_error_message' ); } } + $error->errors = $all_errors; + return $error; } From f264c831903b5cda6b6321d9b05fd39904c825ba Mon Sep 17 00:00:00 2001 From: JDGrimes Date: Fri, 27 Feb 2015 15:26:50 -0500 Subject: [PATCH 57/65] Update modules tests for #286 --- tests/phpunit/tests/modules/module-headers.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/phpunit/tests/modules/module-headers.php b/tests/phpunit/tests/modules/module-headers.php index 97042fc3..73f0c1f0 100644 --- a/tests/phpunit/tests/modules/module-headers.php +++ b/tests/phpunit/tests/modules/module-headers.php @@ -11,6 +11,8 @@ * Test that module headers are properly parsed. * * @since 1.1.0 + * + * @group modules */ class WordPoints_Module_Header_Test extends WP_UnitTestCase { @@ -34,6 +36,7 @@ class WordPoints_Module_Header_Test extends WP_UnitTestCase { 'title' => 'Test 3', 'author_name' => 'WordPoints Tester', 'update_api' => '', + 'channel' => '', 'ID' => '', ); From f36ee44147af0c05aa550d7c19ae7a63eb91fa28 Mon Sep 17 00:00:00 2001 From: JDGrimes Date: Fri, 27 Feb 2015 15:47:36 -0500 Subject: [PATCH 58/65] Fix new scrutinizer issues Closes #277 --- src/admin/screens/modules-load.php | 2 +- .../points/includes/hooks/abstracts/post-type.php | 2 +- src/components/points/includes/hooks/comment-removed.php | 2 +- src/components/points/includes/hooks/periodic.php | 5 ++++- src/components/points/includes/hooks/post-delete.php | 2 +- src/components/points/includes/hooks/post.php | 2 +- src/components/points/includes/hooks/registration.php | 2 +- .../ranks/includes/class-wordpoints-rank-groups.php | 6 +----- 8 files changed, 11 insertions(+), 12 deletions(-) diff --git a/src/admin/screens/modules-load.php b/src/admin/screens/modules-load.php index d2c5f429..d0ef3c48 100644 --- a/src/admin/screens/modules-load.php +++ b/src/admin/screens/modules-load.php @@ -309,7 +309,7 @@ function wordpoints_module_sandbox_scrape( $module ) { $files_to_delete[] = $module_dir . '/' . $module; $data = wordpoints_get_module_data( $module_dir . '/' . $module ); - if ( $data ) { + if ( ! empty( $data ) ) { $module_info[ $module ] = $data; $module_info[ $module ]['is_uninstallable'] = is_uninstallable_wordpoints_module( $module ); diff --git a/src/components/points/includes/hooks/abstracts/post-type.php b/src/components/points/includes/hooks/abstracts/post-type.php index 886f89ec..0cf78fa4 100644 --- a/src/components/points/includes/hooks/abstracts/post-type.php +++ b/src/components/points/includes/hooks/abstracts/post-type.php @@ -34,7 +34,7 @@ abstract class WordPoints_Post_Type_Points_Hook_Base extends WordPoints_Points_H */ public function __construct( $title, $args ) { - parent::init( $title, $args ); + $this->init( $title, $args ); add_filter( "wordpoints_points_log-{$this->log_type}", array( $this, 'logs' ), 10, 6 ); add_filter( "wordpoints_points_log-reverse_{$this->log_type}", array( $this, 'logs' ), 10, 6 ); diff --git a/src/components/points/includes/hooks/comment-removed.php b/src/components/points/includes/hooks/comment-removed.php index 83da47a0..76cbb131 100644 --- a/src/components/points/includes/hooks/comment-removed.php +++ b/src/components/points/includes/hooks/comment-removed.php @@ -40,7 +40,7 @@ class WordPoints_Comment_Removed_Points_Hook extends WordPoints_Post_Type_Points */ public function __construct() { - parent::init( + $this->init( _x( 'Comment Removed', 'points hook name', 'wordpoints' ) , array( 'description' => __( 'Comment removed from the site.', 'wordpoints' ), diff --git a/src/components/points/includes/hooks/periodic.php b/src/components/points/includes/hooks/periodic.php index e223def1..76ab7122 100644 --- a/src/components/points/includes/hooks/periodic.php +++ b/src/components/points/includes/hooks/periodic.php @@ -39,7 +39,10 @@ class WordPoints_Periodic_Points_Hook extends WordPoints_Points_Hook { */ public function __construct() { - parent::init( _x( 'Periodic Points', 'points hook name', 'wordpoints' ), array( 'description' => __( 'Visiting the site at least once in a given time period.', 'wordpoints' ) ) ); + $this->init( + _x( 'Periodic Points', 'points hook name', 'wordpoints' ) + , array( 'description' => __( 'Visiting the site at least once in a given time period.', 'wordpoints' ) ) + ); add_action( 'init', array( $this, 'hook' ) ); diff --git a/src/components/points/includes/hooks/post-delete.php b/src/components/points/includes/hooks/post-delete.php index 48c2ef27..6529bede 100644 --- a/src/components/points/includes/hooks/post-delete.php +++ b/src/components/points/includes/hooks/post-delete.php @@ -42,7 +42,7 @@ class WordPoints_Post_Delete_Points_Hook extends WordPoints_Post_Type_Points_Hoo */ public function __construct() { - parent::init( + $this->init( _x( 'Post Delete', 'points hook name', 'wordpoints' ) ,array( 'description' => __( 'A post is permanently deleted.', 'wordpoints' ), diff --git a/src/components/points/includes/hooks/post.php b/src/components/points/includes/hooks/post.php index d69008bb..a41fd27c 100644 --- a/src/components/points/includes/hooks/post.php +++ b/src/components/points/includes/hooks/post.php @@ -197,7 +197,7 @@ public function delete_hook( $post_id ) { */ public function publish_logs( $text, $points, $points_type, $user_id, $log_type, $meta ) { - return parent::logs( $text, $points, $points_type, $user_id, $log_type, $meta ); + return $this->logs( $text, $points, $points_type, $user_id, $log_type, $meta ); } /** diff --git a/src/components/points/includes/hooks/registration.php b/src/components/points/includes/hooks/registration.php index 946b2ae4..14dce047 100644 --- a/src/components/points/includes/hooks/registration.php +++ b/src/components/points/includes/hooks/registration.php @@ -38,7 +38,7 @@ class WordPoints_Registration_Points_Hook extends WordPoints_Points_Hook { */ public function __construct() { - parent::init( + $this->init( _x( 'Registration', 'points hook name', 'wordpoints' ) , array( 'description' => _x( 'Registering with the site.', 'points hook description', 'wordpoints' ) ) ); diff --git a/src/components/ranks/includes/class-wordpoints-rank-groups.php b/src/components/ranks/includes/class-wordpoints-rank-groups.php index b76b94c2..3a11e825 100644 --- a/src/components/ranks/includes/class-wordpoints-rank-groups.php +++ b/src/components/ranks/includes/class-wordpoints-rank-groups.php @@ -21,7 +21,7 @@ final class WordPoints_Rank_Groups { * * @type WordPoints_Rank_Group[] $groups */ - private static $groups; + private static $groups = array(); /** * Check if a group is registered. @@ -100,10 +100,6 @@ public static function get() { ); } - if ( ! self::$groups ) { - self::$groups = array(); - } - return self::$groups; } From 21038529a288953201943ca52b52bdede4ddc76e Mon Sep 17 00:00:00 2001 From: JDGrimes Date: Fri, 27 Feb 2015 16:37:39 -0500 Subject: [PATCH 59/65] Update l10n files for 1.10.0 --- src/languages/wordpoints-es_ES.mo | Bin 29597 -> 29597 bytes src/languages/wordpoints-es_ES.po | 187 +++++++++++++++--------------- src/languages/wordpoints-ja.mo | Bin 1690 -> 1690 bytes src/languages/wordpoints-ja.po | 179 ++++++++++++++-------------- src/languages/wordpoints-pt_BR.mo | Bin 22780 -> 22780 bytes src/languages/wordpoints-pt_BR.po | 179 ++++++++++++++-------------- src/languages/wordpoints-zh_CN.mo | Bin 39592 -> 39592 bytes src/languages/wordpoints-zh_CN.po | 179 ++++++++++++++-------------- src/languages/wordpoints.pot | 181 +++++++++++++++-------------- 9 files changed, 455 insertions(+), 450 deletions(-) diff --git a/src/languages/wordpoints-es_ES.mo b/src/languages/wordpoints-es_ES.mo index 00df3e5b24b4a8eb1e2ad3212d54e6cb516ef5af..2f4f2da25eae96549e6f5efd95cd97caacaed6e6 100755 GIT binary patch delta 28 jcmbRHoN?}R#tli%yhgf4<_boJR>sCwrly\n" -"Language-Team: Spanish " -"\n" +"Language-Team: Spanish \n" "Language: es_ES\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -14,7 +14,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Generator: Weblate 2.3-dev\n" -#. #-#-#-#-# wordpoints.pot (WordPoints 1.9.0) #-#-#-#-# +#. #-#-#-#-# wordpoints.pot (WordPoints 1.10.0) #-#-#-#-# #. Plugin Name of the plugin/theme #: admin/admin.php:67 components/points/admin/admin.php:280 #: components/points/includes/widgets.php:120 @@ -48,34 +48,34 @@ msgstr "WordPoints - Instalar módulos" msgid "Install Modules" msgstr "Instalar módulos" -#: admin/admin.php:281 +#: admin/admin.php:293 msgid "Hide This Notice" msgstr "Ocultar Este Aviso" -#: admin/admin.php:334 +#: admin/admin.php:346 #, fuzzy msgid "WordPoints — %s" msgstr "WordPoints - %s" -#: admin/admin.php:364 +#: admin/admin.php:376 msgid "Install a module in .zip format" msgstr "Instale un módulo en formato zip" -#: admin/admin.php:365 +#: admin/admin.php:377 msgid "" "If you have a module in a .zip format, you may install it by uploading it " "here." msgstr "Si tiene un módulo en formato zip, podrá instalarlo, subiéndolo aquí." -#: admin/admin.php:368 +#: admin/admin.php:380 msgid "Module zip file" msgstr "Archivo zip de Módulo" -#: admin/admin.php:370 +#: admin/admin.php:382 msgid "Install Now" msgstr "Instalar Ahora" -#: admin/admin.php:387 +#: admin/admin.php:399 msgid "" "You do not have sufficient permissions to install WordPoints modules on this " "site." @@ -83,15 +83,15 @@ msgstr "" "Usted no tiene permisos suficientes para instalar módulos WordPoints en este " "sitio." -#: admin/admin.php:394 +#: admin/admin.php:406 msgid "Upload WordPoints Module" msgstr "Subir Módulo WordPoints" -#: admin/admin.php:406 +#: admin/admin.php:418 msgid "Installing Module from uploaded file: %s" msgstr "Instalar Módulo desde archivo cargado: %s" -#: admin/admin.php:470 +#: admin/admin.php:482 msgid "" "This appears to be a WordPoints module archive. Try installing it on the " "WordPoints module install screen instead." @@ -99,11 +99,11 @@ msgstr "" "Este parece ser un archivo de módulo de WordPoints. En su lugar, pruebe a " "instalarlo desde la pantalla de módulos de WordPoints." -#: admin/admin.php:500 +#: admin/admin.php:512 msgid "Like this plugin?" msgstr "¿Le gusta este plugin?" -#: admin/admin.php:501 +#: admin/admin.php:513 msgid "" "If you think WordPoints is great, let everyone know by giving it a 5 star rating." @@ -111,7 +111,7 @@ msgstr "" "Si piensa que WordPoints es maravilloso, permita que todos lo sepan dándole " "una 5 estrellas calificación ." -#: admin/admin.php:502 +#: admin/admin.php:514 msgid "" "If you don’t think this plugin deserves 5 stars, please let us know " "how we can improve it." @@ -119,11 +119,11 @@ msgstr "" "Si usted no cree que este plugin se merece 5 estrellas, por favor háganos " "saber cómo podemos mejorarlo." -#: admin/admin.php:505 +#: admin/admin.php:517 msgid "Need help?" msgstr "¿Necesita ayuda?" -#: admin/admin.php:506 +#: admin/admin.php:518 msgid "" "Post your feature request or support question in the support " "forums" @@ -131,11 +131,11 @@ msgstr "" "Publique una solicitud de función o soporte pregunta en el " "foros de soporte " -#: admin/admin.php:507 +#: admin/admin.php:519 msgid "Thank you for using WordPoints!" msgstr "¡Gracias por utilizar WordPoints!" -#: admin/admin.php:540 +#: admin/admin.php:552 msgid "" "WordPoints detected a large network and has skipped part of the installation " "process." @@ -143,7 +143,7 @@ msgstr "" "WordPoints a detectado una red amplia y a saltado parte del proceso de " "instalación." -#: admin/admin.php:543 +#: admin/admin.php:555 msgid "" "WordPoints detected a large network and has skipped part of the update " "process for version %s (and possibly later versions)." @@ -151,7 +151,7 @@ msgstr "" "WordPoints a detectado una red amplia y a saltado parte del proceso de " "actualización para la versión %s (y posiblemente versiones posteriores)." -#: admin/admin.php:549 +#: admin/admin.php:561 msgid "" "The rest of the process needs to be completed manually. If this has not been " "done already, some parts of the plugin may not function properly." @@ -159,7 +159,7 @@ msgstr "" "El resto del proceso necesita completarse manualmente. Si no lo ha hecho " "todavía, algunas opciones del plugin podrían no funcionar apropiadamente." -#: admin/admin.php:550 includes/class-wordpoints-components.php:556 +#: admin/admin.php:562 includes/class-wordpoints-components.php:574 msgid "Learn more." msgstr "Aprenda mas." @@ -256,7 +256,7 @@ msgstr[1] "" #: admin/includes/class-wordpoints-modules-list-table.php:427 #: admin/includes/class-wordpoints-modules-list-table.php:722 -#: admin/screens/configure-components.php:115 +#: admin/screens/configure-components.php:108 msgid "Activate" msgstr "Activar" @@ -267,7 +267,7 @@ msgstr "Desactivar Red" #: admin/includes/class-wordpoints-modules-list-table.php:431 #: admin/includes/class-wordpoints-modules-list-table.php:718 -#: admin/screens/configure-components.php:110 +#: admin/screens/configure-components.php:103 msgid "Deactivate" msgstr "Desactivar" @@ -275,7 +275,7 @@ msgstr "Desactivar" #: admin/includes/class-wordpoints-modules-list-table.php:710 #: admin/includes/class-wordpoints-modules-list-table.php:725 #: components/points/admin/admin.php:54 -#: components/points/includes/class-wordpoints-points-hooks.php:773 +#: components/points/includes/class-wordpoints-points-hooks.php:775 #: components/ranks/admin/admin.php:53 #: components/ranks/admin/screens/ranks.php:128 msgid "Delete" @@ -295,7 +295,7 @@ msgstr "Versión %s" #. translators: %s is the component author's name. #: admin/includes/class-wordpoints-modules-list-table.php:591 -#: admin/screens/configure-components.php:136 +#: admin/screens/configure-components.php:129 msgid "By %s" msgstr "Por %s" @@ -331,25 +331,25 @@ msgid "Installed WordPoints components." msgstr "Ver componentes WordPoints instalados." #: admin/screens/configure-components.php:88 -#: admin/screens/configure-components.php:96 +#: admin/screens/configure-components.php:156 msgctxt "components table heading" msgid "Component" msgstr "Componente" #: admin/screens/configure-components.php:89 -#: admin/screens/configure-components.php:97 +#: admin/screens/configure-components.php:157 msgctxt "components table heading" msgid "Description" msgstr "Descripción" #: admin/screens/configure-components.php:90 -#: admin/screens/configure-components.php:98 +#: admin/screens/configure-components.php:158 msgctxt "components table heading" msgid "Version" msgstr "Versión" #: admin/screens/configure-components.php:91 -#: admin/screens/configure-components.php:99 +#: admin/screens/configure-components.php:159 msgctxt "components table heading" msgid "Action" msgstr "Acción" @@ -614,8 +614,8 @@ msgid "" "Module could not be activated because it triggered a fatal error." msgstr "" -"El Módulo no se pudo activar debido a que provocó un error " -"grave." +"El Módulo no se pudo activar debido a que provocó un error grave." #: admin/screens/modules.php:65 msgid "Module could not be deleted due to an error: %s" @@ -1014,67 +1014,67 @@ msgstr "Puntos:" msgid "There are no points hooks currently available." msgstr "No hay ganchos de puntos disponibles en la actualidad." -#: components/points/includes/class-wordpoints-points-hooks.php:582 +#: components/points/includes/class-wordpoints-points-hooks.php:584 msgid "Settings" msgstr "Ajustes" -#: components/points/includes/class-wordpoints-points-hooks.php:594 +#: components/points/includes/class-wordpoints-points-hooks.php:596 msgid "Slug" msgstr "Slug" -#: components/points/includes/class-wordpoints-points-hooks.php:613 +#: components/points/includes/class-wordpoints-points-hooks.php:615 msgctxt "points type" msgid "Prefix (optional):" msgstr "Prefijo (opcional):" -#: components/points/includes/class-wordpoints-points-hooks.php:614 +#: components/points/includes/class-wordpoints-points-hooks.php:616 msgctxt "points type" msgid "Suffix (optional):" msgstr "Sufijo (opcional):" -#: components/points/includes/class-wordpoints-points-hooks.php:618 +#: components/points/includes/class-wordpoints-points-hooks.php:620 msgctxt "points type" msgid "Prefix:" msgstr "Prefijo:" -#: components/points/includes/class-wordpoints-points-hooks.php:619 +#: components/points/includes/class-wordpoints-points-hooks.php:621 msgctxt "points type" msgid "Suffix:" msgstr "Sufijo:" -#: components/points/includes/class-wordpoints-points-hooks.php:625 +#: components/points/includes/class-wordpoints-points-hooks.php:627 msgctxt "points type" msgid "Name:" msgstr "Nombre:" -#: components/points/includes/class-wordpoints-points-hooks.php:664 +#: components/points/includes/class-wordpoints-points-hooks.php:666 msgctxt "points type" msgid "Delete" msgstr "Borrar" -#: components/points/includes/class-wordpoints-points-hooks.php:668 -#: components/points/includes/class-wordpoints-points-hooks.php:774 +#: components/points/includes/class-wordpoints-points-hooks.php:670 +#: components/points/includes/class-wordpoints-points-hooks.php:776 #: components/ranks/admin/screens/ranks.php:100 #: components/ranks/admin/screens/ranks.php:126 msgid "Close" msgstr "Cerrar" -#: components/points/includes/class-wordpoints-points-hooks.php:671 +#: components/points/includes/class-wordpoints-points-hooks.php:673 msgctxt "points type" msgid "Save" msgstr "Guardar" -#: components/points/includes/class-wordpoints-points-hooks.php:749 +#: components/points/includes/class-wordpoints-points-hooks.php:751 msgctxt "hook" msgid "Edit" msgstr "Editar" -#: components/points/includes/class-wordpoints-points-hooks.php:750 +#: components/points/includes/class-wordpoints-points-hooks.php:752 msgctxt "hook" msgid "Add" msgstr "Añadir" -#: components/points/includes/class-wordpoints-points-hooks.php:777 +#: components/points/includes/class-wordpoints-points-hooks.php:779 #: components/ranks/admin/screens/ranks.php:124 msgid "Save" msgstr "Guardar" @@ -1094,12 +1094,12 @@ msgstr "" "cambios realizados por el mismo. Sólo las transacciones realizadas por " "WordPoints se incluyen en los registros." -#: components/points/includes/hooks/abstracts/post-type.php:240 +#: components/points/includes/hooks/abstracts/post-type.php:239 msgctxt "post title" msgid "(no title)" msgstr "(sin título)" -#: components/points/includes/hooks/abstracts/post-type.php:296 +#: components/points/includes/hooks/abstracts/post-type.php:295 msgid "Select post type:" msgstr "Seleccione el tipo de mensaje:" @@ -1234,78 +1234,78 @@ msgstr "Comentario en un %s eliminado del sitio." msgid "Revoke the points if the comment is removed." msgstr "" -#: components/points/includes/hooks/periodic.php:42 +#: components/points/includes/hooks/periodic.php:43 msgctxt "points hook name" msgid "Periodic Points" msgstr "Puntos periódicos" -#: components/points/includes/hooks/periodic.php:42 +#: components/points/includes/hooks/periodic.php:44 msgid "Visiting the site at least once in a given time period." msgstr "Visitar el sitio por lo menos una vez en un período de tiempo dado." -#: components/points/includes/hooks/periodic.php:134 +#: components/points/includes/hooks/periodic.php:137 msgctxt "points log description" msgid "Hourly points." msgstr "Puntos por hora." -#: components/points/includes/hooks/periodic.php:138 +#: components/points/includes/hooks/periodic.php:141 msgctxt "points log description" msgid "Daily points." msgstr "Puntos diarios." -#: components/points/includes/hooks/periodic.php:142 +#: components/points/includes/hooks/periodic.php:145 msgctxt "points log description" msgid "Weekly points." msgstr "Puntos semanales." -#: components/points/includes/hooks/periodic.php:146 +#: components/points/includes/hooks/periodic.php:149 msgctxt "points log description" msgid "Monthly points." msgstr "Puntos mensuales." -#: components/points/includes/hooks/periodic.php:150 +#: components/points/includes/hooks/periodic.php:153 msgctxt "points log description" msgid "Periodic points." msgstr "Puntos periódicos." -#: components/points/includes/hooks/periodic.php:172 +#: components/points/includes/hooks/periodic.php:175 msgid "Visiting the site at least once in an hour." msgstr "Visitar el sitio al menos una vez en una hora." -#: components/points/includes/hooks/periodic.php:175 +#: components/points/includes/hooks/periodic.php:178 msgid "Visiting the site at least once in a day." msgstr "Visitar el sitio por lo menos una vez al día." -#: components/points/includes/hooks/periodic.php:178 +#: components/points/includes/hooks/periodic.php:181 msgid "Visiting the site at least once in a week." msgstr "Visitar el sitio al menos una vez en una semana." -#: components/points/includes/hooks/periodic.php:181 +#: components/points/includes/hooks/periodic.php:184 msgid "Visiting the site at least once in a month." msgstr "Visitar el sitio al menos una vez en un mes." -#: components/points/includes/hooks/periodic.php:184 +#: components/points/includes/hooks/periodic.php:187 msgid "Visiting the site periodically." msgstr "Visitar periódicamente el sitio." -#: components/points/includes/hooks/periodic.php:238 +#: components/points/includes/hooks/periodic.php:241 msgctxt "length of time" msgid "Period:" msgstr "Período:" -#: components/points/includes/hooks/periodic.php:259 +#: components/points/includes/hooks/periodic.php:262 msgid "hourly" msgstr "cada hora" -#: components/points/includes/hooks/periodic.php:260 +#: components/points/includes/hooks/periodic.php:263 msgid "daily" msgstr "Diaria" -#: components/points/includes/hooks/periodic.php:261 +#: components/points/includes/hooks/periodic.php:264 msgid "weekly" msgstr "Semanal" -#: components/points/includes/hooks/periodic.php:262 +#: components/points/includes/hooks/periodic.php:265 msgid "monthly" msgstr "Mensual" @@ -1370,7 +1370,9 @@ msgid "Post published." msgstr "Mensaje publicado." #. translators: %s is the name of a post type. +#. translators: the post type's name. #: components/points/includes/hooks/post.php:66 +#: components/points/includes/logs.php:703 #, fuzzy msgctxt "points log description" msgid "%s deleted." @@ -1378,19 +1380,18 @@ msgstr "%s eliminado permanentemente" #. translators: 1 is the post type name, 2 is the post title. #: components/points/includes/hooks/post.php:68 -#: components/points/includes/logs.php:703 msgctxt "points log description" msgid "%1$s “%2$s” deleted." msgstr "%1$s “%2$s”eliminado." #. translators: %s will be the post title. #: components/points/includes/hooks/post.php:70 -#: components/points/includes/logs.php:712 msgctxt "points log description" msgid "Post “%s” deleted." msgstr "Mensaje “%s” eliminado." #: components/points/includes/hooks/post.php:71 +#: components/points/includes/logs.php:709 #, fuzzy msgctxt "points log description" msgid "Post deleted." @@ -1451,7 +1452,7 @@ msgstr "Buscar:." msgid "Search Logs" msgstr "Buscar:." -#: components/points/includes/logs.php:519 +#: components/points/includes/logs.php:509 #, fuzzy msgid "No matching logs found." msgstr "No se encontrarn registros coincidentes" @@ -1476,24 +1477,24 @@ msgctxt "points log description" msgid "Comment unapproved." msgstr "Comentario no aprobado." -#: components/points/includes/points.php:963 +#: components/points/includes/points.php:954 msgctxt "points log" msgid "(no description)" msgstr "(sin descripción)" -#: components/points/includes/points.php:1122 +#: components/points/includes/points.php:1114 #, fuzzy msgctxt "top users table heading" msgid "Position" msgstr "Descripción" -#: components/points/includes/points.php:1123 +#: components/points/includes/points.php:1115 #, fuzzy msgctxt "top users table heading" msgid "User" msgstr "Usuario" -#: components/points/includes/points.php:1124 +#: components/points/includes/points.php:1116 #, fuzzy msgctxt "top users table heading" msgid "Points" @@ -1876,91 +1877,91 @@ msgstr "" "El componente “%s” no pudo ser desactivado. Por favor, inténtelo " "de nuevo." -#: includes/class-wordpoints-components.php:546 +#: includes/class-wordpoints-components.php:564 msgid "" "WordPoints detected a large network and has skipped part of the installation " "process for the “%s” component." msgstr "" -#: includes/class-wordpoints-components.php:549 +#: includes/class-wordpoints-components.php:567 msgid "" "WordPoints detected a large network and has skipped part of the update " "process for the “%s” component for version %s (and possibly " "later versions)." msgstr "" -#: includes/class-wordpoints-components.php:555 +#: includes/class-wordpoints-components.php:573 msgid "" "The rest of the process needs to be completed manually. If this has not been " "done already, some parts of the component may not function properly." msgstr "" -#: includes/functions.php:525 +#: includes/functions.php:576 msgctxt "post type" msgid "Any" msgstr "Cualquiera" -#: includes/functions.php:623 +#: includes/functions.php:676 msgid "Shortcode error:" msgstr "Error de código corto:" -#: includes/functions.php:762 +#: includes/functions.php:815 msgctxt "component name" msgid "Points" msgstr "Puntos" -#: includes/functions.php:764 includes/functions.php:789 +#: includes/functions.php:817 includes/functions.php:842 msgctxt "component author" msgid "WordPoints" msgstr "WordPoints" -#: includes/functions.php:767 +#: includes/functions.php:820 msgid "Enables a points system for your site." msgstr "Permite un sistema de puntos para su sitio." -#: includes/functions.php:787 +#: includes/functions.php:840 msgctxt "component name" msgid "Ranks" msgstr "" -#: includes/functions.php:792 +#: includes/functions.php:845 msgid "Assign users ranks based on their points levels." msgstr "" -#: includes/modules.php:473 +#: includes/modules.php:479 msgid "By %s." msgstr "Por %s." -#: includes/modules.php:632 +#: includes/modules.php:638 msgid "Invalid module path." msgstr "Ruta del módulo no válida." -#: includes/modules.php:636 +#: includes/modules.php:642 msgid "Module file does not exist." msgstr "Archivo de módulo no existe." -#: includes/modules.php:642 +#: includes/modules.php:648 msgid "The module does not have a valid header." msgstr "El módulo no tiene una cabecera válida." -#: includes/modules.php:823 +#: includes/modules.php:829 msgid "The module generated unexpected output." msgstr "El módulo generó una salida inesperada." -#: includes/modules.php:1000 +#: includes/modules.php:1006 msgid "Could not access filesystem." msgstr "No se pudo acceder al sistema de archivos." -#: includes/modules.php:1004 +#: includes/modules.php:1010 msgid "Filesystem error." msgstr "Error del sistema de archivos." -#: includes/modules.php:1011 +#: includes/modules.php:1017 msgid "Unable to locate WordPoints Module directory." msgstr "No se puede localizar el directorio de Módulos WordPoints." #. translators: A module or list of modules. -#: includes/modules.php:1057 +#: includes/modules.php:1063 #, fuzzy msgid "Could not fully remove the module %s." msgid_plural "Could not fully remove the modules %s." diff --git a/src/languages/wordpoints-ja.mo b/src/languages/wordpoints-ja.mo index 27e736c95dc3255c8dcb55a8236c7c210c23e035..51e0539467cfef8305f579aa70213e09fdc4f677 100644 GIT binary patch delta 26 hcmbQmJBxP%6Em-ou93Ndk)f5bv6ZRmW`5>wW&l($1@iy^ delta 26 hcmbQmJBxP%6Em-&uCalFk&%_Dft8WbW`5>wW&l&81?B(% diff --git a/src/languages/wordpoints-ja.po b/src/languages/wordpoints-ja.po index 13d4b0cd..a475836f 100644 --- a/src/languages/wordpoints-ja.po +++ b/src/languages/wordpoints-ja.po @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: WordPoints 1.6.0\n" "Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/wordpoints\n" -"POT-Creation-Date: 2015-01-30 22:50:22+00:00\n" +"POT-Creation-Date: 2015-02-27 21:33:55+00:00\n" "PO-Revision-Date: 2014-10-26 03:07+0200\n" "Last-Translator: Raymond Calla \n" "Language-Team: Japanese 五つ星の評価をつけてください。" -#: admin/admin.php:502 +#: admin/admin.php:514 msgid "" "If you don’t think this plugin deserves 5 stars, please let us know " "how we can improve it." msgstr "" -#: admin/admin.php:505 +#: admin/admin.php:517 msgid "Need help?" msgstr "" -#: admin/admin.php:506 +#: admin/admin.php:518 msgid "" "Post your feature request or support question in the support " "forums" msgstr "" -#: admin/admin.php:507 +#: admin/admin.php:519 msgid "Thank you for using WordPoints!" msgstr "" -#: admin/admin.php:540 +#: admin/admin.php:552 msgid "" "WordPoints detected a large network and has skipped part of the installation " "process." msgstr "" -#: admin/admin.php:543 +#: admin/admin.php:555 msgid "" "WordPoints detected a large network and has skipped part of the update " "process for version %s (and possibly later versions)." msgstr "" -#: admin/admin.php:549 +#: admin/admin.php:561 msgid "" "The rest of the process needs to be completed manually. If this has not been " "done already, some parts of the plugin may not function properly." msgstr "" -#: admin/admin.php:550 includes/class-wordpoints-components.php:556 +#: admin/admin.php:562 includes/class-wordpoints-components.php:574 msgid "Learn more." msgstr "" @@ -244,7 +244,7 @@ msgstr[0] "" #: admin/includes/class-wordpoints-modules-list-table.php:427 #: admin/includes/class-wordpoints-modules-list-table.php:722 -#: admin/screens/configure-components.php:115 +#: admin/screens/configure-components.php:108 msgid "Activate" msgstr "" @@ -255,7 +255,7 @@ msgstr "" #: admin/includes/class-wordpoints-modules-list-table.php:431 #: admin/includes/class-wordpoints-modules-list-table.php:718 -#: admin/screens/configure-components.php:110 +#: admin/screens/configure-components.php:103 msgid "Deactivate" msgstr "" @@ -263,7 +263,7 @@ msgstr "" #: admin/includes/class-wordpoints-modules-list-table.php:710 #: admin/includes/class-wordpoints-modules-list-table.php:725 #: components/points/admin/admin.php:54 -#: components/points/includes/class-wordpoints-points-hooks.php:773 +#: components/points/includes/class-wordpoints-points-hooks.php:775 #: components/ranks/admin/admin.php:53 #: components/ranks/admin/screens/ranks.php:128 msgid "Delete" @@ -283,7 +283,7 @@ msgstr "" #. translators: %s is the component author's name. #: admin/includes/class-wordpoints-modules-list-table.php:591 -#: admin/screens/configure-components.php:136 +#: admin/screens/configure-components.php:129 msgid "By %s" msgstr "" @@ -314,25 +314,25 @@ msgid "Installed WordPoints components." msgstr "" #: admin/screens/configure-components.php:88 -#: admin/screens/configure-components.php:96 +#: admin/screens/configure-components.php:156 msgctxt "components table heading" msgid "Component" msgstr "" #: admin/screens/configure-components.php:89 -#: admin/screens/configure-components.php:97 +#: admin/screens/configure-components.php:157 msgctxt "components table heading" msgid "Description" msgstr "" #: admin/screens/configure-components.php:90 -#: admin/screens/configure-components.php:98 +#: admin/screens/configure-components.php:158 msgctxt "components table heading" msgid "Version" msgstr "" #: admin/screens/configure-components.php:91 -#: admin/screens/configure-components.php:99 +#: admin/screens/configure-components.php:159 msgctxt "components table heading" msgid "Action" msgstr "" @@ -897,67 +897,67 @@ msgstr "" msgid "There are no points hooks currently available." msgstr "" -#: components/points/includes/class-wordpoints-points-hooks.php:582 +#: components/points/includes/class-wordpoints-points-hooks.php:584 msgid "Settings" msgstr "" -#: components/points/includes/class-wordpoints-points-hooks.php:594 +#: components/points/includes/class-wordpoints-points-hooks.php:596 msgid "Slug" msgstr "" -#: components/points/includes/class-wordpoints-points-hooks.php:613 +#: components/points/includes/class-wordpoints-points-hooks.php:615 msgctxt "points type" msgid "Prefix (optional):" msgstr "" -#: components/points/includes/class-wordpoints-points-hooks.php:614 +#: components/points/includes/class-wordpoints-points-hooks.php:616 msgctxt "points type" msgid "Suffix (optional):" msgstr "" -#: components/points/includes/class-wordpoints-points-hooks.php:618 +#: components/points/includes/class-wordpoints-points-hooks.php:620 msgctxt "points type" msgid "Prefix:" msgstr "" -#: components/points/includes/class-wordpoints-points-hooks.php:619 +#: components/points/includes/class-wordpoints-points-hooks.php:621 msgctxt "points type" msgid "Suffix:" msgstr "" -#: components/points/includes/class-wordpoints-points-hooks.php:625 +#: components/points/includes/class-wordpoints-points-hooks.php:627 msgctxt "points type" msgid "Name:" msgstr "" -#: components/points/includes/class-wordpoints-points-hooks.php:664 +#: components/points/includes/class-wordpoints-points-hooks.php:666 msgctxt "points type" msgid "Delete" msgstr "" -#: components/points/includes/class-wordpoints-points-hooks.php:668 -#: components/points/includes/class-wordpoints-points-hooks.php:774 +#: components/points/includes/class-wordpoints-points-hooks.php:670 +#: components/points/includes/class-wordpoints-points-hooks.php:776 #: components/ranks/admin/screens/ranks.php:100 #: components/ranks/admin/screens/ranks.php:126 msgid "Close" msgstr "" -#: components/points/includes/class-wordpoints-points-hooks.php:671 +#: components/points/includes/class-wordpoints-points-hooks.php:673 msgctxt "points type" msgid "Save" msgstr "" -#: components/points/includes/class-wordpoints-points-hooks.php:749 +#: components/points/includes/class-wordpoints-points-hooks.php:751 msgctxt "hook" msgid "Edit" msgstr "" -#: components/points/includes/class-wordpoints-points-hooks.php:750 +#: components/points/includes/class-wordpoints-points-hooks.php:752 msgctxt "hook" msgid "Add" msgstr "" -#: components/points/includes/class-wordpoints-points-hooks.php:777 +#: components/points/includes/class-wordpoints-points-hooks.php:779 #: components/ranks/admin/screens/ranks.php:124 msgid "Save" msgstr "" @@ -973,12 +973,12 @@ msgid "" "transactions performed by WordPoints are included in the logs." msgstr "" -#: components/points/includes/hooks/abstracts/post-type.php:240 +#: components/points/includes/hooks/abstracts/post-type.php:239 msgctxt "post title" msgid "(no title)" msgstr "" -#: components/points/includes/hooks/abstracts/post-type.php:296 +#: components/points/includes/hooks/abstracts/post-type.php:295 msgid "Select post type:" msgstr "" @@ -1100,78 +1100,78 @@ msgstr "" msgid "Revoke the points if the comment is removed." msgstr "" -#: components/points/includes/hooks/periodic.php:42 +#: components/points/includes/hooks/periodic.php:43 msgctxt "points hook name" msgid "Periodic Points" msgstr "" -#: components/points/includes/hooks/periodic.php:42 +#: components/points/includes/hooks/periodic.php:44 msgid "Visiting the site at least once in a given time period." msgstr "" -#: components/points/includes/hooks/periodic.php:134 +#: components/points/includes/hooks/periodic.php:137 msgctxt "points log description" msgid "Hourly points." msgstr "" -#: components/points/includes/hooks/periodic.php:138 +#: components/points/includes/hooks/periodic.php:141 msgctxt "points log description" msgid "Daily points." msgstr "" -#: components/points/includes/hooks/periodic.php:142 +#: components/points/includes/hooks/periodic.php:145 msgctxt "points log description" msgid "Weekly points." msgstr "" -#: components/points/includes/hooks/periodic.php:146 +#: components/points/includes/hooks/periodic.php:149 msgctxt "points log description" msgid "Monthly points." msgstr "" -#: components/points/includes/hooks/periodic.php:150 +#: components/points/includes/hooks/periodic.php:153 msgctxt "points log description" msgid "Periodic points." msgstr "" -#: components/points/includes/hooks/periodic.php:172 +#: components/points/includes/hooks/periodic.php:175 msgid "Visiting the site at least once in an hour." msgstr "" -#: components/points/includes/hooks/periodic.php:175 +#: components/points/includes/hooks/periodic.php:178 msgid "Visiting the site at least once in a day." msgstr "" -#: components/points/includes/hooks/periodic.php:178 +#: components/points/includes/hooks/periodic.php:181 msgid "Visiting the site at least once in a week." msgstr "" -#: components/points/includes/hooks/periodic.php:181 +#: components/points/includes/hooks/periodic.php:184 msgid "Visiting the site at least once in a month." msgstr "" -#: components/points/includes/hooks/periodic.php:184 +#: components/points/includes/hooks/periodic.php:187 msgid "Visiting the site periodically." msgstr "" -#: components/points/includes/hooks/periodic.php:238 +#: components/points/includes/hooks/periodic.php:241 msgctxt "length of time" msgid "Period:" msgstr "" -#: components/points/includes/hooks/periodic.php:259 +#: components/points/includes/hooks/periodic.php:262 msgid "hourly" msgstr "" -#: components/points/includes/hooks/periodic.php:260 +#: components/points/includes/hooks/periodic.php:263 msgid "daily" msgstr "" -#: components/points/includes/hooks/periodic.php:261 +#: components/points/includes/hooks/periodic.php:264 msgid "weekly" msgstr "" -#: components/points/includes/hooks/periodic.php:262 +#: components/points/includes/hooks/periodic.php:265 msgid "monthly" msgstr "" @@ -1235,26 +1235,27 @@ msgid "Post published." msgstr "" #. translators: %s is the name of a post type. +#. translators: the post type's name. #: components/points/includes/hooks/post.php:66 +#: components/points/includes/logs.php:703 msgctxt "points log description" msgid "%s deleted." msgstr "" #. translators: 1 is the post type name, 2 is the post title. #: components/points/includes/hooks/post.php:68 -#: components/points/includes/logs.php:703 msgctxt "points log description" msgid "%1$s “%2$s” deleted." msgstr "" #. translators: %s will be the post title. #: components/points/includes/hooks/post.php:70 -#: components/points/includes/logs.php:712 msgctxt "points log description" msgid "Post “%s” deleted." msgstr "" #: components/points/includes/hooks/post.php:71 +#: components/points/includes/logs.php:709 msgctxt "points log description" msgid "Post deleted." msgstr "" @@ -1310,7 +1311,7 @@ msgstr "" msgid "Search Logs" msgstr "" -#: components/points/includes/logs.php:519 +#: components/points/includes/logs.php:509 msgid "No matching logs found." msgstr "" @@ -1334,22 +1335,22 @@ msgctxt "points log description" msgid "Comment unapproved." msgstr "" -#: components/points/includes/points.php:963 +#: components/points/includes/points.php:954 msgctxt "points log" msgid "(no description)" msgstr "" -#: components/points/includes/points.php:1122 +#: components/points/includes/points.php:1114 msgctxt "top users table heading" msgid "Position" msgstr "" -#: components/points/includes/points.php:1123 +#: components/points/includes/points.php:1115 msgctxt "top users table heading" msgid "User" msgstr "" -#: components/points/includes/points.php:1124 +#: components/points/includes/points.php:1116 #, fuzzy msgctxt "top users table heading" msgid "Points" @@ -1698,91 +1699,91 @@ msgid "" "%2$s" msgstr "" -#: includes/class-wordpoints-components.php:546 +#: includes/class-wordpoints-components.php:564 msgid "" "WordPoints detected a large network and has skipped part of the installation " "process for the “%s” component." msgstr "" -#: includes/class-wordpoints-components.php:549 +#: includes/class-wordpoints-components.php:567 msgid "" "WordPoints detected a large network and has skipped part of the update " "process for the “%s” component for version %s (and possibly " "later versions)." msgstr "" -#: includes/class-wordpoints-components.php:555 +#: includes/class-wordpoints-components.php:573 msgid "" "The rest of the process needs to be completed manually. If this has not been " "done already, some parts of the component may not function properly." msgstr "" -#: includes/functions.php:525 +#: includes/functions.php:576 msgctxt "post type" msgid "Any" msgstr "" -#: includes/functions.php:623 +#: includes/functions.php:676 msgid "Shortcode error:" msgstr "" -#: includes/functions.php:762 +#: includes/functions.php:815 msgctxt "component name" msgid "Points" msgstr "" -#: includes/functions.php:764 includes/functions.php:789 +#: includes/functions.php:817 includes/functions.php:842 msgctxt "component author" msgid "WordPoints" msgstr "" -#: includes/functions.php:767 +#: includes/functions.php:820 msgid "Enables a points system for your site." msgstr "" -#: includes/functions.php:787 +#: includes/functions.php:840 msgctxt "component name" msgid "Ranks" msgstr "" -#: includes/functions.php:792 +#: includes/functions.php:845 msgid "Assign users ranks based on their points levels." msgstr "" -#: includes/modules.php:473 +#: includes/modules.php:479 msgid "By %s." msgstr "" -#: includes/modules.php:632 +#: includes/modules.php:638 msgid "Invalid module path." msgstr "" -#: includes/modules.php:636 +#: includes/modules.php:642 msgid "Module file does not exist." msgstr "" -#: includes/modules.php:642 +#: includes/modules.php:648 msgid "The module does not have a valid header." msgstr "" -#: includes/modules.php:823 +#: includes/modules.php:829 msgid "The module generated unexpected output." msgstr "" -#: includes/modules.php:1000 +#: includes/modules.php:1006 msgid "Could not access filesystem." msgstr "" -#: includes/modules.php:1004 +#: includes/modules.php:1010 msgid "Filesystem error." msgstr "" -#: includes/modules.php:1011 +#: includes/modules.php:1017 msgid "Unable to locate WordPoints Module directory." msgstr "" #. translators: A module or list of modules. -#: includes/modules.php:1057 +#: includes/modules.php:1063 msgid "Could not fully remove the module %s." msgid_plural "Could not fully remove the modules %s." msgstr[0] "" diff --git a/src/languages/wordpoints-pt_BR.mo b/src/languages/wordpoints-pt_BR.mo index 32dc9ceca94167b04fa3e78ef702c06cd7c1e3bb..f41ec179af09534a27edc93fa3f3b223164cb98d 100644 GIT binary patch delta 28 kcmeyfk@3$)#tn+5yhgf4<_boJR>sCwrly\n" "Language-Team: Gabriel Galvão \n" @@ -14,7 +14,7 @@ msgstr "" "X-Poedit-Basepath: .\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#. #-#-#-#-# wordpoints.pot (WordPoints 1.9.0) #-#-#-#-# +#. #-#-#-#-# wordpoints.pot (WordPoints 1.10.0) #-#-#-#-# #. Plugin Name of the plugin/theme #: admin/admin.php:67 components/points/admin/admin.php:280 #: components/points/includes/widgets.php:120 @@ -48,34 +48,34 @@ msgstr "WordPoints - Instalar Modulos" msgid "Install Modules" msgstr "Instalar Modulos" -#: admin/admin.php:281 +#: admin/admin.php:293 msgid "Hide This Notice" msgstr "" -#: admin/admin.php:334 +#: admin/admin.php:346 #, fuzzy msgid "WordPoints — %s" msgstr "WordPoints - %s" -#: admin/admin.php:364 +#: admin/admin.php:376 msgid "Install a module in .zip format" msgstr "Instalar um modulo no formato .zip" -#: admin/admin.php:365 +#: admin/admin.php:377 msgid "" "If you have a module in a .zip format, you may install it by uploading it " "here." msgstr "Se você tem um modulo no formato .zip, você pode instalá-lo aqui." -#: admin/admin.php:368 +#: admin/admin.php:380 msgid "Module zip file" msgstr "Arquivo .zip do Modulo" -#: admin/admin.php:370 +#: admin/admin.php:382 msgid "Install Now" msgstr "Instalar Agora" -#: admin/admin.php:387 +#: admin/admin.php:399 msgid "" "You do not have sufficient permissions to install WordPoints modules on this " "site." @@ -83,25 +83,25 @@ msgstr "" "Você não tem permissões suficientes para instalar modulos WordPoints neste " "site." -#: admin/admin.php:394 +#: admin/admin.php:406 msgid "Upload WordPoints Module" msgstr "Faça upload do Modulo WordPoints" -#: admin/admin.php:406 +#: admin/admin.php:418 msgid "Installing Module from uploaded file: %s" msgstr "Instalando Modulo do arquivo: %s" -#: admin/admin.php:470 +#: admin/admin.php:482 msgid "" "This appears to be a WordPoints module archive. Try installing it on the " "WordPoints module install screen instead." msgstr "" -#: admin/admin.php:500 +#: admin/admin.php:512 msgid "Like this plugin?" msgstr "Gostou desse plugin?" -#: admin/admin.php:501 +#: admin/admin.php:513 msgid "" "If you think WordPoints is great, let everyone know by giving it a 5 star rating." @@ -109,7 +109,7 @@ msgstr "" "Se você acha que WordPoints é incrível, deixe todos saberem dando a ele 5 estrelas." -#: admin/admin.php:502 +#: admin/admin.php:514 msgid "" "If you don’t think this plugin deserves 5 stars, please let us know " "how we can improve it." @@ -117,39 +117,39 @@ msgstr "" "Se você não acredita que este plugin merece 5 estrelas, por favor deixe-nos " "saber como podemos melhorá-lo." -#: admin/admin.php:505 +#: admin/admin.php:517 msgid "Need help?" msgstr "Precisa de Ajuda?" -#: admin/admin.php:506 +#: admin/admin.php:518 msgid "" "Post your feature request or support question in the support " "forums" msgstr "Poste sua melhoria ou dúvida no Fórum de Suporte" -#: admin/admin.php:507 +#: admin/admin.php:519 msgid "Thank you for using WordPoints!" msgstr "Obrigado por usar WordPoints!" -#: admin/admin.php:540 +#: admin/admin.php:552 msgid "" "WordPoints detected a large network and has skipped part of the installation " "process." msgstr "" -#: admin/admin.php:543 +#: admin/admin.php:555 msgid "" "WordPoints detected a large network and has skipped part of the update " "process for version %s (and possibly later versions)." msgstr "" -#: admin/admin.php:549 +#: admin/admin.php:561 msgid "" "The rest of the process needs to be completed manually. If this has not been " "done already, some parts of the plugin may not function properly." msgstr "" -#: admin/admin.php:550 includes/class-wordpoints-components.php:556 +#: admin/admin.php:562 includes/class-wordpoints-components.php:574 msgid "Learn more." msgstr "" @@ -247,7 +247,7 @@ msgstr[1] "Inativos (%s)" #: admin/includes/class-wordpoints-modules-list-table.php:427 #: admin/includes/class-wordpoints-modules-list-table.php:722 -#: admin/screens/configure-components.php:115 +#: admin/screens/configure-components.php:108 msgid "Activate" msgstr "Ativar" @@ -258,7 +258,7 @@ msgstr "Desativar Network" #: admin/includes/class-wordpoints-modules-list-table.php:431 #: admin/includes/class-wordpoints-modules-list-table.php:718 -#: admin/screens/configure-components.php:110 +#: admin/screens/configure-components.php:103 msgid "Deactivate" msgstr "Desativar" @@ -266,7 +266,7 @@ msgstr "Desativar" #: admin/includes/class-wordpoints-modules-list-table.php:710 #: admin/includes/class-wordpoints-modules-list-table.php:725 #: components/points/admin/admin.php:54 -#: components/points/includes/class-wordpoints-points-hooks.php:773 +#: components/points/includes/class-wordpoints-points-hooks.php:775 #: components/ranks/admin/admin.php:53 #: components/ranks/admin/screens/ranks.php:128 msgid "Delete" @@ -286,7 +286,7 @@ msgstr "Versão %s" #. translators: %s is the component author's name. #: admin/includes/class-wordpoints-modules-list-table.php:591 -#: admin/screens/configure-components.php:136 +#: admin/screens/configure-components.php:129 msgid "By %s" msgstr "Por %s" @@ -323,25 +323,25 @@ msgid "Installed WordPoints components." msgstr "Ver componentes WordPoint instalados." #: admin/screens/configure-components.php:88 -#: admin/screens/configure-components.php:96 +#: admin/screens/configure-components.php:156 msgctxt "components table heading" msgid "Component" msgstr "Componente" #: admin/screens/configure-components.php:89 -#: admin/screens/configure-components.php:97 +#: admin/screens/configure-components.php:157 msgctxt "components table heading" msgid "Description" msgstr "Descrição" #: admin/screens/configure-components.php:90 -#: admin/screens/configure-components.php:98 +#: admin/screens/configure-components.php:158 msgctxt "components table heading" msgid "Version" msgstr "Versão" #: admin/screens/configure-components.php:91 -#: admin/screens/configure-components.php:99 +#: admin/screens/configure-components.php:159 msgctxt "components table heading" msgid "Action" msgstr "Ações" @@ -991,67 +991,67 @@ msgstr "Pontos:" msgid "There are no points hooks currently available." msgstr "Não há ligações disponíveis atualmente." -#: components/points/includes/class-wordpoints-points-hooks.php:582 +#: components/points/includes/class-wordpoints-points-hooks.php:584 msgid "Settings" msgstr "Configurações" -#: components/points/includes/class-wordpoints-points-hooks.php:594 +#: components/points/includes/class-wordpoints-points-hooks.php:596 msgid "Slug" msgstr "Slug" -#: components/points/includes/class-wordpoints-points-hooks.php:613 +#: components/points/includes/class-wordpoints-points-hooks.php:615 msgctxt "points type" msgid "Prefix (optional):" msgstr "Prefixo (opcional):" -#: components/points/includes/class-wordpoints-points-hooks.php:614 +#: components/points/includes/class-wordpoints-points-hooks.php:616 msgctxt "points type" msgid "Suffix (optional):" msgstr "Sufixo (opcional):" -#: components/points/includes/class-wordpoints-points-hooks.php:618 +#: components/points/includes/class-wordpoints-points-hooks.php:620 msgctxt "points type" msgid "Prefix:" msgstr "Prefixo:" -#: components/points/includes/class-wordpoints-points-hooks.php:619 +#: components/points/includes/class-wordpoints-points-hooks.php:621 msgctxt "points type" msgid "Suffix:" msgstr "Sufixo:" -#: components/points/includes/class-wordpoints-points-hooks.php:625 +#: components/points/includes/class-wordpoints-points-hooks.php:627 msgctxt "points type" msgid "Name:" msgstr "Nome:" -#: components/points/includes/class-wordpoints-points-hooks.php:664 +#: components/points/includes/class-wordpoints-points-hooks.php:666 msgctxt "points type" msgid "Delete" msgstr "Deletar" -#: components/points/includes/class-wordpoints-points-hooks.php:668 -#: components/points/includes/class-wordpoints-points-hooks.php:774 +#: components/points/includes/class-wordpoints-points-hooks.php:670 +#: components/points/includes/class-wordpoints-points-hooks.php:776 #: components/ranks/admin/screens/ranks.php:100 #: components/ranks/admin/screens/ranks.php:126 msgid "Close" msgstr "Fechar" -#: components/points/includes/class-wordpoints-points-hooks.php:671 +#: components/points/includes/class-wordpoints-points-hooks.php:673 msgctxt "points type" msgid "Save" msgstr "Salvar" -#: components/points/includes/class-wordpoints-points-hooks.php:749 +#: components/points/includes/class-wordpoints-points-hooks.php:751 msgctxt "hook" msgid "Edit" msgstr "Editar" -#: components/points/includes/class-wordpoints-points-hooks.php:750 +#: components/points/includes/class-wordpoints-points-hooks.php:752 msgctxt "hook" msgid "Add" msgstr "Adicionar" -#: components/points/includes/class-wordpoints-points-hooks.php:777 +#: components/points/includes/class-wordpoints-points-hooks.php:779 #: components/ranks/admin/screens/ranks.php:124 msgid "Save" msgstr "Salvar" @@ -1067,12 +1067,12 @@ msgid "" "transactions performed by WordPoints are included in the logs." msgstr "" -#: components/points/includes/hooks/abstracts/post-type.php:240 +#: components/points/includes/hooks/abstracts/post-type.php:239 msgctxt "post title" msgid "(no title)" msgstr "(sem titulo)" -#: components/points/includes/hooks/abstracts/post-type.php:296 +#: components/points/includes/hooks/abstracts/post-type.php:295 msgid "Select post type:" msgstr "Selecione o tipo de post:" @@ -1208,81 +1208,81 @@ msgstr "Comentario movido para o lixo." msgid "Revoke the points if the comment is removed." msgstr "" -#: components/points/includes/hooks/periodic.php:42 +#: components/points/includes/hooks/periodic.php:43 msgctxt "points hook name" msgid "Periodic Points" msgstr "Pontos Periodicos" -#: components/points/includes/hooks/periodic.php:42 +#: components/points/includes/hooks/periodic.php:44 #, fuzzy msgid "Visiting the site at least once in a given time period." msgstr "" "Premei usuarios com pontos quando ele visitar o seu site ao menos uma vez em " "um periodo determinado." -#: components/points/includes/hooks/periodic.php:134 +#: components/points/includes/hooks/periodic.php:137 msgctxt "points log description" msgid "Hourly points." msgstr "Pontos por Hora." -#: components/points/includes/hooks/periodic.php:138 +#: components/points/includes/hooks/periodic.php:141 msgctxt "points log description" msgid "Daily points." msgstr "Pontos por Dia." -#: components/points/includes/hooks/periodic.php:142 +#: components/points/includes/hooks/periodic.php:145 msgctxt "points log description" msgid "Weekly points." msgstr "Pontos por Semana." -#: components/points/includes/hooks/periodic.php:146 +#: components/points/includes/hooks/periodic.php:149 msgctxt "points log description" msgid "Monthly points." msgstr "Pontos por Mês." -#: components/points/includes/hooks/periodic.php:150 +#: components/points/includes/hooks/periodic.php:153 msgctxt "points log description" msgid "Periodic points." msgstr "Pontos Periodicos." -#: components/points/includes/hooks/periodic.php:172 +#: components/points/includes/hooks/periodic.php:175 msgid "Visiting the site at least once in an hour." msgstr "" -#: components/points/includes/hooks/periodic.php:175 +#: components/points/includes/hooks/periodic.php:178 msgid "Visiting the site at least once in a day." msgstr "" -#: components/points/includes/hooks/periodic.php:178 +#: components/points/includes/hooks/periodic.php:181 msgid "Visiting the site at least once in a week." msgstr "" -#: components/points/includes/hooks/periodic.php:181 +#: components/points/includes/hooks/periodic.php:184 msgid "Visiting the site at least once in a month." msgstr "" -#: components/points/includes/hooks/periodic.php:184 +#: components/points/includes/hooks/periodic.php:187 msgid "Visiting the site periodically." msgstr "" -#: components/points/includes/hooks/periodic.php:238 +#: components/points/includes/hooks/periodic.php:241 msgctxt "length of time" msgid "Period:" msgstr "Periodo:" -#: components/points/includes/hooks/periodic.php:259 +#: components/points/includes/hooks/periodic.php:262 msgid "hourly" msgstr "Por Hora" -#: components/points/includes/hooks/periodic.php:260 +#: components/points/includes/hooks/periodic.php:263 msgid "daily" msgstr "Por dia" -#: components/points/includes/hooks/periodic.php:261 +#: components/points/includes/hooks/periodic.php:264 msgid "weekly" msgstr "Por Semana" -#: components/points/includes/hooks/periodic.php:262 +#: components/points/includes/hooks/periodic.php:265 msgid "monthly" msgstr "Por Mês" @@ -1354,7 +1354,9 @@ msgid "Post published." msgstr "Post publicado." #. translators: %s is the name of a post type. +#. translators: the post type's name. #: components/points/includes/hooks/post.php:66 +#: components/points/includes/logs.php:703 #, fuzzy msgctxt "points log description" msgid "%s deleted." @@ -1362,7 +1364,6 @@ msgstr "Tipos de Pontos deletados." #. translators: 1 is the post type name, 2 is the post title. #: components/points/includes/hooks/post.php:68 -#: components/points/includes/logs.php:703 #, fuzzy msgctxt "points log description" msgid "%1$s “%2$s” deleted." @@ -1370,13 +1371,13 @@ msgstr "%1$s \"%2$s\" deletado." #. translators: %s will be the post title. #: components/points/includes/hooks/post.php:70 -#: components/points/includes/logs.php:712 #, fuzzy msgctxt "points log description" msgid "Post “%s” deleted." msgstr "Post \"%s\" deletado." #: components/points/includes/hooks/post.php:71 +#: components/points/includes/logs.php:709 #, fuzzy msgctxt "points log description" msgid "Post deleted." @@ -1437,7 +1438,7 @@ msgstr "Procurar:" msgid "Search Logs" msgstr "Procurar:" -#: components/points/includes/logs.php:519 +#: components/points/includes/logs.php:509 #, fuzzy msgid "No matching logs found." msgstr "Nenhum registro correspondente foi encontrado" @@ -1462,24 +1463,24 @@ msgctxt "points log description" msgid "Comment unapproved." msgstr "Comentario não aprovado." -#: components/points/includes/points.php:963 +#: components/points/includes/points.php:954 msgctxt "points log" msgid "(no description)" msgstr "(sem descrição)" -#: components/points/includes/points.php:1122 +#: components/points/includes/points.php:1114 #, fuzzy msgctxt "top users table heading" msgid "Position" msgstr "Descrição" -#: components/points/includes/points.php:1123 +#: components/points/includes/points.php:1115 #, fuzzy msgctxt "top users table heading" msgid "User" msgstr "Usuário" -#: components/points/includes/points.php:1124 +#: components/points/includes/points.php:1116 #, fuzzy msgctxt "top users table heading" msgid "Points" @@ -1862,91 +1863,91 @@ msgid "" msgstr "" "O componente \"%s\" não pode ser desativado. Por favor tente novamente." -#: includes/class-wordpoints-components.php:546 +#: includes/class-wordpoints-components.php:564 msgid "" "WordPoints detected a large network and has skipped part of the installation " "process for the “%s” component." msgstr "" -#: includes/class-wordpoints-components.php:549 +#: includes/class-wordpoints-components.php:567 msgid "" "WordPoints detected a large network and has skipped part of the update " "process for the “%s” component for version %s (and possibly " "later versions)." msgstr "" -#: includes/class-wordpoints-components.php:555 +#: includes/class-wordpoints-components.php:573 msgid "" "The rest of the process needs to be completed manually. If this has not been " "done already, some parts of the component may not function properly." msgstr "" -#: includes/functions.php:525 +#: includes/functions.php:576 msgctxt "post type" msgid "Any" msgstr "Qualquer um" -#: includes/functions.php:623 +#: includes/functions.php:676 msgid "Shortcode error:" msgstr "Shortcode erro:" -#: includes/functions.php:762 +#: includes/functions.php:815 msgctxt "component name" msgid "Points" msgstr "Pontos" -#: includes/functions.php:764 includes/functions.php:789 +#: includes/functions.php:817 includes/functions.php:842 msgctxt "component author" msgid "WordPoints" msgstr "WordPoints" -#: includes/functions.php:767 +#: includes/functions.php:820 msgid "Enables a points system for your site." msgstr "Ativa o sistema de pontos no seu site." -#: includes/functions.php:787 +#: includes/functions.php:840 msgctxt "component name" msgid "Ranks" msgstr "" -#: includes/functions.php:792 +#: includes/functions.php:845 msgid "Assign users ranks based on their points levels." msgstr "" -#: includes/modules.php:473 +#: includes/modules.php:479 msgid "By %s." msgstr "Por %s." -#: includes/modules.php:632 +#: includes/modules.php:638 msgid "Invalid module path." msgstr "Paconte de módulo inválido." -#: includes/modules.php:636 +#: includes/modules.php:642 msgid "Module file does not exist." msgstr "Os arquivos do módulo não existem." -#: includes/modules.php:642 +#: includes/modules.php:648 msgid "The module does not have a valid header." msgstr "O módulo não tem um cabeçalho válido." -#: includes/modules.php:823 +#: includes/modules.php:829 msgid "The module generated unexpected output." msgstr "O módulo gerou uma saída inesperada." -#: includes/modules.php:1000 +#: includes/modules.php:1006 msgid "Could not access filesystem." msgstr "Não foi possível acessar os arquivos do sistema." -#: includes/modules.php:1004 +#: includes/modules.php:1010 msgid "Filesystem error." msgstr "Erro no Sistema de Arquivos." -#: includes/modules.php:1011 +#: includes/modules.php:1017 msgid "Unable to locate WordPoints Module directory." msgstr "Não foi possível localizar o diretório do módulo WordPoints" #. translators: A module or list of modules. -#: includes/modules.php:1057 +#: includes/modules.php:1063 #, fuzzy msgid "Could not fully remove the module %s." msgid_plural "Could not fully remove the modules %s." diff --git a/src/languages/wordpoints-zh_CN.mo b/src/languages/wordpoints-zh_CN.mo index 965073350e0b6f68cfd35d8fce293785a1a0b009..94a4bb334f1e69712f9e3e736c706c4774d958ab 100755 GIT binary patch delta 28 kcmZ3nm1)IRrVYmvd5v_9%oU6bt&EMWOiedmNxWhK0GC|~CjbBd delta 28 kcmZ3nm1)IRrVYmvc@1@q4HS%wtV|88jEpv4NxWhK0G7}S8UO$Q diff --git a/src/languages/wordpoints-zh_CN.po b/src/languages/wordpoints-zh_CN.po index 9fb18f7c..1ccd6cef 100644 --- a/src/languages/wordpoints-zh_CN.po +++ b/src/languages/wordpoints-zh_CN.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: WordPoints 1.4.0\n" "Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/wordpoints\n" -"POT-Creation-Date: 2015-01-30 22:50:22+00:00\n" +"POT-Creation-Date: 2015-02-27 21:33:55+00:00\n" "PO-Revision-Date: 2014-11-29 07:17+0200\n" "Last-Translator: Jack Lee \n" "Language-Team: Simplified Chinese 5 star rating." msgstr "" "如果您觉得WordPoints不错,请用5分评价以让更多人知道它。" -#: admin/admin.php:502 +#: admin/admin.php:514 msgid "" "If you don’t think this plugin deserves 5 stars, please let us know " "how we can improve it." msgstr "如果您觉得这个插件不值5分评价,请提出您的宝贵建议。" -#: admin/admin.php:505 +#: admin/admin.php:517 msgid "Need help?" msgstr "需要帮助?" -#: admin/admin.php:506 +#: admin/admin.php:518 msgid "" "Post your feature request or support question in the support " "forums" msgstr "请在支持论坛提交您的功能需求或者问题" -#: admin/admin.php:507 +#: admin/admin.php:519 msgid "Thank you for using WordPoints!" msgstr "感谢您使用WordPoints!" -#: admin/admin.php:540 +#: admin/admin.php:552 msgid "" "WordPoints detected a large network and has skipped part of the installation " "process." msgstr "WordPoints检测到多站,已跳过部分安装过程。" -#: admin/admin.php:543 +#: admin/admin.php:555 msgid "" "WordPoints detected a large network and has skipped part of the update " "process for version %s (and possibly later versions)." @@ -140,14 +140,14 @@ msgstr "" "WordPoints探测到一个大的多站网络,已经为版本%s (和更新的版本)跳过了部分更新过" "程。" -#: admin/admin.php:549 +#: admin/admin.php:561 msgid "" "The rest of the process needs to be completed manually. If this has not been " "done already, some parts of the plugin may not function properly." msgstr "" "剩余的过程需要完全人工操作.如果没有完成,该插件的某些功能可能无法正常工作。" -#: admin/admin.php:550 includes/class-wordpoints-components.php:556 +#: admin/admin.php:562 includes/class-wordpoints-components.php:574 msgid "Learn more." msgstr "了解更多。" @@ -240,7 +240,7 @@ msgstr[0] "未激活 (%s)" #: admin/includes/class-wordpoints-modules-list-table.php:427 #: admin/includes/class-wordpoints-modules-list-table.php:722 -#: admin/screens/configure-components.php:115 +#: admin/screens/configure-components.php:108 msgid "Activate" msgstr "激活" @@ -251,7 +251,7 @@ msgstr "网络停用" #: admin/includes/class-wordpoints-modules-list-table.php:431 #: admin/includes/class-wordpoints-modules-list-table.php:718 -#: admin/screens/configure-components.php:110 +#: admin/screens/configure-components.php:103 msgid "Deactivate" msgstr "停用" @@ -259,7 +259,7 @@ msgstr "停用" #: admin/includes/class-wordpoints-modules-list-table.php:710 #: admin/includes/class-wordpoints-modules-list-table.php:725 #: components/points/admin/admin.php:54 -#: components/points/includes/class-wordpoints-points-hooks.php:773 +#: components/points/includes/class-wordpoints-points-hooks.php:775 #: components/ranks/admin/admin.php:53 #: components/ranks/admin/screens/ranks.php:128 msgid "Delete" @@ -279,7 +279,7 @@ msgstr "版本 %s" #. translators: %s is the component author's name. #: admin/includes/class-wordpoints-modules-list-table.php:591 -#: admin/screens/configure-components.php:136 +#: admin/screens/configure-components.php:129 msgid "By %s" msgstr "作者 %s" @@ -310,25 +310,25 @@ msgid "Installed WordPoints components." msgstr "查看已安装的WordPoints组件。" #: admin/screens/configure-components.php:88 -#: admin/screens/configure-components.php:96 +#: admin/screens/configure-components.php:156 msgctxt "components table heading" msgid "Component" msgstr "组件" #: admin/screens/configure-components.php:89 -#: admin/screens/configure-components.php:97 +#: admin/screens/configure-components.php:157 msgctxt "components table heading" msgid "Description" msgstr "描述" #: admin/screens/configure-components.php:90 -#: admin/screens/configure-components.php:98 +#: admin/screens/configure-components.php:158 msgctxt "components table heading" msgid "Version" msgstr "版本" #: admin/screens/configure-components.php:91 -#: admin/screens/configure-components.php:99 +#: admin/screens/configure-components.php:159 msgctxt "components table heading" msgid "Action" msgstr "操作" @@ -929,67 +929,67 @@ msgstr "积分:" msgid "There are no points hooks currently available." msgstr "当前无可用的积分Hooks。" -#: components/points/includes/class-wordpoints-points-hooks.php:582 +#: components/points/includes/class-wordpoints-points-hooks.php:584 msgid "Settings" msgstr "设置" -#: components/points/includes/class-wordpoints-points-hooks.php:594 +#: components/points/includes/class-wordpoints-points-hooks.php:596 msgid "Slug" msgstr "别名" -#: components/points/includes/class-wordpoints-points-hooks.php:613 +#: components/points/includes/class-wordpoints-points-hooks.php:615 msgctxt "points type" msgid "Prefix (optional):" msgstr "前缀(可选):" -#: components/points/includes/class-wordpoints-points-hooks.php:614 +#: components/points/includes/class-wordpoints-points-hooks.php:616 msgctxt "points type" msgid "Suffix (optional):" msgstr "后缀(可选):" -#: components/points/includes/class-wordpoints-points-hooks.php:618 +#: components/points/includes/class-wordpoints-points-hooks.php:620 msgctxt "points type" msgid "Prefix:" msgstr "前缀:" -#: components/points/includes/class-wordpoints-points-hooks.php:619 +#: components/points/includes/class-wordpoints-points-hooks.php:621 msgctxt "points type" msgid "Suffix:" msgstr "后缀:" -#: components/points/includes/class-wordpoints-points-hooks.php:625 +#: components/points/includes/class-wordpoints-points-hooks.php:627 msgctxt "points type" msgid "Name:" msgstr "名称:" -#: components/points/includes/class-wordpoints-points-hooks.php:664 +#: components/points/includes/class-wordpoints-points-hooks.php:666 msgctxt "points type" msgid "Delete" msgstr "删除" -#: components/points/includes/class-wordpoints-points-hooks.php:668 -#: components/points/includes/class-wordpoints-points-hooks.php:774 +#: components/points/includes/class-wordpoints-points-hooks.php:670 +#: components/points/includes/class-wordpoints-points-hooks.php:776 #: components/ranks/admin/screens/ranks.php:100 #: components/ranks/admin/screens/ranks.php:126 msgid "Close" msgstr "关闭" -#: components/points/includes/class-wordpoints-points-hooks.php:671 +#: components/points/includes/class-wordpoints-points-hooks.php:673 msgctxt "points type" msgid "Save" msgstr "保存" -#: components/points/includes/class-wordpoints-points-hooks.php:749 +#: components/points/includes/class-wordpoints-points-hooks.php:751 msgctxt "hook" msgid "Edit" msgstr "编辑" -#: components/points/includes/class-wordpoints-points-hooks.php:750 +#: components/points/includes/class-wordpoints-points-hooks.php:752 msgctxt "hook" msgid "Add" msgstr "添加" -#: components/points/includes/class-wordpoints-points-hooks.php:777 +#: components/points/includes/class-wordpoints-points-hooks.php:779 #: components/ranks/admin/screens/ranks.php:124 msgid "Save" msgstr "保存" @@ -1007,12 +1007,12 @@ msgstr "" "此积分类型使用了自定义的元数据ID(“%s”)。如果这个ID已经被其它插件" "使用,请修改它,以避免出错。" -#: components/points/includes/hooks/abstracts/post-type.php:240 +#: components/points/includes/hooks/abstracts/post-type.php:239 msgctxt "post title" msgid "(no title)" msgstr "(无标题)" -#: components/points/includes/hooks/abstracts/post-type.php:296 +#: components/points/includes/hooks/abstracts/post-type.php:295 msgid "Select post type:" msgstr "请选择文章类型:" @@ -1140,78 +1140,78 @@ msgstr "%s上已收到的评论被移除。" msgid "Revoke the points if the comment is removed." msgstr "" -#: components/points/includes/hooks/periodic.php:42 +#: components/points/includes/hooks/periodic.php:43 msgctxt "points hook name" msgid "Periodic Points" msgstr "周期性积分" -#: components/points/includes/hooks/periodic.php:42 +#: components/points/includes/hooks/periodic.php:44 msgid "Visiting the site at least once in a given time period." msgstr "周期性访问网站,奖励积分。" -#: components/points/includes/hooks/periodic.php:134 +#: components/points/includes/hooks/periodic.php:137 msgctxt "points log description" msgid "Hourly points." msgstr "小时积分。" -#: components/points/includes/hooks/periodic.php:138 +#: components/points/includes/hooks/periodic.php:141 msgctxt "points log description" msgid "Daily points." msgstr "每天积分。" -#: components/points/includes/hooks/periodic.php:142 +#: components/points/includes/hooks/periodic.php:145 msgctxt "points log description" msgid "Weekly points." msgstr "每周积分。" -#: components/points/includes/hooks/periodic.php:146 +#: components/points/includes/hooks/periodic.php:149 msgctxt "points log description" msgid "Monthly points." msgstr "每月积分。" -#: components/points/includes/hooks/periodic.php:150 +#: components/points/includes/hooks/periodic.php:153 msgctxt "points log description" msgid "Periodic points." msgstr "周期性积分。" -#: components/points/includes/hooks/periodic.php:172 +#: components/points/includes/hooks/periodic.php:175 msgid "Visiting the site at least once in an hour." msgstr "每小时在线奖励积分。" -#: components/points/includes/hooks/periodic.php:175 +#: components/points/includes/hooks/periodic.php:178 msgid "Visiting the site at least once in a day." msgstr "至少在每天查看下这个网站。" -#: components/points/includes/hooks/periodic.php:178 +#: components/points/includes/hooks/periodic.php:181 msgid "Visiting the site at least once in a week." msgstr "至少在每周查看下这个网站。" -#: components/points/includes/hooks/periodic.php:181 +#: components/points/includes/hooks/periodic.php:184 msgid "Visiting the site at least once in a month." msgstr "至少在每个月查看下这个网站。" -#: components/points/includes/hooks/periodic.php:184 +#: components/points/includes/hooks/periodic.php:187 msgid "Visiting the site periodically." msgstr "查看这个网站的间隔期。" -#: components/points/includes/hooks/periodic.php:238 +#: components/points/includes/hooks/periodic.php:241 msgctxt "length of time" msgid "Period:" msgstr "周期:" -#: components/points/includes/hooks/periodic.php:259 +#: components/points/includes/hooks/periodic.php:262 msgid "hourly" msgstr "按小时" -#: components/points/includes/hooks/periodic.php:260 +#: components/points/includes/hooks/periodic.php:263 msgid "daily" msgstr "按天" -#: components/points/includes/hooks/periodic.php:261 +#: components/points/includes/hooks/periodic.php:264 msgid "weekly" msgstr "按周" -#: components/points/includes/hooks/periodic.php:262 +#: components/points/includes/hooks/periodic.php:265 msgid "monthly" msgstr "按月" @@ -1276,7 +1276,9 @@ msgid "Post published." msgstr "文章已发布。" #. translators: %s is the name of a post type. +#. translators: the post type's name. #: components/points/includes/hooks/post.php:66 +#: components/points/includes/logs.php:703 #, fuzzy msgctxt "points log description" msgid "%s deleted." @@ -1284,19 +1286,18 @@ msgstr "%s已被永久删除。" #. translators: 1 is the post type name, 2 is the post title. #: components/points/includes/hooks/post.php:68 -#: components/points/includes/logs.php:703 msgctxt "points log description" msgid "%1$s “%2$s” deleted." msgstr "%1$s “%2$s” 已删除." #. translators: %s will be the post title. #: components/points/includes/hooks/post.php:70 -#: components/points/includes/logs.php:712 msgctxt "points log description" msgid "Post “%s” deleted." msgstr "文章 “%s” 已删除." #: components/points/includes/hooks/post.php:71 +#: components/points/includes/logs.php:709 #, fuzzy msgctxt "points log description" msgid "Post deleted." @@ -1354,7 +1355,7 @@ msgstr "搜索记录:" msgid "Search Logs" msgstr "搜索记录" -#: components/points/includes/logs.php:519 +#: components/points/includes/logs.php:509 msgid "No matching logs found." msgstr "未找到匹配的记录。" @@ -1378,22 +1379,22 @@ msgctxt "points log description" msgid "Comment unapproved." msgstr "评论未通过审核。" -#: components/points/includes/points.php:963 +#: components/points/includes/points.php:954 msgctxt "points log" msgid "(no description)" msgstr "(无描述)" -#: components/points/includes/points.php:1122 +#: components/points/includes/points.php:1114 msgctxt "top users table heading" msgid "Position" msgstr "位置" -#: components/points/includes/points.php:1123 +#: components/points/includes/points.php:1115 msgctxt "top users table heading" msgid "User" msgstr "用户" -#: components/points/includes/points.php:1124 +#: components/points/includes/points.php:1116 msgctxt "top users table heading" msgid "Points" msgstr "积分" @@ -1761,7 +1762,7 @@ msgid "" "%2$s" msgstr "组件 “%s” 未能禁用,请重试。" -#: includes/class-wordpoints-components.php:546 +#: includes/class-wordpoints-components.php:564 msgid "" "WordPoints detected a large network and has skipped part of the installation " "process for the “%s” component." @@ -1769,7 +1770,7 @@ msgstr "" "WordPoints检测到一个大的多站网络并且已经为组件“%s”跳过了部分安装" "进程。" -#: includes/class-wordpoints-components.php:549 +#: includes/class-wordpoints-components.php:567 msgid "" "WordPoints detected a large network and has skipped part of the update " "process for the “%s” component for version %s (and possibly " @@ -1778,78 +1779,78 @@ msgstr "" "WordPoints检测到一个大的多站网络并且已经跳过了版本%s (和更新的版本)的更新进" "程。" -#: includes/class-wordpoints-components.php:555 +#: includes/class-wordpoints-components.php:573 msgid "" "The rest of the process needs to be completed manually. If this has not been " "done already, some parts of the component may not function properly." msgstr "剩余的进程需要人工完成,如果未被完成,此组件的部分功能将不可用。" -#: includes/functions.php:525 +#: includes/functions.php:576 msgctxt "post type" msgid "Any" msgstr "任何" -#: includes/functions.php:623 +#: includes/functions.php:676 msgid "Shortcode error:" msgstr "短代码错误:" -#: includes/functions.php:762 +#: includes/functions.php:815 msgctxt "component name" msgid "Points" msgstr "积分" -#: includes/functions.php:764 includes/functions.php:789 +#: includes/functions.php:817 includes/functions.php:842 msgctxt "component author" msgid "WordPoints" msgstr "WordPoints" -#: includes/functions.php:767 +#: includes/functions.php:820 msgid "Enables a points system for your site." msgstr "在您的网站启用一个积分系统。" -#: includes/functions.php:787 +#: includes/functions.php:840 msgctxt "component name" msgid "Ranks" msgstr "评级" -#: includes/functions.php:792 +#: includes/functions.php:845 msgid "Assign users ranks based on their points levels." msgstr "基于用户积分数量确定TA所在的等级。" -#: includes/modules.php:473 +#: includes/modules.php:479 msgid "By %s." msgstr "作者 %s.。" -#: includes/modules.php:632 +#: includes/modules.php:638 msgid "Invalid module path." msgstr "不可用的模块路径。" -#: includes/modules.php:636 +#: includes/modules.php:642 msgid "Module file does not exist." msgstr "模块文件不存在。" -#: includes/modules.php:642 +#: includes/modules.php:648 msgid "The module does not have a valid header." msgstr "此模块头部不可用。" -#: includes/modules.php:823 +#: includes/modules.php:829 msgid "The module generated unexpected output." msgstr "此模块产生了意外的输出。" -#: includes/modules.php:1000 +#: includes/modules.php:1006 msgid "Could not access filesystem." msgstr "文件系统权限错误。" -#: includes/modules.php:1004 +#: includes/modules.php:1010 msgid "Filesystem error." msgstr "文件系统错误。" -#: includes/modules.php:1011 +#: includes/modules.php:1017 msgid "Unable to locate WordPoints Module directory." msgstr "无法找到WordPoints模块目录。" #. translators: A module or list of modules. -#: includes/modules.php:1057 +#: includes/modules.php:1063 msgid "Could not fully remove the module %s." msgid_plural "Could not fully remove the modules %s." msgstr[0] "无法完全移除模块 %s." diff --git a/src/languages/wordpoints.pot b/src/languages/wordpoints.pot index e4329cfa..b6e42d68 100644 --- a/src/languages/wordpoints.pot +++ b/src/languages/wordpoints.pot @@ -2,9 +2,9 @@ # This file is distributed under the same license as the WordPoints package. msgid "" msgstr "" -"Project-Id-Version: WordPoints 1.9.0\n" +"Project-Id-Version: WordPoints 1.10.0\n" "Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/wordpoints\n" -"POT-Creation-Date: 2015-01-30 22:50:22+00:00\n" +"POT-Creation-Date: 2015-02-27 21:33:55+00:00\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -12,7 +12,7 @@ msgstr "" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" -#. #-#-#-#-# wordpoints.pot (WordPoints 1.9.0) #-#-#-#-# +#. #-#-#-#-# wordpoints.pot (WordPoints 1.10.0) #-#-#-#-# #. Plugin Name of the plugin/theme #: admin/admin.php:67 components/points/admin/admin.php:280 #: components/points/includes/widgets.php:120 @@ -43,101 +43,101 @@ msgstr "" msgid "Install Modules" msgstr "" -#: admin/admin.php:281 +#: admin/admin.php:293 msgid "Hide This Notice" msgstr "" -#: admin/admin.php:334 +#: admin/admin.php:346 msgid "WordPoints — %s" msgstr "" -#: admin/admin.php:364 +#: admin/admin.php:376 msgid "Install a module in .zip format" msgstr "" -#: admin/admin.php:365 +#: admin/admin.php:377 msgid "" "If you have a module in a .zip format, you may install it by uploading it " "here." msgstr "" -#: admin/admin.php:368 +#: admin/admin.php:380 msgid "Module zip file" msgstr "" -#: admin/admin.php:370 +#: admin/admin.php:382 msgid "Install Now" msgstr "" -#: admin/admin.php:387 +#: admin/admin.php:399 msgid "" "You do not have sufficient permissions to install WordPoints modules on this " "site." msgstr "" -#: admin/admin.php:394 +#: admin/admin.php:406 msgid "Upload WordPoints Module" msgstr "" -#: admin/admin.php:406 +#: admin/admin.php:418 msgid "Installing Module from uploaded file: %s" msgstr "" -#: admin/admin.php:470 +#: admin/admin.php:482 msgid "" "This appears to be a WordPoints module archive. Try installing it on the " "WordPoints module install screen instead." msgstr "" -#: admin/admin.php:500 +#: admin/admin.php:512 msgid "Like this plugin?" msgstr "" -#: admin/admin.php:501 +#: admin/admin.php:513 msgid "" "If you think WordPoints is great, let everyone know by giving it a 5 star rating." msgstr "" -#: admin/admin.php:502 +#: admin/admin.php:514 msgid "" "If you don’t think this plugin deserves 5 stars, please let us know " "how we can improve it." msgstr "" -#: admin/admin.php:505 +#: admin/admin.php:517 msgid "Need help?" msgstr "" -#: admin/admin.php:506 +#: admin/admin.php:518 msgid "" "Post your feature request or support question in the support " "forums" msgstr "" -#: admin/admin.php:507 +#: admin/admin.php:519 msgid "Thank you for using WordPoints!" msgstr "" -#: admin/admin.php:540 +#: admin/admin.php:552 msgid "" "WordPoints detected a large network and has skipped part of the installation " "process." msgstr "" -#: admin/admin.php:543 +#: admin/admin.php:555 msgid "" "WordPoints detected a large network and has skipped part of the update " "process for version %s (and possibly later versions)." msgstr "" -#: admin/admin.php:549 +#: admin/admin.php:561 msgid "" "The rest of the process needs to be completed manually. If this has not been " "done already, some parts of the plugin may not function properly." msgstr "" -#: admin/admin.php:550 includes/class-wordpoints-components.php:556 +#: admin/admin.php:562 includes/class-wordpoints-components.php:574 msgid "Learn more." msgstr "" @@ -234,7 +234,7 @@ msgstr[1] "" #: admin/includes/class-wordpoints-modules-list-table.php:427 #: admin/includes/class-wordpoints-modules-list-table.php:722 -#: admin/screens/configure-components.php:115 +#: admin/screens/configure-components.php:108 msgid "Activate" msgstr "" @@ -245,7 +245,7 @@ msgstr "" #: admin/includes/class-wordpoints-modules-list-table.php:431 #: admin/includes/class-wordpoints-modules-list-table.php:718 -#: admin/screens/configure-components.php:110 +#: admin/screens/configure-components.php:103 msgid "Deactivate" msgstr "" @@ -253,7 +253,7 @@ msgstr "" #: admin/includes/class-wordpoints-modules-list-table.php:710 #: admin/includes/class-wordpoints-modules-list-table.php:725 #: components/points/admin/admin.php:54 -#: components/points/includes/class-wordpoints-points-hooks.php:773 +#: components/points/includes/class-wordpoints-points-hooks.php:775 #: components/ranks/admin/admin.php:53 #: components/ranks/admin/screens/ranks.php:128 msgid "Delete" @@ -273,7 +273,7 @@ msgstr "" #. translators: %s is the component author's name. #: admin/includes/class-wordpoints-modules-list-table.php:591 -#: admin/screens/configure-components.php:136 +#: admin/screens/configure-components.php:129 msgid "By %s" msgstr "" @@ -304,25 +304,25 @@ msgid "Installed WordPoints components." msgstr "" #: admin/screens/configure-components.php:88 -#: admin/screens/configure-components.php:96 +#: admin/screens/configure-components.php:156 msgctxt "components table heading" msgid "Component" msgstr "" #: admin/screens/configure-components.php:89 -#: admin/screens/configure-components.php:97 +#: admin/screens/configure-components.php:157 msgctxt "components table heading" msgid "Description" msgstr "" #: admin/screens/configure-components.php:90 -#: admin/screens/configure-components.php:98 +#: admin/screens/configure-components.php:158 msgctxt "components table heading" msgid "Version" msgstr "" #: admin/screens/configure-components.php:91 -#: admin/screens/configure-components.php:99 +#: admin/screens/configure-components.php:159 msgctxt "components table heading" msgid "Action" msgstr "" @@ -889,67 +889,67 @@ msgstr "" msgid "There are no points hooks currently available." msgstr "" -#: components/points/includes/class-wordpoints-points-hooks.php:582 +#: components/points/includes/class-wordpoints-points-hooks.php:584 msgid "Settings" msgstr "" -#: components/points/includes/class-wordpoints-points-hooks.php:594 +#: components/points/includes/class-wordpoints-points-hooks.php:596 msgid "Slug" msgstr "" -#: components/points/includes/class-wordpoints-points-hooks.php:613 +#: components/points/includes/class-wordpoints-points-hooks.php:615 msgctxt "points type" msgid "Prefix (optional):" msgstr "" -#: components/points/includes/class-wordpoints-points-hooks.php:614 +#: components/points/includes/class-wordpoints-points-hooks.php:616 msgctxt "points type" msgid "Suffix (optional):" msgstr "" -#: components/points/includes/class-wordpoints-points-hooks.php:618 +#: components/points/includes/class-wordpoints-points-hooks.php:620 msgctxt "points type" msgid "Prefix:" msgstr "" -#: components/points/includes/class-wordpoints-points-hooks.php:619 +#: components/points/includes/class-wordpoints-points-hooks.php:621 msgctxt "points type" msgid "Suffix:" msgstr "" -#: components/points/includes/class-wordpoints-points-hooks.php:625 +#: components/points/includes/class-wordpoints-points-hooks.php:627 msgctxt "points type" msgid "Name:" msgstr "" -#: components/points/includes/class-wordpoints-points-hooks.php:664 +#: components/points/includes/class-wordpoints-points-hooks.php:666 msgctxt "points type" msgid "Delete" msgstr "" -#: components/points/includes/class-wordpoints-points-hooks.php:668 -#: components/points/includes/class-wordpoints-points-hooks.php:774 +#: components/points/includes/class-wordpoints-points-hooks.php:670 +#: components/points/includes/class-wordpoints-points-hooks.php:776 #: components/ranks/admin/screens/ranks.php:100 #: components/ranks/admin/screens/ranks.php:126 msgid "Close" msgstr "" -#: components/points/includes/class-wordpoints-points-hooks.php:671 +#: components/points/includes/class-wordpoints-points-hooks.php:673 msgctxt "points type" msgid "Save" msgstr "" -#: components/points/includes/class-wordpoints-points-hooks.php:749 +#: components/points/includes/class-wordpoints-points-hooks.php:751 msgctxt "hook" msgid "Edit" msgstr "" -#: components/points/includes/class-wordpoints-points-hooks.php:750 +#: components/points/includes/class-wordpoints-points-hooks.php:752 msgctxt "hook" msgid "Add" msgstr "" -#: components/points/includes/class-wordpoints-points-hooks.php:777 +#: components/points/includes/class-wordpoints-points-hooks.php:779 #: components/ranks/admin/screens/ranks.php:124 msgid "Save" msgstr "" @@ -965,12 +965,12 @@ msgid "" "transactions performed by WordPoints are included in the logs." msgstr "" -#: components/points/includes/hooks/abstracts/post-type.php:240 +#: components/points/includes/hooks/abstracts/post-type.php:239 msgctxt "post title" msgid "(no title)" msgstr "" -#: components/points/includes/hooks/abstracts/post-type.php:296 +#: components/points/includes/hooks/abstracts/post-type.php:295 msgid "Select post type:" msgstr "" @@ -1092,78 +1092,78 @@ msgstr "" msgid "Revoke the points if the comment is removed." msgstr "" -#: components/points/includes/hooks/periodic.php:42 +#: components/points/includes/hooks/periodic.php:43 msgctxt "points hook name" msgid "Periodic Points" msgstr "" -#: components/points/includes/hooks/periodic.php:42 +#: components/points/includes/hooks/periodic.php:44 msgid "Visiting the site at least once in a given time period." msgstr "" -#: components/points/includes/hooks/periodic.php:134 +#: components/points/includes/hooks/periodic.php:137 msgctxt "points log description" msgid "Hourly points." msgstr "" -#: components/points/includes/hooks/periodic.php:138 +#: components/points/includes/hooks/periodic.php:141 msgctxt "points log description" msgid "Daily points." msgstr "" -#: components/points/includes/hooks/periodic.php:142 +#: components/points/includes/hooks/periodic.php:145 msgctxt "points log description" msgid "Weekly points." msgstr "" -#: components/points/includes/hooks/periodic.php:146 +#: components/points/includes/hooks/periodic.php:149 msgctxt "points log description" msgid "Monthly points." msgstr "" -#: components/points/includes/hooks/periodic.php:150 +#: components/points/includes/hooks/periodic.php:153 msgctxt "points log description" msgid "Periodic points." msgstr "" -#: components/points/includes/hooks/periodic.php:172 +#: components/points/includes/hooks/periodic.php:175 msgid "Visiting the site at least once in an hour." msgstr "" -#: components/points/includes/hooks/periodic.php:175 +#: components/points/includes/hooks/periodic.php:178 msgid "Visiting the site at least once in a day." msgstr "" -#: components/points/includes/hooks/periodic.php:178 +#: components/points/includes/hooks/periodic.php:181 msgid "Visiting the site at least once in a week." msgstr "" -#: components/points/includes/hooks/periodic.php:181 +#: components/points/includes/hooks/periodic.php:184 msgid "Visiting the site at least once in a month." msgstr "" -#: components/points/includes/hooks/periodic.php:184 +#: components/points/includes/hooks/periodic.php:187 msgid "Visiting the site periodically." msgstr "" -#: components/points/includes/hooks/periodic.php:238 +#: components/points/includes/hooks/periodic.php:241 msgctxt "length of time" msgid "Period:" msgstr "" -#: components/points/includes/hooks/periodic.php:259 +#: components/points/includes/hooks/periodic.php:262 msgid "hourly" msgstr "" -#: components/points/includes/hooks/periodic.php:260 +#: components/points/includes/hooks/periodic.php:263 msgid "daily" msgstr "" -#: components/points/includes/hooks/periodic.php:261 +#: components/points/includes/hooks/periodic.php:264 msgid "weekly" msgstr "" -#: components/points/includes/hooks/periodic.php:262 +#: components/points/includes/hooks/periodic.php:265 msgid "monthly" msgstr "" @@ -1227,26 +1227,27 @@ msgid "Post published." msgstr "" #. translators: %s is the name of a post type. +#. translators: the post type's name. #: components/points/includes/hooks/post.php:66 +#: components/points/includes/logs.php:703 msgctxt "points log description" msgid "%s deleted." msgstr "" #. translators: 1 is the post type name, 2 is the post title. #: components/points/includes/hooks/post.php:68 -#: components/points/includes/logs.php:703 msgctxt "points log description" msgid "%1$s “%2$s” deleted." msgstr "" #. translators: %s will be the post title. #: components/points/includes/hooks/post.php:70 -#: components/points/includes/logs.php:712 msgctxt "points log description" msgid "Post “%s” deleted." msgstr "" #: components/points/includes/hooks/post.php:71 +#: components/points/includes/logs.php:709 msgctxt "points log description" msgid "Post deleted." msgstr "" @@ -1302,7 +1303,7 @@ msgstr "" msgid "Search Logs" msgstr "" -#: components/points/includes/logs.php:519 +#: components/points/includes/logs.php:509 msgid "No matching logs found." msgstr "" @@ -1326,22 +1327,22 @@ msgctxt "points log description" msgid "Comment unapproved." msgstr "" -#: components/points/includes/points.php:963 +#: components/points/includes/points.php:954 msgctxt "points log" msgid "(no description)" msgstr "" -#: components/points/includes/points.php:1122 +#: components/points/includes/points.php:1114 msgctxt "top users table heading" msgid "Position" msgstr "" -#: components/points/includes/points.php:1123 +#: components/points/includes/points.php:1115 msgctxt "top users table heading" msgid "User" msgstr "" -#: components/points/includes/points.php:1124 +#: components/points/includes/points.php:1116 msgctxt "top users table heading" msgid "Points" msgstr "" @@ -1686,91 +1687,91 @@ msgid "" "%2$s" msgstr "" -#: includes/class-wordpoints-components.php:546 +#: includes/class-wordpoints-components.php:564 msgid "" "WordPoints detected a large network and has skipped part of the installation " "process for the “%s” component." msgstr "" -#: includes/class-wordpoints-components.php:549 +#: includes/class-wordpoints-components.php:567 msgid "" "WordPoints detected a large network and has skipped part of the update " "process for the “%s” component for version %s (and possibly " "later versions)." msgstr "" -#: includes/class-wordpoints-components.php:555 +#: includes/class-wordpoints-components.php:573 msgid "" "The rest of the process needs to be completed manually. If this has not been " "done already, some parts of the component may not function properly." msgstr "" -#: includes/functions.php:525 +#: includes/functions.php:576 msgctxt "post type" msgid "Any" msgstr "" -#: includes/functions.php:623 +#: includes/functions.php:676 msgid "Shortcode error:" msgstr "" -#: includes/functions.php:762 +#: includes/functions.php:815 msgctxt "component name" msgid "Points" msgstr "" -#: includes/functions.php:764 includes/functions.php:789 +#: includes/functions.php:817 includes/functions.php:842 msgctxt "component author" msgid "WordPoints" msgstr "" -#: includes/functions.php:767 +#: includes/functions.php:820 msgid "Enables a points system for your site." msgstr "" -#: includes/functions.php:787 +#: includes/functions.php:840 msgctxt "component name" msgid "Ranks" msgstr "" -#: includes/functions.php:792 +#: includes/functions.php:845 msgid "Assign users ranks based on their points levels." msgstr "" -#: includes/modules.php:473 +#: includes/modules.php:479 msgid "By %s." msgstr "" -#: includes/modules.php:632 +#: includes/modules.php:638 msgid "Invalid module path." msgstr "" -#: includes/modules.php:636 +#: includes/modules.php:642 msgid "Module file does not exist." msgstr "" -#: includes/modules.php:642 +#: includes/modules.php:648 msgid "The module does not have a valid header." msgstr "" -#: includes/modules.php:823 +#: includes/modules.php:829 msgid "The module generated unexpected output." msgstr "" -#: includes/modules.php:1000 +#: includes/modules.php:1006 msgid "Could not access filesystem." msgstr "" -#: includes/modules.php:1004 +#: includes/modules.php:1010 msgid "Filesystem error." msgstr "" -#: includes/modules.php:1011 +#: includes/modules.php:1017 msgid "Unable to locate WordPoints Module directory." msgstr "" #. translators: A module or list of modules. -#: includes/modules.php:1057 +#: includes/modules.php:1063 msgid "Could not fully remove the module %s." msgid_plural "Could not fully remove the modules %s." msgstr[0] "" From de92d6f0ea21f2fcdd53a480085af76cb1cef4c9 Mon Sep 17 00:00:00 2001 From: JDGrimes Date: Fri, 27 Feb 2015 16:38:25 -0500 Subject: [PATCH 60/65] Changelog for 1.10.0 --- src/readme.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/readme.txt b/src/readme.txt index 6a4f498c..98469cba 100644 --- a/src/readme.txt +++ b/src/readme.txt @@ -120,6 +120,13 @@ manage the ranks used on your site. == Changelog == += 1.10.0 — (~20 hrs) = +* Requires: WordPress 3.9+ +* Fixed: Current points values not being displayed beside inputs on profile screen. +* Fixed: The modules cache being preserved too long when using persistent caching. +* Fixed: Other caching issues on multisite. +* Updated: Numerous other small fixes and minor improvements. + = 1.9.2 — (~2 hrs) = * Fixed: A bug preventing updating a user's points from their admin profile when they don't have any points yet. @@ -253,6 +260,10 @@ choosing the points type to add it to. == Upgrade Notice == += 1.10.0 = +* This is a minor release which contains a few small improvements and several fixed +bugs. + = 1.9.2 = * Fixes a bug preventing a user's points from being updated on their admin profile if they have 0 points. From d0f9401494edd4b461f57264f48d7214dad06ad6 Mon Sep 17 00:00:00 2001 From: JDGrimes Date: Fri, 27 Feb 2015 16:48:55 -0500 Subject: [PATCH 61/65] Update WordPoints dev-lib --- dev-lib-wordpoints | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev-lib-wordpoints b/dev-lib-wordpoints index 0aae92e6..f08beabb 160000 --- a/dev-lib-wordpoints +++ b/dev-lib-wordpoints @@ -1 +1 @@ -Subproject commit 0aae92e6ad0dde21981f540b0b157e07be6db74c +Subproject commit f08beabb3730bf3a1387325e1c1c89f510a92122 From 80e4a0ff23c8a38d3c229a94da2364de5710e997 Mon Sep 17 00:00:00 2001 From: JDGrimes Date: Sat, 28 Feb 2015 12:04:08 -0500 Subject: [PATCH 62/65] Add note about modules to readme --- src/readme.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/readme.txt b/src/readme.txt index 98469cba..eb2a4299 100644 --- a/src/readme.txt +++ b/src/readme.txt @@ -44,6 +44,9 @@ The plugin also provides [several widgets](http://wordpoints.org/user-guide/widg More features are always being planned, and you can check out the roadmap on the plugin website, [WordPoints.org](http://wordpoints.org/roadmap/). +Also on the plugin's website, you can [browse the available extensions](http://wordpoints.org/modules/), +called "modules". We've just added [a module that imports from CubePoints to WordPoints](http://wordpoints.org/modules/importer/). + = Localization = WordPoints is fully localizable, and translations are already available in several From fa657d19cb91839940bc144d52455978ac42df8a Mon Sep 17 00:00:00 2001 From: JDGrimes Date: Sat, 28 Feb 2015 12:04:30 -0500 Subject: [PATCH 63/65] 1.10.0 --- src/includes/constants.php | 2 +- src/readme.txt | 4 ++-- src/wordpoints.php | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/includes/constants.php b/src/includes/constants.php index e0e69c5f..4dbc1055 100644 --- a/src/includes/constants.php +++ b/src/includes/constants.php @@ -16,7 +16,7 @@ * * @const WORDPOINTS_VERSION */ -define( 'WORDPOINTS_VERSION', '1.10.0-alpha' ); +define( 'WORDPOINTS_VERSION', '1.10.0' ); /** * The full path to the plugin's main directory. diff --git a/src/readme.txt b/src/readme.txt index eb2a4299..c8f16b8d 100644 --- a/src/readme.txt +++ b/src/readme.txt @@ -3,8 +3,8 @@ Contributors: jdgrimes Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=TPXS6B98HURLJ&lc=US&item_name=WordPoints&item_number=wordpressorg¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donate_LG%2egif%3aNonHosted Tags: points, awards, rewards, cubepoints, credits, gamify, multisite, ranks Requires at least: 3.9 -Tested up to: 4.2-alpha-31007 -Stable tag: 1.9.0 +Tested up to: 4.2-alpha-31546 +Stable tag: 1.10.0 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html diff --git a/src/wordpoints.php b/src/wordpoints.php index 6a5e2ca7..19f14574 100644 --- a/src/wordpoints.php +++ b/src/wordpoints.php @@ -4,7 +4,7 @@ * Plugin Name: WordPoints * Plugin URI: http://wordpoints.org/ * Description: Create one or more points systems for your site, and reward user activity. - * Version: 1.10.0-alpha + * Version: 1.10.0 * Author: J.D. Grimes * Author URI: http://codesymphony.co/ * License: GPLv2 @@ -40,7 +40,7 @@ * * @package WordPoints * @author J.D. Grimes - * @version 1.10.0-alpha + * @version 1.10.0 * @license http://opensource.org/licenses/gpl-license.php GPL, version 2 or later. * @copyright 2013-2015 J.D. Grimes */ From 05c0e595271a38f912c6076895d8df0d968b0965 Mon Sep 17 00:00:00 2001 From: JDGrimes Date: Sat, 28 Feb 2015 14:35:11 -0500 Subject: [PATCH 64/65] PHPUnit: Update a failing test See #288 --- tests/phpunit/tests/points/ajax/hooks.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/phpunit/tests/points/ajax/hooks.php b/tests/phpunit/tests/points/ajax/hooks.php index 78db656f..15099b5c 100644 --- a/tests/phpunit/tests/points/ajax/hooks.php +++ b/tests/phpunit/tests/points/ajax/hooks.php @@ -170,12 +170,10 @@ public function test_delete_hook() { try { $this->_handleAjax( 'save-wordpoints-points-hook' ); - } catch ( WPAjaxDieContinueException $e ) { - unset( $e ); + } catch ( WPAjaxDieStopException $e ) { + $this->assertEquals( 'deleted:' . $hook->get_id(), $e->getMessage() ); } - $this->assertEquals( 'deleted:' . $hook->get_id(), $this->_last_response ); - $hooks = WordPoints_Points_Hooks::get_points_type_hooks( 'points' ); $this->assertCount( 0, $hooks ); From a2c765a590caf54ccd037448dd0a0b88087e1a85 Mon Sep 17 00:00:00 2001 From: JDGrimes Date: Sat, 28 Feb 2015 15:04:27 -0500 Subject: [PATCH 65/65] Don't load l10n validator with composer The WordPoints dev-lib now does this automatically. --- composer.json | 4 +- composer.lock | 62 +-- tools/wp-l10n-validator/cache.json | 369 +++++++-------- tools/wp-l10n-validator/ignores-cache.json | 520 +++++++-------------- wp-l10n-validator.json | 2 +- 5 files changed, 332 insertions(+), 625 deletions(-) diff --git a/composer.json b/composer.json index 680a9555..9dbd3cad 100644 --- a/composer.json +++ b/composer.json @@ -3,8 +3,6 @@ "php": ">=5.2.0" }, "require-dev": { - "jdgrimes/wp-plugin-uninstall-tester": "~0.4", - "jdgrimes/wp-l10n-validator": "dev-master", - "wordpoints/l10n-validator-config": "~1.0" + "jdgrimes/wp-plugin-uninstall-tester": "~0.4" } } \ No newline at end of file diff --git a/composer.lock b/composer.lock index 0b6d6126..c431d39a 100644 --- a/composer.lock +++ b/composer.lock @@ -3,43 +3,9 @@ "This file locks the dependencies of your project to a known state", "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file" ], - "hash": "2b18cb53426361d7e85eedd5f7779053", + "hash": "e04a497fc9cee4a513a4aa41fb14c36a", "packages": [], "packages-dev": [ - { - "name": "jdgrimes/wp-l10n-validator", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/JDGrimes/wp-l10n-validator.git", - "reference": "28e32f54fdaf155268d48a83b26bb2c966cbdff7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/JDGrimes/wp-l10n-validator/zipball/28e32f54fdaf155268d48a83b26bb2c966cbdff7", - "reference": "28e32f54fdaf155268d48a83b26bb2c966cbdff7", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "J.D. Grimes", - "email": "jdg@codesymphony.co", - "homepage": "http://codesymphony.co", - "role": "Developer" - } - ], - "description": "Gettext localization validator for WordPress", - "homepage": "https://github.com/JDGrimes/wp-l10n-validator", - "time": "2015-01-07 20:43:54" - }, { "name": "jdgrimes/wp-plugin-uninstall-tester", "version": "0.4.2", @@ -73,35 +39,11 @@ "description": "Utilities for testing WordPress plugin install/uninstall with PHPUnit", "homepage": "https://github.com/JDGrimes/wp-plugin-uninstall-tester", "time": "2014-11-25 14:47:10" - }, - { - "name": "wordpoints/l10n-validator-config", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/WordPoints/l10n-validator-config.git", - "reference": "b5083fb51c17e3626b8f0279ff920d38f587971b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/WordPoints/l10n-validator-config/zipball/b5083fb51c17e3626b8f0279ff920d38f587971b", - "reference": "b5083fb51c17e3626b8f0279ff920d38f587971b", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "notification-url": "https://packagist.org/downloads/", - "description": "WordPoints-specific configuration for https://github.com/JDGrimes/wp-l10n-validator", - "time": "2015-01-07 22:32:10" } ], "aliases": [], "minimum-stability": "stable", - "stability-flags": { - "jdgrimes/wp-l10n-validator": 20 - }, + "stability-flags": [], "platform": { "php": ">=5.2.0" }, diff --git a/tools/wp-l10n-validator/cache.json b/tools/wp-l10n-validator/cache.json index 5ffe1b5b..ab7bf722 100644 --- a/tools/wp-l10n-validator/cache.json +++ b/tools/wp-l10n-validator/cache.json @@ -1,7 +1,7 @@ { "\/admin\/admin.php": { - "size": 16642, - "hash": "4c6c673e7d62daefa05bd228b5c329cf", + "size": 16992, + "hash": "592e49b3457bca6dd9870c3a2d23ce68", "errors": false }, "\/admin\/includes\/class-wordpoints-module-installer-skin.php": { @@ -15,8 +15,13 @@ "errors": false }, "\/admin\/includes\/class-wordpoints-modules-list-table.php": { - "size": 21942, - "hash": "a471c7d554773bf2468312043a4e312b", + "size": 21944, + "hash": "8895103b08ef01a6da3f830ac3fd7971", + "errors": false + }, + "\/admin\/includes\/deprecated.php": { + "size": 339, + "hash": "8eb0461e028c2bcad1e9281aa4d9df53", "errors": false }, "\/admin\/screens\/configure-components-load.php": { @@ -25,8 +30,13 @@ "errors": false }, "\/admin\/screens\/configure-components.php": { - "size": 5274, - "hash": "8b23b741c4770c5a9323b869dc1c8724", + "size": 5264, + "hash": "5a76e9a84b80036a791be3078918790a", + "errors": false + }, + "\/admin\/screens\/configure-settings-load.php": { + "size": 1100, + "hash": "cc791be8c2d13d6daad4c8d8406ea79e", "errors": false }, "\/admin\/screens\/configure-settings.php": { @@ -45,23 +55,33 @@ "errors": false }, "\/admin\/screens\/modules-load.php": { - "size": 16667, - "hash": "b07c9245c3c178a1f68197d405d5c398", + "size": 16981, + "hash": "c3a558cdbdc2fd79d090acf8dbf59674", "errors": false }, "\/admin\/screens\/modules.php": { - "size": 4719, - "hash": "4218b9dfdb6348095fcce1787c90a2de", + "size": 4724, + "hash": "7c4679182a848fe41c63d89570cd29d7", "errors": false }, - "\/components\/index.php": { - "size": 27, - "hash": "a3f720aa8693dbbf2c538fde4dc7b2b1", + "\/components\/points\/admin\/admin.php": { + "size": 13692, + "hash": "31102cdcdf8ae9673f122a466825806a", "errors": false }, - "\/components\/points\/admin\/admin.php": { - "size": 13667, - "hash": "a375d0d7ec7ab33fcba902d4d56b114f", + "\/components\/points\/admin\/includes\/ajax.php": { + "size": 7490, + "hash": "65c9fd47d508ad07993ae16129851885", + "errors": false + }, + "\/components\/points\/admin\/screens\/hooks-load.php": { + "size": 3308, + "hash": "ffb14b46b096a39ab611777f30d85879", + "errors": false + }, + "\/components\/points\/admin\/screens\/hooks-no-js-load.php": { + "size": 3302, + "hash": "ca1ebf1d9bdbab057d36ae91bfe3f980", "errors": false }, "\/components\/points\/admin\/screens\/hooks-no-js.php": { @@ -79,134 +99,29 @@ "hash": "11a06a64286b667f82708cccea4e72cd", "errors": false }, + "\/components\/points\/includes\/class-un-installer.php": { + "size": 22349, + "hash": "cdd240190dae32ec7a82f5de20bec947", + "errors": false + }, "\/components\/points\/includes\/class-wordpoints-points-hook.php": { "size": 21968, "hash": "f73011b5d623c7a10e979dcc86f9f672", "errors": false }, "\/components\/points\/includes\/class-wordpoints-points-hooks.php": { - "size": 24489, - "hash": "efd605b2fc001a6b7d153591544ab80e", + "size": 24528, + "hash": "cae6fd995aaa29ef52cbf5a8b9c12694", "errors": false }, "\/components\/points\/includes\/class-wordpoints-points-logs-query.php": { "size": 31412, - "hash": "db6bee3b812b8b6c2473efc34d64f783", - "errors": false - }, - "\/components\/points\/includes\/functions.php": { - "size": 8299, - "hash": "302e437518df025e29d317285cf6354d", - "errors": false - }, - "\/components\/points\/includes\/hooks.php": { - "size": 1042, - "hash": "59d283d8b74b37a375bb87ffda70642e", - "errors": false - }, - "\/components\/points\/includes\/index.php": { - "size": 28, - "hash": "f2dd0b74d953dcd2f078efd9dbe74330", - "errors": false - }, - "\/components\/points\/includes\/logs.php": { - "size": 21321, - "hash": "34895e5b190f88a7e78d72c87ec61639", - "errors": false - }, - "\/components\/points\/includes\/shortcodes.php": { - "size": 8393, - "hash": "b8b0a2349f9e4ef86c7dcf3da65a3a74", - "errors": false - }, - "\/components\/points\/includes\/widgets.php": { - "size": 16582, - "hash": "79e3dd77e6df2f7690531c23b7648bbd", - "errors": false - }, - "\/components\/points\/index.php": { - "size": 22, - "hash": "fc4cdc7613c06325a1358fbb1820097c", - "errors": false - }, - "\/components\/points\/install.php": { - "size": 394, - "hash": "4af2a50bfe0d790977ea8cc7181b273a", - "errors": false - }, - "\/components\/points\/points.php": { - "size": 3015, - "hash": "938923abe55f0d9b42ad2c15b2765ce4", - "errors": false - }, - "\/components\/points\/uninstall.php": { - "size": 147, - "hash": "56552a47dceb1ea6529ba0163d73d67d", - "errors": false - }, - "\/includes\/class-wordpoints-components.php": { - "size": 14682, - "hash": "bebd58d482994b6361c30c44b0d4b417", - "errors": false - }, - "\/includes\/deprecated.php": { - "size": 11243, - "hash": "d596efc6bd6d554fdf369db66b59d870", - "errors": false - }, - "\/includes\/functions.php": { - "size": 22141, - "hash": "7a312d4261121eb536a96b5279c8b3b3", - "errors": false - }, - "\/includes\/index.php": { - "size": 26, - "hash": "e93b6d5dfa6f6f47bd719928d65d85c5", - "errors": false - }, - "\/includes\/modules.php": { - "size": 33664, - "hash": "a78a087a7194253be092b7b8aaca57a8", - "errors": false - }, - "\/includes\/scripts.php": { - "size": 1403, - "hash": "7ac6252eacd03211fc7dbb910e888f29", - "errors": false - }, - "\/index.php": { - "size": 33, - "hash": "9f94aa1d201d265aaade64c225a656b1", - "errors": false - }, - "\/install.php": { - "size": 243, - "hash": "763323680611d8d99eb982e62075beb4", - "errors": false - }, - "\/uninstall.php": { - "size": 498, - "hash": "35915582c6a9f8d93298324711d4327e", - "errors": false - }, - "\/wordpoints.php": { - "size": 5159, - "hash": "f30f4f63391d548f0394571274e09381", - "errors": false - }, - "\/components\/points\/admin\/includes\/ajax.php": { - "size": 6921, - "hash": "0f024f3ad1aa67b6481ef91b2186896a", - "errors": false - }, - "\/components\/points\/admin\/screens\/hooks-load.php": { - "size": 3308, - "hash": "ffb14b46b096a39ab611777f30d85879", + "hash": "c089e5a5d9cfcf24d04795a22a751e94", "errors": false }, - "\/components\/points\/admin\/screens\/hooks-no-js-load.php": { - "size": 3302, - "hash": "ca1ebf1d9bdbab057d36ae91bfe3f980", + "\/components\/points\/includes\/constants.php": { + "size": 308, + "hash": "89f0fd2a543a04443cb6d11442c69dda", "errors": false }, "\/components\/points\/includes\/deprecated.php": { @@ -214,24 +129,29 @@ "hash": "60cf40bff1741f84fa2535c72b797a3f", "errors": false }, - "\/includes\/constants.php": { - "size": 647, - "hash": "331c2362e63a618ee91c1b6971ba5010", + "\/components\/points\/includes\/functions.php": { + "size": 8525, + "hash": "cc2cd6c3a4293152fd8ce594421f4fc9", "errors": false }, - "\/components\/points\/includes\/update.php": { - "size": 11881, - "hash": "1753c05d31aaaad858db2819ad4dba9b", + "\/components\/points\/includes\/hooks\/abstracts\/comment-approved.php": { + "size": 9420, + "hash": "1a681d23c1387be3940507054739e59c", "errors": false }, - "\/includes\/update.php": { - "size": 769, - "hash": "507b3392245feee8425e0d8d6fae6c20", + "\/components\/points\/includes\/hooks\/abstracts\/post-type.php": { + "size": 10558, + "hash": "0c85c54291269424b3f8195b99df6067", + "errors": false + }, + "\/components\/points\/includes\/hooks\/comment-received.php": { + "size": 2335, + "hash": "810a243313f4eff732ee5d91bffc5909", "errors": false }, "\/components\/points\/includes\/hooks\/comment-removed.php": { - "size": 4967, - "hash": "c73ab375085815e859fbee0b61933952", + "size": 4966, + "hash": "5e0482b3f5b2f1b704b99a005b2a7c4d", "errors": false }, "\/components\/points\/includes\/hooks\/comment.php": { @@ -240,48 +160,63 @@ "errors": false }, "\/components\/points\/includes\/hooks\/periodic.php": { - "size": 6852, - "hash": "ca1aeee2b499d1374987f7bf729a3c99", + "size": 6860, + "hash": "a1b98f63b3813e90aeec4297e9574b81", "errors": false }, "\/components\/points\/includes\/hooks\/post-delete.php": { - "size": 3363, - "hash": "a9f5a6cf67ca4c88f255d45ecde3675b", + "size": 3362, + "hash": "d8eb4c9c8965e154722ed7248bb8e51f", "errors": false }, "\/components\/points\/includes\/hooks\/post.php": { - "size": 7575, - "hash": "ae00a3576cdcb2f8acb411c40a183c99", + "size": 7574, + "hash": "46de3a7811f7973b08a724c37211b56a", "errors": false }, "\/components\/points\/includes\/hooks\/registration.php": { - "size": 1892, - "hash": "59b66597353ee9a182a01b8593b42147", + "size": 1891, + "hash": "804f2f513ff3a0570d3dcbec8dccba73", "errors": false }, - "\/admin\/screens\/configure-settings-load.php": { - "size": 1100, - "hash": "cc791be8c2d13d6daad4c8d8406ea79e", + "\/components\/points\/includes\/hooks.php": { + "size": 1042, + "hash": "59d283d8b74b37a375bb87ffda70642e", "errors": false }, - "\/components\/points\/includes\/hooks\/abstracts\/post-type.php": { - "size": 10611, - "hash": "22beb19a27b421301dc2e94c854cd740", + "\/components\/points\/includes\/logs.php": { + "size": 21135, + "hash": "5d660e1ff5317c8d0e04e8201054926e", "errors": false }, - "\/admin\/includes\/deprecated.php": { - "size": 339, - "hash": "8eb0461e028c2bcad1e9281aa4d9df53", + "\/components\/points\/includes\/points.php": { + "size": 35597, + "hash": "7418f20be13c1232022e1ab1fff1eb64", "errors": false }, - "\/components\/points\/includes\/constants.php": { - "size": 308, - "hash": "89f0fd2a543a04443cb6d11442c69dda", + "\/components\/points\/includes\/shortcodes.php": { + "size": 8393, + "hash": "b8b0a2349f9e4ef86c7dcf3da65a3a74", "errors": false }, - "\/components\/points\/includes\/points.php": { - "size": 35652, - "hash": "044fdacb4dd7f8acb30cd861fec253f9", + "\/components\/points\/includes\/widgets.php": { + "size": 16598, + "hash": "f32f0508ba75b923ea3f7824c2507a42", + "errors": false + }, + "\/components\/points\/install.php": { + "size": 394, + "hash": "4af2a50bfe0d790977ea8cc7181b273a", + "errors": false + }, + "\/components\/points\/points.php": { + "size": 3015, + "hash": "938923abe55f0d9b42ad2c15b2765ce4", + "errors": false + }, + "\/components\/points\/uninstall.php": { + "size": 147, + "hash": "56552a47dceb1ea6529ba0163d73d67d", "errors": false }, "\/components\/ranks\/admin\/admin.php": { @@ -299,19 +234,24 @@ "hash": "25ab447d4809235c805a8ab37e4d9347", "errors": false }, + "\/components\/ranks\/includes\/class-un-installer.php": { + "size": 2482, + "hash": "4dbe09f394361165f9ac44e0ebf56b7c", + "errors": false + }, "\/components\/ranks\/includes\/class-wordpoints-rank-group.php": { "size": 10892, "hash": "cb05a4d06d7184ec97b09dbc76300f1b", "errors": false }, "\/components\/ranks\/includes\/class-wordpoints-rank-groups.php": { - "size": 4355, - "hash": "fe2cf46188e3b792aaf07bacef5e8272", + "size": 4305, + "hash": "71a66264f07a54735624248feb319140", "errors": false }, "\/components\/ranks\/includes\/class-wordpoints-rank-type.php": { - "size": 8631, - "hash": "3f1e8c218c3ea0cceeada3e93b8e7834", + "size": 9016, + "hash": "d36a10fdca8c83ddb26f6c4dcb611dda", "errors": false }, "\/components\/ranks\/includes\/class-wordpoints-rank-types.php": { @@ -329,6 +269,11 @@ "hash": "46189156c9713b8da0020140d0800231", "errors": false }, + "\/components\/ranks\/includes\/deprecated.php": { + "size": 666, + "hash": "16945f69526feb24e66f314b1f9173bf", + "errors": false + }, "\/components\/ranks\/includes\/functions.php": { "size": 1314, "hash": "42cdbcf83d635860bbc332196ed589dc", @@ -359,9 +304,9 @@ "hash": "6583c78c26b1e1e84a2ea9d40efadaf4", "errors": false }, - "\/components\/ranks\/index.php": { - "size": 20, - "hash": "934b3e85adf4c88780aeefcee899aa1b", + "\/components\/ranks\/includes\/shortcodes.php": { + "size": 1236, + "hash": "f0298e91f9f3627209e061b00e6aafdf", "errors": false }, "\/components\/ranks\/install.php": { @@ -379,14 +324,14 @@ "hash": "b327d9c19b5b1c7dfb1a6f8b10c54d53", "errors": false }, - "\/includes\/uninstall-bootstrap.php": { - "size": 365, - "hash": "eb1d53accfa1baaddc0dcfcf60ed3065", + "\/includes\/class-shortcode.php": { + "size": 8132, + "hash": "f1fc7c7b8d5bc55919f1ff7fb713c758", "errors": false }, "\/includes\/class-un-installer-base.php": { - "size": 11882, - "hash": "2b976c8776b48f24d4223758ff05c54f", + "size": 11881, + "hash": "e53cb50fe6b81e87b645d50fd89487ee", "errors": false }, "\/includes\/class-un-installer.php": { @@ -394,44 +339,64 @@ "hash": "fc1cc532de7dfd5b86cc1c86c572047d", "errors": false }, - "\/components\/points\/includes\/class-un-installer.php": { - "size": 21098, - "hash": "4893721f4fbd66f2759db0a835a96d54", + "\/includes\/class-widget.php": { + "size": 4256, + "hash": "e1f4cca75c3f285efde108e98fc859cc", "errors": false }, - "\/components\/ranks\/includes\/class-un-installer.php": { - "size": 2482, - "hash": "4dbe09f394361165f9ac44e0ebf56b7c", + "\/includes\/class-wordpoints-components.php": { + "size": 15054, + "hash": "cae5aa64a9076a575e3090a620770155", "errors": false }, - "\/components\/ranks\/includes\/deprecated.php": { - "size": 666, - "hash": "16945f69526feb24e66f314b1f9173bf", + "\/includes\/constants.php": { + "size": 640, + "hash": "ab580fd600021b52e7ebde17995ab736", "errors": false }, - "\/components\/points\/includes\/hooks\/abstracts\/comment-approved.php": { - "size": 9420, - "hash": "1a681d23c1387be3940507054739e59c", + "\/includes\/deprecated.php": { + "size": 11243, + "hash": "d596efc6bd6d554fdf369db66b59d870", "errors": false }, - "\/components\/points\/includes\/hooks\/comment-received.php": { - "size": 2335, - "hash": "810a243313f4eff732ee5d91bffc5909", + "\/includes\/functions.php": { + "size": 23666, + "hash": "60d678bd86014057f890f741af5ed395", "errors": false }, - "\/components\/ranks\/includes\/shortcodes.php": { - "size": 1236, - "hash": "f0298e91f9f3627209e061b00e6aafdf", + "\/includes\/modules.php": { + "size": 33969, + "hash": "67b9531d5cbcb4eba41ecb54329c8461", "errors": false }, - "\/includes\/class-shortcode.php": { - "size": 8132, - "hash": "f1fc7c7b8d5bc55919f1ff7fb713c758", + "\/includes\/scripts.php": { + "size": 1403, + "hash": "7ac6252eacd03211fc7dbb910e888f29", "errors": false }, - "\/includes\/class-widget.php": { - "size": 4256, - "hash": "e1f4cca75c3f285efde108e98fc859cc", + "\/includes\/uninstall-bootstrap.php": { + "size": 365, + "hash": "eb1d53accfa1baaddc0dcfcf60ed3065", + "errors": false + }, + "\/includes\/update.php": { + "size": 769, + "hash": "507b3392245feee8425e0d8d6fae6c20", + "errors": false + }, + "\/install.php": { + "size": 243, + "hash": "763323680611d8d99eb982e62075beb4", + "errors": false + }, + "\/uninstall.php": { + "size": 498, + "hash": "35915582c6a9f8d93298324711d4327e", + "errors": false + }, + "\/wordpoints.php": { + "size": 5145, + "hash": "604f66584697dba68e0c6fbd25d2294f", "errors": false } } \ No newline at end of file diff --git a/tools/wp-l10n-validator/ignores-cache.json b/tools/wp-l10n-validator/ignores-cache.json index 2d4e2097..b4197319 100644 --- a/tools/wp-l10n-validator/ignores-cache.json +++ b/tools/wp-l10n-validator/ignores-cache.json @@ -1,13 +1,24 @@ { "\/components\/points\/includes\/class-un-installer.php": { "network": { - "494": false + "495": false, + "724": false }, "standard": { - "497": false + "498": false, + "727": false }, "post": { - "733": false + "734": false + }, + "EXISTS": { + "841": { + "name": "array", + "type": "unknown", + "args_started": true, + "arg_count": 1, + "parentheses": 1 + } } }, "\/components\/points\/install.php": { @@ -59,7 +70,7 @@ }, "\/admin\/admin.php": { "upload": { - "409": { + "421": { "name": "array", "type": "unknown", "args_started": true, @@ -73,42 +84,50 @@ "22": false } }, - "upload": { - "409": { - "name": "array", - "type": "unknown", - "args_started": true, - "arg_count": 3, - "parentheses": 1 - } - }, - "network": { - "482": false, - "490": false, - "387": false, - "459": false, - "518": false, - "553": false, - "723": false, - "394": false, - "466": false, - "525": false, - "560": false - }, - "standard": { - "484": false, - "493": false, - "389": false, - "461": false, - "520": false, - "555": false, - "726": false, - "396": false, - "468": false, - "527": false, - "562": false - }, "\/admin\/includes\/class-wordpoints-modules-list-table.php": { + "all": { + "57": false, + "216": false + }, + "active": { + "59": { + "name": "array", + "type": "unknown", + "args_started": true, + "arg_count": 0, + "parentheses": 1 + }, + "514": false + }, + "inactive": { + "59": { + "name": "array", + "type": "unknown", + "args_started": true, + "arg_count": 1, + "parentheses": 1 + }, + "514": false + }, + "search": { + "59": { + "name": "array", + "type": "unknown", + "args_started": true, + "arg_count": 3, + "parentheses": 1 + }, + "187": false + }, + "plugins": { + "91": { + "name": "array", + "type": "unknown", + "args_started": true, + "arg_count": 2, + "parentheses": 1 + } + }, "second module-version-author-uri\">": { "574": false }, @@ -118,10 +137,10 @@ }, "\/admin\/screens\/configure-components.php": { "deactivate": { - "109": false + "102": false }, "activate": { - "114": false + "107": false } }, "\/admin\/screens\/modules-load.php": { @@ -129,13 +148,13 @@ "13": false }, "1": { - "380": false + "394": false }, "delete-selected": { - "380": false + "394": false }, "compatibility-problems": { - "453": { + "463": { "name": "array", "type": "unknown", "args_started": true, @@ -165,16 +184,16 @@ }, "\/components\/points\/includes\/class-wordpoints-points-hook.php": { "network": { - "370": false, - "442": false, - "501": false, - "536": false + "394": false, + "466": false, + "525": false, + "560": false }, "standard": { - "372": false, - "444": false, - "503": false, - "538": false + "396": false, + "468": false, + "527": false, + "562": false } }, "\/components\/points\/includes\/class-wordpoints-points-hooks.php": { @@ -200,10 +219,10 @@ "434": false }, ":": { - "594": false + "596": false }, "points-": { - "669": { + "673": { "name": "array", "type": "unknown", "args_started": true, @@ -212,7 +231,7 @@ } }, "-save": { - "669": { + "673": { "name": "array", "type": "unknown", "args_started": true, @@ -221,10 +240,10 @@ } }, "\" class=\"hook": { - "742": false + "746": false }, "-savehook": { - "775": { + "779": { "name": "array", "type": "unknown", "args_started": true, @@ -235,7 +254,6 @@ }, "\/components\/points\/includes\/hooks\/abstracts\/comment-approved.php": { "approved": { - "152": false, "159": false }, "new": { @@ -244,7 +262,7 @@ }, "\/components\/points\/includes\/logs.php": { "points": { - "256": { + "255": { "name": "array", "type": "unknown", "args_started": true, @@ -253,7 +271,7 @@ } }, "text": { - "256": { + "255": { "name": "array", "type": "unknown", "args_started": true, @@ -262,7 +280,7 @@ } }, "date": { - "256": { + "255": { "name": "array", "type": "unknown", "args_started": true, @@ -284,7 +302,7 @@ }, "\/components\/points\/includes\/shortcodes.php": { "default": { - "154": { + "159": { "name": "array", "type": "unknown", "args_started": true, @@ -303,26 +321,20 @@ "parentheses": 1 } }, + ": %points%": { + "158": false + }, "1": { "425": false, "550": false } }, "\/includes\/functions.php": { - "get": { - "135": { - "name": "wordpoints_verify_nonce", - "type": "unknown", - "args_started": true, - "arg_count": 3, - "parentheses": 1 - } - }, "-1": { - "467": false + "518": false }, "points": { - "761": { + "814": { "name": "array", "type": "unknown", "args_started": true, @@ -331,7 +343,7 @@ } }, "ranks": { - "786": { + "839": { "name": "array", "type": "unknown", "args_started": true, @@ -340,71 +352,6 @@ } } }, - "0": { - "388": false - }, - "delete-selected": { - "388": false, - "394": false - }, - "compatibility-problems": { - "457": { - "name": "array", - "type": "unknown", - "args_started": true, - "arg_count": 0, - "parentheses": 1 - }, - "463": { - "name": "array", - "type": "unknown", - "args_started": true, - "arg_count": 0, - "parentheses": 1 - } - }, - "points-": { - "671": { - "name": "array", - "type": "unknown", - "args_started": true, - "arg_count": 0, - "parentheses": 1 - } - }, - "-save": { - "671": { - "name": "array", - "type": "unknown", - "args_started": true, - "arg_count": 0, - "parentheses": 1 - } - }, - "\" class=\"hook": { - "744": false - }, - "-savehook": { - "777": { - "name": "array", - "type": "unknown", - "args_started": true, - "arg_count": 0, - "parentheses": 1 - } - }, - "default": { - "159": { - "name": "array", - "type": "unknown", - "args_started": true, - "arg_count": 1, - "parentheses": 1 - } - }, - ": %points%": { - "158": false - }, "\/admin\/screens\/modules.php": { "module": { "34": { @@ -457,7 +404,7 @@ }, "\/components\/points\/includes\/hooks\/comment-removed.php": { "approved": { - "133": false + "136": false } }, "\/components\/ranks\/admin\/includes\/ajax.php": { @@ -473,7 +420,7 @@ }, "\/includes\/modules.php": { "Module Name": { - "391": { + "392": { "name": "array", "type": "unknown", "args_started": true, @@ -482,7 +429,7 @@ } }, "Module URI": { - "392": { + "393": { "name": "array", "type": "unknown", "args_started": true, @@ -491,7 +438,7 @@ } }, "Version": { - "393": { + "394": { "name": "array", "type": "unknown", "args_started": true, @@ -500,7 +447,7 @@ } }, "Description": { - "394": { + "395": { "name": "array", "type": "unknown", "args_started": true, @@ -509,7 +456,7 @@ } }, "Author": { - "395": { + "396": { "name": "array", "type": "unknown", "args_started": true, @@ -518,7 +465,7 @@ } }, "Author URI": { - "396": { + "397": { "name": "array", "type": "unknown", "args_started": true, @@ -527,7 +474,7 @@ } }, "Text Domain": { - "397": { + "398": { "name": "array", "type": "unknown", "args_started": true, @@ -536,7 +483,7 @@ } }, "Domain Path": { - "398": { + "399": { "name": "array", "type": "unknown", "args_started": true, @@ -545,7 +492,7 @@ } }, "Network": { - "399": { + "400": { "name": "array", "type": "unknown", "args_started": true, @@ -554,7 +501,7 @@ } }, "Update API": { - "400": { + "401": { "name": "array", "type": "unknown", "args_started": true, @@ -562,8 +509,8 @@ "parentheses": 1 } }, - "ID": { - "401": { + "Channel": { + "402": { "name": "array", "type": "unknown", "args_started": true, @@ -571,51 +518,17 @@ "parentheses": 1 } }, - "true": { - "406": false - } - }, - "second module-version-author-uri\">": { - "552": false - }, - "column-": { - "601": false - }, - "1": { - "394": false - }, - "module": { - "36": { - "name": "array", - "type": "unknown", - "args_started": true, - "arg_count": 0, - "parentheses": 1 - } - }, - "points": { - "775": { - "name": "array", - "type": "unknown", - "args_started": true, - "arg_count": 0, - "parentheses": 1 + "ID": { + "403": { + "name": "array", + "type": "unknown", + "args_started": true, + "arg_count": 11, + "parentheses": 1 + } }, - "255": { - "name": "array", - "type": "unknown", - "args_started": true, - "arg_count": 2, - "parentheses": 1 - } - }, - "ranks": { - "800": { - "name": "array", - "type": "unknown", - "args_started": true, - "arg_count": 0, - "parentheses": 1 + "true": { + "412": false } }, "\/components\/points\/includes\/hooks\/periodic.php": { @@ -629,7 +542,7 @@ } }, "widefat wordpoints-append-to-hook-title": { - "228": { + "231": { "name": "array", "type": "unknown", "args_started": true, @@ -640,40 +553,21 @@ }, "\/components\/ranks\/includes\/class-wordpoints-rank-type.php": { "value=\"<% if ( typeof": { - "212": false + "220": false }, "!== \"undefined\" ) { print(": { - "212": false + "220": false }, "); } %>\"": { - "212": false + "220": false }, "value=\"": { - "214": false + "222": false }, "class=\"widefat\"\n\t\t\t\t\t\/>": { - "216": false - } - }, - "text": { - "255": { - "name": "array", - "type": "unknown", - "args_started": true, - "arg_count": 5, - "parentheses": 1 + "224": false } }, - "date": { - "255": { - "name": "array", - "type": "unknown", - "args_started": true, - "arg_count": 6, - "parentheses": 1 - }, - "617": false - }, "\/components\/points\/includes\/class-wordpoints-points-logs-query.php": { "text": { "41": { @@ -708,7 +602,7 @@ "arg_count": 3, "parentheses": 1 }, - "601": false + "617": false }, "all": { "238": { @@ -736,7 +630,7 @@ } }, "results": { - "375": { + "391": { "name": "array", "type": "unknown", "args_started": true, @@ -745,7 +639,7 @@ } }, "row": { - "375": { + "391": { "name": "array", "type": "unknown", "args_started": true, @@ -754,7 +648,7 @@ } }, "col": { - "375": { + "391": { "name": "array", "type": "unknown", "args_started": true, @@ -763,7 +657,7 @@ } }, "var": { - "375": { + "391": { "name": "array", "type": "unknown", "args_started": true, @@ -775,7 +669,7 @@ "645": false }, "<": { - "879": { + "895": { "name": "array", "type": "unknown", "args_started": true, @@ -784,130 +678,18 @@ } }, ",": { - "1001": false + "1017": false }, "CAST(": { "1034": false }, ".meta_value AS": { - "1034": false + "1050": false }, "ORDER BY": { "1047": false } }, - "results": { - "391": { - "name": "array", - "type": "unknown", - "args_started": true, - "arg_count": 0, - "parentheses": 1 - } - }, - "row": { - "391": { - "name": "array", - "type": "unknown", - "args_started": true, - "arg_count": 1, - "parentheses": 1 - } - }, - "col": { - "391": { - "name": "array", - "type": "unknown", - "args_started": true, - "arg_count": 2, - "parentheses": 1 - } - }, - "var": { - "391": { - "name": "array", - "type": "unknown", - "args_started": true, - "arg_count": 3, - "parentheses": 1 - } - }, - "FROM `": { - "661": false - }, - "<": { - "895": { - "name": "array", - "type": "unknown", - "args_started": true, - "arg_count": 1, - "parentheses": 1 - } - }, - "LIKE": { - "909": { - "name": "array", - "type": "unknown", - "args_started": true, - "arg_count": 3, - "parentheses": 1 - } - }, - ",": { - "1017": false - }, - "CAST(": { - "1050": false - }, - ".meta_value AS": { - "1050": false - }, - "ORDER BY": { - "1063": false - }, - "all": { - "57": false, - "216": false - }, - "active": { - "59": { - "name": "array", - "type": "unknown", - "args_started": true, - "arg_count": 0, - "parentheses": 1 - }, - "514": false - }, - "inactive": { - "59": { - "name": "array", - "type": "unknown", - "args_started": true, - "arg_count": 1, - "parentheses": 1 - }, - "514": false - }, - "search": { - "59": { - "name": "array", - "type": "unknown", - "args_started": true, - "arg_count": 3, - "parentheses": 1 - }, - "187": false - }, - "plugins": { - "91": { - "name": "array", - "type": "unknown", - "args_started": true, - "arg_count": 2, - "parentheses": 1 - } - }, "\/components\/ranks\/admin\/screens\/ranks.php": { "name": { "30": { @@ -951,13 +733,6 @@ } }, "points": { - "102": { - "name": "array", - "type": "unknown", - "args_started": true, - "arg_count": 0, - "parentheses": 1 - }, "123": { "name": "array", "type": "unknown", @@ -978,15 +753,6 @@ } } }, - "approved": { - "167": false, - "174": false, - "136": false, - "159": false - }, - "new": { - "168": false - }, "\/components\/points\/includes\/hooks\/abstracts\/post-type.php": { "see bug #23268 (fixed in 3.9)": { "120": { @@ -998,10 +764,10 @@ } }, "\" type=\"checkbox\" value=\"1\"": { - "324": false + "323": false }, "1": { - "324": { + "323": { "name": "checked", "type": "unknown", "args_started": true, @@ -1009,5 +775,41 @@ "parentheses": 1 } } + }, + "\/admin\/includes\/class-wordpoints-module-installer-skin.php": { + "upload": { + "56": { + "name": "array", + "type": "unknown", + "args_started": true, + "arg_count": 0, + "parentheses": 1 + } + } + }, + "\/admin\/screens\/module-install.php": { + "upload": { + "13": false + } + }, + "\/components\/ranks\/admin\/admin.php": { + "adding-editing": { + "116": { + "name": "array", + "type": "unknown", + "args_started": true, + "arg_count": 0, + "parentheses": 1 + } + }, + "deleting": { + "127": { + "name": "array", + "type": "unknown", + "args_started": true, + "arg_count": 0, + "parentheses": 1 + } + } } } \ No newline at end of file diff --git a/wp-l10n-validator.json b/wp-l10n-validator.json index 6f36fc93..fbc44e40 100644 --- a/wp-l10n-validator.json +++ b/wp-l10n-validator.json @@ -1,7 +1,7 @@ { "textdomain": { "wordpoints": true, "default": true }, "basedir": "./src", - "bootstrap": "vendor/wordpoints/l10n-validator-config/bootstrap.php", + "bootstrap": "dev-lib-wordpoints/l10n-validator/bootstrap.php", "cache": "./tools/wp-l10n-validator/cache.json", "ignores-cache": "./tools/wp-l10n-validator/ignores-cache.json", "ignores-tolerance": 25,