Changeset 3450401
- Timestamp:
- 01/30/2026 12:05:35 PM (5 weeks ago)
- Location:
- civicrm-wp-member-sync/trunk
- Files:
-
- 13 edited
-
assets/templates/list_caps.php (modified) (1 diff)
-
assets/templates/list_roles.php (modified) (1 diff)
-
assets/templates/manual-sync.php (modified) (1 diff)
-
assets/templates/rule-cap-add.php (modified) (1 diff)
-
assets/templates/rule-cap-edit.php (modified) (1 diff)
-
assets/templates/rule-role-add.php (modified) (1 diff)
-
assets/templates/rule-role-edit.php (modified) (1 diff)
-
assets/templates/settings.php (modified) (4 diffs)
-
civicrm-wp-member-sync.php (modified) (2 diffs)
-
includes/civi-wp-ms-admin-cau.php (modified) (4 diffs)
-
includes/civi-wp-ms-admin.php (modified) (1 diff)
-
languages/civicrm-wp-member-sync.pot (modified) (12 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
civicrm-wp-member-sync/trunk/assets/templates/list_caps.php
r3071750 r3450401 219 219 <?php if ( ! empty( $data ) ) : ?> 220 220 221 <form method="post" id="civi_wp_member_sync_rules_form" action="<?php echo $this->admin_form_url_get(); ?>">221 <form method="post" id="civi_wp_member_sync_rules_form" action="<?php echo esc_url( $this->admin_form_url_get() ); ?>"> 222 222 223 223 <?php wp_nonce_field( 'civi_wp_member_sync_rule_action', 'civi_wp_member_sync_nonce' ); ?> -
civicrm-wp-member-sync/trunk/assets/templates/list_roles.php
r3071750 r3450401 208 208 <?php if ( ! empty( $data ) ) : ?> 209 209 210 <form method="post" id="civi_wp_member_sync_rules_form" action="<?php echo $this->admin_form_url_get(); ?>">210 <form method="post" id="civi_wp_member_sync_rules_form" action="<?php echo esc_url( $this->admin_form_url_get() ); ?>"> 211 211 212 212 <?php wp_nonce_field( 'civi_wp_member_sync_rule_action', 'civi_wp_member_sync_nonce' ); ?> -
civicrm-wp-member-sync/trunk/assets/templates/manual-sync.php
r3071750 r3450401 46 46 <p><?php esc_html_e( 'Note: if no association rules exist then no synchronization will take place.', 'civicrm-wp-member-sync' ); ?></p> 47 47 48 <form method="post" id="civi_wp_member_sync_manual_sync_form" action="<?php echo $this->admin_form_url_get(); ?>">48 <form method="post" id="civi_wp_member_sync_manual_sync_form" action="<?php echo esc_url( $this->admin_form_url_get() ); ?>"> 49 49 50 50 <?php wp_nonce_field( 'civi_wp_member_sync_manual_sync_action', 'civi_wp_member_sync_nonce' ); ?> -
civicrm-wp-member-sync/trunk/assets/templates/rule-cap-add.php
r3147667 r3450401 40 40 <p><?php esc_html_e( 'An additional Membership Status Capability will also be added to the WordPress User that is tied to the status of their Membership. This Capability will be of the form "civimember_ID_NUM", where "ID" is the numeric ID of the Membership Type and "NUM" is the numeric ID of the Membership Status. So, for Membership Type 2 with Membership Status 4, the Capability will be "civimember_2_4".', 'civicrm-wp-member-sync' ); ?></p> 41 41 42 <form method="post" id="civi_wp_member_sync_rules_form" action="<?php echo $this->admin_form_url_get(); ?>">42 <form method="post" id="civi_wp_member_sync_rules_form" action="<?php echo esc_url( $this->admin_form_url_get() ); ?>"> 43 43 44 44 <?php wp_nonce_field( 'civi_wp_member_sync_rule_action', 'civi_wp_member_sync_nonce' ); ?> -
civicrm-wp-member-sync/trunk/assets/templates/rule-cap-edit.php
r3147667 r3450401 40 40 <p><?php esc_html_e( 'An additional Membership Status Capability will also be added to the WordPress User that is tied to the status of their Membership. This Capability will be of the form "civimember_ID_NUM", where "ID" is the numeric ID of the Membership Type and "NUM" is the numeric ID of the Membership Status. So, for Membership Type 2 with Membership Status 4, the Capability will be "civimember_2_4".', 'civicrm-wp-member-sync' ); ?></p> 41 41 42 <form method="post" id="civi_wp_member_sync_rules_form" action="<?php echo $this->admin_form_url_get(); ?>">42 <form method="post" id="civi_wp_member_sync_rules_form" action="<?php echo esc_url( $this->admin_form_url_get() ); ?>"> 43 43 44 44 <?php wp_nonce_field( 'civi_wp_member_sync_rule_action', 'civi_wp_member_sync_nonce' ); ?> -
civicrm-wp-member-sync/trunk/assets/templates/rule-role-add.php
r3147667 r3450401 36 36 <p><?php esc_html_e( 'Choose one or more CiviMember Membership Types and a WordPress Role below. This will associate those Membership Types with the WordPress Role.', 'civicrm-wp-member-sync' ); ?></p> 37 37 38 <form method="post" id="civi_wp_member_sync_rules_form" action="<?php echo $this->admin_form_url_get(); ?>">38 <form method="post" id="civi_wp_member_sync_rules_form" action="<?php echo esc_url( $this->admin_form_url_get() ); ?>"> 39 39 40 40 <?php wp_nonce_field( 'civi_wp_member_sync_rule_action', 'civi_wp_member_sync_nonce' ); ?> -
civicrm-wp-member-sync/trunk/assets/templates/rule-role-edit.php
r3147667 r3450401 36 36 <p><?php esc_html_e( 'Choose a CiviMember Membership Type and a WordPress Role below. This will associate that Membership Type with the WordPress Role.', 'civicrm-wp-member-sync' ); ?></p> 37 37 38 <form method="post" id="civi_wp_member_sync_rules_form" action="<?php echo $this->admin_form_url_get(); ?>">38 <form method="post" id="civi_wp_member_sync_rules_form" action="<?php echo esc_url( $this->admin_form_url_get() ); ?>"> 39 39 40 40 <?php wp_nonce_field( 'civi_wp_member_sync_rule_action', 'civi_wp_member_sync_nonce' ); ?> -
civicrm-wp-member-sync/trunk/assets/templates/settings.php
r3147667 r3450401 33 33 <?php endif; ?> 34 34 35 <form method="post" id="civi_wp_member_sync_settings_form" action="<?php echo $this->admin_form_url_get(); ?>">35 <form method="post" id="civi_wp_member_sync_settings_form" action="<?php echo esc_url( $this->admin_form_url_get() ); ?>"> 36 36 37 37 <?php wp_nonce_field( 'civi_wp_member_sync_settings_action', 'civi_wp_member_sync_nonce' ); ?> … … 39 39 <h3><?php esc_html_e( 'Synchronization Method', 'civicrm-wp-member-sync' ); ?></h3> 40 40 41 <p><?php esc_html_e( 'Select whether you want CiviCRM Member Sync to synchronize CiviCRM Memberships to WordPress Roles or WordPress Capabilities. If, for example, you need your WordPress User Roles to be independent of Membership Status, then choose Capabilities.', 'civicrm-wp-member-sync' ); ?></p>41 <p><?php esc_html_e( 'Select whether you want to synchronize CiviCRM Memberships to WordPress Roles or WordPress Capabilities. If, for example, you need your WordPress User Roles to be independent of Membership Status, then choose Capabilities. Whichever setting you choose, new WordPress Users will be created for CiviCRM Contacts that do not have one associated with them.', 'civicrm-wp-member-sync' ); ?></p> 42 42 43 43 <table class="form-table"> … … 178 178 <td> 179 179 <input type="checkbox" class="settings-checkbox" name="civi_wp_member_sync_settings_civicrm" id="civi_wp_member_sync_settings_civicrm" value="1"<?php checked( 1, $civicrm ); ?> /> 180 <label class="civi_wp_member_sync_settings_label" for="civi_wp_member_sync_settings_civicrm"><?php esc_html_e( 'Synchronize when Membership is updated in CiviCRM admin pages.', 'civicrm-wp-member-sync' ); ?></label>180 <label class="civi_wp_member_sync_settings_label" for="civi_wp_member_sync_settings_civicrm"><?php esc_html_e( 'Synchronize when Membership is updated in CiviCRM, e.g. via a scheduled job or modified on an admin page.', 'civicrm-wp-member-sync' ); ?></label> 181 181 </td> 182 182 </tr> … … 188 188 <td> 189 189 <input type="checkbox" class="settings-checkbox" name="civi_wp_member_sync_settings_schedule" id="civi_wp_member_sync_settings_schedule" value="1"<?php checked( 1, $schedule ); ?> /> 190 <label class="civi_wp_member_sync_settings_label" for="civi_wp_member_sync_settings_schedule"><?php esc_html_e( 'Synchronize using a recurring schedule. This action is performed on all Users and Contacts.', 'civicrm-wp-member-sync' ); ?></label> 191 <p class="description"><?php esc_html_e( 'This action can be very processor intensive if you have a lot of Users and Contacts. It is not recommended to have this switched on unless you have a good reason for doing so. Please note that this action is likely to be removed in future versions.', 'civicrm-wp-member-sync' ); ?></p> 190 <label class="civi_wp_member_sync_settings_label" for="civi_wp_member_sync_settings_schedule"><?php esc_html_e( 'Synchronize using a WordPress recurring schedule. This action is performed on all Users and Contacts.', 'civicrm-wp-member-sync' ); ?></label> 191 <p class="description"><?php esc_html_e( 'This action can be very processor intensive if you have a lot of Users and Contacts. It is not recommended to have this switched on unless you have a good reason for doing so.', 'civicrm-wp-member-sync' ); ?></p> 192 <div class="notice notice-warning inline"><p><?php esc_html_e( 'Please not that this action will be removed in the next major release.', 'civicrm-wp-member-sync' ); ?></p></div> 192 193 </td> 193 194 </tr> -
civicrm-wp-member-sync/trunk/civicrm-wp-member-sync.php
r3147667 r3450401 7 7 * Plugin URI: https://github.com/christianwach/civicrm-wp-member-sync 8 8 * GitHub Plugin URI: https://github.com/christianwach/civicrm-wp-member-sync 9 * Version: 0.6. 39 * Version: 0.6.4 10 10 * Author: Christian Wach 11 11 * Author URI: https://haystack.co.uk … … 35 35 36 36 // Define plugin version - bumping this will also refresh CSS and JS. 37 define( 'CIVI_WP_MEMBER_SYNC_VERSION', '0.6. 3' );37 define( 'CIVI_WP_MEMBER_SYNC_VERSION', '0.6.4a' ); 38 38 39 39 // Store reference to this file. -
civicrm-wp-member-sync/trunk/includes/civi-wp-ms-admin-cau.php
r3147667 r3450401 169 169 170 170 // Grab the Membership Type ID. 171 // phpcs:ignore WordPress.Security.NonceVerification.Recommended , WordPress.Security.ValidatedSanitizedInput.InputNotSanitized172 $type_id = (int) wp_unslash( $_REQUEST['cwms_type_id']);171 // phpcs:ignore WordPress.Security.NonceVerification.Recommended 172 $type_id = (int) sanitize_key( wp_unslash( $_REQUEST['cwms_type_id'] ) ); 173 173 174 174 // Grab the queried Contact IDs. … … 230 230 231 231 // Grab the Membership Status ID. 232 // phpcs:ignore WordPress.Security.NonceVerification.Recommended , WordPress.Security.ValidatedSanitizedInput.InputNotSanitized233 $status_id = (int) wp_unslash( $_REQUEST['cwms_status_id']);232 // phpcs:ignore WordPress.Security.NonceVerification.Recommended 233 $status_id = (int) sanitize_key( wp_unslash( $_REQUEST['cwms_status_id'] ) ); 234 234 235 235 // Grab the queried Contact IDs. … … 291 291 292 292 // Get the views param. 293 // phpcs:ignore WordPress.Security.NonceVerification.Recommended , WordPress.Security.ValidatedSanitizedInput.InputNotSanitized294 $member_status = trim( wp_unslash( $_REQUEST['user_status'] ) );293 // phpcs:ignore WordPress.Security.NonceVerification.Recommended 294 $member_status = sanitize_key( wp_unslash( $_REQUEST['user_status'] ) ); 295 295 if ( ! in_array( $member_status, [ 'members', 'non_members' ], true ) ) { 296 296 return $args; … … 450 450 451 451 // Get the views param if present. 452 // phpcs:ignore WordPress.Security. ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Recommended453 $user_status = isset( $_REQUEST['user_status'] ) ? trim( wp_unslash( $_REQUEST['user_status'] ) ) : '';452 // phpcs:ignore WordPress.Security.NonceVerification.Recommended 453 $user_status = isset( $_REQUEST['user_status'] ) ? sanitize_key( wp_unslash( $_REQUEST['user_status'] ) ) : ''; 454 454 455 455 // Include views template. -
civicrm-wp-member-sync/trunk/includes/civi-wp-ms-admin.php
r3147667 r3450401 1429 1429 1430 1430 // Sanitise admin page url. 1431 // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized 1432 $target_url = isset( $_SERVER['REQUEST_URI'] ) ? wp_unslash( $_SERVER['REQUEST_URI'] ) : ''; 1431 $target_url = isset( $_SERVER['REQUEST_URI'] ) ? esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ) : ''; 1433 1432 if ( ! empty( $target_url ) ) { 1434 1433 $url_array = explode( '&', $target_url ); -
civicrm-wp-member-sync/trunk/languages/civicrm-wp-member-sync.pot
r3147667 r3450401 1 # Copyright (C) 202 4Christian Wach1 # Copyright (C) 2026 Christian Wach 2 2 # This file is distributed under the same license as the CiviCRM Member Sync plugin. 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: CiviCRM Member Sync 0.6. 3a\n"5 "Project-Id-Version: CiviCRM Member Sync 0.6.4a\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/civicrm-wp-member-sync\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 202 4-09-06T15:48:40+00:00\n"12 "POT-Creation-Date: 2026-01-30T12:04:04+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 "X-Generator: WP-CLI 2.1 0.0\n"14 "X-Generator: WP-CLI 2.12.0\n" 15 15 "X-Domain: civicrm-wp-member-sync\n" 16 16 … … 75 75 #. translators: %s is the placeholder for the count html `<span class="count"/>` 76 76 #: assets/templates/cau-user-views.php:22 77 #, php-format 77 78 msgid "Members %s" 78 79 msgid_plural "Members %s" … … 82 83 #. translators: %s is the placeholder for the count html `<span class="count"/>` 83 84 #: assets/templates/cau-user-views.php:39 85 #, php-format 84 86 msgid "Non Members %s" 85 87 msgid_plural "Non Members %s" … … 407 409 408 410 #: assets/templates/settings.php:41 409 msgid "Select whether you want CiviCRM Member Sync to synchronize CiviCRM Memberships to WordPress Roles or WordPress Capabilities. If, for example, you need your WordPress User Roles to be independent of Membership Status, then choose Capabilities."411 msgid "Select whether you want to synchronize CiviCRM Memberships to WordPress Roles or WordPress Capabilities. If, for example, you need your WordPress User Roles to be independent of Membership Status, then choose Capabilities. Whichever setting you choose, new WordPress Users will be created for CiviCRM Contacts that do not have one associated with them." 410 412 msgstr "" 411 413 … … 438 440 #. translators: 1: Opening anchor tag, 2: Closing anchor tag, 3: Opening em tag, 4: Closing em tag 439 441 #: assets/templates/settings.php:73 442 #, php-format 440 443 msgid "In order to sync Contacts in CiviCRM that have been “soft deleted” (moved to the Trash but not fully deleted) you will need to install %1$sCiviCRM Admin Utilities%2$s version 0.6.8 or greater. Make sure the checkbox labelled %3$s’Check this to fix the Contact “soft delete” process‘%4$s is checked so that Contacts that have been “soft deleted” continue to have their matching WordPress User‘s status updated." 441 444 msgstr "" … … 445 448 #: assets/templates/settings.php:119 446 449 #: assets/templates/settings.php:152 450 #, php-format 447 451 msgid "Note that this fix only applies to Contacts which have been “soft deleted” %1$safter%2$s CiviCRM Admin Utilities has been properly configured." 448 452 msgstr "" … … 450 454 #. translators: 1: Opening anchor tag, 2: Closing anchor tag, 3: Opening em tag, 4: Closing em tag 451 455 #: assets/templates/settings.php:105 456 #, php-format 452 457 msgid "In order to sync Contacts in CiviCRM that have been “soft deleted” (moved to the Trash but not fully deleted) you will need to upgrade %1$sCiviCRM Admin Utilities%2$s to version 0.6.8 or higher. When you have done this, make sure the checkbox labelled %3$s’Check this to fix the Contact “soft delete” process‘%4$s is checked so that Contacts that have been “soft deleted” continue to have their matching WordPress User‘s status updated." 453 458 msgstr "" … … 455 460 #. translators: 1: Opening anchor tag, 2: Closing anchor tag, 3: Opening em tag, 4: Closing em tag 456 461 #: assets/templates/settings.php:137 462 #, php-format 457 463 msgid "In order to sync Contacts in CiviCRM that have been “soft deleted” (moved to the Trash but not fully deleted) you will need to visit the CiviCRM Admin Utilities %1$sSettings page%2$s and make sure the checkbox labelled %3$s’Check this to fix the Contact “soft delete” process‘%4$s is checked so that Contacts which have been “soft deleted” continue to have their matching WordPress User‘s status updated." 458 464 msgstr "" … … 471 477 472 478 #: assets/templates/settings.php:180 473 msgid "Synchronize when Membership is updated in CiviCRM admin pages."479 msgid "Synchronize when Membership is updated in CiviCRM, e.g. via a scheduled job or modified on an admin page." 474 480 msgstr "" 475 481 … … 479 485 480 486 #: assets/templates/settings.php:190 481 msgid "Synchronize using a recurring schedule. This action is performed on all Users and Contacts."487 msgid "Synchronize using a WordPress recurring schedule. This action is performed on all Users and Contacts." 482 488 msgstr "" 483 489 484 490 #: assets/templates/settings.php:191 485 msgid "This action can be very processor intensive if you have a lot of Users and Contacts. It is not recommended to have this switched on unless you have a good reason for doing so. Please note that this action is likely to be removed in future versions." 486 msgstr "" 487 488 #: assets/templates/settings.php:197 491 msgid "This action can be very processor intensive if you have a lot of Users and Contacts. It is not recommended to have this switched on unless you have a good reason for doing so." 492 msgstr "" 493 494 #: assets/templates/settings.php:192 495 msgid "Please not that this action will be removed in the next major release." 496 msgstr "" 497 498 #: assets/templates/settings.php:198 489 499 msgid "Schedule Interval" 490 500 msgstr "" 491 501 492 #: assets/templates/settings.php:21 2502 #: assets/templates/settings.php:213 493 503 msgid "Other Settings" 494 504 msgstr "" 495 505 496 #: assets/templates/settings.php:21 8506 #: assets/templates/settings.php:219 497 507 msgid "Synced Contact Types" 498 508 msgstr "" 499 509 500 #: assets/templates/settings.php:22 2510 #: assets/templates/settings.php:223 501 511 msgid "Synchronize Individuals only." 502 512 msgstr "" 503 513 504 #: assets/templates/settings.php:22 3514 #: assets/templates/settings.php:224 505 515 msgid "In versions of CiviCRM Member Sync prior to 0.3.5, all CiviCRM Memberships were synchronized to WordPress Users. This meant that Organisations and Households also had corresponding WordPress Users. If you want to restrict syncing to Individuals only, then check the box below." 506 516 msgstr "" 507 517 508 #: assets/templates/settings.php:23 2518 #: assets/templates/settings.php:233 509 519 msgid "Save Changes" 510 520 msgstr "" … … 610 620 msgstr "" 611 621 612 #: includes/civi-wp-ms-admin.php:233 9622 #: includes/civi-wp-ms-admin.php:2338 613 623 msgid "Cheating, eh?" 614 624 msgstr "" -
civicrm-wp-member-sync/trunk/readme.txt
r3147667 r3450401 4 4 Tags: civicrm, member, membership, sync 5 5 Requires at least: 4.9 6 Tested up to: 6. 66 Tested up to: 6.9 7 7 Requires PHP: 7.4 8 Stable tag: 0.6. 38 Stable tag: 0.6.4 9 9 License: GPLv2 or later 10 10 License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
Note: See TracChangeset
for help on using the changeset viewer.