' . __( 'Settings', 'static-html-output-plugin' ) . ''; array_unshift( $links, $settings_link ); return $links; } add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), 'plugin_action_links' ); /** * Prevent WP scripts from loading which aren't useful * on a statically exported site */ function wp2static_deregister_scripts(): void { wp_dequeue_script( 'wp-embed' ); wp_deregister_script( 'wp-embed' ); wp_dequeue_script( 'comment-reply' ); wp_deregister_script( 'comment-reply' ); } add_action( 'wp_footer', 'wp2static_deregister_scripts' ); // TODO: move into own plugin for WP cleanup, don't belong in core remove_action( 'wp_head', 'wlwmanifest_link' ); remove_action( 'wp_head', 'print_emoji_detection_script', 7 ); remove_action( 'wp_print_styles', 'print_emoji_styles' ); if ( defined( 'WP_CLI' ) ) { WP_CLI::add_command( 'wp2static', WP2Static\CLI::class ); }