Skip to content

Commit 56b0c59

Browse files
committed
Revert to WordPress core get_post_format_strings()
1 parent 980761f commit 56b0c59

1 file changed

Lines changed: 3 additions & 16 deletions

File tree

includes/adapters/class-friends.php

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -181,23 +181,10 @@ public function get_channels( $channels, $user_id ) {
181181
* @return array Associative array of format slug => format name.
182182
*/
183183
protected function get_post_formats() {
184-
$friends = $this->get_friends();
185-
186-
// Use Friends' plural strings for format names.
187-
$formats = array(
188-
'standard' => $friends ? $friends->get_post_format_plural_string( 'standard', 0 ) : \__( 'Posts', 'microsub' ),
189-
'status' => $friends ? $friends->get_post_format_plural_string( 'status', 0 ) : \__( 'Statuses', 'microsub' ),
190-
'image' => $friends ? $friends->get_post_format_plural_string( 'image', 0 ) : \__( 'Images', 'microsub' ),
191-
'video' => $friends ? $friends->get_post_format_plural_string( 'video', 0 ) : \__( 'Videos', 'microsub' ),
192-
'audio' => $friends ? $friends->get_post_format_plural_string( 'audio', 0 ) : \__( 'Audio', 'microsub' ),
193-
'link' => $friends ? $friends->get_post_format_plural_string( 'link', 0 ) : \__( 'Links', 'microsub' ),
194-
'quote' => $friends ? $friends->get_post_format_plural_string( 'quote', 0 ) : \__( 'Quotes', 'microsub' ),
195-
'gallery' => $friends ? $friends->get_post_format_plural_string( 'gallery', 0 ) : \__( 'Galleries', 'microsub' ),
196-
'aside' => $friends ? $friends->get_post_format_plural_string( 'aside', 0 ) : \__( 'Asides', 'microsub' ),
197-
'chat' => $friends ? $friends->get_post_format_plural_string( 'chat', 0 ) : \__( 'Chats', 'microsub' ),
198-
);
184+
// Use WordPress core format strings with 'standard' added.
185+
$formats = array( 'standard' => \__( 'Standard', 'microsub' ) );
199186

200-
return $formats;
187+
return \array_merge( $formats, \get_post_format_strings() );
201188
}
202189

203190
/**

0 commit comments

Comments
 (0)