{"id":19663107,"url":"https://github.com/pantheon-systems/pantheon-mu-plugin","last_synced_at":"2025-04-13T05:25:18.849Z","repository":{"id":38051576,"uuid":"499630434","full_name":"pantheon-systems/pantheon-mu-plugin","owner":"pantheon-systems","description":"Pantheon's WordPress mu-plugin for all WordPress-based upstreams.","archived":false,"fork":false,"pushed_at":"2025-03-11T21:44:48.000Z","size":213,"stargazers_count":9,"open_issues_count":12,"forks_count":5,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-03-24T10:34:10.061Z","etag":null,"topics":["hacktoberfest","mu-plugin","pantheon","wordpress"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pantheon-systems.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-03T19:37:06.000Z","updated_at":"2025-03-11T21:43:40.000Z","dependencies_parsed_at":"2023-02-15T00:30:49.873Z","dependency_job_id":"8ba83f05-52a8-4103-969f-205aff711ca2","html_url":"https://github.com/pantheon-systems/pantheon-mu-plugin","commit_stats":{"total_commits":86,"total_committers":24,"mean_commits":"3.5833333333333335","dds":0.7674418604651163,"last_synced_commit":"13a1a9f0468f43ae4f06bc23f766df2b8ba4aee4"},"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pantheon-systems%2Fpantheon-mu-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pantheon-systems%2Fpantheon-mu-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pantheon-systems%2Fpantheon-mu-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pantheon-systems%2Fpantheon-mu-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pantheon-systems","download_url":"https://codeload.github.com/pantheon-systems/pantheon-mu-plugin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248667075,"owners_count":21142364,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","mu-plugin","pantheon","wordpress"],"created_at":"2024-11-11T16:13:22.996Z","updated_at":"2025-04-13T05:25:18.830Z","avatar_url":"https://github.com/pantheon-systems.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pantheon Must-Use Plugin\n\n[![Actively Maintained](https://img.shields.io/badge/Pantheon-Actively_Maintained-yellow?logo=pantheon\u0026color=FFDC28)](https://docs.pantheon.io/oss-support-levels#actively-maintained-support)\n[![Test](https://github.com/pantheon-systems/pantheon-mu-plugin/actions/workflows/test.yml/badge.svg)](https://github.com/pantheon-systems/pantheon-mu-plugin/actions/workflows/test.yml)\n![GitHub Release](https://img.shields.io/github/v/release/pantheon-systems/pantheon-mu-plugin)\n![GitHub License](https://img.shields.io/github/license/pantheon-systems/pantheon-mu-plugin)\n\nThe Pantheon Must-Use Plugin has been designed to tailor the WordPress CMS experience for Pantheon's platform.\n\nWhat does that mean? We're glad you asked!\n\n## Features\n\n### WebOps Workflow\n**Integrates WordPress with Pantheon Worklow.** Encourages updating plugins and themes in the Development environment and using Pantheon's git-based upstream core updates. Alerts admins if an update is available but disables automatic updates (so those updates can be applied via the upstream).\n\n### Login\n**Customized login form.** The login page links back to the Pantheon dashboard on dev, test and live environments that do not have a domain attached.\n\n### Edge Cache (Global CDN)\n**Facilitates communication between Pantheon's Edge Cache layer and WordPress.** It allows you to set the default cache age, clear individual pages on demand, and it will automatically clear relevant urls when the site is updated. Authored by [Matthew Boynes](http://www.alleyinteractive.com/).\n\n### WordPress Multisite Support\n**Simplified multisite configuration.** The `WP_ALLOW_MULTISITE` is automatically defined on WordPress Multisite-based upstreams. The Network Setup pages and notices have been customized for a Pantheon-specific WordPress multisite experience.\n\n### Maintenance Mode\n**Put your site into a maintenance mode.** Prevent users from accessing your sites during major updates by enabling Maintenance Mode either in the WordPress admin or via WP-CLI.\n\n### Compatibility Layer\n**Ensure your WordPress website is compatible with Pantheon.** Automatically apply \u0026 report status of compatibility fixes for common issues that arise when running WordPress on Pantheon.\n\n## Hooks\n\nThe Pantheon Must-Use Plugin provides the following hooks that can be used in your code:\n\n### Filters\n\n#### `pantheon_wp_login_text`\nFilter the text displayed on the login page next to the Return to Pantheon button.\n\n**Default Value:** `Log into your WordPress Site`\n\n**Example:**\n```php\nadd_filter( 'pantheon_wp_login_text', function() {\n\treturn 'Log into MySite.';\n} );\n```\n\n#### `pantheon_cache_default_max_age`\nFilter the default cache max-age for the Pantheon Edge Cache.\n\n**Default Value:** `WEEK_IN_SECONDS` (604800)\n\n**Example:**\n```php\nadd_filter( 'pantheon_cache_default_max_age', function() {\n    return 2 * WEEK_IN_SECONDS;\n} );\n```\n\n#### `pantheon_cache_do_maintenance_mode`\nAllows you to modify the maintenance mode behavior with more advanced conditionals.\n\n**Default Value:** Boolean, depending on whether maintenance mode is enabled, user is not on the login page and the action is not happening in WP-CLI.\n\n```php\nadd_filter( 'pantheon_cache_do_maintenance_mode', function( $do_maintenance_mode ) {\n\tif ( $some_conditional_logic ) {\n\t\treturn false;\n\t}\n\treturn $do_maintenance_mode;\n} );\n```\n\n#### `pantheon_cache_allow_clear_all`\nAllows you to disable the ability to clear the entire cache from the WordPress admin. If set to `false`, this removes the \"Clear Site Cache\" section of the Pantheon Page Cache admin page.\n\n**Default Value:** `true`\n\n**Example:**\n```php\nadd_filter( 'pantheon_cache_allow_clear_all', '__return_false' );\n```\n\n#### `pantheon_skip_cache_control`\nAllows you to disable the cache control headers that are sent by the Pantheon Page Cache plugin.\n\n**Default Value:** `false`\n\n**Example:**\n```php\nadd_filter( 'pantheon_skip_cache_control', '__return_true' );\n```\n\n#### `pantheon_compatibility_known_issues_plugins`\nAllows you to filter plugins with known compatibility issues on Pantheon so they are excluded from the Site Health check.\n\n**Default Value:** An array of plugins with known issues, e.g.:\n```php\n[\n\t'big-file-uploads' =\u003e [\n\t\t'plugin_status' =\u003e esc_html__( 'Manual Fix Required', 'pantheon' ),\n\t\t'plugin_slug' =\u003e 'tuxedo-big-file-uploads/tuxedo_big_file_uploads.php',\n\t\t'plugin_message' =\u003e wp_kses_post(\n\t\t\tsprintf(\n\t\t\t\t/* translators: %s: the link to relevant documentation. */\n\t\t\t\t__( 'Read more about the issue \u003ca href=\"%s\" target=\"_blank\"\u003ehere\u003c/a\u003e.', 'pantheon' ),\n\t\t\t\t'https://docs.pantheon.io/wordpress-known-issues#big-file-uploads'\n\t\t\t)\n\t\t),\n\t],\n\t'jetpack' =\u003e [\n\t\t'plugin_status' =\u003e esc_html__( 'Manual Fix Required', 'pantheon' ),\n\t\t'plugin_slug' =\u003e 'jetpack/jetpack.php',\n\t\t'plugin_message' =\u003e wp_kses_post(\n\t\t\tsprintf(\n\t\t\t\t/* translators: %s: the link to relevant documentation. */\n\t\t\t\t__( 'Read more about the issue \u003ca href=\"%s\" target=\"_blank\"\u003ehere\u003c/a\u003e.', 'pantheon' ),\n\t\t\t\t'https://docs.pantheon.io/wordpress-known-issues#jetpack'\n\t\t\t)\n\t\t),\n\t],\n\t'wordfence' =\u003e [\n\t\t'plugin_status' =\u003e esc_html__( 'Manual Fix Required', 'pantheon' ),\n\t\t'plugin_slug' =\u003e 'wordfence/wordfence.php',\n\t\t'plugin_message' =\u003e wp_kses_post(\n\t\t\tsprintf(\n\t\t\t\t/* translators: %s: the link to relevant documentation. */\n\t\t\t\t__( 'Read more about the issue \u003ca href=\"%s\" target=\"_blank\"\u003ehere\u003c/a\u003e.', 'pantheon' ),\n\t\t\t\t'https://docs.pantheon.io/wordpress-known-issues#wordfence'\n\t\t\t)\n\t\t),\n\t],\n]\n```\n\n**Example:**\n```php\n// Filter a specific plugin out of the known issues list.\nadd_filter( 'pantheon_compatibility_known_issues_plugins', function( $plugins ) {\n\tif ( isset( $plugins['plugin-slug'] ) ) {\n\t\tunset( $plugins['plugin-slug'] );\n\t}\n\treturn $plugins;\n} );\n```\n\n### Actions\n#### `pantheon_cache_settings_page_top`\nRuns at the top of the Pantheon Page Cache settings page.\n\n**Example:**\n```php\nadd_action( 'pantheon_cache_settings_page_top', function() {\n\techo '\u003ch2\u003eMy Custom Heading\u003c/h2\u003e';\n} );\n```\n\n#### `pantheon_cache_settings_page_bottom`\nRuns at the bottom of the Pantheon Page Cache settings page.\n\n**Example:**\n```php\nadd_action( 'pantheon_cache_settings_page_bottom', function() {\n\techo '\u003cp\u003eMy Custom Footer\u003c/p\u003e';\n} );\n```\n\n## Install With Composer\n**Built for Composer.** While Pantheon automation ensures that the latest version of the MU plugin are pushed with every update to WordPress, the Composer-based project ensures that you can manage it alongside your other WordPress mu-plugins, plugins and themes in your `composer.json`.\n\n```bash\ncomposer require pantheon-systems/pantheon-mu-plugin\n```\n--\nMaintained by [Pantheon](https://pantheon.io) and built by the [community](https://github.com/pantheon-systems/pantheon-mu-plugin/graphs/contributors).\n\n[Releases and Changelogs](https://github.com/pantheon-systems/pantheon-mu-plugin/releases)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpantheon-systems%2Fpantheon-mu-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpantheon-systems%2Fpantheon-mu-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpantheon-systems%2Fpantheon-mu-plugin/lists"}