PHP code example of rarst / toolbar-theme-switcher

1. Go to this page and download the library: Download rarst/toolbar-theme-switcher 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/ */

    

rarst / toolbar-theme-switcher example snippets


add_filter( 'tts_allowed_themes', 'hide_twenty_ten' );

function hide_twenty_ten( $themes ) {

	unset( $themes['Twenty Ten'] );

	return $themes;
}

add_filter( 'wp_cache_themes_persistently', '__return_true' );