Changeset 3441586
- Timestamp:
- 01/17/2026 01:36:21 PM (8 weeks ago)
- Location:
- elementinvader-addons-for-elementor/trunk
- Files:
-
- 6 edited
-
README.txt (modified) (2 diffs)
-
elementinvader-addons-for-elementor.php (modified) (4 diffs)
-
modules/forms/ajax-handler.php (modified) (2 diffs)
-
modules/mail_base/mail_base.php (modified) (2 diffs)
-
views/blog_preview/meta.php (modified) (1 diff)
-
widgets/blog-grid.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
elementinvader-addons-for-elementor/trunk/README.txt
r3375965 r3441586 5 5 Requires at least: 5.2 6 6 Requires PHP: 5.6 7 Tested up to: 6. 88 Stable tag: 1.4. 17 Tested up to: 6.9 8 Stable tag: 1.4.2 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 89 89 == Changelog == 90 90 91 = 1.4.2 = 92 * Security fix 93 91 94 = 1.4.1 = 92 95 * Disable retrieved in form email / name from 96 * _load_textdomain_just_in_time issue 93 97 94 98 = 1.4.0 = -
elementinvader-addons-for-elementor/trunk/elementinvader-addons-for-elementor.php
r3375965 r3441586 5 5 * Description: Ready to use Elementor Addon Elements like Menu, Forms, Maps, Newsletter with many styling options 6 6 * Plugin URI: https://elementinvader.com 7 * Version: 1.4. 17 * Version: 1.4.2 8 8 * Author: ElementInvader 9 9 * Author URI: https://elementinvader.com … … 25 25 $ELEMENTINVADER_ADDONS_FOR_ELEMENTOR_PROTOCOL = stripos($elementinvader_addons_for_elementor_server_prtc, 'https') !== false ? 'https://' : 'http://'; 26 26 define('ELEMENTINVADER_ADDONS_FOR_ELEMENTOR_PROTOCOL', $ELEMENTINVADER_ADDONS_FOR_ELEMENTOR_PROTOCOL); 27 28 29 27 30 /** 28 31 * Elementor Blocks … … 32 35 * @since 1.0.0 33 36 */ 34 function ELEMENTINVADER_ADDONS_FOR_ELEMENTOR_load() 37 38 add_action('init', function () 35 39 { 36 40 … … 79 83 return; 80 84 } 85 }); 86 87 88 89 /** 90 * Elementor Blocks 91 * 92 * Load the plugin after Elementor (and other plugins) are loaded. 93 * 94 * @since 1.0.0 95 */ 96 function ELEMENTINVADER_ADDONS_FOR_ELEMENTOR_load() 97 { 98 99 // Load wlistingation file 100 load_plugin_textdomain('elementinvader-addons-for-elementor', false, basename(dirname(__FILE__)) . '/locale'); 101 102 // Notice if the Elementor is not active 103 if (! did_action('elementor/loaded')) { 104 return; 105 } 106 107 // Check required version 108 $elementor_version_required = '1.8.0'; 109 if (! version_compare(ELEMENTOR_VERSION, $elementor_version_required, '>=')) { 110 return; 111 } 81 112 82 113 // Require the main plugin file -
elementinvader-addons-for-elementor/trunk/modules/forms/ajax-handler.php
r3375965 r3441586 555 555 } 556 556 } 557 558 if($email && !empty($form_data['send_action_brevo_api_key']) && !empty($form_data['send_action_brevo_list_id'])) { 559 $this->bravo($form_data['send_action_brevo_api_key'], $form_data['send_action_brevo_list_id'], 'create_add', $email); 560 } 557 561 /* end action after send */ 558 562 … … 810 814 return $string; 811 815 } 816 817 818 /** 819 * Bravo Api https://developers.brevo.com/ 820 * @param string $apiKey Date in string 821 * @param string $listid Number of list id (if need add contact into list) 822 * @param string $action create|add|create_add (create - add new contact, add - add into list, create_add - create contact and add into list) 823 * @param string $email email of contact is required field 824 * 825 * @return string true or contact id 826 */ 827 828 public function bravo($apiKey = null, $listid = null, $action = 'create', $email = '') { 829 if(empty($apiKey)) return false; 830 if(empty($email)) return false; 831 832 switch ($action) { 833 case 'create': 834 return ($this->_bravo_create ($apiKey, $email)) ? true : false; 835 break; 836 case 'add': 837 if(empty($listid)) return false; 838 return ($this->_bravo_add_to_list ($apiKey, $listid, $email)) ? true : false; 839 break; 840 case 'create_add': 841 if(empty($listid)) return false; 842 843 $this->_bravo_create ($apiKey, $email); 844 if(true) { 845 return ($this->_bravo_add_to_list ($apiKey, $listid, $email)) ? true : false; 846 } 847 848 return false; 849 break; 850 } 851 852 return false; 853 854 } 855 856 /* 857 * https://developers.brevo.com/reference/addcontacttolist-1 858 */ 859 private function _bravo_add_to_list ($apiKey = null, $listid = null, $email = '') { 860 // Replace these values with your actual data 861 $brevoApiUrl = 'https://api.brevo.com/v3/contacts/lists/' . $listid . '/contacts/add'; 862 $brevoApiHeaders = array( 863 'Accept' => 'application/json', 864 'Content-Type' => 'application/json', 865 'api-key' => $apiKey, 866 ); 867 868 $brevoApiData = array( 869 'emails' => array( 870 $email, 871 ), 872 ); 873 874 $response = wp_remote_post( 875 $brevoApiUrl, 876 array( 877 'headers' => $brevoApiHeaders, 878 'body' => wp_json_encode($brevoApiData), 879 ) 880 ); 881 882 if (is_wp_error($response)) { 883 return false; 884 } else { 885 $body = wp_remote_retrieve_body($response); 886 if(stripos($body, 'success') !== FALSE) { 887 return true; 888 } 889 } 890 return false; 891 } 892 893 /* 894 * https://developers.brevo.com/reference/createcontact 895 */ 896 private function _bravo_create ($apiKey = null, $email = '') { 897 // Replace these values with your actual data 898 899 $brevoApiUrl = 'https://api.brevo.com/v3/contacts'; 900 $brevoApiHeaders = array( 901 'Accept' => 'application/json', 902 'Content-Type' => 'application/json', 903 'api-key' => $apiKey, 904 ); 905 906 $brevoApiData = array( 907 "updateEnabled" => true, 908 "email" => $email 909 ); 910 911 $response = wp_remote_post( 912 $brevoApiUrl, 913 array( 914 'headers' => $brevoApiHeaders, 915 'body' => wp_json_encode($brevoApiData), 916 ) 917 ); 918 919 if (is_wp_error($response)) { 920 return false; 921 } else { 922 $body = wp_remote_retrieve_body($response); 923 $data = json_decode($body); 924 return true; 925 } 926 927 return false; 928 } 812 929 } -
elementinvader-addons-for-elementor/trunk/modules/mail_base/mail_base.php
r2945525 r3441586 22 22 function eli_mails_datatable() 23 23 { 24 25 if ( ! current_user_can( 'administrator' ) ) { 26 exit(); 27 } 28 29 check_ajax_referer('eli_secure_ajax', 'eli_secure'); 30 24 31 //$this->enable_error_reporting(); 25 32 // remove_action( 'shutdown', 'wp_ob_end_flush_all', 1 ); … … 198 205 function eli_mails_bulk_remove() 199 206 { 200 207 if ( ! current_user_can( 'administrator' ) ) { 208 exit(); 209 } 210 211 check_ajax_referer('eli_secure_ajax', 'eli_secure'); 212 201 213 $ids= eli_xss_clean($_POST['ids']); 202 214 -
elementinvader-addons-for-elementor/trunk/views/blog_preview/meta.php
r3349540 r3441586 6 6 <?php echo esc_html__('This is example meta', 'elementinvader-addons-for-elementor');?> 7 7 <?php else:?> 8 <?php echo $this->set_dinamic_field($eli_post_id, $settings['config_fields_title']); ?> 8 <?php 9 $meta_value = $this->set_dinamic_field($eli_post_id, $settings['config_fields_title']); 10 if (is_array($meta_value)) { 11 echo '<ul class="eli-meta-list">'; 12 foreach ($meta_value as $item) { 13 echo '<li>' . wp_kses_post($item) . '</li>'; 14 } 15 echo '</ul>'; 16 } else { 17 echo wp_kses_post($meta_value); 18 } 19 ?> 9 20 <?php endif?> 10 21 <?php if(!empty($settings['link_enabled'])):?> -
elementinvader-addons-for-elementor/trunk/widgets/blog-grid.php
r3349540 r3441586 367 367 ] 368 368 ); 369 370 369 371 370 if(true){ 372 371 $repeater = new Repeater(); … … 429 428 } 430 429 430 431 431 432 if(true){ 432 433 $repeater = new Repeater(); … … 1283 1284 ); 1284 1285 $this->generate_renders_tabs($selectors, 'styles_carousel_arrows_dynamic', ['margin','color','background','border','border_radius','padding','shadow','transition','font-size','hover_animation']); 1285 1286 1286 1287 1287 $this->end_controls_section(); … … 1876 1876 } 1877 1877 1878 1879 if($settings['config_limit_order_by'] == 'custom_field' && !empty($settings['config_limit_order_by_custom'])) { 1880 $allposts ['meta_query'] = [ 1881 [ 1882 'key' => $settings['config_limit_order_by_custom'], 1883 ], 1884 ]; 1885 $allposts ['meta_key'] = $settings['config_limit_order_by_custom']; 1886 $allposts ['orderby'] = 'meta_value'; 1887 $allposts ['order'] = $settings['config_limit_order']; 1888 } 1889 1890 // Inject repeater-based meta filters here 1891 if ( ! empty( $settings['filter_by_meta'] ) && is_array( $settings['filter_by_meta'] ) ) { 1878 1879 if ($settings['config_limit_order_by'] == 'custom_field' && !empty($settings['config_limit_order_by_custom'])) { 1880 1881 $order_string = $settings['config_limit_order_by_custom']; 1882 // "is_featured DESC, length, region ASC" 1883 $allposts ['orderby'] = 'meta_value'; 1884 $order_parts = array_map('trim', explode(',', $order_string)); 1885 1886 $meta_query = []; 1887 $orderby = []; 1888 1889 foreach ($order_parts as $part) { 1890 $field = $part; 1891 $direction = strtoupper($settings['config_limit_order']); 1892 1893 1894 if (preg_match('/\s+(ASC|DESC)$/i', $part, $matches)) { 1895 $direction = strtoupper($matches[1]); 1896 $field = trim(preg_replace('/\s+(ASC|DESC)$/i', '', $part)); 1897 } 1898 1899 1900 $alias = "{$field}_clause"; 1901 1902 $meta_query[$alias] = [ 1903 'key' => $field, 1904 'type' => 'NUMERIC', 1905 'compare' => 'EXISTS', 1906 1907 ]; 1908 1909 $orderby[$alias] = $direction; 1910 } 1911 1912 $allposts['meta_query'] = $meta_query; 1913 $allposts['orderby'] = $orderby; 1914 } 1915 1916 1917 1918 // Inject repeater-based meta filters here 1919 if (! empty( $settings['filter_by_meta'] ) && is_array( $settings['filter_by_meta'] ) ) { 1892 1920 $meta_query = isset( $allposts['meta_query'] ) ? (array) $allposts['meta_query'] : []; 1893 1921 … … 1922 1950 } 1923 1951 } 1952 1953 if(isset($_GET['test'])) { 1954 dump($allposts); 1955 } 1956 1924 1957 1925 1958 $wp_query = new \WP_Query($allposts);
Note: See TracChangeset
for help on using the changeset viewer.