0

I’m using a discontinued WordPress theme (no support available) – I don’t know anything besides basics and getting below error message:

Warning: Use of undefined constant reply_text – assumed ‘reply_text’ (this will throw an Error in a future version of PHP) in /homepages/htdocs/wp-content/themes/topbest/functions.php on line 346

I logged into my server and here is line 346 of functions.php file look like.

<span class=”reply”><?php comment_reply_link(array_merge( $args, array(‘add_below’ => $add_below, ‘depth’ => $depth, ‘max_depth’ => $args[‘max_depth’], reply_text => ‘Comment Reply’))) ?></span>**

Any idea how to fix this?

Thanks,

RiggsFolly
  • 93,638
  • 21
  • 103
  • 149
  • 1
    You have Non Ascii characters in this, specifically the `”` and `‘` did you edit with a word processor? – RiggsFolly May 16 '20 at 00:11

1 Answers1

1

surround reply_text with quotes like this

<span class="reply"><?php comment_reply_link(array_merge( $args, array('add_below' => $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth'], 'reply_text' => 'Comment Reply'))) ?></span>

If this will break your app, echo out this constant via

var_dump(reply_text);

and put the outcoming string in quotes.

Sauerbrei
  • 443
  • 4
  • 14