Changeset 3318579
- Timestamp:
- 06/27/2025 04:59:27 AM (8 months ago)
- Location:
- pinpointe-form-integration/trunk
- Files:
-
- 2 edited
-
pinpointe-signup-form.php (modified) (32 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
pinpointe-form-integration/trunk/pinpointe-signup-form.php
r3078552 r3318579 4 4 * Plugin URI: https://help.pinpointe.com/support/solutions/articles/5000664320-wordpress-plugin-download 5 5 * Description: Add Pinpointe forms to your WordPress site 6 * Version: 1.7 6 * Version: 1.7.1 7 7 * Author: Pinpointe 8 8 * Author URI: http://www.pinpointe.com/ 9 * Requires at least: 3.510 * Tested up to: 6. 5.29 * Requires at least: 6.5 10 * Tested up to: 6.8.1 11 11 * 12 12 * Text Domain: pinpointe 13 13 * Domain Path: /languages 14 * 14 * 15 15 * License: GPL-3.0+ 16 16 * License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 46 46 private $last_rendered_form = 0; 47 47 private $popup_page_capping_in_effect = false; 48 48 49 49 private $register_scripts_args = [ 50 50 // determines where the script is loaded(header/footer) … … 185 185 186 186 } 187 187 188 188 /** 189 189 * Validate all shortcodes and display warnings for missing ones. 190 * 190 * 191 191 * @return void 192 192 */ … … 564 564 565 565 $current_tab = $this->get_current_tab(true); 566 567 566 567 568 568 ?> 569 569 <div class="wrap pinpointe"> … … 646 646 'pinpointe_forms_send_confirmation' => '<p>'. esc_html('Whether or not to send a confirmation email to subscribers when they submit a subscription form. If selected, subscriptions will be recorded, but subscribers will be marked as Unconfirmed until they receive and choose to confirm their subscription via email.', 'pinpointe').'</p>', 647 647 ); 648 648 649 649 // sanitize $pinpointe_selected_lists 650 650 array_walk_recursive($pinpointe_selected_lists, function (&$value, $key) { … … 673 673 } 674 674 }); 675 675 676 676 // sanitize $pinpointe_selected_tags 677 677 array_walk_recursive($pinpointe_selected_tags, static function (&$value, $key) { … … 680 680 return; 681 681 } 682 682 683 683 if ($key === 'tags') { 684 684 $value = is_array($value) ? $value : [$value]; … … 686 686 return; 687 687 } 688 688 689 689 $value = sanitize_text_field($value); 690 690 }); … … 1068 1068 <td scope="row" colspan="2" id="forms_confirmation_email_td_<?php echo esc_attr($form_key) ?>"><strong><?php esc_html_e('Confirmation email', 'pinpointe'); ?></strong> 1069 1069 <br/> 1070 <?php 1070 <?php 1071 1071 wp_enqueue_editor(); 1072 1072 $editor_key = 'pinpointe_forms_html_confirmation_email_' . $form_key; … … 1078 1078 1079 1079 echo '<textarea class="pinpointe-field pinpointe_forms_html_confirmation_email" name="' . esc_attr($textarea_name) . '" id="' . esc_attr($editor_key) . '" rows="25" style="width:100%">' . esc_textarea($content) . '</textarea>'; 1080 1080 1081 1081 ?> 1082 1082 </td> … … 1090 1090 <?php esc_html_e('Connecting to Pinpointe...', 'pinpointe'); ?> 1091 1091 </p> 1092 1092 1093 1093 <div class="pinpointe_forms_section">List</div> 1094 1094 <?php wp_nonce_field('ajax_get_tags_groups_fields', 'pinpointe_get_tags_with_multiple_groups_and_fields'); ?> … … 1098 1098 </p> 1099 1099 <?php wp_nonce_field('ajax_get_lists', 'pinpointe_get_lists'); ?> 1100 1100 1101 1101 <table class="form-table"> 1102 1102 <tbody> … … 1109 1109 </td> 1110 1110 </tr> 1111 </tbody> 1111 </tbody> 1112 1112 </table> 1113 1113 … … 1116 1116 <p id="pinpointe_fields_table_<?php echo esc_attr($form_key); ?>" class="pinpointe_loading_list pinpointe_forms_field_fields"> 1117 1117 <span class="pinpointe_loading_icon"></span> 1118 1118 1119 1119 <?php esc_html_e('Connecting to Pinpointe...', 'pinpointe'); ?> 1120 1120 </p> … … 1819 1819 $message = (!isset($error['custom']) ? $messages[$error['code']] : $error['custom']) . '. ' . __('Reverted to a previous state.', 'pinpointe'); 1820 1820 $setting = $error['setting']; 1821 1821 1822 1822 if (array_key_exists($error['setting'], $this->titles) && isset($this->titles[$error['setting']])) { 1823 1823 $setting = $this->titles[$error['setting']]; 1824 1824 } 1825 1826 1825 1826 1827 1827 $code = array_key_exists('code', $error) && isset($error['code']) 1828 1828 ? $error['code'] 1829 1829 : $error['custom']; 1830 1830 1831 1831 add_settings_error( 1832 1832 'pinpointe_settings_updated', … … 1846 1846 * @param bool $show_mailing_list Whether to show the mailing list for the form. 1847 1847 * 1848 * @throws \Exception If options cannot be saved || tag_ids is empty 1848 * @throws \Exception If options cannot be saved || tag_ids is empty 1849 1849 */ 1850 1850 public function saveTagMetadata($form_id, $show_mailing_list, $tag_ids = []) … … 1862 1862 // get the saved tag_metatada 1863 1863 $existing_metadata = $this->get_tag_metadata(); 1864 1864 1865 1865 if (empty($existing_metadata)) { 1866 1866 $existing_metadata[] = [ … … 1872 1872 } else { 1873 1873 $is_form_id_found = false; 1874 1874 1875 1875 // loop through $existing_metadata to update or add new entry 1876 1876 // take note we are modifying the &$existing_metadata if form_id has been is_form_id_found … … 1880 1880 $metadata['show_mailing_list'] = $show_mailing_list; 1881 1881 $metadata['hash'] = md5(time()); 1882 1882 1883 1883 $is_form_id_found = true; 1884 1884 break; // exit the loop once we've modified the form_id's metadata 1885 1885 } 1886 1886 } 1887 1887 1888 1888 unset($metadata); // unset the reference - cause we were modifying it and we are done 1889 1889 1890 1890 // If metadata for the form_id doesn't exist, create a new entry 1891 1891 if (!$is_form_id_found) { … … 1899 1899 } 1900 1900 } 1901 1901 1902 1902 $status = update_option('pinpointe_tags_metadata', $existing_metadata); 1903 1903 … … 1921 1921 if ($form_id !== null && isset($results[$form_id])) { 1922 1922 return $results[$form_id]; 1923 } 1923 } 1924 1924 1925 1925 return $results ? $results : []; … … 2011 2011 // Font awesome (icons) 2012 2012 wp_register_style('pinpointe-font-awesome', PINPOINTE_PLUGIN_URL . '/assets/css/font-awesome/css/font-awesome.min.css', array(), '6.5.2'); 2013 2013 2014 2014 // register tom select 2015 2015 wp_register_style('pinpointe-tom-select-styles', PINPOINTE_PLUGIN_URL . '/assets/css/tom-select/tom-select.css', array(), '2.3.1'); 2016 2016 wp_register_script('pinpointe-tom-select-scripts', PINPOINTE_PLUGIN_URL . '/assets/js/tom-select.js', 2017 2017 array(), '2.3.1',$this->register_scripts_args); 2018 2018 2019 2019 // Our own scripts and styles 2020 2020 wp_register_script('pinpointe-admin-scripts', PINPOINTE_PLUGIN_URL . '/assets/js/pinpointe-admin.js', … … 2022 2022 wp_register_style('pinpointe-admin-styles', PINPOINTE_PLUGIN_URL . '/assets/css/style-admin.css', array(), PINPOINTE_VERSION); 2023 2023 wp_register_style('pinpointe-jquery-ui-styles', PINPOINTE_PLUGIN_URL . '/assets/css/jquery-ui.theme.css', array(), PINPOINTE_VERSION); 2024 2024 2025 2025 // Scripts 2026 2026 wp_enqueue_script('jquery'); … … 2192 2192 $value = is_string($value) ? sanitize_text_field($value) : $value; 2193 2193 }); 2194 2194 2195 2195 echo wp_json_encode(array('message' => array('tags' => $tags))); 2196 2196 die(); … … 2206 2206 { 2207 2207 check_ajax_referer(__FUNCTION__, '_wpnonce'); 2208 2208 2209 2209 if (isset($_POST['data'])) { 2210 2210 // Sanitize input data … … 2246 2246 $lists_to_get[] = $form['list']; 2247 2247 } 2248 2248 2249 2249 // Get merge vars 2250 2250 // only fetch merge_vars with lists in lists_to_get instead of every list. … … 2344 2344 'description' => isset($tag['description']) || !empty($tag['description']) ? $tag['description'] : 'Default description for ' . $tag['name'] 2345 2345 ); 2346 2346 2347 2347 if (isset($tag['tagid'])) { // for xml api 2348 2348 $results[$tag['tagid']] = $tagInfo; … … 2350 2350 $results[$tag['id']] = $tagInfo; 2351 2351 } 2352 2352 2353 2353 } 2354 2354 … … 2738 2738 2739 2739 break; 2740 2740 2741 2741 /** 2742 2742 * POSTS NOT … … 4289 4289 $currentPageHits = intval(sanitize_text_field($_COOKIE['pinpointe_p'])); 4290 4290 $maxAllowedHits = intval($this->opt['pinpointe_popup_page_limit']); 4291 4291 4292 4292 if ($currentPageHits < $maxAllowedHits) { 4293 4293 setcookie('pinpointe_p', ($currentPageHits + 1), (time()+60*60*24*30), '/'); … … 4665 4665 { 4666 4666 $ip_address = '0.0.0.0'; 4667 4667 4668 4668 if (array_key_exists('HTTP_X_FORWARDED_FOR', $_SERVER) && !empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { 4669 4669 if (strpos($_SERVER['HTTP_X_FORWARDED_FOR'], ',') > 0) { … … 4678 4678 $ip_address = sanitize_text_field($_SERVER['REMOTE_ADDR']); 4679 4679 } 4680 4680 4681 4681 if (!filter_var($ip_address, FILTER_VALIDATE_IP)) { 4682 4682 error_log("Invalid IP address detected: {$ip_address}"); 4683 4683 return '0.0.0.0'; // Return invalid IP when invalid input received 4684 4684 } 4685 4685 4686 4686 return $ip_address; 4687 4687 } -
pinpointe-form-integration/trunk/readme.txt
r3078552 r3318579 2 2 Contributors: pinpointe 3 3 Tags: email marketing, forms, opt-in, mailing list, subscription 4 Requires at least: 3.55 Tested up to: 6. 5.26 Stable tag: 1.7 7 Requires PHP: 5.44 Requires at least: 6.5 5 Tested up to: 6.8.1 6 Stable tag: 1.7.1 7 Requires PHP: 7.0 8 8 License: GPLv3 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 16 16 The Pinpointe Form Integration plugin for WordPress lets you easily add dynamic forms to your site or blog. Advanced features include: 17 17 18 * Display forms on home page, pages, posts and in other WordPress content 18 * Display forms on home page, pages, posts and in other WordPress content 19 19 * Show popups and customize how often they appear 20 20 * Users can submit their info without ever leaving your pages (AJAX)
Note: See TracChangeset
for help on using the changeset viewer.