Version Description
- Fixed HTML escaping on multiple fields in AGCA, added non-admin restrictions instead
Download this release
Release Info
Developer | cusmin |
Plugin | Absolutely Glamorous Custom Admin |
Version | 6.9.2 |
Comparing to | |
See all releases |
Code changes from version 6.9.1 to 6.9.2
- plugin.php +91 -46
- readme.txt +7 -1
- style/ag_style.css +13 -0
plugin.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Absolutely Glamorous Custom Admin
|
|
4 |
Plugin URI: https://cusmin.com/agca
|
5 |
Description: All-in-one plugin for WordPress dashboard customization. Change almost everything: admin menu, dashboard, login page, admin bar and much more.
|
6 |
Author: Cusmin
|
7 |
-
Version: 6.9.
|
8 |
Text Domain: ag-custom-admin
|
9 |
Domain Path: /languages
|
10 |
Author URI: https://cusmin.com/
|
@@ -28,8 +28,8 @@ Author URI: https://cusmin.com/
|
|
28 |
$agca = new AGCA();
|
29 |
|
30 |
class AGCA{
|
31 |
-
private $agca_version = "6.9.
|
32 |
-
private $colorizer="";
|
33 |
private $agca_debug = false;
|
34 |
private $admin_capabilities;
|
35 |
private $context = "";
|
@@ -118,17 +118,29 @@ class AGCA{
|
|
118 |
//Prevent non-admin users to update sensitive options
|
119 |
//Revert option value to previous
|
120 |
function after_update_option( $option, $old_value, $new_value ){
|
121 |
-
if(!current_user_can('administrator')
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
129 |
}
|
130 |
}
|
131 |
|
|
|
|
|
|
|
|
|
132 |
function agca_customizer_php(){
|
133 |
$this->agca_get_includes();
|
134 |
}
|
@@ -171,8 +183,11 @@ class AGCA{
|
|
171 |
function checkPOST(){
|
172 |
}
|
173 |
|
174 |
-
function
|
175 |
-
|
|
|
|
|
|
|
176 |
}
|
177 |
|
178 |
function verifyPostRequest(){
|
@@ -249,9 +264,9 @@ class AGCA{
|
|
249 |
$customTitle = get_option('agca_custom_title');
|
250 |
$customTitle = str_replace('%BLOG%',$blog,$customTitle);
|
251 |
$customTitle = str_replace('%PAGE%',$page,$customTitle);
|
252 |
-
return
|
253 |
}else{
|
254 |
-
return
|
255 |
}
|
256 |
}
|
257 |
function agca_get_includes() {
|
@@ -949,8 +964,8 @@ class AGCA{
|
|
949 |
jQuery("#wphead #site-heading").css("display","none");
|
950 |
<?php } ?>
|
951 |
<?php if(get_option('agca_custom_site_heading')!=""){ ?>
|
952 |
-
jQuery("#wphead #site-heading").after('<h1><?php echo
|
953 |
-
jQuery("#wp-admin-bar-site-name a:first").html('<?php echo
|
954 |
|
955 |
<?php } ?>
|
956 |
<?php if(get_option('agca_header')==true && $this->context =='admin'){
|
@@ -965,18 +980,12 @@ class AGCA{
|
|
965 |
<?php
|
966 |
$agca_logout_text = ((get_option('agca_logout')=="")?__("Log Out", 'ag-custom-admin'):get_option('agca_logout'));
|
967 |
?>
|
968 |
-
jQuery("#wpbody-content").prepend('<a href="<?php echo wp_logout_url(); ?>" tabindex="10" style="float:right;margin-right:20px" class="ab-item agca_logout_button"><?php echo
|
969 |
|
970 |
|
971 |
<?php } ?>
|
972 |
-
<?php
|
973 |
-
if(get_option('agca_custom_title')!=""){
|
974 |
-
//add_filter('admin_title', '$this->change_title', 10, 2);
|
975 |
-
|
976 |
-
}
|
977 |
-
?>
|
978 |
<?php if(get_option('agca_logout')!=""){ ?>
|
979 |
-
jQuery("ul#wp-admin-bar-user-actions li#wp-admin-bar-logout a").
|
980 |
<?php } ?>
|
981 |
<?php if(get_option('agca_remove_your_profile')==true){ ?>
|
982 |
jQuery("ul#wp-admin-bar-user-actions li#wp-admin-bar-edit-profile").css("visibility","hidden");
|
@@ -1007,7 +1016,7 @@ class AGCA{
|
|
1007 |
if ( 0 != $user_id ) {
|
1008 |
/* Add the "My Account" menu */
|
1009 |
$avatar = get_avatar( $user_id, 28 );
|
1010 |
-
$howdy =
|
1011 |
$class = empty( $avatar ) ? '' : 'with-avatar';
|
1012 |
|
1013 |
$wp_admin_bar->add_menu( array(
|
@@ -1559,13 +1568,13 @@ class AGCA{
|
|
1559 |
<?php } ?>
|
1560 |
|
1561 |
<?php if(get_option('agca_footer_left')!=""){ ?>
|
1562 |
-
jQuery("#footer-left").html('<?php echo
|
1563 |
<?php } ?>
|
1564 |
<?php if(get_option('agca_footer_left_hide')==true){ ?>
|
1565 |
jQuery("#footer-left").css("display","none");
|
1566 |
<?php } ?>
|
1567 |
<?php if(get_option('agca_footer_right')!=""){ ?>
|
1568 |
-
jQuery("#footer-upgrade").html('<?php echo
|
1569 |
<?php } ?>
|
1570 |
<?php if(get_option('agca_footer_right_hide')==true){ ?>
|
1571 |
jQuery("#footer-upgrade").css("display","none");
|
@@ -1581,7 +1590,7 @@ class AGCA{
|
|
1581 |
}
|
1582 |
<?php } ?>
|
1583 |
<?php if(get_option('agca_dashboard_text')!=""){ ?>
|
1584 |
-
jQuery("#dashboard-widgets-wrap").parent().find("h1").html("<?php echo
|
1585 |
<?php } ?>
|
1586 |
<?php if(get_option('agca_dashboard_text_paragraph')!=""){
|
1587 |
require_once($this->filePath('wp-includes/formatting.php'));
|
@@ -2130,7 +2139,8 @@ class AGCA{
|
|
2130 |
$this->print_input(array(
|
2131 |
'title'=>__('Customize WordPress title using custom title template.</br></br>Examples', 'ag-custom-admin').':</br><strong>%BLOG% -- %PAGE%</strong> '.'('.__('will be', 'ag-custom-admin').')'.' <i>My Blog -- Add New Post</i></br><strong>%BLOG%</strong> ('.__('will be', 'ag-custom-admin').') <i>My Blog</i></br><strong>My Company > %BLOG% > %PAGE%</strong> ('.__('will be', 'ag-custom-admin').') <i>My Company > My Blog > Tools</i>',
|
2132 |
'name'=>'agca_custom_title',
|
2133 |
-
'
|
|
|
2134 |
'hint' =>__('Please use', 'ag-custom-admin').' <strong>%BLOG%</strong> '.__('and', 'ag-custom-admin'). ' <strong>%PAGE%</strong> '.__('in your title template.', 'ag-custom-admin')
|
2135 |
));
|
2136 |
|
@@ -2242,7 +2252,8 @@ class AGCA{
|
|
2242 |
$this->print_input(array(
|
2243 |
'title'=>__('Adds custom text in admin top bar.', 'ag-custom-admin'),
|
2244 |
'name'=>'agca_custom_site_heading',
|
2245 |
-
'
|
|
|
2246 |
'hint'=>__('<strong>Tip: </strong>You can use HTML tags like', 'ag-custom-admin')." <h1> ".__('or', 'ag-custom-admin')." <a>"
|
2247 |
));
|
2248 |
|
@@ -2258,13 +2269,16 @@ class AGCA{
|
|
2258 |
|
2259 |
$this->print_input(array(
|
2260 |
'name'=>'agca_howdy',
|
2261 |
-
'
|
|
|
|
|
2262 |
));
|
2263 |
|
2264 |
$this->print_input(array(
|
2265 |
'title'=>__('Put \'Exit\', for example', 'ag-custom-admin'),
|
2266 |
'name'=>'agca_logout',
|
2267 |
-
'
|
|
|
2268 |
));
|
2269 |
|
2270 |
$this->print_checkbox(array(
|
@@ -2316,8 +2330,9 @@ class AGCA{
|
|
2316 |
$this->print_textarea(array(
|
2317 |
'title'=>__('Replaces text \'Thank you for creating with WordPress\' with custom text', 'ag-custom-admin'),
|
2318 |
'name'=>'agca_footer_left',
|
|
|
2319 |
'class' => 'one-line',
|
2320 |
-
'label'=>__('Change footer text', 'ag-custom-admin')
|
2321 |
));
|
2322 |
|
2323 |
$this->print_checkbox(array(
|
@@ -2330,8 +2345,9 @@ class AGCA{
|
|
2330 |
$this->print_textarea(array(
|
2331 |
'title'=>__('Replaces text \'Get Version ...\' with custom text', 'ag-custom-admin'),
|
2332 |
'name'=>'agca_footer_right',
|
|
|
2333 |
'class' => 'one-line',
|
2334 |
-
'label'=>__('Change version text', 'ag-custom-admin')
|
2335 |
));
|
2336 |
|
2337 |
?>
|
@@ -2349,7 +2365,8 @@ class AGCA{
|
|
2349 |
$this->print_input(array(
|
2350 |
'title'=>__('Main heading (\'Dashboard\') on Dashboard page', 'ag-custom-admin'),
|
2351 |
'name'=>'agca_dashboard_text',
|
2352 |
-
'
|
|
|
2353 |
));
|
2354 |
|
2355 |
?>
|
@@ -2357,10 +2374,10 @@ class AGCA{
|
|
2357 |
<th scope="row">
|
2358 |
<label title="<?php _e('Adds custom text (or HTML) between heading and widgets area on Dashboard page', 'ag-custom-admin'); ?>" for="agca_dashboard_text_paragraph">
|
2359 |
<?php _e('Add custom Dashboard content<br> <em>( text or HTML content )', 'ag-custom-admin'); ?></em>
|
2360 |
-
<?php $this->
|
2361 |
</label>
|
2362 |
</th>
|
2363 |
-
<td class="agca_editor">
|
2364 |
<?php $this->getTextEditor('agca_dashboard_text_paragraph'); ?>
|
2365 |
</td>
|
2366 |
</tr>
|
@@ -2523,7 +2540,7 @@ class AGCA{
|
|
2523 |
'title'=>__('Change register link on login page to point to your custom registration page.', 'ag-custom-admin'),
|
2524 |
'name'=>'agca_login_register_href',
|
2525 |
'label'=>__('Change register link', 'ag-custom-admin'),
|
2526 |
-
'hint'=>__('Link to new registration page', 'ag-custom-admin')
|
2527 |
));
|
2528 |
|
2529 |
$this->print_checkbox(array(
|
@@ -2752,19 +2769,35 @@ class AGCA{
|
|
2752 |
<tr valign="center">
|
2753 |
<th scope="row">
|
2754 |
<label title="<?php _e('Add custom CSS script to override existing styles', 'ag-custom-admin'); ?>" for="agca_script_css"><?php _e('Custom CSS script', 'ag-custom-admin'); ?></em></label>
|
2755 |
-
<?php $this->
|
2756 |
</th>
|
2757 |
<td>
|
2758 |
-
<textarea
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2759 |
</td>
|
2760 |
</tr>
|
2761 |
<tr valign="center">
|
2762 |
<th scope="row">
|
2763 |
<label title="<?php _e('Add additional custom JavaScript', 'ag-custom-admin'); ?>" for="agca_custom_js"><?php _e('Custom JavaScript', 'ag-custom-admin'); ?></label>
|
2764 |
-
<?php $this->
|
2765 |
</th>
|
2766 |
<td>
|
2767 |
-
<textarea
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2768 |
</td>
|
2769 |
</tr>
|
2770 |
|
@@ -2874,6 +2907,9 @@ class AGCA{
|
|
2874 |
if(!isset($data['title'])){
|
2875 |
$data['title'] = $data['label'];
|
2876 |
}
|
|
|
|
|
|
|
2877 |
if(isset($data['suffix'])){
|
2878 |
$suffix = $data['suffix'];
|
2879 |
}
|
@@ -2888,8 +2924,11 @@ class AGCA{
|
|
2888 |
<label title="<?php echo $data['title'] ?>" for="<?php echo $data['name'] ?>"><?php echo $data['label'] ?></label>
|
2889 |
</th>
|
2890 |
<td>
|
2891 |
-
<input id="<?php echo $data['name'] ?>" title="<?php echo $data['title'] ?>" type="text" size="47" name="<?php echo $data['name'] ?>" value="<?php echo htmlentities(get_option($data['name'])); ?>" />
|
2892 |
-
|
|
|
|
|
|
|
2893 |
<?php echo $strHint ?>
|
2894 |
</td>
|
2895 |
</tr>
|
@@ -2907,13 +2946,19 @@ class AGCA{
|
|
2907 |
if(isset($data['class'])){
|
2908 |
$strClass = $data['class'];
|
2909 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2910 |
?>
|
2911 |
<tr valign="center">
|
2912 |
<th scope="row">
|
2913 |
<label title="<?php echo $data['title'] ?>" for="<?php echo $data['name'] ?>"><?php echo $data['label'] ?></label>
|
2914 |
</th>
|
2915 |
<td>
|
2916 |
-
<textarea <?php echo !empty($strClass)?'class="'.$strClass.'"':''; ?> title="<?php echo $data['title'] ?>" rows="5" name="<?php echo $data['name'] ?>" cols="40"><?php echo htmlspecialchars(get_option($data['name'])); ?></textarea>
|
2917 |
<?php echo $strHint ?>
|
2918 |
</td>
|
2919 |
</tr>
|
4 |
Plugin URI: https://cusmin.com/agca
|
5 |
Description: All-in-one plugin for WordPress dashboard customization. Change almost everything: admin menu, dashboard, login page, admin bar and much more.
|
6 |
Author: Cusmin
|
7 |
+
Version: 6.9.2
|
8 |
Text Domain: ag-custom-admin
|
9 |
Domain Path: /languages
|
10 |
Author URI: https://cusmin.com/
|
28 |
$agca = new AGCA();
|
29 |
|
30 |
class AGCA{
|
31 |
+
private $agca_version = "6.9.2";
|
32 |
+
private $colorizer = "";
|
33 |
private $agca_debug = false;
|
34 |
private $admin_capabilities;
|
35 |
private $context = "";
|
118 |
//Prevent non-admin users to update sensitive options
|
119 |
//Revert option value to previous
|
120 |
function after_update_option( $option, $old_value, $new_value ){
|
121 |
+
if(!current_user_can('administrator') &&
|
122 |
+
in_array($option, [
|
123 |
+
'agca_dashboard_text_paragraph',
|
124 |
+
'agca_dashboard_text',
|
125 |
+
'agca_custom_css',
|
126 |
+
'agca_footer_left',
|
127 |
+
'agca_footer_right',
|
128 |
+
'agca_custom_title',
|
129 |
+
'agca_custom_site_heading',
|
130 |
+
'agca_howdy',
|
131 |
+
'agca_logout',
|
132 |
+
'agca_custom_js',
|
133 |
+
])) {
|
134 |
+
remove_action( 'updated_option', array(&$this,'after_update_option'));
|
135 |
+
update_option($option, $old_value);
|
136 |
+
add_action( 'updated_option', array(&$this,'after_update_option'), 10, 3);
|
137 |
}
|
138 |
}
|
139 |
|
140 |
+
function is_wp_admin(){
|
141 |
+
return current_user_can('administrator');
|
142 |
+
}
|
143 |
+
|
144 |
function agca_customizer_php(){
|
145 |
$this->agca_get_includes();
|
146 |
}
|
183 |
function checkPOST(){
|
184 |
}
|
185 |
|
186 |
+
function getFieldSecurityProtected(){
|
187 |
+
if($this->is_wp_admin()){
|
188 |
+
return '';
|
189 |
+
}
|
190 |
+
return '<p style="color: red">( For security reasons, this field is available for editing only to WordPress <b>Administrators</b> group )</p>';
|
191 |
}
|
192 |
|
193 |
function verifyPostRequest(){
|
264 |
$customTitle = get_option('agca_custom_title');
|
265 |
$customTitle = str_replace('%BLOG%',$blog,$customTitle);
|
266 |
$customTitle = str_replace('%PAGE%',$page,$customTitle);
|
267 |
+
return $customTitle;
|
268 |
}else{
|
269 |
+
return $admin_title;
|
270 |
}
|
271 |
}
|
272 |
function agca_get_includes() {
|
964 |
jQuery("#wphead #site-heading").css("display","none");
|
965 |
<?php } ?>
|
966 |
<?php if(get_option('agca_custom_site_heading')!=""){ ?>
|
967 |
+
jQuery("#wphead #site-heading").after(('<h1><?php echo (addslashes(get_option('agca_custom_site_heading'))); ?></h1>'));
|
968 |
+
jQuery("#wp-admin-bar-site-name a:first").html(('<?php echo (addslashes(get_option('agca_custom_site_heading'))); ?>'));
|
969 |
|
970 |
<?php } ?>
|
971 |
<?php if(get_option('agca_header')==true && $this->context =='admin'){
|
980 |
<?php
|
981 |
$agca_logout_text = ((get_option('agca_logout')=="")?__("Log Out", 'ag-custom-admin'):get_option('agca_logout'));
|
982 |
?>
|
983 |
+
jQuery("#wpbody-content").prepend('<a href="<?php echo wp_logout_url(); ?>" tabindex="10" style="float:right;margin-right:20px" class="ab-item agca_logout_button"><?php echo ($agca_logout_text); ?></a>');
|
984 |
|
985 |
|
986 |
<?php } ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
987 |
<?php if(get_option('agca_logout')!=""){ ?>
|
988 |
+
jQuery("ul#wp-admin-bar-user-actions li#wp-admin-bar-logout a").html("<?php echo htmlentities(get_option('agca_logout')); ?>");
|
989 |
<?php } ?>
|
990 |
<?php if(get_option('agca_remove_your_profile')==true){ ?>
|
991 |
jQuery("ul#wp-admin-bar-user-actions li#wp-admin-bar-edit-profile").css("visibility","hidden");
|
1016 |
if ( 0 != $user_id ) {
|
1017 |
/* Add the "My Account" menu */
|
1018 |
$avatar = get_avatar( $user_id, 28 );
|
1019 |
+
$howdy = sprintf( __(get_option('agca_howdy').', %1$s'), $current_user->display_name );
|
1020 |
$class = empty( $avatar ) ? '' : 'with-avatar';
|
1021 |
|
1022 |
$wp_admin_bar->add_menu( array(
|
1568 |
<?php } ?>
|
1569 |
|
1570 |
<?php if(get_option('agca_footer_left')!=""){ ?>
|
1571 |
+
jQuery("#footer-left").html('<?php echo (addslashes(get_option('agca_footer_left'))); ?>');
|
1572 |
<?php } ?>
|
1573 |
<?php if(get_option('agca_footer_left_hide')==true){ ?>
|
1574 |
jQuery("#footer-left").css("display","none");
|
1575 |
<?php } ?>
|
1576 |
<?php if(get_option('agca_footer_right')!=""){ ?>
|
1577 |
+
jQuery("#footer-upgrade").html('<?php echo (addslashes(get_option('agca_footer_right'))); ?>');
|
1578 |
<?php } ?>
|
1579 |
<?php if(get_option('agca_footer_right_hide')==true){ ?>
|
1580 |
jQuery("#footer-upgrade").css("display","none");
|
1590 |
}
|
1591 |
<?php } ?>
|
1592 |
<?php if(get_option('agca_dashboard_text')!=""){ ?>
|
1593 |
+
jQuery("#dashboard-widgets-wrap").parent().find("h1").html("<?php echo (addslashes(get_option('agca_dashboard_text'))); ?>");
|
1594 |
<?php } ?>
|
1595 |
<?php if(get_option('agca_dashboard_text_paragraph')!=""){
|
1596 |
require_once($this->filePath('wp-includes/formatting.php'));
|
2139 |
$this->print_input(array(
|
2140 |
'title'=>__('Customize WordPress title using custom title template.</br></br>Examples', 'ag-custom-admin').':</br><strong>%BLOG% -- %PAGE%</strong> '.'('.__('will be', 'ag-custom-admin').')'.' <i>My Blog -- Add New Post</i></br><strong>%BLOG%</strong> ('.__('will be', 'ag-custom-admin').') <i>My Blog</i></br><strong>My Company > %BLOG% > %PAGE%</strong> ('.__('will be', 'ag-custom-admin').') <i>My Company > My Blog > Tools</i>',
|
2141 |
'name'=>'agca_custom_title',
|
2142 |
+
'disabled' => !$this->is_wp_admin(),
|
2143 |
+
'label'=>__('Page title template', 'ag-custom-admin') . $this->getFieldSecurityProtected(),
|
2144 |
'hint' =>__('Please use', 'ag-custom-admin').' <strong>%BLOG%</strong> '.__('and', 'ag-custom-admin'). ' <strong>%PAGE%</strong> '.__('in your title template.', 'ag-custom-admin')
|
2145 |
));
|
2146 |
|
2252 |
$this->print_input(array(
|
2253 |
'title'=>__('Adds custom text in admin top bar.', 'ag-custom-admin'),
|
2254 |
'name'=>'agca_custom_site_heading',
|
2255 |
+
'disabled' => !$this->is_wp_admin(),
|
2256 |
+
'label'=>__('Custom blog heading', 'ag-custom-admin') . $this->getFieldSecurityProtected(),
|
2257 |
'hint'=>__('<strong>Tip: </strong>You can use HTML tags like', 'ag-custom-admin')." <h1> ".__('or', 'ag-custom-admin')." <a>"
|
2258 |
));
|
2259 |
|
2269 |
|
2270 |
$this->print_input(array(
|
2271 |
'name'=>'agca_howdy',
|
2272 |
+
'title' => '',
|
2273 |
+
'disabled' => !$this->is_wp_admin(),
|
2274 |
+
'label'=>__('Change Howdy text', 'ag-custom-admin') . $this->getFieldSecurityProtected(),
|
2275 |
));
|
2276 |
|
2277 |
$this->print_input(array(
|
2278 |
'title'=>__('Put \'Exit\', for example', 'ag-custom-admin'),
|
2279 |
'name'=>'agca_logout',
|
2280 |
+
'disabled' => !$this->is_wp_admin(),
|
2281 |
+
'label'=>__('Change Log out text', 'ag-custom-admin') . $this->getFieldSecurityProtected(),
|
2282 |
));
|
2283 |
|
2284 |
$this->print_checkbox(array(
|
2330 |
$this->print_textarea(array(
|
2331 |
'title'=>__('Replaces text \'Thank you for creating with WordPress\' with custom text', 'ag-custom-admin'),
|
2332 |
'name'=>'agca_footer_left',
|
2333 |
+
'disabled' => !$this->is_wp_admin(),
|
2334 |
'class' => 'one-line',
|
2335 |
+
'label'=>__('Change footer text', 'ag-custom-admin') . $this->getFieldSecurityProtected()
|
2336 |
));
|
2337 |
|
2338 |
$this->print_checkbox(array(
|
2345 |
$this->print_textarea(array(
|
2346 |
'title'=>__('Replaces text \'Get Version ...\' with custom text', 'ag-custom-admin'),
|
2347 |
'name'=>'agca_footer_right',
|
2348 |
+
'disabled' => !$this->is_wp_admin(),
|
2349 |
'class' => 'one-line',
|
2350 |
+
'label'=>__('Change version text', 'ag-custom-admin') . $this->getFieldSecurityProtected()
|
2351 |
));
|
2352 |
|
2353 |
?>
|
2365 |
$this->print_input(array(
|
2366 |
'title'=>__('Main heading (\'Dashboard\') on Dashboard page', 'ag-custom-admin'),
|
2367 |
'name'=>'agca_dashboard_text',
|
2368 |
+
'disabled' => !$this->is_wp_admin(),
|
2369 |
+
'label'=>__('Change Dashboard heading text', 'ag-custom-admin') . $this->getFieldSecurityProtected(),
|
2370 |
));
|
2371 |
|
2372 |
?>
|
2374 |
<th scope="row">
|
2375 |
<label title="<?php _e('Adds custom text (or HTML) between heading and widgets area on Dashboard page', 'ag-custom-admin'); ?>" for="agca_dashboard_text_paragraph">
|
2376 |
<?php _e('Add custom Dashboard content<br> <em>( text or HTML content )', 'ag-custom-admin'); ?></em>
|
2377 |
+
<?php echo $this->getFieldSecurityProtected(); ?>
|
2378 |
</label>
|
2379 |
</th>
|
2380 |
+
<td class="agca_editor<?php echo !$this->is_wp_admin() ? ' disabled' : ''; ?>">
|
2381 |
<?php $this->getTextEditor('agca_dashboard_text_paragraph'); ?>
|
2382 |
</td>
|
2383 |
</tr>
|
2540 |
'title'=>__('Change register link on login page to point to your custom registration page.', 'ag-custom-admin'),
|
2541 |
'name'=>'agca_login_register_href',
|
2542 |
'label'=>__('Change register link', 'ag-custom-admin'),
|
2543 |
+
'hint'=>__('Link to a new registration page', 'ag-custom-admin')
|
2544 |
));
|
2545 |
|
2546 |
$this->print_checkbox(array(
|
2769 |
<tr valign="center">
|
2770 |
<th scope="row">
|
2771 |
<label title="<?php _e('Add custom CSS script to override existing styles', 'ag-custom-admin'); ?>" for="agca_script_css"><?php _e('Custom CSS script', 'ag-custom-admin'); ?></em></label>
|
2772 |
+
<?php echo $this->getFieldSecurityProtected(); ?>
|
2773 |
</th>
|
2774 |
<td>
|
2775 |
+
<textarea
|
2776 |
+
class="<?php echo !$this->is_wp_admin() ? 'disabled' : ''; ?>"
|
2777 |
+
style="width:100%;height:200px"
|
2778 |
+
title="<?php _e('Add custom CSS script to override existing styles', 'ag-custom-admin'); ?>"
|
2779 |
+
rows="5"
|
2780 |
+
<?php echo !$this->is_wp_admin() ? 'disabled="disabled"' : ''; ?>
|
2781 |
+
id="agca_custom_css"
|
2782 |
+
name="agca_custom_css"
|
2783 |
+
cols="40"><?php echo htmlspecialchars(get_option('agca_custom_css')); ?></textarea>
|
2784 |
</td>
|
2785 |
</tr>
|
2786 |
<tr valign="center">
|
2787 |
<th scope="row">
|
2788 |
<label title="<?php _e('Add additional custom JavaScript', 'ag-custom-admin'); ?>" for="agca_custom_js"><?php _e('Custom JavaScript', 'ag-custom-admin'); ?></label>
|
2789 |
+
<?php echo $this->getFieldSecurityProtected(); ?>
|
2790 |
</th>
|
2791 |
<td>
|
2792 |
+
<textarea
|
2793 |
+
class="<?php echo !$this->is_wp_admin() ? 'disabled' : ''; ?>"
|
2794 |
+
style="width:100%;height:200px"
|
2795 |
+
title="<?php _e('Add additional custom JavaScript', 'ag-custom-admin'); ?>"
|
2796 |
+
rows="5"
|
2797 |
+
<?php echo !$this->is_wp_admin() ? 'disabled="disabled"' : ''; ?>
|
2798 |
+
name="agca_custom_js"
|
2799 |
+
id="agca_custom_js"
|
2800 |
+
cols="40"><?php echo htmlspecialchars(get_option('agca_custom_js')); ?></textarea>
|
2801 |
</td>
|
2802 |
</tr>
|
2803 |
|
2907 |
if(!isset($data['title'])){
|
2908 |
$data['title'] = $data['label'];
|
2909 |
}
|
2910 |
+
if(!isset($data['disabled'])){
|
2911 |
+
$data['disabled'] = false;
|
2912 |
+
}
|
2913 |
if(isset($data['suffix'])){
|
2914 |
$suffix = $data['suffix'];
|
2915 |
}
|
2924 |
<label title="<?php echo $data['title'] ?>" for="<?php echo $data['name'] ?>"><?php echo $data['label'] ?></label>
|
2925 |
</th>
|
2926 |
<td>
|
2927 |
+
<input id="<?php echo $data['name'] ?>" title="<?php echo $data['title'] ?>" type="text" size="47" class="<?php echo $data['disabled'] ? 'disabled' : ''; ?>" name="<?php echo $data['name'] ?>" value="<?php echo htmlentities(get_option($data['name'])); ?>" <?php echo $data['disabled'] ? 'disabled="disabled"':''; ?> />
|
2928 |
+
<?php if(!$data['disabled']) { ?>
|
2929 |
+
<a title="<?php _e('Clear', 'ag-custom-admin'); ?>" class="agca_button clear" onClick="jQuery('#<?php echo $data['name'] ?>').val('');"><span class="dashicons clear dashicons-no-alt"></span></a>
|
2930 |
+
<?php } ?>
|
2931 |
+
<?php echo $suffix ?>
|
2932 |
<?php echo $strHint ?>
|
2933 |
</td>
|
2934 |
</tr>
|
2946 |
if(isset($data['class'])){
|
2947 |
$strClass = $data['class'];
|
2948 |
}
|
2949 |
+
if(!isset($data['disabled'])){
|
2950 |
+
$data['disabled'] = false;
|
2951 |
+
}
|
2952 |
+
if($data['disabled']){
|
2953 |
+
$strClass .= ' disabled';
|
2954 |
+
}
|
2955 |
?>
|
2956 |
<tr valign="center">
|
2957 |
<th scope="row">
|
2958 |
<label title="<?php echo $data['title'] ?>" for="<?php echo $data['name'] ?>"><?php echo $data['label'] ?></label>
|
2959 |
</th>
|
2960 |
<td>
|
2961 |
+
<textarea <?php echo !empty($strClass)?'class="'.$strClass.'"':''; ?> title="<?php echo $data['title'] ?>" rows="5" name="<?php echo $data['name'] ?>" cols="40" <?php echo $data['disabled'] ? 'disabled="disabled"':''; ?> ><?php echo htmlspecialchars(get_option($data['name'])); ?></textarea>
|
2962 |
<?php echo $strHint ?>
|
2963 |
</td>
|
2964 |
</tr>
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=agca@cus
|
|
4 |
Tags: admin, dashboard, customize, hide, admin bar, login page, admin menu, colors, branding, dashboard widgets
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 5.8
|
7 |
-
Stable tag: 6.9.
|
8 |
License: GPLv3 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl.txt
|
10 |
|
@@ -153,6 +153,9 @@ If you have the latest WordPress and plugin versions and you still experience so
|
|
153 |
|
154 |
== Change Log ==
|
155 |
|
|
|
|
|
|
|
156 |
= 6.9.1 =
|
157 |
* Minor updates in text, links and Readme
|
158 |
|
@@ -621,6 +624,9 @@ If you have the latest WordPress and plugin versions and you still experience so
|
|
621 |
|
622 |
== Upgrade Notice ==
|
623 |
|
|
|
|
|
|
|
624 |
= 6.9.1 =
|
625 |
* Minor updates in text, links and Readme
|
626 |
|
4 |
Tags: admin, dashboard, customize, hide, admin bar, login page, admin menu, colors, branding, dashboard widgets
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 5.8
|
7 |
+
Stable tag: 6.9.2
|
8 |
License: GPLv3 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl.txt
|
10 |
|
153 |
|
154 |
== Change Log ==
|
155 |
|
156 |
+
= 6.9.2 =
|
157 |
+
* Fixed HTML escaping on multiple fields in AGCA, added non-admin restrictions instead
|
158 |
+
|
159 |
= 6.9.1 =
|
160 |
* Minor updates in text, links and Readme
|
161 |
|
624 |
|
625 |
== Upgrade Notice ==
|
626 |
|
627 |
+
= 6.9.2 =
|
628 |
+
* Fixed HTML escaping on multiple fields in AGCA, added non-admin restrictions instead
|
629 |
+
|
630 |
= 6.9.1 =
|
631 |
* Minor updates in text, links and Readme
|
632 |
|
style/ag_style.css
CHANGED
@@ -593,6 +593,11 @@ td.ag_admin_menu_parent:hover {
|
|
593 |
display: inline-block;
|
594 |
}
|
595 |
|
|
|
|
|
|
|
|
|
|
|
596 |
#agca_form input[type=text]:hover{
|
597 |
transform: scale(1.01);
|
598 |
}
|
@@ -632,6 +637,10 @@ td.ag_admin_menu_parent:hover {
|
|
632 |
padding: 5px;
|
633 |
transition: all .3s;
|
634 |
}
|
|
|
|
|
|
|
|
|
635 |
#agca_form textarea.one-line{
|
636 |
height: 35px;
|
637 |
}
|
@@ -715,6 +724,10 @@ td.ag_admin_menu_parent:hover {
|
|
715 |
width: 600px;
|
716 |
}
|
717 |
|
|
|
|
|
|
|
|
|
718 |
|
719 |
.agca_logout_button {
|
720 |
background: none repeat scroll 0 0 #dddddd;
|
593 |
display: inline-block;
|
594 |
}
|
595 |
|
596 |
+
#agca_form input[type=text].disabled {
|
597 |
+
opacity: 0.5;
|
598 |
+
pointer-events:none;
|
599 |
+
}
|
600 |
+
|
601 |
#agca_form input[type=text]:hover{
|
602 |
transform: scale(1.01);
|
603 |
}
|
637 |
padding: 5px;
|
638 |
transition: all .3s;
|
639 |
}
|
640 |
+
#agca_form textarea.disabled{
|
641 |
+
opacity: 0.5;
|
642 |
+
pointer-events:none;
|
643 |
+
}
|
644 |
#agca_form textarea.one-line{
|
645 |
height: 35px;
|
646 |
}
|
724 |
width: 600px;
|
725 |
}
|
726 |
|
727 |
+
.agca_editor.disabled {
|
728 |
+
opacity: 0.5;
|
729 |
+
pointer-events:none;
|
730 |
+
}
|
731 |
|
732 |
.agca_logout_button {
|
733 |
background: none repeat scroll 0 0 #dddddd;
|