PHP code example of yoast / whip

1. Go to this page and download the library: Download yoast/whip 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/ */

    

yoast / whip example snippets


whip_wp_check_versions( array(
	'php' => '>=5.6',
) );

putenv( "WHIP_NAME_OF_HOST=Name of the host" );
putenv( "WHIP_MESSAGE_FROM_HOST_ABOUT_PHP=A message from the host" );

function my_host__name_for_whip() {
	return 'Name of the host';
}
add_filter( 'whip_name_of_host', 'my_host__name_for_whip' );

function my_host__php_message_for_whip( $message ) {
	return 'A message from the host';
}
add_filter( 'whip_message_from_host_about_php', 'my_host__php_message_for_whip' );

add_filter( 'whip_hosting_page_url_wordpress', '__return_true' );