HEX
Server: Apache/2.4.46 (Win64) OpenSSL/1.1.1j PHP/8.4.25
System: Windows NT DESKTOP-4TAV2RJ 10.0 build 19045 (Windows 10) AMD64
User: fred (0)
PHP: 8.4.25
Disabled: NONE
Upload Files
File: C:/xampp/htdocs/wordpress/wp-content/themes/grey-matter/functions.php
<?php
if (function_exists('register_sidebar')) 
{
	register_sidebars(1, array(
	'name'			=> 'Sidebar',
	'before_widget'	=> '<li id="%1$s" class="widget %2$s">',
	'after_widget'	=> '</li>',
	'before_title'	=> '<h2 class="widgettitle">',
	'after_title'	=> '</h2>'
	));
}


load_theme_textdomain('grey_matter');


function greymatter_comment_function($comment, $args, $depth) {
   $GLOBALS['comment'] = $comment; ?>

        <?php // check comment author
          $PostAuthor = false;
          if ($comment -> comment_author_email == get_the_author_email()) {
          $PostAuthor = true;}
          elseif ($comment -> comment_author_email == get_bloginfo('admin_email')) {
          $PostAuthor = true;}
        ?>


   <li class="commentlist" <?php //comment_class(); ?> id="comment-<?php comment_ID() ?>">

    <div id="div-comment-<?php comment_ID(); ?>"> <!-- need to jump to comment -->

      <div id="comment_meta" class="<?php if($PostAuthor) {echo "comment_meta_admin";} else {echo "comment_meta_visitor";} ?>">

        <?php echo get_avatar($comment, 64); ?>
        <?php _e('Written by ','grey_matter'); echo " "; comment_author_link() ?>  <br />
        <?php echo " "; _e('on','grey_matter'); echo " "; comment_date(); echo " "; _e('at','grey_matter'); echo " "; comment_time(); ?> <br />
        <?php
          if (get_comment_reply_link(array_merge( $args, array('add_below' => 'div-comment', 'depth' => $depth, 'max_depth' => $args['max_depth'])))!="") {
            comment_reply_link(array_merge( $args, array('add_below' => 'div-comment', 'depth' => $depth, 'max_depth' => $args['max_depth'])));
            echo(' · ');
          }
        //  else _e('Too deep, no replies more','');
        ?>
        <?php //_e('Quote','grey_matter'); echo(' · '); ?>
        <a href="<?php get_permalink(id); ?>#comment-<?php comment_ID(); ?>" title="<?php _e('Permanent link to this comment','grey_matter'); ?>"><?php _e('Permalink','grey_matter'); ?></a>
        <?php edit_comment_link(__('Edit','grey_matter'), ' · ', ''); ?>

      </div>

      <?php if ($comment->comment_approved == '0') : ?>
  		  <span class="color_red"><?php _e('Your comment is awaiting moderation.', 'grey_matter'); ?></span>
  		<?php endif; ?>

  		<div id="comment_self" class="<?php if($PostAuthor) {echo "comment_admin";} else {echo "comment_visitor";} ?> comment_border">
        <?php comment_text() ?>
      </div>

    </div>   
  <?php
}

?>