Plugin Directory

Changeset 3450401


Ignore:
Timestamp:
01/30/2026 12:05:35 PM (5 weeks ago)
Author:
needle
Message:

Release 0.6.4

Location:
civicrm-wp-member-sync/trunk
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • civicrm-wp-member-sync/trunk/assets/templates/list_caps.php

    r3071750 r3450401  
    219219    <?php if ( ! empty( $data ) ) : ?>
    220220
    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() ); ?>">
    222222
    223223            <?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  
    208208    <?php if ( ! empty( $data ) ) : ?>
    209209
    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() ); ?>">
    211211
    212212            <?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  
    4646    <p><?php esc_html_e( 'Note: if no association rules exist then no synchronization will take place.', 'civicrm-wp-member-sync' ); ?></p>
    4747
    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() ); ?>">
    4949
    5050        <?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  
    4040    <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>
    4141
    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() ); ?>">
    4343
    4444        <?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  
    4040    <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>
    4141
    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() ); ?>">
    4343
    4444        <?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  
    3636    <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>
    3737
    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() ); ?>">
    3939
    4040        <?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  
    3636    <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>
    3737
    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() ); ?>">
    3939
    4040        <?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  
    3333    <?php endif; ?>
    3434
    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() ); ?>">
    3636
    3737        <?php wp_nonce_field( 'civi_wp_member_sync_settings_action', 'civi_wp_member_sync_nonce' ); ?>
     
    3939        <h3><?php esc_html_e( 'Synchronization Method', 'civicrm-wp-member-sync' ); ?></h3>
    4040
    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>
    4242
    4343        <table class="form-table">
     
    178178                <td>
    179179                    <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>
    181181                </td>
    182182            </tr>
     
    188188                <td>
    189189                    <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>
    192193                </td>
    193194            </tr>
  • civicrm-wp-member-sync/trunk/civicrm-wp-member-sync.php

    r3147667 r3450401  
    77 * Plugin URI:        https://github.com/christianwach/civicrm-wp-member-sync
    88 * GitHub Plugin URI: https://github.com/christianwach/civicrm-wp-member-sync
    9  * Version:           0.6.3
     9 * Version:           0.6.4
    1010 * Author:            Christian Wach
    1111 * Author URI:        https://haystack.co.uk
     
    3535
    3636// Define plugin version - bumping this will also refresh CSS and JS.
    37 define( 'CIVI_WP_MEMBER_SYNC_VERSION', '0.6.3' );
     37define( 'CIVI_WP_MEMBER_SYNC_VERSION', '0.6.4a' );
    3838
    3939// Store reference to this file.
  • civicrm-wp-member-sync/trunk/includes/civi-wp-ms-admin-cau.php

    r3147667 r3450401  
    169169
    170170        // Grab the Membership Type ID.
    171         // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
    172         $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'] ) );
    173173
    174174        // Grab the queried Contact IDs.
     
    230230
    231231        // Grab the Membership Status ID.
    232         // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
    233         $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'] ) );
    234234
    235235        // Grab the queried Contact IDs.
     
    291291
    292292        // Get the views param.
    293         // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
    294         $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'] ) );
    295295        if ( ! in_array( $member_status, [ 'members', 'non_members' ], true ) ) {
    296296            return $args;
     
    450450
    451451        // Get the views param if present.
    452         // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Recommended
    453         $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'] ) ) : '';
    454454
    455455        // Include views template.
  • civicrm-wp-member-sync/trunk/includes/civi-wp-ms-admin.php

    r3147667 r3450401  
    14291429
    14301430        // 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'] ) ) : '';
    14331432        if ( ! empty( $target_url ) ) {
    14341433            $url_array = explode( '&', $target_url );
  • civicrm-wp-member-sync/trunk/languages/civicrm-wp-member-sync.pot

    r3147667 r3450401  
    1 # Copyright (C) 2024 Christian Wach
     1# Copyright (C) 2026 Christian Wach
    22# This file is distributed under the same license as the CiviCRM Member Sync plugin.
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: CiviCRM Member Sync 0.6.3a\n"
     5"Project-Id-Version: CiviCRM Member Sync 0.6.4a\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/civicrm-wp-member-sync\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2024-09-06T15:48:40+00:00\n"
     12"POT-Creation-Date: 2026-01-30T12:04:04+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    14 "X-Generator: WP-CLI 2.10.0\n"
     14"X-Generator: WP-CLI 2.12.0\n"
    1515"X-Domain: civicrm-wp-member-sync\n"
    1616
     
    7575#. translators: %s is the placeholder for the count html `<span class="count"/>`
    7676#: assets/templates/cau-user-views.php:22
     77#, php-format
    7778msgid "Members %s"
    7879msgid_plural "Members %s"
     
    8283#. translators: %s is the placeholder for the count html `<span class="count"/>`
    8384#: assets/templates/cau-user-views.php:39
     85#, php-format
    8486msgid "Non Members %s"
    8587msgid_plural "Non Members %s"
     
    407409
    408410#: 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."
     411msgid "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."
    410412msgstr ""
    411413
     
    438440#. translators: 1: Opening anchor tag, 2: Closing anchor tag, 3: Opening em tag, 4: Closing em tag
    439441#: assets/templates/settings.php:73
     442#, php-format
    440443msgid "In order to sync Contacts in CiviCRM that have been &#8220;soft deleted&#8221; (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&#8217;Check this to fix the Contact &#8220;soft delete&#8221; process&#8216;%4$s is checked so that Contacts that have been &#8220;soft deleted&#8221; continue to have their matching WordPress User&#8216;s status updated."
    441444msgstr ""
     
    445448#: assets/templates/settings.php:119
    446449#: assets/templates/settings.php:152
     450#, php-format
    447451msgid "Note that this fix only applies to Contacts which have been &#8220;soft deleted&#8221; %1$safter%2$s CiviCRM Admin Utilities has been properly configured."
    448452msgstr ""
     
    450454#. translators: 1: Opening anchor tag, 2: Closing anchor tag, 3: Opening em tag, 4: Closing em tag
    451455#: assets/templates/settings.php:105
     456#, php-format
    452457msgid "In order to sync Contacts in CiviCRM that have been &#8220;soft deleted&#8221; (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&#8217;Check this to fix the Contact &#8220;soft delete&#8221; process&#8216;%4$s is checked so that Contacts that have been &#8220;soft deleted&#8221; continue to have their matching WordPress User&#8216;s status updated."
    453458msgstr ""
     
    455460#. translators: 1: Opening anchor tag, 2: Closing anchor tag, 3: Opening em tag, 4: Closing em tag
    456461#: assets/templates/settings.php:137
     462#, php-format
    457463msgid "In order to sync Contacts in CiviCRM that have been &#8220;soft deleted&#8221; (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&#8217;Check this to fix the Contact &#8220;soft delete&#8221; process&#8216;%4$s is checked so that Contacts which have been &#8220;soft deleted&#8221; continue to have their matching WordPress User&#8216;s status updated."
    458464msgstr ""
     
    471477
    472478#: assets/templates/settings.php:180
    473 msgid "Synchronize when Membership is updated in CiviCRM admin pages."
     479msgid "Synchronize when Membership is updated in CiviCRM, e.g. via a scheduled job or modified on an admin page."
    474480msgstr ""
    475481
     
    479485
    480486#: assets/templates/settings.php:190
    481 msgid "Synchronize using a recurring schedule. This action is performed on all Users and Contacts."
     487msgid "Synchronize using a WordPress recurring schedule. This action is performed on all Users and Contacts."
    482488msgstr ""
    483489
    484490#: 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
     491msgid "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."
     492msgstr ""
     493
     494#: assets/templates/settings.php:192
     495msgid "Please not that this action will be removed in the next major release."
     496msgstr ""
     497
     498#: assets/templates/settings.php:198
    489499msgid "Schedule Interval"
    490500msgstr ""
    491501
    492 #: assets/templates/settings.php:212
     502#: assets/templates/settings.php:213
    493503msgid "Other Settings"
    494504msgstr ""
    495505
    496 #: assets/templates/settings.php:218
     506#: assets/templates/settings.php:219
    497507msgid "Synced Contact Types"
    498508msgstr ""
    499509
    500 #: assets/templates/settings.php:222
     510#: assets/templates/settings.php:223
    501511msgid "Synchronize Individuals only."
    502512msgstr ""
    503513
    504 #: assets/templates/settings.php:223
     514#: assets/templates/settings.php:224
    505515msgid "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."
    506516msgstr ""
    507517
    508 #: assets/templates/settings.php:232
     518#: assets/templates/settings.php:233
    509519msgid "Save Changes"
    510520msgstr ""
     
    610620msgstr ""
    611621
    612 #: includes/civi-wp-ms-admin.php:2339
     622#: includes/civi-wp-ms-admin.php:2338
    613623msgid "Cheating, eh?"
    614624msgstr ""
  • civicrm-wp-member-sync/trunk/readme.txt

    r3147667 r3450401  
    44Tags: civicrm, member, membership, sync
    55Requires at least: 4.9
    6 Tested up to: 6.6
     6Tested up to: 6.9
    77Requires PHP: 7.4
    8 Stable tag: 0.6.3
     8Stable tag: 0.6.4
    99License: GPLv2 or later
    1010License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
Note: See TracChangeset for help on using the changeset viewer.