I´m a totally newbie in Javascript.
I´m using Wordpress and need a Button that is getting clickable after a predefined time - Like 2 Hours after Posts.
Here´s what i already have.
echo $post_time = $proposal->comment_date;
$t_time = get_the_time( __( 'Y/m/d g:i:s A' ) );
echo "<h1>BLOG TIME</h1>";
echo $t_time . "<br>";
echo $current_time = date("Y-m-d g:i:s A");
$time_to_wait = 60 //Minutes
if ( $post_time < $current_time )
{
echo "ok";
} else { echo "not ok"; }
How to integrate the $time_to_wait Variable?
How should the JavaScript look like?