Skip to content

Commit bc5e55b

Browse files
authored
Merge pull request #221 from OpenSourceOrg/fix/attachment-sprintf-fatal-main
Fix attachment-page & direct-access fatal errors in osi theme
2 parents c09497e + 3d70b71 commit bc5e55b

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

‎themes/osi/inc/template-tags.php‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,7 @@ function osi_posted_on( string $format = '' ) {
3333
esc_html( get_the_modified_date( $format ) )
3434
);
3535

36-
$posted_on = sprintf(
37-
/* translators: %s: post date. */
38-
'<a href="' . esc_url( get_permalink() ) . '" rel="bookmark">' . $time_string . '</a>'
39-
);
36+
$posted_on = '<a href="' . esc_url( get_permalink() ) . '" rel="bookmark">' . $time_string . '</a>';
4037

4138
echo '<span class="posted-on">' . $posted_on . '</span>'; // phpcs:ignore
4239
}

‎themes/osi/index.php‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
* @package osi
1313
*/
1414

15+
defined( 'ABSPATH' ) || exit;
16+
1517
get_header(); ?>
1618

1719
<section class="content <?php echo ( osi_display_sidebar() ? 'has_sidebar' : 'has_no_sidebar' ); ?>" id="content">

0 commit comments

Comments
 (0)