Skip to content

Commit

Permalink
new relic logging for permalink flush
Browse files Browse the repository at this point in the history
  • Loading branch information
miriamgoldman committed Sep 5, 2024
1 parent 7c513cc commit 2fbf1d7
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions wp-content/themes/twentytwentyfour/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,3 +204,14 @@ function twentytwentyfour_pattern_categories() {
endif;

add_action( 'init', 'twentytwentyfour_pattern_categories' );


function log_rewrite_rules() {

if ( isset( $_GET['settings-updated'] ) ) :
error_log( 'Permalinks have been flushed.' );
newrelic_notice_error( "The permalink structure has been flushed" );
endif;

}
add_filter( 'generate_rewrite_rules', 'log_rewrite_rules' );

0 comments on commit 2fbf1d7

Please sign in to comment.