Changeset 1741743
- Timestamp:
- 10/05/2017 04:34:29 PM (8 years ago)
- File:
-
- 1 edited
-
appful/trunk/singletons/api.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
appful/trunk/singletons/api.php
r1741710 r1741743 27 27 add_action('create_term', array(&$this, 'updateTaxonomy')); 28 28 add_action('wp_enqueue_scripts', array(&$this, 'load_jquery')); 29 30 add_action('wp_ajax_zaki_like_dislike_ajax', array(&$this,'onZakiCommentLike'), 1, 0); 31 add_action('wp_ajax_nopriv_zaki_like_dislike_ajax', array(&$this,'onZakiCommentLike'), 1, 0); 29 32 30 33 … … 504 507 $post_id = get_the_ID(); 505 508 if ($post_id) { 506 $this->response->respond(appful_on_post($post_id, isset($_REQUEST[" push"])));509 $this->response->respond(appful_on_post($post_id, isset($_REQUEST["dopush"]))); 507 510 } 508 511 die(); … … 1388 1391 } 1389 1392 1393 1390 1394 function hasZakiCommentLike() { 1391 1395 include_once(ABSPATH . 'wp-admin/includes/plugin.php'); 1392 1396 return is_plugin_active("zaki-like-dislike-comments/zaki-like-dislike-comments.php"); 1393 1397 } 1398 1399 1400 function onZakiCommentLike() { 1401 global $wpdb; 1402 $commentID = intval($_POST['postid']); 1403 $row = $wpdb->get_row("SELECT comment_post_ID FROM $wpdb->comments WHERE comment_ID = ". $commentID); 1404 if($row) { 1405 appful_on_post($row->comment_post_ID, false); 1406 } 1407 } 1394 1408 } 1395 1409
Note: See TracChangeset
for help on using the changeset viewer.