Skip to content

Commit

Permalink
Merge pull request #473 from pragmatic-tf/feature/syndicatable-capabi…
Browse files Browse the repository at this point in the history
…lity-filter

add `dt_syndicatable_capabilities` filter to push ui
  • Loading branch information
jeffpaul authored Feb 19, 2020
2 parents a4a2840 + 8c9283e commit ad98023
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion includes/push-ui.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,14 @@ function() {
* @return bool
*/
function syndicatable() {
if ( ! is_user_logged_in() || ! current_user_can( 'edit_posts' ) ) {
/**
* Filter Distributor capabilities allowed to syndicate content.
*
* @hook dt_syndicatable_capabilities
*
* @param string edit_posts The capability allowed to syndicate content.
*/
if ( ! is_user_logged_in() || ! current_user_can( apply_filters( 'dt_syndicatable_capabilities', 'edit_posts' ) ) ) {
return false;
}

Expand Down

0 comments on commit ad98023

Please sign in to comment.