Changeset 3470240
- Timestamp:
- 02/26/2026 11:58:05 AM (11 days ago)
- Location:
- unlimited-elements-for-elementor/trunk
- Files:
-
- 35 edited
-
assets_libraries/filters/ue_filters.js (modified) (9 diffs)
-
changelog.txt (modified) (1 diff)
-
inc_php/framework/settings.class.php (modified) (3 diffs)
-
inc_php/framework/settings_output_wide.class.php (modified) (4 diffs)
-
inc_php/unitecreator_ajax_search.class.php (modified) (1 diff)
-
inc_php/unitecreator_breadcrumbs.class.php (modified) (7 diffs)
-
inc_php/unitecreator_client_text.php (modified) (1 diff)
-
inc_php/unitecreator_dialog_param.class.php (modified) (12 diffs)
-
inc_php/unitecreator_filters_process.class.php (modified) (4 diffs)
-
inc_php/unitecreator_form.class.php (modified) (1 diff)
-
inc_php/unitecreator_globals.class.php (modified) (2 diffs)
-
inc_php/unitecreator_output.class.php (modified) (5 diffs)
-
inc_php/unitecreator_params_processor.class.php (modified) (7 diffs)
-
inc_php/unitecreator_schema.class.php (modified) (4 diffs)
-
inc_php/unitecreator_settings.class.php (modified) (2 diffs)
-
includes.php (modified) (1 diff)
-
js/unitecreator_params_dialog.js (modified) (1 diff)
-
provider/assets/provider_admin.js (modified) (3 diffs)
-
provider/core/unlimited_elements/elementor/elementor_widget.class.php (modified) (6 diffs)
-
provider/core/unlimited_elements/helper_provider_core.class.php (modified) (3 diffs)
-
provider/core/unlimited_elements/provider_core_admin.class.php (modified) (1 diff)
-
provider/core/unlimited_elements/provider_core_front.class.php (modified) (1 diff)
-
provider/core/unlimited_elements/settings/general_settings_el.xml (modified) (1 diff)
-
provider/functions_wordpress.class.php (modified) (2 diffs)
-
provider/integrations.class.php (modified) (3 diffs)
-
provider/provider_params_processor.class.php (modified) (20 diffs)
-
provider/provider_params_processor_multisource.class.php (modified) (8 diffs)
-
provider/provider_settings.class.php (modified) (3 diffs)
-
provider/woocommerce_integrate.class.php (modified) (4 diffs)
-
readme.txt (modified) (1 diff)
-
release_log.txt (modified) (1 diff)
-
unlimited_elements.php (modified) (1 diff)
-
views/forms-logs.php (modified) (2 diffs)
-
views/objects/addon_view.class.php (modified) (1 diff)
-
views/objects/form_entries_view.class.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
unlimited-elements-for-elementor/trunk/assets_libraries/filters/ue_filters.js
r3444776 r3470240 805 805 806 806 var objParent = objFilter.parent(); 807 807 808 808 if(objParent.hasClass("uc-checkbox-filter-accordion-container")) 809 809 objParent = objParent.parent(); … … 1284 1284 */ 1285 1285 function termsFilterUnselectByKey(event,key){ 1286 1286 1287 1287 var objFilter = jQuery(this); 1288 1288 … … 1475 1475 */ 1476 1476 function initGeneralFilter(objFilter){ 1477 1477 1478 1478 objFilter.on(g_vars.ACTION_FILTER_CHANGE, onGeneralFilterChange); 1479 1479 … … 1561 1561 if(!arrTerms || arrTerms.length == 0) 1562 1562 return(false); 1563 1563 1564 1564 jQuery.each(objFilters,function(index, filter){ 1565 1565 … … 1767 1767 1768 1768 var arrTax = {}; 1769 var arrGroupTax = {};1769 var arrGroupTax = []; 1770 1770 1771 1771 if(isDebug == true){ … … 1773 1773 trace(arrTerms); 1774 1774 } 1775 1775 1776 1776 jQuery.each(arrTerms, function(index, objTerm){ 1777 1777 1778 1778 //group term 1779 1779 if(jQuery.isArray(objTerm) && objTerm.length != 0){ 1780 1780 1781 if(objTerm.length == 1){ 1782 arrTax = buildTermsQuery_handleTerm(objTerm[0], arrTax); 1783 return; 1784 } 1785 1786 var arrGroupTaxonomy = {}; 1787 1781 1788 jQuery.each(objTerm, function(index, groupTerm){ 1782 1789 1783 arrGroupTax = buildTermsQuery_handleTerm(groupTerm, arrGroupTax); 1784 1790 arrGroupTaxonomy = buildTermsQuery_handleTerm(groupTerm, arrGroupTaxonomy); 1785 1791 }); 1786 1792 1793 arrGroupTax.push(arrGroupTaxonomy); 1794 1787 1795 }else{ //single term 1788 1796 … … 1791 1799 1792 1800 }); 1793 1801 1794 1802 if(isDebug == true){ 1795 1803 trace("first arr tax"); … … 1803 1811 1804 1812 if(isDebug == true){ 1805 trace(" build group");1813 trace("group tax"); 1806 1814 trace(arrGroupTax); 1807 1815 } 1808 1816 1809 1810 //build group slugs 1811 jQuery.each(arrGroupTax,function(taxonomy, objSlugs){ 1812 1817 //build group slugs, in case that there is a group 1818 1819 jQuery.each(arrGroupTax, function(index, objGroupTaxonomies){ 1820 1821 jQuery.each(objGroupTaxonomies, function(taxonomy, objSlugs){ 1822 1813 1823 var strSlugs = buildTermsQuery_getStrSlugs(objSlugs, true); 1814 1824 1815 var strAdd = "|"+strSlugs+"|"; 1825 var strAdd = strSlugs; 1826 if(strSlugs.indexOf(".") !== -1){ 1827 strAdd = "|"+strSlugs+"|"; //OR inside the group 1828 } 1816 1829 1817 var objTax = getVal(arrTax, taxonomy); 1818 if(!objTax){ 1819 objTax = {}; 1820 1821 strAdd = strSlugs; 1822 } 1823 1824 objTax[strAdd] = true; 1825 1826 arrTax[taxonomy] = objTax; 1830 var objTax = getVal(arrTax, taxonomy); 1831 if(!objTax) 1832 objTax = {}; 1833 1834 objTax[strAdd] = true; 1835 1836 arrTax[taxonomy] = objTax; 1837 }); 1827 1838 }); 1828 1839 1829 1840 1830 1841 if(isDebug == true){ 1831 trace(" group built");1842 trace("The result taxonomy after grouping"); 1832 1843 trace(arrTax); 1833 1844 } … … 3645 3656 var strTerms = buildTermsQuery(arrTerms); 3646 3657 3647 if(strTerms) 3658 if(strTerms){ 3648 3659 urlAjax += "&ucterms="+strTerms; 3649 3650 //set the url params as well 3651 3652 urlReplace = addUrlParam(urlReplace, "ucterms="+strTerms); 3653 3654 urlFilterString = addUrlParam(urlFilterString, "ucterms="+strTerms); 3660 //set the url params as well 3661 urlReplace = addUrlParam(urlReplace, "ucterms="+strTerms); 3662 urlFilterString = addUrlParam(urlFilterString, "ucterms="+strTerms); 3663 } 3664 3655 3665 } 3656 3666 -
unlimited-elements-for-elementor/trunk/changelog.txt
r3444776 r3470240 1 2 3 1 == Changelog == 2 3 = 2.0.6 - 2026-01-22 = 4 5 Plugin Changes: 6 7 * Feature: added new option: allow empty in items settings 8 * Feature: Added "File" attribute 9 * Feature: added option in general settings: "allow upload file types" 10 * Feature: added order by functionality in the most popular posts plugin 11 * Feature: added one more schema type: News Article 12 * Feature: added autocorrection option in ajax search 13 * Feature: added support for popular posts plugin for the sorting filter 14 * Fix: make sure that gallery has item title always, in product item also 15 * Fix: fixed some logical bug with the filters 16 * Fix: fixed mini cart pricing issue 17 * Fix: fixed some small form related vulnurability 18 * Fix: fixed the authors fetch, to get only author roles and not all roles with exclude 19 * Fix: fixed some breadcrumbs issues 20 21 22 Widgets Changes: 23 24 * Feature: Post Carousel Lite (Free) - Performed a comprehensive review of widget options and enabled responsive controls (Desktop, Tablet, and Mobile) for all applicable settings to ensure better layout flexibility across devices 25 * Feature: Off Canvas Filters (Pro) - A new feature has been added allowing the Simple Popup widget to be included within the Offcanvas Filters widget. It now functions seamlessly alongside other filter widgets, providing more flexible layout options. 26 * Feature: Simple Popup (Free) - A new feature has been added allowing the Simple Popup widget to be included within the Offcanvas Filters widget. It now functions seamlessly alongside other filter widgets, providing more flexible layout options. 27 * Feature: Conditions (Free) - A new Is Logged In User trigger type has been added, allowing you to set up conditional actions or visibility rules based on whether a user is currently authenticated or browsing as a guest. 28 * Feature: Woo Mini Cart (Free) - A new Show Subtotal Type option has been added, allowing users to choose whether to display prices inclusive of tax or exclusive of tax. 29 * Feature: Post Carousel Lite (Free) - A new Link Entire Item Type option has been added, allowing users to choose specific link sources such as a Dynamic Post Popup, a Link from a Custom Field, and other dynamic destinations for the item-wide click action. 30 * Feature: Active Filters (Pro) - A new Flex Wrap option has been added, giving users the ability to control whether elements within a container should wrap onto multiple lines or stay on a single row. 31 * Feature: Post Grid (Free) - A new Order option has been added for each Additional Data element. 32 * Feature: Post Magazine Grid (Pro) - A new Order option has been added for each Additional Data element 33 * Feature: Post Carousel (Free) - A new Order option has been added for each Additional Data element 34 * Feature: Video on Hover (Free) - A new Show Controls option has been added, giving users the ability to display or hide native video player controls 35 * Feature: Post Magazine Grid (Pro) - A new Show Post Views option has been added, allowing users to display the total view count for individual posts within the widget. 36 * Feature: Post Carousel (Free) - A new Show Post Views option has been added, allowing users to display the total view count for individual posts within the widget. 37 * Feature: Video on Hover (Free) - new Play on Click value has been added to the Video Play Mode option, allowing videos to remain static until a user specifically interacts with them with a click event. 38 * Feature: Text Field (Free) - A new Hidden option has been implemented that allows a field to be visually concealed while ensuring that Form Entries still receive and record data from it 39 * Feature: AJAX Search (Free) - Added Autocorrection option that allows to display a suggestion with a clickable link when the initial search returns no results due to a potential typo. 40 * Feature: Video Carousel (Free) - A new YouTube video source option has been added to allow users to directly integrate and display video content from the platform within the widget. 41 * Feature: Repeater Table (Pro) - A new feature has been enabled within the widget that allows users to remove all existing items, bypassing the typical restriction in item-based widgets that requires at least one item to remain. 42 * Change: Icon Pointer Button (Pro) - Updated the Icon Selection attribute to utilize the native Icon Library, enabling support for both standard font icons and custom SVG graphics 43 * Change: Masonry & Justified Gallery (Free) - To improve clarity and avoid user confusion, the Column gallery type has been renamed to Masonry, more accurately reflecting its layout behavior. 44 * Fix: Button Icon Hover Effect (Pro) - Removed the Visibility Conditions options. These settings were previously added in error, as they are only compatible with form field logic and cannot function within standard widget layouts 45 * Fix: Background Switcher (Free) - An issue was resolved where disabling the First Selected option caused the widget to render as a blank space with no images visible. The widget now correctly initializes its display state even when no item is pre-selected. 46 * Fix: Background Switcher (Free) - An issue was resolved where the Hover Blur Effect only applied while the mouse was physically over a widget item. The effect has been corrected to persist on the active/selected item even when the mouse leaves the widget area 47 * Fix: Linear Progress Bar (Free) - An issue was resolved where browser background optimization features, such as bfcache and tab throttling, would freeze the widget's execution state. This caused the progress bar to remain stuck in a finished or desynchronized state upon page revisit or tab reactivation 48 * Fix: Post Carousel Lite (Free) - An issue was resolved where the Link Entire Item option was not functioning as expected 49 * Fix: WordPress Menu (Free) - An issue was resolved in the Elementor editor where the dropdown menu failed to display after clicking the burger icon, ensuring that navigation previews now function correctly within the editing interface. 50 * Fix: Huge Shapes Background (Pro) - An issue was resolved where the clearRect function utilized outdated or mismatched canvas dimensions, causing previous animation frames to persist and accumulate as visual "ghosting" or "smearing" artifacts. 51 * Fix: WordPress Menu (Free) - An issue was resolved in the Menu widget where the Clickable Parent Item option was incorrectly hidden when the Responsive Behavior was set to "Slide." This setting now logic-gates correctly: parent items remain visible and clickable on desktop, while automatically adjusting only at the responsive breakpoint to ensure sub-menus function properly on mobile devices. 52 * Fix: Alphabet Filter (Pro) - An issue was resolved where users were required to click the Close icon twice to unselect an active filter, ensuring that filters now deactivate as expected with a single click. 53 * Fix: Post Carousel (Free) - An issue was resolved where the Author element failed to inherit the color value defined in the Meta Data Color option 54 * Fix: Conditions (Free) - An issue was resolved where ACF Field trigger types were not functioning correctly, ensuring that conditional logic or actions tied to Advanced Custom Fields now trigger as expected 55 * Fix: Post Carousel (Free) - The CSS priority of the title selector has been increased to ensure that its specific styling consistently overrides any conflicting general styles 56 * Fix: Animated Split Text (Pro) - An issue was resolved where the Splitting library was being initialized before the necessary JavaScript files had fully loaded on the page, preventing proper execution. 57 58 4 59 5 60 = 2.0.5 - 2026-01-22 = -
unlimited-elements-for-elementor/trunk/inc_php/framework/settings.class.php
r3397365 r3470240 39 39 const TYPE_LINK = "link"; 40 40 const TYPE_IMAGE = "image"; 41 const TYPE_FILE = "file"; 41 42 const TYPE_BOOLEAN = "boolean"; 42 43 const TYPE_EDITOR = "editor"; … … 754 755 $this->add($name, $defaultValue, $text, self::TYPE_IMAGE, $arrParams); 755 756 } 757 758 /** 759 * add file chooser setting 760 */ 761 public function addFile($name, $defaultValue = "", $text = "", $arrParams = array()){ 762 763 $arrParams["label_block"] = true; 764 765 $this->add($name, $defaultValue, $text, self::TYPE_FILE, $arrParams); 766 } 756 767 757 768 /** … … 1438 1449 if(empty($addSettingName)) 1439 1450 continue; 1440 1441 $this->updateSettingProperty($addSettingName, self::PARAM_NODRAW, true); 1451 1452 $addSettingNames = array(); 1453 if(is_array($addSettingName)){ 1454 $addSettingNames = $addSettingName; 1455 }else{ 1456 $addSettingNames = explode(",", $addSettingName); 1457 } 1458 1459 $addSettingNames = array_map("trim", $addSettingNames); 1460 $addSettingNames = array_filter($addSettingNames, function($value){ 1461 return $value !== ""; 1462 }); 1463 1464 foreach($addSettingNames as $addSettingSingleName){ 1465 $this->updateSettingProperty($addSettingSingleName, self::PARAM_NODRAW, true); 1466 } 1442 1467 } 1443 1468 -
unlimited-elements-for-elementor/trunk/inc_php/framework/settings_output_wide.class.php
r3329756 r3470240 54 54 55 55 $addField = UniteFunctionsUC::getVal($setting, UniteSettingsUC::PARAM_ADDFIELD); 56 $addFields = array(); 57 if(!empty($addField)){ 58 if(is_array($addField)){ 59 $addFields = $addField; 60 }else{ 61 $addFields = explode(",", $addField); 62 } 63 64 $addFields = array_map("trim", $addFields); 65 $addFields = array_filter($addFields, function($value){ 66 return $value !== ""; 67 }); 68 } 56 69 57 70 $drawTh = true; … … 69 82 70 83 <?php 71 if(!empty($addField)): 72 73 $addSetting = $this->settings->getSettingByName($addField); 74 UniteFunctionsUC::validateNotEmpty($addSetting,"AddSetting {$addField}"); 75 76 $addSettingText = UniteFunctionsUC::getVal($addSetting,"text",""); 77 $addSettingText = str_replace(" "," ", $addSettingText); 84 if(!empty($addFields)): 85 86 $addSettings = array(); 87 $hasAddSettingText = false; 88 foreach($addFields as $addFieldName){ 89 $addSetting = $this->settings->getSettingByName($addFieldName); 90 UniteFunctionsUC::validateNotEmpty($addSetting,"AddSetting {$addFieldName}"); 91 $addSettings[] = $addSetting; 92 93 $addSettingText = UniteFunctionsUC::getVal($addSetting,"text",""); 94 if(!empty($addSettingText)) 95 $hasAddSettingText = true; 96 } 97 78 98 $tdSettingAdd = ""; 79 if(!empty($addSetting )){99 if(!empty($addSettings)){ 80 100 $tdSettingAdd = ' class="unite-settings-onecell" colspan="2"'; 81 101 } … … 85 105 uelm_echo($rowClass)?> valign="top"> 86 106 87 <?php if( empty($addSettingText)):?>107 <?php if($hasAddSettingText == false):?> 88 108 89 109 <th <?php uelm_echo($textStyle)?> scope="row" <?php uelm_echo($textWidth) ?>> … … 113 133 ?> 114 134 115 <?php if( !empty($addSettingText)):?>135 <?php if($hasAddSettingText == true):?> 116 136 <span class="setting_onecell_horsap"></span> 117 137 <?php endif?> 118 138 </span> 119 139 120 <span id="<?php echo esc_attr($addSetting["id_row"])?>"> 121 <span class='setting_onecell_text'><?php echo esc_html($addSettingText)?></span> 122 <?php 123 $this->drawInputs($addSetting); 124 $this->drawInputAdditions($addSetting); 140 <?php foreach($addSettings as $addSetting): ?> 141 <?php 142 $addSettingText = UniteFunctionsUC::getVal($addSetting,"text",""); 143 $addSettingText = str_replace(" "," ", $addSettingText); 125 144 ?> 126 </span> 145 <span id="<?php echo esc_attr($addSetting["id_row"])?>"> 146 <?php if(!empty($addSettingText)):?> 147 <span class='setting_onecell_text'><?php echo esc_html($addSettingText)?></span> 148 <?php endif?> 149 <?php 150 $this->drawInputs($addSetting); 151 $this->drawInputAdditions($addSetting); 152 ?> 153 </span> 154 <?php endforeach; ?> 127 155 </td> 128 156 </tr> -
unlimited-elements-for-elementor/trunk/inc_php/unitecreator_ajax_search.class.php
r3379552 r3470240 450 450 451 451 } 452 453 /** 454 * get suggestion data for ajax search 455 */ 456 public function getSearchSuggestionData($search, $args){ 457 458 $searchToken = $this->getSuggestionToken($search); 459 460 if(empty($searchToken)) 461 return(null); 462 463 $suggestion = $this->getSuggestionFromArgs($searchToken, $args); 464 465 if(empty($suggestion) || $suggestion === $searchToken) 466 return(null); 467 468 $output = array(); 469 $output["original"] = $search; 470 $output["suggestion"] = $suggestion; 471 472 return($output); 473 } 474 475 /** 476 * get suggestion from query args 477 */ 478 private function getSuggestionFromArgs($searchToken, $args){ 479 480 if(empty($args) || is_array($args) == false) 481 return(null); 482 483 if(isset($args["s"])) 484 unset($args["s"]); 485 486 if(isset($args["search"])) 487 unset($args["search"]); 488 489 if(isset($args["paged"])) 490 unset($args["paged"]); 491 492 if(isset($args["offset"])) 493 unset($args["offset"]); 494 495 $args["posts_per_page"] = 50; 496 $args["no_found_rows"] = true; 497 $args["ignore_sticky_posts"] = true; 498 499 $query = new WP_Query($args); 500 501 if(empty($query) || empty($query->posts)) 502 return(null); 503 504 $maxDistance = $this->getSuggestionMaxDistance($searchToken); 505 $bestWord = null; 506 $bestDistance = null; 507 508 foreach($query->posts as $post){ 509 510 $title = ""; 511 512 if(is_object($post) && isset($post->post_title)){ 513 $title = $post->post_title; 514 }else{ 515 $title = UniteFunctionsUC::getVal($post, "post_title"); 516 } 517 518 if(empty($title)) 519 continue; 520 521 $arrWords = $this->getSuggestionWordsFromTitle($title); 522 523 if(empty($arrWords)) 524 continue; 525 526 foreach($arrWords as $word){ 527 528 if($word === $searchToken) 529 return(null); 530 531 $lenDiff = abs(strlen($word) - strlen($searchToken)); 532 533 if($lenDiff > $maxDistance) 534 continue; 535 536 $distance = levenshtein($searchToken, $word); 537 538 if($distance === false) 539 continue; 540 541 if($distance <= $maxDistance && ($bestDistance === null || $distance < $bestDistance)){ 542 $bestDistance = $distance; 543 $bestWord = $word; 544 545 if($bestDistance === 0) 546 break 2; 547 } 548 549 } 550 551 } 552 553 return($bestWord); 554 } 555 556 /** 557 * get suggestion token (single word) 558 */ 559 private function getSuggestionToken($search){ 560 561 $search = trim($search); 562 563 if(empty($search)) 564 return(null); 565 566 $search = strtolower($search); 567 $search = preg_replace("/[^a-z0-9\\s]/", " ", $search); 568 $tokens = preg_split("/\\s+/", $search, -1, PREG_SPLIT_NO_EMPTY); 569 570 if(empty($tokens)) 571 return(null); 572 573 $token = $tokens[0]; 574 575 if(strlen($token) < 3) 576 return(null); 577 578 return($token); 579 } 580 581 /** 582 * get words from title 583 */ 584 private function getSuggestionWordsFromTitle($title){ 585 586 $title = strtolower($title); 587 $title = preg_replace("/[^a-z0-9\\s]/", " ", $title); 588 $words = preg_split("/\\s+/", $title, -1, PREG_SPLIT_NO_EMPTY); 589 590 if(empty($words)) 591 return(array()); 592 593 $output = array(); 594 595 foreach($words as $word){ 596 597 if(strlen($word) < 3) 598 continue; 599 600 $output[$word] = true; 601 } 602 603 $output = array_keys($output); 604 605 return($output); 606 } 607 608 /** 609 * get suggestion max distance 610 */ 611 private function getSuggestionMaxDistance($word){ 612 613 $length = strlen($word); 614 615 if($length <= 4) 616 return(1); 617 618 if($length <= 7) 619 return(2); 620 621 return(3); 622 } 452 623 453 624 } -
unlimited-elements-for-elementor/trunk/inc_php/unitecreator_breadcrumbs.class.php
r3329756 r3470240 28 28 self::$showDebug = true; 29 29 30 $debugWrapperStyle = 'background:#fff; border:2px dashed #999; padding:1em 1.25em; margin:1em 0; font-family:inherit;'; 31 if(self::$showDebug == true) 32 echo '<div class="uc-breadcrumbs-debug" style="' . esc_attr($debugWrapperStyle) . '">'; 30 33 31 34 if(self::$showDebug == true) … … 42 45 $search_page_text = $this->getParamValueByKey('search_page_text', $params, 'Results For:'); 43 46 47 if(self::$showDebug == true) { 48 dmp("Options:"); 49 dmp(array( 50 'show_home' => $show_home, 51 'home_text' => $home_text, 52 'show_category_breadcrumbs' => $show_category_breadcrumbs, 53 'categories_show_direction' => $categories_show_direction, 54 'max_category_depth' => $max_category_depth, 55 'show_blog_page' => $show_blog_page, 56 'search_page_text' => $search_page_text, 57 )); 58 } 59 44 60 if($show_home === 'true') { 45 61 $items[] = $this->getHomeItem($home_text); … … 64 80 dmp("---- Category or Archive -----"); 65 81 66 $items = array_merge($items, $this->getBreadcrumbs_category($show_category_breadcrumbs, $categories_show_direction, $max_category_depth ));82 $items = array_merge($items, $this->getBreadcrumbs_category($show_category_breadcrumbs, $categories_show_direction, $max_category_depth, $show_blog_page)); 67 83 } elseif(is_page()) { 68 84 … … 120 136 dmp("The Items:"); 121 137 dmp($items); 138 echo '</div>'; 122 139 } 123 140 … … 191 208 * @param string $categories_show_direction Direction to show categories from 192 209 * @param int $max_category_depth Maximum depth of categories to show 193 * @return array Breadcrumb items 194 */ 195 private function getBreadcrumbs_category($show_category_breadcrumbs, $categories_show_direction, $max_category_depth) { 210 * @param string $show_blog_page Whether to show the blog/post type page in breadcrumbs 211 * @return array Breadcrumb items 212 */ 213 private function getBreadcrumbs_category($show_category_breadcrumbs, $categories_show_direction, $max_category_depth, $show_blog_page = 'true') { 196 214 197 215 $items = array(); … … 207 225 } 208 226 227 if($current_category instanceof WP_Post_Type) { 228 $label = !empty($current_category->labels->name) ? $current_category->labels->name : $current_category->name; 229 $url = ($current_category->has_archive) ? get_post_type_archive_link($current_category->name) : ''; 230 $items[] = array( 231 'text' => html_entity_decode($label, ENT_QUOTES, 'UTF-8'), 232 'url' => $url, 233 'type' => '' 234 ); 235 return $items; 236 } 237 209 238 $taxonomy = $current_category->taxonomy; 239 240 if($show_blog_page === 'true') { 241 if(self::$showDebug == true) 242 dmp("add blog/post type option (category)"); 243 if($taxonomy === 'category') { 244 $items = $this->addBlogPage($items); 245 } else { 246 $objTax = get_taxonomy($taxonomy); 247 if(!empty($objTax->object_type) && is_array($objTax->object_type)) { 248 $postType = $objTax->object_type[0]; 249 $objPostType = get_post_type_object($postType); 250 $items = $this->addPostTypeItem($items, $objPostType); 251 } 252 } 253 } 210 254 211 255 $ancestors = get_ancestors($current_category->term_id, $taxonomy); … … 412 456 $items = array(); 413 457 414 $post_type = get_post_type_object(get_post_type()); 415 if($post_type) { 458 $post_type = get_queried_object(); 459 if($post_type && $post_type instanceof WP_Post_Type) { 460 $label = !empty($post_type->labels->name) ? $post_type->labels->name : $post_type->name; 461 $url = ($post_type->has_archive) ? get_post_type_archive_link($post_type->name) : ''; 416 462 $items[] = array( 417 'text' => html_entity_decode($ post_type->labels->name, ENT_QUOTES, 'UTF-8'),418 'url' => '',463 'text' => html_entity_decode($label, ENT_QUOTES, 'UTF-8'), 464 'url' => $url, 419 465 'type' => '' 420 466 ); -
unlimited-elements-for-elementor/trunk/inc_php/unitecreator_client_text.php
r3277574 r3470240 94 94 "uc_map"=>esc_html__("Google Map Picker","unlimited-elements-for-elementor"), 95 95 "uc_image"=>esc_html__("Image","unlimited-elements-for-elementor"), 96 "uc_file"=>esc_html__("File","unlimited-elements-for-elementor"), 96 97 "uc_mp3"=>esc_html__("Audio","unlimited-elements-for-elementor"), 97 98 "uc_post"=>esc_html__("Post","unlimited-elements-for-elementor"), -
unlimited-elements-for-elementor/trunk/inc_php/unitecreator_dialog_param.class.php
r3349280 r3470240 46 46 const PARAM_SHAPE = "uc_shape"; 47 47 const PARAM_IMAGE = "uc_image"; 48 const PARAM_FILE = "uc_file"; 48 49 const PARAM_MAP = "uc_map"; 49 50 const PARAM_ADDONPICKER = "uc_addonpicker"; … … 189 190 $this->addParam(self::PARAM_LINK, esc_html__("Link", "unlimited-elements-for-elementor")); 190 191 $this->addParam(self::PARAM_IMAGE, esc_html__("Image (media)", "unlimited-elements-for-elementor")); 192 $this->addParam(self::PARAM_FILE, esc_html__("File (media)", "unlimited-elements-for-elementor")); 191 193 $this->addParam(self::PARAM_HR, esc_html__("HR Line", "unlimited-elements-for-elementor")); 192 194 $this->addParam(self::PARAM_HEADING, esc_html__("Heading", "unlimited-elements-for-elementor")); … … 297 299 self::PARAM_WOO_CATS, 298 300 self::PARAM_INSTAGRAM, 301 self::PARAM_FILE, 302 self::PARAM_SPECIAL, 299 303 self::PARAM_ICON, 300 self::PARAM_SPECIAL,301 304 ), 302 305 ); … … 416 419 * put checkbox input 417 420 */ 418 protected function putCheckbox($name, $text){ 421 protected function putCheckbox($name, $text, $isDefaultChecked = false){ 422 423 $checkedAttr = ""; 424 if($isDefaultChecked === true) 425 $checkedAttr = ' data-defaultchecked="true" checked'; 426 419 427 ?> 420 428 <label class="unite-inputs-label-inline-free"> 421 429 <?php echo esc_html($text)?>: 422 <input type="checkbox" onfocus="this.blur()" name="<?php echo esc_attr($name)?>" >430 <input type="checkbox" onfocus="this.blur()" name="<?php echo esc_attr($name)?>"<?php echo $checkedAttr?>> 423 431 </label> 424 432 … … 687 695 688 696 $htmlSelect = HelperHtmlUC::getHTMLSelect($arrTypes,"image", "name='media_type' class='uc-control' data-controlled-selector='.uc-media-param-image-attributes'",true); 689 697 690 698 ?> 691 699 <?php esc_attr_e("Media Type","unlimited-elements-for-elementor") ?>: … … 701 709 <div class="uc-media-param-image-attributes" data-control="image"> 702 710 703 704 711 <?php $this->putImageSelectInput("default_value",esc_html__("Default Image","unlimited-elements-for-elementor")); ?> 705 712 … … 725 732 726 733 734 735 <?php 736 } 737 738 /** 739 * put file param settings 740 */ 741 private function putFileParam(){ 742 743 ?> 744 <div class="unite-inputs-sap-double"></div> 745 746 <div class="unite-inputs-label"> 747 <?php esc_html_e("Allowed File Types", "unlimited-elements-for-elementor")?> 748 </div> 749 750 <div class="unite-inputs-sap"></div> 751 752 <?php $this->putCheckbox("file_type_application", __("Application", "unlimited-elements-for-elementor"), true)?> 753 <div class="unite-inputs-description"> 754 <?php esc_html_e("Extensions: pdf, doc, docx, xls, xlsx, ppt, pptx, zip (plus other WordPress application types)", "unlimited-elements-for-elementor")?> 755 </div> 756 <div class="vert_sap10"></div> 757 <?php $this->putCheckbox("file_type_image", __("Image", "unlimited-elements-for-elementor"))?> 758 <div class="unite-inputs-description"> 759 <?php esc_html_e("Extensions: jpg, jpeg, png, gif, webp, bmp, tiff, ico (plus other WordPress image types)", "unlimited-elements-for-elementor")?> 760 </div> 761 <div class="vert_sap10"></div> 762 <?php $this->putCheckbox("file_type_video", __("Video", "unlimited-elements-for-elementor"))?> 763 <div class="unite-inputs-description"> 764 <?php esc_html_e("Extensions: mp4, mov, webm, ogv, avi, wmv, flv, mpeg, 3gp (plus other WordPress video types)", "unlimited-elements-for-elementor")?> 765 </div> 766 <div class="vert_sap10"></div> 767 <?php $this->putCheckbox("file_type_svg", __("SVG", "unlimited-elements-for-elementor"))?> 727 768 728 769 <?php … … 750 791 )); 751 792 break; 793 case "file": 794 $objSettings->addFile($name, "", $text, array( 795 "source" => "addon", 796 "url_name" => $name, 797 "file_types" => array("application", "image", "video", "svg"), 798 )); 799 break; 752 800 case "mp3": 753 801 $objSettings->addMp3($name, "", $text, array("source"=>"addon")); … … 771 819 772 820 $this->putSingleSettingInput($name, $text, "image"); 821 } 822 823 /** 824 * put file select input 825 */ 826 protected function putFileSelectInput($name, $text){ 827 828 $this->putSingleSettingInput($name, $text, "file"); 773 829 } 774 830 … … 1611 1667 $this->putImageParam(); 1612 1668 break; 1669 case self::PARAM_FILE: 1670 $this->putFileParam(); 1671 break; 1613 1672 case "uc_mp3": 1614 1673 $this->putMp3Param(); … … 2070 2129 self::PARAM_HEADING, 2071 2130 self::PARAM_IMAGE, 2131 self::PARAM_FILE, 2072 2132 self::PARAM_AUDIO, 2073 2133 self::PARAM_ICON, … … 2107 2167 self::PARAM_HEADING, 2108 2168 self::PARAM_IMAGE, 2169 self::PARAM_FILE, 2109 2170 self::PARAM_AUDIO, 2110 2171 self::PARAM_ICON, -
unlimited-elements-for-elementor/trunk/inc_php/unitecreator_filters_process.class.php
r3444776 r3470240 163 163 } 164 164 165 // add WPP (WordPress Popular Posts) ordering option when plugin exists and not for Woo 166 if($isForWooProducts == false && UniteCreatorPluginIntegrations::isWPPopularPostsExists() === true){ 167 $output["popular_wpp"] = __("Popular Posts", "unlimited-elements-for-elementor"); 168 } 165 169 166 170 return($output); … … 532 536 //check if valid 533 537 $arrOrderby = UniteFunctionsWPUC::getArrSortBy(true); 538 539 // allow WPP orderby when WordPress Popular Posts plugin is active 540 if(UniteCreatorPluginIntegrations::isWPPopularPostsExists() === true){ 541 $arrOrderby["popular_wpp"] = __("Popular Posts", "unlimited-elements-for-elementor"); 542 } 534 543 535 544 if($orderby == "id") … … 2379 2388 2380 2389 GlobalsProviderUC::$isUnderAjaxSearch = false; 2381 2390 2382 2391 $htmlGridItems = UniteFunctionsUC::getVal($arrHtmlWidget, "html"); 2383 2392 $htmlGridItems2 = UniteFunctionsUC::getVal($arrHtmlWidget, "html2"); … … 2397 2406 if(!empty($htmlGridItems2)) 2398 2407 $outputData["html_items2"] = $htmlGridItems2; 2408 2409 //add search suggestion data if no results 2410 //autocorrection in options 2411 2412 $lastQuery = GlobalsProviderUC::$lastPostQuery; 2413 2414 $isAutoCorrect = UniteFunctionsUC::getVal(GlobalsProviderUC::$lastWidgetParams, "search_autocorrect"); 2415 $isAutoCorrect = UniteFunctionsUC::strToBool($isAutoCorrect); 2416 2417 if($isAutoCorrect == true && !empty($lastQuery) && (int)$lastQuery->found_posts === 0){ 2418 2419 $lastQueryArgs = GlobalsProviderUC::$lastQueryArgs; 2420 $searchTerm = UniteFunctionsUC::getVal($lastQueryArgs, "s"); 2421 $searchTerm = trim($searchTerm); 2422 2423 if(!empty($searchTerm)){ 2424 $objAjaxSearch = new UniteCreatorAjaxSeach(); 2425 $suggestionData = $objAjaxSearch->getSearchSuggestionData($searchTerm, $lastQueryArgs); 2426 2427 if(!empty($suggestionData)) 2428 $outputData["search_suggestion"] = $suggestionData; 2429 } 2430 } 2399 2431 2400 2432 -
unlimited-elements-for-elementor/trunk/inc_php/unitecreator_form.class.php
r3403331 r3470240 183 183 $fieldParams["allowed_types"] = $this->prepareFilesFieldAllowedTypes($fieldSettings); 184 184 }else{ 185 // Sanitize user input to prevent stored XSS in form entries 186 if (is_string($fieldValue)) { 187 $fieldValue = sanitize_textarea_field($fieldValue); 188 } 185 189 $fieldValue = $this->prettifyFieldValue($fieldType, $fieldValue); 186 190 } -
unlimited-elements-for-elementor/trunk/inc_php/unitecreator_globals.class.php
r3397365 r3470240 198 198 public static $isInsidePlugin = false; //set in provider_admin 199 199 200 public static $hideDebug = false; 201 200 202 201 203 /** … … 332 334 if($showQueryDebugByUrl == true) 333 335 self::$showQueryDebugByUrl = true; 336 $showQueryDebugTermsByUrl = HelperUC::hasPermissionsFromQuery("ucquerydebug_terms"); 337 if($showQueryDebugTermsByUrl == true) 338 self::$showQueryDebugTermsByUrl = true; 334 339 335 340 -
unlimited-elements-for-elementor/trunk/inc_php/unitecreator_output.class.php
r3444776 r3470240 1101 1101 } 1102 1102 1103 /*1104 private function processParamCSSSelector_typography($param, $selectors){1105 1106 $value = UniteFunctionsUC::getVal($param, "value");1107 1108 $style = "";1109 $selector = $this->combineCSSSelectors($selectors);1110 1111 // import font family1112 $fontFamily = UniteFunctionsUC::getVal($value, "font_family");1113 1114 if(empty($fontFamily) === false){1115 $fontData = HelperUC::getFontPanelData();1116 $googleFonts = UniteFunctionsUC::getVal($fontData, "arrGoogleFonts");1117 1118 if(empty($googleFonts[$fontFamily]) === false){1119 $fontUrl = HelperHtmlUC::getGoogleFontUrl($googleFonts[$fontFamily]);1120 1121 $this->addon->addCssInclude($fontUrl);1122 }1123 }1124 1125 $regularFields = array(1126 "font_family" => HelperHtmlUC::getCSSSelectorValueByParam(UniteCreatorDialogParam::PARAM_TYPOGRAPHY, "family"),1127 "font_style" => HelperHtmlUC::getCSSSelectorValueByParam(UniteCreatorDialogParam::PARAM_TYPOGRAPHY, "style"),1128 "font_weight" => HelperHtmlUC::getCSSSelectorValueByParam(UniteCreatorDialogParam::PARAM_TYPOGRAPHY, "weight"),1129 "text_decoration" => HelperHtmlUC::getCSSSelectorValueByParam(UniteCreatorDialogParam::PARAM_TYPOGRAPHY, "decoration"),1130 "text_transform" => HelperHtmlUC::getCSSSelectorValueByParam(UniteCreatorDialogParam::PARAM_TYPOGRAPHY, "transform"),1131 );1132 1133 $responsiveFields = array(1134 "font_size" => HelperHtmlUC::getCSSSelectorValueByParam(UniteCreatorDialogParam::PARAM_TYPOGRAPHY, "size"),1135 "line_height" => HelperHtmlUC::getCSSSelectorValueByParam(UniteCreatorDialogParam::PARAM_TYPOGRAPHY, "line-height"),1136 "letter_spacing" => HelperHtmlUC::getCSSSelectorValueByParam(UniteCreatorDialogParam::PARAM_TYPOGRAPHY, "letter-spacing"),1137 "word_spacing" => HelperHtmlUC::getCSSSelectorValueByParam(UniteCreatorDialogParam::PARAM_TYPOGRAPHY, "word-spacing"),1138 );1139 1140 $style .= $this->prepareCSSSelectorFieldsStyle($regularFields, $selector, $value);1141 $style .= $this->prepareCSSSelectorResponsiveFieldsStyle($responsiveFields, $selector, $value);1142 1143 return $style;1144 }1145 */1146 1147 1103 /** 1148 1104 * process css selector of text shadow param … … 3215 3171 $rootId = $this->getWidgetID(); 3216 3172 3217 $params = $this->addon->getProcessedMainParamsValues($this->processType); 3218 3173 $currentHideDebug = GlobalsUC::$hideDebug; 3174 GlobalsUC::$hideDebug = true; 3175 $params = $this->addon->getProcessedMainParamsValues($this->processType); 3176 GlobalsUC::$hideDebug = $currentHideDebug; 3177 3219 3178 $advancedAddClasses = UniteFunctionsUC::getVal($params, "advanced_css_classes"); 3220 3179 … … 3464 3423 return($this->paramsCache); 3465 3424 } 3466 3467 $this->paramsCache = $this->addon->getProcessedMainParamsValues($this->processType); 3468 3425 3426 $this->paramsCache = $this->addon->getProcessedMainParamsValues($this->processType, true); 3469 3427 $allParamDefs = $this->addon->getParams(); 3470 3428 … … 3760 3718 3761 3719 if(is_string($dataValue) && $dataValue === "uc_items"){ 3762 // $arrItemData = $this->addon->getProcessedItemsData($this->processType);3763 3720 $arrItemData = $this->getProcessedItemsData(); 3764 3721 }elseif(is_array($dataValue)){ … … 3772 3729 break; 3773 3730 default: 3774 // $arrItemData = $this->addon->getProcessedItemsData($this->processType);3775 3731 $arrItemData = $this->getProcessedItemsData(); 3776 3732 break; -
unlimited-elements-for-elementor/trunk/inc_php/unitecreator_params_processor.class.php
r3442278 r3470240 93 93 case "uc_image": 94 94 case "uc_mp3": 95 case UniteCreatorDialogParam::PARAM_FILE: 95 96 $value = HelperUC::URLtoFull($value); 96 97 break; … … 335 336 336 337 //on production don't return empty span 337 if( $this->processType == self::PROCESS_TYPE_OUTPUT&& empty($arrFont) && $isReturnCss == false)338 if(($this->processType == self::PROCESS_TYPE_OUTPUT) && empty($arrFont) && $isReturnCss == false) 338 339 return($value); 339 340 … … 761 762 case self::PROCESS_TYPE_OUTPUT: 762 763 case self::PROCESS_TYPE_OUTPUT_BACK: 763 764 764 $data[$name] = $this->getPostData($postID, $arrPostAdditions); 765 765 break; … … 1038 1038 $data[$keyThumb] = $imageUrl; 1039 1039 1040 return $data; 1041 } 1042 1043 /** 1044 * process file param value, add to data 1045 */ 1046 protected function getProcessedParamsValue_file($data, $value, $param){ 1047 1048 $name = UniteFunctionsUC::getVal($param, "name"); 1049 1050 $fileId = null; 1051 $fileUrl = null; 1052 1053 if(is_array($value) === true){ 1054 $fileId = UniteFunctionsUC::getVal($value, "id"); 1055 $fileUrl = UniteFunctionsUC::getVal($value, "url"); 1056 }else{ 1057 if(is_numeric($value) === true) 1058 $fileId = $value; 1059 else 1060 $fileUrl = $value; 1061 } 1062 1063 if(empty($fileId) === true && empty($fileUrl) === true) { 1064 $data[$name] = ""; 1065 return $data; 1066 } 1067 1068 if(empty($fileId) === false) 1069 $fileUrl = wp_get_attachment_url($fileId); 1070 else 1071 $fileUrl = HelperUC::URLtoFull($fileUrl); 1072 1073 //sanitize the url 1074 if(!empty($fileUrl)) 1075 $fileUrl = UniteFunctionsUC::sanitize($fileUrl, UniteFunctionsUC::SANITIZE_URL); 1076 1077 $data[$name] = $fileUrl; 1078 1040 1079 return $data; 1041 1080 } … … 1963 2002 $data = $this->getProcessedParamsValue_image($data, $value, $param); 1964 2003 break; 2004 case UniteCreatorDialogParam::PARAM_FILE: 2005 $data = $this->getProcessedParamsValue_file($data, $value, $param); 2006 break; 1965 2007 case UniteCreatorDialogParam::PARAM_POST: 1966 2008 $data = $this->getProcessedParamsValue_post($data, $value, $param, $processType); … … 2067 2109 //and if the source is terms, remove the users param 2068 2110 $arrParams = $this->modifyParamsBySpecialAddonBehaviour($arrParams); 2069 2111 2070 2112 foreach($arrParams as $param){ 2071 2113 $type = UniteFunctionsUC::getVal($param, "type"); … … 2085 2127 $value = UniteFunctionsUC::getVal($param, "value", $defaultValue); 2086 2128 $value = $this->convertValueByType($value, $type, $param); 2087 2129 2088 2130 if($type !== "imagebase_fields") 2089 2131 $data[$name] = $value; 2090 2132 2091 $data = $this->getProcessedParamData($data, $value, $param, $processType); 2092 } 2133 $data = $this->getProcessedParamData($data, $value, $param, $processType); 2134 } 2093 2135 2094 2136 $data = $this->modifyDataBySpecialAddonBehaviour($data); -
unlimited-elements-for-elementor/trunk/inc_php/unitecreator_schema.class.php
r3429507 r3470240 135 135 "title"=>"Search Results Page", 136 136 "multiple"=>true 137 ), 138 array( 139 "type"=>"NewsArticle", 140 "title"=>"News Article" 137 141 ) 138 142 … … 987 991 $arrParam = array(); 988 992 $arrParam["origtype"] = UniteCreatorDialogParam::PARAM_TEXTFIELD; 993 $arrParam["add_dynamic"] = true; 989 994 $arrParam["elementor_condition"] = array($name."_enable"=>"true",$name."_type"=> 990 995 array("howto", … … 1282 1287 case "searchresultspage": 1283 1288 return $this->schemaSearchResultsPage($items, $title); 1289 case "newsarticle": 1290 return $this->schemaNewsArticle($items); 1284 1291 case "custom": 1285 1292 … … 1696 1703 1697 1704 /** 1705 * NewsArticle (schema.org/NewsArticle - Article subtype for news) 1706 */ 1707 private function schemaNewsArticle($items) { 1708 1709 $schema = array(); 1710 1711 foreach ($items as $item) { 1712 1713 $article = array( 1714 '@context' => self::SCHEMA_ORG_SITE, 1715 '@type' => 'NewsArticle', 1716 'headline' => $item[self::ROLE_TITLE], 1717 ); 1718 1719 if (!empty($item[self::ROLE_CONTENT])) { 1720 $article['articleBody'] = $item[self::ROLE_CONTENT]; 1721 } 1722 1723 if (!empty($item[self::ROLE_DESCRIPTION])) { 1724 $article['description'] = $item[self::ROLE_DESCRIPTION]; 1725 } 1726 1727 if (!empty($item[self::ROLE_IMAGE])) { 1728 $article['image'] = $item[self::ROLE_IMAGE]; 1729 } 1730 1731 if (!empty($item[self::ROLE_LINK])) { 1732 $article['url'] = $item[self::ROLE_LINK]; 1733 $article['mainEntityOfPage'] = $item[self::ROLE_LINK]; 1734 } 1735 1736 if (!empty($item[self::ROLE_HEADING])) { 1737 $article['author'] = array( 1738 '@type' => 'Person', 1739 'name' => $item[self::ROLE_HEADING] 1740 ); 1741 } 1742 1743 $schema[] = $article; 1744 } 1745 1746 return $schema; 1747 } 1748 1749 /** 1698 1750 * Book 1699 1751 */ -
unlimited-elements-for-elementor/trunk/inc_php/unitecreator_settings.class.php
r3429507 r3470240 162 162 */ 163 163 public function getArrUCSettingTypes(){ 164 164 165 165 $arrTypes = array( 166 166 "uc_textfield", … … 173 173 "uc_colorpicker", 174 174 "uc_image", 175 UniteCreatorDialogParam::PARAM_FILE, 175 176 "uc_mp3", 176 177 "uc_icon", -
unlimited-elements-for-elementor/trunk/includes.php
r3444776 r3470240 13 13 14 14 if(!defined("UNLIMITED_ELEMENTS_VERSION")) 15 define("UNLIMITED_ELEMENTS_VERSION", "2.0. 5");15 define("UNLIMITED_ELEMENTS_VERSION", "2.0.6"); 16 16 17 17 //disable elementor support for debugging purposes. keep it commented 18 18 //define("UE_DISABLE_ELEMENTOR_SUPPORT", true); 19 20 19 21 20 $currentFile = __FILE__; -
unlimited-elements-for-elementor/trunk/js/unitecreator_params_dialog.js
r3349280 r3470240 401 401 402 402 g_ucAdmin.validateNameField(objParam.name, "Name"); 403 404 if(objParam.type === "uc_file"){ 405 var hasFileTypes = ( 406 objParam.file_type_application === true || 407 objParam.file_type_image === true || 408 objParam.file_type_video === true || 409 objParam.file_type_svg === true 410 ); 411 412 if(hasFileTypes === false) 413 throw new Error("Please select at least one file type"); 414 } 403 415 404 416 }catch(error){ -
unlimited-elements-for-elementor/trunk/provider/assets/provider_admin.js
r3429507 r3470240 26 26 isMultiple = false; 27 27 28 var mediaTypes = type; 29 if(typeof mediaTypes === "string" && mediaTypes.indexOf(",") !== -1) 30 mediaTypes = mediaTypes.split(","); 31 32 var hasSvg = false; 33 if(Array.isArray(mediaTypes)){ 34 mediaTypes = mediaTypes.map(function(item){ 35 item = jQuery.trim(item); 36 if(item === "svg"){ 37 hasSvg = true; 38 return "image/svg+xml"; 39 } 40 return item; 41 }).filter(function(item){ 42 return item !== ""; 43 }); 44 }else if(mediaTypes === "svg"){ 45 hasSvg = true; 46 mediaTypes = "image/svg+xml"; 47 } 48 28 49 // Media Library params 29 50 let options = { … … 32 53 title : title, 33 54 multiple : isMultiple, 34 library : { type : ( type == 'svg' ? 'image/svg+xml' : type )},55 library : { type : mediaTypes }, 35 56 button : { text : 'Insert' } 36 57 } … … 39 60 40 61 // if SVG only 41 if ( type == 'svg') {62 if (hasSvg === true) { 42 63 frame.on('open', function() { 43 64 setTimeout(() => { -
unlimited-elements-for-elementor/trunk/provider/core/unlimited_elements/elementor/elementor_widget.class.php
r3397365 r3470240 397 397 if(GlobalsUnlimitedElements::$isImporting == true) 398 398 $value = ""; 399 400 if(is_numeric($value)) 401 $value = array("id"=>$value); 402 else 403 $value = array("url"=>$value); 404 break; 405 case UniteCreatorDialogParam::PARAM_FILE: 399 406 400 407 if(is_numeric($value)) … … 560 567 $itemsHeading = trim($itemsHeading); 561 568 569 $allowEmpty = $this->objAddon->getOption("items_allow_empty"); 570 $allowEmpty = UniteFunctionsUC::strToBool($allowEmpty); 571 562 572 $titleField = $this->objAddon->getOption("items_title_field"); 563 573 $titleField = trim($titleField); … … 712 722 $arrItemsControl["type"] = Controls_Manager::REPEATER; 713 723 $arrItemsControl["fields"] = $repeater->get_controls(); 714 724 725 //allow empty items 726 if($allowEmpty == true) 727 $arrItemsControl["prevent_empty"] = false; 728 729 715 730 if(!empty($titleField)) 716 731 $arrItemsControl["title_field"] = $titleField; … … 989 1004 $controlType = Controls_Manager::MEDIA; 990 1005 break; 1006 case UniteCreatorDialogParam::PARAM_FILE: 1007 $controlType = Controls_Manager::MEDIA; 1008 break; 991 1009 case UniteCreatorDialogParam::PARAM_HR: 992 1010 //$controlType = "uc_hr"; … … 1123 1141 $arrControl['default'] = $defaultValue; 1124 1142 } 1143 1144 break; 1145 case UniteCreatorDialogParam::PARAM_FILE: 1146 1147 $fileTypes = array(); 1148 if(UniteFunctionsUC::strToBool(UniteFunctionsUC::getVal($param, "file_type_application")) === true) 1149 $fileTypes[] = "application"; 1150 if(UniteFunctionsUC::strToBool(UniteFunctionsUC::getVal($param, "file_type_image")) === true) 1151 $fileTypes[] = "image"; 1152 if(UniteFunctionsUC::strToBool(UniteFunctionsUC::getVal($param, "file_type_video")) === true) 1153 $fileTypes[] = "video"; 1154 if(UniteFunctionsUC::strToBool(UniteFunctionsUC::getVal($param, "file_type_svg")) === true) 1155 $fileTypes[] = "svg"; 1156 1157 if(empty($fileTypes)) 1158 $fileTypes = array("application", "image", "video", "svg"); 1159 1160 $mediaTypes = array(); 1161 $mimeTypes = array(); 1162 foreach($fileTypes as $type){ 1163 if($type === "svg"){ 1164 $mediaTypes[] = "image"; 1165 $mimeTypes[] = "image/svg+xml"; 1166 }else{ 1167 $mediaTypes[] = $type; 1168 } 1169 } 1170 1171 $mediaTypes = array_values(array_unique($mediaTypes)); 1172 if(count($mediaTypes) == 1) 1173 $arrControl["media_type"] = $mediaTypes[0]; 1174 else 1175 $arrControl["media_type"] = $mediaTypes; 1176 1177 if(!empty($mimeTypes)) 1178 $arrControl["mime_types"] = array_values(array_unique($mimeTypes)); 1125 1179 1126 1180 break; … … 1782 1836 1783 1837 $arrControl["default"] = $arrItemValues; 1784 1838 1785 1839 $arrControl["prevent_empty"] = false; 1786 1840 1787 1841 break; 1788 1842 } -
unlimited-elements-for-elementor/trunk/provider/core/unlimited_elements/helper_provider_core.class.php
r3379552 r3470240 22 22 private static $isInfiniteLoopCode = false; 23 23 private static $arrAddedStyles = array(); 24 private static $isUploadMimeFiltersRegistered = false; 24 25 25 26 private static $currentDocument = null; … … 1618 1619 return(true); 1619 1620 } 1621 1622 /** 1623 * register upload mime filters based on settings 1624 */ 1625 public static function registerUploadMimeFilters(){ 1626 1627 if(self::$isUploadMimeFiltersRegistered === true) 1628 return; 1629 1630 self::$isUploadMimeFiltersRegistered = true; 1631 1632 $allowedMimes = self::getAllowedUploadMimes(); 1633 if(empty($allowedMimes)) 1634 return; 1635 1636 add_filter("upload_mimes", function($mimes) use ($allowedMimes){ 1637 return array_merge($mimes, $allowedMimes); 1638 }); 1639 1640 add_filter("wp_check_filetype_and_ext", function($data, $file, $filename, $mimes) use ($allowedMimes){ 1641 1642 $extension = strtolower(pathinfo($filename, PATHINFO_EXTENSION)); 1643 1644 if(isset($allowedMimes[$extension])){ 1645 $data["ext"] = $extension; 1646 $data["type"] = $allowedMimes[$extension]; 1647 } 1648 1649 return $data; 1650 }, 10, 4); 1651 } 1652 1653 /** 1654 * get allowed upload mime types from general settings 1655 */ 1656 private static function getAllowedUploadMimes(){ 1657 1658 $allowedMimes = array(); 1659 1660 $allowDocuments = self::getGeneralSetting("allow_upload_documents"); 1661 $allowDocuments = UniteFunctionsUC::strToBool($allowDocuments); 1662 1663 $allowZip = self::getGeneralSetting("allow_upload_zip"); 1664 $allowZip = UniteFunctionsUC::strToBool($allowZip); 1665 1666 $allowSvg = self::getGeneralSetting("allow_upload_svg"); 1667 $allowSvg = UniteFunctionsUC::strToBool($allowSvg); 1668 1669 if($allowDocuments === true){ 1670 $allowedMimes = array_merge($allowedMimes, array( 1671 "pdf" => "application/pdf", 1672 "doc" => "application/msword", 1673 "docx" => "application/vnd.openxmlformats-officedocument.wordprocessingml.document", 1674 "ppt" => "application/vnd.ms-powerpoint", 1675 "pptx" => "application/vnd.openxmlformats-officedocument.presentationml.presentation", 1676 "xls" => "application/vnd.ms-excel", 1677 "xlsx" => "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", 1678 "rtf" => "application/rtf", 1679 "odt" => "application/vnd.oasis.opendocument.text", 1680 "ods" => "application/vnd.oasis.opendocument.spreadsheet", 1681 "odp" => "application/vnd.oasis.opendocument.presentation", 1682 )); 1683 } 1684 1685 if($allowZip === true) 1686 $allowedMimes["zip"] = "application/zip"; 1687 1688 if($allowSvg === true) 1689 $allowedMimes["svg"] = "image/svg+xml"; 1690 1691 return $allowedMimes; 1692 } 1620 1693 1621 1694 … … 1637 1710 1638 1711 self::$filepathGeneralSettings = self::$pathCore."settings/general_settings_el.xml"; 1712 1713 self::registerUploadMimeFilters(); 1639 1714 1640 1715 do_action("ue_after_global_init"); -
unlimited-elements-for-elementor/trunk/provider/core/unlimited_elements/provider_core_admin.class.php
r3432094 r3470240 178 178 } 179 179 180 180 181 } -
unlimited-elements-for-elementor/trunk/provider/core/unlimited_elements/provider_core_front.class.php
r3251080 r3470240 34 34 35 35 } 36 37 36 38 37 } -
unlimited-elements-for-elementor/trunk/provider/core/unlimited_elements/settings/general_settings_el.xml
r3432094 r3470240 121 121 description="Edit Pro Settings for the Widgets"> 122 122 </field> 123 124 <field name="allow_upload_file_types" 125 type="statictext" 126 label="Allow Upload File Types"> 127 </field> 128 129 <field name="allow_upload_documents" 130 type="checkbox" 131 default="false" 132 addfield="allow_upload_zip,allow_upload_svg" 133 label="unite_setting_notext" 134 text_near="Documents (pdf, doc, docx, ppt etc...) "> 135 </field> 136 137 <field name="allow_upload_zip" 138 type="checkbox" 139 default="false" 140 label="unite_setting_notext" 141 text_near="Zip "> 142 </field> 143 144 <field name="allow_upload_svg" 145 type="checkbox" 146 default="false" 147 label="unite_setting_notext" 148 text_near="SVG"> 149 </field> 123 150 124 151 </fieldset> -
unlimited-elements-for-elementor/trunk/provider/functions_wordpress.class.php
r3442278 r3470240 3935 3935 return (self::$cacheAuthorsShort); 3936 3936 } 3937 3938 $args = array("role__not_in" => array("subscriber", "customer")); 3939 3937 3938 $args = array( 3939 "role__in" => array("administrator", "editor", "author"), 3940 "number" => 200 3941 ); 3940 3942 $arrUsers = get_users($args); 3941 3943 … … 4913 4915 4914 4916 add_action('wp_print_scripts', array('UniteFunctionsWPUC', 'onStylesAndScriptsDeregister'), PHP_INT_MAX); 4917 4918 add_action('wp_after_insert_post', function ($post_id, $post, $update) { GlobalsUC::$hideDebug = true; }, 10, 3); 4915 4919 4916 4920 } -
unlimited-elements-for-elementor/trunk/provider/integrations.class.php
r3397365 r3470240 16 16 17 17 private $defaultLang; 18 19 /** WPP orderby filter: post IDs order (static for filter callback) */ 20 private static $wppOrderByIDs = array(); 21 /** WPP orderby filter: ASC/DESC */ 22 private static $wppOrderByDirection = "DESC"; 18 23 19 24 private function ___________JET_ENGINE_________(){} … … 58 63 59 64 return($numViews); 65 } 66 67 /** 68 * get wpp range select 69 */ 70 public static function WPP_getRangeSelect(){ 71 72 $arrItems = array( 73 "last30days" => "Last 30 Days", 74 "last7days" => "Last 7 Days", 75 "last24hours" => "Last 24 Hours", 76 "daily" => "Daily", 77 "weekly" => "Weekly", 78 "monthly" => "Monthly", 79 "all" => "All", 80 ); 81 82 return($arrItems); 60 83 } 61 84 … … 147 170 148 171 return($output); 149 150 151 // Return cached results 152 /* 153 if ( $this->config['tools']['cache']['active'] ) { 154 $key = 'wpp_' . md5(json_encode($params)); 155 $query = \WordPressPopularPosts\Cache::get($key); 156 157 if ( false === $query ) { 158 $query = new Query($params); 159 160 $time_value = $this->config['tools']['cache']['interval']['value']; 161 $time_unit = $this->config['tools']['cache']['interval']['time']; 162 163 // No popular posts found, check again in 1 minute 164 if ( ! $query->get_posts() ) { 165 $time_value = 1; 166 $time_unit = 'minute'; 167 } 168 169 \WordPressPopularPosts\Cache::set( 170 $key, 171 $query, 172 $time_value, 173 $time_unit 174 ); 175 } 176 } // Get real-time popular posts 177 178 */ 179 180 return $query; 172 } 173 174 /** 175 * get popular post IDs for orderby (e.g. from sort filter) from query args 176 * queryArgs - WP_Query-style args (post_type, posts_per_page) 177 * range - WPP range key, default last30days 178 * @return array post IDs or empty array 179 */ 180 public static function WPP_getPopularPostIdsForOrderBy($queryArgs, $range = "last30days"){ 181 if(self::isWPPopularPostsExists() == false) 182 return array(); 183 $postType = UniteFunctionsUC::getVal($queryArgs, "post_type", "post"); 184 $limit = UniteFunctionsUC::getVal($queryArgs, "posts_per_page", 999); 185 if(empty($limit) || $limit < 1) 186 $limit = 999; 187 $obj = new self(); 188 $wpp_args = array( 189 "post_type" => $postType, 190 "limit" => $limit, 191 "range" => $range 192 ); 193 $response = $obj->WPP_getPopularPosts($wpp_args, false); 194 $ids = UniteFunctionsUC::getVal($response, "post_ids"); 195 return is_array($ids) ? $ids : array(); 196 } 197 198 /** 199 * WordPress filter: order by WPP popularity (uses static IDs/direction) 200 */ 201 public static function filterPostsOrderbyWpp($orderby, $query){ 202 if(is_object($query) && method_exists($query, "get")){ 203 $isActive = $query->get("ue_wpp_orderby"); 204 if(empty($isActive)) 205 return $orderby; 206 } 207 if(empty(self::$wppOrderByIDs)) 208 return $orderby; 209 $arrIDs = array_map("intval", self::$wppOrderByIDs); 210 $arrIDs = array_filter($arrIDs); 211 $arrIDs = array_unique($arrIDs); 212 if(empty($arrIDs)) 213 return $orderby; 214 global $wpdb; 215 $orderDir = (self::$wppOrderByDirection == "ASC") ? "ASC" : "DESC"; 216 $orderDirField = ($orderDir == "ASC") ? "DESC" : "ASC"; 217 $field = "FIELD({$wpdb->posts}.ID," . implode(",", $arrIDs) . ")"; 218 $orderby = "({$field} = 0) ASC, {$field} {$orderDirField}, {$wpdb->posts}.post_date {$orderDir}"; 219 return $orderby; 220 } 221 222 /** 223 * apply WPP orderby filter for the next WP_Query run 224 */ 225 public static function WPP_applyOrderByFilter($arrIDs, $orderDir = "DESC"){ 226 self::$wppOrderByIDs = is_array($arrIDs) ? $arrIDs : array(); 227 self::$wppOrderByDirection = ($orderDir == "ASC") ? "ASC" : "DESC"; 228 add_filter("posts_orderby", array(__CLASS__, "filterPostsOrderbyWpp"), 10, 2); 229 } 230 231 /** 232 * remove WPP orderby filter after query 233 */ 234 public static function WPP_removeOrderByFilter(){ 235 remove_filter("posts_orderby", array(__CLASS__, "filterPostsOrderbyWpp"), 10); 236 self::$wppOrderByIDs = array(); 181 237 } 182 238 -
unlimited-elements-for-elementor/trunk/provider/provider_params_processor.class.php
r3444776 r3470240 24 24 private $lastName = null; 25 25 26 26 27 27 /** 28 28 * add other image thumbs based of the platform … … 330 330 331 331 } 332 333 334 332 335 333 336 334 … … 1385 1383 if(self::SHOW_DEBUG_QUERY == true) 1386 1384 $showDebugQuery = true; 1385 1386 if(GlobalsUC::$hideDebug) 1387 $showDebugQuery = false; 1387 1388 1388 1389 //show debug by url only for admins … … 1796 1797 1797 1798 $orderBy = UniteFunctionsUC::getVal($filters, "orderby"); 1799 $isWppOrderBy = ($orderBy == "popular_wpp"); 1800 1801 if($isWppOrderBy === true){ 1802 unset($filters["orderby"]); 1803 $orderBy = null; 1804 } 1798 1805 1799 1806 … … 2131 2138 break; 2132 2139 case "most_viewed": 2133 2140 2134 2141 $isWPPPluginExists = UniteCreatorPluginIntegrations::isWPPopularPostsExists(); 2135 2142 … … 2206 2213 break; 2207 2214 } 2208 2215 2216 } 2217 2218 //order the posts by most viewed using the wpp plugin 2219 2220 if($isWppOrderBy === true){ 2221 2222 $isWPPPluginExists = UniteCreatorPluginIntegrations::isWPPopularPostsExists(); 2223 2224 if($showDebugQuery == true && $isWPPPluginExists == false){ 2225 dmp("Order by popular posts is possible only if you install 'WordPress Popular Posts' plugin. Please install it"); 2226 } 2227 2228 if($isWPPPluginExists){ 2229 2230 $objIntegrations = new UniteCreatorPluginIntegrations(); 2231 2232 $wppRange = UniteFunctionsUC::getVal($value, "{$name}_orderby_wpp_range", "last30days"); 2233 2234 $wpp_args = array( 2235 "post_type"=>$postType, 2236 "limit"=>$limit, 2237 "range"=>$wppRange 2238 ); 2239 2240 if(!empty($category)) 2241 $wpp_args["cat"] = $category; 2242 2243 $response = $objIntegrations->WPP_getPopularPosts($wpp_args, $showDebugQuery); 2244 2245 $arrIDsPopular = UniteFunctionsUC::getVal($response, "post_ids"); 2246 2247 $debugWPP = UniteFunctionsUC::getVal($response, "debug"); 2248 2249 if($showDebugQuery == true && !empty($debugWPP)){ 2250 dmp("Popular Posts Order Data: "); 2251 dmp($debugWPP); 2252 } 2253 } 2209 2254 } 2210 2255 … … 2220 2265 } 2221 2266 2222 if(!empty($arrIDsPopular) ){2267 if(!empty($arrIDsPopular) && $isWppOrderBy === false){ 2223 2268 $makePostINOrder = true; 2224 2269 $arrPostInIDs = $arrIDsPopular; … … 2260 2305 $orderDir = UniteFunctionsUC::getVal($args, "order"); 2261 2306 if($orderDir == "ASC") 2262 $arr IDsPopular = array_reverse($arrIDsPopular);2307 $arrPostInIDs = array_reverse($arrPostInIDs); 2263 2308 2264 2309 unset($args["order"]); … … 2434 2479 2435 2480 $args = $this->getPostListData_getCustomQueryFilters($args, $value, $name, $data); 2481 2482 // WPP orderby: from widget or from sort filter (URL) - handled via integrations class 2483 $isWppFromFilter = (isset($args["orderby"]) && $args["orderby"] == "popular_wpp" && UniteCreatorPluginIntegrations::isWPPopularPostsExists()); 2484 if($isWppOrderBy === true || $isWppFromFilter){ 2485 $isWppOrderBy = true; // ensure post-query cleanup runs 2486 if(empty($arrIDsPopular) && $isWppFromFilter){ 2487 $arrIDsPopular = UniteCreatorPluginIntegrations::WPP_getPopularPostIdsForOrderBy($args, "last30days"); 2488 } 2489 if(!empty($arrIDsPopular)){ 2490 $orderDir = UniteFunctionsUC::getVal($args, "order", "DESC"); 2491 UniteCreatorPluginIntegrations::WPP_applyOrderByFilter($arrIDsPopular, $orderDir); 2492 $args["ue_wpp_orderby"] = "true"; 2493 unset($args["orderby"]); 2494 } 2495 } 2436 2496 2437 2497 HelperUC::addDebug("Posts Query", $args); … … 2522 2582 2523 2583 $wasSkipRun = true; 2584 } 2585 2586 if($isWppOrderBy === true){ 2587 UniteCreatorPluginIntegrations::WPP_removeOrderByFilter(); 2524 2588 } 2525 2589 … … 2934 2998 2935 2999 $argsForDebug = UniteFunctionsWPUC::cleanQueryArgsForDebug($currentQueryVars); 3000 if(GlobalsUC::$showQueryDebugTermsByUrl == true) 3001 $argsForDebug = UniteFunctionsWPUC::expandTaxQueryTermsForDebug($argsForDebug); 2936 3002 dmp($argsForDebug); 2937 3003 … … 2995 3061 $originalQueryVars = $query->query_vars; 2996 3062 $originalQueryVars = UniteFunctionsWPUC::cleanQueryArgsForDebug($originalQueryVars); 3063 if(GlobalsUC::$showQueryDebugTermsByUrl == true) 3064 $originalQueryVars = UniteFunctionsWPUC::expandTaxQueryTermsForDebug($originalQueryVars); 2997 3065 2998 3066 dmp("The Query Request Is:"); … … 3396 3464 3397 3465 $numPosts = count($arrPosts); 3466 $showPostListDebug = HelperUC::hasPermissionsFromQuery("ucpostlistdebug"); 3398 3467 3399 3468 if($useForListing == true){ … … 3407 3476 3408 3477 $data[$nameListing."_items"] = $arrPosts; 3478 3479 //post list debug for listing/loop grid (same as non-listing path) 3480 if($showPostListDebug == true) 3481 HelperProviderUC::showPostsDebug($arrPosts, true); 3482 GlobalsProviderUC::$showPostsQueryDebug = false; 3409 3483 3410 3484 return($data); … … 3453 3527 HelperProviderUC::printDebugQueries(true); 3454 3528 } 3455 3456 $showPostListDebug = HelperUC::hasPermissionsFromQuery("ucpostlistdebug");3457 3529 3458 3530 if($showPostListDebug == true) … … 3552 3624 return($title); 3553 3625 } 3626 3627 /** 3628 * ensure gallery item has title 3629 */ 3630 private function ensureTitle($title, $data, $name, $post, $urlImage, $index){ 3631 3632 if(!empty($title)) 3633 return($title); 3634 3635 if(!empty($post) && !empty($post->post_title)) 3636 $title = $post->post_title; 3637 3638 if(empty($title)) 3639 $title = UniteFunctionsUC::getVal($data, $name."_title"); 3640 3641 if(empty($title)) 3642 $title = UniteFunctionsUC::getVal($data, $name."_caption"); 3643 3644 if(empty($title)) 3645 $title = UniteFunctionsUC::getVal($data, $name."_alt"); 3646 3647 if(empty($title) && !empty($urlImage)){ 3648 $filename = basename(parse_url($urlImage, PHP_URL_PATH)); 3649 $filename = preg_replace('/\.[^.]+$/', '', $filename); 3650 if(!empty($filename)) 3651 $title = str_replace(array("-", "_"), " ", $filename); 3652 } 3653 3654 if(empty($title)) 3655 $title = !empty($index) ? "Image {$index}" : "Image"; 3656 3657 return($title); 3658 } 3554 3659 3555 3660 … … 3928 4033 3929 4034 } 4035 4036 if($titleSource == "item_title") 4037 $title = $this->ensureTitle($title, $data, $name, $post, $urlImage, $index); 3930 4038 3931 4039 $item["title"] = $title; … … 4732 4840 $metaKey = UniteFunctionsUC::getVal($value, $name."_orderby_meta_key"); 4733 4841 $metaKey = trim($metaKey); 4734 4842 4735 4843 if(empty($metaKey)) 4736 4844 $orderBy = null; … … 5162 5270 $arrTermsObjects = $term_query->query( $args ); 5163 5271 5164 5165 5166 5272 5273 //term query debug 5274 5275 if($showDebug == true && $queryDebugType == "show_query"){ 5276 5277 $originalQueryVars = $term_query->query_vars; 5278 $originalQueryVars = UniteFunctionsWPUC::cleanQueryArgsForDebug($originalQueryVars); 5279 if(GlobalsUC::$showQueryDebugTermsByUrl == true) 5280 $originalQueryVars = UniteFunctionsWPUC::expandTaxQueryTermsForDebug($originalQueryVars); 5281 5282 dmp("The Query Request Is:"); 5283 dmp($term_query->request); 5284 5285 dmp("The finals query vars:"); 5286 dmp($originalQueryVars); 5287 5288 5289 $arrActions = UniteFunctionsWPUC::getFilterCallbacks("get_terms_args"); 5290 5291 dmp("Query modify callbacks ( get_terms_args ):"); 5292 dmp($arrActions); 5293 5294 $arrActions = UniteFunctionsWPUC::getFilterCallbacks("get_terms_orderby"); 5295 5296 dmp("Query modify callbacks ( get_terms_orderby ):"); 5297 dmp($arrActions); 5298 5299 } 5300 5301 /* 5167 5302 if($showDebug == true){ 5168 5303 dmp("terms found: ".count($arrTermsObjects)); 5169 } 5170 5171 //term query debug 5172 5173 if($showDebug == true && $queryDebugType == "show_query"){ 5174 5175 $originalQueryVars = $term_query->query_vars; 5176 $originalQueryVars = UniteFunctionsWPUC::cleanQueryArgsForDebug($originalQueryVars); 5177 5178 dmp("The Query Request Is:"); 5179 dmp($term_query->request); 5180 5181 dmp("The finals query vars:"); 5182 dmp($originalQueryVars); 5183 5184 5185 $arrActions = UniteFunctionsWPUC::getFilterCallbacks("get_terms_args"); 5186 5187 dmp("Query modify callbacks ( get_terms_args ):"); 5188 dmp($arrActions); 5189 5190 $arrActions = UniteFunctionsWPUC::getFilterCallbacks("get_terms_orderby"); 5191 5192 dmp("Query modify callbacks ( get_terms_orderby ):"); 5193 dmp($arrActions); 5194 5195 } 5196 5304 dmp("The terms (WP_Term objects):"); 5305 dmp($arrTermsObjects); 5306 } 5307 */ 5308 5309 5197 5310 if(!empty($arrExcludeSlugs)){ 5198 5311 HelperUC::addDebug("Terms Before Filter:", $arrTermsObjects); … … 5489 5602 $originalQueryVars = $user_query->query_vars; 5490 5603 $originalQueryVars = UniteFunctionsWPUC::cleanQueryArgsForDebug($originalQueryVars); 5604 if(GlobalsUC::$showQueryDebugTermsByUrl == true) 5605 $originalQueryVars = UniteFunctionsWPUC::expandTaxQueryTermsForDebug($originalQueryVars); 5491 5606 5492 5607 dmp("The Query Request Is:"); -
unlimited-elements-for-elementor/trunk/provider/provider_params_processor_multisource.class.php
r3444776 r3470240 302 302 */ 303 303 private function getData_gallery(){ 304 304 305 305 $arrImages = UniteFunctionsUC::getVal($this->arrValues, $this->name."_gallery"); 306 306 … … 341 341 $description = "Demo Image Description $counter"; 342 342 343 $arrImage["image_imageid"] = $url; 343 $arrImage["image_imageid"] = 0; 344 $arrImage["image"] = $url; 344 345 $arrImage["image_title"] = $title; 345 346 $arrImage["image_alt"] = $alt; … … 997 998 */ 998 999 private function showDebug_input($source, $arrData){ 1000 1001 /* 1002 $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); 1003 1004 foreach ($trace as $i => $t) { 1005 $func = ($t['class'] ?? '') . ($t['type'] ?? '') . ($t['function'] ?? 'global'); 1006 $file = $t['file'] ?? ''; 1007 $line = $t['line'] ?? ''; 1008 1009 echo "#$i $func ($file:$line)<br>\n"; 1010 } 1011 */ 999 1012 1000 1013 if($this->showDataType == "output") … … 1006 1019 HelperHtmlUC::putHtmlDataDebugBox_start(); 1007 1020 1008 if($source == self::SOURCE_DEMO){1009 dmp("Switching to demo data source in editor only.");1010 }1011 1012 $numItems = 0;1013 1014 if(is_array($arrData))1015 $numItems = count($arrData);1016 1017 dmp("Input data from: <b>$source</b>, found: $numItems");1018 1019 $arrData = UniteFunctionsUC::modifyDataArrayForShow($arrData);1020 1021 dmp($arrData);1021 if($source == self::SOURCE_DEMO){ 1022 dmp("Switching to demo data source in editor only."); 1023 } 1024 1025 $numItems = 0; 1026 1027 if(is_array($arrData)) 1028 $numItems = count($arrData); 1029 1030 dmp("Input data from: <b>$source</b>, found: $numItems"); 1031 1032 $arrData = UniteFunctionsUC::modifyDataArrayForShow($arrData); 1033 1034 dmp($arrData); 1022 1035 1023 1036 HelperHtmlUC::putHtmlDataDebugBox_end(); … … 1063 1076 if(empty($arrFields) === true && GlobalsProviderUC::$isUnderAjax === false) 1064 1077 UniteFunctionsUC::throwError("multisource getItems error: $itemsSource fields not found"); 1065 1078 1066 1079 //get items params 1067 1080 $arrItemParams = $this->arrParamsItems; … … 1173 1186 $arrItems[] = array("item" => $item); 1174 1187 } 1175 1188 1189 1176 1190 return ($arrItems); 1177 1191 } … … 1294 1308 1295 1309 $arrData = $this->getData($itemsSource); 1296 1297 $this->showDebug_input($itemsSource, $arrData); 1310 1311 if(GlobalsUC::$hideDebug !== true) { 1312 $this->showDebug_input($itemsSource, $arrData); 1313 } 1298 1314 1299 1315 //set empty demo output … … 1305 1321 $itemsSource = self::SOURCE_DEMO; 1306 1322 1307 $this->showDebug_input($itemsSource, $arrData); 1308 } 1309 1323 if(GlobalsUC::$hideDebug !== true) { 1324 $this->showDebug_input($itemsSource, $arrData); 1325 } 1326 } 1327 1310 1328 $arrItems = $this->getItems($itemsSource, $arrData); 1311 1329 1312 1330 $data[$name] = $arrItems; 1313 1331 1314 1332 if($this->showDebugData === true) 1315 1333 $this->showDebug_output($arrItems); -
unlimited-elements-for-elementor/trunk/provider/provider_settings.class.php
r3444776 r3470240 2071 2071 // --------- most viewed range ------------- 2072 2072 if($isWPPExists === true){ 2073 $arrItems = array_flip(array( 2074 "last30days" => "Last 30 Days", 2075 "last7days" => "Last 7 Days", 2076 "last24hours" => "Last 24 Hours", 2077 "daily" => "Daily", 2078 "weekly" => "Weekly", 2079 "monthly" => "Monthly", 2080 "all" => "All", 2081 )); 2073 $arrItems = UniteCreatorPluginIntegrations::WPP_getRangeSelect(); 2074 $arrItems = array_flip($arrItems); 2082 2075 2083 2076 $params = array(); … … 2407 2400 //----- orderby -------- 2408 2401 $arrOrder = UniteFunctionsWPUC::getArrSortBy($isForWooProducts); 2402 2403 $isWPPExists = UniteCreatorPluginIntegrations::isWPPopularPostsExists(); 2404 if($isWPPExists === true) 2405 $arrOrder["popular_wpp"] = __("Popular Posts", "unlimited-elements-for-elementor"); 2406 2409 2407 $arrOrder = array_flip($arrOrder); 2410 2408 … … 2421 2419 2422 2420 $this->addSelect($name . "_orderby", $arrOrder, __("Order By", "unlimited-elements-for-elementor"), $orderBY, $params); 2421 2422 //--- WPP orderby range --- 2423 if($isWPPExists === true){ 2424 $arrConditionWppOrder = array(); 2425 $arrConditionWppOrder[$name . "_orderby"] = "popular_wpp"; 2426 2427 $arrItems = UniteCreatorPluginIntegrations::WPP_getRangeSelect(); 2428 $arrItems = array_flip($arrItems); 2429 2430 $params = array(); 2431 $params["origtype"] = UniteCreatorDialogParam::PARAM_DROPDOWN; 2432 $params["elementor_condition"] = $arrConditionWppOrder; 2433 2434 $this->addSelect($name . "_orderby_wpp_range", $arrItems, __(" Popular Posts Time Range", "unlimited-elements-for-elementor"), "last30days", $params); 2435 } 2423 2436 2424 2437 //--- meta value param ------- -
unlimited-elements-for-elementor/trunk/provider/woocommerce_integrate.class.php
r3429507 r3470240 1627 1627 $quantity = $cart_item['quantity']; 1628 1628 1629 $priceHtml = wc_price( $cart_item['line_subtotal']+$cart_item['line_subtotal_tax'] ); 1630 1629 $lineTotal = $cart_item['line_total'] + $cart_item['line_tax']; // cart-adjusted 1630 $unitTotal = $quantity > 0 ? $lineTotal / $quantity : 0; 1631 $priceHtml = wc_price( $unitTotal ); 1632 1633 1631 1634 $imageHTML = ""; 1632 1635 … … 1682 1685 if(empty(WC()->cart)){ 1683 1686 $subtotal = 0; 1687 $subtotalWithTax = 0; 1684 1688 }else{ 1685 1689 … … 1695 1699 $subtotalHTML = wc_price($subtotalWithTax); 1696 1700 1701 $subtotalNoTax = wc_price($subtotal); 1702 1697 1703 $strNum = ""; 1698 1704 … … 1704 1710 1705 1711 <div class=\"uc-minicart-totals__subtotal\">{$subtotalHTML}</div> 1712 <div class=\"uc-minicart-totals__subtotal-notax\" style='display:none'>{$subtotalNoTax}</div> 1706 1713 1707 1714 </div>"; -
unlimited-elements-for-elementor/trunk/readme.txt
r3444776 r3470240 941 941 == Changelog == 942 942 943 version 2.0.5: 943 = 2.0.6 - 2026-01-22 = 944 945 Plugin Changes: 946 947 * Feature: added new option: allow empty in items settings 948 * Feature: Added "File" attribute 949 * Feature: added option in general settings: "allow upload file types" 950 * Feature: added order by functionality in the most popular posts plugin 951 * Feature: added one more schema type: News Article 952 * Feature: added autocorrection option in ajax search 953 * Feature: added support for popular posts plugin for the sorting filter 954 * Fix: make sure that gallery has item title always, in product item also 955 * Fix: fixed some logical bug with the filters 956 * Fix: fixed mini cart pricing issue 957 * Fix: fixed some small form related vulnurability 958 * Fix: fixed the authors fetch, to get only author roles and not all roles with exclude 959 * Fix: fixed some breadcrumbs issues 960 961 962 Widgets Changes: 963 964 * Feature: Post Carousel Lite (Free) - Performed a comprehensive review of widget options and enabled responsive controls (Desktop, Tablet, and Mobile) for all applicable settings to ensure better layout flexibility across devices 965 * Feature: Off Canvas Filters (Pro) - A new feature has been added allowing the Simple Popup widget to be included within the Offcanvas Filters widget. It now functions seamlessly alongside other filter widgets, providing more flexible layout options. 966 * Feature: Simple Popup (Free) - A new feature has been added allowing the Simple Popup widget to be included within the Offcanvas Filters widget. It now functions seamlessly alongside other filter widgets, providing more flexible layout options. 967 * Feature: Conditions (Free) - A new Is Logged In User trigger type has been added, allowing you to set up conditional actions or visibility rules based on whether a user is currently authenticated or browsing as a guest. 968 * Feature: Woo Mini Cart (Free) - A new Show Subtotal Type option has been added, allowing users to choose whether to display prices inclusive of tax or exclusive of tax. 969 * Feature: Post Carousel Lite (Free) - A new Link Entire Item Type option has been added, allowing users to choose specific link sources such as a Dynamic Post Popup, a Link from a Custom Field, and other dynamic destinations for the item-wide click action. 970 * Feature: Active Filters (Pro) - A new Flex Wrap option has been added, giving users the ability to control whether elements within a container should wrap onto multiple lines or stay on a single row. 971 * Feature: Post Grid (Free) - A new Order option has been added for each Additional Data element. 972 * Feature: Post Magazine Grid (Pro) - A new Order option has been added for each Additional Data element 973 * Feature: Post Carousel (Free) - A new Order option has been added for each Additional Data element 974 * Feature: Video on Hover (Free) - A new Show Controls option has been added, giving users the ability to display or hide native video player controls 975 * Feature: Post Magazine Grid (Pro) - A new Show Post Views option has been added, allowing users to display the total view count for individual posts within the widget. 976 * Feature: Post Carousel (Free) - A new Show Post Views option has been added, allowing users to display the total view count for individual posts within the widget. 977 * Feature: Video on Hover (Free) - new Play on Click value has been added to the Video Play Mode option, allowing videos to remain static until a user specifically interacts with them with a click event. 978 * Feature: Text Field (Free) - A new Hidden option has been implemented that allows a field to be visually concealed while ensuring that Form Entries still receive and record data from it 979 * Feature: AJAX Search (Free) - Added Autocorrection option that allows to display a suggestion with a clickable link when the initial search returns no results due to a potential typo. 980 * Feature: Video Carousel (Free) - A new YouTube video source option has been added to allow users to directly integrate and display video content from the platform within the widget. 981 * Feature: Repeater Table (Pro) - A new feature has been enabled within the widget that allows users to remove all existing items, bypassing the typical restriction in item-based widgets that requires at least one item to remain. 982 * Change: Icon Pointer Button (Pro) - Updated the Icon Selection attribute to utilize the native Icon Library, enabling support for both standard font icons and custom SVG graphics 983 * Change: Masonry & Justified Gallery (Free) - To improve clarity and avoid user confusion, the Column gallery type has been renamed to Masonry, more accurately reflecting its layout behavior. 984 * Fix: Button Icon Hover Effect (Pro) - Removed the Visibility Conditions options. These settings were previously added in error, as they are only compatible with form field logic and cannot function within standard widget layouts 985 * Fix: Background Switcher (Free) - An issue was resolved where disabling the First Selected option caused the widget to render as a blank space with no images visible. The widget now correctly initializes its display state even when no item is pre-selected. 986 * Fix: Background Switcher (Free) - An issue was resolved where the Hover Blur Effect only applied while the mouse was physically over a widget item. The effect has been corrected to persist on the active/selected item even when the mouse leaves the widget area 987 * Fix: Linear Progress Bar (Free) - An issue was resolved where browser background optimization features, such as bfcache and tab throttling, would freeze the widget's execution state. This caused the progress bar to remain stuck in a finished or desynchronized state upon page revisit or tab reactivation 988 * Fix: Post Carousel Lite (Free) - An issue was resolved where the Link Entire Item option was not functioning as expected 989 * Fix: WordPress Menu (Free) - An issue was resolved in the Elementor editor where the dropdown menu failed to display after clicking the burger icon, ensuring that navigation previews now function correctly within the editing interface. 990 * Fix: Huge Shapes Background (Pro) - An issue was resolved where the clearRect function utilized outdated or mismatched canvas dimensions, causing previous animation frames to persist and accumulate as visual "ghosting" or "smearing" artifacts. 991 * Fix: WordPress Menu (Free) - An issue was resolved in the Menu widget where the Clickable Parent Item option was incorrectly hidden when the Responsive Behavior was set to "Slide." This setting now logic-gates correctly: parent items remain visible and clickable on desktop, while automatically adjusting only at the responsive breakpoint to ensure sub-menus function properly on mobile devices. 992 * Fix: Alphabet Filter (Pro) - An issue was resolved where users were required to click the Close icon twice to unselect an active filter, ensuring that filters now deactivate as expected with a single click. 993 * Fix: Post Carousel (Free) - An issue was resolved where the Author element failed to inherit the color value defined in the Meta Data Color option 994 * Fix: Conditions (Free) - An issue was resolved where ACF Field trigger types were not functioning correctly, ensuring that conditional logic or actions tied to Advanced Custom Fields now trigger as expected 995 * Fix: Post Carousel (Free) - The CSS priority of the title selector has been increased to ensure that its specific styling consistently overrides any conflicting general styles 996 * Fix: Animated Split Text (Pro) - An issue was resolved where the Splitting library was being initialized before the necessary JavaScript files had fully loaded on the page, preventing proper execution. 944 997 945 998 -
unlimited-elements-for-elementor/trunk/release_log.txt
r3444776 r3470240 1 2 3 version 2.0.6: 4 5 * Feature: added new option: allow empty in items settings 6 * Feature: Added "File" attribute 7 * Feature: added option in general settings: "allow upload file types" 8 * Feature: added order by functionality in the most popular posts plugin 9 * Feature: added one more schema type: News Article 10 * Feature: added autocorrection option in ajax search 11 * Feature: added support for popular posts plugin for the sorting filter 12 * Fix: make sure that gallery has item title always, in product item also 13 * Fix: fixed some logical bug with the filters 14 * Fix: fixed mini cart pricing issue 15 * Fix: fixed some small form related vulnurability 16 * Fix: fixed the authors fetch, to get only author roles and not all roles with exclude 17 * Fix: fixed some breadcrumbs issues 1 18 2 19 -
unlimited-elements-for-elementor/trunk/unlimited_elements.php
r3444776 r3470240 5 5 * Description: Elementor all-in-one addons pack with the best widgets for Elementor, offering 100+ free widgets, templates, and tools to create stunning websites! 6 6 * Author: Unlimited Elements 7 * Version: 2.0. 57 * Version: 2.0.6 8 8 * Author URI: http://unlimited-elements.com 9 9 * Text Domain: unlimited-elements-for-elementor -
unlimited-elements-for-elementor/trunk/views/forms-logs.php
r3251080 r3470240 81 81 protected function column_form($item){ 82 82 83 return $item["form"];83 return esc_html($item["form"]); 84 84 } 85 85 … … 93 93 protected function column_message($item){ 94 94 95 return $item["message"];95 return esc_html($item["message"]); 96 96 } 97 97 -
unlimited-elements-for-elementor/trunk/views/objects/addon_view.class.php
r3349280 r3470240 128 128 $settingsItem->addControl("enable_items", "items_title_field", "show", "true"); 129 129 130 //allow empty items 131 $settingsItem->addRadioBoolean("items_allow_empty", " ".esc_html__("Allow Empty", "unlimited-elements-for-elementor"), false); 132 $settingsItem->addControl("enable_items", "items_allow_empty", "show", "true"); 133 130 134 131 135 $settingsItem->setStoredValues($options); -
unlimited-elements-for-elementor/trunk/views/objects/form_entries_view.class.php
r3329756 r3470240 334 334 335 335 if($status === self::STATUS_TRASH){ 336 $content = $label;336 $content = esc_html($label); 337 337 338 338 $actions = array( … … 369 369 protected function column_form($item){ 370 370 371 return $item["form_name"];371 return esc_html($item["form_name"]); 372 372 } 373 373
Note: See TracChangeset
for help on using the changeset viewer.