grosar
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Help me interpret malicious code from hack?I got one of these I’m trying to remove from a site too!
This is my entry-nav.php file in the theme directory. Did you ever figure out how to remove it?
[Please do not post hack code here – see the links posted above]
Whoa! So try downloading the ziplist plugin, either it’s from my heavy modifications to the ziplist plugin- OR they have some sort of problem working together. Otherwise it basically works when I disable the ziplist plugin. Stranger then strange. I’m going to work on a work around, I personally hope it’s a modification of my own that’s breaking it because I can just diff my version to the original and take out a line or two from my modification. Or else I’m going to have to make a detector between the two plugins that disables ziplist at certain times?!
not because of show excerpts
I commented some schtuff out:
and have show excerpts on, it seems to work. Anything that really doesn’t need to be commented out?function pmpro_search_filter($query) { global $current_user, $wpdb, $pmpro_pages; //hide pmpro pages from search results if(!$query->is_admin && $query->is_search) { //$query->set('post__not_in', $pmpro_pages ); // id of page or post } //hide member pages from non-members (make sure they aren't hidden from members) if(!$query->is_admin && $query->is_search) { //get pages that are in levels, but not in mine $sqlQuery = "SELECT page_id FROM $wpdb->pmpro_memberships_pages "; if($current_user->membership_level->ID) $sqlQuery .= "WHERE membership_id <> '" . $current_user->membership_level->ID . "' "; $hidden_page_ids = $wpdb->get_col($sqlQuery); if($hidden_page_ids) //$query->set('post__not_in', $hidden_page_ids ); // id of page or post //get categories that are filtered by level, but not my level $sqlQuery = "SELECT category_id FROM $wpdb->pmpro_memberships_categories "; if($current_user->membership_level->ID) $sqlQuery .= "WHERE membership_id <> '" . $current_user->membership_level->ID . "' "; $hidden_post_cats = $wpdb->get_col($sqlQuery); //make this work //if($hidden_post_cats) //$query->set('category__not_in', $hidden_post_cats); } return $query; } add_filter( 'pre_get_posts', 'pmpro_search_filter' );