Changeset 3347505
- Timestamp:
- 08/20/2025 11:52:54 AM (7 months ago)
- Location:
- doppler-form
- Files:
-
- 194 added
- 1 deleted
- 7 edited
-
tags/2.5.0 (added)
-
tags/2.5.0/admin (added)
-
tags/2.5.0/admin/.sass-cache (added)
-
tags/2.5.0/admin/.sass-cache/f7e2660441ec604ca482848e1dc51b0c344ea41a (added)
-
tags/2.5.0/admin/.sass-cache/f7e2660441ec604ca482848e1dc51b0c344ea41a/colorpicker.scssc (added)
-
tags/2.5.0/admin/.sass-cache/f7e2660441ec604ca482848e1dc51b0c344ea41a/doppler-form-admin.scssc (added)
-
tags/2.5.0/admin/.sass-cache/f7e2660441ec604ca482848e1dc51b0c344ea41a/grid.scssc (added)
-
tags/2.5.0/admin/.sass-cache/f7e2660441ec604ca482848e1dc51b0c344ea41a/simple-grid.scssc (added)
-
tags/2.5.0/admin/controllers (added)
-
tags/2.5.0/admin/controllers/Form_Controller.php (added)
-
tags/2.5.0/admin/css (added)
-
tags/2.5.0/admin/css/abstracts (added)
-
tags/2.5.0/admin/css/abstracts/_mixins.scss (added)
-
tags/2.5.0/admin/css/abstracts/_variables.scss (added)
-
tags/2.5.0/admin/css/base (added)
-
tags/2.5.0/admin/css/base/_globals.scss (added)
-
tags/2.5.0/admin/css/colorpicker.css (added)
-
tags/2.5.0/admin/css/components (added)
-
tags/2.5.0/admin/css/components/_alerts.scss (added)
-
tags/2.5.0/admin/css/components/_button.scss (added)
-
tags/2.5.0/admin/css/components/_form.scss (added)
-
tags/2.5.0/admin/css/components/_menu.scss (added)
-
tags/2.5.0/admin/css/components/_page-loading.scss (added)
-
tags/2.5.0/admin/css/components/_panel.scss (added)
-
tags/2.5.0/admin/css/components/_tooltip.scss (added)
-
tags/2.5.0/admin/css/doppler-form-admin.css (added)
-
tags/2.5.0/admin/css/doppler-form-admin.scss (added)
-
tags/2.5.0/admin/css/fonts (added)
-
tags/2.5.0/admin/css/fonts/ProximaNova-Bold.eot (added)
-
tags/2.5.0/admin/css/fonts/ProximaNova-Bold.ttf (added)
-
tags/2.5.0/admin/css/fonts/ProximaNova-Bold.woff (added)
-
tags/2.5.0/admin/css/fonts/ProximaNova-BoldIt.eot (added)
-
tags/2.5.0/admin/css/fonts/ProximaNova-BoldIt.ttf (added)
-
tags/2.5.0/admin/css/fonts/ProximaNova-BoldIt.woff (added)
-
tags/2.5.0/admin/css/fonts/ProximaNova-Regular.eot (added)
-
tags/2.5.0/admin/css/fonts/ProximaNova-Regular.ttf (added)
-
tags/2.5.0/admin/css/fonts/ProximaNova-Regular.woff (added)
-
tags/2.5.0/admin/css/fonts/ProximaNova-RegularIt.eot (added)
-
tags/2.5.0/admin/css/fonts/ProximaNova-RegularIt.ttf (added)
-
tags/2.5.0/admin/css/fonts/ProximaNova-RegularIt.woff (added)
-
tags/2.5.0/admin/css/fonts/fonts.css (added)
-
tags/2.5.0/admin/css/jquery.colorpicker (added)
-
tags/2.5.0/admin/css/jquery.colorpicker/colorpicker.css (added)
-
tags/2.5.0/admin/css/jquery.colorpicker/layout.css (added)
-
tags/2.5.0/admin/css/layout (added)
-
tags/2.5.0/admin/css/layout/_settings.scss (added)
-
tags/2.5.0/admin/css/pages (added)
-
tags/2.5.0/admin/css/pages/_connect.scss (added)
-
tags/2.5.0/admin/css/pages/_crud.scss (added)
-
tags/2.5.0/admin/css/pages/_extensions.scss (added)
-
tags/2.5.0/admin/css/pages/_forms.scss (added)
-
tags/2.5.0/admin/css/pages/_page_form.scss (added)
-
tags/2.5.0/admin/css/style.css (added)
-
tags/2.5.0/admin/doppler-admin.php (added)
-
tags/2.5.0/admin/fonts (added)
-
tags/2.5.0/admin/fonts/glyphicons-halflings-regular.eot (added)
-
tags/2.5.0/admin/fonts/glyphicons-halflings-regular.svg (added)
-
tags/2.5.0/admin/fonts/glyphicons-halflings-regular.ttf (added)
-
tags/2.5.0/admin/fonts/glyphicons-halflings-regular.woff (added)
-
tags/2.5.0/admin/fonts/glyphicons-halflings-regular.woff2 (added)
-
tags/2.5.0/admin/img (added)
-
tags/2.5.0/admin/img/Check-black.svg (added)
-
tags/2.5.0/admin/img/MS.png (added)
-
tags/2.5.0/admin/img/MS_logo.svg (added)
-
tags/2.5.0/admin/img/bar.png (added)
-
tags/2.5.0/admin/img/bullet-points.svg (added)
-
tags/2.5.0/admin/img/check.png (added)
-
tags/2.5.0/admin/img/checklist.svg (added)
-
tags/2.5.0/admin/img/close.svg (added)
-
tags/2.5.0/admin/img/doppler.png (added)
-
tags/2.5.0/admin/img/hat.svg (added)
-
tags/2.5.0/admin/img/headphones.svg (added)
-
tags/2.5.0/admin/img/help-icon.svg (added)
-
tags/2.5.0/admin/img/icon-doppler-menu.png (added)
-
tags/2.5.0/admin/img/icon.png (added)
-
tags/2.5.0/admin/img/learnpress-logo.png (added)
-
tags/2.5.0/admin/img/loading.gif (added)
-
tags/2.5.0/admin/img/logo-doppler.svg (added)
-
tags/2.5.0/admin/img/ok-message.svg (added)
-
tags/2.5.0/admin/img/pencil.svg (added)
-
tags/2.5.0/admin/img/screenshot-1-esp.png (added)
-
tags/2.5.0/admin/img/screenshot-1.png (added)
-
tags/2.5.0/admin/img/screenshot-2-esp.png (added)
-
tags/2.5.0/admin/img/screenshot-2.png (added)
-
tags/2.5.0/admin/img/screenshot-3-esp.png (added)
-
tags/2.5.0/admin/img/screenshot-3.png (added)
-
tags/2.5.0/admin/img/search.svg (added)
-
tags/2.5.0/admin/img/shopping-violet.svg (added)
-
tags/2.5.0/admin/img/shopping.svg (added)
-
tags/2.5.0/admin/img/status-ckeck-icon.svg (added)
-
tags/2.5.0/admin/img/tip-icon.svg (added)
-
tags/2.5.0/admin/img/woocommerce-logo.png (added)
-
tags/2.5.0/admin/img/youtube.svg (added)
-
tags/2.5.0/admin/index.php (added)
-
tags/2.5.0/admin/js (added)
-
tags/2.5.0/admin/js/bootstrap.min.js (added)
-
tags/2.5.0/admin/js/colorpicker.js (added)
-
tags/2.5.0/admin/js/doppler-elementor.js (added)
-
tags/2.5.0/admin/js/doppler-form-admin.js (added)
-
tags/2.5.0/admin/js/doppler-styles.js (added)
-
tags/2.5.0/admin/js/field-module.js (added)
-
tags/2.5.0/admin/js/forms.js (added)
-
tags/2.5.0/admin/package.json (added)
-
tags/2.5.0/admin/partials (added)
-
tags/2.5.0/admin/partials/api-connection.php (added)
-
tags/2.5.0/admin/partials/doppler-forms-display.php (added)
-
tags/2.5.0/admin/partials/forms-create.php (added)
-
tags/2.5.0/admin/partials/forms-edit.php (added)
-
tags/2.5.0/admin/partials/forms-list.php (added)
-
tags/2.5.0/admin/partials/lists-crud.php (added)
-
tags/2.5.0/admin/partials/loading.php (added)
-
tags/2.5.0/admin/partials/settings.php (added)
-
tags/2.5.0/doppler-form.php (added)
-
tags/2.5.0/includes (added)
-
tags/2.5.0/includes/DopplerAPIClient (added)
-
tags/2.5.0/includes/DopplerAPIClient/DopplerService.php (added)
-
tags/2.5.0/includes/DopplerAPIClient/lib (added)
-
tags/2.5.0/includes/DopplerAPIClient/lib/httpful.phar (added)
-
tags/2.5.0/includes/DopplerAPIClient/readme.md (added)
-
tags/2.5.0/includes/class-doppler-elementor-integration.php (added)
-
tags/2.5.0/includes/class-doppler-extension-manager.php (added)
-
tags/2.5.0/includes/class-doppler-form-activator.php (added)
-
tags/2.5.0/includes/class-doppler-form-deactivator.php (added)
-
tags/2.5.0/includes/class-doppler-form-generator.php (added)
-
tags/2.5.0/includes/class-doppler-form-i18n.php (added)
-
tags/2.5.0/includes/class-doppler-form-loader.php (added)
-
tags/2.5.0/includes/class-doppler-form-widget.php (added)
-
tags/2.5.0/includes/class-doppler-form.php (added)
-
tags/2.5.0/includes/enums (added)
-
tags/2.5.0/includes/enums/EventType.php (added)
-
tags/2.5.0/includes/helpers (added)
-
tags/2.5.0/includes/helpers/Form_Helper.php (added)
-
tags/2.5.0/includes/index.php (added)
-
tags/2.5.0/includes/models (added)
-
tags/2.5.0/includes/models/Base_Model.php (added)
-
tags/2.5.0/includes/models/Field_Model.php (added)
-
tags/2.5.0/includes/models/Form_Model.php (added)
-
tags/2.5.0/index.php (added)
-
tags/2.5.0/languages (added)
-
tags/2.5.0/languages/doppler-form-es_AR.mo (added)
-
tags/2.5.0/languages/doppler-form-es_AR.po (added)
-
tags/2.5.0/languages/doppler-form-es_CL.mo (added)
-
tags/2.5.0/languages/doppler-form-es_CL.po (added)
-
tags/2.5.0/languages/doppler-form-es_CO.mo (added)
-
tags/2.5.0/languages/doppler-form-es_CO.po (added)
-
tags/2.5.0/languages/doppler-form-es_CR.mo (added)
-
tags/2.5.0/languages/doppler-form-es_CR.po (added)
-
tags/2.5.0/languages/doppler-form-es_DO.mo (added)
-
tags/2.5.0/languages/doppler-form-es_DO.po (added)
-
tags/2.5.0/languages/doppler-form-es_EC.mo (added)
-
tags/2.5.0/languages/doppler-form-es_EC.po (added)
-
tags/2.5.0/languages/doppler-form-es_ES.mo (added)
-
tags/2.5.0/languages/doppler-form-es_ES.po (added)
-
tags/2.5.0/languages/doppler-form-es_GT.mo (added)
-
tags/2.5.0/languages/doppler-form-es_GT.po (added)
-
tags/2.5.0/languages/doppler-form-es_MX.mo (added)
-
tags/2.5.0/languages/doppler-form-es_MX.po (added)
-
tags/2.5.0/languages/doppler-form-es_PE.mo (added)
-
tags/2.5.0/languages/doppler-form-es_PE.po (added)
-
tags/2.5.0/languages/doppler-form-es_PR.mo (added)
-
tags/2.5.0/languages/doppler-form-es_PR.po (added)
-
tags/2.5.0/languages/doppler-form-es_UY.mo (added)
-
tags/2.5.0/languages/doppler-form-es_UY.po (added)
-
tags/2.5.0/languages/doppler-form-es_VE.mo (added)
-
tags/2.5.0/languages/doppler-form-es_VE.po (added)
-
tags/2.5.0/languages/doppler-form.mo (added)
-
tags/2.5.0/languages/doppler-form.pot (added)
-
tags/2.5.0/license.txt (added)
-
tags/2.5.0/public (added)
-
tags/2.5.0/public/.sass-cache (added)
-
tags/2.5.0/public/.sass-cache/a14f3889e9248356d5c85a92c7ca4ae1e6136864 (added)
-
tags/2.5.0/public/.sass-cache/a14f3889e9248356d5c85a92c7ca4ae1e6136864/doppler-form-public.scssc (added)
-
tags/2.5.0/public/ajax (added)
-
tags/2.5.0/public/ajax/doppler-form-public-ajax.php (added)
-
tags/2.5.0/public/css (added)
-
tags/2.5.0/public/css/doppler-form-public.css (added)
-
tags/2.5.0/public/css/doppler-form-public.css.map (added)
-
tags/2.5.0/public/css/doppler-form-public.scss (added)
-
tags/2.5.0/public/doppler-forms-public.php (added)
-
tags/2.5.0/public/img (added)
-
tags/2.5.0/public/img/spinner.svg (added)
-
tags/2.5.0/public/index.php (added)
-
tags/2.5.0/public/js (added)
-
tags/2.5.0/public/js/doppler-form-public.js (added)
-
tags/2.5.0/public/partials (added)
-
tags/2.5.0/public/partials/doppler-forms-public-display.php (added)
-
tags/2.5.0/public/scss (added)
-
tags/2.5.0/public/scss/doppler-form-public.css (added)
-
tags/2.5.0/public/scss/doppler-form-public.css.map (added)
-
tags/2.5.0/public/scss/doppler-form-public.scss (added)
-
tags/2.5.0/readme.txt (added)
-
tags/2.5.0/uninstall.php (added)
-
trunk/admin/doppler-admin.php (modified) (3 diffs)
-
trunk/admin/js/doppler-elementor.js (added)
-
trunk/admin/partials/api-connection.php (modified) (1 diff)
-
trunk/doppler-form.php (modified) (3 diffs)
-
trunk/includes/class-doppler-elementor-integration.php (added)
-
trunk/includes/class-doppler-extension-manager.php (modified) (2 diffs)
-
trunk/includes/class-doppler-form-loader.php (modified) (1 diff)
-
trunk/includes/class-doppler-form.php (modified) (3 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/test (deleted)
Legend:
- Unmodified
- Added
- Removed
-
doppler-form/trunk/admin/doppler-admin.php
r3313204 r3347505 42 42 $this->error_message = false; 43 43 $this->form_controller = new DPLR_Form_Controller($doppler_service); 44 $this->extension_manager = new Doppler_Extension_Manager( );44 $this->extension_manager = new Doppler_Extension_Manager($doppler_service); 45 45 $this->connection_status = false; 46 46 } … … 185 185 186 186 $data = $this->get_Chart_Data(); 187 188 187 wp_localize_script($this->plugin_name, 'chartData', ['data' => $data]); 188 } 189 190 public function enqueDopplerFieldsForElementor() { 191 $fields = $this->doppler_service->getResource('fields')->getAllFields(); 192 193 if ( 194 empty($fields) || 195 !is_object($fields) || 196 !property_exists($fields, 'items') || 197 !is_array($fields->items) 198 ) { 199 return; 200 } 201 202 wp_localize_script('doppler-elementor', 'dopplerFields', $this->map_fields_for_elementor($fields)); 203 } 204 205 private function map_fields_for_elementor($fields) { 206 $type_map = [ 207 'string' => 'text', 208 'email' => 'email', 209 'phone' => 'tel', 210 'boolean' => 'acceptance', 211 'number' => 'number', 212 'date' => 'date', 213 'permission' => 'acceptance', 214 ]; 215 $excluded_fields = ['GENDER', 'COUNTRY']; 216 217 // Filter out excluded_fieldsor or read-only fields (Except for EMAIL). 218 $filtered_fields = array_values(array_filter($fields->items, function ($field) use ($excluded_fields) { 219 return !in_array($field->name, $excluded_fields) 220 && (!property_exists($field, 'readonly') || $field->readonly != 1 || $field->name === 'EMAIL'); 221 })); 222 223 //Map fields to the format required by Elementor. 224 $mapped = array_map(function($field) use ($type_map) { 225 return [ 226 'remote_label' => $field->name, 227 'remote_type' => $type_map[$field->type] ?? 'text', 228 'doppler_type' => $field->type, 229 'remote_id' => $field->fieldId, 230 'remote_required' => (bool) $field->required, 231 ]; 232 }, $filtered_fields); 233 234 // Sort fields by priority. Basic Fields should be shown first. 235 $priority = ['EMAIL', 'FIRSTNAME', 'LASTNAME', 'BIRTHDAY']; 236 237 $prioritized = []; 238 $others = []; 239 240 foreach ($mapped as $item) { 241 $fieldName = $item['remote_label']; 242 if (in_array($fieldName, $priority)) { 243 $prioritized[$fieldName] = $item; 244 } else { 245 $others[] = $item; 246 } 247 } 248 249 // Order priority fields. 250 $ordered_prioritized = []; 251 foreach ($priority as $key) { 252 if (isset($prioritized[$key])) { 253 $ordered_prioritized[] = $prioritized[$key]; 254 } 255 } 256 257 return array_merge($ordered_prioritized, $others); 189 258 } 190 259 … … 293 362 294 363 try{ 295 //Credentials are saved. Check against API only in connection screen. 296 if($this->doppler_service->setCredentials(['api_key' => $options['dplr_option_apikey'], 'user_account' => $options['dplr_option_useraccount']])){ 297 //neccesary check against api here? 298 $connection_status = $this->doppler_service->connectionStatus(); 299 300 if( is_array($connection_status) && $connection_status['response']['code'] === 200 ){ 301 $connected = true; 302 303 $forms = $this->form_controller->getAll(true, true); 304 } 364 $connection_status = $this->doppler_service->connectionStatus(); 365 366 if( is_array($connection_status) && $connection_status['response']['code'] === 200 ){ 367 $connected = true; 368 369 $forms = $this->form_controller->getAll(true, true); 305 370 } 371 306 372 //If saved credentials don't pass API test, unset them, disconnect and show error. 307 373 if ($connected !== true) { -
doppler-form/trunk/admin/partials/api-connection.php
r3301444 r3347505 334 334 <?php else: 335 335 if(!$this->extension_manager->has_latest_plugin_version('doppler-for-woocommerce')): ?> 336 <button type="button" class="dp-button button-big primary-green button-small dp-install m-t-12 col-sm-12 button--loading"336 <button type="button" class="dp-button button-big primary-green button-small dp-install m-t-12 col-sm-12" 337 337 data-extension="doppler-for-woocommerce" data-click-action=<?php _e('Updating', 'doppler-form') ?>> 338 338 <?php _e('Update Version', 'doppler-form') ?> -
doppler-form/trunk/doppler-form.php
r3331435 r3347505 16 16 * Plugin Name: Doppler Forms 17 17 * Description: Crea Formularios de Suscripción con la misma estética de tu sitio web o blog en minutos. Conéctalo con Doppler y envía a tus nuevos contactos automáticamente a una Lista de Suscriptores. 18 * Version: 2. 4.818 * Version: 2.5.0 19 19 * Author: Doppler LLC 20 20 * Author URI: https://www.fromdoppler.com/ … … 30 30 } 31 31 32 if( !defined('DOPPLER_FORM_VERSION') ) define( 'DOPPLER_FORM_VERSION', '2. 4.8' );32 if( !defined('DOPPLER_FORM_VERSION') ) define( 'DOPPLER_FORM_VERSION', '2.5.0' ); 33 33 if( !defined('WP_DEBUG_LOG_DOPPLER_PLUGINS') ) define( 'WP_DEBUG_LOG_DOPPLER_PLUGINS', false ); 34 34 … … 73 73 require plugin_dir_path( __FILE__ ) . 'includes/class-doppler-form.php'; 74 74 75 //This action has to be added to the main plugin file to ensure that the Elementor integration script is loaded correctly. 76 add_action('elementor/editor/after_enqueue_scripts', function() { 77 wp_enqueue_script( 78 'doppler-elementor', 79 plugin_dir_url(__FILE__) . 'admin/js/doppler-elementor.js', 80 array('jquery'), 81 '1.0.0', 82 true 83 ); 84 }); 75 85 /** 76 86 * Begins execution of the plugin. -
doppler-form/trunk/includes/class-doppler-extension-manager.php
r3261515 r3347505 2 2 3 3 class Doppler_Extension_Manager { 4 5 private $doppler_service; 6 7 public function __construct( $doppler_service ) { 8 $this->doppler_service = $doppler_service; 9 } 4 10 5 11 public $extensions = array( … … 143 149 } 144 150 } 151 152 public function add_elementor_action( $form_actions_registrar ) { 153 include_once( __DIR__ . '/class-doppler-elementor-integration.php' ); 154 $form_actions_registrar->register( new Doppler_Elementor_Integration($this->doppler_service) ); 155 } 145 156 } -
doppler-form/trunk/includes/class-doppler-form-loader.php
r2155762 r3347505 82 82 } 83 83 84 public function add_elementor_action( $hook, $component, $callback, $priority = 10, $accepted_args = 1 ) { 85 add_action('elementor/init', function() use ($hook, $component, $callback, $priority, $accepted_args) { 86 add_action($hook, array($component, $callback), $priority, $accepted_args); 87 }); 88 } 89 84 90 /** 85 91 * A utility function that is used to register the actions and hooks into a single -
doppler-form/trunk/includes/class-doppler-form.php
r3222869 r3347505 82 82 ]); 83 83 84 if ( 85 !empty($options['dplr_option_apikey']) && 86 !empty($options['dplr_option_useraccount']) 87 ) { 88 $this->doppler_service->setCredentials([ 89 'api_key' => $options['dplr_option_apikey'], 90 'user_account' => $options['dplr_option_useraccount'] 91 ]); 92 } 93 84 94 $this->load_shortcodes(); 85 95 $this->load_dependencies(); … … 175 185 176 186 $plugin_admin = new Doppler_Admin( $this->get_plugin_name(), $this->get_version(), $this->doppler_service); 177 $extension_manager = new Doppler_Extension_Manager( );178 187 $extension_manager = new Doppler_Extension_Manager($this->doppler_service); 188 179 189 $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' ); 180 190 $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' ); … … 191 201 $this->loader->add_action( 'wp_ajax_dplr_delete_list', $plugin_admin, 'ajax_delete_list' ); 192 202 $this->loader->add_action( 'wp_ajax_install_extension', $extension_manager, 'install_extension' ); 193 203 $this->loader->add_elementor_action( 'elementor_pro/forms/actions/register', $extension_manager, 'add_elementor_action' ); 204 $this->loader->add_action( 'elementor/editor/after_enqueue_scripts', $plugin_admin, 'enqueDopplerFieldsForElementor' ); 194 205 } 195 206 -
doppler-form/trunk/readme.txt
r3331435 r3347505 6 6 Tested up to: 6.8.1 7 7 Requires PHP: 5.6.4 8 Stable tag: 2. 4.88 Stable tag: 2.5.0 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 89 89 90 90 == Changelog == 91 92 = 2.4.7 = 91 = 2.5.0 = 92 * Feat: Add integration with Elementor Pro forms. 93 94 = 2.4.8 = 93 95 * Fix: validate content when on code editor for double optin forms. 94 96 * Fix: remove default escape slashing for doble optin content.
Note: See TracChangeset
for help on using the changeset viewer.