wprm.php
Functionality to add to WP Recipe Maker.
Tags
Table of Contents
Functions
- filter_nutrition_label() : array<string|int, string>
- Filter the attributes of the nutrition label.
- filter_private_notes() : array<string|int, string>
- Filter the attributes of the private notes.
- filter_recipe_cook_mode() : array<string|int, string>
- Filter the attributes of the cook mode toggle.
- filter_recipe_download_pdf() : array<string|int, string>
- Filter the attributes of the download PDF button.
- filter_recipe_equipment() : array<string|int, string>
- Filter the attributes of the recipe equipment display.
- filter_recipe_image() : array<string|int, string>
- Filter the attributes of the recipe image display.
- filter_recipe_ingredients() : array<string|int, string>
- Filter the attributes of the recipe ingredients display.
- filter_recipe_instructions() : array<string|int, string>
- Filter the attributes of the recipe instructions display.
- filter_recipe_jump_to_comments() : array<string|int, string>
- Filter the attributes of the jump to comments button.
- filter_recipe_jump() : array<string|int, string>
- Filter the attributes of the jump to recipe button.
- filter_recipe_media_toggle() : array<string|int, string>
- Filter the attributes of the recipe media toggle.
- filter_recipe_meta_container() : array<string|int, string>
- Filter the attributes of the recipe metadata container.
- filter_recipe_name() : array<string|int, string>
- Filter the attributes of the recipe name display.
- filter_recipe_notes() : array<string|int, string>
- Filter the attributes of the recipe notes.
- filter_recipe_nutrition() : array<string|int, string>
- Filter the attributes of a single recipe nutrition field.
- filter_recipe_print() : array<string|int, string>
- Filter the attributes of the recipe print button.
- filter_recipe_rating() : array<string|int, string>
- Filter the attributes of the recipe rating display.
- filter_recipe_servings() : array<string|int, string>
- Filter the attributes of the recipe ajustable servings.
- filter_recipe_summary() : array<string|int, string>
- Filter the attributes of the recipe summary.
- filter_recipe_tag() : array<string|int, string>
- Filter the attributes of the recipe tag container.
- filter_recipe_time() : array<string|int, string>
- Filter the attributes of the recipe individual time container.
- filter_recipe_unit_conversion() : array<string|int, string>
- Filter the attributes of the unit conversion control.
- filter_icon_sources() : array<string|int, mixed>
- Filter the SVG icon sources.
- filter_print_assets() : array<string|int, mixed>
- Filter the assets used for printing.
- filter_public_script() : array<string|int, mixed>
- Filter the public js variables.
- set_button_attributes() : array<string|int, string>
- Set the attributes of the template buttons.
- set_label_attributes() : array<string|int, string>
- Set the attributes of the meta labels.
- set_toggle_attributes() : array<string|int, string>
- Set the attributes of the toggle switches.
Functions
filter_nutrition_label()
Filter the attributes of the nutrition label.
filter_nutrition_label(array<string|int, string> $attributes) : array<string|int, string>
- Replaces inline style attributes to allow site styles.
Parameters
- $attributes : array<string|int, string>
-
The shortcode attributes.
Tags
Return values
array<string|int, string> —The modified attributes.
filter_private_notes()
Filter the attributes of the private notes.
filter_private_notes(array<string|int, string> $attributes) : array<string|int, string>
- Replaces inline style attributes to allow site styles.
Parameters
- $attributes : array<string|int, string>
-
The shortcode attributes.
Tags
Return values
array<string|int, string> —The modified attributes.
filter_recipe_cook_mode()
Filter the attributes of the cook mode toggle.
filter_recipe_cook_mode(array<string|int, string> $attributes) : array<string|int, string>
- Replaces inline style attributes to allow site styles.
Parameters
- $attributes : array<string|int, string>
-
The shortcode attributes.
Tags
Return values
array<string|int, string> —The modified attributes.
filter_recipe_download_pdf()
Filter the attributes of the download PDF button.
filter_recipe_download_pdf(array<string|int, string> $attributes) : array<string|int, string>
- Replaces inline style attributes to allow site styles.
Parameters
- $attributes : array<string|int, string>
-
The shortcode attributes.
Tags
Return values
array<string|int, string> —The modified attributes.
filter_recipe_equipment()
Filter the attributes of the recipe equipment display.
filter_recipe_equipment(array<string|int, string> $attributes) : array<string|int, string>
- Replaces inline style attributes to allow site styles.
- The header and group tags that specify heading level MUST be set in HTML template. This allows different heading levels between print and display use cases.
Parameters
- $attributes : array<string|int, string>
-
The shortcode attributes.
Tags
Return values
array<string|int, string> —The modified attributes.
filter_recipe_image()
Filter the attributes of the recipe image display.
filter_recipe_image(array<string|int, string> $attributes) : array<string|int, string>
- Replaces inline style attributes to allow site styles.
- The image size MUST be declared in the HTML template.
Parameters
- $attributes : array<string|int, string>
-
The shortcode attributes.
Tags
Return values
array<string|int, string> —The modified attributes.
filter_recipe_ingredients()
Filter the attributes of the recipe ingredients display.
filter_recipe_ingredients(array<string|int, string> $attributes) : array<string|int, string>
- Replaces inline style attributes to allow site styles.
- The header and group tags that specify heading level MUST be set in HTML template. This allows different heading levels between print and display use cases.
Parameters
- $attributes : array<string|int, string>
-
The shortcode attributes.
Tags
Return values
array<string|int, string> —The modified attributes.
filter_recipe_instructions()
Filter the attributes of the recipe instructions display.
filter_recipe_instructions(array<string|int, string> $attributes) : array<string|int, string>
- Replaces inline style attributes to allow site styles.
- The header and group tags that specify heading level MUST be set in HTML template. This allows different heading levels between print and display use cases.
- The associated ingredients setting MUST be set in the HTML template. Set 'ingredients_position' to 'none | after' to allow the template to determine the display of the associated ingredients list.
Parameters
- $attributes : array<string|int, string>
-
The shortcode attributes.
Tags
Return values
array<string|int, string> —The modified attributes.
filter_recipe_jump_to_comments()
Filter the attributes of the jump to comments button.
filter_recipe_jump_to_comments(array<string|int, string> $attributes) : array<string|int, string>
- Replaces inline style attributes to allow site styles.
Parameters
- $attributes : array<string|int, string>
-
The shortcode attributes.
Tags
Return values
array<string|int, string> —The modified attributes.
filter_recipe_jump()
Filter the attributes of the jump to recipe button.
filter_recipe_jump(array<string|int, string> $attributes) : array<string|int, string>
- Replaces inline style attributes to allow site styles.
Parameters
- $attributes : array<string|int, string>
-
The shortcode attributes.
Tags
Return values
array<string|int, string> —The modified attributes.
filter_recipe_media_toggle()
Filter the attributes of the recipe media toggle.
filter_recipe_media_toggle(array<string|int, string> $attributes) : array<string|int, string>
- Replaces inline style attributes to allow site styles.
Parameters
- $attributes : array<string|int, string>
-
The shortcode attributes.
Tags
Return values
array<string|int, string> —The modified attributes.
filter_recipe_meta_container()
Filter the attributes of the recipe metadata container.
filter_recipe_meta_container(array<string|int, string> $attributes) : array<string|int, string>
- Replaces inline style attributes to allow site styles.
Parameters
- $attributes : array<string|int, string>
-
The shortcode attributes.
Tags
Return values
array<string|int, string> —The modified attributes.
filter_recipe_name()
Filter the attributes of the recipe name display.
filter_recipe_name(array<string|int, string> $attributes) : array<string|int, string>
Replaces the inline style attributes to allow site styles.
Parameters
- $attributes : array<string|int, string>
-
The shortcode attributes.
Tags
Return values
array<string|int, string> —The modified attributes.
filter_recipe_notes()
Filter the attributes of the recipe notes.
filter_recipe_notes(array<string|int, string> $attributes) : array<string|int, string>
- Replaces inline style attributes to allow site styles.
Parameters
- $attributes : array<string|int, string>
-
The shortcode attributes.
Tags
Return values
array<string|int, string> —The modified attributes.
filter_recipe_nutrition()
Filter the attributes of a single recipe nutrition field.
filter_recipe_nutrition(array<string|int, string> $attributes) : array<string|int, string>
- Replaces inline style attributes to allow site styles.
Parameters
- $attributes : array<string|int, string>
-
The shortcode attributes.
Tags
Return values
array<string|int, string> —The modified attributes.
filter_recipe_print()
Filter the attributes of the recipe print button.
filter_recipe_print(array<string|int, string> $attributes) : array<string|int, string>
- Replaces inline style attributes to allow site styles.
Parameters
- $attributes : array<string|int, string>
-
The shortcode attributes.
Tags
Return values
array<string|int, string> —The modified attributes.
filter_recipe_rating()
Filter the attributes of the recipe rating display.
filter_recipe_rating(array<string|int, string> $attributes) : array<string|int, string>
- Replaces inline style attributes to allow site styles.
Parameters
- $attributes : array<string|int, string>
-
The shortcode attributes.
Tags
Return values
array<string|int, string> —The modified attributes.
filter_recipe_servings()
Filter the attributes of the recipe ajustable servings.
filter_recipe_servings(array<string|int, string> $attributes) : array<string|int, string>
- Replaces inline style attributes to allow site styles.
Parameters
- $attributes : array<string|int, string>
-
The shortcode attributes.
Tags
Return values
array<string|int, string> —The modified attributes.
filter_recipe_summary()
Filter the attributes of the recipe summary.
filter_recipe_summary(array<string|int, string> $attributes) : array<string|int, string>
- Replaces inline style attributes to allow site styles.
Parameters
- $attributes : array<string|int, string>
-
The shortcode attributes.
Tags
Return values
array<string|int, string> —The modified attributes.
filter_recipe_tag()
Filter the attributes of the recipe tag container.
filter_recipe_tag(array<string|int, string> $attributes) : array<string|int, string>
- Replaces inline style attributes to allow site styles.
Parameters
- $attributes : array<string|int, string>
-
The shortcode attributes.
Tags
Return values
array<string|int, string> —The modified attributes.
filter_recipe_time()
Filter the attributes of the recipe individual time container.
filter_recipe_time(array<string|int, string> $attributes) : array<string|int, string>
- Replaces inline style attributes to allow site styles.
Parameters
- $attributes : array<string|int, string>
-
The shortcode attributes.
Tags
Return values
array<string|int, string> —The modified attributes.
filter_recipe_unit_conversion()
Filter the attributes of the unit conversion control.
filter_recipe_unit_conversion(array<string|int, string> $attributes) : array<string|int, string>
- Replaces inline style attributes to allow site styles.
Parameters
- $attributes : array<string|int, string>
-
The shortcode attributes.
Tags
Return values
array<string|int, string> —The modified attributes.
filter_icon_sources()
Filter the SVG icon sources.
filter_icon_sources(array<string|int, mixed> $sources) : array<string|int, mixed>
- Add the pNet svg icon assets to default list.
Parameters
- $sources : array<string|int, mixed>
-
The default sources.
Tags
Return values
array<string|int, mixed> —The modified sources.
filter_print_assets()
Filter the assets used for printing.
filter_print_assets(array<string|int, mixed> $output, array<string|int, mixed> $print_args) : array<string|int, mixed>
Parameters
- $output : array<string|int, mixed>
-
The print output arguments.
- $print_args : array<string|int, mixed>
-
The print arguments.
Tags
Return values
array<string|int, mixed> —The modified output arguments.
filter_public_script()
Filter the public js variables.
filter_public_script(array<string|int, mixed> $vars) : array<string|int, mixed>
Parameters
- $vars : array<string|int, mixed>
-
The default variables.
Tags
Return values
array<string|int, mixed> —The modified variables.
set_button_attributes()
Set the attributes of the template buttons.
set_button_attributes(array<string|int, string> $attributes) : array<string|int, string>
- Replaces inline style attributes to allow site styles.
Parameters
- $attributes : array<string|int, string>
-
The shortcode attributes.
Tags
Return values
array<string|int, string> —The modified attributes.
set_label_attributes()
Set the attributes of the meta labels.
set_label_attributes(array<string|int, string> $attributes) : array<string|int, string>
- Replaces inline style attributes to allow site styles.
Parameters
- $attributes : array<string|int, string>
-
The shortcode attributes.
Tags
Return values
array<string|int, string> —The modified attributes.
set_toggle_attributes()
Set the attributes of the toggle switches.
set_toggle_attributes(array<string|int, string> $attributes) : array<string|int, string>
- Replaces inline style attributes to allow site styles.
Parameters
- $attributes : array<string|int, string>
-
The shortcode attributes.
Tags
Return values
array<string|int, string> —The modified attributes.