PHP code example of pantheon-systems / pantheon-wp-main

1. Go to this page and download the library: Download pantheon-systems/pantheon-wp-main 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-wp-main example snippets


add_filter( 'pantheon_wp_login_text', function() {
	return 'Log into MySite.';
} );

add_filter( 'pantheon_cache_default_max_age', function() {
    return 2 * WEEK_IN_SECONDS;
} );

add_filter( 'pantheon_cache_do_maintenance_mode', function( $do_maintenance_mode ) {
	if ( $some_conditional_logic ) {
		return false;
	}
	return $do_maintenance_mode;
} );

add_filter( 'pantheon_cache_allow_clear_all', '__return_false' );

add_filter( 'pantheon_skip_cache_control', '__return_true' );

add_action( 'pantheon_cache_settings_page_top', function() {
	echo '<h2>My Custom Heading</h2>';
} );

add_action( 'pantheon_cache_settings_page_bottom', function() {
	echo '<p>My Custom Footer</p>';
} );