PHP code example of pantheon-systems / pantheon-mu-plugin
1. Go to this page and download the library: Download pantheon-systems/pantheon-mu-plugin library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
pantheon-systems / pantheon-mu-plugin example snippets
add_filter( 'pantheon_wp_login_text', function() {
return 'Log into MySite.';
} );
[
'big-file-uploads' => [
'plugin_status' => esc_html__( 'Manual Fix Required', 'pantheon' ),
'plugin_slug' => 'tuxedo-big-file-uploads/tuxedo_big_file_uploads.php',
'plugin_message' => wp_kses_post(
sprintf(
/* translators: %s: the link to relevant documentation. */
__( 'Read more about the issue <a href="%s" target="_blank">here</a>.', 'pantheon' ),
'https://docs.pantheon.io/plugins-known-issues#big-file-uploads'
)
),
],
'jetpack' => [
'plugin_status' => esc_html__( 'Manual Fix Required', 'pantheon' ),
'plugin_slug' => 'jetpack/jetpack.php',
'plugin_message' => wp_kses_post(
sprintf(
/* translators: %s: the link to relevant documentation. */
__( 'Read more about the issue <a href="%s" target="_blank">here</a>.', 'pantheon' ),
'https://docs.pantheon.io/plugins-known-issues#jetpack'
)
),
],
'wordfence' => [
'plugin_status' => esc_html__( 'Manual Fix Required', 'pantheon' ),
'plugin_slug' => 'wordfence/wordfence.php',
'plugin_message' => wp_kses_post(
sprintf(
/* translators: %s: the link to relevant documentation. */
__( 'Read more about the issue <a href="%s" target="_blank">here</a>.', 'pantheon' ),
'https://docs.pantheon.io/plugins-known-issues#wordfence'
)
),
],
]
// Filter a specific plugin out of the known issues list.
add_filter( 'pantheon_compatibility_known_issues_plugins', function( $plugins ) {
if ( isset( $plugins['plugin-slug'] ) ) {
unset( $plugins['plugin-slug'] );
}
return $plugins;
} );