Skip to content
Permalink
Browse files

Updated Anomalous Branding. And cleaned some of the page PHP Code.

  • Loading branch information...
djm56 committed Aug 18, 2017
1 parent e6e95ed commit 0c3832c10f626dc6fbc946701f92c99ed113159c
Showing with 31 additions and 42 deletions.
  1. BIN includes/assets/img/Admin_Logo.png
  2. +31 −42 includes/cutom-options.php
Binary file not shown.
@@ -1,6 +1,5 @@
<?php
/*
/*
* @link http://www.anomalous.co.za
* @since 1.0.0
* @package wordpress-admin-customizer.
@@ -13,44 +12,33 @@ function wac_add_admin_menu() {
add_options_page('WPZA Admin', 'Admin Customizer', 'manage_options', 'wordpress_admin_customizer', 'wac_options_page');
}
function wac_settings_init() {
if(function_exists( 'wp_enqueue_media' )){
wp_enqueue_media();
}else{
wp_enqueue_style('thickbox');
wp_enqueue_script('media-upload');
wp_enqueue_script('thickbox');
}
if (function_exists('wp_enqueue_media')) {
wp_enqueue_media();
} else {
wp_enqueue_style('thickbox');
wp_enqueue_script('media-upload');
wp_enqueue_script('thickbox');
}
register_setting('pluginPage', 'wac_settings');
add_settings_section(
'wac_pluginPage_section', __('Customize the WordPress Admin', 'wordpress-admin-customizer'), 'wac_settings_section_callback', 'pluginPage'
);
add_settings_field(
'wac_text_field_0', __('Footer Copyright Text', 'wordpress-admin-customizer'), 'wac_text_field_0_render', 'pluginPage', 'wac_pluginPage_section'
);
add_settings_field(
'wac_text_field_2', __('Show Dashboard Box', 'wordpress-admin-customizer'), 'wac_text_field_2_render', 'pluginPage', 'wac_pluginPage_section'
);
add_settings_field(
'wac_text_field_1', __('Dashboard Box content', 'wordpress-admin-customizer'), 'wac_text_field_1_render', 'pluginPage', 'wac_pluginPage_section'
);
add_settings_field(
'wac_text_field_4', __('Logo for Admin Login', 'wordpress-admin-customizer'), 'wac_text_field_4_render', 'pluginPage', 'wac_pluginPage_section'
);
add_settings_field(
'wac_text_field_3', __('Restore Defaults Upon Reactivation?', 'wordpress-admin-customizer'), 'wac_text_field_3_render', 'pluginPage', 'wac_pluginPage_section'
);
}
function wac_text_field_0_render() {
@@ -95,27 +83,27 @@ function wac_text_field_4_render() {
<a href="#" class="header_logo_upload button button-primary">Upload</a>
<p><small>Upload the image that is 312px × 100px.</small></p>
<script>
jQuery(document).ready(function($) {
$('.header_logo_upload').click(function(e) {
e.preventDefault();
var custom_uploader = wp.media({
title: 'Custom Image',
button: {
text: 'Upload Image'
},
multiple: false // Set this to true to allow multiple files to be selected
})
.on('select', function() {
var attachment = custom_uploader.state().get('selection').first().toJSON();
$('.header_logo').attr('src', attachment.url);
$('.header_logo_url').val(attachment.url);
})
.open();
jQuery(document).ready(function ($) {
$('.header_logo_upload').click(function (e) {
e.preventDefault();
var custom_uploader = wp.media({
title: 'Custom Image',
button: {
text: 'Upload Image'
},
multiple: false // Set this to true to allow multiple files to be selected
})
.on('select', function () {
var attachment = custom_uploader.state().get('selection').first().toJSON();
$('.header_logo').attr('src', attachment.url);
$('.header_logo_url').val(attachment.url);
})
.open();
});
});
});
</script>
</script>
<?php
}
@@ -134,5 +122,6 @@ function wac_options_page() {
?>
<p><small>Developed by WPZA Website Maintenance Services. <a href="https://wpza.co.za">https://wpza.co.za</a></small></p>
</form>
<?php
}
<?php
}

0 comments on commit 0c3832c

Please sign in to comment.
You can’t perform that action at this time.