| 开发者 | tullio69 |
|---|---|
| 更新时间 | 2026年10月10日 18:50 |
| PHP版本: | 8.1 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
[pizza2calc] shortcode.[pizza2calc_water]: the water temperature for the dough temperature you want (base temperature method), with the ice to add when the water must be colder than your fridge water, and a calibration of your own mixer from a measured dough.[pizza2calc_pan]: the dough for another pan at the same thickness, round or rectangular.[pizza2calc_blend]: the W of a blend of two to four flours, from a small database of Italian pizza flours (each value with the mill's source) or your own W.calcolapizza/v1/print). It stores only its settings, in two options. The water tool can remember the friction of your mixer: it is saved in the visitor's own browser (localStorage) and never sent to the server. The font it uses (Fraunces, SIL Open Font License) ships with the plugin: nothing is loaded from external servers.
pizza2calc-dough-calculator folder to /wp-content/plugins/.[pizza2calc] shortcode.Paste the shortcode in any page or post, or in a Shortcode block:
[pizza2calc_water] for the water temperature and the ice to add.[pizza2calc_pan] to scale the dough to another pan.[pizza2calc_blend] for the W of a blend of two to four flours.[pizza2calc], on the same page.
In the block, choose the starting preset in the sidebar. With the shortcode, use [pizza2calc preset="neapolitan"] or [pizza2calc preset="high_hydration"]. The visitor can still change every field.
Pick a ready-made theme and touch up the main, text and background colours in Pizza2Calc > Appearance, with a live preview. Beyond those, colours, the main spacing and the fonts are CSS custom properties on .cp-root. Override them in your theme or in Appearance > Customize > Additional CSS, for example:
.cp-root { --cp-accent: #2f6fb0; --cp-accent-strong: #245a91; --cp-radius: 6px; }
The full list is at the top of assets/css/calcolapizza.css.
Because real doughs do not behave that way. The model uses an exponent of 1.65 on time, calibrated on real doughs: the dose falls more than proportionally.
No: one calculator per page. The block can be added once per page; with the shortcode, use it once.
Protein is not gluten: with a different extraction rate, the same protein percentage gives a different strength, while W measures strength directly. That is why bakers blend W values. The blend W is a weighted mean, a practical approximation, and the flour values are the typical W declared by the mill, which varies from batch to batch.
The starting values (by hand 3 °C, spiral 8, stand mixer 12, kitchen robot 16) are only a starting point: friction depends on how long and how fast you knead, and the kitchen robot value is an estimate. After a dough, enter its measured temperature and the temperature of the water you used in "Calibrate your mixer": the tool works out the friction of your mixer and can keep it as "My mixer".
Sourdough strength varies from one starter to another, so the calculator uses the percentage you enter and cannot convert it into fresh yeast.
Yes, with these filters:
calcolapizza/inputs: the raw inputs before the calculation.calcolapizza/recipe: the recipe after the calculation.calcolapizza/form_fields: the form fields. A field the calculator does not know is drawn generically: one with choices as a segmented control, a number (min, max, step) as a stepper, one with hidden as a hidden input. A field with methods (a list of method ids, e.g. array( 'direct' ) on yeast_type) shows only with those methods: with another method it is hidden and not sent, and the engine uses its own default. A field named method gets its own box at the top.calcolapizza/methods: the dough methods, a CalcolaPizza\Engine\Registry. Register a method with $methods->register( 'id', $method ); a method implementing MethodWithFields declares its own parameters, validated like the other inputs. Register its JavaScript twin in a script that depends on calcolapizza-engine: CalcolaPizzaEngine.methods.set( 'id', { fields, calculate } ).calcolapizza/stage_label: the label of a result stage, for a method that returns its ingredients in stages (output['stages'], e.g. a biga and its refresh). The stages show in the result panel and on the printed sheet, whose title is the method's label in the form.calcolapizza/presets: the presets.calcolapizza/tools: the small tools. Each entry, id => array( 'tool', 'template', 'title', 'fields' ), gets the shortcode pizza2calc_{id}; tool implements CalcolaPizza\Engine\Tool\Tool (fields with ranges, and the calculation). Register its JavaScript twin in a script that depends on calcolapizza-engine: CalcolaPizzaEngine.tools.set( 'id', { fields, calculate } ). The tools are read once, at init: add the filter before that, when your plugin loads.calcolapizza/schedule: the phases of the printed schedule (add a fridge phase, move the dividing time).calcolapizza/print_show_brand: whether the printed sheet shows the Pizza2Calc mark.calcolapizza/zone/before_calculator: above the calculator, before the presets.calcolapizza/zone/print_brand: in the header of the printed sheet.calcolapizza/inputs and calcolapizza/recipe apply to the server calculation: the page without JavaScript, the first render, the printed sheet and the REST endpoint calcolapizza/v1. The live view does not see them yet: if a filter changes the numbers, the screen and the printed sheet can differ. calcolapizza/presets and calcolapizza/form_fields apply everywhere; calcolapizza/schedule applies to the printed sheet, which the server renders.
[pizza2calc_water] gives the water temperature, the ice to add and a calibration of your mixer. [pizza2calc_pan] scales the dough to another pan. [pizza2calc_blend] gives the W of a flour blend, using a database of 30 Italian pizza flours with sources.[pizza2calc]. [calcolapizza] keeps working.