-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from GuyPrimavera/v2.3
v2.3
- Loading branch information
Showing
49 changed files
with
2,879 additions
and
707 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php if ( __FILE__ == $_SERVER['SCRIPT_FILENAME'] ) { exit; } | ||
|
||
// Add icon in place of admin bar | ||
function aquila_adminbar_icon() { | ||
if ( is_admin_bar_showing() ) { | ||
$aquilaOptions = get_option( 'aquila_settings' ); | ||
if(isset($aquilaOptions['aquila_chk_abVisible']) && $aquilaOptions['aquila_chk_abVisible'] == 1) { | ||
echo '<style> | ||
.aquilaFront #wpadminbar { | ||
display: block; | ||
} | ||
</style>'; | ||
} | ||
echo '<div id="aquilaAdminbarIcon" title="Toggle Admin Bar"></div>'; | ||
} | ||
} | ||
add_action( 'admin_bar_menu', 'aquila_adminbar_icon', 999 ); | ||
|
||
// Add body class | ||
function aquila_adminbar_open_class( $classes ) { | ||
if ( is_admin_bar_showing() ) { | ||
$aquilaOptions = get_option( 'aquila_settings' ); | ||
if(isset($aquilaOptions['aquila_chk_abVisible']) && $aquilaOptions['aquila_chk_abVisible'] == 1) { | ||
$classes[] = 'aquilaOpenBar'; | ||
} else { | ||
$classes[] = 'aquilaClosedBar'; | ||
} | ||
return $classes; | ||
} else { | ||
return $classes; | ||
} | ||
} | ||
add_filter('body_class', 'aquila_adminbar_open_class'); | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php if ( __FILE__ == $_SERVER['SCRIPT_FILENAME'] ) { exit; } | ||
|
||
// Admin Bar height | ||
function aquila_admin_bar() { | ||
if ( is_admin_bar_showing() ) { | ||
echo "<style type='text/css' media='screen'> | ||
html { margin-top: 0px !important; } | ||
* html body { margin-top: 0px !important; } | ||
@media screen and ( max-width: 782px ) { | ||
html { margin-top: 0px !important; } | ||
* html body { margin-top: 0px !important; } | ||
} | ||
</style> | ||
"; | ||
} | ||
} | ||
add_action( 'wp_head', 'aquila_admin_bar', 99 ); | ||
remove_action( 'admin_color_scheme_picker', 'admin_color_scheme_picker' ); | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
<?php if ( __FILE__ == $_SERVER['SCRIPT_FILENAME'] ) { exit; } | ||
|
||
add_action('init', 'clean_output_buffer'); | ||
function clean_output_buffer() { | ||
ob_start(); | ||
} | ||
|
||
// Custom Logo | ||
$aquilaLogoSettings = get_option( 'aquilaLogoSettings' ); | ||
$aquilaNewLogo = $aquilaLogoSettings['aquila_new_logo']; | ||
$aquilaNewLogoSqr = $aquilaLogoSettings['aquila_new_logo_sqr']; | ||
|
||
$GLOBALS['aquilaNewLogo'] = $aquilaNewLogo; | ||
$GLOBALS['aquilaNewLogoSqr'] = $aquilaNewLogoSqr; | ||
|
||
if( isset($aquilaLogoSettings['aquila_new_logo']) && $aquilaLogoSettings['aquila_new_logo'] !== "" ) { | ||
add_action( 'admin_head', 'aquila_new_logo_admin', 90); | ||
add_action( 'wp_head', 'aquila_new_logo_admin', 90); | ||
add_action( 'login_head', 'aquila_new_logo_login', 90 ); | ||
} | ||
|
||
// Custom Logo (square) | ||
if( isset($aquilaLogoSettings['aquila_new_logo_sqr']) && $aquilaLogoSettings['aquila_new_logo_sqr'] !== "" ) { | ||
add_action( 'admin_head', 'aquila_new_logo_sqr_admin', 90 ); | ||
add_action( 'wp_head', 'aquila_new_logo_sqr_admin', 90 ); | ||
} | ||
|
||
// 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: 0%!important; | ||
max-width: 80%; | ||
height: 70%; | ||
top: 15%; | ||
left: 10%; | ||
} | ||
#aquilaAdminbarIcon { | ||
background-image: url('" . $GLOBALS['aquilaNewLogoSqr'] . "')!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('" . $GLOBALS['aquilaNewLogoSqr'] . "')!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>"; | ||
} | ||
|
||
// 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: 0%!important; | ||
max-width: 80%; | ||
height: 80%; | ||
top: 10%; | ||
left: 10%; | ||
} | ||
</style>"; | ||
} | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.