coding standards

This commit is contained in:
Matthias Pfefferle 2023-01-23 19:43:34 +01:00
parent 16b52c0940
commit aec21a489c
2 changed files with 92 additions and 87 deletions

View file

@ -62,7 +62,8 @@ class Shortcodes {
return ''; return '';
} }
return \get_the_title( $post->ID );; return \get_the_title( $post->ID );
} }
/** /**
@ -85,7 +86,8 @@ class Shortcodes {
$length = intval( $atts['length'] ); $length = intval( $atts['length'] );
if( $length == 0 ) { $length = ACTIVITYPUB_EXCERPT_LENGTH; } if ( $length == 0 ) {
$length = ACTIVITYPUB_EXCERPT_LENGTH; }
$excerpt = \get_post_field( 'post_excerpt', $post ); $excerpt = \get_post_field( 'post_excerpt', $post );
@ -306,7 +308,8 @@ class Shortcodes {
} }
} }
if( ! $size ) { $size = 'full'; } if ( ! $size ) {
$size = 'full'; }
$image = \get_the_post_thumbnail_url( $post->ID, $size ); $image = \get_the_post_thumbnail_url( $post->ID, $size );

View file

@ -298,7 +298,9 @@ class Post {
$need_update = false; $need_update = false;
// If the old contents is blank, use the defaults. // If the old contents is blank, use the defaults.
if( $old_content == "" ) { $old_content = ACTIVITYPUB_CUSTOM_POST_CONTENT; $need_update = true; } if ( $old_content == '' ) {
$old_content = ACTIVITYPUB_CUSTOM_POST_CONTENT;
$need_update = true; }
// Set the new content to be the old content. // Set the new content to be the old content.
$content = $old_content; $content = $old_content;