Reshuffled some args

Because.
This commit is contained in:
Tetrakern 2023-09-10 18:36:12 +02:00
parent fd995bdf26
commit 894bea4dba
6 changed files with 25 additions and 21 deletions

View File

@ -105,7 +105,7 @@ Filters the intermediate output array of the card control popup menu inside the
---
### `apply_filters( 'fictioneer_filter_chapter_card_footer', $footer_items, $post, $args, $story )`
### `apply_filters( 'fictioneer_filter_chapter_card_footer', $footer_items, $post, $story, $args )`
Filters the intermediate output array in the `_card-chapter.php` partial before it is imploded and rendered. Contains statistics with icons such as the number of words, publishing date, comments, and so forth.
**$footer_items:**
@ -117,8 +117,8 @@ Filters the intermediate output array in the `_card-chapter.php` partial before
**Parameters**
* $post (WP_Post) The post object.
* $story (array|null) Optional. Chapter story data.
* $args (array) Arguments passed to the partial.
* $story (array) Chapter story data.
---
@ -755,7 +755,7 @@ Filters the query arguments in the `fictioneer_latest_recommendations` shortcode
---
### `apply_filters( 'fictioneer_filter_shortcode_latest_stories_card_footer', $footer_items, $story, $args, $post )`
### `apply_filters( 'fictioneer_filter_shortcode_latest_stories_card_footer', $footer_items, $post, $story, $args )`
Filters the intermediate output arrays in the `_latest-stories.php` and `_latest-stories-compact.php` partials before they are imploded and rendered. Contains statistics with icons such as the number of chapters, words, dates, and so forth.
**$footer_items:**
@ -763,12 +763,12 @@ Filters the intermediate output arrays in the `_latest-stories.php` and `_latest
* $words (string) HTML for the total word count.
* $publish_date (string) Conditional. HTML for the publish date.
* $modified_date (string) Conditional. HTML for the modified date.
* $status (status) HTML for the status.
* $status (string) HTML for the status.
**Parameters**
* $post (WP_Post) The post object.
* $story (array) Collection of story post data.
* $args (array) Arguments passed to the partial.
* $story (WP_Post) The post object.
---
@ -802,19 +802,19 @@ Filters the query arguments in the `fictioneer_latest_stories` shortcode. The op
---
### `apply_filters( 'fictioneer_filter_shortcode_latest_updates_card_footer', $footer_items, $story, $args, $post )`
### `apply_filters( 'fictioneer_filter_shortcode_latest_updates_card_footer', $footer_items, $post, $story, $args )`
Filters the intermediate output array in the `_latest-updates.php` partial before it is imploded and rendered. Contains statistics with icons such as the number of chapters, words, dates, and so forth.
**$footer_items:**
* $chapters (string) HTML for the number of chapters.
* $words (string) HTML for the total word count.
* $modified_date (string) Conditional. HTML for the modified date.
* $status (status) HTML for the status.
* $status (string) HTML for the status.
**Parameters**
* $post (WP_Post) The post object.
* $story (array) Collection of story post data.
* $args (array) Arguments passed to the partial.
* $story (WP_Post) The post object.
---
@ -1009,7 +1009,7 @@ Filters the statistics for all stories rendered by the `fictioneer_stories_stati
---
### `apply_filters( 'fictioneer_filter_story_card_footer', $footer_items, $post, $args, $story )`
### `apply_filters( 'fictioneer_filter_story_card_footer', $footer_items, $post, $story, $args )`
Filters the intermediate output array in the `_card-story.php` partial before it is imploded and rendered. Contains statistics with icons such as the number of chapters, publishing date, comments, and so forth.
**$footer_items:**
@ -1019,12 +1019,12 @@ Filters the intermediate output array in the `_card-story.php` partial before it
* $modified_date (string) Conditional. HTML for the modified date.
* $author (string) Conditional. HTML for the author.
* $comments (string) HTML for the number of comments.
* $status (status) HTML for the status.
* $status (string) HTML for the status.
**Parameters**
* $post (WP_Post) The post object.
* $args (array) Arguments passed to the partial.
* $story (array) Story data.
* $args (array) Arguments passed to the partial.
---

View File

@ -205,7 +205,7 @@ $show_type = $args['show_type'] ?? false;
esc_attr__( 'Comments', 'fictioneer' ) . '"></i> ' . get_comments_number( $post );
// Filer footer items
$footer_items = apply_filters( 'fictioneer_filter_chapter_card_footer', $footer_items, $post, $args, $story_data );
$footer_items = apply_filters( 'fictioneer_filter_chapter_card_footer', $footer_items, $post, $story_data, $args );
// Implode and render footer items
echo implode( ' ', $footer_items );

View File

@ -194,7 +194,7 @@ $is_sticky = FICTIONEER_ENABLE_STICKY_CARDS &&
$footer_items['status'] = '<i class="card-footer-icon ' . $story['icon'] . '"></i> ' . fcntr( $story['status'] );
// Filer footer items
$footer_items = apply_filters( 'fictioneer_filter_story_card_footer', $footer_items, $post, $args, $story );
$footer_items = apply_filters( 'fictioneer_filter_story_card_footer', $footer_items, $post, $story, $args );
// Implode and render footer items
echo implode( ' ', $footer_items );

View File

@ -57,7 +57,9 @@ if ( FICTIONEER_ENABLE_STICKY_CARDS ) {
}
// Parameter for author?
if ( isset( $args['author'] ) && $args['author'] ) $query_args['author_name'] = $args['author'];
if ( isset( $args['author'] ) && $args['author'] ) {
$query_args['author_name'] = $args['author'];
}
// Taxonomies?
if ( ! empty( $args['taxonomies'] ) ) {
@ -196,9 +198,9 @@ $entries = fictioneer_shortcode_query( $query_args );
$footer_items = apply_filters(
'fictioneer_filter_shortcode_latest_stories_card_footer',
$footer_items,
$post,
$story,
$args,
$post
$args
);
// Implode and render footer items

View File

@ -54,7 +54,9 @@ if ( FICTIONEER_ENABLE_STICKY_CARDS ) {
}
// Parameter for author?
if ( isset( $args['author'] ) && $args['author'] ) $query_args['author_name'] = $args['author'];
if ( isset( $args['author'] ) && $args['author'] ) {
$query_args['author_name'] = $args['author'];
}
// Taxonomies?
if ( ! empty( $args['taxonomies'] ) ) {
@ -189,9 +191,9 @@ $entries = fictioneer_shortcode_query( $query_args );
$footer_items = apply_filters(
'fictioneer_filter_shortcode_latest_stories_card_footer',
$footer_items,
$post,
$story,
$args,
$post
$args
);
// Implode and render footer items

View File

@ -246,9 +246,9 @@ $entries = fictioneer_shortcode_query( $query_args );
$footer_items = apply_filters(
'fictioneer_filter_shortcode_latest_updates_card_footer',
$footer_items,
$post,
$story,
$args,
$post
$args
);
// Implode and render footer items