Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 10 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
||
| 1 | <?php |
| 2 | /** |
| 3 | * Module Name: Monetize |
| 4 | * Module Description: Manage payments, paid subscribers, and ads from one Monetize page. |
| 5 | * Sort Order: 1 |
| 6 | * First Introduced: 16.5-a.1 |
| 7 | * Requires Connection: Yes |
| 8 | * Auto Activate: Yes |
| 9 | * Module Tags: Traffic |
| 10 | * Feature: Engagement |
| 11 | * Additional Search Queries: earn, monetize, payments, donations, paid subscribers, stripe, ads |
| 12 | * |
| 13 | * @package automattic/jetpack |
| 14 | */ |
| 15 | |
| 16 | if ( ! defined( 'ABSPATH' ) ) { |
| 17 | exit( 0 ); |
| 18 | } |
| 19 | |
| 20 | if ( class_exists( \Automattic\Jetpack\Monetize\Dashboard::class ) ) { |
| 21 | \Automattic\Jetpack\Monetize\Dashboard::init( array( 'module' => Jetpack_Monetize_Feature_Flags::MODULE ) ); |
| 22 | |
| 23 | // Without it, the Features row gets Jetpack's settings search, which it drops for a module with no options. |
| 24 | add_filter( |
| 25 | 'jetpack_module_configuration_url_' . Jetpack_Monetize_Feature_Flags::MODULE, |
| 26 | static function () { |
| 27 | return admin_url( 'admin.php?page=' . \Automattic\Jetpack\Monetize\Dashboard::MENU_SLUG ); |
| 28 | } |
| 29 | ); |
| 30 | } |