This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//ready | |
$(function() { | |
//extend diacritics to support arabic characters | |
if(typeof DataTable !== 'undefined') { | |
DataTable.util.diacritics(function(str, both) { | |
if(typeof str !== 'string') { | |
return str; | |
} | |
var normalized = str | |
.normalize("NFD") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
#order comments by custom_meta | |
add_filter('comments_clauses','comments_order_by_meta'); | |
function comments_order_by_meta($clauses){ | |
global $wpdb; | |
#Join comments meta | |
$clauses['join'] = " | |
LEFT JOIN $wpdb->commentmeta | |
ON ( $wpdb->comments.comment_ID = $wpdb->commentmeta.comment_id ) AND ($wpdb->commentmeta.meta_key = 'kash_reviews_rating') | |
"; |