PHP code example of mindkomm / theme-lib-environment-dev
1. Go to this page and download the library: Download mindkomm/theme-lib-environment-dev 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/ */
mindkomm / theme-lib-environment-dev example snippets
if ( is_dev() ) {
$wpdev = new Theme\Environment\Development\WordPress();
$wpdev->init();
}
/**
* Add the theme favicon into theme head
*/
add_action( 'wp_head', 'render_theme_favicon' );
/**
* Render favicons.
*
* This needs to be a separate function so that it can be unhooked.
*/
function render_theme_favicon() {
Timber\Timber::render( 'favicons.twig', Timber\Timber::get_context() );
}
if ( is_dev() ) {
$wpdev = new Theme\Environment\Development\WordPress();
$wpdev->redirect_emails( '[email protected]' );
}