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

Added show_excerpt and max_words shortcode attributes #38

Merged
merged 5 commits into from
Dec 1, 2021

Conversation

mikesetzer
Copy link
Member

Description

  • Added show_excerpt and max_words shortcode attributes to allow for the display of excerpts on the card layout
  • Added css for new card excerpt
  • Added shortcode attributes to the read me
  • Configured plugin to retrieve post content and clean html and wordpress block tags, if no excerpt is found.

Motivation and Context

Increases the plugin display flexibility.

How Has This Been Tested?

  • Tested with negative, null, positive, and non-int values for max_words.
  • Tested with and without excerpts.
  • Tested on mobile.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires an update to the documentation.
  • I have updated the documentation accordingly.

- Added show_excerpt and max_chars shortcode attributes to allow for the display of excerpts on card layout.
- Added some css to card text
- Updated readme
@mikesetzer mikesetzer requested a review from a team as a code owner November 23, 2021 20:32
@mikesetzer mikesetzer requested review from cjg89, jmbarne3 and rjucf and removed request for a team November 23, 2021 20:32
@jmbarne3
Copy link
Contributor

Hey Mike! Most of us are going to be out until Monday, so I'm going to set a reminder within our Slack to look this over then.

@cadie cadie self-requested a review November 24, 2021 16:31
@cjg89 cjg89 changed the base branch from master to rc-v2.0.9 November 30, 2021 15:24
@mikesetzer
Copy link
Member Author

Two additional commits have been added that include a new layout for a material card design. Unsure if I should've closed and just resubmitted as a new pull request.

Material layout was tested on mobile, tablet, and desktop. Functionally the same as the card layout with excerpts, just a different design.

includes/ucf-post-list-common.php Outdated Show resolved Hide resolved
layouts/ucf-post-list-material.php Outdated Show resolved Hide resolved
includes/ucf-post-list-config.php Outdated Show resolved Hide resolved
layouts/ucf-post-list-card.php Outdated Show resolved Hide resolved
- Replaced explode/implode, wp_strip_all_tags, and preg_replace with filters and get_the_excerpt.
- Replaced "max_words" with "excerpt_length" for clarity
- Updated readme to reflect shortcode changes
@mikesetzer mikesetzer requested a review from cjg89 December 1, 2021 19:22
Copy link
Contributor

@jmbarne3 jmbarne3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice set of changes. Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants