Skip to content

Conversation

@raduconst
Copy link

This PR is a fix for #25
The Toggle Post Details button was removed here 95c6874#diff-9163f1310b94e41b397251a77e18ec5a but the setup_postadata is still not working so I couldn't use the the_excerpt function.

What I did instead is try to replicate the functionality that's used on the Dashboard → Pages area and take care of these three cases:

  1. when the post is password protected, the There is no excerpt because this is a protected post. message is displayed (ref https://core.trac.wordpress.org/browser/tags/5.1.1/src/wp-includes/post-template.php#L400);
  2. when there's an excerpt set by the user, display it (ref https://core.trac.wordpress.org/browser/tags/5.1.1/src/wp-includes/post-template.php#L412);
  3. when there's no excerpt set, use wp_trim_words like explained here: https://developer.wordpress.org/reference/functions/get_the_excerpt/#comment-content-2457 Basically, this will generate automatically a text from the post content (ref. https://core.trac.wordpress.org/browser/tags/5.1.1/src/wp-includes/formatting.php#L3713).

I also made a little change on L474 and add the post-title class to the title column since the JS code that's adding the hidden class is still available.

@GaryJones GaryJones changed the base branch from main to develop November 13, 2025 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant