From f8867dec90cceed12865a78ea807606d68ce987f Mon Sep 17 00:00:00 2001 From: Justin Freeman Date: Fri, 3 Feb 2023 10:37:37 +1100 Subject: [PATCH 1/3] WPCIVIUX-126 Refactor the Settings page, remove invalid HTML, fix spelling and use CSS for row alignment, fix implied variable names --- admin/partials/civicrm-ux-admin-display.php | 103 ++++++++++---------- 1 file changed, 49 insertions(+), 54 deletions(-) diff --git a/admin/partials/civicrm-ux-admin-display.php b/admin/partials/civicrm-ux-admin-display.php index 9464e46..69b61d9 100755 --- a/admin/partials/civicrm-ux-admin-display.php +++ b/admin/partials/civicrm-ux-admin-display.php @@ -13,46 +13,49 @@ */ function civicrm_ux_settings_page() { - $url_param = [ - 'hash' => get_option( Civicrm_Ux_Shortcode_Event_ICal_Feed::HASH_OPTION ), - ]; - $url = add_query_arg( - $url_param, - get_rest_url( NULL, - '/' . Civicrm_Ux_Shortcode_Event_ICal_Feed::API_NAMESPACE . '/' . Civicrm_Ux_Shortcode_Event_ICal_Feed::INTERNAL_ENDPOINT ) ); - $opt = Civicrm_Ux::getInstance() - ->get_store() - ->get_option( 'civicrm_summary_options' ); - $opt_c = Civicrm_Ux::getInstance() - ->get_store() - ->get_option( 'civicrm_contribution_ux' ); - ?> + $url_param = [ + 'hash' => get_option(Civicrm_Ux_Shortcode_Event_ICal_Feed::HASH_OPTION), + ]; + $url = add_query_arg( + $url_param, + get_rest_url(NULL, + '/' . Civicrm_Ux_Shortcode_Event_ICal_Feed::API_NAMESPACE . '/' . Civicrm_Ux_Shortcode_Event_ICal_Feed::INTERNAL_ENDPOINT)); + $opt_summary_options = Civicrm_Ux::getInstance() + ->get_store() + ->get_option('civicrm_summary_options'); + $opt_contribution_ux = Civicrm_Ux::getInstance() + ->get_store() + ->get_option('civicrm_contribution_ux'); + ?>

CiviCRM UX

Usage Documentation

-

Documentation on the available shortcodes and functionality for this plugin is available on our Github project page, CiviCRM UX User Guide.

+

+ Documentation on the available shortcodes and functionality for this plugin is available on our Github project page, CiviCRM UX User Guide. +

How To Say Thank You!

-

If you are using this plugin and find it useful, you can say thank you by buying us a beer or a coffee.

+

+ If you are using this plugin and find it useful, you can say thank you by buying us a beer or a coffee. +

- +

iCal Feed

- + - + @@ -60,59 +63,51 @@ function civicrm_ux_settings_page() {
+ size="40" - value=""/> + value=""/>
The internal feed url is: - The internal feed url is:

Membership Summary

- - + + - - + + - - + +
+ value=""/>
+ value=""/>
+ value=""/>

Contribution Page Tweaks

- - + + - - + +
' : '>'; ?> +
' : '>'; ?> + +
- +
Date: Fri, 3 Feb 2023 10:37:53 +1100 Subject: [PATCH 2/3] WPCIVIUX-126 Refactor and fix implied variable name --- public/class-civicrm-ux-public.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/class-civicrm-ux-public.php b/public/class-civicrm-ux-public.php index 8b5cf90..0c8f0e2 100755 --- a/public/class-civicrm-ux-public.php +++ b/public/class-civicrm-ux-public.php @@ -99,13 +99,13 @@ public function enqueue_scripts() { wp_enqueue_script( $this->civicrm_ux, plugin_dir_url( __FILE__ ) . 'js/civicrm-ux-public.js', [ 'jquery' ], $this->version, FALSE ); - $opt = Civicrm_Ux::getInstance() + $opt_contribution_ux = Civicrm_Ux::getInstance() ->get_store() ->get_option( 'civicrm_contribution_ux' ); $options_map = [ - 'is_recur_default' => ! ! $opt['is_recur_default'], - 'is_autorenew_default' => ! ! $opt['is_autorenew_default'], + 'is_recur_default' => isset($opt_contribution_ux['is_recur_default']) ? true : false, + 'is_autorenew_default' => isset($opt_contribution_ux['is_autorenew_default']) ? true : false, ]; wp_add_inline_script( $this->civicrm_ux, 'window.wp = window.wp || ({}); window.wp.CiviCRM_UX = (' . json_encode( $options_map ) . ')', 'before' ); From d3ef17301be2a07572d56b5914b6df2fa8c267ff Mon Sep 17 00:00:00 2001 From: Justin Freeman Date: Fri, 3 Feb 2023 10:38:45 +1100 Subject: [PATCH 3/3] WPCIVIUX-126 Version 1.11.4 --- civicrm-ux.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/civicrm-ux.php b/civicrm-ux.php index 1451fe1..87f555e 100755 --- a/civicrm-ux.php +++ b/civicrm-ux.php @@ -9,7 +9,7 @@ * Plugin Name: WP CiviCRM UX * Plugin URI: https://github.com/agileware/wp-civicrm-ux * Description: A better user experience for integrating WordPress and CiviCRM - * Version: 1.11.3 + * Version: 1.11.4 * Requires at least: 5.8 * Requires PHP: 7.4 * Author: Agileware