Skip to content

Commit

Permalink
Fix: Remove default value for continue_button_title - [GIVE-145] (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaHungDinh authored Dec 20, 2023
1 parent a8064e3 commit 60f6a30
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion includes/forms/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -1590,7 +1590,7 @@ function give_get_default_form_shortcode_args() {
'show_content' => '',
'float_labels' => '',
'display_style' => '',
'continue_button_title' => __('Donate now', 'give'),
'continue_button_title' => '',

// This attribute belong to form template functionality.
// You can use this attribute to set modal open button background color.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ public function render(array $attributes)

$viewUrl = $this->getViewUrl($donationForm, $embedId);
$formUrl = esc_url(add_query_arg(['p' => $blockAttributes->formId], site_url('?post_type=give_forms')));

$formUrl = add_query_arg(['p' => $blockAttributes->formId], site_url('?post_type=give_forms'));


/**
* Note: iframe-resizer uses querySelectorAll so using a data attribute makes the most sense to target.
* It will also generate a dynamic ID - so when we have multiple embeds on a page there will be no conflict.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class BlockAttributes implements Arrayable
public $openFormButton;

/**
* @unreleased add v3 default for form button.
* @since 3.0.0
*/
public static function fromArray(array $array): BlockAttributes
Expand All @@ -35,7 +36,7 @@ public static function fromArray(array $array): BlockAttributes
$self->formId = !empty($array['formId']) ? (int)$array['formId'] : null;
$self->blockId = !empty($array['blockId']) ? (string)$array['blockId'] : null;
$self->formFormat = !empty($array['formFormat']) ? (string)$array['formFormat'] : null;
$self->openFormButton = !empty($array['openFormButton']) ? (string)$array['openFormButton'] : null;
$self->openFormButton = !empty($array['openFormButton']) ? (string)$array['openFormButton'] : __('Donate now', 'give');

return $self;
}
Expand Down

0 comments on commit 60f6a30

Please sign in to comment.