UCF / UCF-WordPress-Theme

A generic, responsive WordPress theme for UCF websites, built off of the Athena Framework.
3 stars 6 forks source link

`news`/"Vertical Feature" post list layout `show_excerpt` and `excerpt_length` support #121

Open cjg89 opened 2 years ago

cjg89 commented 2 years ago

Description

The UCF Post List SC plugin v2.1.0 will add support for new show_excerpt and excerpt_length shortcode attributes (see https://github.com/UCF/UCF-Post-List-Shortcode/pull/38). The news layout built for this theme already utilizes its own show_excerpt attribute, and will be compatible with this update, but could be updated to support excerpt length adjustments.

Why it's Important

To reduce confusion and ensure we're supporting available shortcode attributes where appropriate.

Alternatives

n/a

Possible Implementation

  1. Update comment here: https://github.com/UCF/UCF-WordPress-Theme/blob/master/includes/post-list-functions.php#L37-L39 (note that we still need the actual attribute value override here, as the UCF Post List plugin's default for this attribute is false)
  2. Update ucfwp_post_list_display_news() to support excerpt_length attribute. https://github.com/UCF/UCF-WordPress-Theme/blob/master/includes/post-list-functions.php#L232-L237 Logic in this snippet may need to be tweaked a bit to support these existing layout-specific filters as well as UCF_Post_List_Common::get_excerpt()

Additional context

n/a