Title: Underscorefunk's Replies | WordPress.org

---

# Underscorefunk

  [  ](https://wordpress.org/support/users/underscorefunk/)

 *   [Profile](https://wordpress.org/support/users/underscorefunk/)
 *   [Topics Started](https://wordpress.org/support/users/underscorefunk/topics/)
 *   [Replies Created](https://wordpress.org/support/users/underscorefunk/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/underscorefunk/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/underscorefunk/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/underscorefunk/engagements/)
 *   [Favorites](https://wordpress.org/support/users/underscorefunk/favorites/)

 Search replies:

## Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Trying to get property of non-object in …/capabilities.php on line 1112](https://wordpress.org/support/topic/trying-to-get-property-of-non-object-in-capabilitiesphp-on-line-1112/)
 *  [Underscorefunk](https://wordpress.org/support/users/underscorefunk/)
 * (@underscorefunk)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/trying-to-get-property-of-non-object-in-capabilitiesphp-on-line-1112/#post-5113867)
 * I’m having the same issue on a fresh install.
 * Trying to get property of non-object in…
    /wp-includes/capabilities.php on line
   1165 /wp-includes/capabilities.php on line 1169 /wp-includes/capabilities.php
   on line 1171 /wp-includes/capabilities.php on line 1172 /wp-includes/capabilities.
   php on line 1175
 * You should submit your fix to core for patching.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Relevanssi - A Better Search] [Plugin: Relevanssi – A Better Search] Relevanssi ignores pre_get_posts post__not_in filtering](https://wordpress.org/support/topic/plugin-relevanssi-a-better-search-relevanssi-ignores-pre_get_posts-post_not_in-filtering/)
 *  Thread Starter [Underscorefunk](https://wordpress.org/support/users/underscorefunk/)
 * (@underscorefunk)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-relevanssi-a-better-search-relevanssi-ignores-pre_get_posts-post_not_in-filtering/#post-3123214)
 * The filters you’re talking about definitely did. They worked like charm! Thanks
   so much for the fantastic plugin!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Relevanssi - A Better Search] [Plugin: Relevanssi – A Better Search] Relevanssi ignores pre_get_posts post__not_in filtering](https://wordpress.org/support/topic/plugin-relevanssi-a-better-search-relevanssi-ignores-pre_get_posts-post_not_in-filtering/)
 *  Thread Starter [Underscorefunk](https://wordpress.org/support/users/underscorefunk/)
 * (@underscorefunk)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-relevanssi-a-better-search-relevanssi-ignores-pre_get_posts-post_not_in-filtering/#post-3123193)
 * Looks like the solution is to use some of relevanssi’s filters instead. Here’s
   the solution. Hope this helps some folk out there. In this situation I wanted
   to selectively exclude an ’employees’ page and all child pages if the current
   user isn’t allowed to see ’employee content’
 * I’ll probably write a sql query that is more efficient to only grab IDs instead
   of get_pages. But this is proof of concept.
 * Also, the ID of 7324 for the employee page will be replaced with something more
   flexible and/or a theme option. 🙂
 *     ```
       function uf_search_filter( $query_restrictions ) {
   
       	if ( current_user_can( 'read_employee_only_content' ) ) {
       		return $query_restrictions;
       	}
   
       	$pages = get_pages( 'child_of=7324' );
       	array_push( $pages, '7324');
   
       	foreach ( $pages as $page ) {
       		$query_restrictions .= " AND doc != '" . $page->ID . "' ";
       	}
       	return $query_restrictions;	
   
       }
   
       add_filter ( 'relevanssi_where' , 'uf_search_filter' );
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Preserved HTML Editor Markup] [Plugin: Preserved HTML Editor Markup] Can't use the visual editor](https://wordpress.org/support/topic/plugin-preserved-html-editor-markup-cant-use-the-visual-editor/)
 *  [Underscorefunk](https://wordpress.org/support/users/underscorefunk/)
 * (@underscorefunk)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-preserved-html-editor-markup-cant-use-the-visual-editor/page/2/#post-2978815)
 * I made an edit to **sb_preserved_markup.php** on **Line 309** replacing WP_PLUGIN_URL
   with the plugins_url() function return.
 *     ```
       wp_enqueue_script('emc2-pm-admin-js', WP_PLUGIN_URL .'/'.str_replace(basename( __FILE__),"",plugin_basename(__FILE__))."admin.js?v=".$cachebuster);
       ```
   
 * became
 *     ```
       wp_enqueue_script('emc2-pm-admin-js', plugins_url() . '/' . str_replace(basename( __FILE__),"",plugin_basename(__FILE__))."admin.js?v=".$cachebuster);
       ```
   
 * Worked like a charm! 😀
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Preserved HTML Editor Markup] [Plugin: Preserved HTML Editor Markup] Can't use the visual editor](https://wordpress.org/support/topic/plugin-preserved-html-editor-markup-cant-use-the-visual-editor/)
 *  [Underscorefunk](https://wordpress.org/support/users/underscorefunk/)
 * (@underscorefunk)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-preserved-html-editor-markup-cant-use-the-visual-editor/page/2/#post-2978814)
 * I’ve been struggling with this problem even with the latest version. I get the
   following error when I click on the Visual Tab:
 * `Uncaught TypeError: Cannot call method 'apply' of undefined wp-tinymce.php:2`
 * I noticed an error that might highlight why this is happening…
 * [blocked] The page at [https://XXXXXXXXXXX/wp-admin/post.php?post=165954&action=edit](https://XXXXXXXXXXX/wp-admin/post.php?post=165954&action=edit)
   ran insecure content from [http://XXXXXXXXXXX/wp-content/plugins/preserved-html-editor-markup/admin.js?v=1.5&ver=3.3.1](http://XXXXXXXXXXX/wp-content/plugins/preserved-html-editor-markup/admin.js?v=1.5&ver=3.3.1).
 * Disabling the preserved html editor plugin resolves the issue. Strangely enough,
   this only seems to pop up in Chrome…
 * Any ideas?
 * By the way, awesome plugin. The fact that this even exists makes me smile.
 * Peace,
    John

Viewing 5 replies - 1 through 5 (of 5 total)