芝麻web文件管理V1.00
编辑当前文件:/home/royashxg/www/wp-content/plugins/elementor-pro/modules/forms/actions/redirect.php
start_controls_section( 'section_redirect', [ 'label' => esc_html__( 'Redirect', 'elementor-pro' ), 'condition' => [ 'submit_actions' => $this->get_name(), ], ] ); $widget->add_control( 'redirect_to', [ 'label' => esc_html__( 'Redirect To', 'elementor-pro' ), 'type' => Controls_Manager::TEXT, 'placeholder' => esc_html__( 'https://your-link.com', 'elementor-pro' ), 'ai' => [ 'active' => false, ], 'dynamic' => [ 'active' => true, 'categories' => [ TagsModule::POST_META_CATEGORY, TagsModule::TEXT_CATEGORY, TagsModule::URL_CATEGORY, ], ], 'label_block' => true, 'render_type' => 'none', 'classes' => 'elementor-control-direction-ltr', ] ); $widget->end_controls_section(); } public function on_export( $element ) { unset( $element['settings']['redirect_to'] ); return $element; } public function run( $record, $ajax_handler ) { $redirect_to = $record->get_form_settings( 'redirect_to' ); $redirect_to = $record->replace_setting_shortcodes( $redirect_to, true ); $redirect_to = esc_url_raw( $redirect_to ); if ( ! empty( $redirect_to ) && filter_var( $redirect_to, FILTER_VALIDATE_URL ) ) { $ajax_handler->add_response_data( 'redirect_url', $redirect_to ); } } }