Skip to content

Commit

Permalink
v2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
GuyPrimavera authored Feb 13, 2018
1 parent 0ca0cee commit e30dfd2
Show file tree
Hide file tree
Showing 46 changed files with 7,879 additions and 1,547 deletions.
3 changes: 1 addition & 2 deletions admin/adminBar.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php
if ( __FILE__ == $_SERVER['SCRIPT_FILENAME'] ) { exit; }
<?php if ( __FILE__ == $_SERVER['SCRIPT_FILENAME'] ) { exit; }

include('adminBar/adminBarLinks.php');
include('adminBar/adminBarTitle.php');
Expand Down
19 changes: 10 additions & 9 deletions admin/adminBar/adminBarLinks.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php
if ( __FILE__ == $_SERVER['SCRIPT_FILENAME'] ) { exit; }
<?php if ( __FILE__ == $_SERVER['SCRIPT_FILENAME'] ) { exit; }

// Admin Bar links

Expand Down Expand Up @@ -28,7 +27,9 @@ function aquila_admin_bar_links() {
$wp_admin_bar->remove_menu('customer-area');
$wp_admin_bar->remove_menu('itsec_admin_bar_menu');
$wp_admin_bar->remove_menu('maintenance_options');
$wp_admin_bar->remove_menu('tribe-events');
$wp_admin_bar->remove_menu('tribe-events');
$wp_admin_bar->remove_menu('analytify');
$wp_admin_bar->remove_menu('cxssh-main-menu');
}
add_action( 'wp_before_admin_bar_render', 'aquila_admin_bar_links', 999 );

Expand Down Expand Up @@ -56,8 +57,8 @@ function aquila_wp_logo_links($admin_bar){
$admin_bar->add_menu( array(
'id' => 'wpLessons',
'parent'=> 'wp-logo',
'title' => 'WordPress Lessons',
'href' => __('https://codex.wordpress.org/WordPress_Lessons'),
'title' => __( 'WordPress Lessons', 'aquila-admin-theme' ),
'href' => 'https://codex.wordpress.org/WordPress_Lessons',
'meta' => array(
'title' => __(''),
'class' => __(''),
Expand All @@ -68,8 +69,8 @@ function aquila_wp_logo_links($admin_bar){
$admin_bar->add_menu( array(
'id' => 'wpGuide',
'parent'=> 'wp-logo',
'title' => 'WordPress User Guide',
'href' => __('http://easywpguide.com/wordpress-manual/'),
'title' => __( 'WordPress User Guide', 'aquila-admin-theme' ),
'href' => 'http://easywpguide.com/wordpress-manual/',
'meta' => array(
'title' => __(''),
'class' => __(''),
Expand All @@ -80,8 +81,8 @@ function aquila_wp_logo_links($admin_bar){
$admin_bar->add_menu( array(
'id' => 'mitoSupport',
'parent'=> 'wp-logo-external',
'title' => 'Aquila Support',
'href' => __('https://designbymito.com/support/'),
'title' => __( 'Aquila Support', 'aquila-admin-theme' ),
'href' => 'https://designbymito.com/support/',
'meta' => array(
'title' => __(''),
'class' => __(''),
Expand Down
3 changes: 1 addition & 2 deletions admin/adminBar/adminBarTitle.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php
if ( __FILE__ == $_SERVER['SCRIPT_FILENAME'] ) { exit; }
<?php if ( __FILE__ == $_SERVER['SCRIPT_FILENAME'] ) { exit; }

if ( is_admin() ) {
add_action('admin_bar_menu', 'aquila_adminbar_title', 100);
Expand Down
3 changes: 1 addition & 2 deletions admin/adminBar/removeHowdy.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php
if ( __FILE__ == $_SERVER['SCRIPT_FILENAME'] ) { exit; }
<?php if ( __FILE__ == $_SERVER['SCRIPT_FILENAME'] ) { exit; }

// Remove "How are you" //

Expand Down
3 changes: 1 addition & 2 deletions admin/adminBar/screenLinks.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php
if ( __FILE__ == $_SERVER['SCRIPT_FILENAME'] ) { exit; }
<?php if ( __FILE__ == $_SERVER['SCRIPT_FILENAME'] ) { exit; }

add_action('admin_bar_menu', 'new_screenlinks', 100);
function new_screenlinks($admin_bar){
Expand Down
25 changes: 25 additions & 0 deletions admin/colour/bright.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

function bright($hex, $adjustment){

$adjustment = max(-255, min(255, $adjustment)); // Adjustment value is between 255 & -255
$hex = str_replace('#', '', $hex); //Remove # from string

//if hex value is 3 numbers set to 6
if (strlen($hex) == 3){
$hex = str_repeat(substr($hex,0,1), 2).str_repeat(substr($hex,1,1), 2).str_repeat(substr($hex,2,1), 2);
}

$colors = str_split($hex, 2); //split values into three channels
$adjusted_value = '#';

foreach($colors as $color) {
$color = hexdec($color); //convert to decimal
$color = max(0, min(255, $color + $adjustment)); //perform adjustment
$adjusted_value .= str_pad(dechex($color), 2, '0', STR_PAD_LEFT); //make two character hex code
}

return $adjusted_value;
}

?>
Loading

0 comments on commit e30dfd2

Please sign in to comment.