PHP code example of hyyan / logo-controller

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

    

hyyan / logo-controller example snippets


$default = array(
    // path for default logo 
    'default' => '/logo.png',
    //the logo url (default to home page)
    'url' => home_url('/'),
    // the logo desciption default to (get_bloginfo('name', 'display')) 
    'description' => get_bloginfo('name', 'display'),
    // enable logo display on the login page
    'enable-on-login-page' => true,
);

// in the your theme's functions.php file

add_filter('Hyyan\LogoController.options', function(array $default) {

    $default['default'] = '/my-logo.png';
    $default['enable-on-login-page'] = false;

    return $default;
});

 

 // in you theme template use the following functions to get the logo
  
// print : http://example.com/path/to/logo.png 
 echo hyyan_get_the_logo(); 

// print : <img src="http://example.com/path/to/logo.png" alt="Website Title">    
 hyyan_the_logo(); 

header.php