Title: nickoonce's Replies | WordPress.org

---

# nickoonce

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

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

 Search replies:

## Forum Replies Created

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

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Shield: Blocks Bots, Protects Users, and Prevents Security Breaches] Content Security Policy header missing after activating the WP Super Cache](https://wordpress.org/support/topic/content-security-policy-header-missing-after-activating-the-wp-super-cache/)
 *  [nickoonce](https://wordpress.org/support/users/nickoonce/)
 * (@nickoonce)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/content-security-policy-header-missing-after-activating-the-wp-super-cache/#post-7562474)
 * We are pretty committed to wp-supercache. Would love to hear back if/when this
   compatibility issue is resolved.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Flow-Flow Social Feed Stream] Instagram](https://wordpress.org/support/topic/instagram-22/)
 *  [nickoonce](https://wordpress.org/support/users/nickoonce/)
 * (@nickoonce)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/instagram-22/#post-6876733)
 * Replace CLIENT_ID below with your client ID
 * [https://www.instagram.com/oauth/authorize/?client_id=CLIENT_ID&redirect_uri=http://localhost&response_type=token&scope=public_content](https://www.instagram.com/oauth/authorize/?client_id=CLIENT_ID&redirect_uri=http://localhost&response_type=token&scope=public_content)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] Filter & Admin Search Don't work](https://wordpress.org/support/topic/filter-admin-search-dont-work/)
 *  [nickoonce](https://wordpress.org/support/users/nickoonce/)
 * (@nickoonce)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/filter-admin-search-dont-work/#post-6151491)
 * Oh, and BTW, we also noticed that for some reason… this filter function changed
   the admin category filter form method from POST to GET. That was our first clue
   to solving this.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] Filter & Admin Search Don't work](https://wordpress.org/support/topic/filter-admin-search-dont-work/)
 *  [nickoonce](https://wordpress.org/support/users/nickoonce/)
 * (@nickoonce)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/filter-admin-search-dont-work/#post-6151490)
 * So, in the off chance that someone else has a similar situation… here’s what 
   ended up solving this issue for us.
 * We have several categories that should never appear in search results so, we 
   had the following search filter in our custom theme functions file.
 *     ```
       function SearchFilter($query) {
           if ($query->is_search) {
               $query->set('cat','-1572,-1353,-1555,-689');
           }
           return $query;
       }
       add_filter('pre_get_posts','SearchFilter');
       ```
   
 * That worked fine until we upgraded to WP 4.2.2. WP was several versions out of
   date at time of update, so the change may not have been in 4.2.2 but somewhere
   along the line something changed making this filter problematic on the back end.
   So, we added another condition to our if statement
 * `&& !is_admin()`
 * and that solved the problem for us.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] Filter & Admin Search Don't work](https://wordpress.org/support/topic/filter-admin-search-dont-work/)
 *  [nickoonce](https://wordpress.org/support/users/nickoonce/)
 * (@nickoonce)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/filter-admin-search-dont-work/#post-6151412)
 * I’ve disabled all plugins and still can’t filter by post category.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] Filter & Admin Search Don't work](https://wordpress.org/support/topic/filter-admin-search-dont-work/)
 *  [nickoonce](https://wordpress.org/support/users/nickoonce/)
 * (@nickoonce)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/filter-admin-search-dont-work/#post-6151405)
 * I found that the Search functionality was related to the Search Everything plugin.
   
   When disabled, post searches worked fine but post filtering still failed to have
   any effect. I reviewed the Search Everything settings and found that it appeared
   that settings just needed updating because after that, searching worked fine.
   Still trying to resolve the filtering.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] Filter & Admin Search Don't work](https://wordpress.org/support/topic/filter-admin-search-dont-work/)
 *  [nickoonce](https://wordpress.org/support/users/nickoonce/)
 * (@nickoonce)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/filter-admin-search-dont-work/#post-6151402)
 * I’m not using woo commerce but I have the same problem with a new update to 4.2.2
   and the post filter and post searching on the admin screens aren’t working.
 * Post searches return an empty result set and post filtering just returns the 
   default result set.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Redirection] Negative value for ip2long output causes MySQL error](https://wordpress.org/support/topic/negative-value-for-ip2long-output-causes-mysql-error/)
 *  [nickoonce](https://wordpress.org/support/users/nickoonce/)
 * (@nickoonce)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/negative-value-for-ip2long-output-causes-mysql-error/#post-4177059)
 * We also found some user agent strings were too long and were causing other db
   errors, so we further modified the function to truncate long user agents. Below
   is the function in its entirety.
 *  static function create( $url, $agent, $ip, $referrer ) {
    global $wpdb, $redirection;
 *  $insert = array(
    ‘url’ => urldecode( $url ), ‘created’ => current_time( ‘mysql’),‘
   ip’ => sprintf(“%u”,ip2long( $ip )), );
 *  if ( !empty( $agent ) ) {
    if (strlen($agent) > 255) { $agent = substr($agent,
   0, 255); } $insert[‘agent’] = $agent; } $insert[‘referrer’] = $referrer;
 *  $wpdb->insert( $wpdb->prefix.’redirection_404′, $insert );
    }
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Redirection] Negative value for ip2long output causes MySQL error](https://wordpress.org/support/topic/negative-value-for-ip2long-output-causes-mysql-error/)
 *  [nickoonce](https://wordpress.org/support/users/nickoonce/)
 * (@nickoonce)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/negative-value-for-ip2long-output-causes-mysql-error/#post-4177054)
 * Here’s the solution we implemented.
 * On line 149 of redirection\models\log.php we made the following change and this
   solved the problem for us.
 * Old:
    ‘ip’ => ip2long( $ip ),
 * New:
    ‘ip’ => sprintf(“%u”,ip2long( $ip )),
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Redirection] Negative value for ip2long output causes MySQL error](https://wordpress.org/support/topic/negative-value-for-ip2long-output-causes-mysql-error/)
 *  [nickoonce](https://wordpress.org/support/users/nickoonce/)
 * (@nickoonce)
 * [12 years ago](https://wordpress.org/support/topic/negative-value-for-ip2long-output-causes-mysql-error/#post-4177052)
 * Hoping someone comes up with a better solution. For now we’ve just disabled 404
   logging in the Redirection options. Hope that helps someone.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Events Manager - Calendar, Bookings, Tickets, and more!] Add-On Example Not Functional](https://wordpress.org/support/topic/add-on-example-not-functional-1/)
 *  Thread Starter [nickoonce](https://wordpress.org/support/users/nickoonce/)
 * (@nickoonce)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/add-on-example-not-functional-1/#post-4141536)
 * I was able to get the add-on working by working through the tutorial, but the
   download file at the end does not work for me.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Events Manager - Calendar, Bookings, Tickets, and more!] Add-On Example Not Functional](https://wordpress.org/support/topic/add-on-example-not-functional/)
 *  [nickoonce](https://wordpress.org/support/users/nickoonce/)
 * (@nickoonce)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/add-on-example-not-functional/#post-3477545)
 * I have the same problem as the original post. I download and rename the file,
   upload it to plugin/em_event_styles/em_event_styles.php and I’m able to activate
   the plugin without error. It just doesn’t do anything. No new menu item, no meta
   pannel… nothing different at all!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[FeedWordPress] Syncing their categories to my categories](https://wordpress.org/support/topic/syncing-their-categories-to-my-categories/)
 *  [nickoonce](https://wordpress.org/support/users/nickoonce/)
 * (@nickoonce)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/syncing-their-categories-to-my-categories/#post-3740032)
 * I have similar needs! Would love to know what if anything you found.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Collapse-O-Matic] Auto collapse after some time](https://wordpress.org/support/topic/auto-collapse-after-some-time/)
 *  Thread Starter [nickoonce](https://wordpress.org/support/users/nickoonce/)
 * (@nickoonce)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/auto-collapse-after-some-time/#post-3913232)
 * Is there no way to roll your own event based triggers?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Press This Reloaded] [Plugin: Press This Reloaded] Press This Custom Post Types](https://wordpress.org/support/topic/plugin-press-this-reloaded-press-this-custom-post-types/)
 *  [nickoonce](https://wordpress.org/support/users/nickoonce/)
 * (@nickoonce)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/plugin-press-this-reloaded-press-this-custom-post-types/#post-1640986)
 * First, THANK YOU Scribu. This is an excellent improvement on Press This.
 * Like Ploobers, I’d like to be able to use the hooks to populate custom fields.
   Specifically, I have custom meta fields for SourceLink and SourceName. Do you
   have any idea how I might be able to populate those fields automatically?

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