activation.php in WPGraphQL 2.22.3, at activation.php
| 1 | <?php |
| 2 | /** |
| 3 | * Activation routines for WPGraphQL. |
| 4 | * |
| 5 | * @package WPGraphQL |
| 6 | */ |
| 7 | |
| 8 | // Exit if accessed directly. |
| 9 | if ( ! defined( 'ABSPATH' ) ) { |
| 10 | exit; |
| 11 | } |
| 12 | |
| 13 | /** |
| 14 | * Runs when WPGraphQL is activated |
| 15 | */ |
| 16 | function graphql_activation_callback(): void { |
| 17 | do_action( 'graphql_activate' ); |
| 18 | |
| 19 | // phpcs:ignore WordPressVIPMinimum.Functions.RestrictedFunctions.flush_rewrite_rules_flush_rewrite_rules -- Expose the graphql endpoint. |
| 20 | flush_rewrite_rules( true ); |
| 21 | } |
| 22 |