Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Remove default value for continue_button_title - [GIVE-145] #7153

Merged
merged 5 commits into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading