Skip to content

Commit

Permalink
Merge pull request #7 from GuyPrimavera/v2.0.1
Browse files Browse the repository at this point in the history
v2.0.1
  • Loading branch information
GuyPrimavera authored Feb 13, 2018
2 parents 6605fbe + 907a6a6 commit 7c717c7
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 96 deletions.
2 changes: 0 additions & 2 deletions admin/functions/adminBarStyle.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,4 @@ function aquila_admin_bar() {
add_action( 'wp_head', 'aquila_admin_bar', 99 );

remove_action( 'admin_color_scheme_picker', 'admin_color_scheme_picker' );


?>
162 changes: 72 additions & 90 deletions admin/functions/customLogo.php
Original file line number Diff line number Diff line change
@@ -1,106 +1,88 @@
<?php
if ( __FILE__ == $_SERVER['SCRIPT_FILENAME'] ) { exit; }
<?php if ( __FILE__ == $_SERVER['SCRIPT_FILENAME'] ) { exit; }

add_action('init', 'clean_output_buffer');
function clean_output_buffer() {
ob_start();
}

// Custom Logo

$aquilaOptions = get_option( 'aquila_settings' );
$aquilaNewLogo = $aquilaOptions['aquila_new_logo'];
$aquilaNewLogoSqr = $aquilaOptions['aquila_new_logo_sqr'];

if( isset($aquilaOptions['aquila_new_logo']) && $aquilaOptions['aquila_new_logo'] !== "" ) {

// Admin bar
function aquila_new_logo_admin() {

$options = get_option( 'aquila_settings' );
if ( isset ( $options['aquila_new_logo'] ) ) {
$aquilaNewLogo = $options['aquila_new_logo'];
} else {
$aquilaNewLogo = 'none';
};

echo "<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('" . $aquilaNewLogo . "')!important;
background-size: contain;
background-repeat: no-repeat;
background-position: center center;
margin: 5%!important;
max-width: 90%;
height: 60%;
}
</style>";
}

add_action( 'admin_bar_init', 'aquila_new_logo_admin', 82 );

// Login screen
function aquila_new_logo_login() {

$options = get_option( 'aquila_settings' );
if ( isset ( $options['aquila_new_logo'] ) ) {
$aquilaNewLogo = $options['aquila_new_logo'];
} else {
$aquilaNewLogo = 'none';
};

echo "<style type='text/css'>
body.login #login:before {
display: none!important;
}
body.login #login h1 a {
display: block!important;
}
body.login #login h1 a {
background-image: url('" . $aquilaNewLogo . "')!important;
background-size: contain;
background-repeat: no-repeat;
background-position: center center;
width: auto;
height: 80px;
max-width: 350px;
}
</style>";
}

add_action( 'login_head', 'aquila_new_logo_login', 82 );
$GLOBALS['aquilaNewLogo'] = $aquilaNewLogo;
$GLOBALS['aquilaNewLogoSqr'] = $aquilaNewLogoSqr;

if( isset($aquilaOptions['aquila_new_logo']) && $aquilaOptions['aquila_new_logo'] !== "" ) {
add_action( 'admin_bar_init', 'aquila_new_logo_admin');
add_action( 'login_head', 'aquila_new_logo_login' );
}

// Custom Logo (square)

if( isset($aquilaOptions['aquila_new_logo_sqr']) && $aquilaOptions['aquila_new_logo_sqr'] !== "" ) {

function aquila_new_logo_sqr_admin() {

$options = get_option( 'aquila_settings' );
if ( isset ( $options['aquila_new_logo_sqr'] ) ) {
$aquilaNewLogoSqr = $options['aquila_new_logo_sqr'];
} else {
$aquilaNewLogoSqr = 'none';
};

echo "<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('" . $aquilaNewLogoSqr . "')!important;
background-size: contain;
background-repeat: no-repeat;
background-position: center center;
margin: 20% 10%!important;
max-width: 80%;
height: 60%;
}
</style>";
}

add_action( 'admin_bar_init', 'aquila_new_logo_sqr_admin', 83 );

add_action( 'admin_bar_init', 'aquila_new_logo_sqr_admin' );
}

// Admin bar
function aquila_new_logo_admin() {

echo "<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('" . $GLOBALS['aquilaNewLogo'] . "')!important;
background-size: contain;
background-repeat: no-repeat;
background-position: center center;
margin: 5%!important;
max-width: 90%;
height: 60%;
}
</style>";
}


// Login screen
function aquila_new_logo_login() {

echo "<style type='text/css'>
body.login #login:before {
display: none!important;
}
body.login #login h1 a {
display: block!important;
}
body.login #login h1 a {
background-image: url('" . $GLOBALS['aquilaNewLogo'] . "')!important;
background-size: contain;
background-repeat: no-repeat;
background-position: center center;
width: auto;
height: 80px;
max-width: 350px;
}
</style>";
}

function aquila_new_logo_sqr_admin() {

echo "<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('" . $GLOBALS['aquilaNewLogoSqr'] . "')!important;
background-size: contain;
background-repeat: no-repeat;
background-position: center center;
margin: 20% 10%!important;
max-width: 80%;
height: 60%;
}
</style>";
}

?>
5 changes: 2 additions & 3 deletions aquila-admin-theme.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,18 @@
* Description: The Aquila Admin Theme
* Author: Guy Primavera
* Author URI: https://guyprimavera.com/
* Version: 2.0
* Version: 2.0.1
* Text Domain: aquila-admin-theme
* License: GPL2
*
* 2017 Guy Primavera
*/

$aquilaVer = "2.0";
$aquilaVer = "2.01";

include ('scripts.php');
include ('login/aquila-login-screen.php');
include ('admin/dashboard.php');
include ('admin/adminBar.php');
include ('admin/options.php');

?>
5 changes: 4 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
Tags: material design wordpress, material design admin theme, material design wordpress admin, material wordpress, admin theme, admin, admin panel, admin theme style plugin, admin-theme, admin theme, aquila, backend theme, clean admin, color scheme, colour scheme, custom admin theme, flat admin theme, free admin theme, modern admin theme, new admin ui, plugin, simple admin theme, white label, white label admin, wordpress, wordPress admin, wordpress admin theme, wp-admin, wp admin page, wp admin theme
Requires at least: 4.0
Tested up to: 4.8
Stable tag: 2.0
Stable tag: 2.0.1
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -74,6 +74,9 @@ No. It only changes the admin area, the login page and the admin bar for logged-

== Changelog ==

= 2.0.1 - 14/06/2017 =
* Fixed "Headers already sent" error.

= 2.0 - 14/06/2017 =
* Ability to use your own logo images instead of the WordPress or Aquila logos.
* CSS re-written using LESS. Complete re-design.
Expand Down

0 comments on commit 7c717c7

Please sign in to comment.