Skip to content

Commit

Permalink
fix: enable prompts on public newsletters
Browse files Browse the repository at this point in the history
  • Loading branch information
adekbadek committed Oct 29, 2021
1 parent 9ba2bae commit 7e2290b
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions includes/class-newspack-newsletters.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ public function __construct() {
add_filter( 'manage_' . self::NEWSPACK_NEWSLETTERS_CPT . '_posts_columns', [ __CLASS__, 'add_public_page_column' ] );
add_action( 'manage_' . self::NEWSPACK_NEWSLETTERS_CPT . '_posts_custom_column', [ __CLASS__, 'public_page_column_content' ], 10, 2 );
add_filter( 'post_row_actions', [ __CLASS__, 'display_view_or_preview_link_in_admin' ] );
add_filter( 'newspack_newsletters_assess_has_disabled_popups', [ __CLASS__, 'disable_campaigns_for_newsletters' ], 11 );
add_filter( 'jetpack_relatedposts_filter_options', [ __CLASS__, 'disable_jetpack_related_posts' ] );
add_action( 'save_post_' . self::NEWSPACK_NEWSLETTERS_CPT, [ __CLASS__, 'save' ], 10, 3 );
add_action( 'admin_enqueue_scripts', [ __CLASS__, 'branding_scripts' ] );
Expand Down Expand Up @@ -590,20 +589,6 @@ public static function display_view_or_preview_link_in_admin( $actions ) {
return $actions;
}

/**
* Disable Newspack Campaigns on Newsletter posts.
*
* @param array $disabled Disabled status to filter.
* @return array|boolean Unfiltered disabled status, or true to disable.
*/
public static function disable_campaigns_for_newsletters( $disabled ) {
if ( self::NEWSPACK_NEWSLETTERS_CPT === get_post_type() ) {
return true;
}

return $disabled;
}

/**
* Disable Jetpack Related Posts on Newsletter posts.
*
Expand Down

0 comments on commit 7e2290b

Please sign in to comment.