setPostViews(get_the_ID(), $date); ?> <div class="column dt-sc-one-fourth first" > <div class="id_logo"> <!-- <img src="http://ivycamp.cruxservers.in/wp-content/themes/twentyfifteen/images/investor_logo.png">--> <img src="http://ivycamp.cruxservers.in/wp-content/uploads/2015/04/institute-127x150.jpg"> </div> <!-- <div class="column dt-sc-one-half first"> <a href="javascript:void(0);" onclick="<?php setPostInterests(get_the_ID()); ?> " class="dt-sc-button btn"> <i class="fa fa-check"></i>Show Interest</a> </div>--> <div class="btn-detail"> <a href="#askque" class="dt-sc-button btn">Ask Question</a> </div> <!-- <div class="column dt-sc-one-half"><a href="javascript:void(0);" onclick="<?php setPostLikes(get_the_ID()); ?> " class="dt-sc-button btn"> <i class="fa fa-question-circle"></i>Value Added</a> </div>--> </div> <div class="column dt-sc-three-fourth"> <h4 class="id_title"><?php if (get_post_meta(get_the_ID(), 'Alumni of Institute', true)) { echo get_the_category_by_ID(get_post_meta(get_the_ID(), 'Alumni of Institute', true)); } else { echo "Not Avail."; } ?> </h4> <div class="column dt-sc-one-half first">
function themerex_callback_post_counter() { global $_REQUEST; if (!wp_verify_nonce($_REQUEST['nonce'], 'ajax_nonce')) { die; } $response = array('error' => ''); $id = (int) $_REQUEST['post_id']; if (isset($_REQUEST['likes'])) { $counter = max(0, (int) $_REQUEST['likes']); setPostLikes($id, $counter); } else { if (isset($_REQUEST['views'])) { $counter = max(0, (int) $_REQUEST['views']); setPostViews($id, $counter); } } echo json_encode($response); die; }
<?php $timezone = +5.5; $date = gmdate("F d, Y H:i:s", time() + 3600 * ($timezone + date("I"))); setPostLikes($_REQUEST['id'], $date);