Skip to content

Commit

Permalink
Release v2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
azurecurve committed Aug 27, 2022
1 parent 59f240d commit 92f41cb
Show file tree
Hide file tree
Showing 50 changed files with 2,282 additions and 1,209 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# [Update Admin Menu](https://development.azurecurve.co.uk/classicpress-plugins/update-admin-menu/)
![Plugin Banner](/assets/pluginimages/banner-1544x500.png)
![Plugin Banner](/assets/images/banner-1544x500.png)

# Description

Allows the reorganisation of the ClassicPress admin menu allowing you to move more often used menu entries to the top of the menu.
Allows the reorganisation of the ClassicPress admin menu allowing you to move more often used menu entries to the top of the menu and remove unwanted entries from view.

This plugin is multisite compatible with each site having its own settings.

Expand Down
45 changes: 45 additions & 0 deletions assets/css/admin-pluginmenu.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
azurecurve plugin index
----------------------------------------------- */
a.azrcrv-plugin-index, a.azrcrv-premium-plugin-index, a.azrcrv-bright-plugin-index, a.azrcrv-grey-plugin-index {
display: block;
float: left;
text-align: center;
margin: 4px;
color: #fff;
width: 220px;
height: 75px;
line-height: 75px;
text-decoration: none;
font-weight: 700;
border-radius: 5px;
}
a.azrcrv-plugin-index{
background-color: #007FFF;
}
a.azrcrv-premium-plugin-index {
background-color: #ff8000;
}
a.azrcrv-bright-plugin-index {
background-color: #7fff00;
color: #000;
}
a.azrcrv-grey-plugin-index {
background-color: #808080;
}
a.azrcrv-plugin-index:hover, a.azrcrv-premium-plugin-index:hover, a.azrcrv-bright-plugin-index:hover, a.azrcrv-grey-plugin-index:hover {
text-decoration: underline;
}
a.azrcrv-plugin-index:hover {
background-color: #0000ff;
}
a.azrcrv-premium-plugin-index:hover {
background-color: #ff0000;
}
a.azrcrv-bright-plugin-index:hover {
background-color: #8000ff;
color: #fff;
}
a.azrcrv-grey-plugin-index:hover {
background-color: #36454F;
}
83 changes: 83 additions & 0 deletions assets/css/admin-standard.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
/*
tabs
*/
.azrcrv-ui-tabs {
display: block;
position: relative;
margin-bottom: 6px;
overflow: auto;
}
.azrcrv-ui-tabs .azrcrv-ui-tabs-nav {
display: flex;
flex-wrap: wrap;
justify-content: left;
background: transparent;
border: none;
font-size: 1.3em;
}
.azrcrv-ui-tabs-nav .azrcrv-ui-state-default a{
border: 1px solid grey;
border-bottom: 4px solid grey;
color: grey;
background: transparent;
font-weight: 700;
padding: 6px;
}
.azrcrv-ui-tabs-nav .azrcrv-ui-state-active a{
border: 1px solid #007FFF;
border-bottom: 4px solid #007FFF;
color: #007FFF;
background: transparent;
font-weight: 700;
padding: 6px;
}
.azrcrv-ui-tabs-nav .azrcrv-ui-state-default a:hover{
border: 1px solid #0000ff;
border-bottom: 4px solid #0000ff;
color: #0000ff;
background: transparent;
font-weight: 700;
padding: 6px;
}
.azrcrv-ui-tabs-scroll {
margin-top: -12px;
border: 1px solid grey;
padding: 12px;
}
.azrcrv-ui-tabs-hidden{
display: none;
}
/*
section table
*/
table.azrcrv-settings{
}
th.azrcrv-settings-section-heading {
margin: 0;
padding: 0;
padding-left: 6px;
line-height: 1em;
border-bottom: 5px solid #007fff;
}
h2.azrcrv-settings-section-heading {
line-height: 1em;
}
table.azrcrv.settings th {
padding-left: 12px;
}
/*
Donate button
*/
div.azrcrv-donate {
color: #007fff;
font-size: 1.25em;
font-weight: 700;
text-align: center;
float:right;
width: 300px;
}
div.azrcrv-donate span {
font-size: 1em;
color: #000;
font-weight: 400;
}
17 changes: 11 additions & 6 deletions assets/css/admin.css
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
/*
other styles
*/
table.azrcrv-uam{
border-collapse: separate;
border-spacing: 0;
border-spacing: 0;
border-collapse: collapse;
}
th.azrcrv-uam{
padding: 12px 4px;
padding-bottom: 6px;
margin-bottom: 6px;
}
tr.azrcrv-uam, td.azrcrv-uam{
padding: 3px;
margin: 3px;
}
td.azrcrv-uam{
padding: 2px 8px;
}
2 changes: 1 addition & 1 deletion assets/css/index.php
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<?php
// Whereof one cannot speak, thereof one must be silent.
// Whereof one cannot speak, thereof one must be silent.
45 changes: 45 additions & 0 deletions assets/css/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
BBCode styles
*/
span.azrcrv-bbc-bold{
font-weight: 900;
}
span.azrcrv-bbc-italic{
font-style: italic;
}
span.azrcrv-bbc-underline{
text-decoration: underline;
}
span.azrcrv-bbc-strike{
text-decoration: line-through;
}
ul.azrcrv-bbc-ul{
}
ol.azrcrv-bbc-ol{
}
li.azrcrv-bbc-li{
}
table.azrcrv-bbc-table{
}
tr.azrcrv-bbc-tr{
}
th.azrcrv-bbc-th{
}
td.azrcrv-bbc-td{
}
a.azrcrv-bbc-url{
}
blockquote.azrcrv-bbc-quote{
}
div.azrcrv-bbc-quote{
}
pre.azrcrv-bbc-code{
}
code.azrcrv-bbc-code{
}
img.azrcrv-bbc-image{
}
img.azrcrv-bbc-center{
}
img.azrcrv-bbc-img{
}
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
2 changes: 2 additions & 0 deletions assets/images/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?php
// Whereof one cannot speak, thereof one must be silent.
File renamed without changes
2 changes: 1 addition & 1 deletion assets/index.php
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<?php
// Whereof one cannot speak, thereof one must be silent.
// Whereof one cannot speak, thereof one must be silent.
27 changes: 27 additions & 0 deletions assets/jquery/admin-standard.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* Tabs
*/
jQuery(
function($) {
'use strict';

$( '#tabs ul li a' ).on(
'keyup click',
function(e) {
if (e.key === 'Enter' || e.type === 'click') {
var id = $( this ).attr( 'href' );
$( '.azrcrv-ui-state-active' ).removeClass( 'azrcrv-ui-state-active' ).attr( 'aria-selected', 'false' ).attr( 'aria-expanded', 'false' );
$( this ).parent( 'li' ).addClass( 'azrcrv-ui-state-active' ).attr( 'aria-selected', 'true' ).attr( 'aria-expanded', 'true' );
$( this ).closest( 'ul' ).siblings().addClass( 'azrcrv-ui-tabs-hidden' ).attr( 'aria-hidden', 'true' );
$( id ).removeClass( 'azrcrv-ui-tabs-hidden' ).attr( 'aria-hidden', 'false' );
e.preventDefault();
}
}
);

$( '#tabs ul li a' ).hover(
function() { $( this ).addClass( 'azrcrv-ui-state-hover' ); },
function() { $( this ).removeClass( 'azrcrv-ui-state-hover' ); }
);
}
);
63 changes: 63 additions & 0 deletions assets/jquery/admin.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
/*
* Adapted from: http://mikejolley.com/2012/12/using-the-new-wordpress-3-5-media-uploader-in-plugins/
*/
jQuery( document ).ready(
function($){
// remove standard avatar display
// jQuery('table.form-table tr.user-profile-picture').remove();

// Uploading files
var file_frame;

$( '#azrcrv-a-upload-avatar' ).on(
'click',
function( event ){

event.preventDefault();

// If the media frame already exists, reopen it.
if ( file_frame ) {
file_frame.open();
return;
}

// Create the media frame.
file_frame = wp.media.frames.file_frame = wp.media(
{
title: $( this ).data( 'uploader_title' ),
button: {
text: $( this ).data( 'uploader_button_text' ),
},
multiple: false // Set to true to allow multiple files to be selected
}
);

// When an image is selected, run a callback.
file_frame.on(
'select',
function() {
// We set multiple to false so only get one image from the uploader
attachment = file_frame.state().get( 'selection' ).first().toJSON();

// Do something with attachment.id and/or attachment.url here
jQuery( '#custom-default-avatar' ).attr( 'value',attachment.url );
jQuery( '#custom-default-avatar-src' ).attr( 'src',attachment.url );
}
);

// Finally, open the modal
file_frame.open();
}
);
$( '#azrcrv-a-remove-avatar' ).on(
'click',
function( event ){

// remove image and url
jQuery( '#custom-default-avatar' ).attr( 'value','' );
jQuery( '#custom-default-avatar-src' ).attr( 'src','' );

}
);
}
);
2 changes: 2 additions & 0 deletions assets/jquery/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?php
// Whereof one cannot speak, thereof one must be silent.

0 comments on commit 92f41cb

Please sign in to comment.