Last active
September 23, 2026 13:30
-
-
Save maddisondesigns/276af3c3781cde053c4855cd1da37cac to your computer and use it in GitHub Desktop.
Disable AI Support and Remove Connectors Screen in WordPress
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Redirect the new AI Settings > Connectors screen back to the Dashboard so it can't be accessed | |
| */ | |
| function mytheme_admin_redirects() { | |
| global $pagenow; | |
| /* Redirect Connectors screen back to main Dashboard page */ | |
| if( $pagenow == 'options-connectors.php' ) { | |
| wp_redirect( admin_url( '/' ), 301 ); | |
| exit; | |
| } | |
| } | |
| add_action( 'admin_init', 'mytheme_admin_redirects' ); | |
| /** | |
| * Remove the new AI Settings > Connectors page from the WP Dashboard menu | |
| */ | |
| function mytheme_remove_connectors_screen() { | |
| remove_submenu_page( 'options-general.php', 'options-connectors.php' ); | |
| } | |
| add_action( 'admin_init', 'mytheme_remove_connectors_screen' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Disable AI Support | |
| define( 'WP_AI_SUPPORT', false ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
while not directly related to AI, Akismet also uses the connector interface and it can be overridden with: