Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add user-defined item part ordering #1

wants to merge 4 commits into from


Copy link

@crispinb crispinb commented Dec 24, 2017

I put this together because I wanted a different ordering of the component parts of the pinboard item -- eg. Description followed by Title rather than the default. Offering it here in case it's of interest to anyone else.

It adds a shortcode arg item_parts_order, to which the user can assign a comma-separated string composed of DESC, TITLE, TAGS and DATE (any or all), specifying the order in which those item components should be rendered.

eg. [pbsc username="xxx" item_parts_order=" DESC, TITLE"]

shows each bookmarks' description first, followed by title.

Interaction with display_xxx args (eg display_tags) is handled simply by overriding them. If item_parts_order is assigned anything other than an empty string, display_date, display_desc and display_tags are ignored.


  1. Although I am a programmer, I am totally new to both Wordpress & PHP (these are literally the first lines I've written). So if you're interested in this PR, you probably should check it over. My apologies for anything daft contained here
  2. This will work for pinboard_bookmarks_fetch_feed and shortcodes, but I haven't done anything with widgets yet as I haven't yet looked into how they work
  3. There's some cleaning up of the new param input (eg spaces and duped section labels are removed), but it's unsophisticated.

Hope this is of some use, and happy to make any necessary changes.

Copy link

@aldolat aldolat commented Jan 4, 2018

sorry for the late reply! I'll check your PR and will let you know.

Thanks for your contribution.

@aldolat aldolat self-requested a review Jan 4, 2018
Copy link

@aldolat aldolat commented Mar 25, 2018

Option added in 1.7.0. Thanks for your PR.

@aldolat aldolat closed this Mar 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.