Automattic / Automattic/jetpack

Feature Add: Portfolio Shortcode Size option

Open
#7,040 2 comments 0 reactions 0 assignees View on GitHub
[Feature] Custom Content Types [Pri] Low Enhancement Good For Community
Dominant language
PHP
Stars
1.8k
Forks
898
Avg merge
1d 18h
Merged PRs (30d)
774

Description

The Jetpack portfolio shortcode was hardcoded to use "large" for the size. I have added the "size" option for the shortcode and it works with the typical "thumbnail" "medium" "large" as expected with the wordpress documentation. The size of the thumbnail and the cropping is the typical settings for the gallery.

Please see this code for the simple fix.

https://github.com/jsidabras/jetpack/commit/68922884eb54309cac2d83a13ad6ef24e25d65cf#diff-2da4a1879ab00cd88d001db523ff3ed2

Feel free to use this if you feel this is a feature worth having.

Contributor guide

Open the contributing guide

Research direction

Start with the linked commit and inspect its diff for the portfolio shortcode implementation. Compare the existing shortcode behavior with WordPress’s documented thumbnail size values, then verify that selecting each supported size produces the expected gallery thumbnail and cropping behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, wordpress
Domain
content, web-dev
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.