Skip to content

Commit

Permalink
Recipe Shortcode Updates (#13841)
Browse files Browse the repository at this point in the history
* [not verified] Nutrition shortcode

* [not verified] Recipe prep and cooking time.

* [not verified] Adds rating to recipe shortcode.

* [not verified] Adds recipe image shortcode.

This adds a shortcode to output an image in a spot where the user can control.
Also, it allows for using WP images instead of URLs.

* [not verified] Adds microformat 1 + 2 classes.

* [not verified] Recipe time meta refactoring

Consolidates code for displaying time meta into a function instead of duplicating

* [not verified] Starts unit tests.

* [not verified] Creates recipe unit tests.

* [not verified] Nutrition shortcode

* [not verified] Adds rating to recipe shortcode.

* Restricts KSES updates to just recipe shortcode

Fixes issues with D34558-code

* Migrates recipe kses to more consistent place

Summary: In D34558 recipe shortcode code was found to be responsible for modifying the global KSES state. This copies the functionality to a core file so this behavior can be removed as it affects JP sites.

Test Plan: Verify KSES output for no security flaws.

Reviewers: kraftbj

Reviewed By: kraftbj

Tags: #touches_jetpack_files

Differential Revision: D34780-code

This commit syncs r199078-wpcom.

* Removes duped code.

* Adds detailed comment descriptions for shortcode attributes.

* Adds additional validation of image URL.

* Adds additional unit tests to cover invalid images and KSES

* Updates versions to 8.0

* Fixes some issues with microformats.

* Changes ingredients markup

* Moves nutrition microformat to list item
  • Loading branch information
ChaosExAnima committed Nov 19, 2019
1 parent ae7230d commit 9265ccd
Show file tree
Hide file tree
Showing 2 changed files with 568 additions and 86 deletions.

0 comments on commit 9265ccd

Please sign in to comment.