mirror of
https://github.com/discourse/wp-discourse.git
synced 2025-10-03 08:59:21 +08:00
Add post_id parameter to publish_format_html
This commit is contained in:
parent
fed0771ae0
commit
5887330eed
1 changed files with 3 additions and 2 deletions
|
@ -209,10 +209,11 @@ class HTMLTemplates {
|
|||
* Available tags:
|
||||
* {excerpt}, {blogurl}, {author}, {thumbnail}, {featuredimage}
|
||||
*
|
||||
* @param int|null $post_id The ID of the post being published.
|
||||
* @static
|
||||
* @return string
|
||||
*/
|
||||
public static function publish_format_html() {
|
||||
public static function publish_format_html( $post_id = null ) {
|
||||
ob_start();
|
||||
?>
|
||||
<small><?php echo esc_html( self::get_text_options( 'published-at-text' ) ); ?>
|
||||
|
@ -221,7 +222,7 @@ class HTMLTemplates {
|
|||
<?php
|
||||
$output = ob_get_clean();
|
||||
|
||||
return apply_filters( 'discourse_publish_format_html', $output );
|
||||
return apply_filters( 'discourse_publish_format_html', $output, $post_id );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue