Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Replace it by Ai generated if it's the default title
Browse files Browse the repository at this point in the history
  • Loading branch information
albarin committed Nov 23, 2023
1 parent f97c1fb commit ea7b8ef
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/StoreApi/Routes/V1/AI/StoreTitle.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ class StoreTitle extends AbstractRoute {
*/
const STORE_TITLE_OPTION_NAME = 'blogname';

/**
* The default store title.
*
* @var string
*/
const DEFAULT_TITLE = 'Site Title';

/**
* Get the path of this REST route.
*
Expand Down Expand Up @@ -85,7 +92,7 @@ protected function get_route_post_response( \WP_REST_Request $request ) {
}

$store_title = get_option( 'blogname' );
if ( ! empty( $store_title ) ) {
if ( ! empty( $store_title ) || ( self::DEFAULT_TITLE !== $store_title ) ) {
return rest_ensure_response( array( 'ai_content_generated' => true ) );
}

Expand Down

0 comments on commit ea7b8ef

Please sign in to comment.