| @@ -1,8 +1,8 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | 3 | * Module Name: Blaze |
| 4 | - * Module Description: Grow your audience by promoting your content across Tumblr and WordPress.com. | |
| 4 | + * Module Description: Promote your posts and pages across millions of sites in the WordPress.com and Tumblr ad network. | |
| 5 | 5 | * Sort Order: 22 |
| 6 | 6 | * Recommendation Order: 12 |
| 7 | 7 | * First Introduced: 12.3 |
| 8 | 8 | * Requires Connection: Yes |
| @@ -14,5 +14,27 @@ | ||
| 14 | 14 | */ |
| 15 | 15 | |
| 16 | 16 | use Automattic\Jetpack\Blaze; |
| 17 | 17 | |
| 18 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 19 | + exit( 0 ); | |
| 20 | +} | |
| 21 | + | |
| 18 | 22 | Blaze::init(); |
| 23 | + | |
| 24 | +/** | |
| 25 | + * Remove post row Blaze actions in the Jetpack plugin. | |
| 26 | + * Keep them on for products. | |
| 27 | + * | |
| 28 | + * @param bool $are_quick_links_enabled Should Blaze row actions be enabled. | |
| 29 | + * @param WP_Post $post The current post in the post list table. | |
| 30 | + * | |
| 31 | + * @return bool | |
| 32 | + */ | |
| 33 | +function jetpack_blaze_post_row_actions_disable( $are_quick_links_enabled, $post ) { | |
| 34 | + if ( 'product' !== $post->post_type ) { | |
| 35 | + return false; | |
| 36 | + } | |
| 37 | + | |
| 38 | + return $are_quick_links_enabled; | |
| 39 | +} | |
| 40 | +add_filter( 'jetpack_blaze_post_row_actions_enable', 'jetpack_blaze_post_row_actions_disable', 10, 2 ); | |