Skip to content

Commit

Permalink
Ensure no fatals if plugin is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
tommusrhodus committed Jan 10, 2025
1 parent c348cc3 commit 3de8783
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ThemeGarden.php
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ public function maybe_activate_theme(): void {

// Create an index.php file with the theme output.
$index_php_path = $theme_dir . 'index.php';
$index_php_content = '<?php ttgarden_page_output();';
$index_php_content = '<?php if( function_exists( "ttgarden_page_output" ) ) { ttgarden_page_output(); }';

if ( ! $wp_filesystem->put_contents( $index_php_path, $index_php_content, FS_CHMOD_FILE ) ) {
wp_die( 'Failed to write the index.php file.' );
Expand Down

0 comments on commit 3de8783

Please sign in to comment.