Эхо PHP переменная в WordPress Functions.php - PullRequest
0 голосов
/ 02 июля 2019

Я занят пользовательским кодом в моем файле WordPress functions.php, и я хотел бы посмотреть, правильно ли я получаю время, поэтому я создал переменную с именем $timetest. Я хотел бы знать, как мне показать это на реальной странице WordPress. Вот мой код:

$timetest = strtotime($shortcode->book_datetime);

$refreshtime = strtotime($shortcode->book_datetime) - strtotime("-10 minutes");

$html .= '<meta http-equiv="refresh" content="';
$html .=   $refreshtime;
$html .=  '">';
if(strtotime($shortcode->book_datetime) > (strtotime("-10 minutes"))){
    $html .= '<style>

    </style>';
}else{
    $html .= '<h4 style="text-align: center;">Time has expired</h4>';
    $html .= '<p align="center"><a class="fep-button" style="width: 195px; text-align: center;" href="https://lectiotutoring.co.za/EasyBlue" /> Schedule an appointment</a></p>';
}
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...