Add a css class to the image attachments
This commit is contained in:
parent
57a95fad01
commit
f916bca388
2 changed files with 2 additions and 2 deletions
|
@ -248,7 +248,7 @@ class Friends_Feed_Parser_ActivityPub extends \Friends\Feed_Parser {
|
|||
|
||||
$data['content'] .= PHP_EOL;
|
||||
$data['content'] .= '<!-- wp:image -->';
|
||||
$data['content'] .= '<p><img src="' . esc_url( $attachment['url'] ) . '" width="' . esc_attr( $attachment['width'] ) . '" height="' . esc_attr( $attachment['height'] ) . '" /></p>';
|
||||
$data['content'] .= '<p><img src="' . esc_url( $attachment['url'] ) . '" width="' . esc_attr( $attachment['width'] ) . '" height="' . esc_attr( $attachment['height'] ) . '" class="size-full" /></p>';
|
||||
$data['content'] .= '<!-- /wp:image -->';
|
||||
}
|
||||
$meta = \Activitypub\get_remote_metadata_by_actor( $object['attributedTo'] );
|
||||
|
|
|
@ -68,7 +68,7 @@ class Test_Friends_Feed_Parser_ActivityPub extends \WP_UnitTestCase {
|
|||
|
||||
$this->assertEquals( $post_count + 1, count( $posts ) );
|
||||
$this->assertStringStartsWith( $content, $posts[0]->post_content );
|
||||
$this->assertStringContainsString( '<img src="' . esc_url( $attachment_url ) . '" width="' . esc_attr( $attachment_width ) . '" height="' . esc_attr( $attachment_height ) . '" />', $posts[0]->post_content );
|
||||
$this->assertStringContainsString( '<img src="' . esc_url( $attachment_url ) . '" width="' . esc_attr( $attachment_width ) . '" height="' . esc_attr( $attachment_height ) . '"', $posts[0]->post_content );
|
||||
$this->assertEquals( $this->friend_id, $posts[0]->post_author );
|
||||
|
||||
// Do another test post, this time with a URL that has an @-id.
|
||||
|
|
Loading…
Reference in a new issue