tw2113 / WP-Contributions

12 stars 6 forks source link

Adding filters for author theme and plugin arrays #14

Closed hlashbrooke closed 8 years ago

hlashbrooke commented 9 years ago

Fixes #13

hlashbrooke commented 9 years ago

Example filter usage:

add_filter( 'wp_contributions_author_plugins', 'filter_author_plugins', 10, 2 );
function filter_author_plugins ( $author, $username ) {

  foreach( $author->plugins as $k => $plugin ) {
    if( 'plugin-slug' == $plugin->slug ) {
      unset( $author->plugins[ $k ] );
    }
  }

  return $author;
}
colorful-tones commented 8 years ago

Thanks Hugh! Merging this in.