Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
07/26/2022 02:08:37 PM (16 months ago)
Author:
imath
Message:

Improve the new_blog_post activity type layout

These type of activities are generated when a blog post is published. If [13298] already brought some improvements making the included post featured image clickable, this changeset complement the first one:

  • by adding the post title into the activity content and linking it as well as the "read more" ellipsis to the post permalink. This "read more" link is generated using the WordPress the_content_more_link filter which means if your theme is using this filter to adapt the "read more" link, these adaptations will also be applied to the activity "read more" link.
  • by changing the markup used into these activities and by adding some CSS rules to make them looks more like WordPress embeds.

Props teeboy4real

Fixes #8052

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/testcases/activity/actions.php

    r13135 r13305  
    242242        $a = $this->activity_exists_for_post( $post_id, 'new_post', true );
    243243
    244         $this->assertSame( $post->post_content, $a->content, 'The Activity about a published post type should be updated when the post content has changed.' );
     244        $this->assertSame( bp_activity_create_summary( $post->post_content, (array) $a ), $a->content, 'The Activity about a published post type should be updated when the post content has changed.' );
    245245    }
    246246
Note: See TracChangeset for help on using the changeset viewer.