-
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 #6 from GuyPrimavera/v2.0
v2.0
- Loading branch information
Showing
43 changed files
with
9,449 additions
and
2,359 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
<?php | ||
<?php | ||
if ( __FILE__ == $_SERVER['SCRIPT_FILENAME'] ) { exit; } | ||
|
||
include('adminBar/adminBarLinks.php'); | ||
include('adminBar/adminBarTitle.php'); | ||
include('adminBar/screenLinks.php'); | ||
include('adminBar/removeHowdy.php'); | ||
|
||
?> |
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,57 @@ | ||
<?php | ||
if ( __FILE__ == $_SERVER['SCRIPT_FILENAME'] ) { exit; } | ||
|
||
if ( is_admin() ) { | ||
add_action('admin_bar_menu', 'aquila_adminbar_title', 100); | ||
} | ||
|
||
function aquila_adminbar_title($admin_bar){ | ||
|
||
$postType = false; | ||
$postType = get_current_screen()->post_type; | ||
$postTypeName = get_post_type_object( $postType ); | ||
$adminTitle = false; | ||
$adminTitle = get_admin_page_title(); | ||
|
||
if ($adminTitle !== false && $postType !== false && is_admin()) { | ||
|
||
$admin_bar->add_menu( array( | ||
'id' => 'adminTitle', | ||
'title' => $adminTitle, | ||
'href' => '', | ||
'meta' => array( | ||
'title' => __($adminTitle), | ||
), | ||
)); | ||
|
||
/* | ||
if ($postType !== false) { | ||
$admin_bar->add_menu( array( | ||
'id' => 'viewAll', | ||
'parent' => 'adminTitle', // Rename when ready for "Add new" | ||
'title' => 'All ' . $postTypeName->labels->name, | ||
'href' => get_admin_url( ) . 'edit.php?post_type=' . $postType, | ||
'meta' => array( | ||
'title' => __('My Sub Menu Item'), | ||
'target' => '_blank', | ||
'class' => 'my_menu_item_class' | ||
), | ||
)); | ||
$admin_bar->add_menu( array( | ||
'id' => 'my-second-sub-item', | ||
'parent' => 'adminTitle', | ||
'title' => 'New ' . $postTypeName->labels->singular_name, | ||
'href' => get_admin_url( ) . 'post-new.php?post_type=' . $postType, | ||
'meta' => array( | ||
'title' => __('My Second Sub Menu Item'), | ||
'target' => '_blank', | ||
'class' => 'my_menu_item_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
<?php | ||
<?php | ||
if ( __FILE__ == $_SERVER['SCRIPT_FILENAME'] ) { exit; } | ||
|
||
// Remove "How are you" // | ||
|
||
|
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,31 @@ | ||
<?php | ||
if ( __FILE__ == $_SERVER['SCRIPT_FILENAME'] ) { exit; } | ||
|
||
add_action('admin_bar_menu', 'new_screenlinks', 100); | ||
function new_screenlinks($admin_bar){ | ||
|
||
$admin_bar->add_menu( array( | ||
'id' => 'screenOptions', | ||
'title' => '', | ||
'href' => '', | ||
'meta' => array( | ||
'title' => __(''), | ||
'class' => __('screenLink'), | ||
), | ||
)); | ||
|
||
$admin_bar->add_menu( array( | ||
'id' => 'contextHelp', | ||
'title' => '', | ||
'href' => '', | ||
'meta' => array( | ||
'title' => __(''), | ||
'class' => __('screenLink'), | ||
), | ||
)); | ||
|
||
|
||
|
||
} | ||
|
||
?> |
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 |
---|---|---|
@@ -1,15 +1,15 @@ | ||
<?php | ||
<?php | ||
if ( __FILE__ == $_SERVER['SCRIPT_FILENAME'] ) { exit; } | ||
|
||
include('widgets/removeWidgets.php'); | ||
include('widgets/welcomeWidget.php'); | ||
include('widgets/supportWidget.php'); | ||
include('widgets/pluginWidget.php'); | ||
|
||
include('functions/addClasses.php'); | ||
include('functions/adminBarStyle.php'); | ||
include('functions/hideNag.php'); | ||
include('functions/postToBlog.php'); | ||
include('functions/aquilaDash.php'); | ||
include('functions/customLogo.php'); | ||
include('functions/footer.php'); | ||
|
||
?> |
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 |
---|---|---|
@@ -1,21 +1,40 @@ | ||
<?php | ||
<?php | ||
if ( __FILE__ == $_SERVER['SCRIPT_FILENAME'] ) { exit; } | ||
|
||
// Add role to body | ||
|
||
function aquila_admin_body_role($classes) { | ||
global $current_user; | ||
$user_role = array_shift($current_user->roles); | ||
$classes .= 'role-'. $user_role; | ||
return $classes; | ||
|
||
//global $current_user; | ||
//$userRole = array_shift($current_user->roles); | ||
|
||
$classes .= 'aquila aquilaAdmin'; | ||
return $classes; | ||
|
||
} | ||
//add_filter('body_class','aquila_admin_body_role'); | ||
add_filter('admin_body_class', 'aquila_admin_body_role'); | ||
|
||
function aquila_admin_body_class($classes) { | ||
$classes[] = 'aquila'; | ||
return $classes; | ||
|
||
function aquila_front_body_class( $classes ) { | ||
|
||
|
||
if ( is_admin_bar_showing() ) { | ||
|
||
//global $current_user; | ||
//$userRole = array_shift($current_user->roles); | ||
|
||
$classes[] = 'aquila aquilaFront'; | ||
return $classes; | ||
|
||
} else { | ||
|
||
$classes[] = ' '; | ||
return $classes; | ||
|
||
} | ||
|
||
} | ||
add_filter('body_class', 'aquila_admin_body_class'); | ||
//add_filter('admin_body_class', 'aquila_admin_body_class'); | ||
add_filter('body_class', 'aquila_front_body_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,106 @@ | ||
<?php | ||
if ( __FILE__ == $_SERVER['SCRIPT_FILENAME'] ) { exit; } | ||
|
||
// Custom Logo | ||
|
||
$aquilaOptions = get_option( 'aquila_settings' ); | ||
|
||
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 ); | ||
|
||
} | ||
|
||
// 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 ); | ||
|
||
} | ||
|
||
|
||
|
||
?> |
Oops, something went wrong.