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

Fixed issue with 'Open Code Chest' link on a sub site redirecting back to the main site. #1

Merged
merged 3 commits into from
Mar 8, 2024
Merged
Changes from 1 commit
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
5 changes: 3 additions & 2 deletions class-gwiz-gf-code-chest.php
Original file line number Diff line number Diff line change
Expand Up @@ -648,15 +648,16 @@ public function replace_custom_js_setting( $form_settings, $form ) {
'name' => 'code_chest_js',
'type' => 'editor_js',
'callback' => function ( $setting ) use ( $form ) {
$form_id = $form['id'];
$form_id = $form['id'];
$url_path = parse_url( RGFormsModel::get_current_page_url(), PHP_URL_PATH );
saifsultanc marked this conversation as resolved.
Show resolved Hide resolved
$markup_pieces = array(
'<div id="gform_setting_code_chest_js_overridden_warning" class="gform-settings-field gform-settings-field__html">',
'<div class="gform-settings-field"><b>',
__( 'GF Code Chest replaces GF Custom JavaScript.', 'gf-code-chest' ),
'</b>',
__( 'Code Chest is now managing your existing Custom JavaScript scripts. You can safely deactivate the Custom JavaScript plugin immediately.', 'gf-code-chest' ),
'</div>',
"<a href=\"/wp-admin/admin.php?subview=gf-code-chest&page=gf_edit_forms&id={$form_id}&view=settings\" class=\"gform-button gform-button--white\">",
"<a href=\"{$url_path}?subview=gf-code-chest&page=gf_edit_forms&id={$form_id}&view=settings\" class=\"gform-button gform-button--white\">",
saifsultanc marked this conversation as resolved.
Show resolved Hide resolved
__( 'Open Code Chest', 'gf-code-chest' ),
'</a>',
'</div>',
Expand Down
Loading