Skip to content

Commit 199b808

Browse files
committed
Update WordPress adapter ID and improve code style
Changed the protected $id property from 'wordpress' to 'WordPress' for consistency. Improved code readability by aligning assignment operators in several methods.
1 parent 453972c commit 199b808

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

includes/adapters/class-wordpress.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class WordPress extends Adapter {
4040
*
4141
* @var string
4242
*/
43-
protected $id = 'wordpress';
43+
protected $id = 'WordPress';
4444

4545
/**
4646
* Adapter name.
@@ -277,7 +277,7 @@ protected function get_local_posts( $limit, $args ) {
277277
$query_args['date_query'] = array(
278278
array( 'after' => $args['before'] ),
279279
);
280-
$query_args['order'] = 'ASC';
280+
$query_args['order'] = 'ASC';
281281
}
282282

283283
$query = new \WP_Query( $query_args );
@@ -306,7 +306,7 @@ protected function get_cached_news_items( $limit ) {
306306
$items = \get_transient( $cache_key );
307307

308308
if ( false === $items ) {
309-
$items = $this->get_news_items( $limit * 2 ); // Fetch more for cache.
309+
$items = $this->get_news_items( $limit * 2 ); // Fetch more for cache.
310310
$cache_duration = $this->get_cache_duration( 'news' );
311311
\set_transient( $cache_key, $items, $cache_duration );
312312
}
@@ -326,7 +326,7 @@ protected function get_cached_events_items( $limit ) {
326326
$items = \get_transient( $cache_key );
327327

328328
if ( false === $items ) {
329-
$items = $this->get_events_items( $limit * 2 ); // Fetch more for cache.
329+
$items = $this->get_events_items( $limit * 2 ); // Fetch more for cache.
330330
$cache_duration = $this->get_cache_duration( 'events' );
331331
\set_transient( $cache_key, $items, $cache_duration );
332332
}
@@ -347,7 +347,7 @@ protected function get_cached_feed_items( $feed_url, $limit, $channel ) {
347347
$items = \get_transient( $cache_key );
348348

349349
if ( false === $items ) {
350-
$items = $this->get_feed_items( $feed_url, $limit * 2, $channel );
350+
$items = $this->get_feed_items( $feed_url, $limit * 2, $channel );
351351
$cache_duration = $this->get_cache_duration( 'feed' );
352352
\set_transient( $cache_key, $items, $cache_duration );
353353
}

0 commit comments

Comments
 (0)