Changeset 3426515
- Timestamp:
- 12/23/2025 09:50:18 PM (3 months ago)
- Location:
- gf-tools
- Files:
-
- 70 added
- 5 edited
-
tags/1.1.3 (added)
-
tags/1.1.3/gf-tools.php (added)
-
tags/1.1.3/img (added)
-
tags/1.1.3/img/tools-icon.svg (added)
-
tags/1.1.3/includes (added)
-
tags/1.1.3/includes/_class-TEMPLATE.php (added)
-
tags/1.1.3/includes/class-confirmations.php (added)
-
tags/1.1.3/includes/class-customize-gf.php (added)
-
tags/1.1.3/includes/class-dashboard.php (added)
-
tags/1.1.3/includes/class-developers.php (added)
-
tags/1.1.3/includes/class-entries.php (added)
-
tags/1.1.3/includes/class-form-display.php (added)
-
tags/1.1.3/includes/class-form-editor.php (added)
-
tags/1.1.3/includes/class-forms-table.php (added)
-
tags/1.1.3/includes/class-gf-tools.php (added)
-
tags/1.1.3/includes/class-helpers.php (added)
-
tags/1.1.3/includes/class-import-export.php (added)
-
tags/1.1.3/includes/class-login.php (added)
-
tags/1.1.3/includes/class-mark-resolved.php (added)
-
tags/1.1.3/includes/class-merge-tags.php (added)
-
tags/1.1.3/includes/class-notifications.php (added)
-
tags/1.1.3/includes/class-pages.php (added)
-
tags/1.1.3/includes/class-password-reset.php (added)
-
tags/1.1.3/includes/class-populate-fields.php (added)
-
tags/1.1.3/includes/class-registration.php (added)
-
tags/1.1.3/includes/class-reports.php (added)
-
tags/1.1.3/includes/class-shortcodes.php (added)
-
tags/1.1.3/includes/class-spam.php (added)
-
tags/1.1.3/includes/class-validations.php (added)
-
tags/1.1.3/includes/class-wp-list-table.php (added)
-
tags/1.1.3/includes/class-wp-login.php (added)
-
tags/1.1.3/includes/css (added)
-
tags/1.1.3/includes/css/dashboard.css (added)
-
tags/1.1.3/includes/css/debugging.css (added)
-
tags/1.1.3/includes/css/form-display.css (added)
-
tags/1.1.3/includes/css/form-editor.css (added)
-
tags/1.1.3/includes/css/import-export.css (added)
-
tags/1.1.3/includes/css/mark-resolved.css (added)
-
tags/1.1.3/includes/css/pages.css (added)
-
tags/1.1.3/includes/css/reports-back.css (added)
-
tags/1.1.3/includes/css/reports.css (added)
-
tags/1.1.3/includes/css/settings.css (added)
-
tags/1.1.3/includes/css/shortcode-generator.css (added)
-
tags/1.1.3/includes/css/shortcodes.css (added)
-
tags/1.1.3/includes/forms (added)
-
tags/1.1.3/includes/forms/account-form.json (added)
-
tags/1.1.3/includes/forms/contact-form.json (added)
-
tags/1.1.3/includes/forms/download.php (added)
-
tags/1.1.3/includes/forms/login-form.json (added)
-
tags/1.1.3/includes/forms/password-change-form.json (added)
-
tags/1.1.3/includes/forms/password-reset-form.json (added)
-
tags/1.1.3/includes/forms/registration-form.json (added)
-
tags/1.1.3/includes/img (added)
-
tags/1.1.3/includes/img/discord.png (added)
-
tags/1.1.3/includes/img/import_spam_list.png (added)
-
tags/1.1.3/includes/img/pre-populate-fields.png (added)
-
tags/1.1.3/includes/img/tooltip.png (added)
-
tags/1.1.3/includes/js (added)
-
tags/1.1.3/includes/js/dashboard.js (added)
-
tags/1.1.3/includes/js/debugging.js (added)
-
tags/1.1.3/includes/js/form-editor.js (added)
-
tags/1.1.3/includes/js/forms-table.js (added)
-
tags/1.1.3/includes/js/mark-resolved.js (added)
-
tags/1.1.3/includes/js/remove-qs.js (added)
-
tags/1.1.3/includes/js/reports-back.js (added)
-
tags/1.1.3/includes/js/settings.js (added)
-
tags/1.1.3/includes/js/shortcode-generator.js (added)
-
tags/1.1.3/includes/js/shortcodes.js (added)
-
tags/1.1.3/index.php (added)
-
tags/1.1.3/readme.txt (added)
-
trunk/gf-tools.php (modified) (1 diff)
-
trunk/includes/class-gf-tools.php (modified) (2 diffs)
-
trunk/includes/class-login.php (modified) (2 diffs)
-
trunk/includes/class-wp-login.php (modified) (3 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
gf-tools/trunk/gf-tools.php
r3386074 r3426515 4 4 * Plugin URI: https://pluginrx.com/plugin/gf-tools/ 5 5 * Description: Unlock advanced tools to supercharge your Gravity Forms experience with enhanced features and streamlined management. 6 * Version: 1.1. 26 * Version: 1.1.3 7 7 * Requires at least: 5.9 8 * Tested up to: 6. 88 * Tested up to: 6.9 9 9 * Requires PHP: 7.4 10 10 * Author: PluginRx -
gf-tools/trunk/includes/class-gf-tools.php
r3386074 r3426515 547 547 [ 548 548 'type' => 'form_page_pair', 549 'name' => 'password_reset_mapping', 550 'label' => esc_html__( 'Password Reset Form & Page (For Logged-Out Users)', 'gf-tools' ) . ' — <a href="' . GFADVTOOLS_FORMS_URL . 'download.php?file=password-reset-form.json&_wpnonce=' . $download_nonce . '">' . esc_html__( 'Download Example Form', 'gf-tools' ) . '</a>', 551 'tooltip' => esc_html__( 'This setting will lock the form and page to prevent accidental deletion. This form should support both requesting a reset and setting a new password, based on the current action (see example form).', 'gf-tools' ), 552 'args' => [ 553 'form' => [ 554 'name' => 'password_reset_form', 555 'class' => 'small', 556 'choices' => $form_choices, 557 ], 558 'page' => [ 559 'name' => 'password_reset_page', 560 'class' => 'small', 561 'choices' => $page_choices, 562 ], 563 ], 564 ], 565 [ 566 'type' => 'form_page_pair', 549 567 'name' => 'login_mapping', 550 568 'label' => esc_html__( 'Login Form & Page', 'gf-tools' ) . ' — <a href="' . GFADVTOOLS_FORMS_URL . 'download.php?file=login-form.json&_wpnonce=' . $download_nonce . '">' . esc_html__( 'Download Example Form', 'gf-tools' ) . '</a>', … … 564 582 ], 565 583 [ 566 'type' => 'form_page_pair', 567 'name' => 'password_reset_mapping', 568 'label' => esc_html__( 'Password Reset Form & Page (For Logged-Out Users)', 'gf-tools' ) . ' — <a href="' . GFADVTOOLS_FORMS_URL . 'download.php?file=password-reset-form.json&_wpnonce=' . $download_nonce . '">' . esc_html__( 'Download Example Form', 'gf-tools' ) . '</a>', 569 'tooltip' => esc_html__( 'This setting will lock the form and page to prevent accidental deletion. This form should support both requesting a reset and setting a new password, based on the current action (see example form).', 'gf-tools' ), 570 'args' => [ 571 'form' => [ 572 'name' => 'password_reset_form', 573 'class' => 'small', 574 'choices' => $form_choices, 575 ], 576 'page' => [ 577 'name' => 'password_reset_page', 578 'class' => 'small', 579 'choices' => $page_choices, 584 'type' => 'checkbox', 585 'name' => 'core_login_redirect_group', 586 'label' => esc_html__( 'Redirect the Core WordPress Login Page', 'gf-tools' ), 587 'tooltip' => esc_html__( 'This setting will redirect users away from the default WordPress login page to your custom login page if selected above.', 'gf-tools' ), 588 'choices' => [ 589 [ 590 'label' => esc_html__( 'Yes', 'gf-tools' ), 591 'name' => 'core_login_redirect', 580 592 ], 581 593 ], -
gf-tools/trunk/includes/class-login.php
r3386074 r3426515 297 297 // Priority 1: Get raw URL from query or entry 298 298 $raw_url = ''; 299 if ( isset( $_GET[ 'redirect_to'] ) ) {300 $raw_url = sanitize_url( wp_unslash( $_GET[ 'redirect_to'] ) );299 if ( isset( $_GET[ 'redirect_to' ] ) ) { 300 $raw_url = sanitize_url( wp_unslash( $_GET[ 'redirect_to' ] ) ); 301 301 } elseif ( $this->redirect_to_field_id ) { 302 302 $raw_url = sanitize_url( rgar( $entry, $this->redirect_to_field_id ) ); … … 305 305 if ( !empty( $raw_url ) ) { 306 306 $redirect_to = urldecode( $raw_url ); 307 } 308 309 // Get user for potential fallback and filtering 310 $user_email = sanitize_email( rgar( $entry, $this->email_field_id ) ); 311 $user = $user_email ? get_user_by( 'email', $user_email ) : null; 312 313 if ( $user ) { 314 $access_admin = user_can( $user, 'read' ) && user_can( $user, 'access_admin' ); 315 316 // Priority 2: fallback only if redirect still not set 317 if ( !$redirect_to ) { 307 308 } else { 309 // Get user for potential fallback and filtering 310 $user_email = sanitize_email( rgar( $entry, $this->email_field_id ) ); 311 $user = $user_email ? get_user_by( 'email', $user_email ) : null; 312 313 if ( $user ) { 314 $access_admin = user_can( $user, 'manage_options' ); 315 316 // Fallback 318 317 $redirect_to = $access_admin ? admin_url() : home_url(); 319 } 320 321 // Apply final filter322 $redirect_to = apply_filters( 'gfat_user_landing_page', $redirect_to, $user, $access_admin );323 } 318 319 // Apply final filter 320 $redirect_to = apply_filters( 'gfat_user_landing_page', $redirect_to, $user, $access_admin ); 321 } 322 } 324 323 325 324 // If still no redirect, fallback to login page -
gf-tools/trunk/includes/class-wp-login.php
r3328469 r3426515 25 25 */ 26 26 public $page_ids = []; 27 28 29 /** 30 * Are we redirecting the core login page? 31 * 32 * @var boolean 33 */ 34 private $is_redirecting_core_login_page = false; 27 35 28 36 … … 38 46 $this->page_ids[ $option ] = isset( $plugin_settings[ $option . '_page' ] ) ? absint( $plugin_settings[ $option . '_page' ] ) : 0; 39 47 } 48 49 // Are we redirecting the core login page? 50 $this->is_redirecting_core_login_page = isset( $plugin_settings[ 'core_login_redirect' ] ) ? (bool) $plugin_settings[ 'core_login_redirect' ] : false; 40 51 41 52 // Registration … … 214 225 215 226 // Only redirect GET requests to custom login page for all other cases 216 if ( $this->is_ enabled( 'login' ) && $_SERVER[ 'REQUEST_METHOD' ] === 'GET' ) {227 if ( $this->is_redirecting_core_login_page && $this->is_enabled( 'login' ) && $_SERVER[ 'REQUEST_METHOD' ] === 'GET' ) { 217 228 $url = $this->page_url( 'login' ); 218 229 if ( $url ) { -
gf-tools/trunk/readme.txt
r3386074 r3426515 4 4 Requires at least: 5.9 5 5 Requires PHP: 7.4 6 Tested up to: 6. 87 Stable tag: 1.1. 26 Tested up to: 6.9 7 Stable tag: 1.1.3 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.txt … … 104 104 105 105 == Changelog == 106 = 1.1.3 = 107 * Update: Added option to redirect wp-login.php page in plugin settings under common forms 108 106 109 = 1.1.2 = 107 110 * Update: Added validation option to fields in the form editor
Note: See TracChangeset
for help on using the changeset viewer.