Files
marcus 2f91c3e6af WP Plugin Starter 1.0.0: a fresh start
The parts every wpallstars plugin needs: settings screen with search and an empty General tab, Read Me tab, features as classes, replaced plugins, the shared GitHub updater, release and check scripts, CI and the shared rules. scripts/rename-plugin.sh starts a new plugin; scripts/sync-core.sh keeps plugins' core files in step with this starter. Built with aidevops (https://aidevops.sh).
2026-10-03 03:30:42 +01:00
..

<?php
/**
 * Read Me content for the WP Plugin Starter admin tab (from README.md).
 *
 * @package WPStarter
 */

if (!defined('ABSPATH')) {
    exit;
}

/**
 * README.md contents, with a short fallback if the file is missing.
 *
 * @return array{title:string,content:string}
 */
function wpstarter_get_readme_content() {
    $readme_path = WPSTARTER_DIR . 'README.md';

    if (is_readable($readme_path)) {
        $content = (string) file_get_contents($readme_path); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents -- local file.
    } else {
        $content = "# WP Plugin Starter\n\nVersion: " . WPSTARTER_VERSION;
    }

    return array(
        'title'   => __('Read Me', 'wp-plugin-starter-template'),
        'content' => $content,
    );
}