• Resolved Will Stocks

    (@willstockstech)


    Hi guys,

    I’ve noticed that there are a few Aquila styles being passed through/applied to the frontend of my site via inline styles (not a caching issue). Obviously, they’re going unused as my site visitors do not have wp-admin access, but there are still a few styles there bloating the HTML.

    The following is being shown in the frontend markup of my site:

    <style type='text/css'> 
    #wpadminbar li#wp-admin-bar-wp-logo > .ab-item .ab-icon:before {
        display: none!important;
    }
    
    #wpadminbar #wp-toolbar li#wp-admin-bar-wp-logo > .ab-item span.ab-icon {
        background-image: url('https://cdn.willstocks.com/wp-content/uploads/2017/12/12140419/Will-Stocks-Header-Logo-willstocks.co_.uk_.png')!important;
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center center;
        margin: 0%!important;
        max-width: 80%;
        height: 70%;
        top: 15%;
        left: 10%;
    }
    
    #aquilaAdminbarIcon {
        background-image: url('https://cdn.willstocks.com/wp-content/uploads/2017/12/17144151/Will-Stocks-willstocks.co_.uk-New-Favicon.png')!important;
        background-size: 40px;
        background-repeat: no-repeat;
        background-position: center center;
    }
    
    #aquilaAdminbarIcon:before {
        display: none!important;
    }
    
    body.folded #wpadminbar li#wp-admin-bar-wp-logo > .ab-item .ab-icon:before {
        display: none!important;
    }
    
    body.folded #wpadminbar #wp-toolbar li#wp-admin-bar-wp-logo > .ab-item span.ab-icon {
        background-image: url('https://cdn.willstocks.com/wp-content/uploads/2017/12/17144151/Will-Stocks-willstocks.co_.uk-New-Favicon.png')!important;
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center center;
        margin: 0%!important;
        max-width: 80%;
        height: 70%;
        top: 15%;
        left: 10%;
    }
    
    </style>
    <style type='text/css'> 
    body.folded #wpadminbar li#wp-admin-bar-wp-logo > .ab-item .ab-icon:before {
        display: none!important;
    }
    
    body.folded #wpadminbar #wp-toolbar li#wp-admin-bar-wp-logo > .ab-item span.ab-icon {
        background-image: url('https://cdn.willstocks.com/wp-content/uploads/2017/12/17144151/Will-Stocks-willstocks.co_.uk-New-Favicon.png')!important;
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center center;
        margin: 0%!important;
        max-width: 80%;
        height: 80%;
        top: 10%;
        left: 10%;
    }
    
    </style>

    I’m happy to add something to my functions.php to cater for this… something like the following as a temporary workaround (unless this will be included in an upcoming update?)

    function remove_aquila_frontend {
        if( !is_admin() ) {
            //remove the inline style here... but would need to know the hook/enqueu
        }
    }

    Are you able to advise what I’d need to put in that function to prevent the inline styles being applied to the frontend of my site?

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Some Aquila CSS is being passed through to the frontend’ is closed to new replies.