Linux 软件免费装
Banner图

Pizza2Calc Dough Calculator

开发者 tullio69
更新时间 2026年10月10日 18:50
PHP版本: 8.1 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

calculator recipe pizza baking dough

下载

1.1.0 1.0.0

详情介绍:

Pizza2Calc Dough Calculator tells you how much flour, water, salt and yeast to use for your pizza dough. Choose the number and weight of the dough balls, the hydration, the salt, the room temperature and the rising time: the recipe updates while you move the controls. The yeast dose comes from a model calibrated on real doughs, not from a linear rule. Temperature and time are combined into equivalent hours, and the dose falls more than proportionally with time. Features Privacy Pizza2Calc Dough Calculator sends nothing to external servers and collects no data. The only request it makes is to your own site, when a visitor prints the recipe sheet (REST endpoint 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.

安装:

  1. Install the plugin from the Plugins screen, or upload the pizza2calc-dough-calculator folder to /wp-content/plugins/.
  2. Activate it.
  3. Add the "Pizza dough calculator" block to a page, or the [pizza2calc] shortcode.
  4. Optional: open the Pizza2Calc menu in the admin to set the form defaults, the rounding, the dough loss, which fields visitors see and the main colours.

屏幕截图:

  • On a phone: the main grams stay anchored at the bottom of the screen.
  • Warnings appear next to the controls they refer to, without moving anything.
  • The block in the editor, with the starting preset.
  • Settings: form defaults, visible fields, dough loss and rounding.

常见问题:

How do I add the water, pan and flour blend tools?

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.
They have no attributes: visitors set every value in the tool itself. Each one works on its own, and you can put all three, plus [pizza2calc], on the same page.

How do I start the calculator from a preset?

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.

How do I match the calculator to my theme?

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.

Why does the yeast dose not halve when I double the time?

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.

Can I put two calculators on the same page?

No: one calculator per page. The block can be added once per page; with the shortcode, use it once.

Why does the flour blend use only W, and not protein?

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.

Where does the friction of my mixer come from?

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".

Why is the sourdough time only an estimate?

Sourdough strength varies from one starter to another, so the calculator uses the percentage you enter and cannot convert it into fresh yeast.

Can developers extend it?

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.
And these actions, where an add-on can place a logo:
  • calcolapizza/zone/before_calculator: above the calculator, before the presets.
  • calcolapizza/zone/print_brand: in the header of the printed sheet.
The live calculation in the browser runs the same engine in JavaScript. 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.

更新日志:

1.1.0 1.0.0