== Changelog == 4.13.3.7 * fix: any possible entities in javascript alerts were not decoded 2nd November 2016 4.13.3.6 * tweak: remove size display in popup title if empty 24th October 2016 4.13.3.5 * tweak: some css tweaks 7th September 2016 4.13.3.4 * tweak: added spans with class "wppizza-ingr-item" around added ingredients (excluding plaintext) 29th July 2016 4.13.3.3 * fix: menu item did not get correctly added on checkout page when ingredients were changed/edited to be the same as another already existing item in cart 29th July 2016 4.13.3.2 * tweak: minor css tweaks , including "box-sizing:border-content" for themes that (re)set to "box-sizing:border-box" 22nd May 2016 4.13.3.1 * fix for plugin versions >=4.13.x: the "menu item(s) to menu item(s)" custom group type should not available as it is not yet fully developed and will probably cause errors when using. If you are using one of these group types, a big red error notice will be displayed under that custom group, please follow the instructions there. If you do not have any of these error notices after updating you will be fine, but you should definitely update if your plugin version is >=4.13.x to avoid future problems 20th May 2016 4.13.3 * fix: eliminated some possible php notices * added: filter (wppizza_filter_ingredients_cart) to further format ingredients display in cart and order page 4th May 2016 4.13.2 * fix: (customised) ingredients sort order was not kept in emails etc when displaying (custom)groups * added: filter (wppizza_filter_ingredients_html, wppizza_filter_ingredients_txt) to further format ingredients display in emails etc 3rd May 2016 4.13.1 * fix: in edge cases the possibility existed to have ingredients displayed/added to previously added menu items due to a variable not always being re-initialized 9th December 2015 4.13 * tweak [WPML]: reduce number of WPML related queries * fix: could not create new admin role user when logged in as administrator and plugin was enabled 20th October 2015 4.12 * added : custom group option to set restrictions across all groups for any given item * tweak: changed default highlight background color for required selection in groups to a light yellow to make groups that require selections more obvious * tweak: added size label to popup title * tweak: minor currency formatting issue in popup * tweak: forcefully omitting draft wppizza menu items * tweak: sort sizes by name in dropdowns (if wppizza > 2.15.0.18) * fix: some possible php notices eliminated * fix: when changing sizes for menu item after setting up custom groups, item was not removed from group that is not applicable anymore * fix: order page did not update totals automatically when ingredient editing was enabled on order page 18th October 2015 4.11 * added: filters (wppizza_filter_ingredient_li_pre, wppizza_filter_ingredient_li_post, wppizza_filter_ingredient_li_inner_prepend, wppizza_filter_ingredient_li_inner_append) to use for filtering of each individual ingredients output in list of ingredients available * tweak: improved/streamlined licence handling somewhat * tweak: minimum wppizza version to 2.11.9 29th September 2015 4.10.5 * fix: "extra" prefix in conjunction with preselected ingredients was added even to preselected ingredients 27th August 2015 4.10.4 * fix: bug and associated php notices under certain circumstances when "sort and display ingredients by (custom)groups" is enabled 18th August 2015 4.10.3 * fix: "shop closed" popup did not get triggered on menu items with ingredients added when caching enabled 17th August 2015 4.10.2 * WPML : fixed additionally added ingredients and custum group labels not appearing in string translation * WPML : allow translation for prefixes ("no" , "extra") 13th August 2015 4.10.1 * update: updated widget constructor for WP 4.3 compatibility * added: option to prefix additionally added non-preselected ingredients 8th August 2015 4.10 * added: allow for (custom)groupnames of ingredients to be displayed in emails, admin order print and thank you page * tweak: increased priority of wppizza_ingredients_load_plugin_textdomain * fix: not able to update ingredients after being added to cart if using popup and sticky header enabled * fix: currency symbol position now following settings in main plugin * fix: various fixes of issues that might arise in conjunction with preselected ingredients under certain circumstances/selections * fix: "shop closed" popup did not get triggered on menu items with ingredients added 30th July 2015 4.9.2 * tweak: more consistant and stable licence handling (hopefully) * tweak: minor id discrepancy fix (category id's were omitted) when editing ingredients for items already added to cart * tweak: allow js debug * internal: as per wp guidelines, locale name now hardcoded 18th June 2015 4.9.1 * added: option to display set sortorder of *added* ingredients not only by price or alphabetically but also by ingredients order set * tweaks: minor css adjustments * some (somewhat unnecessary, but no harm done) security tweaks 28th April 2015 4.9 * added: add ingredients now also appplied on items using add_item_to_cart_button shortcode * added: ingredients also now editable (if enabled in option settings) from within cart or order page * tweaks: some minor css/js fixes 8th April 2015 4.8.0.1 * minor tweak: added 'baseprice' to session variables that might come in useful in filters 10th March 2015 4.8 * added : pagination in admin custom groups tab to - ignoring extreme cases - eliminate about 99.9% of server side max_post_vars limitations * tweak : eliminated some more possible php notices * fixed : admin paginations had stopped working (for some unknown reason) 23rd February 2015 4.7.1 * some css tweaks to improve consistancy across themes 18th February 2015 4.7 * tweak: allow adding of ingredients by clicking on label too * tweak: changed css for radio inputs to have a more consistant display across devices (especially when checked) * added: distinct label before any comments that may have been added to an ordered item (plaintext emails only, as it should be obvious in html emails) * fix: server side ingredients check did not take account of possibly set option (added in 4.6) to not exclude ingredients for selected meal sizes * fix: eliminated possible "Illegal string offset 'lbl'" warning 17th February 2015 4.6.6 * internal/fix: added missing sortflag to first install default ingredients 15th February 2015 4.6.5 * fix: displaying wrong group type selection in saved custom group (introduced in 4.6.4) 15th February 2015 4.6.4 * fix: eliminated rogue exit() in admin ajax when adding custom group (introduced in 4.6.3) * tweak: eliminate some more possible php notices 15th February 2015 4.6.3 * tweak: improve compatibilty with other plugins that add/remove their own classes (i.e change self.attr('class')=='x' to self.hasClass('x')) * tweak: distinctly declare header "application/json" in ajax requests (where it was missing) * tweak: eliminate some more possible php notices * internal: increased license update check timeout from 15 to 30 secs (might help some slow servers showing available updates) 14th February 2015 4.6.2 * tweak: some css cosmetics 14th February 2015 4.6.1 * updated required version number to 2.11.7.2 (as public $pluginSession required) * added a licensing debug option (might shed some light on why - on some servers - updates do not show up in the list of plugins) 11th February 2015 4.6 * added: allow radio input custom groups to be displayed as dropdowns * added: allow exclusions to only apply for selected mealsizes * added: pagination in ingredients tab to - ignoring extreme cases - eliminate about 99.9% of server side max_post_vars limitations * added: because of pagination, sortorder can also be set numerically (instead of just by drag and drop) * added: ingredients pagination default of 50 per page can be overridden by defining WPPIZZA_AI_MAX_IPP in wp-config.php (but might cause max_post_vars issues) * bugfix: more than one radio type custom group preselect only worked on the first one of those * bugfix (minor): a zero indexed ingredient was always selected when adding a new custom group * tweak: set distinct text color when ingredient group is highlighted (so as to not have gray on gray for example) * tweak: also now showing ingredients that are not in a custom group in individual menu item meta box info * tweak: some backend/admin display issues for some browsers fixed * tidyup: removed screenshots from zip (no need to bloat plugin downloads with this ) * tidyup: moved old changelog entries up to v4.4.1 to logs/changelog.txt 10th February 2015 4.5.4 multisite: added blogid to session to be used where appropriate internal: more reliable getting of *main* wppizza plugin settings (especially session name in a multisite setup) fix: also added category id to session of diy item (for the rare cases where wppizza->layout->group by category is enabled AND item has more than one category selected) 18th January 2015 4.5.3 fix: setting preselcted ingredient in conjunction with another custom group set to custom group type 1 (radio input) did not reflected correctly in the initial price (although correctly added/calculated when added to cart) 13th January 2015 4.5.2 * now adding load_textdomain on init as per wp guidelines * tweak: css twek to make ingredients buttons somewhat bigger on smaller screen devices * tweak: distinct span/class added for each custom group textbox input * fix: when using multiple textbox (custom group) for one menu item html was output in plaintext emails etc 9th January 2015 4.5.1.1 * distinct css class added to whole, half/half , quarter button 1st November 2014 4.5.1 * bugfix when using "Free Ingredients [x] ingredients free (of this group; cheapest first)" prices were not correctly calculated when adding to cart * minor tidyup: defined initial js wppizzaCartCommentToggle variable as function(){} instead of null; 26th October 2014 4.5 * added: drag and drop custom sorting of ingredients * added: option to allow a number of free ingredients to be added from a custom group * fix: "Alternative text if ingredient price is 0.00" was not displaying * fix: added some missing for consistency around initial "no extra ingredients" and icons * fix: some php notices in borderline cases * fix: now automatically disable display of add ingredients for a menu item when all possible ingredients for this item have been removed from the list of ingredients * now also deleting all appropriate meta keys on uninstall * updated howto somewhat 24th September 2014 4.4.1 * also delete (if any) wpml string translations from wpml db when uninstalling plugin to avoid orphaned/redundant db entries 1st September 2014 4.4 * instead of running live queries in frontend to determine which menu item has add ingredients enabled, the plugin now saves an array when updating/editing menu items in the backend which *significantly* reduces memory consumption, number of queries and execution time (especially when having 100's of menu items) 29th August 2014 4.3.5 * added possibility to add several textboxes to menu item (via custom groups) * made textboxes optionally be just an input field instead of a textarea * bugfix: could not reliably add two text boxes (never mind more than 2) to the same menu item in custom groups 22nd August 2014 4.3.4.4 * bugfix: mistyped a filter * now using WPPIZZA_ADDINGREDIENTS_LOCALE constant instead of class variable in load_plugin_textdomain to make some other plugins happy 10th June 2014 4.3.4.3 * Added a bunch of filters to customise output 10th June 2014 4.3.4.2 * BUGFIX: under certain circumstances, in conjunction with a "add textbox to item" custom group, halfs and quarters were not possible to be enabled 04th June 2014 4.3.4.1 * distinctly cast some vars as integers in for loops as php 5.5+ (at least 5.5.11 seems to and there's no harm done in doing it anyway) ends up in infinite loops otherwise 26th May 2014 4.3.4 * allow textbox to be displayed/added without having to set ingredient * when using popup to display ingredient selection, set distinct background color to white and text color to black (as in some themes the text might otherwise close to being invisible) * INTERNAL: setting EDD license check link to use https instead of http 26th May 2014 4.3.3 * added option to omit "1x" before selected ingredients in cart, orderpage, emails and order history (counts > 1 will always be displayed) * added classes to ingredients when selecting * added filter [wppizza_filter_ingredients_custom_sort] to be able to custom sort order of ingredients * added "add to cart as is" button option alongside choices for everywhere/half/quarters (will only be available if there are no mandatory selections, no pre-selections and more than one choice - e.g. halfs *and* quarters - are available to choose from) * made prices next to ingredients (if displayed) adhere to locale set * bugfix: when setting a custom group to have pre-selected items whilst setting preselected item prices to zero, the first selection of one of these ingredients was added at full price again (instead of 0) if it was entirely deselected first by the user and then added again (provided he was able to do that in the first place) 2nd May 2014 4.3.2 * FIX: previous versions only ever looked in parent theme for customised css even when using a child theme. Therefore, IF using a child theme, make sure you copy any customised css there. (Installations not using a childtheme are unaffected) 31st March 2014 4.3.1 * some themes might add things at li:before{content:'some stuff'} which could mess up the layout in the add ingredients window. this is now by default being forced to be empty i.e {content:''} * when selecting "Add textbox to item" in admin custom groups screen, "hide prices" and "sort by price" are now NOT being displayed (as they make no sense there) * added option to specifically display pre-selected ingredients that have been de-selected by the customer (as in "No Onions" for example) * added menu item title to thickbox/popup header * added link to troubleshooting guide (regarding max_input_vars etc) to howto tab * fixed some layout issues with sticky header in popup on resize/orientationchange * added dynamic (added and then removed) div to selectable ingredient fieldsets to disable additional selections whilst the server thinks about things to aid client side validation. as the js validation might otherwise not work reliably on slow (and i mean slow) servers * BUGFIX: in theory one could have set more ingredients as being pre-selected than the max different ingredients setting allows * BUGFIX: given that it is possible (although nonsensical) to create a custom group which requires 1,2 or more ingredient whilst also having another group that - in turn - excludes ALL of those ingredients again (so there would not really be anything at all to start off with) the serverside validation was still trying to validate this non-existent group (and therefore fail) . Now fixed * BUGFIX: cart did not show any comments/text associated with an ordered item (if entered) unless the page was refreshed 26th February 1014 4.3 * Added: option to sort ingredients by price first and then by name (custom groups and/or added ingredients) * Added: option to display or do not display prices next to ingredienst (custom groups and/or added ingredients) * Added: when displaying prices next added ingredients, allow 0.00 prices to not display or be replaced with customised text * Added: allow count of added ingredient to also be displayed next to the ingredient in the list of addable ingredients * Added: filter in backend to only display ingredients of a certain group * Added: Added custom group id to extenddata to identify which custom group the ingredient belonged to (by request - not used anywhere in this plugin though) * Bugfix: server side validation when trying to add a menu item that had halfs or quarters selected whilst also having a custom group applied to whole menu failed in certain circumstances and item did not get added to cart * Bugfix: when choosing a half/quarter menu item with a custom group applied to whole only where some ingredients were supposed to be pre-selected in this "whole" group relevant ingredients did not get pre-selected 7th February 2014 4.2.2 * fixed some possible issues in certain scenarios when updating the plugin with WPML being active 26th January 2014 4.2.1 * eliminated some php notices/warnings on first install when WPML is being used 24th January 2014 4.2 * made ingredients popup - if used - more usable on frontend when using mobile devices * added ability to filter custom groups in admin depending on which menu item or menu group a custom group applies to * added filter (wppizza_add_ingredients_filter_head,$array,$itemId,$tierId,$sizeId )to be able to inject customised html into add ingredients header section (where total price and 'add to cart' button are being displayed) * load minified version of css * bugfix: when setting a custom group to apply to whole item only, ingredients prices were still calculated by quarter / half as opposed to whole * bugfix: fixed some possible rounding errors 20th January 2014 4.1.1 * bugfix: added ingredients could not be removed when added ingredients were set to "sticky" when using popup 18th December 2013 4.1 * added option to keep selected ingredients sticky when using popup * added option to restrict custom menu to have a min total of ingredients selected (in a group) * bugfix that made admin link sometimes disappear when tab in another extension/plugin was selected 8th December 2013 4.0.1 * added display of label/id to uniquely identify meal sizes/price tiers in admin screens as these might have the same frontend labels 22nd November 2013 4.0 * added licensing key to automatically inform users of available updates via the normal WP Dashboard 17th November 2013 3.2.1 * BUGFIX: wrong count/alert when setting restrict total sum of selected ingredients in custom group 13th November 2013 3.2.0.1 * prevented double click when adding ingredients * BUGFIX: allowed all custom groups to be deleted (previous version always kept at least one once it had been set) * BUGFIX: textboxes (custom groups) where always displayed when a group was selected as "Default [just like regular groups] 13th November 2013 3.2 * added option to open add ingredients in popup layer (via WP thickbox) * added option to restrict total sum of selected ingredients in custom group: "Group must have *AT LEAST* minimum number of ingredient selected below (multiple allowed and multiple per ingredient)" 13th November 2013 3.1.2 * now saving added ingredients data in [extenddata] key of session to aid future development 11th November 2013 3.1.1 * eliminated some php notices 7th November 2013 3.1 * some themes/jQuery combinations may have double triggered adding to cart / adding ingredients clicks on some mobile devices, so the javascript functions have been amended to address this issue 3rd November 2013 3.0.7 * BUGFIX: plugin lost metadata when using quickedit/bulkedit 2nd November 2013 3.0.6 * fixed added ingredients displayed as "array" when custom group "Minimum number of different ingredients to select" allowed 0 selection and customer did not choose any 31st October 2013 3.0.5 * allow preselect ingredients prices to be set to zero * fixed fontend bug where preselected ingredients were not deselected in the pool of selectable ingredients when removed 12th October 2013 3.0.4 * allow negative pricing of ingredients * fixed bug when saving accessrights (previously it did not allow to revoke ALL rights for a user role, once one had been set) 12th October 2013 3.0.3 * option to copy all ingredients of one menu sizes group to another * option to restrict custom group to whole menu item only even when toppings per half/quarter are enable on menu item * example: offering a pizza with a ingredienst for half and half or quarter toppings, but being able to create a group of "thin crust" or "deep pan" for the whole pizza - as you cannot have one half "deep pan" and the other "thin crust" * updated howto 7th October 2013 3.0.1 * made plugin wpml compatible (tested with WP 3.6 , WPML Multilingual CMS Version 2.9.2, WPML String Translation Version 1.8.2 and WPML Translation Management Version 1.7.2, but should work with any reasonably recent version(s)) * added class (and css declaration) to half/quarter icons * made custom current groups label in admin custom groups more prominent * summary of custom groups in menu item view * option to copy single ingredient * add comment/textbox on a per menu item basis (in custom group) - 16th September 2013 3.0 * add ingredients per whole/half/quarter of menu item * pre-select ingredients per menu item * exclude ingredients per menu item * made custom groups "must have at least..." optional by being able to set minimum required ingredients to 0 * "Access Rights" Tab to allow access to pages depending on user role * summary in custom groups to not have to expand group to see basic settings * sorted custom groups somewhat more intuitively (one hopes) * sorted localization strings by description * added css declarations for buttons etc when enabling ingredients for whole/halfs/quarters * some minor other css changes/additions * javascript check for custom groups to avoid having the same ingredient 2x in different custom groups for the same menu item * allow override of admin css (wppizza-addingredients-admin.css) by adding a wppizza-addingredients-admin-custom.css to theme directory - 13th September 2013 2.1.1 * added "How To" tab * stopped plugin annoyingly deactivating itself whenever the main plugin "WPPizza" gets updated/deactivated - 6th July 2013 2.0/2.1 * added option for custom groups * split ingredients, groups and localization into tabs - June/July 2013 1.1 * cart contents multisite aware (if checked in main plugin settings) * added touchstart to click events in js - 10th May 2013 1.0 * Initial release - 17th March 2013