Skip to content

Commit

Permalink
feat: add a new action to when a ras setting is updated (#3357)
Browse files Browse the repository at this point in the history
  • Loading branch information
leogermani authored Sep 20, 2024
1 parent 779de8d commit 35d3492
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions includes/reader-activation/class-reader-activation.php
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,15 @@ public static function update_setting( $key, $value ) {
if ( is_bool( $value ) ) {
$value = intval( $value );
}

/**
* Fires just before a Reader Activation setting is updated
*
* @param string $key Option name.
* @param mixed $value Option value.
*/
do_action( 'newspack_reader_activation_update_setting', $key, $value );

if ( 'metadata_prefix' === $key ) {
return Sync\Metadata::update_prefix( $value );
}
Expand Down

0 comments on commit 35d3492

Please sign in to comment.