Changeset 3147635
- Timestamp:
- 09/06/2024 03:10:25 PM (18 months ago)
- Location:
- bp-groups-civicrm-sync/trunk
- Files:
-
- 7 edited
-
assets/templates/wordpress/settings/metaboxes/metabox-settings-submit.php (modified) (1 diff)
-
assets/templates/wordpress/settings/pages/page-dashboard.php (modified) (2 diffs)
-
assets/templates/wordpress/settings/pages/page-settings.php (modified) (2 diffs)
-
bp-groups-civicrm-sync.php (modified) (6 diffs)
-
includes/civicrm/class-civicrm-group-contact.php (modified) (2 diffs)
-
languages/bp-groups-civicrm-sync.pot (modified) (5 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
bp-groups-civicrm-sync/trunk/assets/templates/wordpress/settings/metaboxes/metabox-settings-submit.php
r3035828 r3147635 25 25 * Filters the "misc publishing actions" section. 26 26 * 27 * Make sure that whatever is returned has been properly escaped. 28 * 27 29 * @since 0.5.0 28 30 * 29 31 * @param string $misc_pub_section The text for the "misc publishing actions" section. 30 32 */ 31 echo apply_filters( $this->hook_prefix . '/settings/page/metabox/submit/misc_pub', $misc_pub_section ); 33 $misc_pub_section = apply_filters( $this->hook_prefix . '/settings/page/metabox/submit/misc_pub', $misc_pub_section ); 34 35 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped 36 echo $misc_pub_section; 32 37 33 38 ?> -
bp-groups-civicrm-sync/trunk/assets/templates/wordpress/settings/pages/page-dashboard.php
r3035828 r3147635 45 45 ?> 46 46 47 <?php /* phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped */ ?> 47 48 <form method="post" id="<?php echo esc_attr( $this->form_id ); ?>" action="<?php echo $this->form_submit_url_get(); ?>"> 48 49 … … 56 57 <div id="dashboard-widgets-wrap"> 57 58 58 <div id="dashboard-widgets" class="metabox-holder<?php echo $columns_css; ?>">59 <div id="dashboard-widgets" class="metabox-holder<?php echo esc_attr( $columns_css ); ?>"> 59 60 60 61 <div id="postbox-container-1" class="postbox-container"> -
bp-groups-civicrm-sync/trunk/assets/templates/wordpress/settings/pages/page-settings.php
r3035828 r3147635 56 56 ?> 57 57 58 <?php /* phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped */ ?> 58 59 <form method="post" id="<?php echo esc_attr( $this->form_id ); ?>" action="<?php echo $this->form_submit_url_get(); ?>"> 59 60 … … 64 65 <div id="poststuff"> 65 66 66 <div id="post-body" class="metabox-holder columns-<?php echo $columns; ?>">67 <div id="post-body" class="metabox-holder columns-<?php echo esc_attr( $columns ); ?>"> 67 68 68 69 <!--<div id="post-body-content"> -
bp-groups-civicrm-sync/trunk/bp-groups-civicrm-sync.php
r3069044 r3147635 1 1 <?php 2 2 /** 3 * Plugin Name: BP Groups CiviCRM Sync 4 * Plugin URI: https://github.com/christianwach/bp-groups-civicrm-sync 3 * BP Groups CiviCRM Sync 4 * 5 * Plugin Name: BP Groups CiviCRM Sync 6 * Description: Enables two-way synchronisation between BuddyPress Groups and CiviCRM Groups. 7 * Version: 0.5.2 8 * Plugin URI: https://github.com/christianwach/bp-groups-civicrm-sync 5 9 * GitHub Plugin URI: https://github.com/christianwach/bp-groups-civicrm-sync 6 * Description: Enables two-way synchronisation between BuddyPress Groups and CiviCRM Groups. 7 * Author: Christian Wach 8 * Version: 0.5.1 9 * Author URI: https://haystack.co.uk 10 * Text Domain: bp-groups-civicrm-sync 11 * Domain Path: /languages 10 * Author: Christian Wach 11 * Author URI: https://haystack.co.uk 12 * Requires at least: 4.9 13 * Requires PHP: 7.4 14 * License: GPLv2 or later 15 * License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html 16 * Text Domain: bp-groups-civicrm-sync 17 * Domain Path: /languages 12 18 * 13 19 * @package BP_Groups_CiviCRM_Sync … … 18 24 19 25 // Set our version here. 20 define( 'BP_GROUPS_CIVICRM_SYNC_VERSION', '0.5. 1' );26 define( 'BP_GROUPS_CIVICRM_SYNC_VERSION', '0.5.2' ); 21 27 22 28 // Store reference to this file. … … 118 124 $this->include_files(); 119 125 $this->setup_objects(); 126 $this->register_hooks(); 120 127 121 128 /** … … 195 202 } 196 203 204 /** 205 * Registers hooks. 206 * 207 * @since 0.5.2 208 */ 209 public function register_hooks() { 210 211 // Add links to settings page. 212 add_filter( 'plugin_action_links', [ $this, 'action_links' ], 10, 2 ); 213 214 } 215 197 216 // ----------------------------------------------------------------------------------- 198 217 … … 307 326 } 308 327 328 /** 329 * Adds utility links to settings page. 330 * 331 * @since 0.1 332 * @since 0.5.2 Moved into plugin class. 333 * 334 * @param array $links The existing links array. 335 * @param string $file The name of the plugin file. 336 * @return array $links The modified links array. 337 */ 338 public function action_links( $links, $file ) { 339 340 // Bail if not this plugin. 341 if ( plugin_basename( dirname( __FILE__ ) . '/bp-groups-civicrm-sync.php' ) !== $file ) { 342 return $links; 343 } 344 345 // Add links only when CiviCRM is fully installed. 346 if ( ! defined( 'CIVICRM_INSTALLED' ) || ! CIVICRM_INSTALLED ) { 347 return $links; 348 } 349 350 // Bail if CiviCRM plugin is not present. 351 if ( ! function_exists( 'civi_wp' ) ) { 352 return $links; 353 } 354 355 // Bail if BuddyPress plugin is not present. 356 if ( ! function_exists( 'buddypress' ) ) { 357 return $links; 358 } 359 360 // Add settings link if not network activated and not viewing network admin. 361 $link = add_query_arg( [ 'page' => 'bpgcs_settings' ], admin_url( 'admin.php' ) ); 362 $links[] = '<a href="' . esc_url( $link ) . '">' . esc_html__( 'Settings', 'bp-groups-civicrm-sync' ) . '</a>'; 363 364 // Always add Paypal link. 365 $paypal = 'https://www.paypal.me/interactivist'; 366 $links[] = '<a href="' . esc_url( $paypal ) . '" target="_blank">' . __( 'Donate!', 'bp-groups-civicrm-sync' ) . '</a>'; 367 368 // --< 369 return $links; 370 371 } 372 309 373 } 310 374 … … 338 402 * @see https://developer.wordpress.org/reference/functions/register_uninstall_hook/ 339 403 */ 340 341 /**342 * Utility to add link to settings page.343 *344 * @since 0.1345 *346 * @param array $links The existing links array.347 * @param str $file The name of the plugin file.348 * @return array $links The modified links array.349 */350 function bp_groups_civicrm_sync_plugin_action_links( $links, $file ) {351 352 // Add settings link.353 if ( plugin_basename( dirname( __FILE__ ) . '/bp-groups-civicrm-sync.php' === $file ) ) {354 355 // Is this Network Admin?356 if ( is_network_admin() ) {357 $link = add_query_arg( [ 'page' => 'bp_groups_civicrm_sync_parent' ], network_admin_url( 'settings.php' ) );358 } else {359 $link = add_query_arg( [ 'page' => 'bp_groups_civicrm_sync_parent' ], admin_url( 'admin.php' ) );360 }361 362 // Add settings link.363 $links[] = '<a href="' . $link . '">' . esc_html__( 'Settings', 'bp-groups-civicrm-sync' ) . '</a>';364 365 // Add Paypal link.366 $paypal = 'https://www.paypal.me/interactivist';367 $links[] = '<a href="' . $paypal . '" target="_blank">' . __( 'Donate!', 'bp-groups-civicrm-sync' ) . '</a>';368 369 }370 371 // --<372 return $links;373 374 }375 376 // Add filters for the above.377 add_filter( 'network_admin_plugin_action_links', 'bp_groups_civicrm_sync_plugin_action_links', 10, 2 );378 add_filter( 'plugin_action_links', 'bp_groups_civicrm_sync_plugin_action_links', 10, 2 ); -
bp-groups-civicrm-sync/trunk/includes/civicrm/class-civicrm-group-contact.php
r3035828 r3147635 703 703 704 704 // Return early if something went wrong. 705 if ( ! empty( $result[' error'] )) {705 if ( ! empty( $result['is_error'] ) && 1 === (int) $result['is_error'] ) { 706 706 $e = new \Exception(); 707 707 $trace = $e->getTraceAsString(); … … 754 754 755 755 // Return early if something went wrong. 756 if ( ! empty( $result[' error'] )) {756 if ( ! empty( $result['is_error'] ) && 1 === (int) $result['is_error'] ) { 757 757 $e = new \Exception(); 758 758 $trace = $e->getTraceAsString(); -
bp-groups-civicrm-sync/trunk/languages/bp-groups-civicrm-sync.pot
r3069044 r3147635 1 1 # Copyright (C) 2024 Christian Wach 2 # This file is distributed under the same license as the BP Groups CiviCRM Sync plugin.2 # This file is distributed under the GPLv2 or later. 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: BP Groups CiviCRM Sync 0.5. 1a\n"5 "Project-Id-Version: BP Groups CiviCRM Sync 0.5.2a\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/bp-groups-civicrm-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: 2024-0 4-11T13:53:16+00:00\n"12 "POT-Creation-Date: 2024-09-06T15:08:45+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.10.0\n" … … 120 120 msgstr "" 121 121 122 #: assets/templates/wordpress/settings/metaboxes/metabox-settings-submit.php:4 1122 #: assets/templates/wordpress/settings/metaboxes/metabox-settings-submit.php:46 123 123 msgid "Update" 124 124 msgstr "" … … 128 128 msgstr "" 129 129 130 #: bp-groups-civicrm-sync.php:36 3130 #: bp-groups-civicrm-sync.php:362 131 131 #: includes/admin/class-page-settings.php:127 132 132 #: includes/admin/class-page-settings.php:130 … … 134 134 msgstr "" 135 135 136 #: bp-groups-civicrm-sync.php:36 7136 #: bp-groups-civicrm-sync.php:366 137 137 msgid "Donate!" 138 138 msgstr "" -
bp-groups-civicrm-sync/trunk/readme.txt
r3069044 r3147635 4 4 Tags: civicrm, buddypress, user, groups, sync 5 5 Requires at least: 4.9 6 Tested up to: 6. 57 Stable tag: 0.5. 16 Tested up to: 6.6 7 Stable tag: 0.5.2 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html … … 44 44 45 45 == Changelog == 46 47 = 0.5.2 = 48 49 * Fixes CiviCRM API error check 46 50 47 51 = 0.5.1 =
Note: See TracChangeset
for help on using the changeset viewer.